{"version":3,"file":"index.cjs","names":["z","filter","LoggerImpl","name","logger","filter","LoggerCtx","inspect","util","console","logger","filter","logger","attributes","safeJsonStringify","text","json","context","ApiError","ApiClientError","ApiPermissionError","ApiNotFoundError","ApiValidationError","ApiAuthenticationError","ApiRateLimitError","ApiServerError","USER_AGENT","projectSlug","isAggregateQuery","name","attributes","module","marker","symbol","_a","_b","name14","marker15","name","marker2","symbol2","_a2","_b2","name2","marker3","symbol3","_a3","_b3","getErrorMessage","name3","marker4","symbol4","_a4","_b4","name4","marker5","symbol5","_a5","_b5","name5","marker6","symbol6","_a6","_b6","name6","marker7","symbol7","_a7","_b7","text","name7","marker8","symbol8","_a8","name8","marker9","symbol9","name9","marker10","symbol10","name10","marker11","symbol11","_a11","name11","marker12","symbol12","_a12","name12","marker13","symbol13","_a13","context","_a15","name13","marker14","symbol14","_a14","_a2","array","name","marker","symbol","_a","_b","_b2","VERSION","APICallError2","description","text","ZodFirstPartyTypeKind","ZodFirstPartyTypeKind2","object","ZodFirstPartyTypeKind3","name2","name3","_a3","main","InvalidArgumentError2","APICallError3","APICallError4","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","name","__copyProps","__toCommonJS","getContext","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","name","__copyProps","__toCommonJS","getVercelOidcToken","import_get_context","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","name","__copyProps","marker","symbol","_a","name","marker2","symbol2","_a2","name2","marker3","symbol3","_a3","name3","marker4","symbol4","_a4","name4","marker5","symbol5","_a5","name5","marker6","symbol6","_a6","name6","marker7","symbol7","_a7","_a8","VERSION","_b8","_a9","VERSION","isCompatible","VERSION","_a","VERSION","_b","__read","__spreadArray","DiagComponentLogger","namespace","logger","DiagLogLevel","logger","__read","__spreadArray","API_NAME","DiagAPI","logger","_a","_b","description","BaseContext","context","__read","__spreadArray","NoopContextManager","API_NAME","ContextAPI","context","_a","TraceFlags","NonRecordingSpan","context","getActiveSpan","_a","NoopTracer","name","context","ProxyTracer","name","context","NoopTracerProvider","ProxyTracerProvider","name","_a","SpanStatusCode","TraceAPI","getActiveSpan","name","__defProp","__export","InvalidArgumentError","AISDKError3","AISDKError4","AISDKError5","AISDKError6","AISDKError8","AISDKError9","AISDKError12","AISDKError13","AISDKError14","AISDKError17","AISDKError19","logger","VERSION","DownloadError2","_b","AISDKError21","jsonValueSchema","InvalidPromptError2","AISDKError22","attributes","description","TypeValidationError2","_b2","description","context","tool","context","tool","context","ALL_SKILLS","context","RESULT_LIMIT","ALL_SKILLS","context","RESULT_LIMIT","context","RESULT_LIMIT","ALL_SKILLS","context","context","isPlainObject","name","context","context","context","context","projectSlug","projectSlug$1","context","name","context","projectSlug","context","context","context","context","AlertRuleKind","getIssueAlertRuleFrequency","context","projectSlug","isPlainObject","projectSlug","projectSlug","context","formatInlineCode","context","normalizeSpanId","trace","formatTraceSpanDescription","description","isPrimitive","isPlainObject","name","projectSlug","getString","context","context","text","context","context","context","context","VERSION","_a","context","tool","_b","UnsupportedFunctionalityError2","_a2","_b2","_a3","generateId2","configuredBaseUrl","factory","USER_AGENT","_a","_b","_a2","text","tool","UnsupportedFunctionalityError2","choice","UnsupportedFunctionalityError3","_b2","UnsupportedFunctionalityError4","filter","UnsupportedFunctionalityError5","DEFAULT_OPENAI_MODEL","configuredBaseUrl","factory","USER_AGENT","factory","USER_AGENT","factory","USER_AGENT","context","document","name","text","context","trace","visit","formatDuration","durationMs","context","projectSlug","context","projectSlug","formatDurationSeconds","formatNameVersion","name","timestampMs","description","durationMs","context","text","context","text","PUBLIC_EVENTS_DATASETS","filter","name","PUBLIC_EVENTS_DATASETS","RECOMMENDED_FIELDS","SEARCH_EVENTS_DATASETS","PUBLIC_EVENTS_DATASETS","systemPrompt","formatExplanation","name","PUBLIC_EVENTS_DATASETS","RECOMMENDED_FIELDS","TRACE_METRICS_SAMPLE_IDENTITY_FIELDS","filter","context","context","context","context","assignedTeamSchema","mapTeam","context","context","context","context","context","delay","resolve","context","resolve","context","context","USER_AGENT","systemPrompt","systemPrompt","formatDate","context","systemPrompt","RECOMMENDED_FIELDS","parseIssueParams","systemPrompt","context","RECOMMENDED_FIELDS","marker","context","context","projectSlug$1","projectSlug","attributes","name","context","context","isPlainObject","context","context","context","context","projectSlug","context","text","context","ALL_SKILLS","context","jsonSchema","tool","name","description","context","ALL_SKILLS","context","tool","context","ALL_SKILLS","name","__toESM","z","OAuthError","FormElicitationCapabilitySchema","ElicitationCapabilitySchema","Base64Schema","json","context","ProtocolError","tool","visit","jsonSchema","name","resolve","exports","exports","_a","name","UsedValueState","_b","If","Type","DataType","context","_a$1","module","require_resolve","resolve","Ajv","text","getLogger","logger","require_types","DiscrError","addFormats","DefaultJsonSchemaValidator","logger","McpServer","name","tool","json","description","outputSchema","context","LIB_VERSION","name","McpServer","tool","description","SKILLS","message: string","LIB_VERSION","providerConfigError: string | undefined","signal: string","context"],"sources":["../../mcp-core/dist/constants-CEZaLsGe.js","../../mcp-core/dist/errors-CEDWDXew.js","../../mcp-core/dist/slug-validation-MJ3jU0Hd.js","../../mcp-core/dist/schema-DKEjeVqP.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/filter.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/level.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/logger.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/util.node.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/formatter.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/sink.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/config.js","../../mcp-core/dist/logging-B7X3yL0T.js","../../mcp-core/dist/api-path-BQDQ2sHi.js","../../mcp-core/dist/errors-DG2FreDU.js","../../mcp-core/dist/schema-BYZYkgA1.js","../../mcp-core/dist/client-IUNQkit5.js","../../../node_modules/.pnpm/@ai-sdk+provider@3.0.6/node_modules/@ai-sdk/provider/dist/index.mjs","../../../node_modules/.pnpm/eventsource-parser@3.0.6/node_modules/eventsource-parser/dist/index.js","../../../node_modules/.pnpm/eventsource-parser@3.0.6/node_modules/eventsource-parser/dist/stream.js","../../../node_modules/.pnpm/@ai-sdk+provider-utils@4.0.11_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/get-context.js","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js","../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/index.js","../../../node_modules/.pnpm/@ai-sdk+gateway@3.0.29_zod@4.4.3/node_modules/@ai-sdk/gateway/dist/index.mjs","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/version.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/internal/semver.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/types.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/diag.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/context/context.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/context.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/status.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/context-api.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/trace.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace-api.js","../../../node_modules/.pnpm/ai@6.0.64_zod@4.4.3/node_modules/ai/dist/index.mjs","../../mcp-core/dist/error-handling-BsZo3KBt.js","../../mcp-core/dist/constraint-helpers-C-VlK4t-.js","../../mcp-core/dist/surfaces-B1_F0pzt.js","../../mcp-core/dist/types-DGnYE-i7.js","../../mcp-core/dist/availability-zLnbaxcD.js","../../mcp-core/dist/define-SD6AQa4b.js","../../mcp-core/dist/validate-region-url-C2aYIha9.js","../../mcp-core/dist/api-EaEPyKlQ.js","../../mcp-core/dist/results-NF1RJbDZ.js","../../mcp-core/dist/whoami-Bz6QKirR.js","../../mcp-core/dist/find-organizations-CXTZEMsb.js","../../mcp-core/dist/find-teams-ZsyAWNb7.js","../../mcp-core/dist/find-projects-BYeZfQDF.js","../../mcp-core/dist/find-releases-fkgr4qqZ.js","../../mcp-core/dist/type-guards-DHLAzjf2.js","../../mcp-core/dist/api-formatting-nIGXUFdx.js","../../mcp-core/dist/project-constraints-DlfcU4mm.js","../../mcp-core/dist/get-release-details-0bKoH-Gv.js","../../mcp-core/dist/dashboards-BCwvH2V2.js","../../mcp-core/dist/find-dashboards-DE0x5cIv.js","../../mcp-core/dist/get-dashboard-details-7tf-4Q_F.js","../../mcp-core/dist/find-monitors-DOaVdrCU.js","../../mcp-core/dist/get-monitor-details-CP_Cj6P3.js","../../mcp-core/dist/uptime-monitors-DdMrkrKy.js","../../mcp-core/dist/find-uptime-monitors-NZjkNLjM.js","../../mcp-core/dist/get-uptime-monitor-details-DfFRiDqD.js","../../mcp-core/dist/create-uptime-monitor-fo-rIhsm.js","../../mcp-core/dist/update-uptime-monitor-CXyi5lFD.js","../../mcp-core/dist/delete-uptime-monitor-CHj4Cluv.js","../../mcp-core/dist/find-alert-rules-Co9XjMKY.js","../../mcp-core/dist/alerts-CVOIE5iC.js","../../mcp-core/dist/get-alert-rule-WfTdEa_v.js","../../mcp-core/dist/tool-call-formatting-ALc98KqF.js","../../mcp-core/dist/ai-conversation-actions-rbKawWyG.js","../../mcp-core/dist/enhance-error-BDXGhe5E.js","../../mcp-core/dist/url-scope-CRM5sNo7.js","../../mcp-core/dist/issue-helpers-0Dnme3Ym.js","../../mcp-core/dist/code-location-DW_YNpMG.js","../../mcp-core/dist/seer-BoTKAK7k.js","../../mcp-core/dist/user-formatting-BrX0Xi05.js","../../mcp-core/dist/formatting-Cviy8-dX.js","../../mcp-core/dist/issue-D65xI0F7.js","../../mcp-core/dist/code-location-C0fIXD0V.js","../../mcp-core/dist/get-issue-details-DHDUffp5.js","../../mcp-core/dist/event-stacktrace-DNVGqkZt.js","../../mcp-core/dist/get-event-stacktrace-ODRk7GSR.js","../../mcp-core/dist/get-issue-activity-CKhQWy99.js","../../mcp-core/dist/breadcrumbs-BltIlpas.js","../../mcp-core/dist/get-issue-breadcrumbs-D5AeF8Vm.js","../../mcp-core/dist/get-issue-tag-values-DtJZnl37.js","../../mcp-core/dist/get-issue-user-reports-D73TLuX2.js","../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.33_zod@4.4.3/node_modules/@ai-sdk/anthropic/dist/index.mjs","../../mcp-core/dist/anthropic-provider-CRd6GA4E.js","../../../node_modules/.pnpm/@ai-sdk+openai@3.0.23_zod@4.4.3/node_modules/@ai-sdk/openai/dist/index.mjs","../../mcp-core/dist/azure-openai-provider-BNAjkBmg.js","../../mcp-core/dist/openai-provider-DK3FdwQ_.js","../../mcp-core/dist/openrouter-provider-JT8w8qQ6.js","../../mcp-core/dist/provider-factory-Cs_2DBhe.js","../../mcp-core/dist/resolve-region-url-DutLwiPb.js","../../mcp-core/dist/semantic-display-Zyyjp_BY.js","../../mcp-core/dist/get-trace-details-D7U8b5_V.js","../../mcp-core/dist/get-span-details-DfXIT1v_.js","../../mcp-core/dist/url-helpers-CcAcmPuu.js","../../mcp-core/dist/get-replay-details-BWeEKq_j.js","../../mcp-core/dist/get-event-attachment-h8oTTPZt.js","../../mcp-core/dist/formatting-Dh3LlFmw.js","../../mcp-core/dist/update-issue-q9a5YNJb.js","../../mcp-core/dist/provider-fallback-L61Pbfxx.js","../../mcp-core/dist/callEmbeddedAgent-ffwEeqdP.js","../../mcp-core/dist/utils-DHwF0RI3.js","../../mcp-core/dist/dataset-fields-CBauoBBr.js","../../mcp-core/dist/otel-semantics-DGeu0HI-.js","../../mcp-core/dist/whoami-DU_KhHDm.js","../../mcp-core/dist/utils-Dg2aeBEb.js","../../mcp-core/dist/agent-BCH9XRWB.js","../../mcp-core/dist/analyzer-CtmUqCwO.js","../../mcp-core/dist/formatters-Cuh2gD9M.js","../../mcp-core/dist/replays-Dg9Syytd.js","../../mcp-core/dist/search-events-C8aVtdIY.js","../../mcp-core/dist/create-team-Bz1tSDLQ.js","../../mcp-core/dist/create-project-CTQakq9G.js","../../mcp-core/dist/update-project-BYY10KTt.js","../../mcp-core/dist/add-team-to-project-DrTGc_T9.js","../../mcp-core/dist/remove-team-from-project-CT7eqBf7.js","../../mcp-core/dist/create-dsn-C-kIpqG7.js","../../mcp-core/dist/find-dsns-DCUQXIHr.js","../../mcp-core/dist/update-dsn-Ce0IWsRx.js","../../mcp-core/dist/fetch-utils-By3YW-Mv.js","../../mcp-core/dist/analyze-issue-with-seer-Dy01BWPf.js","../../mcp-core/dist/search-docs-DVVQKCxP.js","../../mcp-core/dist/get-doc-CnSvhrTG.js","../../mcp-core/dist/config-lLg5qzu0.js","../../mcp-core/dist/agent-BIAUd2t1.js","../../mcp-core/dist/formatters-3Z1cdvzp.js","../../mcp-core/dist/search-issues-CQ0efOru.js","../../mcp-core/dist/config-ChOUIglS.js","../../mcp-core/dist/utils-_4r1K2PE.js","../../mcp-core/dist/agent-Bbb5dUlD.js","../../mcp-core/dist/search-issue-events-fYjr_r6r.js","../../mcp-core/dist/formatter-UsEdX-DU.js","../../mcp-core/dist/get-profile-CilEVKTg.js","../../mcp-core/dist/get-profile-details-B7TCia0B.js","../../mcp-core/dist/get-agent-conversation-details-DTJR8hFg.js","../../mcp-core/dist/formatting-C_fxwUSt.js","../../mcp-core/dist/handlers-CCIzlp0E.js","../../mcp-core/dist/get-snapshot-Ce1Z98WR.js","../../mcp-core/dist/get-snapshot-image-CWtW-DQz.js","../../mcp-core/dist/get-sentry-resource-DAx17Rhc.js","../../mcp-core/dist/get-latest-base-snapshot-KoSAQyLF.js","../../mcp-core/dist/search-agent-conversations-CUhIOq09.js","../../mcp-core/dist/add-issue-note-DqTid9mJ.js","../../mcp-core/dist/onboarding-status-update-ZaTsL300.js","../../mcp-core/dist/catalog-DaTB1cy-.js","../../mcp-core/dist/schema-BuKqZlvC.js","../../mcp-core/dist/search-CX6pdulw.js","../../mcp-core/dist/search-tools-CbtWC7w4.js","../../mcp-core/dist/execute-tool-B_06lhoJ.js","../../mcp-core/dist/tools-fGO-TOBm.js","../../../node_modules/.pnpm/@modelcontextprotocol+server@2.0.0/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs","../../../node_modules/.pnpm/@modelcontextprotocol+server@2.0.0/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs","../../../node_modules/.pnpm/@modelcontextprotocol+core@2.0.0/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs","../../../node_modules/.pnpm/@modelcontextprotocol+server@2.0.0/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs","../../../node_modules/.pnpm/@modelcontextprotocol+server@2.0.0/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs","../../../node_modules/.pnpm/@modelcontextprotocol+server@2.0.0/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs","../../mcp-core/dist/server.js","../../mcp-core/dist/sentry-D99fvngC.js","../src/index.ts"],"sourcesContent":["//#region src/constants.ts\n/**\n* Constants for Sentry MCP server.\n*\n* Defines platform and framework combinations available in Sentry documentation.\n*/\n/**\n* MCP Server identification\n*/\nconst MCP_SERVER_NAME = \"Sentry MCP\";\n/**\n* Supported issue-search windows exposed by search_issues.\n* Intentionally bounded for query performance; lower-level API methods still accept arbitrary Sentry statsPeriod strings.\n*/\nconst SEARCH_ISSUES_PERIOD_VALUES = [\n\t\"24h\",\n\t\"7d\",\n\t\"14d\",\n\t\"30d\",\n\t\"90d\"\n];\n/**\n* Default time window used when no period is specified.\n* 30d balances coverage against timeout risk on busy orgs.\n* (The Sentry API's own default is 90d when omitted entirely.)\n*/\nconst DEFAULT_SEARCH_ISSUES_PERIOD = \"30d\";\n/**\n* Allowed region domains for sentry.io\n* Only these specific domains are permitted when using Sentry's cloud service\n* This is used to prevent SSRF attacks by restricting regionUrl to known domains\n*/\nconst SENTRY_ALLOWED_REGION_DOMAINS = new Set([\n\t\"sentry.io\",\n\t\"us.sentry.io\",\n\t\"de.sentry.io\"\n]);\n/**\n* Common Sentry platforms that have documentation available\n*/\nconst SENTRY_PLATFORMS_BASE = [\n\t\"javascript\",\n\t\"python\",\n\t\"java\",\n\t\"dotnet\",\n\t\"go\",\n\t\"php\",\n\t\"ruby\",\n\t\"android\",\n\t\"apple\",\n\t\"unity\",\n\t\"unreal\",\n\t\"rust\",\n\t\"elixir\",\n\t\"kotlin\",\n\t\"native\",\n\t\"dart\",\n\t\"godot\",\n\t\"nintendo-switch\",\n\t\"playstation\",\n\t\"powershell\",\n\t\"react-native\",\n\t\"xbox\"\n];\n/**\n* Platform-specific frameworks that have Sentry guides\n*/\nconst SENTRY_FRAMEWORKS = {\n\tjavascript: [\n\t\t\"nextjs\",\n\t\t\"react\",\n\t\t\"gatsby\",\n\t\t\"remix\",\n\t\t\"vue\",\n\t\t\"angular\",\n\t\t\"hono\",\n\t\t\"svelte\",\n\t\t\"express\",\n\t\t\"fastify\",\n\t\t\"astro\",\n\t\t\"bun\",\n\t\t\"capacitor\",\n\t\t\"cloudflare\",\n\t\t\"connect\",\n\t\t\"cordova\",\n\t\t\"deno\",\n\t\t\"electron\",\n\t\t\"ember\",\n\t\t\"nuxt\",\n\t\t\"solid\",\n\t\t\"solidstart\",\n\t\t\"sveltekit\",\n\t\t\"tanstack-react\",\n\t\t\"wasm\",\n\t\t\"node\",\n\t\t\"koa\",\n\t\t\"nestjs\",\n\t\t\"hapi\"\n\t],\n\tpython: [\n\t\t\"django\",\n\t\t\"flask\",\n\t\t\"fastapi\",\n\t\t\"celery\",\n\t\t\"tornado\",\n\t\t\"pyramid\",\n\t\t\"aiohttp\",\n\t\t\"anthropic\",\n\t\t\"airflow\",\n\t\t\"aws-lambda\",\n\t\t\"boto3\",\n\t\t\"bottle\",\n\t\t\"chalice\",\n\t\t\"dramatiq\",\n\t\t\"falcon\",\n\t\t\"langchain\",\n\t\t\"litestar\",\n\t\t\"logging\",\n\t\t\"loguru\",\n\t\t\"openai\",\n\t\t\"quart\",\n\t\t\"ray\",\n\t\t\"redis\",\n\t\t\"rq\",\n\t\t\"sanic\",\n\t\t\"sqlalchemy\",\n\t\t\"starlette\"\n\t],\n\tdart: [\"flutter\"],\n\tdotnet: [\n\t\t\"aspnetcore\",\n\t\t\"maui\",\n\t\t\"wpf\",\n\t\t\"winforms\",\n\t\t\"aspnet\",\n\t\t\"aws-lambda\",\n\t\t\"azure-functions\",\n\t\t\"blazor-webassembly\",\n\t\t\"entityframework\",\n\t\t\"google-cloud-functions\",\n\t\t\"extensions-logging\",\n\t\t\"log4net\",\n\t\t\"nlog\",\n\t\t\"serilog\",\n\t\t\"uwp\",\n\t\t\"xamarin\"\n\t],\n\tjava: [\n\t\t\"spring\",\n\t\t\"spring-boot\",\n\t\t\"android\",\n\t\t\"jul\",\n\t\t\"log4j2\",\n\t\t\"logback\",\n\t\t\"servlet\"\n\t],\n\tgo: [\n\t\t\"echo\",\n\t\t\"fasthttp\",\n\t\t\"fiber\",\n\t\t\"gin\",\n\t\t\"http\",\n\t\t\"iris\",\n\t\t\"logrus\",\n\t\t\"negroni\",\n\t\t\"slog\",\n\t\t\"zerolog\"\n\t],\n\tphp: [\"laravel\", \"symfony\"],\n\truby: [\n\t\t\"delayed_job\",\n\t\t\"rack\",\n\t\t\"rails\",\n\t\t\"resque\",\n\t\t\"sidekiq\"\n\t],\n\tandroid: [\"kotlin\"],\n\tapple: [\n\t\t\"ios\",\n\t\t\"macos\",\n\t\t\"watchos\",\n\t\t\"tvos\",\n\t\t\"visionos\"\n\t],\n\tkotlin: [\"multiplatform\"]\n};\n/**\n* All valid guides for Sentry docs search filtering.\n* A guide can be either a platform (e.g., 'javascript') or a platform/framework combination (e.g., 'javascript/nextjs').\n*/\nconst SENTRY_GUIDES = [...SENTRY_PLATFORMS_BASE, ...Object.entries(SENTRY_FRAMEWORKS).flatMap(([platform, guides]) => guides.map((guide) => `${platform}/${guide}`))];\nconst DEFAULT_SCOPES = [\n\t\"org:read\",\n\t\"project:read\",\n\t\"team:read\",\n\t\"event:read\"\n];\n\n//#endregion\nexport { DEFAULT_SCOPES, DEFAULT_SEARCH_ISSUES_PERIOD, MCP_SERVER_NAME, SEARCH_ISSUES_PERIOD_VALUES, SENTRY_ALLOWED_REGION_DOMAINS, SENTRY_FRAMEWORKS, SENTRY_GUIDES, SENTRY_PLATFORMS_BASE };\n//# sourceMappingURL=constants-CEZaLsGe.js.map","//#region src/errors.ts\n/**\n* Error thrown when user input validation fails.\n* These errors should be returned to the user directly without logging to Sentry.\n*/\nvar UserInputError = class extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"UserInputError\";\n\t}\n};\n/**\n* Error thrown when configuration is invalid or missing.\n* These errors should be returned to the user directly without logging to Sentry.\n* Typically used for environment configuration issues, connection settings, etc.\n*/\nvar ConfigurationError = class extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"ConfigurationError\";\n\t}\n};\n/**\n* Error thrown when an LLM provider (OpenAI, Anthropic, OpenRouter, etc.) rejects\n* or cannot complete a request due to availability issues: region restrictions,\n* budget/quota exhaustion, rate limits, or provider outages.\n* These errors should be returned as graceful tool failures and logged as\n* warnings — not filed as per-request Sentry issues.\n*/\nvar LLMProviderError = class extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"LLMProviderError\";\n\t}\n};\n/**\n* Unexpected failure inside an embedded agent run (for example the AI SDK\n* finishing without structured output).\n*\n* These are real bugs/operational defects and MUST create a Sentry issue once\n* at the agent boundary. Callers should still degrade gracefully (fallback or\n* formatted tool error) instead of hard-failing the parent MCP tool. The issue\n* is filed before this error is thrown; do not call logIssue again for it.\n*/\nvar AgentExecutionError = class extends Error {\n\teventId;\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"AgentExecutionError\";\n\t\tthis.eventId = options?.eventId;\n\t}\n};\n\n//#endregion\nexport { AgentExecutionError, ConfigurationError, LLMProviderError, UserInputError };\n//# sourceMappingURL=errors-CEDWDXew.js.map","import { z } from \"zod\";\n\n//#region src/utils/slug-validation.ts\n/**\n* Maximum reasonable length for a slug.\n*/\nconst MAX_SLUG_LENGTH = 100;\n/**\n* Maximum reasonable length for a numeric ID.\n*/\nconst MAX_ID_LENGTH = 20;\n/**\n* Helper to check if a string is a numeric ID.\n*/\nfunction isNumericId(value) {\n\treturn /^\\d+$/.test(value);\n}\n/**\n* Valid slug pattern: alphanumeric, hyphens, underscores, and dots.\n* Must start with alphanumeric character.\n*/\nconst VALID_SLUG_PATTERN = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;\n/**\n* Validates a slug to prevent path traversal and injection attacks.\n* Designed to be used with Zod's superRefine() method.\n*\n* @example\n* ```typescript\n* const OrganizationSlug = z.string()\n*   .trim()\n*   .superRefine(validateSlug)\n*   .describe(\"Organization slug\");\n*\n* const TeamSlug = z.string()\n*   .trim()\n*   .superRefine(validateSlug)\n*   .describe(\"Team slug\");\n* ```\n*/\nfunction validateSlug(val, ctx) {\n\tif (val.length === 0) {\n\t\tctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"Slug cannot be empty\"\n\t\t});\n\t\treturn;\n\t}\n\tif (val.length > MAX_SLUG_LENGTH) {\n\t\tctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: `Slug exceeds maximum length of ${MAX_SLUG_LENGTH} characters`\n\t\t});\n\t\treturn;\n\t}\n\tif (!VALID_SLUG_PATTERN.test(val)) ctx.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tmessage: \"Slug must contain only alphanumeric characters, hyphens, underscores, and dots, and must start with an alphanumeric character\"\n\t});\n}\n/**\n* Validates a Sentry resource identifier (event, attachment, replay, profile,\n* client key, dashboard) to prevent path traversal.\n*\n* Uses the same character set as slugs, which accommodates every identifier\n* format the API returns: numeric IDs, 32-character hex IDs, hyphenated UUIDs,\n* `PROJECT-1Z43` short IDs, and the literal `latest`. Rejecting `/`, `\\` and `%`\n* outright means a traversal or double-encoded payload never reaches the API\n* client, and requiring a leading alphanumeric blocks a bare `..`.\n*\n* The API client percent-encodes path segments regardless (see\n* `api-client/api-path.ts`); this layer exists so callers get an actionable\n* validation error instead of a confusing upstream 404.\n*\n* @example\n* ```typescript\n* const EventId = z.string()\n*   .trim()\n*   .superRefine(validateResourceId)\n*   .describe(\"The ID of the event\");\n* ```\n*/\nfunction validateResourceId(val, ctx) {\n\tif (val.length === 0) {\n\t\tctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"ID cannot be empty\"\n\t\t});\n\t\treturn;\n\t}\n\tif (val.length > MAX_SLUG_LENGTH) {\n\t\tctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: `ID exceeds maximum length of ${MAX_SLUG_LENGTH} characters`\n\t\t});\n\t\treturn;\n\t}\n\tif (!VALID_SLUG_PATTERN.test(val)) ctx.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tmessage: \"ID must contain only alphanumeric characters, hyphens, underscores, and dots, and must start with an alphanumeric character\"\n\t});\n}\n/**\n* Validates a parameter that can be either a slug or numeric ID.\n* Designed to be used with Zod's superRefine() method.\n*\n* @example\n* ```typescript\n* const ProjectSlugOrId = z.string()\n*   .trim()\n*   .superRefine(validateSlugOrId)\n*   .describe(\"Project slug or numeric ID\");\n*\n* const IssueSlugOrId = z.string()\n*   .trim()\n*   .superRefine(validateSlugOrId)\n*   .describe(\"Issue slug or numeric ID\");\n* ```\n*/\nfunction validateSlugOrId(val, ctx) {\n\tif (isNumericId(val)) {\n\t\tif (val.length > MAX_ID_LENGTH) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: `Numeric ID exceeds maximum length of ${MAX_ID_LENGTH} characters`\n\t\t});\n\t\treturn;\n\t}\n\tvalidateSlug(val, ctx);\n}\n\n//#endregion\nexport { isNumericId, validateResourceId, validateSlug, validateSlugOrId };\n//# sourceMappingURL=slug-validation-MJ3jU0Hd.js.map","import { SENTRY_GUIDES } from \"./constants-CEZaLsGe.js\";\nimport { validateResourceId, validateSlug } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { z } from \"zod\";\n\n//#region src/schema.ts\nconst ParamOrganizationSlug = z.string().trim().superRefine(validateSlug).describe(\"The organization's slug. You can find a existing list of organizations you have access to using the `find_organizations()` tool.\");\nconst ParamTeamSlug = z.string().trim().superRefine(validateSlug).describe(\"The team's slug. You can find a list of existing teams in an organization with the Sentry tool `find_teams`.\");\nconst ParamProjectSlug = z.string().trim().superRefine(validateSlug).describe(\"The project's slug. You can find a list of existing projects in an organization using the `find_projects()` tool.\");\nconst ParamProjectSlugOrAll = z.string().trim().superRefine(validateSlug).describe(\"The project's slug, or exact lowercase `all` when a tool supports all-projects scope. Other casing is treated as a project slug.\");\nconst ParamSearchQuery = z.string().trim().describe(\"Search query to filter results by name or slug. Use this to narrow down results when there are many items.\");\nconst ParamIssueShortId = z.string().toUpperCase().trim().describe(\"The Issue ID. e.g. `PROJECT-1Z43`\");\nconst ParamIssueUrl = z.string().url().trim().describe(\"The URL of the issue. e.g. https://my-organization.sentry.io/issues/PROJECT-1Z43\");\nconst ParamReplayId = z.string().trim().superRefine(validateResourceId).describe(\"The replay ID. e.g. `7e07485f-12f9-416b-8b14-26260799b51f`\");\nconst ParamReplayUrl = z.string().url().trim().describe(\"The URL of the replay. e.g. https://my-organization.sentry.io/explore/replays/7e07485f-12f9-416b-8b14-26260799b51f/\");\nconst ParamTraceId = z.string().trim().regex(/^[0-9a-fA-F]{32}$/, \"Trace ID must be a 32-character hexadecimal string\").describe(\"The trace ID. e.g. `a4d1aae7216b47ff8117cf4e09ce9d0a`\");\nconst ParamSpanId = z.string().trim().min(1).describe(\"The span ID within a trace. Use this with a trace resource to focus on a specific span.\");\nconst ParamPlatform = z.string().toLowerCase().trim().describe(\"The platform for the project. e.g., python, javascript, react, etc.\");\nconst ParamTransaction = z.string().trim().describe(\"The transaction name. Also known as the endpoint, or route name.\");\nconst ParamQuery = z.string().trim().describe(`The search query to apply. Use the \\`help(subject=\"query_syntax\")\\` tool to get more information about the query syntax rather than guessing.`);\n/**\n* Relative time window parameter for Sentry API queries.\n*\n* Maps to the `statsPeriod` URL parameter in Sentry's API, which controls the\n* search time window (i.e., which records are returned). This is distinct from\n* `groupStatsPeriod`, which only affects sparkline data in the serializer.\n*\n* Tools apply their own `.default()`, `.optional()`, or `.nullable()` on top.\n*/\nconst ParamPeriod = z.string().trim().regex(/^\\d+[hdw]$/, \"Period must be a relative time window like `24h`, `7d`, `14d`, `30d`, or `90d`.\").describe(\"Relative time window, such as `24h`, `7d`, `14d`, `30d`, or `90d`. Controls which records fall within the search window.\");\n/**\n* Region URL parameter for Sentry API requests.\n*\n* Handles region-specific URLs for Sentry's Cloud Service while gracefully\n* supporting self-hosted Sentry installations that may return empty regionUrl values.\n* This schema accepts both valid URLs and empty strings to ensure compatibility\n* across different Sentry deployment types.\n*/\nconst ParamRegionUrl = z.string().trim().refine((value) => !value || z.string().url().safeParse(value).success, { message: \"Must be a valid URL or empty string (for self-hosted Sentry)\" }).describe(\"The region URL for the organization you're querying, if known. For Sentry's Cloud Service (sentry.io), this is typically the region-specific URL like 'https://us.sentry.io'. For self-hosted Sentry installations, this parameter is usually not needed and should be omitted. You can find the correct regionUrl from the organization details using the `find_organizations()` tool.\");\nconst ParamIssueStatus = z.enum([\n\t\"resolved\",\n\t\"resolvedInNextRelease\",\n\t\"unresolved\",\n\t\"ignored\"\n]).describe(\"The new status for the issue. Valid values are 'resolved', 'resolvedInNextRelease', 'unresolved', and 'ignored'.\");\nconst ParamIssueIgnoreMode = z.enum([\n\t\"untilEscalating\",\n\t\"forever\",\n\t\"forDuration\",\n\t\"untilOccurrenceCount\",\n\t\"untilUserCount\"\n]).describe(\"How ignored issues should behave. Use 'untilEscalating' to match the Sentry UI default, 'forever' for a permanent ignore, 'forDuration' with ignoreDurationMinutes, 'untilOccurrenceCount' with ignoreCount and optional ignoreWindowMinutes, or 'untilUserCount' with ignoreUserCount and optional ignoreUserWindowMinutes.\");\nconst ParamAssignedTo = z.string().trim().describe(\"The assignee in format 'user:ID' or 'team:ID_OR_SLUG' where ID is numeric. Example: 'user:123456', 'team:789', or 'team:my-team-slug'. Use `execute_sentry_tool(name='whoami', arguments={})` to find your user ID.\");\nconst ParamIgnoreDurationMinutes = z.number().int().positive().describe(\"How many minutes to ignore the issue when ignoreMode is 'forDuration'.\");\nconst ParamIgnoreCount = z.number().int().positive().describe(\"How many times the issue must occur before it stops being ignored when ignoreMode is 'untilOccurrenceCount'.\");\nconst ParamIgnoreWindowMinutes = z.number().int().positive().max(7 * 24 * 60).describe(\"Optional time window in minutes for ignoreCount. If omitted, Sentry counts all future occurrences.\");\nconst ParamIgnoreUserCount = z.number().int().positive().describe(\"How many users must be affected before the issue stops being ignored when ignoreMode is 'untilUserCount'.\");\nconst ParamIgnoreUserWindowMinutes = z.number().int().positive().max(7 * 24 * 60).describe(\"Optional time window in minutes for ignoreUserCount. If omitted, Sentry counts all future affected users.\");\nconst ParamReason = z.string().trim().min(1).describe(\"Optional reason for taking this action. When provided, it will be posted as a comment on the issue's activity feed.\");\nconst ParamSentryGuide = z.enum(SENTRY_GUIDES).describe(\"Optional guide filter to limit search results to specific documentation sections. Use either a platform (e.g., 'javascript', 'python') or platform/guide combination (e.g., 'javascript/nextjs', 'python/django').\");\nconst ParamEventId = z.string().trim().regex(/^[0-9a-fA-F]{32}$/, \"Event ID must be a 32-character hexadecimal string\").describe(\"The ID of the event. e.g. `c49541c747cb4d8aa3efb70ca5aba243`\");\n/**\n* Issue-scoped event selector used by tools that can target either a concrete\n* event or the issue's latest event.\n*/\nconst ParamEventIdOrLatest = z.union([z.literal(\"latest\"), ParamEventId]).default(\"latest\").describe(\"The event ID for the issue, or `latest`. Defaults to `latest`.\");\nconst ParamAttachmentId = z.string().trim().superRefine(validateResourceId).describe(\"The ID of the attachment to download.\");\n\n//#endregion\nexport { ParamAssignedTo, ParamAttachmentId, ParamEventId, ParamEventIdOrLatest, ParamIgnoreCount, ParamIgnoreDurationMinutes, ParamIgnoreUserCount, ParamIgnoreUserWindowMinutes, ParamIgnoreWindowMinutes, ParamIssueIgnoreMode, ParamIssueShortId, ParamIssueStatus, ParamIssueUrl, ParamOrganizationSlug, ParamPeriod, ParamPlatform, ParamProjectSlug, ParamProjectSlugOrAll, ParamQuery, ParamReason, ParamRegionUrl, ParamReplayId, ParamReplayUrl, ParamSearchQuery, ParamSentryGuide, ParamSpanId, ParamTeamSlug, ParamTraceId, ParamTransaction };\n//# sourceMappingURL=schema-DKEjeVqP.js.map","//#region src/filter.ts\n/**\n* Converts a {@link FilterLike} value to an actual {@link Filter}.\n*\n* @param filter The filter-like value to convert.\n* @returns The actual filter.\n*/\nfunction toFilter(filter) {\n\tif (typeof filter === \"function\") return filter;\n\treturn getLevelFilter(filter);\n}\n/**\n* Returns a filter that accepts log records with the specified level.\n*\n* @param level The level to filter by.  If `null`, the filter will reject all\n*              records.\n* @returns The filter.\n*/\nfunction getLevelFilter(level) {\n\tif (level == null) return () => false;\n\tif (level === \"fatal\") return (record) => record.level === \"fatal\";\n\telse if (level === \"error\") return (record) => record.level === \"fatal\" || record.level === \"error\";\n\telse if (level === \"warning\") return (record) => record.level === \"fatal\" || record.level === \"error\" || record.level === \"warning\";\n\telse if (level === \"info\") return (record) => record.level === \"fatal\" || record.level === \"error\" || record.level === \"warning\" || record.level === \"info\";\n\telse if (level === \"debug\") return (record) => record.level === \"fatal\" || record.level === \"error\" || record.level === \"warning\" || record.level === \"info\" || record.level === \"debug\";\n\telse if (level === \"trace\") return () => true;\n\tthrow new TypeError(`Invalid log level: ${level}.`);\n}\n\n//#endregion\nexport { getLevelFilter, toFilter };\n//# sourceMappingURL=filter.js.map","//#region src/level.ts\nconst logLevels = [\n\t\"trace\",\n\t\"debug\",\n\t\"info\",\n\t\"warning\",\n\t\"error\",\n\t\"fatal\"\n];\n/**\n* Lists all available log levels with the order of their severity.\n* The `\"trace\"` level goes first, and the `\"fatal\"` level goes last.\n* @returns A new copy of the array of log levels.\n* @since 1.0.0\n*/\nfunction getLogLevels() {\n\treturn [...logLevels];\n}\n/**\n* Parses a log level from a string.\n*\n* @param level The log level as a string.  This is case-insensitive.\n* @returns The log level.\n* @throws {TypeError} If the log level is invalid.\n*/\nfunction parseLogLevel(level) {\n\tlevel = level.toLowerCase();\n\tswitch (level) {\n\t\tcase \"trace\":\n\t\tcase \"debug\":\n\t\tcase \"info\":\n\t\tcase \"warning\":\n\t\tcase \"error\":\n\t\tcase \"fatal\": return level;\n\t\tdefault: throw new TypeError(`Invalid log level: ${level}.`);\n\t}\n}\n/**\n* Checks if a string is a valid log level.  This function can be used as\n* as a type guard to narrow the type of a string to a {@link LogLevel}.\n*\n* @param level The log level as a string.  This is case-sensitive.\n* @returns `true` if the string is a valid log level.\n*/\nfunction isLogLevel(level) {\n\tswitch (level) {\n\t\tcase \"trace\":\n\t\tcase \"debug\":\n\t\tcase \"info\":\n\t\tcase \"warning\":\n\t\tcase \"error\":\n\t\tcase \"fatal\": return true;\n\t\tdefault: return false;\n\t}\n}\n/**\n* Compares two log levels.\n* @param a The first log level.\n* @param b The second log level.\n* @returns A negative number if `a` is less than `b`, a positive number if `a`\n*          is greater than `b`, or zero if they are equal.\n* @since 0.8.0\n*/\nfunction compareLogLevel(a, b) {\n\tconst aIndex = logLevels.indexOf(a);\n\tif (aIndex < 0) throw new TypeError(`Invalid log level: ${JSON.stringify(a)}.`);\n\tconst bIndex = logLevels.indexOf(b);\n\tif (bIndex < 0) throw new TypeError(`Invalid log level: ${JSON.stringify(b)}.`);\n\treturn aIndex - bIndex;\n}\n\n//#endregion\nexport { compareLogLevel, getLogLevels, isLogLevel, parseLogLevel };\n//# sourceMappingURL=level.js.map","import { compareLogLevel } from \"./level.js\";\n\n//#region src/logger.ts\n/**\n* Get a logger with the given category.\n*\n* ```typescript\n* const logger = getLogger([\"my-app\"]);\n* ```\n*\n* @param category The category of the logger.  It can be a string or an array\n*                 of strings.  If it is a string, it is equivalent to an array\n*                 with a single element.\n* @returns The logger.\n*/\nfunction getLogger(category = []) {\n\treturn LoggerImpl.getLogger(category);\n}\n/**\n* The symbol for the global root logger.\n*/\nconst globalRootLoggerSymbol = Symbol.for(\"logtape.rootLogger\");\n/**\n* A logger implementation.  Do not use this directly; use {@link getLogger}\n* instead.  This class is exported for testing purposes.\n*/\nvar LoggerImpl = class LoggerImpl {\n\tparent;\n\tchildren;\n\tcategory;\n\tsinks;\n\tparentSinks = \"inherit\";\n\tfilters;\n\tlowestLevel = \"trace\";\n\tcontextLocalStorage;\n\tstatic getLogger(category = []) {\n\t\tlet rootLogger = globalRootLoggerSymbol in globalThis ? globalThis[globalRootLoggerSymbol] ?? null : null;\n\t\tif (rootLogger == null) {\n\t\t\trootLogger = new LoggerImpl(null, []);\n\t\t\tglobalThis[globalRootLoggerSymbol] = rootLogger;\n\t\t}\n\t\tif (typeof category === \"string\") return rootLogger.getChild(category);\n\t\tif (category.length === 0) return rootLogger;\n\t\treturn rootLogger.getChild(category);\n\t}\n\tconstructor(parent, category) {\n\t\tthis.parent = parent;\n\t\tthis.children = {};\n\t\tthis.category = category;\n\t\tthis.sinks = [];\n\t\tthis.filters = [];\n\t}\n\tgetChild(subcategory) {\n\t\tconst name = typeof subcategory === \"string\" ? subcategory : subcategory[0];\n\t\tconst childRef = this.children[name];\n\t\tlet child = childRef instanceof LoggerImpl ? childRef : childRef?.deref();\n\t\tif (child == null) {\n\t\t\tchild = new LoggerImpl(this, [...this.category, name]);\n\t\t\tthis.children[name] = \"WeakRef\" in globalThis ? new WeakRef(child) : child;\n\t\t}\n\t\tif (typeof subcategory === \"string\" || subcategory.length === 1) return child;\n\t\treturn child.getChild(subcategory.slice(1));\n\t}\n\t/**\n\t* Reset the logger.  This removes all sinks and filters from the logger.\n\t*/\n\treset() {\n\t\twhile (this.sinks.length > 0) this.sinks.shift();\n\t\tthis.parentSinks = \"inherit\";\n\t\twhile (this.filters.length > 0) this.filters.shift();\n\t\tthis.lowestLevel = \"trace\";\n\t}\n\t/**\n\t* Reset the logger and all its descendants.  This removes all sinks and\n\t* filters from the logger and all its descendants.\n\t*/\n\tresetDescendants() {\n\t\tfor (const child of Object.values(this.children)) {\n\t\t\tconst logger = child instanceof LoggerImpl ? child : child.deref();\n\t\t\tif (logger != null) logger.resetDescendants();\n\t\t}\n\t\tthis.reset();\n\t}\n\twith(properties) {\n\t\treturn new LoggerCtx(this, { ...properties });\n\t}\n\tfilter(record) {\n\t\tfor (const filter of this.filters) if (!filter(record)) return false;\n\t\tif (this.filters.length < 1) return this.parent?.filter(record) ?? true;\n\t\treturn true;\n\t}\n\t*getSinks(level) {\n\t\tif (this.lowestLevel === null || compareLogLevel(level, this.lowestLevel) < 0) return;\n\t\tif (this.parent != null && this.parentSinks === \"inherit\") for (const sink of this.parent.getSinks(level)) yield sink;\n\t\tfor (const sink of this.sinks) yield sink;\n\t}\n\temit(record, bypassSinks) {\n\t\tconst fullRecord = \"category\" in record ? record : {\n\t\t\t...record,\n\t\t\tcategory: this.category\n\t\t};\n\t\tif (this.lowestLevel === null || compareLogLevel(fullRecord.level, this.lowestLevel) < 0 || !this.filter(fullRecord)) return;\n\t\tfor (const sink of this.getSinks(fullRecord.level)) {\n\t\t\tif (bypassSinks?.has(sink)) continue;\n\t\t\ttry {\n\t\t\t\tsink(fullRecord);\n\t\t\t} catch (error) {\n\t\t\t\tconst bypassSinks2 = new Set(bypassSinks);\n\t\t\t\tbypassSinks2.add(sink);\n\t\t\t\tmetaLogger.log(\"fatal\", \"Failed to emit a log record to sink {sink}: {error}\", {\n\t\t\t\t\tsink,\n\t\t\t\t\terror,\n\t\t\t\t\trecord: fullRecord\n\t\t\t\t}, bypassSinks2);\n\t\t\t}\n\t\t}\n\t}\n\tlog(level, rawMessage, properties, bypassSinks) {\n\t\tconst implicitContext = LoggerImpl.getLogger().contextLocalStorage?.getStore() ?? {};\n\t\tlet cachedProps = void 0;\n\t\tconst record = typeof properties === \"function\" ? {\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\ttimestamp: Date.now(),\n\t\t\tget message() {\n\t\t\t\treturn parseMessageTemplate(rawMessage, this.properties);\n\t\t\t},\n\t\t\trawMessage,\n\t\t\tget properties() {\n\t\t\t\tif (cachedProps == null) cachedProps = {\n\t\t\t\t\t...implicitContext,\n\t\t\t\t\t...properties()\n\t\t\t\t};\n\t\t\t\treturn cachedProps;\n\t\t\t}\n\t\t} : {\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\ttimestamp: Date.now(),\n\t\t\tmessage: parseMessageTemplate(rawMessage, {\n\t\t\t\t...implicitContext,\n\t\t\t\t...properties\n\t\t\t}),\n\t\t\trawMessage,\n\t\t\tproperties: {\n\t\t\t\t...implicitContext,\n\t\t\t\t...properties\n\t\t\t}\n\t\t};\n\t\tthis.emit(record, bypassSinks);\n\t}\n\tlogLazily(level, callback, properties = {}) {\n\t\tconst implicitContext = LoggerImpl.getLogger().contextLocalStorage?.getStore() ?? {};\n\t\tlet rawMessage = void 0;\n\t\tlet msg = void 0;\n\t\tfunction realizeMessage() {\n\t\t\tif (msg == null || rawMessage == null) {\n\t\t\t\tmsg = callback((tpl, ...values) => {\n\t\t\t\t\trawMessage = tpl;\n\t\t\t\t\treturn renderMessage(tpl, values);\n\t\t\t\t});\n\t\t\t\tif (rawMessage == null) throw new TypeError(\"No log record was made.\");\n\t\t\t}\n\t\t\treturn [msg, rawMessage];\n\t\t}\n\t\tthis.emit({\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\tget message() {\n\t\t\t\treturn realizeMessage()[0];\n\t\t\t},\n\t\t\tget rawMessage() {\n\t\t\t\treturn realizeMessage()[1];\n\t\t\t},\n\t\t\ttimestamp: Date.now(),\n\t\t\tproperties: {\n\t\t\t\t...implicitContext,\n\t\t\t\t...properties\n\t\t\t}\n\t\t});\n\t}\n\tlogTemplate(level, messageTemplate, values, properties = {}) {\n\t\tconst implicitContext = LoggerImpl.getLogger().contextLocalStorage?.getStore() ?? {};\n\t\tthis.emit({\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\tmessage: renderMessage(messageTemplate, values),\n\t\t\trawMessage: messageTemplate,\n\t\t\ttimestamp: Date.now(),\n\t\t\tproperties: {\n\t\t\t\t...implicitContext,\n\t\t\t\t...properties\n\t\t\t}\n\t\t});\n\t}\n\ttrace(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"trace\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"trace\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"trace\", \"{*}\", message);\n\t\telse this.logTemplate(\"trace\", message, values);\n\t}\n\tdebug(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"debug\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"debug\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"debug\", \"{*}\", message);\n\t\telse this.logTemplate(\"debug\", message, values);\n\t}\n\tinfo(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"info\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"info\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"info\", \"{*}\", message);\n\t\telse this.logTemplate(\"info\", message, values);\n\t}\n\twarn(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"warning\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"warning\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"warning\", \"{*}\", message);\n\t\telse this.logTemplate(\"warning\", message, values);\n\t}\n\twarning(message, ...values) {\n\t\tthis.warn(message, ...values);\n\t}\n\terror(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"error\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"error\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"error\", \"{*}\", message);\n\t\telse this.logTemplate(\"error\", message, values);\n\t}\n\tfatal(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"fatal\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"fatal\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"fatal\", \"{*}\", message);\n\t\telse this.logTemplate(\"fatal\", message, values);\n\t}\n};\n/**\n* A logger implementation with contextual properties.  Do not use this\n* directly; use {@link Logger.with} instead.  This class is exported\n* for testing purposes.\n*/\nvar LoggerCtx = class LoggerCtx {\n\tlogger;\n\tproperties;\n\tconstructor(logger, properties) {\n\t\tthis.logger = logger;\n\t\tthis.properties = properties;\n\t}\n\tget category() {\n\t\treturn this.logger.category;\n\t}\n\tget parent() {\n\t\treturn this.logger.parent;\n\t}\n\tgetChild(subcategory) {\n\t\treturn this.logger.getChild(subcategory).with(this.properties);\n\t}\n\twith(properties) {\n\t\treturn new LoggerCtx(this.logger, {\n\t\t\t...this.properties,\n\t\t\t...properties\n\t\t});\n\t}\n\tlog(level, message, properties, bypassSinks) {\n\t\tthis.logger.log(level, message, typeof properties === \"function\" ? () => ({\n\t\t\t...this.properties,\n\t\t\t...properties()\n\t\t}) : {\n\t\t\t...this.properties,\n\t\t\t...properties\n\t\t}, bypassSinks);\n\t}\n\tlogLazily(level, callback) {\n\t\tthis.logger.logLazily(level, callback, this.properties);\n\t}\n\tlogTemplate(level, messageTemplate, values) {\n\t\tthis.logger.logTemplate(level, messageTemplate, values, this.properties);\n\t}\n\temit(record) {\n\t\tconst recordWithContext = {\n\t\t\t...record,\n\t\t\tproperties: {\n\t\t\t\t...this.properties,\n\t\t\t\t...record.properties\n\t\t\t}\n\t\t};\n\t\tthis.logger.emit(recordWithContext);\n\t}\n\ttrace(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"trace\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"trace\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"trace\", \"{*}\", message);\n\t\telse this.logTemplate(\"trace\", message, values);\n\t}\n\tdebug(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"debug\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"debug\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"debug\", \"{*}\", message);\n\t\telse this.logTemplate(\"debug\", message, values);\n\t}\n\tinfo(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"info\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"info\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"info\", \"{*}\", message);\n\t\telse this.logTemplate(\"info\", message, values);\n\t}\n\twarn(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"warning\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"warning\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"warning\", \"{*}\", message);\n\t\telse this.logTemplate(\"warning\", message, values);\n\t}\n\twarning(message, ...values) {\n\t\tthis.warn(message, ...values);\n\t}\n\terror(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"error\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"error\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"error\", \"{*}\", message);\n\t\telse this.logTemplate(\"error\", message, values);\n\t}\n\tfatal(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"fatal\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"fatal\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"fatal\", \"{*}\", message);\n\t\telse this.logTemplate(\"fatal\", message, values);\n\t}\n};\n/**\n* The meta logger.  It is a logger with the category `[\"logtape\", \"meta\"]`.\n*/\nconst metaLogger = LoggerImpl.getLogger([\"logtape\", \"meta\"]);\n/**\n* Parse a message template into a message template array and a values array.\n* @param template The message template.\n* @param properties The values to replace placeholders with.\n* @returns The message template array and the values array.\n*/\nfunction parseMessageTemplate(template, properties) {\n\tconst length = template.length;\n\tif (length === 0) return [\"\"];\n\tif (!template.includes(\"{\")) return [template];\n\tconst message = [];\n\tlet startIndex = 0;\n\tfor (let i = 0; i < length; i++) {\n\t\tconst char = template[i];\n\t\tif (char === \"{\") {\n\t\t\tconst nextChar = i + 1 < length ? template[i + 1] : \"\";\n\t\t\tif (nextChar === \"{\") {\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst closeIndex = template.indexOf(\"}\", i + 1);\n\t\t\tif (closeIndex === -1) continue;\n\t\t\tconst beforeText = template.slice(startIndex, i);\n\t\t\tmessage.push(beforeText.replace(/{{/g, \"{\").replace(/}}/g, \"}\"));\n\t\t\tconst key = template.slice(i + 1, closeIndex);\n\t\t\tlet prop;\n\t\t\tconst trimmedKey = key.trim();\n\t\t\tif (trimmedKey === \"*\") prop = key in properties ? properties[key] : \"*\" in properties ? properties[\"*\"] : properties;\n\t\t\telse if (key !== trimmedKey) prop = key in properties ? properties[key] : properties[trimmedKey];\n\t\t\telse prop = properties[key];\n\t\t\tmessage.push(prop);\n\t\t\ti = closeIndex;\n\t\t\tstartIndex = i + 1;\n\t\t} else if (char === \"}\" && i + 1 < length && template[i + 1] === \"}\") i++;\n\t}\n\tconst remainingText = template.slice(startIndex);\n\tmessage.push(remainingText.replace(/{{/g, \"{\").replace(/}}/g, \"}\"));\n\treturn message;\n}\n/**\n* Render a message template with values.\n* @param template The message template.\n* @param values The message template values.\n* @returns The message template values interleaved between the substitution\n*          values.\n*/\nfunction renderMessage(template, values) {\n\tconst args = [];\n\tfor (let i = 0; i < template.length; i++) {\n\t\targs.push(template[i]);\n\t\tif (i < values.length) args.push(values[i]);\n\t}\n\treturn args;\n}\n\n//#endregion\nexport { LoggerImpl, getLogger };\n//# sourceMappingURL=logger.js.map","import util from \"node:util\";\n\n//#region src/util.node.ts\nfunction inspect(obj, options) {\n\treturn util.inspect(obj, options);\n}\n\n//#endregion\nexport { inspect };\n//# sourceMappingURL=util.node.js.map","import * as util from \"#util\";\n\n//#region src/formatter.ts\n/**\n* The severity level abbreviations.\n*/\nconst levelAbbreviations = {\n\t\"trace\": \"TRC\",\n\t\"debug\": \"DBG\",\n\t\"info\": \"INF\",\n\t\"warning\": \"WRN\",\n\t\"error\": \"ERR\",\n\t\"fatal\": \"FTL\"\n};\n/**\n* A platform-specific inspect function.  In Deno, this is {@link Deno.inspect},\n* and in Node.js/Bun it is `util.inspect()`.  If neither is available, it\n* falls back to {@link JSON.stringify}.\n*\n* @param value The value to inspect.\n* @param options The options for inspecting the value.\n*                If `colors` is `true`, the output will be ANSI-colored.\n* @returns The string representation of the value.\n*/\nconst inspect = typeof document !== \"undefined\" || typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\" ? (v) => JSON.stringify(v) : \"Deno\" in globalThis && \"inspect\" in globalThis.Deno && typeof globalThis.Deno.inspect === \"function\" ? (v, opts) => globalThis.Deno.inspect(v, {\n\tstrAbbreviateSize: Infinity,\n\titerableLimit: Infinity,\n\t...opts\n}) : util != null && \"inspect\" in util && typeof util.inspect === \"function\" ? (v, opts) => util.inspect(v, {\n\tmaxArrayLength: Infinity,\n\tmaxStringLength: Infinity,\n\t...opts\n}) : (v) => JSON.stringify(v);\nfunction padZero(num) {\n\treturn num < 10 ? `0${num}` : `${num}`;\n}\nfunction padThree(num) {\n\treturn num < 10 ? `00${num}` : num < 100 ? `0${num}` : `${num}`;\n}\nconst timestampFormatters = {\n\t\"date-time-timezone\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst year = d.getUTCFullYear();\n\t\tconst month = padZero(d.getUTCMonth() + 1);\n\t\tconst day = padZero(d.getUTCDate());\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${year}-${month}-${day} ${hour}:${minute}:${second}.${ms} +00:00`;\n\t},\n\t\"date-time-tz\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst year = d.getUTCFullYear();\n\t\tconst month = padZero(d.getUTCMonth() + 1);\n\t\tconst day = padZero(d.getUTCDate());\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${year}-${month}-${day} ${hour}:${minute}:${second}.${ms} +00`;\n\t},\n\t\"date-time\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst year = d.getUTCFullYear();\n\t\tconst month = padZero(d.getUTCMonth() + 1);\n\t\tconst day = padZero(d.getUTCDate());\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${year}-${month}-${day} ${hour}:${minute}:${second}.${ms}`;\n\t},\n\t\"time-timezone\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${hour}:${minute}:${second}.${ms} +00:00`;\n\t},\n\t\"time-tz\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${hour}:${minute}:${second}.${ms} +00`;\n\t},\n\t\"time\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${hour}:${minute}:${second}.${ms}`;\n\t},\n\t\"date\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst year = d.getUTCFullYear();\n\t\tconst month = padZero(d.getUTCMonth() + 1);\n\t\tconst day = padZero(d.getUTCDate());\n\t\treturn `${year}-${month}-${day}`;\n\t},\n\t\"rfc3339\": (ts) => new Date(ts).toISOString(),\n\t\"none\": () => null\n};\nconst levelRenderersCache = {\n\tABBR: levelAbbreviations,\n\tabbr: {\n\t\ttrace: \"trc\",\n\t\tdebug: \"dbg\",\n\t\tinfo: \"inf\",\n\t\twarning: \"wrn\",\n\t\terror: \"err\",\n\t\tfatal: \"ftl\"\n\t},\n\tFULL: {\n\t\ttrace: \"TRACE\",\n\t\tdebug: \"DEBUG\",\n\t\tinfo: \"INFO\",\n\t\twarning: \"WARNING\",\n\t\terror: \"ERROR\",\n\t\tfatal: \"FATAL\"\n\t},\n\tfull: {\n\t\ttrace: \"trace\",\n\t\tdebug: \"debug\",\n\t\tinfo: \"info\",\n\t\twarning: \"warning\",\n\t\terror: \"error\",\n\t\tfatal: \"fatal\"\n\t},\n\tL: {\n\t\ttrace: \"T\",\n\t\tdebug: \"D\",\n\t\tinfo: \"I\",\n\t\twarning: \"W\",\n\t\terror: \"E\",\n\t\tfatal: \"F\"\n\t},\n\tl: {\n\t\ttrace: \"t\",\n\t\tdebug: \"d\",\n\t\tinfo: \"i\",\n\t\twarning: \"w\",\n\t\terror: \"e\",\n\t\tfatal: \"f\"\n\t}\n};\n/**\n* Get a text formatter with the specified options.  Although it's flexible\n* enough to create a custom formatter, if you want more control, you can\n* create a custom formatter that satisfies the {@link TextFormatter} type\n* instead.\n*\n* For more information on the options, see {@link TextFormatterOptions}.\n*\n* By default, the formatter formats log records as follows:\n*\n* ```\n* 2023-11-14 22:13:20.000 +00:00 [INF] category·subcategory: Hello, world!\n* ```\n* @param options The options for the text formatter.\n* @returns The text formatter.\n* @since 0.6.0\n*/\nfunction getTextFormatter(options = {}) {\n\tconst timestampRenderer = (() => {\n\t\tconst tsOption = options.timestamp;\n\t\tif (tsOption == null) return timestampFormatters[\"date-time-timezone\"];\n\t\telse if (tsOption === \"disabled\") return timestampFormatters[\"none\"];\n\t\telse if (typeof tsOption === \"string\" && tsOption in timestampFormatters) return timestampFormatters[tsOption];\n\t\telse return tsOption;\n\t})();\n\tconst categorySeparator = options.category ?? \"·\";\n\tconst valueRenderer = options.value ?? inspect;\n\tconst levelRenderer = (() => {\n\t\tconst levelOption = options.level;\n\t\tif (levelOption == null || levelOption === \"ABBR\") return (level) => levelRenderersCache.ABBR[level];\n\t\telse if (levelOption === \"abbr\") return (level) => levelRenderersCache.abbr[level];\n\t\telse if (levelOption === \"FULL\") return (level) => levelRenderersCache.FULL[level];\n\t\telse if (levelOption === \"full\") return (level) => levelRenderersCache.full[level];\n\t\telse if (levelOption === \"L\") return (level) => levelRenderersCache.L[level];\n\t\telse if (levelOption === \"l\") return (level) => levelRenderersCache.l[level];\n\t\telse return levelOption;\n\t})();\n\tconst formatter = options.format ?? (({ timestamp, level, category, message }) => `${timestamp ? `${timestamp} ` : \"\"}[${level}] ${category}: ${message}`);\n\treturn (record) => {\n\t\tconst msgParts = record.message;\n\t\tconst msgLen = msgParts.length;\n\t\tlet message;\n\t\tif (msgLen === 1) message = msgParts[0];\n\t\telse if (msgLen <= 6) {\n\t\t\tmessage = \"\";\n\t\t\tfor (let i = 0; i < msgLen; i++) message += i % 2 === 0 ? msgParts[i] : valueRenderer(msgParts[i]);\n\t\t} else {\n\t\t\tconst parts = new Array(msgLen);\n\t\t\tfor (let i = 0; i < msgLen; i++) parts[i] = i % 2 === 0 ? msgParts[i] : valueRenderer(msgParts[i]);\n\t\t\tmessage = parts.join(\"\");\n\t\t}\n\t\tconst timestamp = timestampRenderer(record.timestamp);\n\t\tconst level = levelRenderer(record.level);\n\t\tconst category = typeof categorySeparator === \"function\" ? categorySeparator(record.category) : record.category.join(categorySeparator);\n\t\tconst values = {\n\t\t\ttimestamp,\n\t\t\tlevel,\n\t\t\tcategory,\n\t\t\tmessage,\n\t\t\trecord\n\t\t};\n\t\treturn `${formatter(values)}\\n`;\n\t};\n}\n/**\n* The default text formatter.  This formatter formats log records as follows:\n*\n* ```\n* 2023-11-14 22:13:20.000 +00:00 [INF] category·subcategory: Hello, world!\n* ```\n*\n* @param record The log record to format.\n* @returns The formatted log record.\n*/\nconst defaultTextFormatter = getTextFormatter();\nconst RESET = \"\\x1B[0m\";\nconst ansiColors = {\n\tblack: \"\\x1B[30m\",\n\tred: \"\\x1B[31m\",\n\tgreen: \"\\x1B[32m\",\n\tyellow: \"\\x1B[33m\",\n\tblue: \"\\x1B[34m\",\n\tmagenta: \"\\x1B[35m\",\n\tcyan: \"\\x1B[36m\",\n\twhite: \"\\x1B[37m\"\n};\nconst ansiStyles = {\n\tbold: \"\\x1B[1m\",\n\tdim: \"\\x1B[2m\",\n\titalic: \"\\x1B[3m\",\n\tunderline: \"\\x1B[4m\",\n\tstrikethrough: \"\\x1B[9m\"\n};\nconst defaultLevelColors = {\n\ttrace: null,\n\tdebug: \"blue\",\n\tinfo: \"green\",\n\twarning: \"yellow\",\n\terror: \"red\",\n\tfatal: \"magenta\"\n};\n/**\n* Get an ANSI color formatter with the specified options.\n*\n* ![A preview of an ANSI color formatter.](https://i.imgur.com/I8LlBUf.png)\n* @param option The options for the ANSI color formatter.\n* @returns The ANSI color formatter.\n* @since 0.6.0\n*/\nfunction getAnsiColorFormatter(options = {}) {\n\tconst format = options.format;\n\tconst timestampStyle = typeof options.timestampStyle === \"undefined\" ? \"dim\" : options.timestampStyle;\n\tconst timestampColor = options.timestampColor ?? null;\n\tconst timestampPrefix = `${timestampStyle == null ? \"\" : ansiStyles[timestampStyle]}${timestampColor == null ? \"\" : ansiColors[timestampColor]}`;\n\tconst timestampSuffix = timestampStyle == null && timestampColor == null ? \"\" : RESET;\n\tconst levelStyle = typeof options.levelStyle === \"undefined\" ? \"bold\" : options.levelStyle;\n\tconst levelColors = options.levelColors ?? defaultLevelColors;\n\tconst categoryStyle = typeof options.categoryStyle === \"undefined\" ? \"dim\" : options.categoryStyle;\n\tconst categoryColor = options.categoryColor ?? null;\n\tconst categoryPrefix = `${categoryStyle == null ? \"\" : ansiStyles[categoryStyle]}${categoryColor == null ? \"\" : ansiColors[categoryColor]}`;\n\tconst categorySuffix = categoryStyle == null && categoryColor == null ? \"\" : RESET;\n\treturn getTextFormatter({\n\t\ttimestamp: \"date-time-tz\",\n\t\tvalue(value) {\n\t\t\treturn inspect(value, { colors: true });\n\t\t},\n\t\t...options,\n\t\tformat({ timestamp, level, category, message, record }) {\n\t\t\tconst levelColor = levelColors[record.level];\n\t\t\ttimestamp = `${timestampPrefix}${timestamp}${timestampSuffix}`;\n\t\t\tlevel = `${levelStyle == null ? \"\" : ansiStyles[levelStyle]}${levelColor == null ? \"\" : ansiColors[levelColor]}${level}${levelStyle == null && levelColor == null ? \"\" : RESET}`;\n\t\t\treturn format == null ? `${timestamp} ${level} ${categoryPrefix}${category}:${categorySuffix} ${message}` : format({\n\t\t\t\ttimestamp,\n\t\t\t\tlevel,\n\t\t\t\tcategory: `${categoryPrefix}${category}${categorySuffix}`,\n\t\t\t\tmessage,\n\t\t\t\trecord\n\t\t\t});\n\t\t}\n\t});\n}\n/**\n* A text formatter that uses ANSI colors to format log records.\n*\n* ![A preview of ansiColorFormatter.](https://i.imgur.com/I8LlBUf.png)\n*\n* @param record The log record to format.\n* @returns The formatted log record.\n* @since 0.5.0\n*/\nconst ansiColorFormatter = getAnsiColorFormatter();\n/**\n* Get a [JSON Lines] formatter with the specified options.  The log records\n* will be rendered as JSON objects, one per line, which is a common format\n* for log files.  This format is also known as Newline-Delimited JSON (NDJSON).\n* It looks like this:\n*\n* ```json\n* {\"@timestamp\":\"2023-11-14T22:13:20.000Z\",\"level\":\"INFO\",\"message\":\"Hello, world!\",\"logger\":\"my.logger\",\"properties\":{\"key\":\"value\"}}\n* ```\n*\n* [JSON Lines]: https://jsonlines.org/\n* @param options The options for the JSON Lines formatter.\n* @returns The JSON Lines formatter.\n* @since 0.11.0\n*/\nfunction getJsonLinesFormatter(options = {}) {\n\tif (!options.categorySeparator && !options.message && !options.properties) return (record) => {\n\t\tif (record.message.length === 3) return JSON.stringify({\n\t\t\t\"@timestamp\": new Date(record.timestamp).toISOString(),\n\t\t\tlevel: record.level === \"warning\" ? \"WARN\" : record.level.toUpperCase(),\n\t\t\tmessage: record.message[0] + JSON.stringify(record.message[1]) + record.message[2],\n\t\t\tlogger: record.category.join(\".\"),\n\t\t\tproperties: record.properties\n\t\t}) + \"\\n\";\n\t\tif (record.message.length === 1) return JSON.stringify({\n\t\t\t\"@timestamp\": new Date(record.timestamp).toISOString(),\n\t\t\tlevel: record.level === \"warning\" ? \"WARN\" : record.level.toUpperCase(),\n\t\t\tmessage: record.message[0],\n\t\t\tlogger: record.category.join(\".\"),\n\t\t\tproperties: record.properties\n\t\t}) + \"\\n\";\n\t\tlet msg = record.message[0];\n\t\tfor (let i = 1; i < record.message.length; i++) msg += i & 1 ? JSON.stringify(record.message[i]) : record.message[i];\n\t\treturn JSON.stringify({\n\t\t\t\"@timestamp\": new Date(record.timestamp).toISOString(),\n\t\t\tlevel: record.level === \"warning\" ? \"WARN\" : record.level.toUpperCase(),\n\t\t\tmessage: msg,\n\t\t\tlogger: record.category.join(\".\"),\n\t\t\tproperties: record.properties\n\t\t}) + \"\\n\";\n\t};\n\tconst isTemplateMessage = options.message === \"template\";\n\tconst propertiesOption = options.properties ?? \"nest:properties\";\n\tlet joinCategory;\n\tif (typeof options.categorySeparator === \"function\") joinCategory = options.categorySeparator;\n\telse {\n\t\tconst separator = options.categorySeparator ?? \".\";\n\t\tjoinCategory = (category) => category.join(separator);\n\t}\n\tlet getProperties;\n\tif (propertiesOption === \"flatten\") getProperties = (properties) => properties;\n\telse if (propertiesOption.startsWith(\"prepend:\")) {\n\t\tconst prefix = propertiesOption.substring(8);\n\t\tif (prefix === \"\") throw new TypeError(`Invalid properties option: ${JSON.stringify(propertiesOption)}. It must be of the form \"prepend:<prefix>\" where <prefix> is a non-empty string.`);\n\t\tgetProperties = (properties) => {\n\t\t\tconst result = {};\n\t\t\tfor (const key in properties) result[`${prefix}${key}`] = properties[key];\n\t\t\treturn result;\n\t\t};\n\t} else if (propertiesOption.startsWith(\"nest:\")) {\n\t\tconst key = propertiesOption.substring(5);\n\t\tgetProperties = (properties) => ({ [key]: properties });\n\t} else throw new TypeError(`Invalid properties option: ${JSON.stringify(propertiesOption)}. It must be \"flatten\", \"prepend:<prefix>\", or \"nest:<key>\".`);\n\tlet getMessage;\n\tif (isTemplateMessage) getMessage = (record) => {\n\t\tif (typeof record.rawMessage === \"string\") return record.rawMessage;\n\t\tlet msg = \"\";\n\t\tfor (let i = 0; i < record.rawMessage.length; i++) msg += i % 2 < 1 ? record.rawMessage[i] : \"{}\";\n\t\treturn msg;\n\t};\n\telse getMessage = (record) => {\n\t\tconst msgLen = record.message.length;\n\t\tif (msgLen === 1) return record.message[0];\n\t\tlet msg = \"\";\n\t\tfor (let i = 0; i < msgLen; i++) msg += i % 2 < 1 ? record.message[i] : JSON.stringify(record.message[i]);\n\t\treturn msg;\n\t};\n\treturn (record) => {\n\t\treturn JSON.stringify({\n\t\t\t\"@timestamp\": new Date(record.timestamp).toISOString(),\n\t\t\tlevel: record.level === \"warning\" ? \"WARN\" : record.level.toUpperCase(),\n\t\t\tmessage: getMessage(record),\n\t\t\tlogger: joinCategory(record.category),\n\t\t\t...getProperties(record.properties)\n\t\t}) + \"\\n\";\n\t};\n}\n/**\n* The default [JSON Lines] formatter.  This formatter formats log records\n* as JSON objects, one per line, which is a common format for log files.\n* It looks like this:\n*\n* ```json\n* {\"@timestamp\":\"2023-11-14T22:13:20.000Z\",\"level\":\"INFO\",\"message\":\"Hello, world!\",\"logger\":\"my.logger\",\"properties\":{\"key\":\"value\"}}\n* ```\n*\n* You can customize the output by passing options to\n* {@link getJsonLinesFormatter}.  For example, you can change the category\n* separator, the message format, and how the properties are formatted.\n*\n* [JSON Lines]: https://jsonlines.org/\n* @since 0.11.0\n*/\nconst jsonLinesFormatter = getJsonLinesFormatter();\n/**\n* The styles for the log level in the console.\n*/\nconst logLevelStyles = {\n\t\"trace\": \"background-color: gray; color: white;\",\n\t\"debug\": \"background-color: gray; color: white;\",\n\t\"info\": \"background-color: white; color: black;\",\n\t\"warning\": \"background-color: orange; color: black;\",\n\t\"error\": \"background-color: red; color: white;\",\n\t\"fatal\": \"background-color: maroon; color: white;\"\n};\n/**\n* The default console formatter.\n*\n* @param record The log record to format.\n* @returns The formatted log record, as an array of arguments for\n*          {@link console.log}.\n*/\nfunction defaultConsoleFormatter(record) {\n\tlet msg = \"\";\n\tconst values = [];\n\tfor (let i = 0; i < record.message.length; i++) if (i % 2 === 0) msg += record.message[i];\n\telse {\n\t\tmsg += \"%o\";\n\t\tvalues.push(record.message[i]);\n\t}\n\tconst date = new Date(record.timestamp);\n\tconst time = `${date.getUTCHours().toString().padStart(2, \"0\")}:${date.getUTCMinutes().toString().padStart(2, \"0\")}:${date.getUTCSeconds().toString().padStart(2, \"0\")}.${date.getUTCMilliseconds().toString().padStart(3, \"0\")}`;\n\treturn [\n\t\t`%c${time} %c${levelAbbreviations[record.level]}%c %c${record.category.join(\"·\")} %c${msg}`,\n\t\t\"color: gray;\",\n\t\tlogLevelStyles[record.level],\n\t\t\"background-color: default;\",\n\t\t\"color: gray;\",\n\t\t\"color: default;\",\n\t\t...values\n\t];\n}\n\n//#endregion\nexport { ansiColorFormatter, defaultConsoleFormatter, defaultTextFormatter, getAnsiColorFormatter, getJsonLinesFormatter, getTextFormatter, jsonLinesFormatter };\n//# sourceMappingURL=formatter.js.map","import { toFilter } from \"./filter.js\";\nimport { compareLogLevel } from \"./level.js\";\nimport { defaultConsoleFormatter, defaultTextFormatter } from \"./formatter.js\";\n\n//#region src/sink.ts\n/**\n* Turns a sink into a filtered sink.  The returned sink only logs records that\n* pass the filter.\n*\n* @example Filter a console sink to only log records with the info level\n* ```typescript\n* const sink = withFilter(getConsoleSink(), \"info\");\n* ```\n*\n* @param sink A sink to be filtered.\n* @param filter A filter to apply to the sink.  It can be either a filter\n*               function or a {@link LogLevel} string.\n* @returns A sink that only logs records that pass the filter.\n*/\nfunction withFilter(sink, filter) {\n\tconst filterFunc = toFilter(filter);\n\treturn (record) => {\n\t\tif (filterFunc(record)) sink(record);\n\t};\n}\n/**\n* A factory that returns a sink that writes to a {@link WritableStream}.\n*\n* Note that the `stream` is of Web Streams API, which is different from\n* Node.js streams.  You can convert a Node.js stream to a Web Streams API\n* stream using [`stream.Writable.toWeb()`] method.\n*\n* [`stream.Writable.toWeb()`]: https://nodejs.org/api/stream.html#streamwritabletowebstreamwritable\n*\n* @example Sink to the standard error in Deno\n* ```typescript\n* const stderrSink = getStreamSink(Deno.stderr.writable);\n* ```\n*\n* @example Sink to the standard error in Node.js\n* ```typescript\n* import stream from \"node:stream\";\n* const stderrSink = getStreamSink(stream.Writable.toWeb(process.stderr));\n* ```\n*\n* @param stream The stream to write to.\n* @param options The options for the sink.\n* @returns A sink that writes to the stream.\n*/\nfunction getStreamSink(stream, options = {}) {\n\tconst formatter = options.formatter ?? defaultTextFormatter;\n\tconst encoder = options.encoder ?? new TextEncoder();\n\tconst writer = stream.getWriter();\n\tif (!options.nonBlocking) {\n\t\tlet lastPromise = Promise.resolve();\n\t\tconst sink = (record) => {\n\t\t\tconst bytes = encoder.encode(formatter(record));\n\t\t\tlastPromise = lastPromise.then(() => writer.ready).then(() => writer.write(bytes));\n\t\t};\n\t\tsink[Symbol.asyncDispose] = async () => {\n\t\t\tawait lastPromise;\n\t\t\tawait writer.close();\n\t\t};\n\t\treturn sink;\n\t}\n\tconst nonBlockingConfig = options.nonBlocking === true ? {} : options.nonBlocking;\n\tconst bufferSize = nonBlockingConfig.bufferSize ?? 100;\n\tconst flushInterval = nonBlockingConfig.flushInterval ?? 100;\n\tconst buffer = [];\n\tlet flushTimer = null;\n\tlet disposed = false;\n\tlet activeFlush = null;\n\tconst maxBufferSize = bufferSize * 2;\n\tasync function flush() {\n\t\tif (buffer.length === 0) return;\n\t\tconst records = buffer.splice(0);\n\t\tfor (const record of records) try {\n\t\t\tconst bytes = encoder.encode(formatter(record));\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(bytes);\n\t\t} catch {}\n\t}\n\tfunction scheduleFlush() {\n\t\tif (activeFlush) return;\n\t\tactiveFlush = flush().finally(() => {\n\t\t\tactiveFlush = null;\n\t\t});\n\t}\n\tfunction startFlushTimer() {\n\t\tif (flushTimer !== null || disposed) return;\n\t\tflushTimer = setInterval(() => {\n\t\t\tscheduleFlush();\n\t\t}, flushInterval);\n\t}\n\tconst nonBlockingSink = (record) => {\n\t\tif (disposed) return;\n\t\tif (buffer.length >= maxBufferSize) buffer.shift();\n\t\tbuffer.push(record);\n\t\tif (buffer.length >= bufferSize) scheduleFlush();\n\t\telse if (flushTimer === null) startFlushTimer();\n\t};\n\tnonBlockingSink[Symbol.asyncDispose] = async () => {\n\t\tdisposed = true;\n\t\tif (flushTimer !== null) {\n\t\t\tclearInterval(flushTimer);\n\t\t\tflushTimer = null;\n\t\t}\n\t\tawait flush();\n\t\ttry {\n\t\t\tawait writer.close();\n\t\t} catch {}\n\t};\n\treturn nonBlockingSink;\n}\n/**\n* A console sink factory that returns a sink that logs to the console.\n*\n* @param options The options for the sink.\n* @returns A sink that logs to the console. If `nonBlocking` is enabled,\n*          returns a sink that also implements {@link Disposable}.\n*/\nfunction getConsoleSink(options = {}) {\n\tconst formatter = options.formatter ?? defaultConsoleFormatter;\n\tconst levelMap = {\n\t\ttrace: \"debug\",\n\t\tdebug: \"debug\",\n\t\tinfo: \"info\",\n\t\twarning: \"warn\",\n\t\terror: \"error\",\n\t\tfatal: \"error\",\n\t\t...options.levelMap ?? {}\n\t};\n\tconst console = options.console ?? globalThis.console;\n\tconst baseSink = (record) => {\n\t\tconst args = formatter(record);\n\t\tconst method = levelMap[record.level];\n\t\tif (method === void 0) throw new TypeError(`Invalid log level: ${record.level}.`);\n\t\tif (typeof args === \"string\") {\n\t\t\tconst msg = args.replace(/\\r?\\n$/, \"\");\n\t\t\tconsole[method](msg);\n\t\t} else console[method](...args);\n\t};\n\tif (!options.nonBlocking) return baseSink;\n\tconst nonBlockingConfig = options.nonBlocking === true ? {} : options.nonBlocking;\n\tconst bufferSize = nonBlockingConfig.bufferSize ?? 100;\n\tconst flushInterval = nonBlockingConfig.flushInterval ?? 100;\n\tconst buffer = [];\n\tlet flushTimer = null;\n\tlet disposed = false;\n\tlet flushScheduled = false;\n\tconst maxBufferSize = bufferSize * 2;\n\tfunction flush() {\n\t\tif (buffer.length === 0) return;\n\t\tconst records = buffer.splice(0);\n\t\tfor (const record of records) try {\n\t\t\tbaseSink(record);\n\t\t} catch {}\n\t}\n\tfunction scheduleFlush() {\n\t\tif (flushScheduled) return;\n\t\tflushScheduled = true;\n\t\tsetTimeout(() => {\n\t\t\tflushScheduled = false;\n\t\t\tflush();\n\t\t}, 0);\n\t}\n\tfunction startFlushTimer() {\n\t\tif (flushTimer !== null || disposed) return;\n\t\tflushTimer = setInterval(() => {\n\t\t\tflush();\n\t\t}, flushInterval);\n\t}\n\tconst nonBlockingSink = (record) => {\n\t\tif (disposed) return;\n\t\tif (buffer.length >= maxBufferSize) buffer.shift();\n\t\tbuffer.push(record);\n\t\tif (buffer.length >= bufferSize) scheduleFlush();\n\t\telse if (flushTimer === null) startFlushTimer();\n\t};\n\tnonBlockingSink[Symbol.dispose] = () => {\n\t\tdisposed = true;\n\t\tif (flushTimer !== null) {\n\t\t\tclearInterval(flushTimer);\n\t\t\tflushTimer = null;\n\t\t}\n\t\tflush();\n\t};\n\treturn nonBlockingSink;\n}\n/**\n* Converts an async sink into a regular sink with proper async handling.\n* The returned sink chains async operations to ensure proper ordering and\n* implements AsyncDisposable to wait for all pending operations on disposal.\n*\n* @example Create a sink that asynchronously posts to a webhook\n* ```typescript\n* const asyncSink: AsyncSink = async (record) => {\n*   await fetch(\"https://example.com/logs\", {\n*     method: \"POST\",\n*     body: JSON.stringify(record),\n*   });\n* };\n* const sink = fromAsyncSink(asyncSink);\n* ```\n*\n* @param asyncSink The async sink function to convert.\n* @returns A sink that properly handles async operations and disposal.\n* @since 1.0.0\n*/\nfunction fromAsyncSink(asyncSink) {\n\tlet lastPromise = Promise.resolve();\n\tconst sink = (record) => {\n\t\tlastPromise = lastPromise.then(() => asyncSink(record)).catch(() => {});\n\t};\n\tsink[Symbol.asyncDispose] = async () => {\n\t\tawait lastPromise;\n\t};\n\treturn sink;\n}\n/**\n* Creates a sink that buffers log records until a trigger level is reached.\n* This pattern, known as \"fingers crossed\" logging, keeps detailed debug logs\n* in memory and only outputs them when an error or other significant event occurs.\n*\n* @example Basic usage with default settings\n* ```typescript\n* const sink = fingersCrossed(getConsoleSink());\n* // Debug and info logs are buffered\n* // When an error occurs, all buffered logs + the error are output\n* ```\n*\n* @example Custom trigger level and buffer size\n* ```typescript\n* const sink = fingersCrossed(getConsoleSink(), {\n*   triggerLevel: \"warning\",  // Trigger on warning or higher\n*   maxBufferSize: 500        // Keep last 500 records\n* });\n* ```\n*\n* @example Category isolation\n* ```typescript\n* const sink = fingersCrossed(getConsoleSink(), {\n*   isolateByCategory: \"descendant\"  // Separate buffers per category\n* });\n* // Error in [\"app\"] triggers flush of [\"app\"] and [\"app\", \"module\"] buffers\n* // But not [\"other\"] buffer\n* ```\n*\n* @param sink The sink to wrap. Buffered records are sent to this sink when\n*             triggered.\n* @param options Configuration options for the fingers crossed behavior.\n* @returns A sink that buffers records until the trigger level is reached.\n* @since 1.1.0\n*/\nfunction fingersCrossed(sink, options = {}) {\n\tconst triggerLevel = options.triggerLevel ?? \"error\";\n\tconst maxBufferSize = Math.max(0, options.maxBufferSize ?? 1e3);\n\tconst isolateByCategory = options.isolateByCategory;\n\ttry {\n\t\tcompareLogLevel(\"trace\", triggerLevel);\n\t} catch (error) {\n\t\tthrow new TypeError(`Invalid triggerLevel: ${JSON.stringify(triggerLevel)}. ${error instanceof Error ? error.message : String(error)}`);\n\t}\n\tfunction isDescendant(parent, child) {\n\t\tif (parent.length === 0 || child.length === 0) return false;\n\t\tif (parent.length > child.length) return false;\n\t\treturn parent.every((p, i) => p === child[i]);\n\t}\n\tfunction isAncestor(child, parent) {\n\t\tif (child.length === 0 || parent.length === 0) return false;\n\t\tif (child.length < parent.length) return false;\n\t\treturn parent.every((p, i) => p === child[i]);\n\t}\n\tlet shouldFlushBuffer = null;\n\tif (isolateByCategory) if (typeof isolateByCategory === \"function\") shouldFlushBuffer = isolateByCategory;\n\telse switch (isolateByCategory) {\n\t\tcase \"descendant\":\n\t\t\tshouldFlushBuffer = (trigger, buffered) => isDescendant(trigger, buffered);\n\t\t\tbreak;\n\t\tcase \"ancestor\":\n\t\t\tshouldFlushBuffer = (trigger, buffered) => isAncestor(trigger, buffered);\n\t\t\tbreak;\n\t\tcase \"both\":\n\t\t\tshouldFlushBuffer = (trigger, buffered) => isDescendant(trigger, buffered) || isAncestor(trigger, buffered);\n\t\t\tbreak;\n\t}\n\tfunction getCategoryKey(category) {\n\t\treturn JSON.stringify(category);\n\t}\n\tfunction parseCategoryKey(key) {\n\t\treturn JSON.parse(key);\n\t}\n\tif (!isolateByCategory) {\n\t\tconst buffer = [];\n\t\tlet triggered = false;\n\t\treturn (record) => {\n\t\t\tif (triggered) {\n\t\t\t\tsink(record);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (compareLogLevel(record.level, triggerLevel) >= 0) {\n\t\t\t\ttriggered = true;\n\t\t\t\tfor (const bufferedRecord of buffer) sink(bufferedRecord);\n\t\t\t\tbuffer.length = 0;\n\t\t\t\tsink(record);\n\t\t\t} else {\n\t\t\t\tbuffer.push(record);\n\t\t\t\twhile (buffer.length > maxBufferSize) buffer.shift();\n\t\t\t}\n\t\t};\n\t} else {\n\t\tconst buffers = /* @__PURE__ */ new Map();\n\t\tconst triggered = /* @__PURE__ */ new Set();\n\t\treturn (record) => {\n\t\t\tconst categoryKey = getCategoryKey(record.category);\n\t\t\tif (triggered.has(categoryKey)) {\n\t\t\t\tsink(record);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (compareLogLevel(record.level, triggerLevel) >= 0) {\n\t\t\t\tconst keysToFlush = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const [bufferedKey] of buffers) if (bufferedKey === categoryKey) keysToFlush.add(bufferedKey);\n\t\t\t\telse if (shouldFlushBuffer) {\n\t\t\t\t\tconst bufferedCategory = parseCategoryKey(bufferedKey);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (shouldFlushBuffer(record.category, bufferedCategory)) keysToFlush.add(bufferedKey);\n\t\t\t\t\t} catch {}\n\t\t\t\t}\n\t\t\t\tconst allRecordsToFlush = [];\n\t\t\t\tfor (const key of keysToFlush) {\n\t\t\t\t\tconst buffer = buffers.get(key);\n\t\t\t\t\tif (buffer) {\n\t\t\t\t\t\tallRecordsToFlush.push(...buffer);\n\t\t\t\t\t\tbuffers.delete(key);\n\t\t\t\t\t\ttriggered.add(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tallRecordsToFlush.sort((a, b) => a.timestamp - b.timestamp);\n\t\t\t\tfor (const bufferedRecord of allRecordsToFlush) sink(bufferedRecord);\n\t\t\t\ttriggered.add(categoryKey);\n\t\t\t\tsink(record);\n\t\t\t} else {\n\t\t\t\tlet buffer = buffers.get(categoryKey);\n\t\t\t\tif (!buffer) {\n\t\t\t\t\tbuffer = [];\n\t\t\t\t\tbuffers.set(categoryKey, buffer);\n\t\t\t\t}\n\t\t\t\tbuffer.push(record);\n\t\t\t\twhile (buffer.length > maxBufferSize) buffer.shift();\n\t\t\t}\n\t\t};\n\t}\n}\n\n//#endregion\nexport { fingersCrossed, fromAsyncSink, getConsoleSink, getStreamSink, withFilter };\n//# sourceMappingURL=sink.js.map","import { toFilter } from \"./filter.js\";\nimport { LoggerImpl } from \"./logger.js\";\nimport { getConsoleSink } from \"./sink.js\";\n\n//#region src/config.ts\n/**\n* The current configuration, if any.  Otherwise, `null`.\n*/\nlet currentConfig = null;\n/**\n* Strong references to the loggers.\n* This is to prevent the loggers from being garbage collected so that their\n* sinks and filters are not removed.\n*/\nconst strongRefs = /* @__PURE__ */ new Set();\n/**\n* Disposables to dispose when resetting the configuration.\n*/\nconst disposables = /* @__PURE__ */ new Set();\n/**\n* Async disposables to dispose when resetting the configuration.\n*/\nconst asyncDisposables = /* @__PURE__ */ new Set();\n/**\n* Check if a config is for the meta logger.\n*/\nfunction isLoggerConfigMeta(cfg) {\n\treturn cfg.category.length === 0 || cfg.category.length === 1 && cfg.category[0] === \"logtape\" || cfg.category.length === 2 && cfg.category[0] === \"logtape\" && cfg.category[1] === \"meta\";\n}\n/**\n* Configure the loggers with the specified configuration.\n*\n* Note that if the given sinks or filters are disposable, they will be\n* disposed when the configuration is reset, or when the process exits.\n*\n* @example\n* ```typescript\n* await configure({\n*   sinks: {\n*     console: getConsoleSink(),\n*   },\n*   filters: {\n*     slow: (log) =>\n*       \"duration\" in log.properties &&\n*       log.properties.duration as number > 1000,\n*   },\n*   loggers: [\n*     {\n*       category: \"my-app\",\n*       sinks: [\"console\"],\n*       lowestLevel: \"info\",\n*     },\n*     {\n*       category: [\"my-app\", \"sql\"],\n*       filters: [\"slow\"],\n*       lowestLevel: \"debug\",\n*     },\n*     {\n*       category: \"logtape\",\n*       sinks: [\"console\"],\n*       lowestLevel: \"error\",\n*     },\n*   ],\n* });\n* ```\n*\n* @param config The configuration.\n*/\nasync function configure(config) {\n\tif (currentConfig != null && !config.reset) throw new ConfigError(\"Already configured; if you want to reset, turn on the reset flag.\");\n\tawait reset();\n\ttry {\n\t\tconfigureInternal(config, true);\n\t} catch (e) {\n\t\tif (e instanceof ConfigError) await reset();\n\t\tthrow e;\n\t}\n}\n/**\n* Configure sync loggers with the specified configuration.\n*\n* Note that if the given sinks or filters are disposable, they will be\n* disposed when the configuration is reset, or when the process exits.\n*\n* Also note that passing async sinks or filters will throw. If\n* necessary use {@link resetSync} or {@link disposeSync}.\n*\n* @example\n* ```typescript\n* configureSync({\n*   sinks: {\n*     console: getConsoleSink(),\n*   },\n*   loggers: [\n*     {\n*       category: \"my-app\",\n*       sinks: [\"console\"],\n*       lowestLevel: \"info\",\n*     },\n*     {\n*       category: \"logtape\",\n*       sinks: [\"console\"],\n*       lowestLevel: \"error\",\n*     },\n*   ],\n* });\n* ```\n*\n* @param config The configuration.\n* @since 0.9.0\n*/\nfunction configureSync(config) {\n\tif (currentConfig != null && !config.reset) throw new ConfigError(\"Already configured; if you want to reset, turn on the reset flag.\");\n\tif (asyncDisposables.size > 0) throw new ConfigError(\"Previously configured async disposables are still active. Use configure() instead or explicitly dispose them using dispose().\");\n\tresetSync();\n\ttry {\n\t\tconfigureInternal(config, false);\n\t} catch (e) {\n\t\tif (e instanceof ConfigError) resetSync();\n\t\tthrow e;\n\t}\n}\nfunction configureInternal(config, allowAsync) {\n\tcurrentConfig = config;\n\tlet metaConfigured = false;\n\tconst configuredCategories = /* @__PURE__ */ new Set();\n\tfor (const cfg of config.loggers) {\n\t\tif (isLoggerConfigMeta(cfg)) metaConfigured = true;\n\t\tconst categoryKey = Array.isArray(cfg.category) ? JSON.stringify(cfg.category) : JSON.stringify([cfg.category]);\n\t\tif (configuredCategories.has(categoryKey)) throw new ConfigError(`Duplicate logger configuration for category: ${categoryKey}. Each category can only be configured once.`);\n\t\tconfiguredCategories.add(categoryKey);\n\t\tconst logger = LoggerImpl.getLogger(cfg.category);\n\t\tfor (const sinkId of cfg.sinks ?? []) {\n\t\t\tconst sink = config.sinks[sinkId];\n\t\t\tif (!sink) throw new ConfigError(`Sink not found: ${sinkId}.`);\n\t\t\tlogger.sinks.push(sink);\n\t\t}\n\t\tlogger.parentSinks = cfg.parentSinks ?? \"inherit\";\n\t\tif (cfg.lowestLevel !== void 0) logger.lowestLevel = cfg.lowestLevel;\n\t\tfor (const filterId of cfg.filters ?? []) {\n\t\t\tconst filter = config.filters?.[filterId];\n\t\t\tif (filter === void 0) throw new ConfigError(`Filter not found: ${filterId}.`);\n\t\t\tlogger.filters.push(toFilter(filter));\n\t\t}\n\t\tstrongRefs.add(logger);\n\t}\n\tLoggerImpl.getLogger().contextLocalStorage = config.contextLocalStorage;\n\tfor (const sink of Object.values(config.sinks)) {\n\t\tif (Symbol.asyncDispose in sink) if (allowAsync) asyncDisposables.add(sink);\n\t\telse throw new ConfigError(\"Async disposables cannot be used with configureSync().\");\n\t\tif (Symbol.dispose in sink) disposables.add(sink);\n\t}\n\tfor (const filter of Object.values(config.filters ?? {})) {\n\t\tif (filter == null || typeof filter === \"string\") continue;\n\t\tif (Symbol.asyncDispose in filter) if (allowAsync) asyncDisposables.add(filter);\n\t\telse throw new ConfigError(\"Async disposables cannot be used with configureSync().\");\n\t\tif (Symbol.dispose in filter) disposables.add(filter);\n\t}\n\tif (\"process\" in globalThis && !(\"Deno\" in globalThis)) {\n\t\tconst proc = globalThis.process;\n\t\tif (proc?.on) proc.on(\"exit\", allowAsync ? dispose : disposeSync);\n\t} else addEventListener(\"unload\", allowAsync ? dispose : disposeSync);\n\tconst meta = LoggerImpl.getLogger([\"logtape\", \"meta\"]);\n\tif (!metaConfigured) meta.sinks.push(getConsoleSink());\n\tmeta.info(\"LogTape loggers are configured.  Note that LogTape itself uses the meta logger, which has category {metaLoggerCategory}.  The meta logger purposes to log internal errors such as sink exceptions.  If you are seeing this message, the meta logger is automatically configured.  It's recommended to configure the meta logger with a separate sink so that you can easily notice if logging itself fails or is misconfigured.  To turn off this message, configure the meta logger with higher log levels than {dismissLevel}.  See also <https://logtape.org/manual/categories#meta-logger>.\", {\n\t\tmetaLoggerCategory: [\"logtape\", \"meta\"],\n\t\tdismissLevel: \"info\"\n\t});\n}\n/**\n* Get the current configuration, if any.  Otherwise, `null`.\n* @returns The current configuration, if any.  Otherwise, `null`.\n*/\nfunction getConfig() {\n\treturn currentConfig;\n}\n/**\n* Reset the configuration.  Mostly for testing purposes.\n*/\nasync function reset() {\n\tawait dispose();\n\tresetInternal();\n}\n/**\n* Reset the configuration.  Mostly for testing purposes. Will not clear async\n* sinks, only use with sync sinks. Use {@link reset} if you have async sinks.\n* @since 0.9.0\n*/\nfunction resetSync() {\n\tdisposeSync();\n\tresetInternal();\n}\nfunction resetInternal() {\n\tconst rootLogger = LoggerImpl.getLogger([]);\n\trootLogger.resetDescendants();\n\tdelete rootLogger.contextLocalStorage;\n\tstrongRefs.clear();\n\tcurrentConfig = null;\n}\n/**\n* Dispose of the disposables.\n*/\nasync function dispose() {\n\tdisposeSync();\n\tconst promises = [];\n\tfor (const disposable of asyncDisposables) {\n\t\tpromises.push(disposable[Symbol.asyncDispose]());\n\t\tasyncDisposables.delete(disposable);\n\t}\n\tawait Promise.all(promises);\n}\n/**\n* Dispose of the sync disposables. Async disposables will be untouched,\n* use {@link dispose} if you have async sinks.\n* @since 0.9.0\n*/\nfunction disposeSync() {\n\tfor (const disposable of disposables) disposable[Symbol.dispose]();\n\tdisposables.clear();\n}\n/**\n* A configuration error.\n*/\nvar ConfigError = class extends Error {\n\t/**\n\t* Constructs a new configuration error.\n\t* @param message The error message.\n\t*/\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"ConfigureError\";\n\t}\n};\n\n//#endregion\nexport { ConfigError, configure, configureSync, dispose, disposeSync, getConfig, reset, resetSync };\n//# sourceMappingURL=config.js.map","import { captureException, captureMessage, logger, withScope } from \"@sentry/core\";\nimport { configureSync, getConfig, getConsoleSink, getJsonLinesFormatter, getLogger, parseLogLevel } from \"@logtape/logtape\";\n\n//#region src/telem/logging.ts\nconst ROOT_LOG_CATEGORY = [\"sentry\", \"mcp\"];\nconst STDERR_CONSOLE_LEVEL_MAP = {\n\ttrace: \"error\",\n\tdebug: \"error\",\n\tinfo: \"error\",\n\twarning: \"error\",\n\terror: \"error\",\n\tfatal: \"error\"\n};\nlet loggingConfigured = false;\nfunction resolveLowestLevel() {\n\tconst envLevel = typeof process !== \"undefined\" ? process.env.LOG_LEVEL : void 0;\n\tif (envLevel) try {\n\t\treturn parseLogLevel(envLevel);\n\t} catch (error) {}\n\treturn typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\" ? \"debug\" : \"info\";\n}\n/**\n* Creates a LogTape sink that sends logs to Sentry's Logs product using Sentry.logger.\n*\n* Unlike @logtape/sentry's getSentrySink which uses captureException/captureMessage\n* (creating Issues), this sink uses Sentry.logger.* methods to send data to the\n* Logs product.\n*\n* This uses @sentry/core logger API which works across all platforms (Node.js,\n* Cloudflare Workers, etc.) as long as Sentry is initialized with the appropriate SDK.\n*/\nfunction createSentryLogsSink() {\n\treturn (record) => {\n\t\tif (!logger) return;\n\t\tlet message = \"\";\n\t\tfor (let i = 0; i < record.message.length; i++) if (i % 2 === 0) message += record.message[i];\n\t\telse {\n\t\t\tconst value = record.message[i];\n\t\t\tmessage += typeof value === \"string\" ? value : coerceMessage(value);\n\t\t}\n\t\tconst attributes = record.properties;\n\t\tswitch (record.level) {\n\t\t\tcase \"trace\":\n\t\t\t\tlogger.trace(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"debug\":\n\t\t\t\tlogger.debug(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"info\":\n\t\t\t\tlogger.info(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"warning\":\n\t\t\t\tlogger.warn(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tlogger.error(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"fatal\":\n\t\t\t\tlogger.fatal(message, attributes);\n\t\t\t\tbreak;\n\t\t\tdefault: logger.info(message, attributes);\n\t\t}\n\t};\n}\nfunction ensureLoggingConfigured() {\n\tif (loggingConfigured) return;\n\tconst consoleSink = getConsoleSink({\n\t\tformatter: getJsonLinesFormatter(),\n\t\tlevelMap: STDERR_CONSOLE_LEVEL_MAP\n\t});\n\tconst sentrySink = createSentryLogsSink();\n\tconfigureSync({\n\t\treset: getConfig() !== null,\n\t\tsinks: {\n\t\t\tconsole: consoleSink,\n\t\t\tsentry: sentrySink\n\t\t},\n\t\tloggers: [\n\t\t\t{\n\t\t\t\tcategory: [...ROOT_LOG_CATEGORY],\n\t\t\t\tsinks: [\"console\", \"sentry\"],\n\t\t\t\tlowestLevel: resolveLowestLevel()\n\t\t\t},\n\t\t\t{\n\t\t\t\tcategory: [\"logtape\", \"meta\"],\n\t\t\t\tsinks: [\"console\"],\n\t\t\t\tlowestLevel: \"warning\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tcategory: \"logtape\",\n\t\t\t\tsinks: [\"console\"],\n\t\t\t\tlowestLevel: \"error\"\n\t\t\t}\n\t\t]\n\t});\n\tloggingConfigured = true;\n}\nfunction getLogger$1(scope, defaults) {\n\tensureLoggingConfigured();\n\tconst category = Array.isArray(scope) ? scope : [scope];\n\tconst logger$2 = getLogger([...ROOT_LOG_CATEGORY, ...category]);\n\treturn defaults ? logger$2.with(defaults) : logger$2;\n}\nconst ISSUE_LOGGER_SCOPE = [\"runtime\", \"issues\"];\nfunction safeJsonStringify(value) {\n\ttry {\n\t\treturn JSON.stringify(value);\n\t} catch (error) {\n\t\treturn void 0;\n\t}\n}\nfunction truncate(text, maxLength = 1024) {\n\tif (text.length <= maxLength) return text;\n\treturn `${text.slice(0, maxLength - 1)}…`;\n}\nfunction coerceMessage(value) {\n\tif (typeof value === \"string\") return value;\n\tif (typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"bigint\") return value.toString();\n\tif (value === null || value === void 0) return String(value);\n\tconst json = safeJsonStringify(value);\n\tif (json) return truncate(json);\n\treturn Object.prototype.toString.call(value);\n}\nfunction serializeError(value, depth = 0) {\n\tif (value instanceof Error) {\n\t\tconst serialized = { message: value.message };\n\t\tif (value.name && value.name !== \"Error\") serialized.name = value.name;\n\t\tif (typeof value.stack === \"string\") serialized.stack = value.stack;\n\t\tconst hasCause = \"cause\" in value && value.cause !== void 0;\n\t\tif (hasCause && depth < 3) {\n\t\t\tconst cause = value.cause;\n\t\t\tserialized.cause = serializeError(cause, depth + 1);\n\t\t}\n\t\treturn serialized;\n\t}\n\treturn { message: coerceMessage(value) };\n}\nconst logger$1 = getLogger$1([]);\nconst DEFAULT_LOGGER_SCOPE = [];\nfunction buildLogProperties(level, options, serializedError) {\n\tconst properties = { severity: level };\n\tif (serializedError) properties.error = serializedError;\n\tif (options.extra) {\n\t\tconst protectedKeys = new Set([\n\t\t\t\"severity\",\n\t\t\t\"error\",\n\t\t\t\"sentryContexts\"\n\t\t]);\n\t\tconst sanitizedExtra = {};\n\t\tfor (const [key, value] of Object.entries(options.extra)) if (!protectedKeys.has(key)) sanitizedExtra[key] = value;\n\t\tObject.assign(properties, sanitizedExtra);\n\t}\n\tif (options.contexts) properties.sentryContexts = options.contexts;\n\treturn properties;\n}\nfunction logWithLevel(level, value, options = {}) {\n\tensureLoggingConfigured();\n\tconst serializedError = value instanceof Error ? serializeError(value) : void 0;\n\tconst message = serializedError ? serializedError.message : coerceMessage(value);\n\tconst scope = options.loggerScope ?? DEFAULT_LOGGER_SCOPE;\n\tconst scopedLogger = getLogger$1(scope, { severity: level });\n\tconst properties = buildLogProperties(level, options, serializedError);\n\tswitch (level) {\n\t\tcase \"trace\":\n\t\t\tscopedLogger.trace(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"debug\":\n\t\t\tscopedLogger.debug(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"info\":\n\t\t\tscopedLogger.info(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"warning\":\n\t\t\tscopedLogger.warn(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"error\":\n\t\t\tscopedLogger.error(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"fatal\":\n\t\t\tscopedLogger.fatal(message, () => properties);\n\t\t\tbreak;\n\t\tdefault: scopedLogger.info(message, () => properties);\n\t}\n}\nfunction logDebug(value, options) {\n\tlogWithLevel(\"debug\", value, options);\n}\nfunction logInfo(value, options) {\n\tlogWithLevel(\"info\", value, options);\n}\nfunction logWarn(value, options) {\n\tlogWithLevel(\"warning\", value, options);\n}\nfunction logError(value, options) {\n\tlogWithLevel(\"error\", value, options);\n}\nfunction logIssue(error, options = {}) {\n\tensureLoggingConfigured();\n\tconst eventId = withScope((scopeInstance) => {\n\t\tif (options.contexts) for (const [key, context] of Object.entries(options.contexts)) scopeInstance.setContext(key, context);\n\t\tif (options.extra) scopeInstance.setContext(\"log\", options.extra);\n\t\tif (options.attachments) for (const [key, data] of Object.entries(options.attachments)) scopeInstance.addAttachment({\n\t\t\tdata,\n\t\t\tfilename: key\n\t\t});\n\t\tconst captureLevel = \"error\";\n\t\treturn typeof error === \"string\" ? captureMessage(error, {\n\t\t\tcontexts: options.contexts,\n\t\t\tlevel: captureLevel\n\t\t}) : captureException(error, {\n\t\t\tcontexts: options.contexts,\n\t\t\tlevel: captureLevel\n\t\t});\n\t});\n\tconst { attachments,...baseOptions } = options;\n\tconst extra = {\n\t\t...baseOptions.extra ?? {},\n\t\t...attachments && Object.keys(attachments).length > 0 ? { attachments: Object.keys(attachments) } : {},\n\t\t...eventId ? { eventId } : {}\n\t};\n\tlogError(error, {\n\t\t...baseOptions,\n\t\textra,\n\t\tloggerScope: baseOptions.loggerScope ?? ISSUE_LOGGER_SCOPE\n\t});\n\treturn eventId;\n}\n\n//#endregion\nexport { getLogger$1 as getLogger, logDebug, logError, logInfo, logIssue, logWarn, logger$1 as logger };\n//# sourceMappingURL=logging-B7X3yL0T.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\n\n//#region src/api-client/api-path.ts\n/**\n* Builds an API request path, confining each interpolated value to one path segment.\n*\n* `fetch` resolves dot segments during URL parsing, so a raw value in a path can\n* rewrite it above the org and project the server injected. Encoding stops separators\n* but not `.` or `..`, which survive encoding and still collapse (the URL spec treats\n* `%2e%2e` as a dot segment too), so those are rejected instead.\n*\n* Query strings go outside the template, since `URLSearchParams` has already encoded\n* them and their separators must stay literal:\n*\n* ```typescript\n* const path = apiPath`/organizations/${organizationSlug}/issues/`;\n* await this.requestJSON(`${path}?${query}`);\n* ```\n*/\nfunction apiPath(strings, ...values) {\n\treturn strings.reduce((acc, literal, index) => {\n\t\tif (index >= values.length) return acc + literal;\n\t\tconst value = String(values[index]);\n\t\tif (value === \".\" || value === \"..\") throw new UserInputError(`Invalid identifier \"${value}\": relative path segments are not allowed.`);\n\t\treturn acc + literal + encodeURIComponent(value);\n\t}, \"\");\n}\n\n//#endregion\nexport { apiPath };\n//# sourceMappingURL=api-path-BQDQ2sHi.js.map","//#region src/api-client/errors.ts\n/**\n* API Error Class Hierarchy\n*\n* This module defines a hierarchical error system for the Sentry API client\n* that automatically categorizes errors based on HTTP status codes.\n*\n* Key principles:\n* - 4xx errors (ApiClientError) are user input errors, not reported to Sentry\n* - 5xx errors (ApiServerError) are system errors, reported to Sentry\n* - Specific error types provide additional context and helper methods\n* - The hierarchy enables type-safe error handling without manual status checks\n*/\n/**\n* Base class for all API errors.\n* Contains common properties for all API error types.\n* Status is optional since some errors (like client-side validation) don't have HTTP status codes.\n*/\nvar ApiError = class ApiError extends Error {\n\tconstructor(message, status, detail, responseBody) {\n\t\tsuper(message);\n\t\tthis.status = status;\n\t\tthis.detail = detail;\n\t\tthis.responseBody = responseBody;\n\t\tthis.name = \"ApiError\";\n\t\tObject.setPrototypeOf(this, ApiError.prototype);\n\t}\n};\n/**\n* Client errors (4xx) - User input errors that should NOT be reported to Sentry.\n* These typically indicate issues with the request that the user can fix.\n* Also includes client-side validation errors that don't have HTTP status codes.\n*/\nvar ApiClientError = class ApiClientError extends ApiError {\n\tconstructor(message, status, detail, responseBody) {\n\t\tsuper(message, status, detail, responseBody);\n\t\tthis.name = \"ApiClientError\";\n\t\tObject.setPrototypeOf(this, ApiClientError.prototype);\n\t}\n\t/**\n\t* Convert to a user-friendly formatted message.\n\t* Returns the standard format: \"API error (status): message\" or just \"API error: message\" if no status.\n\t* For 404 errors, adds helpful context about checking parameters.\n\t*/\n\ttoUserMessage() {\n\t\tconst baseMessage = this.status ? `API error (${this.status}): ${this.message}` : `API error: ${this.message}`;\n\t\tif (this.status === 404) {\n\t\t\tconst genericMessages = [\n\t\t\t\t\"not found\",\n\t\t\t\t\"the requested resource does not exist\",\n\t\t\t\t\"resource does not exist\",\n\t\t\t\t\"resource not found\"\n\t\t\t];\n\t\t\tconst isGeneric = genericMessages.some((msg) => this.message.toLowerCase() === msg || this.message.toLowerCase().includes(\"requested resource\"));\n\t\t\tif (isGeneric) return `${baseMessage}. Please verify that the organization, project, or resource ID is correct and that you have access to it.`;\n\t\t\treturn `${baseMessage}. Please verify the parameters are correct.`;\n\t\t}\n\t\treturn baseMessage;\n\t}\n\t/**\n\t* Check if this is a permission/authorization error (403)\n\t*/\n\tisPermissionError() {\n\t\treturn this.status === 403;\n\t}\n\t/**\n\t* Check if this is a not found error (404)\n\t*/\n\tisNotFoundError() {\n\t\treturn this.status === 404;\n\t}\n\t/**\n\t* Check if this is a validation error (400 or 422)\n\t*/\n\tisValidationError() {\n\t\treturn this.status === 400 || this.status === 422;\n\t}\n\t/**\n\t* Check if this is an authentication error (401)\n\t*/\n\tisAuthenticationError() {\n\t\treturn this.status === 401;\n\t}\n\t/**\n\t* Check if this is a rate limit error (429)\n\t*/\n\tisRateLimitError() {\n\t\treturn this.status === 429;\n\t}\n};\n/**\n* Permission denied error (403).\n* Includes special handling for multi-project access errors.\n*/\nvar ApiPermissionError = class ApiPermissionError extends ApiClientError {\n\tconstructor(message, detail, responseBody) {\n\t\tsuper(message, 403, detail, responseBody);\n\t\tthis.name = \"ApiPermissionError\";\n\t\tObject.setPrototypeOf(this, ApiPermissionError.prototype);\n\t}\n\t/**\n\t* Check if this is the specific multi-project access error\n\t*/\n\tisMultiProjectAccessError() {\n\t\treturn this.message.includes(\"multiple projects\") || this.message.includes(\"multi project\") || this.message.includes(\"multi-project\") || this.message.includes(\"You do not have access to query across multiple projects\");\n\t}\n};\n/**\n* Resource not found error (404).\n* Can include additional context about what resource was not found.\n*/\nvar ApiNotFoundError = class ApiNotFoundError extends ApiClientError {\n\tconstructor(message, detail, responseBody, resourceType, resourceId) {\n\t\tsuper(message, 404, detail, responseBody);\n\t\tthis.resourceType = resourceType;\n\t\tthis.resourceId = resourceId;\n\t\tthis.name = \"ApiNotFoundError\";\n\t\tObject.setPrototypeOf(this, ApiNotFoundError.prototype);\n\t}\n};\n/**\n* Validation error (400 or 422 for API responses, or no status for client-side validation).\n* Indicates the request was malformed or contained invalid data.\n*/\nvar ApiValidationError = class ApiValidationError extends ApiClientError {\n\tconstructor(message, status, detail, responseBody, validationErrors) {\n\t\tsuper(message, status, detail, responseBody);\n\t\tthis.validationErrors = validationErrors;\n\t\tthis.name = \"ApiValidationError\";\n\t\tObject.setPrototypeOf(this, ApiValidationError.prototype);\n\t}\n};\n/**\n* Authentication error (401).\n* Indicates the request lacks valid authentication credentials.\n*/\nvar ApiAuthenticationError = class ApiAuthenticationError extends ApiClientError {\n\tconstructor(message, detail, responseBody) {\n\t\tsuper(message, 401, detail, responseBody);\n\t\tthis.name = \"ApiAuthenticationError\";\n\t\tObject.setPrototypeOf(this, ApiAuthenticationError.prototype);\n\t}\n};\n/**\n* Rate limit error (429).\n* Includes retry-after information when available.\n*/\nvar ApiRateLimitError = class ApiRateLimitError extends ApiClientError {\n\tconstructor(message, detail, responseBody, retryAfter) {\n\t\tsuper(message, 429, detail, responseBody);\n\t\tthis.retryAfter = retryAfter;\n\t\tthis.name = \"ApiRateLimitError\";\n\t\tObject.setPrototypeOf(this, ApiRateLimitError.prototype);\n\t}\n};\n/**\n* Server errors (5xx) - System errors that SHOULD be reported to Sentry.\n* These indicate problems with the server that are not the user's fault.\n*/\nvar ApiServerError = class ApiServerError extends ApiError {\n\tconstructor(message, status, detail, responseBody) {\n\t\tsuper(message, status, detail, responseBody);\n\t\tthis.name = \"ApiServerError\";\n\t\tObject.setPrototypeOf(this, ApiServerError.prototype);\n\t}\n\t/**\n\t* Check if this is a gateway/proxy error (502, 503, 504)\n\t*/\n\tisGatewayError() {\n\t\treturn this.status === 502 || this.status === 503 || this.status === 504;\n\t}\n\t/**\n\t* Check if this is an internal server error (500)\n\t*/\n\tisInternalError() {\n\t\treturn this.status === 500;\n\t}\n};\n/**\n* Factory function to create the appropriate error type based on HTTP status code.\n* This centralizes the logic for determining which error class to instantiate.\n* This is only used for actual API responses, so status is required.\n*/\nfunction createApiError(message, status, detail, responseBody) {\n\tlet improvedMessage = message;\n\tif (message.includes(\"You do not have the multi project stream feature enabled\") || message.includes(\"You cannot view events from multiple projects\")) {\n\t\timprovedMessage = \"You do not have access to query across multiple projects. Please select a project for your query.\";\n\t\treturn new ApiPermissionError(improvedMessage, detail, responseBody);\n\t}\n\tswitch (status) {\n\t\tcase 401: return new ApiAuthenticationError(message, detail, responseBody);\n\t\tcase 403: return new ApiPermissionError(message, detail, responseBody);\n\t\tcase 404: return new ApiNotFoundError(message, detail, responseBody);\n\t\tcase 400:\n\t\tcase 422: {\n\t\t\tlet validationErrors;\n\t\t\tif (responseBody && typeof responseBody === \"object\" && \"errors\" in responseBody) validationErrors = responseBody.errors;\n\t\t\treturn new ApiValidationError(message, status, detail, responseBody, validationErrors);\n\t\t}\n\t\tcase 429: {\n\t\t\tlet retryAfter;\n\t\t\tif (responseBody && typeof responseBody === \"object\") {\n\t\t\t\tif (\"retry_after\" in responseBody) retryAfter = Number(responseBody.retry_after);\n\t\t\t\telse if (\"retryAfter\" in responseBody) retryAfter = Number(responseBody.retryAfter);\n\t\t\t}\n\t\t\treturn new ApiRateLimitError(message, detail, responseBody, retryAfter);\n\t\t}\n\t\tdefault:\n\t\t\tif (status >= 400 && status < 500) return new ApiClientError(message, status, detail, responseBody);\n\t\t\tif (status >= 500 && status < 600) return new ApiServerError(message, status, detail, responseBody);\n\t\t\treturn new ApiError(message, status, detail, responseBody);\n\t}\n}\n/**\n* Returns true if `error` is an `ApiAuthenticationError`, either directly or\n* anywhere within the first few levels of `error.cause`. Tools that wrap\n* upstream errors as `throw new Error(msg, { cause: apiError })` would\n* otherwise hide the 401 signal from a direct `instanceof` check. Bounded\n* depth guards against accidental cycles.\n*/\nfunction isApiAuthenticationErrorDeep(error) {\n\tlet current = error;\n\tfor (let i = 0; i < 3; i++) {\n\t\tif (current instanceof ApiAuthenticationError) return true;\n\t\tif (!(current instanceof Error)) return false;\n\t\tcurrent = current.cause;\n\t}\n\treturn false;\n}\n\n//#endregion\nexport { ApiAuthenticationError, ApiClientError, ApiError, ApiNotFoundError, ApiPermissionError, ApiRateLimitError, ApiServerError, ApiValidationError, createApiError, isApiAuthenticationErrorDeep };\n//# sourceMappingURL=errors-DG2FreDU.js.map","import { z } from \"zod\";\n\n//#region src/api-client/schema.ts\n/**\n* Schema for Sentry API error responses.\n*\n* Uses .passthrough() to allow additional fields that may be present\n* in different error scenarios.\n*/\nconst ApiErrorSchema = z.object({ detail: z.string() }).passthrough();\nconst UserSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tname: z.string().nullable(),\n\temail: z.string()\n}).passthrough();\n/**\n* Schema for Sentry organization API responses.\n*\n* Handles organizations from both Sentry's Cloud Service and self-hosted installations.\n* The links object and regionUrl field are optional to support self-hosted Sentry\n* instances that may not include these fields or return empty values.\n*/\nconst OrganizationSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tslug: z.string(),\n\tname: z.string(),\n\tlinks: z.object({\n\t\tregionUrl: z.string().refine((value) => !value || z.string().url().safeParse(value).success, { message: \"Must be a valid URL or empty string (for self-hosted Sentry)\" }).optional(),\n\t\torganizationUrl: z.string().url()\n\t}).optional()\n}).passthrough();\nconst OrganizationListSchema = z.array(OrganizationSchema);\nconst TeamSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tslug: z.string(),\n\tname: z.string()\n}).passthrough();\nconst TeamListSchema = z.array(TeamSchema);\nconst ProjectSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tslug: z.string(),\n\tname: z.string(),\n\tplatform: z.string().nullable().optional(),\n\thasProfiles: z.boolean().optional(),\n\thasReplays: z.boolean().optional(),\n\thasLogs: z.boolean().optional(),\n\tfirstTransactionEvent: z.boolean().optional()\n}).passthrough();\nconst ProjectListSchema = z.array(ProjectSchema);\nconst RepositorySchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tname: z.string(),\n\tprovider: z.object({\n\t\tid: z.string(),\n\t\tname: z.string()\n\t}).passthrough(),\n\tstatus: z.string(),\n\texternalSlug: z.string().optional(),\n\texternalId: z.string().optional(),\n\tintegrationId: z.union([z.string(), z.number()]).nullable().optional()\n}).passthrough();\nconst RepositoryListSchema = z.array(RepositorySchema);\nconst ProjectRepositoryMappingSchema = z.object({\n\tcreated: z.number(),\n\tupdated: z.number(),\n\terrors: z.number(),\n\tmappings: z.array(z.object({\n\t\tstackRoot: z.string(),\n\t\tsourceRoot: z.string(),\n\t\tstatus: z.string(),\n\t\tdetail: z.string().optional()\n\t}).passthrough())\n}).passthrough();\n/**\n* Dashboard schemas validated against getsentry/sentry:\n* - `src/sentry/dashboards/endpoints/organization_dashboards.py`\n* - `src/sentry/dashboards/endpoints/organization_dashboard_details.py`\n* - `src/sentry/api/serializers/models/dashboard.py`\n*/\nconst DashboardPermissionsSchema = z.object({\n\tisEditableByEveryone: z.boolean().optional(),\n\tteamsWithEditAccess: z.array(z.union([z.string(), z.number()])).optional()\n}).passthrough();\nconst DashboardWidgetPreviewSchema = z.object({\n\tdisplayType: z.string(),\n\tlayout: z.record(z.string(), z.unknown()).nullable().optional()\n}).passthrough();\nconst DashboardWidgetQuerySchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tname: z.string(),\n\tfields: z.array(z.string()),\n\taggregates: z.array(z.string()),\n\tcolumns: z.array(z.string()),\n\tfieldAliases: z.array(z.string()),\n\tconditions: z.string(),\n\torderby: z.string(),\n\twidgetId: z.union([z.string(), z.number()]),\n\tisHidden: z.boolean().optional(),\n\tselectedAggregate: z.number().nullable().optional(),\n\tlinkedDashboards: z.array(z.object({\n\t\tfield: z.string(),\n\t\tdashboardId: z.union([z.string(), z.number()])\n\t}).passthrough()).optional()\n}).passthrough();\nconst DashboardWidgetSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\ttitle: z.string(),\n\tdescription: z.string().nullable().optional(),\n\tdisplayType: z.string(),\n\tinterval: z.string().nullable().optional(),\n\tdateCreated: z.string(),\n\tdashboardId: z.union([z.string(), z.number()]),\n\tqueries: z.array(DashboardWidgetQuerySchema).default([]),\n\tlimit: z.number().nullable().optional(),\n\twidgetType: z.string().nullable().optional(),\n\tlayout: z.record(z.string(), z.unknown()).nullable().optional(),\n\tdatasetSource: z.string().optional()\n}).passthrough();\nconst DashboardFiltersSchema = z.record(z.string(), z.unknown());\nconst DashboardListItemSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\ttitle: z.string(),\n\tdateCreated: z.string(),\n\tcreatedBy: z.unknown().nullable().optional(),\n\tenvironment: z.array(z.string()).default([]),\n\tfilters: DashboardFiltersSchema.default({}),\n\tlastVisited: z.string().nullable().optional(),\n\twidgetDisplay: z.array(z.string()).default([]),\n\twidgetPreview: z.array(DashboardWidgetPreviewSchema).default([]),\n\tpermissions: DashboardPermissionsSchema.nullable().optional(),\n\tisFavorited: z.boolean().optional(),\n\tprojects: z.array(z.number()).default([]),\n\tprebuiltId: z.union([z.string(), z.number()]).nullable().optional()\n}).passthrough();\nconst DashboardListSchema = z.array(DashboardListItemSchema);\nconst DashboardSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\ttitle: z.string(),\n\tdateCreated: z.string(),\n\tcreatedBy: z.unknown().nullable().optional(),\n\twidgets: z.array(DashboardWidgetSchema),\n\tprojects: z.array(z.number()).default([]),\n\tenvironment: z.array(z.string()).default([]),\n\tfilters: DashboardFiltersSchema.default({}),\n\tpermissions: DashboardPermissionsSchema.nullable().optional(),\n\tisFavorited: z.boolean().optional(),\n\tprebuiltId: z.union([z.string(), z.number()]).nullable().optional(),\n\tperiod: z.string().nullable().optional(),\n\tstart: z.string().nullable().optional(),\n\tend: z.string().nullable().optional(),\n\tutc: z.union([z.string(), z.boolean()]).nullable().optional(),\n\texpired: z.boolean().optional()\n}).passthrough();\nconst AlertRuleComponentSchema = z.record(z.string(), z.unknown());\nconst IssueAlertRuleSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tname: z.string(),\n\tstatus: z.string().optional(),\n\tenabled: z.boolean().optional(),\n\tactionMatch: z.string().nullable().optional(),\n\tfilterMatch: z.string().nullable().optional(),\n\tconditions: z.array(AlertRuleComponentSchema).optional().default([]),\n\tfilters: z.array(AlertRuleComponentSchema).optional().default([]),\n\tactions: z.array(AlertRuleComponentSchema).optional().default([]),\n\ttriggers: AlertRuleComponentSchema.nullable().optional(),\n\tactionFilters: z.array(AlertRuleComponentSchema).nullable().optional().default([]),\n\tdetectorIds: z.array(z.union([z.string(), z.number()])).nullable().optional().default([]),\n\tconfig: z.record(z.string(), z.unknown()).optional().default({}),\n\tfrequency: z.number().nullable().optional(),\n\tenvironment: z.string().nullable().optional(),\n\towner: z.unknown().optional(),\n\tdateCreated: z.string().optional(),\n\tdateUpdated: z.string().optional(),\n\tlastTriggered: z.string().nullable().optional()\n}).passthrough();\nconst IssueAlertRuleListSchema = z.array(IssueAlertRuleSchema);\nconst MetricAlertRuleSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tname: z.string(),\n\tstatus: z.union([z.string(), z.number()]).optional(),\n\tquery: z.string().nullable().optional(),\n\taggregate: z.string().nullable().optional(),\n\tdataset: z.string().nullable().optional(),\n\ttimeWindow: z.number().nullable().optional(),\n\tenvironment: z.string().nullable().optional(),\n\towner: z.unknown().optional(),\n\tprojects: z.array(z.string()).optional().default([]),\n\ttriggers: z.array(AlertRuleComponentSchema).optional().default([]),\n\tdateCreated: z.string().optional()\n}).passthrough();\nconst MetricAlertRuleListSchema = z.array(MetricAlertRuleSchema);\nconst ReplayTagsSchema = z.preprocess((value) => {\n\tif (value === void 0 || value === null || Array.isArray(value)) return {};\n\treturn value;\n}, z.record(z.string(), z.array(z.string())));\n/**\n* Replay responses are normalized in getsentry/sentry before they hit this API.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/replays/post_process.py` (`ReplayDetailsResponse`)\n* - `src/sentry/replays/endpoints/organization_replay_index.py`\n* - `src/sentry/replays/endpoints/organization_replay_details.py`\n*/\nconst ReplayDetailsSchema = z.object({\n\tactivity: z.number().nullable().optional(),\n\tbrowser: z.object({\n\t\tname: z.string().nullable().optional(),\n\t\tversion: z.string().nullable().optional()\n\t}).nullish().default({}),\n\tcount_dead_clicks: z.number().nullable().optional(),\n\tcount_errors: z.number().nullable().optional(),\n\tcount_infos: z.number().nullable().optional(),\n\tcount_rage_clicks: z.number().nullable().optional(),\n\tcount_segments: z.number().nullable().optional(),\n\tcount_urls: z.number().nullable().optional(),\n\tcount_warnings: z.number().nullable().optional(),\n\tdevice: z.object({\n\t\tbrand: z.string().nullable().optional(),\n\t\tfamily: z.string().nullable().optional(),\n\t\tmodel: z.string().nullable().optional(),\n\t\tmodel_id: z.string().nullable().optional(),\n\t\tname: z.string().nullable().optional()\n\t}).nullish().default({}),\n\tdist: z.string().nullable().optional(),\n\tduration: z.number().nullable().optional(),\n\tenvironment: z.string().nullable().optional(),\n\terror_ids: z.array(z.string()).optional().default([]),\n\tfinished_at: z.string().nullable().optional(),\n\thas_viewed: z.boolean().nullable().optional(),\n\tid: z.string(),\n\tinfo_ids: z.array(z.string()).optional().default([]),\n\tis_archived: z.boolean().nullable().optional(),\n\tos: z.object({\n\t\tname: z.string().nullable().optional(),\n\t\tversion: z.string().nullable().optional()\n\t}).nullish().default({}),\n\tplatform: z.string().nullable().optional(),\n\tproject_id: z.union([z.string(), z.number()]).nullable().optional(),\n\treleases: z.array(z.string()).nullable().optional(),\n\treplay_type: z.string().nullable().optional(),\n\tsdk: z.object({\n\t\tname: z.string().nullable().optional(),\n\t\tversion: z.string().nullable().optional()\n\t}).nullish().default({}),\n\tstarted_at: z.string().nullable().optional(),\n\ttags: ReplayTagsSchema,\n\ttrace_ids: z.array(z.string()).optional().default([]),\n\turls: z.preprocess((value) => value ?? [], z.array(z.string())),\n\tuser: z.object({\n\t\tdisplay_name: z.string().nullable().optional(),\n\t\temail: z.string().nullable().optional(),\n\t\tid: z.string().nullable().optional(),\n\t\tip: z.string().nullable().optional(),\n\t\tusername: z.string().nullable().optional(),\n\t\tgeo: z.record(z.string(), z.union([z.string(), z.null()])).optional()\n\t}).nullish().default({}),\n\twarning_ids: z.array(z.string()).optional().default([])\n}).passthrough();\nconst ReplayRecordingPayloadSchema = z.object({\n\top: z.string().optional().catch(void 0),\n\tdescription: z.string().optional().catch(void 0),\n\tmessage: z.string().optional().catch(void 0),\n\tcategory: z.string().optional().catch(void 0),\n\ttype: z.string().optional().catch(void 0),\n\tdata: z.object({ duration: z.number().optional().catch(void 0) }).passthrough().optional().catch(void 0)\n}).passthrough();\nconst ReplayRecordingEventSchema = z.object({\n\ttimestamp: z.number().optional().catch(void 0),\n\ttype: z.number().optional().catch(void 0),\n\tdata: z.object({\n\t\ttag: z.string().optional().catch(void 0),\n\t\thref: z.string().optional().catch(void 0),\n\t\tpayload: ReplayRecordingPayloadSchema.optional().catch(void 0)\n\t}).passthrough().optional().catch(void 0)\n}).passthrough();\nconst ReplayRecordingSegmentsSchema = z.array(z.array(z.unknown()).transform((events) => events.flatMap((event) => {\n\tconst result = ReplayRecordingEventSchema.safeParse(event);\n\treturn result.success ? [result.data] : [];\n})));\nconst ReplayListResponseSchema = z.object({ data: z.array(ReplayDetailsSchema) });\nconst ReplayIdsByResourceSchema = z.record(z.string(), z.array(z.string()));\nconst ClientKeySchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tname: z.string(),\n\tdsn: z.object({ public: z.string() }).passthrough(),\n\tisActive: z.boolean(),\n\tdateCreated: z.string().datetime().nullable(),\n\trateLimit: z.object({\n\t\twindow: z.number(),\n\t\tcount: z.number()\n\t}).nullable().optional(),\n\tbrowserSdkVersion: z.string().optional(),\n\tdynamicSdkLoaderOptions: z.object({\n\t\thasReplay: z.boolean(),\n\t\thasPerformance: z.boolean(),\n\t\thasDebug: z.boolean(),\n\t\thasFeedback: z.boolean().optional(),\n\t\thasLogsAndMetrics: z.boolean().optional()\n\t}).optional()\n}).passthrough();\nconst ClientKeyListSchema = z.array(ClientKeySchema);\nconst ReleaseProjectSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tslug: z.string().nullable(),\n\tname: z.string(),\n\tplatform: z.string().nullable().optional()\n}).passthrough();\nconst ReleaseCommitAuthorSchema = z.object({\n\tname: z.string().nullable().optional(),\n\temail: z.string().nullable().optional()\n}).passthrough();\n/**\n* Local subset of both organization-wide and project-scoped release payloads.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/api/endpoints/organization_releases.py`\n* - `src/sentry/releases/endpoints/project_releases.py`\n* - `src/sentry/api/serializers/models/release.py`\n* - `src/sentry/api/serializers/rest_framework/release.py`\n*/\nconst ReleaseSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tversion: z.string(),\n\tshortVersion: z.string(),\n\tdateCreated: z.string().datetime(),\n\tdateReleased: z.string().datetime().nullable(),\n\tfirstEvent: z.string().datetime().nullable(),\n\tlastEvent: z.string().datetime().nullable(),\n\tnewGroups: z.number(),\n\tlastCommit: z.object({\n\t\tid: z.union([z.string(), z.number()]),\n\t\tmessage: z.string().nullable(),\n\t\tdateCreated: z.string().datetime(),\n\t\tauthor: ReleaseCommitAuthorSchema.optional()\n\t}).passthrough().nullable(),\n\tlastDeploy: z.object({\n\t\tid: z.union([z.string(), z.number()]),\n\t\tenvironment: z.string().nullable(),\n\t\tdateStarted: z.string().datetime().nullable(),\n\t\tdateFinished: z.string().datetime().nullable()\n\t}).passthrough().nullable(),\n\tprojects: z.array(ReleaseProjectSchema)\n});\nconst ReleaseListSchema = z.array(ReleaseSchema);\nconst ApiResourceIdSchema = z.union([z.string(), z.number()]);\nconst ApiActorSchema = z.object({\n\tid: ApiResourceIdSchema.optional(),\n\tname: z.string().nullable().optional(),\n\temail: z.string().nullable().optional(),\n\tusername: z.string().nullable().optional(),\n\ttype: z.string().nullable().optional()\n}).passthrough();\nconst ApiProjectRefSchema = z.object({\n\tid: ApiResourceIdSchema.optional(),\n\tslug: z.string().nullable().optional(),\n\tname: z.string().nullable().optional()\n}).passthrough();\nconst MonitorEnvironmentSchema = z.object({\n\tid: ApiResourceIdSchema.optional(),\n\tname: z.string().nullable().optional(),\n\tstatus: z.string().nullable().optional(),\n\tdateCreated: z.string().datetime().nullable().optional(),\n\tlastCheckIn: z.string().datetime().nullable().optional(),\n\tnextCheckIn: z.string().datetime().nullable().optional(),\n\tnextCheckInLatest: z.string().datetime().nullable().optional(),\n\tisMuted: z.boolean().nullable().optional(),\n\tactiveIncident: z.record(z.string(), z.unknown()).nullable().optional()\n}).passthrough();\nconst MonitorSchema = z.object({\n\tid: ApiResourceIdSchema.optional(),\n\tslug: z.string(),\n\tname: z.string().nullable().optional(),\n\tstatus: z.string().nullable().optional(),\n\ttype: z.string().nullable().optional(),\n\tisMuted: z.boolean().nullable().optional(),\n\tisUpserting: z.boolean().nullable().optional(),\n\tproject: ApiProjectRefSchema.nullable().optional(),\n\towner: z.union([z.string(), ApiActorSchema]).nullable().optional(),\n\tdateCreated: z.string().datetime().nullable().optional(),\n\tnextCheckIn: z.string().datetime().nullable().optional(),\n\tlastCheckIn: z.string().datetime().nullable().optional(),\n\tconfig: z.record(z.string(), z.unknown()).nullable().optional(),\n\tenvironments: z.array(MonitorEnvironmentSchema).optional(),\n\talertRule: z.record(z.string(), z.unknown()).optional()\n}).passthrough();\nconst MonitorListSchema = z.array(MonitorSchema);\nconst MonitorCheckInSchema = z.object({\n\tid: ApiResourceIdSchema.optional(),\n\tcheckInId: z.string().nullable().optional(),\n\tstatus: z.string().nullable().optional(),\n\tduration: z.number().nullable().optional(),\n\tdateCreated: z.string().datetime().nullable().optional(),\n\tdateAdded: z.string().datetime().nullable().optional(),\n\tdateUpdated: z.string().datetime().nullable().optional(),\n\tdateInProgress: z.string().datetime().nullable().optional(),\n\tdateClock: z.string().datetime().nullable().optional(),\n\texpectedTime: z.string().datetime().nullable().optional(),\n\tenvironment: z.string().nullable().optional(),\n\tmonitorConfig: z.record(z.string(), z.unknown()).optional(),\n\tgroups: z.array(z.union([z.string(), z.record(z.string(), z.unknown())])).optional()\n}).passthrough();\nconst MonitorCheckInListSchema = z.array(MonitorCheckInSchema);\nconst MonitorStatSchema = z.object({ ts: z.number() }).passthrough();\nconst MonitorStatsSchema = z.array(MonitorStatSchema);\n/**\n* Uptime monitor (detector) schemas.\n*\n* Verified against getsentry/sentry:\n* - src/sentry/uptime/endpoints/serializers.py (UptimeDetectorSerializer)\n* - src/sentry/uptime/endpoints/validators.py (UptimeMonitorValidator)\n* - src/sentry/uptime/models.py (IntervalSeconds, SupportedHTTPMethods)\n* Response fields are camelCase from CamelSnakeSerializer.\n*/\nconst UptimeMonitorSchema = z.object({\n\tid: ApiResourceIdSchema,\n\tprojectSlug: z.string(),\n\tenvironment: z.string().nullable().optional(),\n\tname: z.string(),\n\tstatus: z.string(),\n\tuptimeStatus: z.union([z.number(), z.string()]).optional(),\n\tmode: z.number().optional(),\n\towner: ApiActorSchema.nullable().optional(),\n\trecoveryThreshold: z.number().optional(),\n\tdowntimeThreshold: z.number().optional(),\n\turl: z.string(),\n\tmethod: z.string().optional(),\n\tbody: z.string().nullable().optional(),\n\theaders: z.array(z.tuple([z.string(), z.string()])).or(z.array(z.array(z.string()))).optional(),\n\tintervalSeconds: z.number(),\n\ttimeoutMs: z.number(),\n\ttraceSampling: z.boolean().optional(),\n\tresponseCaptureEnabled: z.boolean().optional(),\n\tassertion: z.unknown().nullable().optional()\n}).passthrough();\nconst UptimeMonitorListSchema = z.array(UptimeMonitorSchema);\nconst UptimeCheckSchema = z.object({\n\tuptimeCheckId: z.string().optional(),\n\ttimestamp: z.string().optional(),\n\tscheduledCheckTime: z.string().optional(),\n\tcheckStatus: z.string().optional(),\n\tcheckStatusReason: z.string().nullable().optional(),\n\tassertionFailureData: z.unknown().nullable().optional(),\n\thttpStatusCode: z.number().nullable().optional(),\n\tdurationMs: z.number().optional(),\n\ttraceId: z.string().optional(),\n\ttraceItemId: z.string().optional(),\n\tincidentStatus: z.number().optional(),\n\tenvironment: z.string().optional(),\n\tregion: z.string().optional(),\n\tregionName: z.string().optional()\n}).passthrough();\nconst UptimeCheckListSchema = z.array(UptimeCheckSchema);\nconst ReleaseDetailsSchema = ReleaseSchema.extend({\n\tadoptionStages: z.unknown().optional(),\n\tauthors: z.array(ApiActorSchema).optional(),\n\tcommitCount: z.number().optional(),\n\tcurrentProjectMeta: z.record(z.string(), z.unknown()).optional(),\n\tdeployCount: z.number().optional(),\n\tlastDeploy: ReleaseSchema.shape.lastDeploy.optional(),\n\tnewGroups: z.number().optional(),\n\towner: ApiActorSchema.nullable().optional(),\n\tprojects: z.array(ReleaseProjectSchema).optional(),\n\trefs: z.array(z.record(z.string(), z.unknown())).optional()\n}).partial().extend({\n\tid: ApiResourceIdSchema,\n\tversion: z.string()\n}).passthrough();\nconst DeploySchema = z.object({\n\tid: ApiResourceIdSchema,\n\tenvironment: z.string().nullable().optional(),\n\tname: z.string().nullable().optional(),\n\turl: z.string().nullable().optional(),\n\tdateStarted: z.string().datetime().nullable().optional(),\n\tdateFinished: z.string().datetime().nullable().optional()\n}).passthrough();\nconst DeployListSchema = z.array(DeploySchema);\nconst CommitSchema = z.object({\n\tid: ApiResourceIdSchema,\n\tmessage: z.string().nullable().optional(),\n\tdateCreated: z.string().datetime().nullable().optional(),\n\tpullRequest: z.record(z.string(), z.unknown()).nullable().optional(),\n\tsuspectCommitType: z.string().optional(),\n\tauthor: ApiActorSchema.nullable().optional(),\n\trepository: z.object({ name: z.string().nullable().optional() }).passthrough().nullable().optional()\n}).passthrough();\nconst CommitListSchema = z.array(CommitSchema);\nconst IssueActivitySchema = z.object({\n\tid: ApiResourceIdSchema,\n\ttype: z.string().nullable().optional(),\n\tdateCreated: z.string().datetime().nullable().optional(),\n\tuser: ApiActorSchema.nullable().optional(),\n\tsentry_app: z.record(z.string(), z.unknown()).nullable().optional(),\n\tdata: z.record(z.string(), z.unknown()).nullable().optional()\n}).passthrough();\nconst IssueActivityListResponseSchema = z.object({ activity: z.array(IssueActivitySchema) });\nconst IssueCommentSchema = IssueActivitySchema.extend({ type: z.string().nullable().optional() });\nconst IssueCommentListSchema = z.array(IssueCommentSchema);\n/**\n* Organization tag lists are backed by `TagKeySerializerResponse`, which only\n* guarantees `key` and `name`. Count fields are backend-dependent and may come\n* back as `uniqueValues`, `totalValues`, or neither.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/tagstore/types.py` (`TagKeySerializerResponse`)\n* - `src/sentry/api/endpoints/organization_tags.py`\n*/\nconst TagSchema = z.object({\n\tkey: z.string(),\n\tname: z.string(),\n\ttotalValues: z.number().nullable().optional(),\n\tuniqueValues: z.number().nullable().optional()\n}).transform((tag) => ({\n\tkey: tag.key,\n\tname: tag.name,\n\ttotalValues: tag.totalValues ?? tag.uniqueValues ?? 0\n}));\nconst TagListSchema = z.array(TagSchema);\nconst AssignedToSchema = z.union([\n\tz.null(),\n\tz.string(),\n\tz.object({\n\t\ttype: z.enum([\"user\", \"team\"]),\n\t\tid: z.union([z.string(), z.number()]),\n\t\tname: z.string(),\n\t\temail: z.string().optional()\n\t}).passthrough()\n]);\n/**\n* Local subset shared by issue list and issue details payloads.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/api/serializers/models/group.py` (`BaseGroupSerializerResponse`)\n* - `src/sentry/api/serializers/models/group_stream.py` (`StreamGroupSerializerResponse`)\n* - `src/sentry/issues/endpoints/group_details.py`\n*\n* In particular, `culprit` is nullable upstream.\n*/\nconst IssueSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tshortId: z.string().nullable(),\n\ttitle: z.string(),\n\tfirstSeen: z.string().datetime().nullable(),\n\tlastSeen: z.string().datetime().nullable(),\n\tcount: z.union([z.string(), z.number()]),\n\tuserCount: z.union([z.string(), z.number()]),\n\tpermalink: z.string().url(),\n\tproject: ProjectSchema,\n\tplatform: z.string().nullable().optional(),\n\tstatus: z.string(),\n\tsubstatus: z.string().nullable().optional(),\n\tculprit: z.string().nullable(),\n\ttype: z.union([\n\t\tz.literal(\"error\"),\n\t\tz.literal(\"transaction\"),\n\t\tz.literal(\"generic\"),\n\t\tz.unknown()\n\t]).optional(),\n\tassignedTo: AssignedToSchema.optional(),\n\tissueType: z.string().optional(),\n\tissueCategory: z.string().optional(),\n\tmetadata: z.object({\n\t\ttitle: z.string().nullable().optional(),\n\t\tlocation: z.string().nullable().optional(),\n\t\tvalue: z.string().nullable().optional()\n\t}).optional(),\n\tseerFixabilityScore: z.number().nullable().optional()\n}).passthrough().transform((issue) => Object.assign(issue, { shortId: issue.shortId ?? String(issue.id) }));\nconst IssueListSchema = z.array(IssueSchema);\nconst FrameInterface = z.object({\n\tfilename: z.string().nullable(),\n\tfunction: z.string().nullable(),\n\tlineNo: z.number().nullable(),\n\tcolNo: z.number().nullable(),\n\tabsPath: z.string().nullable(),\n\tmodule: z.string().nullable(),\n\tpackage: z.string().nullable(),\n\tplatform: z.string().nullable(),\n\tsourceLink: z.string().nullable(),\n\tcontext: z.array(z.tuple([z.number(), z.string()])),\n\tinApp: z.boolean().optional(),\n\tvars: z.record(z.string(), z.unknown()).nullable().optional()\n}).partial();\nconst ExceptionInterface = z.object({\n\tmechanism: z.object({\n\t\ttype: z.string().nullable(),\n\t\thandled: z.boolean().nullable()\n\t}).partial().nullable(),\n\ttype: z.string().nullable(),\n\tvalue: z.string().nullable(),\n\tstacktrace: z.object({ frames: z.array(FrameInterface) }).nullable()\n}).partial();\nconst ErrorEntrySchema = z.object({\n\tvalues: z.array(ExceptionInterface.optional()),\n\tvalue: ExceptionInterface.nullable().optional()\n}).partial();\nconst RequestEntrySchema = z.object({\n\tmethod: z.string().nullable(),\n\turl: z.string().url().nullable()\n}).partial();\nconst MessageEntrySchema = z.object({\n\tformatted: z.string().nullable(),\n\tmessage: z.string().nullable(),\n\tparams: z.array(z.unknown()).optional()\n}).partial();\nconst StacktraceSchema = z.object({\n\tframes: z.array(FrameInterface),\n\tframesOmitted: z.array(z.unknown()).nullable().optional(),\n\tregisters: z.record(z.string(), z.unknown()).nullable().optional(),\n\thasSystemFrames: z.boolean().nullable().optional()\n}).partial().extend({ frames: z.array(FrameInterface) });\nconst ThreadEntrySchema = z.object({\n\tid: z.union([z.number(), z.string()]).nullable(),\n\tname: z.string().nullable(),\n\tcurrent: z.boolean().nullable(),\n\tcrashed: z.boolean().nullable(),\n\tstate: z.string().nullable(),\n\theldLocks: z.record(z.string(), z.unknown()).nullable().optional(),\n\tstacktrace: StacktraceSchema.nullable(),\n\trawStacktrace: StacktraceSchema.nullable().optional()\n}).partial();\nconst ThreadsEntrySchema = z.object({ values: z.array(ThreadEntrySchema) }).partial();\nconst BreadcrumbSchema = z.object({\n\ttimestamp: z.string().nullable(),\n\ttype: z.string().nullable(),\n\tcategory: z.string().nullable(),\n\tlevel: z.string().nullable(),\n\tmessage: z.string().nullable(),\n\tdata: z.record(z.string(), z.unknown()).nullable()\n}).partial();\nconst BreadcrumbsEntrySchema = z.object({ values: z.array(BreadcrumbSchema) }).partial();\nconst EventTagSchema = z.object({\n\tkey: z.string(),\n\tvalue: z.string().nullable()\n});\nconst EventTagsSchema = z.preprocess((value) => {\n\tif (!Array.isArray(value)) return value;\n\treturn value.filter((tag) => {\n\t\tif (typeof tag !== \"object\" || tag === null) return false;\n\t\tconst maybeTag = tag;\n\t\tconst hasValidKey = typeof maybeTag.key === \"string\";\n\t\tconst hasValidValue = typeof maybeTag.value === \"string\" || maybeTag.value === null;\n\t\treturn hasValidKey && hasValidValue;\n\t});\n}, z.array(EventTagSchema));\nconst BaseEventSchema = z.object({\n\tid: z.string(),\n\tgroupID: z.string().nullable().optional(),\n\ttitle: z.string(),\n\tmessage: z.string().nullable(),\n\tplatform: z.string().nullable().optional(),\n\ttype: z.unknown(),\n\tentries: z.array(z.union([\n\t\tz.object({\n\t\t\ttype: z.literal(\"exception\"),\n\t\t\tdata: ErrorEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"message\"),\n\t\t\tdata: MessageEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"threads\"),\n\t\t\tdata: ThreadsEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"request\"),\n\t\t\tdata: RequestEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"breadcrumbs\"),\n\t\t\tdata: BreadcrumbsEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"spans\"),\n\t\t\tdata: z.unknown()\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.string(),\n\t\t\tdata: z.unknown()\n\t\t})\n\t])),\n\tcontexts: z.record(z.string(), z.object({ type: z.union([\n\t\tz.literal(\"default\"),\n\t\tz.literal(\"runtime\"),\n\t\tz.literal(\"os\"),\n\t\tz.literal(\"trace\"),\n\t\tz.unknown()\n\t]).optional() }).passthrough()).optional(),\n\tcontext: z.record(z.string(), z.unknown()).optional(),\n\tsdk: z.object({ name: z.string().nullable().optional() }).passthrough().nullable().optional(),\n\trelease: z.object({ lastCommit: z.object({ id: z.string() }).passthrough().nullable().optional() }).passthrough().nullable().optional(),\n\ttags: EventTagsSchema.optional(),\n\tuser: z.object({\n\t\tdisplay_name: z.string().nullable().optional(),\n\t\temail: z.string().nullable().optional(),\n\t\tid: z.string().nullable().optional(),\n\t\tip: z.string().nullable().optional(),\n\t\tip_address: z.string().nullable().optional(),\n\t\tname: z.string().nullable().optional(),\n\t\tusername: z.string().nullable().optional(),\n\t\tgeo: z.record(z.string(), z.union([z.string(), z.null()])).nullable().optional()\n\t}).passthrough().nullable().optional(),\n\t_meta: z.unknown().optional(),\n\tdateReceived: z.string().datetime().nullish()\n});\nconst ErrorEventSchema = BaseEventSchema.omit({ type: true }).extend({\n\ttype: z.literal(\"error\"),\n\tculprit: z.string().nullable(),\n\tdateCreated: z.string().datetime()\n});\nconst DefaultEventSchema = BaseEventSchema.omit({ type: true }).extend({\n\ttype: z.literal(\"default\"),\n\tculprit: z.string().nullable().optional(),\n\tdateCreated: z.string().datetime()\n});\nconst TransactionEventSchema = BaseEventSchema.omit({ type: true }).extend({\n\ttype: z.literal(\"transaction\"),\n\toccurrence: z.object({\n\t\tid: z.string().optional(),\n\t\tprojectId: z.number().optional(),\n\t\teventId: z.string().optional(),\n\t\tfingerprint: z.array(z.string()).optional(),\n\t\tissueTitle: z.string(),\n\t\tsubtitle: z.string().optional(),\n\t\tresourceId: z.string().nullable().optional(),\n\t\tevidenceData: z.record(z.string(), z.any()).optional(),\n\t\tevidenceDisplay: z.array(z.object({\n\t\t\tname: z.string(),\n\t\t\tvalue: z.string(),\n\t\t\timportant: z.boolean().optional()\n\t\t})).optional(),\n\t\ttype: z.number().optional(),\n\t\tdetectionTime: z.number().optional(),\n\t\tlevel: z.string().optional(),\n\t\tculprit: z.string().nullable(),\n\t\tpriority: z.number().optional(),\n\t\tassignee: z.string().nullable().optional()\n\t}).nullish()\n});\n/**\n* Schema for evidence display items in occurrence data.\n* These show regression details, metric changes, and other evidence.\n*/\nconst EvidenceDisplaySchema = z.object({\n\tname: z.string(),\n\tvalue: z.string(),\n\timportant: z.boolean()\n});\n/**\n* Schema for occurrence data in generic events.\n* Occurrences represent performance regressions and metric-based issues.\n*/\nconst OccurrenceSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.number(),\n\teventId: z.string(),\n\tfingerprint: z.array(z.string()),\n\tissueTitle: z.string(),\n\tsubtitle: z.string().optional(),\n\tresourceId: z.string().nullable().optional(),\n\tevidenceData: z.record(z.string(), z.unknown()).optional(),\n\tevidenceDisplay: z.array(EvidenceDisplaySchema).optional(),\n\ttype: z.number(),\n\tdetectionTime: z.number().optional(),\n\tlevel: z.string().optional(),\n\tculprit: z.string().optional(),\n\tpriority: z.number().optional(),\n\tassignee: z.string().nullable().optional()\n}).passthrough();\nconst GenericEventSchema = BaseEventSchema.omit({ type: true }).extend({\n\ttype: z.literal(\"generic\"),\n\tculprit: z.string().nullable().optional(),\n\tdateCreated: z.string().datetime(),\n\toccurrence: OccurrenceSchema.nullish()\n});\nconst UnknownEventSchema = BaseEventSchema.omit({ type: true }).extend({ type: z.unknown() });\nconst EventSchema = z.union([\n\tErrorEventSchema,\n\tDefaultEventSchema,\n\tTransactionEventSchema,\n\tGenericEventSchema,\n\tUnknownEventSchema\n]);\nconst StacktraceLinkSchema = z.object({\n\tconfig: z.object({ repoName: z.string() }).passthrough().nullable().optional(),\n\tsourcePath: z.string().nullable().optional(),\n\tsourceUrl: z.string().nullable().optional()\n}).passthrough();\nconst EventsResponseSchema = z.object({\n\tdata: z.array(z.unknown()),\n\tmeta: z.object({ fields: z.record(z.string(), z.string()) }).passthrough()\n});\nconst ErrorsSearchResponseSchema = EventsResponseSchema.extend({ data: z.array(z.object({\n\tissue: z.string(),\n\t\"issue.id\": z.union([z.string(), z.number()]),\n\tproject: z.string(),\n\ttitle: z.string(),\n\t\"count()\": z.number(),\n\t\"last_seen()\": z.string()\n})) });\nconst SpansSearchResponseSchema = EventsResponseSchema.extend({ data: z.array(z.object({\n\tid: z.string(),\n\ttrace: z.string(),\n\t\"span.op\": z.string(),\n\t\"span.description\": z.string(),\n\t\"span.duration\": z.number(),\n\ttransaction: z.string(),\n\tproject: z.string(),\n\ttimestamp: z.string()\n})) });\n/**\n* The Seer autofix POST endpoint currently returns a simple numeric `run_id`.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/seer/endpoints/group_ai_autofix.py`\n* - `src/sentry/seer/autofix/types.py` (`AutofixPostResponse`)\n*/\nconst AutofixRunSchema = z.object({ run_id: z.number() }).passthrough();\nconst AutofixStatusSchema = z.enum([\n\t\"processing\",\n\t\"completed\",\n\t\"error\",\n\t\"awaiting_user_input\"\n]);\nconst AutofixArtifactSchema = z.object({\n\tkey: z.string(),\n\tdata: z.record(z.string(), z.unknown()).nullable().default(null)\n}).passthrough();\nconst AutofixTodoSchema = z.object({\n\tcontent: z.string(),\n\tstatus: z.string()\n}).passthrough();\nconst AutofixBlockSchema = z.object({\n\tartifacts: z.array(AutofixArtifactSchema).default([]),\n\ttodos: z.array(AutofixTodoSchema).nullable().optional()\n}).passthrough();\n/**\n* The Seer autofix GET endpoint is explicitly experimental. It returns the\n* agent-based run state (`blocks`, `pending_user_input`, coding-agent\n* metadata).\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/seer/endpoints/group_ai_autofix.py`\n* - `src/sentry/seer/agent/client_models.py` (`SeerRunState`)\n*/\nconst AutofixRunStateSchema = z.object({ autofix: z.object({\n\trun_id: z.number(),\n\tupdated_at: z.string().nullable().optional(),\n\tstatus: AutofixStatusSchema,\n\tblocks: z.array(AutofixBlockSchema).default([]),\n\tpending_user_input: z.unknown().nullable().optional(),\n\trepo_pr_states: z.record(z.string(), z.object({ pr_url: z.string().nullable().optional() }).passthrough()).optional(),\n\tcoding_agents: z.record(z.string(), z.unknown()).optional()\n}).passthrough().nullable() });\nconst EventAttachmentSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\ttype: z.string(),\n\tsize: z.number(),\n\tmimetype: z.string(),\n\tdateCreated: z.string().datetime(),\n\theaders: z.record(z.string(), z.string()).optional()\n});\nconst EventAttachmentListSchema = z.array(EventAttachmentSchema);\n/**\n* Schema for individual tag values within an issue's tag distribution.\n*\n* Represents a single value's occurrence count and percentage within a tag.\n*/\nconst IssueTagValueSchema = z.object({\n\tkey: z.string().nullable().optional(),\n\tname: z.string().nullable().optional(),\n\tvalue: z.string().nullable(),\n\tcount: z.number().nullable().transform((value) => value ?? 0),\n\tlastSeen: z.string().datetime().nullable().optional(),\n\tfirstSeen: z.string().datetime().nullable().optional()\n});\n/**\n* Schema for Sentry issue tag values response.\n*\n* Contains aggregate counts of unique tag values for an issue,\n* useful for understanding the distribution of tags like URL, browser, etc.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/tagstore/types.py` (`TagKeySerializerResponse`,\n*   `TagValueSerializerResponse`)\n* - `src/sentry/issues/endpoints/group_tagkey_details.py`\n*/\nconst IssueTagValuesSchema = z.object({\n\tkey: z.string(),\n\tname: z.string(),\n\ttotalValues: z.number().nullable().optional(),\n\tuniqueValues: z.number().nullable().optional(),\n\ttopValues: z.array(IssueTagValueSchema).nullable().optional()\n}).transform((tagValues) => ({\n\tkey: tagValues.key,\n\tname: tagValues.name,\n\ttotalValues: tagValues.totalValues ?? tagValues.uniqueValues ?? 0,\n\ttopValues: tagValues.topValues ?? []\n}));\n/**\n* Schema for external issue link (e.g., Jira, GitHub Issues).\n*\n* Represents a link between a Sentry issue and an external issue tracking\n* system like Jira, GitHub Issues, GitLab, etc.\n*/\nconst ExternalIssueSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tissueId: z.union([z.string(), z.number()]),\n\tserviceType: z.string(),\n\tdisplayName: z.string(),\n\twebUrl: z.string()\n});\nconst UserReportSchema = z.object({\n\tid: z.string(),\n\teventID: z.string(),\n\tname: z.string().nullable(),\n\temail: z.string().nullable(),\n\tcomments: z.string(),\n\tdateCreated: z.string(),\n\tuser: z.object({\n\t\tid: z.string(),\n\t\tusername: z.string().nullable(),\n\t\temail: z.string().nullable(),\n\t\tname: z.string().nullable(),\n\t\tipAddress: z.string().nullable(),\n\t\tavatarUrl: z.string().nullable()\n\t}).nullable(),\n\tevent: z.object({\n\t\tid: z.string(),\n\t\teventID: z.string()\n\t})\n});\nconst UserReportListSchema = z.array(UserReportSchema);\nconst ExternalIssueListSchema = z.array(ExternalIssueSchema);\n/**\n* Schema for Sentry trace metadata response.\n*\n* Contains high-level statistics about a trace including span counts,\n* transaction breakdown, and operation type distribution.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/api/endpoints/organization_trace_meta.py`\n*/\nconst TraceMetaTransactionChildCountSchema = z.object({\n\t\"transaction.event_id\": z.string().nullable(),\n\t\"count()\": z.number()\n});\nconst TraceMetaSchema = z.object({\n\tlogs: z.number().optional(),\n\terrors: z.number().optional(),\n\tperformance_issues: z.number().optional(),\n\tspan_count: z.number().optional(),\n\ttransaction_child_count_map: z.array(TraceMetaTransactionChildCountSchema).optional(),\n\tspan_count_map: z.record(z.string(), z.number()).optional(),\n\tlogsCount: z.number().optional(),\n\terrorsCount: z.number().optional(),\n\tperformanceIssuesCount: z.number().optional(),\n\tspansCount: z.number().optional(),\n\ttransactionChildCountMap: z.array(TraceMetaTransactionChildCountSchema).optional(),\n\tspansCountMap: z.record(z.string(), z.number()).optional()\n}).transform((meta) => ({\n\tlogs: meta.logs ?? meta.logsCount ?? 0,\n\terrors: meta.errors ?? meta.errorsCount ?? 0,\n\tperformance_issues: meta.performance_issues ?? meta.performanceIssuesCount ?? 0,\n\tspan_count: meta.span_count ?? meta.spansCount ?? 0,\n\ttransaction_child_count_map: meta.transaction_child_count_map ?? meta.transactionChildCountMap ?? [],\n\tspan_count_map: meta.span_count_map ?? meta.spansCountMap ?? {}\n}));\n/**\n* Schema for individual spans within a trace.\n*\n* Represents the hierarchical structure of spans with timing information,\n* operation details, and nested children spans.\n*/\nconst TraceSpanSchema = z.lazy(() => z.object({\n\tchildren: z.array(TraceSpanSchema),\n\terrors: z.array(z.any()),\n\toccurrences: z.array(z.any()),\n\tevent_id: z.string(),\n\tspan_id: z.string().optional(),\n\ttransaction_id: z.string(),\n\tproject_id: z.union([z.string(), z.number()]),\n\tproject_slug: z.string(),\n\tprofile_id: z.string().nullable().optional(),\n\tprofiler_id: z.string().nullable().optional(),\n\tparent_span_id: z.string().nullable(),\n\tstart_timestamp: z.number(),\n\tend_timestamp: z.number(),\n\tmeasurements: z.record(z.string(), z.number()).optional(),\n\tduration: z.number(),\n\ttrace: z.string().optional(),\n\ttransaction: z.string().nullable().optional(),\n\tis_transaction: z.boolean().optional(),\n\tdescription: z.string().nullable().optional(),\n\tsdk_name: z.string().nullable().optional(),\n\top: z.string().nullable().optional(),\n\tname: z.string().nullable().optional(),\n\tevent_type: z.string().nullable().optional(),\n\tadditional_attributes: z.record(z.string(), z.unknown()).optional(),\n\thash: z.string().nullable().optional(),\n\texclusive_time: z.number().optional(),\n\tstatus: z.string().nullable().optional(),\n\tis_segment: z.boolean().optional(),\n\tsame_process_as_parent: z.boolean().optional(),\n\torganization: z.unknown().nullable().optional(),\n\ttags: z.record(z.string(), z.unknown()).optional(),\n\ttimestamp: z.union([z.string(), z.number()]).optional(),\n\tdata: z.record(z.string(), z.unknown()).optional()\n}));\n/**\n* Schema for issue objects that can appear in trace responses.\n*\n* When Sentry's trace API returns standalone errors, they are returned as\n* SerializedIssue objects that lack the span-specific fields.\n*/\nconst TraceIssueSchema = z.object({\n\tid: z.union([z.string(), z.number()]).optional(),\n\tissue_id: z.union([z.string(), z.number()]).optional(),\n\tproject_id: z.union([z.string(), z.number()]).optional(),\n\tproject_slug: z.string().optional(),\n\ttitle: z.string().optional(),\n\tculprit: z.string().optional(),\n\ttype: z.string().optional(),\n\ttimestamp: z.union([z.string(), z.number()]).optional()\n}).passthrough();\n/**\n* Schema for Sentry trace response.\n*\n* Contains the complete trace tree starting from root spans.\n* The response is an array that can contain both root-level spans\n* and standalone issue objects. The Sentry API's query_trace_data\n* function returns a mixed list of SerializedSpan and SerializedIssue\n* objects when there are errors not directly associated with spans.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/api/endpoints/organization_trace.py`\n* - `src/sentry/snuba/trace.py` (`SerializedSpan`, `SerializedIssue`)\n*/\nconst TraceSchema = z.array(z.union([TraceSpanSchema, TraceIssueSchema]));\nconst NullableStringOrNumberSchema = z.union([z.string(), z.number()]).nullable().optional();\nconst NullableOptionalStringSchema = z.string().nullable().optional().transform((value) => value ?? void 0);\nconst AIConversationSpanSchema = z.object({\n\t\"gen_ai.conversation.id\": z.string(),\n\tspan_id: z.string(),\n\ttrace: z.string(),\n\tparent_span: z.string().nullable().optional(),\n\t\"precise.start_ts\": z.number(),\n\t\"precise.finish_ts\": z.number(),\n\tproject: z.string(),\n\t\"project.id\": z.union([z.string(), z.number()]),\n\t\"span.name\": NullableOptionalStringSchema,\n\t\"span.status\": NullableOptionalStringSchema,\n\t\"span.op\": NullableOptionalStringSchema,\n\t\"span.description\": NullableOptionalStringSchema,\n\t\"span.duration\": z.number().optional(),\n\ttransaction: NullableOptionalStringSchema,\n\tis_transaction: z.boolean().optional(),\n\t\"gen_ai.cost.total_tokens\": NullableStringOrNumberSchema,\n\t\"gen_ai.operation.type\": NullableOptionalStringSchema,\n\t\"gen_ai.input.messages\": NullableOptionalStringSchema,\n\t\"gen_ai.output.messages\": NullableOptionalStringSchema,\n\t\"gen_ai.system_instructions\": NullableOptionalStringSchema,\n\t\"gen_ai.tool.definitions\": NullableOptionalStringSchema,\n\t\"gen_ai.request.messages\": NullableOptionalStringSchema,\n\t\"gen_ai.response.object\": NullableOptionalStringSchema,\n\t\"gen_ai.response.text\": NullableOptionalStringSchema,\n\t\"gen_ai.tool.name\": NullableOptionalStringSchema,\n\t\"gen_ai.tool.call.arguments\": NullableOptionalStringSchema,\n\t\"gen_ai.tool.input\": NullableOptionalStringSchema,\n\t\"gen_ai.usage.total_tokens\": NullableStringOrNumberSchema,\n\t\"gen_ai.request.model\": NullableOptionalStringSchema,\n\t\"gen_ai.response.model\": NullableOptionalStringSchema,\n\t\"gen_ai.agent.name\": NullableOptionalStringSchema,\n\t\"user.id\": NullableOptionalStringSchema,\n\t\"user.email\": NullableOptionalStringSchema,\n\t\"user.username\": NullableOptionalStringSchema,\n\t\"user.ip\": NullableOptionalStringSchema\n}).passthrough();\nconst AIConversationSpanListSchema = z.array(AIConversationSpanSchema);\n/** Conversation details response envelope (`conversationId`, `title`, `spans`). */\nconst AIConversationDetailsResponseSchema = z.object({\n\tconversationId: z.string(),\n\ttitle: z.string().nullable(),\n\tspans: AIConversationSpanListSchema\n}).passthrough();\n/**\n* Schemas validated against getsentry/sentry:\n* - `src/sentry/api/endpoints/organization_ai_conversations.py`\n* - `src/sentry/api/serializers/rest_framework/ai_conversations.py`\n* - `tests/sentry/api/endpoints/test_organization_ai_conversations.py`\n*/\nconst AIConversationUserSchema = z.object({\n\tid: z.string().nullable(),\n\temail: z.string().nullable(),\n\tusername: z.string().nullable(),\n\tip_address: z.string().nullable()\n}).passthrough();\nconst AIConversationSummarySchema = z.object({\n\tconversationId: z.string(),\n\ttitle: z.string().nullable(),\n\tflow: z.array(z.string()),\n\terrors: z.number(),\n\tllmCalls: z.number(),\n\ttoolCalls: z.number(),\n\ttotalTokens: z.number(),\n\ttotalCost: z.number(),\n\tstartTimestamp: z.number(),\n\tendTimestamp: z.number(),\n\ttraceCount: z.number(),\n\ttraceIds: z.array(z.string()),\n\tfirstInput: z.string().nullable(),\n\tlastOutput: z.string().nullable(),\n\tuser: AIConversationUserSchema.nullable(),\n\ttoolNames: z.array(z.string()),\n\ttoolErrors: z.number()\n}).passthrough();\nconst AIConversationSummaryListSchema = z.array(AIConversationSummarySchema);\n/**\n* Schema for individual frames in a flamegraph.\n*\n* Represents a single stack frame with file/function information and\n* whether it's application code or library code.\n*/\nconst FlamegraphFrameSchema = z.object({\n\tfile: z.preprocess((value) => value ?? \"\", z.string()),\n\timage: z.string().optional(),\n\tis_application: z.preprocess((value) => value ?? false, z.boolean()),\n\tline: z.preprocess((value) => value ?? 0, z.number()),\n\tname: z.preprocess((value) => value ?? \"(unknown)\", z.string()),\n\tpath: z.string().optional(),\n\tfingerprint: z.preprocess((value) => value ?? 0, z.number())\n}).passthrough();\n/**\n* Schema for aggregated performance statistics for a single frame.\n*\n* Contains sample counts, total weight/duration, and performance percentiles\n* (p75, p95, p99) for the frame across all samples.\n*/\nconst FlamegraphFrameInfoSchema = z.object({\n\tcount: z.number(),\n\tweight: z.number().optional(),\n\tsumDuration: z.number(),\n\tsumSelfTime: z.number(),\n\tp75Duration: z.number(),\n\tp95Duration: z.number(),\n\tp99Duration: z.number()\n}).passthrough().transform((frameInfo) => ({\n\t...frameInfo,\n\tweight: frameInfo.weight ?? frameInfo.sumDuration\n}));\n/**\n* Schema for profile metadata within a flamegraph response.\n*\n* Links flamegraph samples back to transaction profile IDs or continuous\n* profile chunks. References can also be raw profile ID strings in older\n* speedscope-compatible payloads. Timing fields are optional because Sentry's\n* continuous candidate sources do not all populate the same reference metadata.\n*/\nconst FlamegraphProfileMetadataSchema = z.union([\n\tz.string(),\n\tz.object({\n\t\tproject_id: z.number(),\n\t\tprofile_id: z.string(),\n\t\tstart: z.union([z.number(), z.string()]).optional(),\n\t\tend: z.union([z.number(), z.string()]).optional()\n\t}).passthrough(),\n\tz.object({\n\t\tproject_id: z.number(),\n\t\tprofiler_id: z.string(),\n\t\tchunk_id: z.string(),\n\t\tthread_id: z.string().optional(),\n\t\tstart: z.union([z.number(), z.string()]).optional(),\n\t\tend: z.union([z.number(), z.string()]).optional(),\n\t\ttransaction_id: z.string().nullable().optional()\n\t}).passthrough()\n]);\n/**\n* Schema for a single profile within a flamegraph (typically one per thread).\n*\n* Contains arrays of samples (call stack patterns), their occurrence counts,\n* durations, and relative weights.\n*/\nconst FlamegraphProfileSchema = z.object({\n\tendValue: z.number(),\n\tisMainThread: z.boolean(),\n\tname: z.string(),\n\tsamples: z.array(z.array(z.number())),\n\tstartValue: z.number(),\n\tthreadID: z.number(),\n\ttype: z.string(),\n\tunit: z.string(),\n\tweights: z.array(z.number()),\n\tsample_durations_ns: z.preprocess((value) => value ?? [], z.array(z.number())),\n\tsample_counts: z.preprocess((value) => value ?? [], z.array(z.number()))\n}).passthrough();\n/**\n* Schema for flamegraph API response.\n*\n* Flamegraphs provide pre-aggregated CPU profiling data with:\n* - Unique call stack patterns (samples)\n* - Performance statistics (counts, durations, percentiles)\n* - Frame metadata (file, function, is_application)\n*\n* This is the primary data source for profile analysis as it's\n* already aggregated and includes percentile calculations.\n*/\nconst FlamegraphSchema = z.preprocess((value) => {\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) return value;\n\tconst body = value;\n\tconst metadata = body.metadata && typeof body.metadata === \"object\" ? body.metadata : {};\n\treturn {\n\t\t...body,\n\t\tplatform: body.platform ?? metadata.platform,\n\t\tprojectID: body.projectID ?? metadata.projectID,\n\t\ttransactionName: body.transactionName ?? metadata.transactionName\n\t};\n}, z.object({\n\tactiveProfileIndex: z.preprocess((value) => value ?? 0, z.number()),\n\tmetadata: z.record(z.string(), z.unknown()).optional(),\n\tplatform: z.string(),\n\tprofiles: z.preprocess((value) => value ?? [], z.array(FlamegraphProfileSchema)),\n\tprojectID: z.number(),\n\tshared: z.preprocess((value) => value ?? {}, z.object({\n\t\tframes: z.preprocess((value) => value ?? [], z.array(FlamegraphFrameSchema)),\n\t\tframe_infos: z.preprocess((value) => value ?? [], z.array(FlamegraphFrameInfoSchema)),\n\t\tprofiles: z.preprocess((value) => value ?? [], z.array(FlamegraphProfileMetadataSchema))\n\t}).passthrough()),\n\ttransactionName: z.string().optional(),\n\tmetrics: z.unknown().optional()\n}).passthrough());\n/**\n* Schema for individual frames in raw profile chunk data.\n*\n* Similar to FlamegraphFrameSchema but uses different field names\n* (function instead of name, in_app instead of is_application).\n* Many fields are optional as the API may not include them for all frames.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `static/app/types/profiling.d.ts` (`SentrySampledProfileFrame`)\n* - `static/app/utils/profiling/profile/utils.tsx`\n* - `src/sentry/profiles/task.py`\n*\n* In particular, `function` must remain optional here. Sentry's frontend\n* import path already falls back with `frame.function ?? \"unknown\"`, and the\n* profile processing pipeline uses `frame.get(\"function\", \"\")`.\n*/\nconst ProfileFrameSchema = z.object({\n\tfilename: z.string().nullable().optional(),\n\tfunction: z.string().nullable().optional(),\n\tin_app: z.boolean(),\n\tlineno: z.number().nullable().optional(),\n\tcolno: z.number().nullable().optional(),\n\tmodule: z.string().nullable().optional(),\n\tabs_path: z.string().nullable().optional(),\n\tplatform: z.string().nullable().optional(),\n\tinstruction_addr: z.string().nullable().optional(),\n\tclass_name: z.string().nullable().optional(),\n\traw_function: z.string().nullable().optional(),\n\tsymbol: z.string().nullable().optional(),\n\tlang: z.string().nullable().optional(),\n\tdata: z.record(z.string(), z.unknown()).optional()\n}).passthrough();\nconst ProfileThreadMetadataSchema = z.record(z.string(), z.object({\n\tname: z.string().nullable().optional(),\n\tpriority: z.number().nullable().optional()\n}).passthrough());\n/**\n* Schema for a single V2 continuous profile chunk sample.\n*\n* V2 chunks are produced by the continuous profiler and span multiple\n* transactions. Each sample carries an absolute (or relative-to-chunk) wall\n* clock `timestamp` in seconds and a string `thread_id` matching\n* `thread_metadata` keys.\n*\n* Upstream type reference in getsentry/sentry:\n* - `static/app/types/profiling.d.ts` (`SentrySampledProfileChunkSample`)\n*/\nconst ProfileChunkSampleSchema = z.object({\n\tstack_id: z.number(),\n\tthread_id: z.string(),\n\ttimestamp: z.number(),\n\tqueue_address: z.string().optional()\n}).passthrough();\n/**\n* Schema for a single V1 transaction profile sample.\n*\n* V1 samples are produced per-transaction by Sentry's profiling service\n* (vroom). They differ from V2 chunk samples in two important ways:\n* - `thread_id` is serialized as a Go `uint64` (a number on the wire). It is\n*   normalized to a string here so downstream code can compare against the\n*   string keys in `thread_metadata`.\n* - Time is carried as `elapsed_since_start_ns` (uint64 nanoseconds since the\n*   start of the profile). V1 samples never carry an absolute `timestamp`.\n*\n* Upstream references in getsentry/sentry:\n* - `static/app/types/profiling.d.ts` (`SentrySampledProfileSample`)\n* - `src/sentry/api/endpoints/project_profiling_profile.py`\n*/\nconst TransactionProfileSampleSchema = z.object({\n\tstack_id: z.number(),\n\tthread_id: z.union([z.string(), z.number()]).transform(String),\n\telapsed_since_start_ns: z.number(),\n\tqueue_address: z.string().optional()\n}).passthrough();\n/**\n* Schema for raw V2 continuous-profile chunk data.\n*\n* Contains the raw sampling data including:\n* - frames: All unique stack frames\n* - samples: Individual sample points with timestamps\n* - stacks: Arrays of frame indices forming call stacks\n* - thread_metadata: Information about profiled threads\n*\n* This is used for deep-dive analysis when flamegraph data isn't sufficient.\n*/\nconst ProfileChunkSchema = z.object({\n\tchunk_id: z.string(),\n\tprofiler_id: z.string().optional(),\n\tevent_id: z.string().optional(),\n\tenvironment: z.preprocess((value) => value ?? null, z.string().nullable()),\n\tplatform: z.preprocess((value) => value ?? \"unknown\", z.string()),\n\trelease: z.preprocess((value) => value ?? \"unknown\", z.string()),\n\tversion: z.preprocess((value) => value ?? \"2\", z.string()),\n\tprofile: z.object({\n\t\tframes: z.array(ProfileFrameSchema),\n\t\tsamples: z.array(ProfileChunkSampleSchema),\n\t\tstacks: z.array(z.array(z.number())),\n\t\tthread_metadata: z.preprocess((value) => value ?? {}, ProfileThreadMetadataSchema)\n\t})\n}).passthrough();\n/**\n* Schema for profile chunks API response wrapper.\n*\n* Sentry returns a singular `chunk` wrapper for single chunk requests. The\n* frontend also backfills profiler_id from the query because profiling-service\n* chunks may omit it. The legacy plural `chunks` wrapper remains accepted for\n* older fixtures and mocks.\n*/\nconst ProfileChunkResponseSchema = z.union([z.object({ chunk: ProfileChunkSchema.nullable() }).passthrough().transform((response) => ({ chunks: response.chunk ? [response.chunk] : [] })), z.object({ chunks: z.array(ProfileChunkSchema) }).passthrough().transform((response) => ({ chunks: response.chunks }))]);\nconst ProfileReleaseSchema = z.union([\n\tz.string(),\n\tz.object({ version: z.string() }).passthrough(),\n\tz.null()\n]).optional();\n/**\n* Schema for a V1 transaction profile response.\n*\n* Unlike V2 continuous profile chunks, transaction profiles are scoped to a\n* single transaction and always include a `transaction` object. vroom emits\n* both `Sample.thread_id` and `Transaction.active_thread_id` as `uint64`, so\n* both are accepted as number or string here and normalized to strings.\n*\n* Upstream source of truth in getsentry/sentry:\n* - `src/sentry/api/endpoints/project_profiling_profile.py`\n* - `static/app/types/profiling.d.ts` (`SentrySampledProfile`)\n*\n* The project profiling endpoint largely proxies the profiling-service payload\n* and only normalizes release metadata, so this schema should track the wire\n* payload Sentry consumes rather than introducing stricter local requirements.\n*/\nconst TransactionProfileSchema = z.object({\n\tevent_id: z.string().optional(),\n\tprofile_id: z.string().optional(),\n\tprofiler_id: z.string().optional(),\n\tenvironment: z.string().nullable().optional(),\n\tplatform: z.string(),\n\trelease: ProfileReleaseSchema,\n\tversion: z.union([z.string(), z.number()]).transform(String).optional(),\n\tprofile: z.object({\n\t\tframes: z.array(ProfileFrameSchema),\n\t\tsamples: z.array(TransactionProfileSampleSchema),\n\t\tstacks: z.array(z.array(z.number())),\n\t\tthread_metadata: z.preprocess((value) => value ?? {}, ProfileThreadMetadataSchema)\n\t}),\n\ttransaction: z.object({\n\t\tname: z.string().optional(),\n\t\ttrace_id: z.string().optional(),\n\t\tid: z.string().optional(),\n\t\tactive_thread_id: z.union([z.string(), z.number()]).transform(String).optional(),\n\t\trelative_start_ns: z.union([z.string(), z.number()]).transform((value) => Number(value)).optional(),\n\t\trelative_end_ns: z.union([z.string(), z.number()]).transform((value) => Number(value)).optional()\n\t}).passthrough().optional(),\n\tdevice: z.object({\n\t\tclassification: z.string().nullable().optional(),\n\t\tmanufacturer: z.string().nullable().optional(),\n\t\tlocale: z.string().nullable().optional(),\n\t\tmodel: z.string().nullable().optional(),\n\t\tarch: z.string().nullable().optional()\n\t}).passthrough().nullable().optional(),\n\tos: z.object({\n\t\tname: z.string().nullable().optional(),\n\t\tversion: z.string().nullable().optional(),\n\t\tbuild_number: z.string().nullable().optional()\n\t}).passthrough().nullable().optional(),\n\tclient_sdk: z.object({\n\t\tname: z.string().nullable().optional(),\n\t\tversion: z.string().nullable().optional()\n\t}).passthrough().nullable().optional()\n}).passthrough();\nconst AgenticOnboardingStageSchema = z.enum([\n\t\"connect_mcp\",\n\t\"analyze_project\",\n\t\"create_project\",\n\t\"instrument_app\",\n\t\"plan_test_error\",\n\t\"send_verification_error\",\n\t\"receive_verification_error\",\n\t\"prepare_production\",\n\t\"check_stack_trace_quality\"\n]);\nconst AgenticOnboardingStageStatusSchema = z.enum([\n\t\"active\",\n\t\"waiting\",\n\t\"completed\",\n\t\"skipped\",\n\t\"failed\",\n\t\"bypassed\"\n]);\nconst AgenticOnboardingStageStatusUpdateSchema = z.enum([\n\t\"active\",\n\t\"waiting\",\n\t\"completed\",\n\t\"skipped\",\n\t\"failed\"\n]);\nconst AgenticOnboardingCreateProjectExtraSchema = z.object({ projectSlugs: z.array(z.string().trim().min(1)) }).strict();\nconst AgenticOnboardingVerificationErrorExtraSchema = z.object({ issueIds: z.array(z.string().trim().min(1)) }).strict();\nconst AgenticOnboardingStageWithoutExtraSchema = AgenticOnboardingStageSchema.exclude([\"create_project\", \"receive_verification_error\"]);\nconst AgenticOnboardingStageStateBaseSchema = z.object({\n\tstatus: AgenticOnboardingStageStatusSchema.nullable(),\n\teventNote: z.string().nullable()\n});\nconst AgenticOnboardingStageStateSchema = z.discriminatedUnion(\"stage\", [\n\tAgenticOnboardingStageStateBaseSchema.extend({\n\t\tstage: z.literal(\"create_project\"),\n\t\textra: AgenticOnboardingCreateProjectExtraSchema.nullable()\n\t}),\n\tAgenticOnboardingStageStateBaseSchema.extend({\n\t\tstage: z.literal(\"receive_verification_error\"),\n\t\textra: AgenticOnboardingVerificationErrorExtraSchema.nullable()\n\t}),\n\tAgenticOnboardingStageStateBaseSchema.extend({\n\t\tstage: AgenticOnboardingStageWithoutExtraSchema,\n\t\textra: z.null()\n\t})\n]);\nconst AgenticOnboardingRunStatusSchema = z.enum([\n\t\"active\",\n\t\"completed\",\n\t\"failed\",\n\t\"cancelled\"\n]);\nconst AgenticOnboardingRunStatusUpdateSchema = z.enum([\"completed\", \"failed\"]);\nconst AgenticOnboardingRunTokenSchema = z.string().regex(/^[A-Za-z0-9]{10}$/);\nconst AgenticOnboardingStatusUpdateBaseSchema = z.object({\n\tschemaVersion: z.literal(1),\n\trunToken: AgenticOnboardingRunTokenSchema,\n\tstatus: AgenticOnboardingStageStatusUpdateSchema,\n\trunStatus: AgenticOnboardingRunStatusUpdateSchema.optional(),\n\teventNote: z.string().trim().min(1).max(256).optional()\n});\nconst AgenticOnboardingStatusUpdateSchema = z.discriminatedUnion(\"stage\", [\n\tAgenticOnboardingStatusUpdateBaseSchema.extend({\n\t\tstage: z.literal(\"create_project\"),\n\t\textra: AgenticOnboardingCreateProjectExtraSchema.optional()\n\t}),\n\tAgenticOnboardingStatusUpdateBaseSchema.extend({\n\t\tstage: z.literal(\"receive_verification_error\"),\n\t\textra: AgenticOnboardingVerificationErrorExtraSchema.optional()\n\t}),\n\tAgenticOnboardingStatusUpdateBaseSchema.extend({\n\t\tstage: AgenticOnboardingStageWithoutExtraSchema,\n\t\textra: z.never().optional()\n\t})\n]);\nconst AgenticOnboardingRunSchema = z.object({\n\tschemaVersion: z.literal(1),\n\trunId: z.string(),\n\tchannelId: z.string(),\n\tclientRunId: z.string(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tsequence: z.number().int().nonnegative(),\n\texpiresAt: z.string(),\n\tcontinueUpdates: z.boolean(),\n\trunStatus: AgenticOnboardingRunStatusSchema,\n\tstages: z.array(AgenticOnboardingStageStateSchema)\n});\n\n//#endregion\nexport { AIConversationDetailsResponseSchema, AIConversationSpanListSchema, AIConversationSpanSchema, AIConversationSummaryListSchema, AIConversationSummarySchema, AIConversationUserSchema, AgenticOnboardingRunSchema, AgenticOnboardingRunStatusSchema, AgenticOnboardingRunStatusUpdateSchema, AgenticOnboardingRunTokenSchema, AgenticOnboardingStageSchema, AgenticOnboardingStageStateSchema, AgenticOnboardingStageStatusSchema, AgenticOnboardingStageStatusUpdateSchema, AgenticOnboardingStatusUpdateSchema, AlertRuleComponentSchema, ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, CommitListSchema, CommitSchema, DashboardFiltersSchema, DashboardListItemSchema, DashboardListSchema, DashboardPermissionsSchema, DashboardSchema, DashboardWidgetPreviewSchema, DashboardWidgetQuerySchema, DashboardWidgetSchema, DefaultEventSchema, DeployListSchema, DeploySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, EvidenceDisplaySchema, ExceptionInterface, ExternalIssueListSchema, ExternalIssueSchema, FlamegraphFrameInfoSchema, FlamegraphFrameSchema, FlamegraphProfileMetadataSchema, FlamegraphProfileSchema, FlamegraphSchema, FrameInterface, GenericEventSchema, IssueActivityListResponseSchema, IssueActivitySchema, IssueAlertRuleListSchema, IssueAlertRuleSchema, IssueCommentListSchema, IssueCommentSchema, IssueListSchema, IssueSchema, IssueTagValueSchema, IssueTagValuesSchema, MessageEntrySchema, MetricAlertRuleListSchema, MetricAlertRuleSchema, MonitorCheckInListSchema, MonitorCheckInSchema, MonitorEnvironmentSchema, MonitorListSchema, MonitorSchema, MonitorStatSchema, MonitorStatsSchema, OccurrenceSchema, OrganizationListSchema, OrganizationSchema, ProfileChunkResponseSchema, ProfileChunkSampleSchema, ProfileChunkSchema, ProfileFrameSchema, ProjectListSchema, ProjectRepositoryMappingSchema, ProjectSchema, ReleaseDetailsSchema, ReleaseListSchema, ReleaseSchema, ReplayDetailsSchema, ReplayIdsByResourceSchema, ReplayListResponseSchema, ReplayRecordingEventSchema, ReplayRecordingSegmentsSchema, RepositoryListSchema, RepositorySchema, RequestEntrySchema, SpansSearchResponseSchema, StacktraceLinkSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, TransactionProfileSampleSchema, TransactionProfileSchema, UnknownEventSchema, UptimeCheckListSchema, UptimeCheckSchema, UptimeMonitorListSchema, UptimeMonitorSchema, UserReportListSchema, UserReportSchema, UserSchema };\n//# sourceMappingURL=schema-BYZYkgA1.js.map","import { DEFAULT_SEARCH_ISSUES_PERIOD } from \"./constants-CEZaLsGe.js\";\nimport { ConfigurationError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { logIssue, logWarn } from \"./logging-B7X3yL0T.js\";\nimport { isMetricsDataset, isProfilesDataset, normalizeEventsDataset } from \"./events-datasets-Cu37u43g.js\";\nimport { getAIConversationUrl, getAIConversationsUrl, getContinuousProfileUrl, getDashboardUrl, getIssueUrl, getMonitorUrl, getPreprodSnapshotUrl, getProfileUrl, getProfilingExplorerUrl, getReleaseUrl, getReplayUrl, getReplaysSearchUrl, getTraceMetricsExploreUrl, getTraceUrl, getUptimeMonitorUrl, isSentryHost } from \"./url-utils-CYEhmNHi.js\";\nimport { USER_AGENT } from \"./version-Dl3bNTAd.js\";\nimport { apiPath } from \"./api-path-BQDQ2sHi.js\";\nimport { ApiNotFoundError, ApiValidationError, createApiError } from \"./errors-DG2FreDU.js\";\nimport { AIConversationDetailsResponseSchema, AIConversationSummaryListSchema, AgenticOnboardingRunSchema, ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, CommitListSchema, DashboardListSchema, DashboardSchema, DeployListSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventSchema, ExternalIssueListSchema, FlamegraphSchema, IssueActivityListResponseSchema, IssueAlertRuleListSchema, IssueCommentListSchema, IssueCommentSchema, IssueListSchema, IssueSchema, IssueTagValuesSchema, MetricAlertRuleListSchema, MetricAlertRuleSchema, MonitorCheckInListSchema, MonitorListSchema, MonitorSchema, MonitorStatsSchema, OrganizationListSchema, OrganizationSchema, ProfileChunkResponseSchema, ProjectListSchema, ProjectRepositoryMappingSchema, ProjectSchema, ReleaseDetailsSchema, ReleaseListSchema, ReplayDetailsSchema, ReplayIdsByResourceSchema, ReplayListResponseSchema, ReplayRecordingSegmentsSchema, RepositoryListSchema, SpansSearchResponseSchema, StacktraceLinkSchema, TagListSchema, TeamListSchema, TeamSchema, TraceMetaSchema, TraceSchema, TransactionProfileSchema, UptimeCheckListSchema, UptimeMonitorListSchema, UptimeMonitorSchema, UserReportListSchema, UserSchema } from \"./schema-BYZYkgA1.js\";\nimport { z } from \"zod\";\n\n//#region src/api-client/client.ts\nconst SENTRY_MCP_SEARCH_EVENTS_REFERRER = \"api.mcp.search-events\";\n/**\n* Mapping of common network error codes to user-friendly messages.\n* These help users understand and resolve connection issues.\n*/\nconst NETWORK_ERROR_MESSAGES = {\n\tEAI_AGAIN: \"DNS temporarily unavailable. Check your internet connection.\",\n\tENOTFOUND: \"Hostname not found. Verify the URL is correct.\",\n\tECONNREFUSED: \"Connection refused. Ensure the service is accessible.\",\n\tETIMEDOUT: \"Connection timed out. Check network connectivity.\",\n\tECONNRESET: \"Connection reset. Try again in a moment.\"\n};\nfunction normalizeStatsPeriod(statsPeriod) {\n\tconst normalized = statsPeriod?.trim();\n\treturn normalized || void 0;\n}\nfunction formatWorkflowNameQuery(query) {\n\tconst escapedQuery = query.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\");\n\treturn `name:\"*${escapedQuery}*\"`;\n}\nfunction filterAttachedIssueAlertRules(rules) {\n\treturn rules.filter((rule) => (rule.detectorIds ?? []).length > 0);\n}\nfunction parseStatsPeriod(statsPeriod) {\n\tconst match = /^(\\d+)([smhdw])$/.exec(statsPeriod);\n\tif (!match) throw new ApiValidationError(\"statsPeriod must use a supported relative time format, such as `24h`, `7d`, or `2w`.\");\n\treturn {\n\t\tamount: Number(match[1]),\n\t\tunit: match[2]\n\t};\n}\nfunction getNextCursor(linkHeader) {\n\tif (!linkHeader) return null;\n\tfor (const link of linkHeader.split(\",\")) {\n\t\tif (!link.includes(\"rel=\\\"next\\\"\") || !link.includes(\"results=\\\"true\\\"\")) continue;\n\t\tconst cursorMatch = link.match(/cursor=\"([^\"]+)\"/);\n\t\tif (cursorMatch?.[1]) return cursorMatch[1];\n\t}\n\treturn null;\n}\nconst TraceItemAttributeTypeSchema = z.enum([\n\t\"string\",\n\t\"number\",\n\t\"boolean\"\n]);\nconst TraceItemAttributeSourceSchema = z.object({\n\tsource_type: z.enum([\"sentry\", \"user\"]),\n\tis_transformed_alias: z.boolean().optional()\n});\nconst ValidationErrorSchema = z.string().nullable();\nconst EventsValidationIssueSchema = z.object({\n\tvalid: z.boolean(),\n\terror: ValidationErrorSchema\n}).transform(({ valid, error }) => ({\n\tvalid,\n\t...error ? { error } : {}\n}));\nconst EventsNamedValidationIssueSchema = z.object({\n\tname: z.string(),\n\tvalid: z.boolean(),\n\terror: ValidationErrorSchema\n}).transform(({ name, valid, error }) => ({\n\tname,\n\tvalid,\n\t...error ? { error } : {}\n}));\nconst EventsAttributeValidationSchema = z.object({\n\tname: z.string(),\n\tvalid: z.boolean(),\n\tattrType: TraceItemAttributeTypeSchema.nullable(),\n\terror: ValidationErrorSchema\n}).transform(({ name, valid, attrType, error }) => ({\n\tname,\n\tvalid,\n\t...attrType ? { type: attrType } : {},\n\t...error ? { error } : {}\n}));\nconst EventsValidationIssueListSchema = z.array(EventsValidationIssueSchema);\nconst EventsNamedValidationIssueListSchema = z.array(EventsNamedValidationIssueSchema);\nconst EventsAttributeValidationListSchema = z.array(EventsAttributeValidationSchema);\nconst EventsQueryValidationSchema = z.object({\n\tvalid: z.boolean(),\n\terror: ValidationErrorSchema,\n\tfields: EventsAttributeValidationListSchema\n}).transform(({ valid, error, fields }) => ({\n\tvalid,\n\tfields,\n\t...error ? { error } : {}\n}));\nconst EventsValidationResponseSchema = z.object({\n\tvalid: z.boolean(),\n\tprojects: EventsValidationIssueListSchema,\n\tdataset: EventsNamedValidationIssueListSchema,\n\tenvironment: EventsValidationIssueListSchema,\n\tfield: EventsAttributeValidationListSchema,\n\tquery: EventsQueryValidationSchema,\n\torderby: EventsAttributeValidationListSchema\n}).transform((result) => result);\nconst TraceItemAttributeSchema = z.object({\n\tkey: z.string(),\n\tname: z.string(),\n\tattributeType: TraceItemAttributeTypeSchema,\n\tattributeSource: TraceItemAttributeSourceSchema,\n\tsecondaryAliases: z.array(z.string()).optional()\n}).transform(({ key, name, attributeType, attributeSource, secondaryAliases }) => ({\n\tkey,\n\tname,\n\ttype: attributeType,\n\tattributeSource,\n\t...secondaryAliases ? { secondaryAliases } : {}\n}));\nconst TraceItemAttributeListSchema = z.array(TraceItemAttributeSchema);\n/**\n* Sentry API client service for interacting with Sentry's REST API.\n*\n* This service provides a comprehensive interface to Sentry's API endpoints,\n* handling authentication, error processing, multi-region support, and\n* response validation through Zod schemas.\n*\n* Key Features:\n* - Multi-region support for Sentry SaaS and self-hosted instances\n* - Automatic schema validation with Zod\n* - Enhanced error handling with LLM-friendly messages\n* - URL generation for Sentry resources (issues, traces)\n* - Bearer token authentication\n* - Uses HTTPS by default, with opt-in HTTP for self-hosted stdio deployments\n*\n* @example Basic Usage\n* ```typescript\n* const apiService = new SentryApiService({\n*   accessToken: \"your-token\",\n*   host: \"sentry.io\"\n* });\n*\n* const orgs = await apiService.listOrganizations();\n* const issues = await apiService.listIssues({\n*   organizationSlug: \"my-org\",\n*   query: \"is:unresolved\"\n* });\n* ```\n*\n* @example Multi-Region Support\n* ```typescript\n* // Self-hosted instance with hostname\n* const selfHosted = new SentryApiService({\n*   accessToken: \"token\",\n*   host: \"sentry.company.com\"\n* });\n*\n* // Regional endpoint override\n* const issues = await apiService.listIssues(\n*   { organizationSlug: \"org\" },\n*   { host: \"eu.sentry.io\" }\n* );\n* ```\n*/\nvar SentryApiService = class {\n\taccessToken;\n\tclientId;\n\tclientName;\n\tclientFamily;\n\tutmSource;\n\thost;\n\tprotocol;\n\tapiPrefix;\n\t/**\n\t* Creates a new Sentry API service instance.\n\t*\n\t* Uses HTTPS by default. Stdio may opt into HTTP for self-hosted deployments.\n\t*\n\t* @param config Configuration object\n\t* @param config.accessToken OAuth access token for authentication (optional for some endpoints)\n\t* @param config.host Sentry hostname (e.g. \"sentry.io\", \"sentry.example.com\")\n\t* @param config.clientId DCR-registered OAuth client ID\n\t* @param config.clientName DCR-registered OAuth client name\n\t* @param config.clientFamily Bucketed client family (e.g. \"claude-code\", \"cursor\")\n\t* @param config.utmSource Sanitized MCP request attribution source\n\t*/\n\tconstructor({ accessToken = null, host = \"sentry.io\", protocol = \"https\", clientId = null, clientName = null, clientFamily = null, utmSource = null }) {\n\t\tthis.accessToken = accessToken;\n\t\tthis.clientId = clientId;\n\t\tthis.clientName = clientName;\n\t\tthis.clientFamily = clientFamily;\n\t\tthis.utmSource = utmSource;\n\t\tthis.host = host;\n\t\tthis.protocol = protocol;\n\t\tthis.apiPrefix = `${protocol}://${host}/api/0`;\n\t}\n\t/**\n\t* Updates the host for API requests.\n\t*\n\t* Used for multi-region support or switching between Sentry instances.\n\t* Preserves the configured URL scheme.\n\t*\n\t* @param host New hostname to use for API requests\n\t*/\n\tsetHost(host) {\n\t\tthis.host = host;\n\t\tthis.apiPrefix = `${this.protocol}://${this.host}/api/0`;\n\t}\n\t/**\n\t* Checks if the current host is Sentry SaaS (sentry.io).\n\t*\n\t* Used to determine API endpoint availability and URL formats.\n\t* Self-hosted instances may not have all endpoints available.\n\t*\n\t* @returns True if using Sentry SaaS, false for self-hosted instances\n\t*/\n\tisSaas() {\n\t\treturn isSentryHost(this.host);\n\t}\n\t/**\n\t* Validates and applies time parameters to a URLSearchParams object.\n\t*\n\t* Enforces mutual exclusivity between relative (statsPeriod) and\n\t* absolute (start/end) time ranges, and ensures start/end are paired.\n\t*\n\t* @param queryParams The URLSearchParams to modify\n\t* @param statsPeriod Relative time period (e.g., \"24h\", \"7d\")\n\t* @param start Absolute start time (ISO 8601)\n\t* @param end Absolute end time (ISO 8601)\n\t* @throws {ApiValidationError} If time parameters are invalid\n\t*/\n\tapplyTimeParams(queryParams, statsPeriod, start, end) {\n\t\tif (statsPeriod && (start || end)) throw new ApiValidationError(\"Cannot use both statsPeriod and start/end parameters. Use either statsPeriod for relative time or start/end for absolute time.\");\n\t\tif (start && !end || !start && end) throw new ApiValidationError(\"Both start and end parameters must be provided together for absolute time ranges.\");\n\t\tif (statsPeriod) queryParams.set(\"statsPeriod\", statsPeriod);\n\t\telse if (start && end) {\n\t\t\tqueryParams.set(\"start\", start);\n\t\t\tqueryParams.set(\"end\", end);\n\t\t}\n\t}\n\tapplyStatsMixinTimeParams(queryParams, statsPeriod, start, end, resolutionSeconds) {\n\t\tif (statsPeriod && (start || end)) throw new ApiValidationError(\"Cannot use both statsPeriod and start/end parameters. Use either statsPeriod for relative time or start/end for absolute time.\");\n\t\tif (start && !end || !start && end) throw new ApiValidationError(\"Both start and end parameters must be provided together for absolute time ranges.\");\n\t\tlet since;\n\t\tlet until;\n\t\tif (start && end) {\n\t\t\tconst startMs = Date.parse(start);\n\t\t\tconst endMs = Date.parse(end);\n\t\t\tif (!Number.isFinite(startMs) || !Number.isFinite(endMs)) throw new ApiValidationError(\"start and end parameters must be valid ISO 8601 date strings.\");\n\t\t\tsince = Math.floor(startMs / 1e3);\n\t\t\tuntil = Math.floor(endMs / 1e3);\n\t\t} else {\n\t\t\tconst period = statsPeriod ?? \"24h\";\n\t\t\tconst { amount, unit } = parseStatsPeriod(period);\n\t\t\tlet unitSeconds;\n\t\t\tswitch (unit) {\n\t\t\t\tcase \"s\":\n\t\t\t\t\tunitSeconds = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"m\":\n\t\t\t\t\tunitSeconds = 60;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"h\":\n\t\t\t\t\tunitSeconds = 60 * 60;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d\":\n\t\t\t\t\tunitSeconds = 60 * 60 * 24;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"w\":\n\t\t\t\t\tunitSeconds = 60 * 60 * 24 * 7;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: throw new ApiValidationError(\"statsPeriod must use a supported relative time format, such as `24h`, `7d`, or `2w`.\");\n\t\t\t}\n\t\t\tuntil = Math.floor(Date.now() / 1e3);\n\t\t\tsince = until - amount * unitSeconds;\n\t\t}\n\t\tqueryParams.set(\"since\", String(since));\n\t\tqueryParams.set(\"until\", String(until));\n\t\tif (resolutionSeconds !== void 0) queryParams.set(\"resolution\", `${resolutionSeconds}s`);\n\t}\n\t/**\n\t* Internal method for making authenticated requests to Sentry API.\n\t*\n\t* Handles:\n\t* - Bearer token authentication\n\t* - Error response parsing and enhancement\n\t* - Multi-region host overrides\n\t* - Fetch availability validation\n\t*\n\t* @param path API endpoint path (without /api/0 prefix)\n\t* @param options Fetch options\n\t* @param requestOptions Additional request configuration\n\t* @returns Promise resolving to Response object\n\t* @throws {ApiError} Enhanced API errors with user-friendly messages\n\t* @throws {Error} Network or parsing errors\n\t*/\n\tasync request(path, options = {}, { host, allowStatuses } = {}) {\n\t\tconst url = host ? `${this.protocol}://${host}/api/0${path}` : `${this.apiPrefix}${path}`;\n\t\tconst headers = {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\"User-Agent\": USER_AGENT\n\t\t};\n\t\tif (this.accessToken) headers.Authorization = `Bearer ${this.accessToken}`;\n\t\tif (this.clientId) headers[\"X-Sentry-MCP-Client-Id\"] = this.clientId;\n\t\tif (this.clientName) headers[\"X-Sentry-MCP-Client-Name\"] = this.clientName;\n\t\tif (this.clientFamily) headers[\"X-Sentry-MCP-Client-Family\"] = this.clientFamily;\n\t\tif (this.utmSource) headers[\"X-Sentry-MCP-Utm-Source\"] = this.utmSource;\n\t\tif (typeof globalThis.fetch === \"undefined\") throw new ConfigurationError(\"fetch is not available. Please use Node.js >= 18 or ensure fetch is available in your environment.\");\n\t\tlet response;\n\t\ttry {\n\t\t\tresponse = await fetch(url, {\n\t\t\t\t...options,\n\t\t\t\theaders\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tlet rootCause = error;\n\t\t\twhile (rootCause instanceof Error && rootCause.cause) rootCause = rootCause.cause;\n\t\t\tconst errorMessage = rootCause instanceof Error ? rootCause.message : String(rootCause);\n\t\t\tlet friendlyMessage = `Unable to connect to ${url}`;\n\t\t\tconst errorCode = Object.keys(NETWORK_ERROR_MESSAGES).find((code) => errorMessage.includes(code));\n\t\t\tif (errorCode) friendlyMessage += ` - ${NETWORK_ERROR_MESSAGES[errorCode]}`;\n\t\t\telse friendlyMessage += ` - ${errorMessage}`;\n\t\t\tif (errorCode === \"ENOTFOUND\" || errorCode === \"EAI_AGAIN\" || errorCode === \"ECONNREFUSED\" || errorCode === \"ETIMEDOUT\" || errorMessage.includes(\"Connect Timeout Error\")) throw new ConfigurationError(friendlyMessage, { cause: error });\n\t\t\tthrow new Error(friendlyMessage, { cause: error });\n\t\t}\n\t\tif (!response.ok) {\n\t\t\tif (allowStatuses?.includes(response.status)) return response;\n\t\t\tconst errorText = await response.text();\n\t\t\tlet parsed;\n\t\t\ttry {\n\t\t\t\tparsed = JSON.parse(errorText);\n\t\t\t} catch (error) {\n\t\t\t\tif (errorText.includes(\"<!DOCTYPE\") || errorText.includes(\"<html\")) {\n\t\t\t\t\tlogWarn(\"Received HTML error page instead of JSON\", {\n\t\t\t\t\t\tloggerScope: [\"api\", \"client\"],\n\t\t\t\t\t\textra: {\n\t\t\t\t\t\t\tstatus: response.status,\n\t\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\t\thost: this.host,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tparseErrorMessage: error instanceof Error ? error.message : String(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tthrow createApiError(`Server error: Received HTML instead of JSON (${response.status} ${response.statusText}). This may indicate an invalid URL or server issue.`, response.status, errorText, void 0);\n\t\t\t\t}\n\t\t\t\tlogWarn(\"Failed to parse JSON error response\", {\n\t\t\t\t\tloggerScope: [\"api\", \"client\"],\n\t\t\t\t\textra: {\n\t\t\t\t\t\tstatus: response.status,\n\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\thost: this.host,\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tbodyPreview: errorText.length > 256 ? `${errorText.slice(0, 253)}…` : errorText,\n\t\t\t\t\t\tparseErrorMessage: error instanceof Error ? error.message : String(error)\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (parsed) {\n\t\t\t\tconst { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\t\t\t\tif (success) throw createApiError(data.detail, response.status, data.detail, parsed);\n\t\t\t\tlogWarn(\"Failed to parse validated API error response\", {\n\t\t\t\t\tloggerScope: [\"api\", \"client\"],\n\t\t\t\t\textra: {\n\t\t\t\t\t\tstatus: response.status,\n\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\thost: this.host,\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tbodyPreview: errorText.length > 256 ? `${errorText.slice(0, 253)}…` : errorText,\n\t\t\t\t\t\tvalidationErrorMessage: error instanceof Error ? error.message : String(error)\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow createApiError(`API request failed: ${response.statusText}\\n${errorText}`, response.status, errorText, void 0);\n\t\t}\n\t\treturn response;\n\t}\n\t/**\n\t* Safely parses a JSON response, checking Content-Type header first.\n\t*\n\t* @param response The Response object from fetch\n\t* @returns Promise resolving to the parsed JSON object\n\t* @throws {Error} If response is not JSON or parsing fails\n\t*/\n\tasync parseJsonResponse(response) {\n\t\tif (!response.headers?.get) return response.json();\n\t\tconst contentType = response.headers.get(\"content-type\");\n\t\tif (!contentType || !contentType.includes(\"application/json\")) {\n\t\t\tconst responseText = await response.text();\n\t\t\tif (contentType?.includes(\"text/html\") || responseText.includes(\"<!DOCTYPE\") || responseText.includes(\"<html\")) throw new Error(`Expected JSON response but received HTML (${response.status} ${response.statusText}). This may indicate you're not authenticated, the URL is incorrect, or there's a server issue.`);\n\t\t\tthrow new Error(`Expected JSON response but received ${contentType || \"unknown content type\"} (${response.status} ${response.statusText})`);\n\t\t}\n\t\ttry {\n\t\t\treturn await response.json();\n\t\t} catch (error) {\n\t\t\tthrow new Error(`Failed to parse JSON response: ${error instanceof Error ? error.message : String(error)}`);\n\t\t}\n\t}\n\t/**\n\t* Makes a request to the Sentry API and parses the JSON response.\n\t*\n\t* This is the primary method for API calls that expect JSON responses.\n\t* It automatically validates Content-Type and provides helpful error messages\n\t* for common issues like authentication failures or server errors.\n\t*\n\t* @param path API endpoint path (without /api/0 prefix)\n\t* @param options Fetch options\n\t* @param requestOptions Additional request configuration\n\t* @returns Promise resolving to the parsed JSON response\n\t* @throws {ApiError} Enhanced API errors with user-friendly messages\n\t* @throws {Error} Network, parsing, or validation errors\n\t*/\n\tasync requestJSON(path, options = {}, requestOptions) {\n\t\tconst response = await this.request(path, options, requestOptions);\n\t\treturn this.parseJsonResponse(response);\n\t}\n\t/**\n\t* Generates a Sentry issue URL for browser navigation.\n\t*\n\t* Handles both SaaS (subdomain-based) and self-hosted URL formats.\n\t* Uses the configured protocol.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param issueId Issue identifier (short ID or numeric ID)\n\t* @returns Full URL to the issue in Sentry UI\n\t*\n\t* @example\n\t* ```typescript\n\t* // SaaS: https://my-org.sentry.io/issues/PROJ-123\n\t* apiService.getIssueUrl(\"my-org\", \"PROJ-123\")\n\t*\n\t* // Self-hosted: https://sentry.company.com/organizations/my-org/issues/PROJ-123\n\t* apiService.getIssueUrl(\"my-org\", \"PROJ-123\")\n\t* ```\n\t*/\n\tgetIssueUrl(organizationSlug, issueId) {\n\t\treturn getIssueUrl(this.host, organizationSlug, issueId, this.protocol);\n\t}\n\t/**\n\t* Generates a Sentry trace URL for performance investigation.\n\t*\n\t* Uses the configured protocol.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param traceId Trace identifier (hex string)\n\t* @returns Full URL to the trace in Sentry UI\n\t*\n\t* @example\n\t* ```typescript\n\t* const traceUrl = apiService.getTraceUrl(\"my-org\", \"6a477f5b0f31ef7b6b9b5e1dea66c91d\");\n\t* // https://my-org.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\n\t* ```\n\t*/\n\tgetTraceUrl(organizationSlug, traceId) {\n\t\treturn getTraceUrl(this.host, organizationSlug, traceId, this.protocol);\n\t}\n\tgetReplayUrl(organizationSlug, replayId) {\n\t\treturn getReplayUrl(this.host, organizationSlug, replayId, this.protocol);\n\t}\n\tgetAIConversationUrl(organizationSlug, conversationId) {\n\t\treturn getAIConversationUrl(this.host, organizationSlug, conversationId, this.protocol);\n\t}\n\t/** Builds the Sentry UI URL for the AI Conversations list with optional filters. */\n\tgetAIConversationsUrl(organizationSlug, options) {\n\t\treturn getAIConversationsUrl(this.host, organizationSlug, options, this.protocol);\n\t}\n\tgetProfileUrl(organizationSlug, projectSlug, profileId) {\n\t\treturn getProfileUrl(this.host, organizationSlug, projectSlug, profileId, this.protocol);\n\t}\n\tgetContinuousProfileUrl(organizationSlug, projectSlug, options) {\n\t\treturn getContinuousProfileUrl(this.host, organizationSlug, projectSlug, options, this.protocol);\n\t}\n\tgetReplaysSearchUrl(organizationSlug, options = {}) {\n\t\treturn getReplaysSearchUrl(this.host, organizationSlug, options, this.protocol);\n\t}\n\tgetMonitorUrl(organizationSlug, monitorSlug, projectSlug) {\n\t\treturn getMonitorUrl(this.host, organizationSlug, monitorSlug, this.protocol, projectSlug);\n\t}\n\tgetUptimeMonitorUrl(organizationSlug, uptimeMonitorId) {\n\t\treturn getUptimeMonitorUrl(this.host, organizationSlug, uptimeMonitorId, this.protocol);\n\t}\n\tgetReleaseUrl(organizationSlug, releaseVersion) {\n\t\treturn getReleaseUrl(this.host, organizationSlug, releaseVersion, this.protocol);\n\t}\n\tgetDashboardUrl(organizationSlug, dashboardId, options = {}) {\n\t\treturn getDashboardUrl(this.host, organizationSlug, dashboardId, options, this.protocol);\n\t}\n\tgetIssueAlertRuleUrl(organizationSlug, ruleId) {\n\t\tconst encodedRuleId = encodeURIComponent(String(ruleId));\n\t\tif (this.isSaas()) return `${this.protocol}://${organizationSlug}.sentry.io/monitors/alerts/${encodedRuleId}/`;\n\t\treturn `${this.protocol}://${this.host}/organizations/${organizationSlug}/monitors/alerts/${encodedRuleId}/`;\n\t}\n\tgetMetricAlertRuleUrl(organizationSlug, ruleId) {\n\t\tconst encodedRuleId = encodeURIComponent(String(ruleId));\n\t\tif (this.isSaas()) return `${this.protocol}://${organizationSlug}.sentry.io/issues/alerts/rules/details/${encodedRuleId}/`;\n\t\treturn `${this.protocol}://${this.host}/organizations/${organizationSlug}/issues/alerts/rules/details/${encodedRuleId}/`;\n\t}\n\t/**\n\t* Builds a URL for the legacy Discover API (used by errors dataset).\n\t*\n\t* The Discover API is the older query interface that includes aggregate\n\t* functions directly in the field list.\n\t*\n\t* @example\n\t* // URL format: /explore/discover/homepage/?field=title&field=count_unique(user)\n\t* buildDiscoverUrl(\"my-org\", \"level:error\", \"123\", [\"title\", \"count_unique(user)\"], \"-timestamp\")\n\t*/\n\tbuildDiscoverUrl(params) {\n\t\tconst { organizationSlug, query, projectId, fields, sort, statsPeriod, start, end, aggregateFunctions, groupByFields } = params;\n\t\tconst urlParams = new URLSearchParams();\n\t\turlParams.set(\"dataset\", \"errors\");\n\t\turlParams.set(\"queryDataset\", \"error-events\");\n\t\turlParams.set(\"query\", query);\n\t\tif (projectId) urlParams.set(\"project\", projectId);\n\t\tif (fields && fields.length > 0) for (const field of fields) urlParams.append(\"field\", field);\n\t\telse {\n\t\t\turlParams.append(\"field\", \"title\");\n\t\t\turlParams.append(\"field\", \"project\");\n\t\t\turlParams.append(\"field\", \"user.display\");\n\t\t\turlParams.append(\"field\", \"timestamp\");\n\t\t}\n\t\turlParams.set(\"sort\", sort || \"-timestamp\");\n\t\tif (start && end) {\n\t\t\turlParams.set(\"start\", start);\n\t\t\turlParams.set(\"end\", end);\n\t\t} else urlParams.set(\"statsPeriod\", statsPeriod || \"24h\");\n\t\tconst isAggregate = (aggregateFunctions?.length ?? 0) > 0;\n\t\tif (isAggregate) {\n\t\t\turlParams.set(\"mode\", \"aggregate\");\n\t\t\tif (aggregateFunctions && aggregateFunctions.length > 0) urlParams.set(\"yAxis\", aggregateFunctions[0]);\n\t\t} else urlParams.set(\"yAxis\", \"count()\");\n\t\tconst webHost = this.isSaas() ? \"sentry.io\" : this.host;\n\t\tconst path = this.isSaas() ? `${this.protocol}://${organizationSlug}.${webHost}/explore/discover/homepage/` : `${this.protocol}://${this.host}/organizations/${organizationSlug}/explore/discover/homepage/`;\n\t\treturn `${path}?${urlParams.toString()}`;\n\t}\n\tisAggregateExplorerQuery(params) {\n\t\treturn Boolean(params.aggregateFunctions?.length || params.fields?.some((field) => field.includes(\"(\") && field.includes(\")\")));\n\t}\n\t/**\n\t* Adds the structured aggregate fields shared by the Spans and Logs Explorer\n\t* URL formats. Each group-by and collection of y-axes is encoded as a\n\t* separate JSON-valued `aggregateField` parameter.\n\t*\n\t* @example\n\t* aggregateField={\"groupBy\":\"span.op\"}&aggregateField={\"yAxes\":[\"count()\"]}\n\t*/\n\tappendAggregateFields(urlParams, params) {\n\t\tconst { fields, aggregateFunctions, groupByFields } = params;\n\t\tif (aggregateFunctions?.length || groupByFields?.length) {\n\t\t\tfor (const field of groupByFields ?? []) urlParams.append(\"aggregateField\", JSON.stringify({ groupBy: field }));\n\t\t\tif (aggregateFunctions?.length) urlParams.append(\"aggregateField\", JSON.stringify({ yAxes: aggregateFunctions }));\n\t\t\treturn;\n\t\t}\n\t\tconst parsedGroupByFields = fields?.filter((field) => !field.includes(\"(\") && !field.includes(\")\")) ?? [];\n\t\tconst parsedAggregateFunctions = fields?.filter((field) => field.includes(\"(\") && field.includes(\")\")) ?? [];\n\t\tfor (const field of parsedGroupByFields) urlParams.append(\"aggregateField\", JSON.stringify({ groupBy: field }));\n\t\tif (parsedAggregateFunctions.length > 0) urlParams.append(\"aggregateField\", JSON.stringify({ yAxes: parsedAggregateFunctions }));\n\t}\n\tappendExplorerTimeParams(urlParams, params) {\n\t\tif (params.start && params.end) {\n\t\t\turlParams.set(\"start\", params.start);\n\t\t\turlParams.set(\"end\", params.end);\n\t\t} else urlParams.set(\"statsPeriod\", params.statsPeriod || \"24h\");\n\t}\n\tbuildExplorePath(organizationSlug, page) {\n\t\tif (this.isSaas()) return `${this.protocol}://${organizationSlug}.sentry.io/explore/${page}/`;\n\t\treturn `${this.protocol}://${this.host}/organizations/${organizationSlug}/explore/${page}/`;\n\t}\n\t/** Builds a Spans Explorer URL using its `query`, `field`, and `sort` contract. */\n\tbuildSpansExplorerUrl(params) {\n\t\tconst { organizationSlug, query, projectId, fields, sort } = params;\n\t\tconst urlParams = new URLSearchParams();\n\t\turlParams.set(\"query\", query);\n\t\tif (projectId) urlParams.set(\"project\", projectId);\n\t\tconst isAggregateQuery = this.isAggregateExplorerQuery(params);\n\t\tif (isAggregateQuery) {\n\t\t\tthis.appendAggregateFields(urlParams, params);\n\t\t\turlParams.set(\"mode\", \"aggregate\");\n\t\t} else for (const field of fields ?? []) urlParams.append(\"field\", field);\n\t\tif (sort) urlParams.set(\"sort\", sort);\n\t\tthis.appendExplorerTimeParams(urlParams, params);\n\t\turlParams.set(\"table\", \"span\");\n\t\treturn `${this.buildExplorePath(organizationSlug, \"traces\")}?${urlParams.toString()}`;\n\t}\n\t/**\n\t* Builds a Logs Explorer URL using its logs-specific page parameters.\n\t* Sample and aggregate views use distinct field and sort parameters, and an\n\t* omitted project is represented by `project=-1` to preserve all-project scope.\n\t*/\n\tbuildLogsExplorerUrl(params) {\n\t\tconst { organizationSlug, query, projectId, fields, sort } = params;\n\t\tconst urlParams = new URLSearchParams();\n\t\turlParams.set(\"logsQuery\", query);\n\t\turlParams.set(\"project\", projectId ?? \"-1\");\n\t\tconst isAggregateQuery = this.isAggregateExplorerQuery(params);\n\t\tif (isAggregateQuery) this.appendAggregateFields(urlParams, params);\n\t\telse for (const field of fields ?? []) urlParams.append(\"logsFields\", field);\n\t\turlParams.set(\"mode\", isAggregateQuery ? \"aggregate\" : \"samples\");\n\t\tif (sort) urlParams.set(isAggregateQuery ? \"logsAggregateSortBys\" : \"logsSortBys\", sort);\n\t\tthis.appendExplorerTimeParams(urlParams, params);\n\t\treturn `${this.buildExplorePath(organizationSlug, \"logs\")}?${urlParams.toString()}`;\n\t}\n\textractTraceMetricsFromResults(eventData) {\n\t\tconst metrics = /* @__PURE__ */ new Map();\n\t\tfor (const event of eventData ?? []) {\n\t\t\tconst name = event[\"metric.name\"];\n\t\t\tconst type = event[\"metric.type\"];\n\t\t\tconst rawUnit = event[\"metric.unit\"];\n\t\t\tif (typeof name !== \"string\" || typeof type !== \"string\") continue;\n\t\t\tconst unit = typeof rawUnit === \"string\" && rawUnit !== \"-\" ? rawUnit : void 0;\n\t\t\tconst key = `${name}|${type}|${unit ?? \"\"}`;\n\t\t\tif (!metrics.has(key)) metrics.set(key, {\n\t\t\t\tname,\n\t\t\t\ttype,\n\t\t\t\tunit\n\t\t\t});\n\t\t}\n\t\treturn [...metrics.values()];\n\t}\n\t/**\n\t* Generates a Sentry events explorer URL for viewing search results.\n\t*\n\t* Routes to the appropriate API based on dataset:\n\t* - Errors: Uses legacy Discover API\n\t* - Spans/Logs: Uses modern EAP (Event Analytics Platform) API\n\t* - Metrics: Uses the Metrics page URL format\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param query Sentry search query\n\t* @param projectId Optional project filter\n\t* @param dataset Dataset type (spans, errors, logs, or metrics)\n\t* @param fields Array of fields to include in results\n\t* @param sort Sort parameter (e.g., \"-timestamp\", \"-count()\")\n\t* @param aggregateFunctions Array of aggregate functions for aggregate queries\n\t* @param groupByFields Array of fields to group by for aggregate queries\n\t* @param statsPeriod Relative time period (e.g., \"24h\", \"7d\")\n\t* @param start Absolute start time (ISO 8601)\n\t* @param end Absolute end time (ISO 8601)\n\t* @param eventData Optional event rows used to derive trace metric identity for metrics sample URLs\n\t* @returns Full URL to the events explorer in Sentry UI\n\t*/\n\tgetEventsExplorerUrl(organizationSlug, query, projectId, dataset = \"spans\", fields, sort, aggregateFunctions, groupByFields, statsPeriod, start, end, eventData) {\n\t\tif (dataset === \"errors\") return this.buildDiscoverUrl({\n\t\t\torganizationSlug,\n\t\t\tquery,\n\t\t\tprojectId,\n\t\t\tfields,\n\t\t\tsort,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\taggregateFunctions,\n\t\t\tgroupByFields\n\t\t});\n\t\tif (isMetricsDataset(dataset)) return getTraceMetricsExploreUrl(this.host, organizationSlug, {\n\t\t\tquery,\n\t\t\tprojectId,\n\t\t\tsort,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\taggregateFunctions,\n\t\t\tgroupByFields,\n\t\t\ttraceMetrics: this.extractTraceMetricsFromResults(eventData)\n\t\t}, this.protocol);\n\t\tif (isProfilesDataset(dataset)) return getProfilingExplorerUrl(this.host, organizationSlug, {\n\t\t\tquery,\n\t\t\tprojectId,\n\t\t\tfields,\n\t\t\tsort,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\taggregateFunctions,\n\t\t\tgroupByFields\n\t\t}, this.protocol);\n\t\tconst explorerParams = {\n\t\t\torganizationSlug,\n\t\t\tquery,\n\t\t\tprojectId,\n\t\t\tfields,\n\t\t\tsort,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\taggregateFunctions,\n\t\t\tgroupByFields\n\t\t};\n\t\treturn dataset === \"logs\" ? this.buildLogsExplorerUrl(explorerParams) : this.buildSpansExplorerUrl(explorerParams);\n\t}\n\t/**\n\t* Retrieves the authenticated user's profile information.\n\t*\n\t* @param opts Request options including host override\n\t* @returns User profile data\n\t* @throws {ApiError} If authentication fails or user not found\n\t*/\n\tasync getAuthenticatedUser(opts) {\n\t\tlet authHost;\n\t\tif (this.isSaas()) authHost = \"sentry.io\";\n\t\tconst body = await this.requestJSON(\"/auth/\", void 0, {\n\t\t\t...opts,\n\t\t\thost: authHost\n\t\t});\n\t\treturn UserSchema.parse(body);\n\t}\n\t/**\n\t* Lists all organizations accessible to the authenticated user.\n\t*\n\t* Queries the `/organizations/` endpoint on the root host.\n\t*\n\t* @param params Query parameters\n\t* @param params.query Search query to filter organizations by name/slug\n\t* @param params.limit Maximum number of organizations to return (defaults to 25)\n\t* @returns Array of organizations across all accessible regions\n\t*\n\t* @example\n\t* ```typescript\n\t* const orgs = await apiService.listOrganizations();\n\t* orgs.forEach(org => {\n\t*   // regionUrl present for Cloud Service, empty for self-hosted\n\t*   console.log(`${org.name} (${org.slug}) - ${org.links?.regionUrl || 'No region URL'}`);\n\t* });\n\t* ```\n\t*/\n\tasync listOrganizations(params) {\n\t\tconst limit = params?.limit ?? 25;\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", String(limit));\n\t\tif (params?.query) queryParams.set(\"query\", params.query);\n\t\tconst queryString = queryParams.toString();\n\t\tconst path = `/organizations/?${queryString}`;\n\t\tlet host = void 0;\n\t\tif (this.isSaas()) host = \"sentry.io\";\n\t\tconst body = await this.requestJSON(path, void 0, { host });\n\t\treturn OrganizationListSchema.parse(body);\n\t}\n\t/**\n\t* Gets a single organization by slug.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param opts Request options including host override\n\t* @returns Organization data\n\t*/\n\tasync getOrganization(organizationSlug, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/`, void 0, opts);\n\t\treturn OrganizationSchema.parse(body);\n\t}\n\t/**\n\t* Lists teams within an organization.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param params Query parameters\n\t* @param params.query Search query to filter teams by name/slug\n\t* @param params.limit Maximum number of teams to return\n\t* @param opts Request options including host override\n\t* @returns Array of teams in the organization\n\t*/\n\tasync listTeams(organizationSlug, params, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", String(params?.limit ?? 25));\n\t\tif (params?.query) queryParams.set(\"query\", params.query);\n\t\tconst queryString = queryParams.toString();\n\t\tconst teamsPath = apiPath`/organizations/${organizationSlug}/teams/`;\n\t\tconst path = `${teamsPath}?${queryString}`;\n\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\treturn TeamListSchema.parse(body);\n\t}\n\t/**\n\t* Creates a new team within an organization.\n\t*\n\t* @param params Team creation parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.name Team name\n\t* @param opts Request options\n\t* @returns Created team data\n\t* @throws {ApiError} If team creation fails (e.g., name conflicts)\n\t*/\n\tasync createTeam({ organizationSlug, name }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/teams/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({ name })\n\t\t}, opts);\n\t\treturn TeamSchema.parse(body);\n\t}\n\t/**\n\t* Lists projects within an organization.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param params Query parameters\n\t* @param params.query Search query to filter projects by name/slug\n\t* @param params.limit Maximum number of projects to return\n\t* @param opts Request options\n\t* @returns Array of projects in the organization\n\t*/\n\tasync listProjects(organizationSlug, params, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", String(params?.limit ?? 25));\n\t\tif (params?.query) queryParams.set(\"query\", params.query);\n\t\tconst queryString = queryParams.toString();\n\t\tconst projectsPath = apiPath`/organizations/${organizationSlug}/projects/`;\n\t\tconst path = `${projectsPath}?${queryString}`;\n\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\treturn ProjectListSchema.parse(body);\n\t}\n\tasync listDashboards({ organizationSlug, query, sortBy, limit = 10, cursor }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", String(limit));\n\t\tif (query) queryParams.set(\"query\", query);\n\t\tif (sortBy) queryParams.set(\"sort\", sortBy);\n\t\tif (cursor) queryParams.set(\"cursor\", cursor);\n\t\tconst response = await this.request(apiPath`/organizations/${organizationSlug}/dashboards/` + `?${queryParams.toString()}`, void 0, opts);\n\t\tconst body = await this.parseJsonResponse(response);\n\t\treturn {\n\t\t\tdashboards: DashboardListSchema.parse(body),\n\t\t\tnextCursor: getNextCursor(response.headers.get(\"link\"))\n\t\t};\n\t}\n\tasync getDashboard({ organizationSlug, dashboardId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/dashboards/${dashboardId}/`, void 0, opts);\n\t\treturn DashboardSchema.parse(body);\n\t}\n\t/**\n\t* Gets a single project by slug or ID.\n\t*\n\t* @param params Project fetch parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlugOrId Project slug or numeric ID\n\t* @param opts Request options\n\t* @returns Project data\n\t*/\n\tasync getProject({ organizationSlug, projectSlugOrId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlugOrId}/`, void 0, opts);\n\t\treturn ProjectSchema.parse(body);\n\t}\n\t/**\n\t* Creates a new project within a team.\n\t*\n\t* @param params Project creation parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.teamSlug Team identifier\n\t* @param params.name Project name\n\t* @param params.slug Optional project slug\n\t* @param params.platform Platform identifier (e.g., \"javascript\", \"python\")\n\t* @param opts Request options\n\t* @returns Created project data\n\t*/\n\tasync createProject({ organizationSlug, teamSlug, name, slug, platform }, opts) {\n\t\tconst createData = { name };\n\t\tif (slug) createData.slug = slug;\n\t\tif (platform) createData.platform = platform;\n\t\tconst body = await this.requestJSON(apiPath`/teams/${organizationSlug}/${teamSlug}/projects/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify(createData)\n\t\t}, opts);\n\t\treturn ProjectSchema.parse(body);\n\t}\n\t/**\n\t* Updates an existing project's configuration.\n\t*\n\t* @param params Project update parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Current project identifier\n\t* @param params.name New project name (optional)\n\t* @param params.slug New project slug (optional)\n\t* @param params.platform New platform identifier (optional)\n\t* @param opts Request options\n\t* @returns Updated project data\n\t*/\n\tasync updateAgenticOnboardingStatus({ organizationSlug, update }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/onboarding/agent/status/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify(update)\n\t\t}, opts);\n\t\treturn AgenticOnboardingRunSchema.parse(body);\n\t}\n\tasync updateProject({ organizationSlug, projectSlug, name, slug, platform }, opts) {\n\t\tconst updateData = {};\n\t\tif (name) updateData.name = name;\n\t\tif (slug) updateData.slug = slug;\n\t\tif (platform) updateData.platform = platform;\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/`, {\n\t\t\tmethod: \"PUT\",\n\t\t\tbody: JSON.stringify(updateData)\n\t\t}, opts);\n\t\treturn ProjectSchema.parse(body);\n\t}\n\tasync listRepos({ organizationSlug, query }, opts) {\n\t\tlet cursor = null;\n\t\tconst repos = [];\n\t\tdo {\n\t\t\tconst params = new URLSearchParams();\n\t\t\tparams.set(\"per_page\", \"100\");\n\t\t\tif (query) params.set(\"query\", query);\n\t\t\tif (cursor) params.set(\"cursor\", cursor);\n\t\t\tconst response = await this.request(apiPath`/organizations/${organizationSlug}/repos/` + `?${params.toString()}`, { method: \"GET\" }, opts);\n\t\t\tconst body = await this.parseJsonResponse(response);\n\t\t\trepos.push(...RepositoryListSchema.parse(body));\n\t\t\tcursor = getNextCursor(response.headers.get(\"link\"));\n\t\t} while (cursor);\n\t\treturn repos;\n\t}\n\tasync linkProjectRepository({ organizationSlug, projectSlug, repository, provider }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/code-mappings/bulk/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tproject: projectSlug,\n\t\t\t\trepository,\n\t\t\t\tprovider,\n\t\t\t\tmappings: [{\n\t\t\t\t\tstackRoot: \"\",\n\t\t\t\t\tsourceRoot: \"\"\n\t\t\t\t}]\n\t\t\t})\n\t\t}, opts);\n\t\treturn ProjectRepositoryMappingSchema.parse(body);\n\t}\n\tasync listIssueAlertRules(params, opts) {\n\t\tconst page = await this.listIssueAlertRulesPage(params, opts);\n\t\treturn page.rules;\n\t}\n\tasync listIssueAlertRulesPage({ organizationSlug, projectSlug, query, cursor, limit }, opts) {\n\t\tconst rules = [];\n\t\tconst targetLimit = limit ?? 100;\n\t\tlet currentCursor = cursor;\n\t\tlet nextCursor = null;\n\t\tdo {\n\t\t\tconst searchQuery = new URLSearchParams();\n\t\t\tsearchQuery.append(\"projectSlug\", projectSlug);\n\t\t\tsearchQuery.set(\"sortBy\", \"-id\");\n\t\t\tif (query) searchQuery.set(\"query\", formatWorkflowNameQuery(query));\n\t\t\tif (currentCursor) searchQuery.set(\"cursor\", currentCursor);\n\t\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(targetLimit - rules.length));\n\t\t\tconst response = await this.request(apiPath`/organizations/${organizationSlug}/workflows/` + `?${searchQuery.toString()}`, void 0, opts);\n\t\t\tconst body = await this.parseJsonResponse(response);\n\t\t\tconst attachedRules = filterAttachedIssueAlertRules(IssueAlertRuleListSchema.parse(body));\n\t\t\tconst remaining = targetLimit - rules.length;\n\t\t\tif (attachedRules.length > remaining) {\n\t\t\t\trules.push(...attachedRules.slice(0, remaining));\n\t\t\t\tnextCursor = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\trules.push(...attachedRules);\n\t\t\tnextCursor = getNextCursor(response.headers.get(\"link\"));\n\t\t\tcurrentCursor = nextCursor;\n\t\t} while (rules.length < targetLimit && nextCursor);\n\t\treturn {\n\t\t\trules,\n\t\t\tnextCursor\n\t\t};\n\t}\n\tasync getIssueAlertRule({ organizationSlug, projectSlug, ruleId }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tsearchQuery.append(\"projectSlug\", projectSlug);\n\t\tsearchQuery.append(\"id\", String(ruleId));\n\t\tsearchQuery.set(\"per_page\", \"1\");\n\t\tconst response = await this.request(apiPath`/organizations/${organizationSlug}/workflows/` + `?${searchQuery.toString()}`, void 0, opts);\n\t\tconst rules = filterAttachedIssueAlertRules(IssueAlertRuleListSchema.parse(await this.parseJsonResponse(response)));\n\t\tconst rule = rules[0];\n\t\tif (!rule) throw new ApiNotFoundError(\"Workflow not found\", void 0, void 0, \"workflow\", String(ruleId));\n\t\treturn rule;\n\t}\n\tasync listMetricAlertRules(params, opts) {\n\t\tconst page = await this.listMetricAlertRulesPage(params, opts);\n\t\treturn page.rules;\n\t}\n\tasync listMetricAlertRulesPage({ organizationSlug, projectSlug, query, cursor, limit }, opts) {\n\t\tconst project = projectSlug ? await this.getProject({\n\t\t\torganizationSlug,\n\t\t\tprojectSlugOrId: projectSlug\n\t\t}, opts) : void 0;\n\t\tif (query) {\n\t\t\tconst body$1 = await this.listCombinedAlertRules({\n\t\t\t\torganizationSlug,\n\t\t\t\tname: query,\n\t\t\t\talertType: \"alert_rule\",\n\t\t\t\tprojectId: project?.id,\n\t\t\t\tcursor,\n\t\t\t\tlimit\n\t\t\t}, opts);\n\t\t\treturn {\n\t\t\t\trules: MetricAlertRuleListSchema.parse(body$1.data),\n\t\t\t\tnextCursor: body$1.nextCursor\n\t\t\t};\n\t\t}\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (cursor) searchQuery.set(\"cursor\", cursor);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tif (project) searchQuery.set(\"project\", String(project.id));\n\t\tconst queryString = searchQuery.toString();\n\t\tconst path = apiPath`/organizations/${organizationSlug}/alert-rules/`;\n\t\tconst response = await this.request(`${path}${queryString ? `?${queryString}` : \"\"}`, void 0, opts);\n\t\tconst body = await this.parseJsonResponse(response);\n\t\treturn {\n\t\t\trules: MetricAlertRuleListSchema.parse(body),\n\t\t\tnextCursor: getNextCursor(response.headers.get(\"link\"))\n\t\t};\n\t}\n\tasync getMetricAlertRule({ organizationSlug, ruleId }, opts) {\n\t\tconst path = apiPath`/organizations/${organizationSlug}/alert-rules/${ruleId}/`;\n\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\treturn MetricAlertRuleSchema.parse(body);\n\t}\n\t/**\n\t* Uses Sentry's combined-rules endpoint for metric alert name search.\n\t*/\n\tasync listCombinedAlertRules({ organizationSlug, name, alertType, projectId, cursor, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tsearchQuery.set(\"name\", name);\n\t\tsearchQuery.append(\"alertType\", alertType);\n\t\tif (projectId !== void 0) searchQuery.append(\"project\", String(projectId));\n\t\tif (cursor) searchQuery.set(\"cursor\", cursor);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst response = await this.request(apiPath`/organizations/${organizationSlug}/combined-rules/` + `?${searchQuery.toString()}`, void 0, opts);\n\t\treturn {\n\t\t\tdata: await this.parseJsonResponse(response),\n\t\t\tnextCursor: getNextCursor(response.headers.get(\"link\"))\n\t\t};\n\t}\n\t/**\n\t* Lists teams assigned to a project.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param opts Request options\n\t* @returns Array of teams assigned to the project\n\t*/\n\tasync listProjectTeams({ organizationSlug, projectSlug }, opts) {\n\t\tconst teams = [];\n\t\tlet cursor = null;\n\t\tdo {\n\t\t\tconst queryParams = new URLSearchParams();\n\t\t\tqueryParams.set(\"per_page\", \"100\");\n\t\t\tif (cursor) queryParams.set(\"cursor\", cursor);\n\t\t\tconst response = await this.request(apiPath`/projects/${organizationSlug}/${projectSlug}/teams/` + `?${queryParams.toString()}`, void 0, opts);\n\t\t\tconst body = await this.parseJsonResponse(response);\n\t\t\tteams.push(...TeamListSchema.parse(body));\n\t\t\tcursor = getNextCursor(response.headers.get(\"link\"));\n\t\t} while (cursor);\n\t\treturn teams;\n\t}\n\t/**\n\t* Assigns a team to a project.\n\t*\n\t* @param params Assignment parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param params.teamSlug Team identifier to assign\n\t* @param opts Request options\n\t*/\n\tasync addTeamToProject({ organizationSlug, projectSlug, teamSlug }, opts) {\n\t\tawait this.request(apiPath`/projects/${organizationSlug}/${projectSlug}/teams/${teamSlug}/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({})\n\t\t}, opts);\n\t}\n\t/**\n\t* Removes a team from a project.\n\t*\n\t* @param params Assignment parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param params.teamSlug Team identifier to remove\n\t* @param opts Request options\n\t*/\n\tasync removeTeamFromProject({ organizationSlug, projectSlug, teamSlug }, opts) {\n\t\tawait this.request(apiPath`/projects/${organizationSlug}/${projectSlug}/teams/${teamSlug}/`, { method: \"DELETE\" }, opts);\n\t}\n\t/**\n\t* Creates a new client key (DSN) for a project.\n\t*\n\t* Client keys are used to identify and authenticate SDK requests to Sentry.\n\t*\n\t* @param params Key creation parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param params.name Human-readable name for the key (optional)\n\t* @param opts Request options\n\t* @returns Created client key with DSN information\n\t*\n\t* @example\n\t* ```typescript\n\t* const key = await apiService.createClientKey({\n\t*   organizationSlug: \"my-org\",\n\t*   projectSlug: \"my-project\",\n\t*   name: \"Production\"\n\t* });\n\t* console.log(`DSN: ${key.dsn.public}`);\n\t* ```\n\t*/\n\tasync createClientKey({ organizationSlug, projectSlug, name }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/keys/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({ name })\n\t\t}, opts);\n\t\treturn ClientKeySchema.parse(body);\n\t}\n\t/**\n\t* Updates a client key (DSN) for a project.\n\t*\n\t* @param params Key update parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param params.keyId The ID of the key to update\n\t* @param params.name Human-readable name for the key (optional)\n\t* @param params.isActive Activate or deactivate the client key (optional)\n\t* @param params.rateLimit Applies a rate limit to cap the number of errors accepted during a given time window (optional, null to disable)\n\t* @param params.browserSdkVersion Sentry Javascript SDK version to use (optional)\n\t* @param params.dynamicSdkLoaderOptions Configures options for the Javascript Loader Script (optional)\n\t* @param opts Request options\n\t* @returns Updated client key with DSN information\n\t*/\n\tasync updateClientKey({ organizationSlug, projectSlug, keyId, name, isActive, rateLimit, browserSdkVersion, dynamicSdkLoaderOptions }, opts) {\n\t\tconst updateData = {};\n\t\tif (name !== void 0) updateData.name = name;\n\t\tif (isActive !== void 0) updateData.isActive = isActive;\n\t\tif (rateLimit !== void 0) updateData.rateLimit = rateLimit;\n\t\tif (browserSdkVersion !== void 0) updateData.browserSdkVersion = browserSdkVersion;\n\t\tif (dynamicSdkLoaderOptions !== void 0) updateData.dynamicSdkLoaderOptions = dynamicSdkLoaderOptions;\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/keys/${keyId}/`, {\n\t\t\tmethod: \"PUT\",\n\t\t\tbody: JSON.stringify(updateData)\n\t\t}, opts);\n\t\treturn ClientKeySchema.parse(body);\n\t}\n\t/**\n\t* Lists all client keys (DSNs) for a project.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param opts Request options\n\t* @returns Array of client keys with DSN information\n\t*/\n\tasync listClientKeys({ organizationSlug, projectSlug }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/keys/`, void 0, opts);\n\t\treturn ClientKeyListSchema.parse(body);\n\t}\n\t/**\n\t* Lists releases for an organization or specific project.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier (optional, scopes to specific project)\n\t* @param params.query Search query for filtering releases\n\t* @param opts Request options\n\t* @returns Array of releases with deployment and commit information\n\t*\n\t* @example\n\t* ```typescript\n\t* // All releases for organization\n\t* const releases = await apiService.listReleases({\n\t*   organizationSlug: \"my-org\"\n\t* });\n\t*\n\t* // Search for specific version\n\t* const filtered = await apiService.listReleases({\n\t*   organizationSlug: \"my-org\",\n\t*   query: \"v1.2.3\"\n\t* });\n\t* ```\n\t*/\n\tasync listReleases({ organizationSlug, projectSlug, query, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (query) searchQuery.set(\"query\", query);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst path = projectSlug ? apiPath`/projects/${organizationSlug}/${projectSlug}/releases/` : apiPath`/organizations/${organizationSlug}/releases/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn ReleaseListSchema.parse(body);\n\t}\n\tasync getReleaseDetails({ organizationSlug, releaseVersion, projectSlugOrId, includeHealth }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (includeHealth) searchQuery.set(\"health\", \"1\");\n\t\tconst path = projectSlugOrId ? apiPath`/projects/${organizationSlug}/${projectSlugOrId}/releases/${releaseVersion}/` : apiPath`/organizations/${organizationSlug}/releases/${releaseVersion}/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn ReleaseDetailsSchema.parse(body);\n\t}\n\tasync listReleaseDeploys({ organizationSlug, releaseVersion, projectSlugOrId, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (projectSlugOrId) searchQuery.set(isNumericId(projectSlugOrId) ? \"project\" : \"projectSlug\", projectSlugOrId);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst path = apiPath`/organizations/${organizationSlug}/releases/${releaseVersion}/deploys/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn DeployListSchema.parse(body);\n\t}\n\tasync listReleaseCommits({ organizationSlug, releaseVersion, projectSlugOrId, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst path = projectSlugOrId ? apiPath`/projects/${organizationSlug}/${projectSlugOrId}/releases/${releaseVersion}/commits/` : apiPath`/organizations/${organizationSlug}/releases/${releaseVersion}/commits/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn CommitListSchema.parse(body);\n\t}\n\tasync listMonitors({ organizationSlug, projectSlug, environment, owner, query, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (projectSlug) searchQuery.append(\"projectSlug\", projectSlug);\n\t\tif (environment) searchQuery.append(\"environment\", environment);\n\t\tif (owner) searchQuery.append(\"owner\", owner);\n\t\tif (query) searchQuery.set(\"query\", query);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? apiPath`/organizations/${organizationSlug}/monitors/` + `?${searchQuery.toString()}` : apiPath`/organizations/${organizationSlug}/monitors/`, void 0, opts);\n\t\treturn MonitorListSchema.parse(body);\n\t}\n\tasync getMonitorDetails({ organizationSlug, projectSlug, monitorSlug, environment }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (environment) searchQuery.append(\"environment\", environment);\n\t\tconst path = projectSlug ? apiPath`/projects/${organizationSlug}/${projectSlug}/monitors/${monitorSlug}/` : apiPath`/organizations/${organizationSlug}/monitors/${monitorSlug}/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn MonitorSchema.parse(body);\n\t}\n\tasync listMonitorCheckIns({ organizationSlug, projectSlug, monitorSlug, environment, statsPeriod, start, end, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (environment) searchQuery.append(\"environment\", environment);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst normalizedStatsPeriod = normalizeStatsPeriod(statsPeriod);\n\t\tconst effectiveStatsPeriod = start || end ? normalizedStatsPeriod : normalizedStatsPeriod ?? \"24h\";\n\t\tif (effectiveStatsPeriod) parseStatsPeriod(effectiveStatsPeriod);\n\t\tthis.applyTimeParams(searchQuery, effectiveStatsPeriod, start, end);\n\t\tconst path = projectSlug ? apiPath`/projects/${organizationSlug}/${projectSlug}/monitors/${monitorSlug}/checkins/` : apiPath`/organizations/${organizationSlug}/monitors/${monitorSlug}/checkins/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn MonitorCheckInListSchema.parse(body);\n\t}\n\tasync getMonitorStats({ organizationSlug, projectSlug, monitorSlug, environment, statsPeriod, start, end, rollup }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (environment) searchQuery.append(\"environment\", environment);\n\t\tconst normalizedStatsPeriod = normalizeStatsPeriod(statsPeriod);\n\t\tconst effectiveStatsPeriod = start || end ? normalizedStatsPeriod : normalizedStatsPeriod ?? \"24h\";\n\t\tthis.applyStatsMixinTimeParams(searchQuery, effectiveStatsPeriod, start, end, rollup);\n\t\tconst path = projectSlug ? apiPath`/projects/${organizationSlug}/${projectSlug}/monitors/${monitorSlug}/stats/` : apiPath`/organizations/${organizationSlug}/monitors/${monitorSlug}/stats/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn MonitorStatsSchema.parse(body);\n\t}\n\t/**\n\t* List uptime monitors for an organization.\n\t*\n\t* GET /organizations/{org}/uptime/\n\t* Source: src/sentry/uptime/endpoints/organiation_uptime_alert_index.py\n\t*/\n\tasync listUptimeMonitors({ organizationSlug, projectSlug, environment, owner, query, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (projectSlug) {\n\t\t\tconst project = await this.getProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: projectSlug\n\t\t\t}, opts);\n\t\t\tsearchQuery.append(\"project\", String(project.id));\n\t\t}\n\t\tif (environment) searchQuery.append(\"environment\", environment);\n\t\tif (owner) searchQuery.append(\"owner\", owner);\n\t\tif (query) searchQuery.set(\"query\", query);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst path = apiPath`/organizations/${organizationSlug}/uptime/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn UptimeMonitorListSchema.parse(body);\n\t}\n\t/**\n\t* Get a single uptime monitor.\n\t*\n\t* GET /projects/{org}/{project}/uptime/{id}/\n\t* Source: src/sentry/uptime/endpoints/project_uptime_alert_details.py\n\t*/\n\tasync getUptimeMonitorDetails({ organizationSlug, projectSlug, uptimeMonitorId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/uptime/${uptimeMonitorId}/`, void 0, opts);\n\t\treturn UptimeMonitorSchema.parse(body);\n\t}\n\t/**\n\t* List recent uptime checks for a monitor.\n\t*\n\t* GET /projects/{org}/{project}/uptime/{id}/checks/\n\t* Source: src/sentry/uptime/endpoints/project_uptime_alert_checks_index.py\n\t*/\n\tasync listUptimeMonitorChecks({ organizationSlug, projectSlug, uptimeMonitorId, statsPeriod, start, end, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst normalizedStatsPeriod = normalizeStatsPeriod(statsPeriod);\n\t\tconst effectiveStatsPeriod = start || end ? normalizedStatsPeriod : normalizedStatsPeriod ?? \"24h\";\n\t\tif (effectiveStatsPeriod) parseStatsPeriod(effectiveStatsPeriod);\n\t\tthis.applyTimeParams(searchQuery, effectiveStatsPeriod, start, end);\n\t\tconst path = apiPath`/projects/${organizationSlug}/${projectSlug}/uptime/${uptimeMonitorId}/checks/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn UptimeCheckListSchema.parse(body);\n\t}\n\t/**\n\t* Create an uptime monitor.\n\t*\n\t* POST /projects/{org}/{project}/uptime/\n\t* Source: src/sentry/uptime/endpoints/project_uptime_alert_index.py\n\t* Body fields verified from UptimeMonitorValidator (camelCase via CamelSnakeSerializer).\n\t*/\n\tasync createUptimeMonitor({ organizationSlug, projectSlug, name, url, intervalSeconds, timeoutMs, method, headers, body, assertion, status, owner, environment, traceSampling, responseCaptureEnabled, recoveryThreshold, downtimeThreshold }, opts) {\n\t\tconst payload = {\n\t\t\tname,\n\t\t\turl,\n\t\t\tintervalSeconds,\n\t\t\ttimeoutMs\n\t\t};\n\t\tif (method !== void 0) payload.method = method;\n\t\tif (headers !== void 0) payload.headers = headers;\n\t\tif (body !== void 0) payload.body = body;\n\t\tif (assertion !== void 0) payload.assertion = assertion;\n\t\tif (status !== void 0) payload.status = status;\n\t\tif (owner !== void 0) payload.owner = owner;\n\t\tif (environment !== void 0) payload.environment = environment;\n\t\tif (traceSampling !== void 0) payload.traceSampling = traceSampling;\n\t\tif (responseCaptureEnabled !== void 0) payload.responseCaptureEnabled = responseCaptureEnabled;\n\t\tif (recoveryThreshold !== void 0) payload.recoveryThreshold = recoveryThreshold;\n\t\tif (downtimeThreshold !== void 0) payload.downtimeThreshold = downtimeThreshold;\n\t\tconst responseBody = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/uptime/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify(payload)\n\t\t}, opts);\n\t\treturn UptimeMonitorSchema.parse(responseBody);\n\t}\n\t/**\n\t* Update an uptime monitor.\n\t*\n\t* PUT /projects/{org}/{project}/uptime/{id}/\n\t* Source: src/sentry/uptime/endpoints/project_uptime_alert_details.py\n\t*/\n\tasync updateUptimeMonitor({ organizationSlug, projectSlug, uptimeMonitorId, name, url, intervalSeconds, timeoutMs, method, headers, body, assertion, status, owner, environment, traceSampling, responseCaptureEnabled, recoveryThreshold, downtimeThreshold }, opts) {\n\t\tconst payload = {};\n\t\tif (name !== void 0) payload.name = name;\n\t\tif (url !== void 0) payload.url = url;\n\t\tif (intervalSeconds !== void 0) payload.intervalSeconds = intervalSeconds;\n\t\tif (timeoutMs !== void 0) payload.timeoutMs = timeoutMs;\n\t\tif (method !== void 0) payload.method = method;\n\t\tif (headers !== void 0) payload.headers = headers;\n\t\tif (body !== void 0) payload.body = body;\n\t\tif (assertion !== void 0) payload.assertion = assertion;\n\t\tif (status !== void 0) payload.status = status;\n\t\tif (owner !== void 0) payload.owner = owner;\n\t\tif (environment !== void 0) payload.environment = environment;\n\t\tif (traceSampling !== void 0) payload.traceSampling = traceSampling;\n\t\tif (responseCaptureEnabled !== void 0) payload.responseCaptureEnabled = responseCaptureEnabled;\n\t\tif (recoveryThreshold !== void 0) payload.recoveryThreshold = recoveryThreshold;\n\t\tif (downtimeThreshold !== void 0) payload.downtimeThreshold = downtimeThreshold;\n\t\tconst responseBody = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/uptime/${uptimeMonitorId}/`, {\n\t\t\tmethod: \"PUT\",\n\t\t\tbody: JSON.stringify(payload)\n\t\t}, opts);\n\t\treturn UptimeMonitorSchema.parse(responseBody);\n\t}\n\t/**\n\t* Delete an uptime monitor.\n\t*\n\t* DELETE /projects/{org}/{project}/uptime/{id}/\n\t* Source: src/sentry/uptime/endpoints/project_uptime_alert_details.py\n\t* Returns 202 with empty body.\n\t*/\n\tasync deleteUptimeMonitor({ organizationSlug, projectSlug, uptimeMonitorId }, opts) {\n\t\tawait this.request(apiPath`/projects/${organizationSlug}/${projectSlug}/uptime/${uptimeMonitorId}/`, { method: \"DELETE\" }, {\n\t\t\t...opts,\n\t\t\tallowStatuses: [404]\n\t\t});\n\t}\n\t/**\n\t* Lists available tags for search queries.\n\t*\n\t* Tags represent indexed fields that can be used in Sentry search queries.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.dataset Dataset to query tags for (\"events\", \"errors\", \"replays\", or \"search_issues\")\n\t* @param params.project Numeric project ID to filter tags\n\t* @param params.statsPeriod Time range for tag statistics (e.g., \"24h\", \"7d\")\n\t* @param params.useCache Whether to use cached results\n\t* @param params.useFlagsBackend Whether to use flags backend features\n\t* @param opts Request options\n\t* @returns Array of available tags with metadata\n\t*\n\t* @example\n\t* ```typescript\n\t* const tags = await apiService.listTags({\n\t*   organizationSlug: \"my-org\",\n\t*   dataset: \"events\",\n\t*   project: \"123456\",\n\t*   statsPeriod: \"24h\",\n\t*   useCache: true\n\t* });\n\t* tags.forEach(tag => console.log(`${tag.key}: ${tag.name}`));\n\t* ```\n\t*/\n\tasync listTags({ organizationSlug, dataset, project, statsPeriod, start, end, useCache, useFlagsBackend }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (dataset) searchQuery.set(\"dataset\", dataset);\n\t\tif (project) searchQuery.set(\"project\", project);\n\t\tthis.applyTimeParams(searchQuery, statsPeriod, start, end);\n\t\tif (useCache !== void 0) searchQuery.set(\"useCache\", useCache ? \"1\" : \"0\");\n\t\tif (useFlagsBackend !== void 0) searchQuery.set(\"useFlagsBackend\", useFlagsBackend ? \"1\" : \"0\");\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? apiPath`/organizations/${organizationSlug}/tags/` + `?${searchQuery.toString()}` : apiPath`/organizations/${organizationSlug}/tags/`, void 0, opts);\n\t\treturn TagListSchema.parse(body);\n\t}\n\tasync searchReplays({ organizationSlug, query, limit, projectId, sort, environment, statsPeriod, start, end, fields }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (query) searchQuery.set(\"query\", query);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tif (projectId) searchQuery.append(\"project\", projectId);\n\t\tif (sort) searchQuery.set(\"sort\", sort);\n\t\tif (environment) {\n\t\t\tconst environments = Array.isArray(environment) ? environment : [environment];\n\t\t\tfor (const value of environments) searchQuery.append(\"environment\", value);\n\t\t}\n\t\tif (fields && fields.length > 0) for (const field of fields) searchQuery.append(\"field\", field);\n\t\tthis.applyTimeParams(searchQuery, statsPeriod, start, end);\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? apiPath`/organizations/${organizationSlug}/replays/` + `?${searchQuery.toString()}` : apiPath`/organizations/${organizationSlug}/replays/`, void 0, opts);\n\t\treturn ReplayListResponseSchema.parse(body).data;\n\t}\n\t/**\n\t* Lists trace item attributes available for search queries.\n\t*\n\t* Returns all available fields/attributes that can be used in event searches,\n\t* including both built-in fields and custom tags.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.itemType Item type to query attributes for (\"spans\", \"logs\", or \"tracemetrics\")\n\t* @param params.project Numeric project ID to filter attributes\n\t* @param params.statsPeriod Time range for attribute statistics (e.g., \"24h\", \"7d\")\n\t* @param params.attributeTypes Optional attribute types to keep in the response\n\t* @param opts Request options\n\t* @returns Array of available attributes with metadata including type\n\t*/\n\tasync listTraceItemAttributes({ organizationSlug, itemType = \"spans\", project, statsPeriod, start, end, attributeTypes, substringMatch, query }, opts) {\n\t\tconst attributes = await this.fetchTraceItemAttributes(organizationSlug, itemType, project, statsPeriod, start, end, substringMatch, query, opts);\n\t\tif (!attributeTypes || attributeTypes.length === 0) return attributes;\n\t\tconst allowedTypes = new Set(attributeTypes);\n\t\treturn attributes.filter((attribute) => allowedTypes.has(attribute.type));\n\t}\n\tasync validateEvents({ organizationSlug, dataset = \"spans\", fields, query, orderby, project, environment, statsPeriod, start, end }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"dataset\", normalizeEventsDataset(dataset));\n\t\tif (project) queryParams.set(\"project\", project);\n\t\tif (query) queryParams.set(\"query\", query);\n\t\tif (environment) {\n\t\t\tconst environments = Array.isArray(environment) ? environment : [environment];\n\t\t\tfor (const value of environments) queryParams.append(\"environment\", value);\n\t\t}\n\t\tthis.applyTimeParams(queryParams, statsPeriod, start, end);\n\t\tfor (const field of fields ?? []) queryParams.append(\"field\", field);\n\t\tfor (const value of orderby ?? []) queryParams.append(\"orderby\", value);\n\t\tconst response = await this.request(apiPath`/organizations/${organizationSlug}/events/validate/` + `?${queryParams.toString()}`, void 0, {\n\t\t\t...opts,\n\t\t\tallowStatuses: [400]\n\t\t});\n\t\tconst body = await this.parseJsonResponse(response);\n\t\treturn EventsValidationResponseSchema.parse(body);\n\t}\n\tasync fetchTraceItemAttributes(organizationSlug, itemType, project, statsPeriod, start, end, substringMatch, query, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"itemType\", itemType);\n\t\tif (project) queryParams.set(\"project\", project);\n\t\tif (substringMatch) queryParams.set(\"substringMatch\", substringMatch);\n\t\tif (query) queryParams.set(\"query\", query);\n\t\tthis.applyTimeParams(queryParams, statsPeriod, start, end);\n\t\tconst url = apiPath`/organizations/${organizationSlug}/trace-items/attributes/` + `?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(url, void 0, opts);\n\t\treturn TraceItemAttributeListSchema.parse(body);\n\t}\n\t/**\n\t* Lists issues within an organization or project.\n\t*\n\t* Issues represent groups of similar errors or problems in your application.\n\t* Supports Sentry's powerful query syntax for filtering and sorting.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier (optional, scopes to specific project)\n\t* @param params.query Sentry search query (e.g., \"is:unresolved browser:chrome\")\n\t* @param params.sortBy Sort order (\"user\", \"freq\", \"date\", \"new\", \"recommended\")\n\t* @param opts Request options\n\t* @returns Array of issues with metadata and statistics\n\t*\n\t* @example\n\t* ```typescript\n\t* // Recent unresolved issues\n\t* const issues = await apiService.listIssues({\n\t*   organizationSlug: \"my-org\",\n\t*   query: \"is:unresolved\",\n\t*   sortBy: \"date\"\n\t* });\n\t*\n\t* // High-frequency errors in specific project\n\t* const critical = await apiService.listIssues({\n\t*   organizationSlug: \"my-org\",\n\t*   projectId: \"123456\",\n\t*   query: \"level:error\",\n\t*   sortBy: \"freq\"\n\t* });\n\t* ```\n\t*/\n\tasync listIssues({ organizationSlug, projectId, query, sortBy, limit = 10, statsPeriod = DEFAULT_SEARCH_ISSUES_PERIOD }, opts) {\n\t\tconst sentryQuery = [];\n\t\tif (query) sentryQuery.push(query);\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"limit\", String(limit));\n\t\tif (sortBy) queryParams.set(\"sort\", sortBy);\n\t\tqueryParams.set(\"statsPeriod\", statsPeriod ?? DEFAULT_SEARCH_ISSUES_PERIOD);\n\t\tqueryParams.set(\"query\", sentryQuery.join(\" \"));\n\t\tif (projectId) queryParams.append(\"project\", projectId);\n\t\tqueryParams.append(\"collapse\", \"unhandled\");\n\t\tconst apiUrl = apiPath`/organizations/${organizationSlug}/issues/` + `?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(apiUrl, void 0, opts);\n\t\treturn IssueListSchema.parse(body);\n\t}\n\tasync getIssue({ organizationSlug, issueId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/`, void 0, opts);\n\t\treturn IssueSchema.parse(body);\n\t}\n\t/**\n\t* Retrieves tag value distribution for a specific issue.\n\t*\n\t* Returns aggregate counts of unique tag values, useful for understanding\n\t* how an issue is distributed across different tag values (e.g., URLs,\n\t* browsers, environments).\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.issueId Issue identifier (short ID or numeric ID)\n\t* @param params.tagKey Tag key to get values for (e.g., \"url\", \"browser\", \"environment\")\n\t* @param opts Request options\n\t* @returns Tag value distribution with counts and percentages\n\t*\n\t* @example\n\t* ```typescript\n\t* const tagValues = await apiService.getIssueTagValues({\n\t*   organizationSlug: \"my-org\",\n\t*   issueId: \"PROJECT-123\",\n\t*   tagKey: \"url\"\n\t* });\n\t* console.log(`Total unique values: ${tagValues.totalValues}`);\n\t* tagValues.topValues.forEach(v => console.log(`${v.value}: ${v.count}`));\n\t* ```\n\t*/\n\tasync getIssueTagValues({ organizationSlug, issueId, tagKey }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/tags/${tagKey}/`, void 0, opts);\n\t\treturn IssueTagValuesSchema.parse(body);\n\t}\n\t/**\n\t* Retrieves external issue links for a specific issue.\n\t*\n\t* Returns links to external issue tracking systems (Jira, GitHub Issues,\n\t* GitLab, etc.) that have been associated with this Sentry issue.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.issueId Issue identifier (short ID or numeric ID)\n\t* @param opts Request options\n\t* @returns Array of external issue links with service type and URL\n\t*/\n\tasync getIssueExternalLinks({ organizationSlug, issueId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/external-issues/`, void 0, opts);\n\t\treturn ExternalIssueListSchema.parse(body);\n\t}\n\t/**\n\t* Retrieves issue user reports and returns the next Sentry cursor when another page exists.\n\t*/\n\tasync getIssueUserReports({ organizationSlug, issueId, cursor, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (cursor) searchQuery.set(\"cursor\", cursor);\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst path = apiPath`/organizations/${organizationSlug}/issues/${issueId}/user-reports/`;\n\t\tconst response = await this.request(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\tconst body = await this.parseJsonResponse(response);\n\t\treturn {\n\t\t\treports: UserReportListSchema.parse(body),\n\t\t\tnextCursor: getNextCursor(response.headers.get(\"link\"))\n\t\t};\n\t}\n\tasync getEventForIssue({ organizationSlug, issueId, eventId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`, void 0, opts);\n\t\tconst parseResult = EventSchema.safeParse(body);\n\t\tif (parseResult.success) {\n\t\t\tconst rawEvent = parseResult.data;\n\t\t\tif (rawEvent.type === \"error\" || rawEvent.type === \"default\") return rawEvent;\n\t\t\tif (rawEvent.type === \"transaction\") return rawEvent;\n\t\t\tif (rawEvent.type === \"generic\") return rawEvent;\n\t\t\tif (rawEvent.type === \"csp\") return rawEvent;\n\t\t\tconst eventType$1 = typeof rawEvent.type === \"string\" ? rawEvent.type : String(rawEvent.type);\n\t\t\tlogIssue(`Unsupported event type: ${eventType$1}`, { extra: {\n\t\t\t\teventType: eventType$1,\n\t\t\t\teventId: rawEvent.id\n\t\t\t} });\n\t\t\treturn rawEvent;\n\t\t}\n\t\tconst bodyObj = body;\n\t\tconst eventType = typeof bodyObj.type === \"string\" ? bodyObj.type : String(bodyObj.type);\n\t\tlogIssue(`Event failed schema validation: ${eventType}`, { extra: {\n\t\t\teventType,\n\t\t\teventId: bodyObj.id,\n\t\t\tvalidationError: parseResult.error.message,\n\t\t\tvalidationIssues: parseResult.error.issues\n\t\t} });\n\t\tthrow new ApiValidationError(`Event failed schema validation: ${parseResult.error.message}`, void 0, void 0, body);\n\t}\n\tasync getLatestEventForIssue({ organizationSlug, issueId }, opts) {\n\t\treturn this.getEventForIssue({\n\t\t\torganizationSlug,\n\t\t\tissueId,\n\t\t\teventId: \"latest\"\n\t\t}, opts);\n\t}\n\t/**\n\t* Resolves a stack frame through the project's configured source code mapping.\n\t* The upstream endpoint verifies the mapped path with the SCM integration.\n\t*/\n\tasync getStacktraceLink({ organizationSlug, projectSlug, file, platform, lineNo, absPath, module, package: framePackage, commitId, groupId, sdkName, signal }, opts) {\n\t\tconst query = new URLSearchParams({ file });\n\t\tif (platform) query.set(\"platform\", platform);\n\t\tif (lineNo !== void 0) query.set(\"lineNo\", String(lineNo));\n\t\tif (absPath) query.set(\"absPath\", absPath);\n\t\tif (module) query.set(\"module\", module);\n\t\tif (framePackage) query.set(\"package\", framePackage);\n\t\tif (commitId) query.set(\"commitId\", commitId);\n\t\tif (groupId) query.set(\"groupId\", groupId);\n\t\tif (sdkName) query.set(\"sdkName\", sdkName);\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/stacktrace-link/` + `?${query.toString()}`, { signal }, opts);\n\t\treturn StacktraceLinkSchema.parse(body);\n\t}\n\t/**\n\t* Lists events for a specific issue.\n\t* Uses the issue-specific endpoint which already filters by issue ID.\n\t*\n\t* @see https://docs.sentry.io/api/events/list-an-issues-events/\n\t*/\n\tasync listEventsForIssue({ organizationSlug, issueId, query, limit = 50, sort, statsPeriod, start, end, full = false }, opts) {\n\t\tconst params = new URLSearchParams();\n\t\tif (query) params.append(\"query\", query);\n\t\tparams.append(\"per_page\", String(limit));\n\t\tif (sort) params.append(\"sort\", sort);\n\t\tif (statsPeriod) params.append(\"statsPeriod\", statsPeriod);\n\t\telse if (start && end) {\n\t\t\tparams.append(\"start\", start);\n\t\t\tparams.append(\"end\", end);\n\t\t}\n\t\tif (full) params.append(\"full\", \"true\");\n\t\tconst apiUrl = apiPath`/organizations/${organizationSlug}/issues/${issueId}/events/` + `?${params.toString()}`;\n\t\treturn await this.requestJSON(apiUrl, void 0, opts);\n\t}\n\tasync listEventAttachments({ organizationSlug, projectSlug, eventId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`, void 0, opts);\n\t\treturn EventAttachmentListSchema.parse(body);\n\t}\n\tasync getEventAttachment({ organizationSlug, projectSlug, eventId, attachmentId }, opts) {\n\t\tconst attachmentsData = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`, void 0, opts);\n\t\tconst attachments = EventAttachmentListSchema.parse(attachmentsData);\n\t\tconst attachment = attachments.find((att) => att.id === attachmentId);\n\t\tif (!attachment) throw new ApiNotFoundError(`Attachment with ID ${attachmentId} not found for event ${eventId}`);\n\t\tconst downloadUrl = apiPath`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/${attachmentId}/` + `?download=1`;\n\t\tconst downloadResponse = await this.request(downloadUrl, { method: \"GET\" }, opts);\n\t\tconst contentType = downloadResponse.headers.get(\"content-type\")?.split(\";\")[0].trim() || attachment.mimetype || \"application/octet-stream\";\n\t\treturn {\n\t\t\tattachment,\n\t\t\tdownloadUrl: downloadResponse.url,\n\t\t\tfilename: attachment.name,\n\t\t\tblob: await downloadResponse.blob(),\n\t\t\tcontentType\n\t\t};\n\t}\n\tasync getReplayDetails({ organizationSlug, replayId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/replays/${replayId}/`, void 0, opts);\n\t\treturn z.object({ data: ReplayDetailsSchema }).parse(body).data;\n\t}\n\tasync listReplayIdsForIssue({ organizationSlug, issueId, dataSource }, opts) {\n\t\tconst normalizedIssueId = String(issueId);\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"returnIds\", \"true\");\n\t\tqueryParams.set(\"query\", `issue.id:[${normalizedIssueId}]`);\n\t\tqueryParams.set(\"data_source\", dataSource);\n\t\tqueryParams.set(\"statsPeriod\", \"90d\");\n\t\tqueryParams.append(\"project\", \"-1\");\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/replay-count/` + `?${queryParams.toString()}`, void 0, opts);\n\t\tconst replayIdsByResource = ReplayIdsByResourceSchema.parse(body);\n\t\treturn replayIdsByResource[normalizedIssueId] ?? [];\n\t}\n\tasync getReplayRecordingSegments({ organizationSlug, projectSlugOrId, replayId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/projects/${organizationSlug}/${projectSlugOrId}/replays/${replayId}/recording-segments/` + `?download=true`, void 0, opts);\n\t\treturn ReplayRecordingSegmentsSchema.parse(body);\n\t}\n\tasync updateIssue({ organizationSlug, issueId, status, assignedTo, substatus, ignoreDuration, ignoreCount, ignoreWindow, ignoreUserCount, ignoreUserWindow }, opts) {\n\t\tconst updateData = {};\n\t\tif (status !== void 0) updateData.status = status;\n\t\tif (assignedTo !== void 0) updateData.assignedTo = assignedTo;\n\t\tif (substatus !== void 0) updateData.substatus = substatus;\n\t\tif (ignoreDuration !== void 0) updateData.ignoreDuration = ignoreDuration;\n\t\tif (ignoreCount !== void 0) updateData.ignoreCount = ignoreCount;\n\t\tif (ignoreWindow !== void 0) updateData.ignoreWindow = ignoreWindow;\n\t\tif (ignoreUserCount !== void 0) updateData.ignoreUserCount = ignoreUserCount;\n\t\tif (ignoreUserWindow !== void 0) updateData.ignoreUserWindow = ignoreUserWindow;\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/`, {\n\t\t\tmethod: \"PUT\",\n\t\t\tbody: JSON.stringify(updateData)\n\t\t}, opts);\n\t\treturn IssueSchema.parse(body);\n\t}\n\tasync createIssueComment({ organizationSlug, issueId, text }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/notes/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({ text })\n\t\t}, opts);\n\t\treturn IssueCommentSchema.parse(body);\n\t}\n\tasync getIssueActivity({ organizationSlug, issueId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/activities/`, void 0, opts);\n\t\treturn IssueActivityListResponseSchema.parse(body).activity;\n\t}\n\tasync listIssueComments({ organizationSlug, issueId, limit }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (limit !== void 0) searchQuery.set(\"per_page\", String(limit));\n\t\tconst path = apiPath`/organizations/${organizationSlug}/issues/${issueId}/notes/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn IssueCommentListSchema.parse(body);\n\t}\n\tasync searchErrors({ organizationSlug, projectSlug, filename, transaction, query, sortBy = \"last_seen\" }, opts) {\n\t\tconst sentryQuery = [];\n\t\tif (filename) sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, \"\\\\\\\"\")}\"`);\n\t\tif (transaction) sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, \"\\\\\\\"\")}\"`);\n\t\tif (query) sentryQuery.push(query);\n\t\tif (projectSlug) sentryQuery.push(`project:${projectSlug}`);\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"dataset\", \"errors\");\n\t\tqueryParams.set(\"per_page\", \"10\");\n\t\tqueryParams.set(\"sort\", `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`);\n\t\tqueryParams.set(\"statsPeriod\", \"24h\");\n\t\tqueryParams.append(\"field\", \"issue\");\n\t\tqueryParams.append(\"field\", \"title\");\n\t\tqueryParams.append(\"field\", \"project\");\n\t\tqueryParams.append(\"field\", \"last_seen()\");\n\t\tqueryParams.append(\"field\", \"count()\");\n\t\tqueryParams.set(\"query\", sentryQuery.join(\" \"));\n\t\tconst apiUrl = apiPath`/organizations/${organizationSlug}/events/` + `?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(apiUrl, void 0, opts);\n\t\treturn ErrorsSearchResponseSchema.parse(body).data;\n\t}\n\tasync searchSpans({ organizationSlug, projectSlug, transaction, query, sortBy = \"timestamp\" }, opts) {\n\t\tconst sentryQuery = [\"is_transaction:true\"];\n\t\tif (transaction) sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, \"\\\\\\\"\")}\"`);\n\t\tif (query) sentryQuery.push(query);\n\t\tif (projectSlug) sentryQuery.push(`project:${projectSlug}`);\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"dataset\", \"spans\");\n\t\tqueryParams.set(\"per_page\", \"10\");\n\t\tqueryParams.set(\"sort\", `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`);\n\t\tqueryParams.set(\"allowAggregateConditions\", \"0\");\n\t\tqueryParams.set(\"useRpc\", \"1\");\n\t\tqueryParams.append(\"field\", \"id\");\n\t\tqueryParams.append(\"field\", \"trace\");\n\t\tqueryParams.append(\"field\", \"span.op\");\n\t\tqueryParams.append(\"field\", \"span.description\");\n\t\tqueryParams.append(\"field\", \"span.duration\");\n\t\tqueryParams.append(\"field\", \"transaction\");\n\t\tqueryParams.append(\"field\", \"project\");\n\t\tqueryParams.append(\"field\", \"timestamp\");\n\t\tqueryParams.set(\"query\", sentryQuery.join(\" \"));\n\t\tconst apiUrl = apiPath`/organizations/${organizationSlug}/events/` + `?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(apiUrl, void 0, opts);\n\t\treturn SpansSearchResponseSchema.parse(body).data;\n\t}\n\t/**\n\t* Builds query parameters for the legacy Discover API (primarily used by errors dataset).\n\t*\n\t* Note: While the API endpoint is the same for all datasets, we maintain separate\n\t* builders to make future divergence easier and to keep the code organized.\n\t*/\n\tbuildDiscoverApiQuery(params) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", params.limit.toString());\n\t\tqueryParams.set(\"query\", params.query);\n\t\tqueryParams.set(\"dataset\", params.dataset ?? \"errors\");\n\t\tthis.applyTimeParams(queryParams, params.statsPeriod, params.start, params.end);\n\t\tif (params.projectId) queryParams.set(\"project\", params.projectId);\n\t\tqueryParams.set(\"sort\", params.sort);\n\t\tfor (const field of params.fields) queryParams.append(\"field\", field);\n\t\tqueryParams.set(\"referrer\", SENTRY_MCP_SEARCH_EVENTS_REFERRER);\n\t\treturn queryParams;\n\t}\n\t/**\n\t* Builds query parameters for the modern EAP API (used by spans/logs datasets).\n\t*\n\t* Includes dataset-specific parameters like sampling for spans.\n\t*/\n\tbuildEapApiQuery(params) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", params.limit.toString());\n\t\tqueryParams.set(\"query\", params.query);\n\t\tqueryParams.set(\"dataset\", params.dataset);\n\t\tthis.applyTimeParams(queryParams, params.statsPeriod, params.start, params.end);\n\t\tif (params.projectId) queryParams.set(\"project\", params.projectId);\n\t\tif (params.dataset === \"spans\") queryParams.set(\"sampling\", \"NORMAL\");\n\t\tqueryParams.set(\"sort\", params.sort);\n\t\tfor (const field of params.fields) queryParams.append(\"field\", field);\n\t\tqueryParams.set(\"referrer\", SENTRY_MCP_SEARCH_EVENTS_REFERRER);\n\t\treturn queryParams;\n\t}\n\t/**\n\t* Searches for events in Sentry using the unified events API.\n\t* This method is used by the search_events tool for semantic search.\n\t*\n\t* Routes to the appropriate query builder based on dataset, even though\n\t* the underlying API endpoint is the same. This separation makes the code\n\t* cleaner and allows for future API divergence.\n\t*/\n\tasync searchEvents({ organizationSlug, query, fields, limit = 10, projectId, dataset = \"spans\", statsPeriod, start, end, sort = \"-timestamp\" }, opts) {\n\t\tlet queryParams;\n\t\tconst normalizedDataset = normalizeEventsDataset(dataset);\n\t\tif (normalizedDataset === \"errors\" || normalizedDataset === \"tracemetrics\" || normalizedDataset === \"profiles\") queryParams = this.buildDiscoverApiQuery({\n\t\t\tquery,\n\t\t\tfields,\n\t\t\tlimit,\n\t\t\tprojectId,\n\t\t\tdataset: normalizedDataset,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\tsort\n\t\t});\n\t\telse queryParams = this.buildEapApiQuery({\n\t\t\tquery,\n\t\t\tfields,\n\t\t\tlimit,\n\t\t\tprojectId,\n\t\t\tdataset: normalizedDataset,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\tsort\n\t\t});\n\t\tconst apiUrl = apiPath`/organizations/${organizationSlug}/events/` + `?${queryParams.toString()}`;\n\t\treturn await this.requestJSON(apiUrl, void 0, opts);\n\t}\n\tasync startAutofix({ organizationSlug, issueId, eventId, instruction = \"\" }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/autofix/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tevent_id: eventId,\n\t\t\t\tinstruction\n\t\t\t})\n\t\t}, opts);\n\t\treturn AutofixRunSchema.parse(body);\n\t}\n\tasync getAutofixState({ organizationSlug, issueId }, opts) {\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/issues/${issueId}/autofix/`, void 0, opts);\n\t\treturn AutofixRunStateSchema.parse(body);\n\t}\n\t/**\n\t* Retrieves high-level metadata about a trace.\n\t*\n\t* Returns statistics including span counts, error counts, transaction\n\t* breakdown, and operation type distribution for the specified trace.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.traceId Trace identifier (32-character hex string)\n\t* @param params.statsPeriod Optional stats period (e.g., \"14d\", \"7d\")\n\t* @param opts Request options\n\t* @returns Trace metadata with statistics\n\t*\n\t* @example\n\t* ```typescript\n\t* const traceMeta = await apiService.getTraceMeta({\n\t*   organizationSlug: \"my-org\",\n\t*   traceId: \"a4d1aae7216b47ff8117cf4e09ce9d0a\"\n\t* });\n\t* console.log(`Trace has ${traceMeta.span_count} spans`);\n\t* ```\n\t*/\n\tasync getTraceMeta({ organizationSlug, traceId, statsPeriod = \"14d\" }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"statsPeriod\", statsPeriod);\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/trace-meta/${traceId}/` + `?${queryParams.toString()}`, void 0, opts);\n\t\treturn TraceMetaSchema.parse(body);\n\t}\n\t/**\n\t* Retrieves the complete trace structure with all spans.\n\t*\n\t* Returns the hierarchical trace data including all spans, their timing\n\t* information, operation details, and nested relationships.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.traceId Trace identifier (32-character hex string)\n\t* @param params.limit Requested span-count hint (default: 1000). The server currently paginates trace data internally and may ignore this value.\n\t* @param params.project Project filter hint (-1 for all projects). The current organization trace endpoint ignores this value server-side.\n\t* @param params.statsPeriod Optional stats period (e.g., \"14d\", \"7d\")\n\t* @param opts Request options\n\t* @returns Complete trace tree structure\n\t*\n\t* @example\n\t* ```typescript\n\t* const trace = await apiService.getTrace({\n\t*   organizationSlug: \"my-org\",\n\t*   traceId: \"a4d1aae7216b47ff8117cf4e09ce9d0a\",\n\t*   limit: 1000\n\t* });\n\t* console.log(`Root spans: ${trace.length}`);\n\t* ```\n\t*/\n\tasync getTrace({ organizationSlug, traceId, limit = 1e3, project = \"-1\", statsPeriod = \"14d\" }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"limit\", String(limit));\n\t\tqueryParams.set(\"project\", project);\n\t\tqueryParams.set(\"statsPeriod\", statsPeriod);\n\t\tconst body = await this.requestJSON(apiPath`/organizations/${organizationSlug}/trace/${traceId}/` + `?${queryParams.toString()}`, void 0, opts);\n\t\treturn TraceSchema.parse(body);\n\t}\n\t/**\n\t* Fetches all spans for one AI conversation within a relative or absolute time window.\n\t*/\n\tasync getAIConversation({ organizationSlug, conversationId, project = \"-1\", statsPeriod = \"30d\", start, end, perPage = 1e3, maxPages = 10 }, opts) {\n\t\tconst spans = [];\n\t\tlet title = null;\n\t\tlet cursor = null;\n\t\tfor (let page = 0; page < maxPages; page++) {\n\t\t\tconst queryParams = new URLSearchParams();\n\t\t\tqueryParams.set(\"per_page\", String(perPage));\n\t\t\tthis.applyTimeParams(queryParams, start || end ? void 0 : statsPeriod, start, end);\n\t\t\tconst projects = Array.isArray(project) ? project : [project];\n\t\t\tfor (const projectId of projects) queryParams.append(\"project\", projectId);\n\t\t\tif (cursor) queryParams.set(\"cursor\", cursor);\n\t\t\tconst response = await this.request(apiPath`/organizations/${organizationSlug}/agents/conversations/${conversationId}/` + `?${queryParams.toString()}`, void 0, opts);\n\t\t\tconst body = await this.parseJsonResponse(response);\n\t\t\tconst details = AIConversationDetailsResponseSchema.parse(body);\n\t\t\ttitle = details.title;\n\t\t\tspans.push(...details.spans);\n\t\t\tcursor = getNextCursor(response.headers.get(\"link\"));\n\t\t\tif (!cursor) break;\n\t\t}\n\t\treturn {\n\t\t\tconversationId,\n\t\t\ttitle,\n\t\t\tspans\n\t\t};\n\t}\n\t/**\n\t* Searches Sentry AI Conversations using the conversation list endpoint and\n\t* returns the current page plus cursor metadata from the response headers.\n\t*/\n\tasync searchAIConversations({ organizationSlug, query, project, environment, statsPeriod, start, end, limit, cursor }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tif (query) queryParams.set(\"query\", query);\n\t\tif (project) {\n\t\t\tconst projects = Array.isArray(project) ? project : [project];\n\t\t\tfor (const projectId of projects) queryParams.append(\"project\", projectId);\n\t\t}\n\t\tif (environment) {\n\t\t\tconst environments = Array.isArray(environment) ? environment : [environment];\n\t\t\tfor (const environmentName of environments) queryParams.append(\"environment\", environmentName);\n\t\t}\n\t\tthis.applyTimeParams(queryParams, statsPeriod, start, end);\n\t\tif (limit !== void 0) queryParams.set(\"per_page\", String(limit));\n\t\tif (cursor) queryParams.set(\"cursor\", cursor);\n\t\tconst response = await this.request(apiPath`/organizations/${organizationSlug}/agents/conversations/` + `?${queryParams.toString()}`, void 0, opts);\n\t\tconst body = await this.parseJsonResponse(response);\n\t\treturn {\n\t\t\tconversations: AIConversationSummaryListSchema.parse(body),\n\t\t\tnextCursor: getNextCursor(response.headers.get(\"link\"))\n\t\t};\n\t}\n\t/**\n\t* Retrieves flamegraph data for a transaction.\n\t*\n\t* Flamegraphs provide pre-aggregated CPU profiling data including:\n\t* - Unique call stack patterns (samples)\n\t* - Performance statistics (counts, durations, percentiles)\n\t* - Frame metadata (file, function, is_application)\n\t*\n\t* This is the primary data source for profile analysis as it includes\n\t* aggregated hot paths and percentile calculations (p75, p95, p99).\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectId Project ID or slug\n\t* @param params.transactionName Transaction name to analyze (e.g., \"/api/users\")\n\t* @param params.statsPeriod Time period for analysis (e.g., \"7d\", \"14d\", \"30d\")\n\t* @param opts Request options\n\t* @returns Flamegraph with pre-aggregated profiling data\n\t*\n\t* @example\n\t* ```typescript\n\t* const flamegraph = await apiService.getFlamegraph({\n\t*   organizationSlug: \"my-org\",\n\t*   projectId: 1,\n\t*   transactionName: \"/api/users\",\n\t*   statsPeriod: \"7d\"\n\t* });\n\t* console.log(`Analyzed ${flamegraph.profiles.length} profiles`);\n\t* ```\n\t*/\n\tasync getFlamegraph({ organizationSlug, projectId, transactionName, statsPeriod = \"7d\" }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"project\", projectId.toString());\n\t\tconst escapedTransaction = transactionName.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\");\n\t\tqueryParams.set(\"query\", `event.type:transaction transaction:\"${escapedTransaction}\"`);\n\t\tqueryParams.set(\"statsPeriod\", statsPeriod);\n\t\tconst path = apiPath`/organizations/${organizationSlug}/profiling/flamegraph/` + `?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\treturn FlamegraphSchema.parse(body);\n\t}\n\tasync getTransactionProfile({ organizationSlug, projectSlugOrId, profileId }, opts) {\n\t\tconst path = apiPath`/projects/${organizationSlug}/${projectSlugOrId}/profiling/profiles/${profileId}/`;\n\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\treturn TransactionProfileSchema.parse(body);\n\t}\n\t/**\n\t* Retrieves raw profile chunk data for detailed analysis.\n\t*\n\t* Profile chunks contain:\n\t* - frames: All unique stack frames\n\t* - samples: Individual sample points with timestamps\n\t* - stacks: Arrays of frame indices forming call stacks\n\t* - thread_metadata: Information about profiled threads\n\t*\n\t* This is used for deep-dive analysis when flamegraph data isn't sufficient.\n\t* Most use cases should use getFlamegraph() instead, as it provides\n\t* pre-aggregated data that's easier to work with.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.profilerId Profiler ID from flamegraph output\n\t* @param params.projectId Project ID or slug\n\t* @param params.start Start time (ISO format)\n\t* @param params.end End time (ISO format)\n\t* @param opts Request options\n\t* @returns Raw profile chunk data\n\t* @throws ApiNotFoundError if no profile chunk is found\n\t*\n\t* @example\n\t* ```typescript\n\t* const chunk = await apiService.getProfileChunk({\n\t*   organizationSlug: \"my-org\",\n\t*   profilerId: \"041bde57b9844e36b8b7e5734efae5f7\",\n\t*   projectId: 1,\n\t*   start: \"2024-01-01T00:00:00Z\",\n\t*   end: \"2024-01-01T01:00:00Z\"\n\t* });\n\t* console.log(`Chunk has ${chunk.profile.samples.length} samples`);\n\t* ```\n\t*/\n\tasync getProfileChunk({ organizationSlug, profilerId, projectId, start, end }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"profiler_id\", profilerId);\n\t\tqueryParams.set(\"project\", projectId.toString());\n\t\tqueryParams.set(\"start\", start);\n\t\tqueryParams.set(\"end\", end);\n\t\tconst path = apiPath`/organizations/${organizationSlug}/profiling/chunks/` + `?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\tconst response = ProfileChunkResponseSchema.parse(body);\n\t\tif (response.chunks.length === 0) throw new ApiNotFoundError(`No profile chunk found for profiler_id ${profilerId}`, void 0, body);\n\t\treturn {\n\t\t\t...response.chunks[0],\n\t\t\tprofiler_id: response.chunks[0].profiler_id ?? profilerId\n\t\t};\n\t}\n\tgetPreprodSnapshotUrl(organizationSlug, snapshotId) {\n\t\treturn getPreprodSnapshotUrl(this.host, organizationSlug, snapshotId, this.protocol);\n\t}\n\tasync getSnapshotDetails({ organizationSlug, snapshotId, compactMetadata = true }) {\n\t\tconst params = new URLSearchParams();\n\t\tif (compactMetadata) params.set(\"compact_metadata\", \"true\");\n\t\tconst path = apiPath`/organizations/${organizationSlug}/preprodartifacts/snapshots/${snapshotId}/` + `?${params.toString()}`;\n\t\treturn this.requestJSON(path);\n\t}\n\tasync getSnapshotImageDetail({ organizationSlug, snapshotId, imageIdentifier }) {\n\t\tconst path = apiPath`/organizations/${organizationSlug}/preprodartifacts/snapshots/${snapshotId}/images/${imageIdentifier}/`;\n\t\treturn this.requestJSON(path);\n\t}\n\tasync fetchImageByUrl(imageUrl) {\n\t\tconst response = imageUrl.startsWith(\"https://\") ? await fetch(imageUrl) : await this.request(imageUrl.startsWith(\"/api/0\") ? imageUrl.slice(6) : imageUrl);\n\t\tif (!response.ok) throw new Error(`Failed to fetch image: ${response.status} ${response.statusText}`);\n\t\tconst blob = await response.blob();\n\t\tlet contentType = response.headers.get(\"content-type\") ?? \"\";\n\t\tif (!contentType.startsWith(\"image/\")) {\n\t\t\tconst { detectImageMimeType } = await import(\"./internal/blob-utils.js\");\n\t\t\tcontentType = await detectImageMimeType(blob) ?? contentType;\n\t\t}\n\t\treturn {\n\t\t\tblob,\n\t\t\tcontentType\n\t\t};\n\t}\n\tasync getLatestBaseSnapshot({ organizationSlug, appId, branch, project, projectSlug, compactMetadata = true }) {\n\t\tconst params = new URLSearchParams();\n\t\tparams.set(\"app_id\", appId);\n\t\tif (branch) params.set(\"branch\", branch);\n\t\tif (project) params.set(\"project\", project);\n\t\tif (projectSlug) params.set(\"projectSlug\", projectSlug);\n\t\tif (compactMetadata) params.set(\"compact_metadata\", \"true\");\n\t\tconst path = apiPath`/organizations/${organizationSlug}/preprodartifacts/snapshots/latest-base/` + `?${params.toString()}`;\n\t\treturn this.requestJSON(path);\n\t}\n};\n\n//#endregion\nexport { SentryApiService };\n//# sourceMappingURL=client-IUNQkit5.js.map","// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar AISDKError = class _AISDKError extends (_b = Error, _a = symbol, _b) {\n  /**\n   * Creates an AI SDK Error.\n   *\n   * @param {Object} params - The parameters for creating the error.\n   * @param {string} params.name - The name of the error.\n   * @param {string} params.message - The error message.\n   * @param {unknown} [params.cause] - The underlying cause of the error.\n   */\n  constructor({\n    name: name14,\n    message,\n    cause\n  }) {\n    super(message);\n    this[_a] = true;\n    this.name = name14;\n    this.cause = cause;\n  }\n  /**\n   * Checks if the given error is an AI SDK Error.\n   * @param {unknown} error - The error to check.\n   * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n   */\n  static isInstance(error) {\n    return _AISDKError.hasMarker(error, marker);\n  }\n  static hasMarker(error, marker15) {\n    const markerSymbol = Symbol.for(marker15);\n    return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n  }\n};\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar APICallError = class extends (_b2 = AISDKError, _a2 = symbol2, _b2) {\n  constructor({\n    message,\n    url,\n    requestBodyValues,\n    statusCode,\n    responseHeaders,\n    responseBody,\n    cause,\n    isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n    statusCode === 409 || // conflict\n    statusCode === 429 || // too many requests\n    statusCode >= 500),\n    // server error\n    data\n  }) {\n    super({ name, message, cause });\n    this[_a2] = true;\n    this.url = url;\n    this.requestBodyValues = requestBodyValues;\n    this.statusCode = statusCode;\n    this.responseHeaders = responseHeaders;\n    this.responseBody = responseBody;\n    this.isRetryable = isRetryable;\n    this.data = data;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker2);\n  }\n};\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar EmptyResponseBodyError = class extends (_b3 = AISDKError, _a3 = symbol3, _b3) {\n  // used in isInstance\n  constructor({ message = \"Empty response body\" } = {}) {\n    super({ name: name2, message });\n    this[_a3] = true;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker3);\n  }\n};\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n  if (error == null) {\n    return \"unknown error\";\n  }\n  if (typeof error === \"string\") {\n    return error;\n  }\n  if (error instanceof Error) {\n    return error.message;\n  }\n  return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar InvalidArgumentError = class extends (_b4 = AISDKError, _a4 = symbol4, _b4) {\n  constructor({\n    message,\n    cause,\n    argument\n  }) {\n    super({ name: name3, message, cause });\n    this[_a4] = true;\n    this.argument = argument;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker4);\n  }\n};\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5, _b5;\nvar InvalidPromptError = class extends (_b5 = AISDKError, _a5 = symbol5, _b5) {\n  constructor({\n    prompt,\n    message,\n    cause\n  }) {\n    super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n    this[_a5] = true;\n    this.prompt = prompt;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker5);\n  }\n};\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar InvalidResponseDataError = class extends (_b6 = AISDKError, _a6 = symbol6, _b6) {\n  constructor({\n    data,\n    message = `Invalid response data: ${JSON.stringify(data)}.`\n  }) {\n    super({ name: name5, message });\n    this[_a6] = true;\n    this.data = data;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker6);\n  }\n};\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar JSONParseError = class extends (_b7 = AISDKError, _a7 = symbol7, _b7) {\n  constructor({ text, cause }) {\n    super({\n      name: name6,\n      message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n      cause\n    });\n    this[_a7] = true;\n    this.text = text;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker7);\n  }\n};\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8, _b8;\nvar LoadAPIKeyError = class extends (_b8 = AISDKError, _a8 = symbol8, _b8) {\n  // used in isInstance\n  constructor({ message }) {\n    super({ name: name7, message });\n    this[_a8] = true;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker8);\n  }\n};\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9, _b9;\nvar LoadSettingError = class extends (_b9 = AISDKError, _a9 = symbol9, _b9) {\n  // used in isInstance\n  constructor({ message }) {\n    super({ name: name8, message });\n    this[_a9] = true;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker9);\n  }\n};\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10, _b10;\nvar NoContentGeneratedError = class extends (_b10 = AISDKError, _a10 = symbol10, _b10) {\n  // used in isInstance\n  constructor({\n    message = \"No content generated.\"\n  } = {}) {\n    super({ name: name9, message });\n    this[_a10] = true;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker10);\n  }\n};\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11, _b11;\nvar NoSuchModelError = class extends (_b11 = AISDKError, _a11 = symbol11, _b11) {\n  constructor({\n    errorName = name10,\n    modelId,\n    modelType,\n    message = `No such ${modelType}: ${modelId}`\n  }) {\n    super({ name: errorName, message });\n    this[_a11] = true;\n    this.modelId = modelId;\n    this.modelType = modelType;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker11);\n  }\n};\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12, _b12;\nvar TooManyEmbeddingValuesForCallError = class extends (_b12 = AISDKError, _a12 = symbol12, _b12) {\n  constructor(options) {\n    super({\n      name: name11,\n      message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n    });\n    this[_a12] = true;\n    this.provider = options.provider;\n    this.modelId = options.modelId;\n    this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n    this.values = options.values;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker12);\n  }\n};\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13, _b13;\nvar TypeValidationError = class _TypeValidationError extends (_b13 = AISDKError, _a13 = symbol13, _b13) {\n  constructor({\n    value,\n    cause,\n    context\n  }) {\n    let contextPrefix = \"Type validation failed\";\n    if (context == null ? void 0 : context.field) {\n      contextPrefix += ` for ${context.field}`;\n    }\n    if ((context == null ? void 0 : context.entityName) || (context == null ? void 0 : context.entityId)) {\n      contextPrefix += \" (\";\n      const parts = [];\n      if (context.entityName) {\n        parts.push(context.entityName);\n      }\n      if (context.entityId) {\n        parts.push(`id: \"${context.entityId}\"`);\n      }\n      contextPrefix += parts.join(\", \");\n      contextPrefix += \")\";\n    }\n    super({\n      name: name12,\n      message: `${contextPrefix}: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n      cause\n    });\n    this[_a13] = true;\n    this.value = value;\n    this.context = context;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker13);\n  }\n  /**\n   * Wraps an error into a TypeValidationError.\n   * If the cause is already a TypeValidationError with the same value and context, it returns the cause.\n   * Otherwise, it creates a new TypeValidationError.\n   *\n   * @param {Object} params - The parameters for wrapping the error.\n   * @param {unknown} params.value - The value that failed validation.\n   * @param {unknown} params.cause - The original error or cause of the validation failure.\n   * @param {TypeValidationContext} params.context - Optional context about what is being validated.\n   * @returns {TypeValidationError} A TypeValidationError instance.\n   */\n  static wrap({\n    value,\n    cause,\n    context\n  }) {\n    var _a15, _b15, _c;\n    if (_TypeValidationError.isInstance(cause) && cause.value === value && ((_a15 = cause.context) == null ? void 0 : _a15.field) === (context == null ? void 0 : context.field) && ((_b15 = cause.context) == null ? void 0 : _b15.entityName) === (context == null ? void 0 : context.entityName) && ((_c = cause.context) == null ? void 0 : _c.entityId) === (context == null ? void 0 : context.entityId)) {\n      return cause;\n    }\n    return new _TypeValidationError({ value, cause, context });\n  }\n};\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14, _b14;\nvar UnsupportedFunctionalityError = class extends (_b14 = AISDKError, _a14 = symbol14, _b14) {\n  constructor({\n    functionality,\n    message = `'${functionality}' functionality not supported.`\n  }) {\n    super({ name: name13, message });\n    this[_a14] = true;\n    this.functionality = functionality;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker14);\n  }\n};\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n  if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n    return true;\n  }\n  if (Array.isArray(value)) {\n    return value.every(isJSONValue);\n  }\n  if (typeof value === \"object\") {\n    return Object.entries(value).every(\n      ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n    );\n  }\n  return false;\n}\nfunction isJSONArray(value) {\n  return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n  return value != null && typeof value === \"object\" && Object.entries(value).every(\n    ([key, val]) => typeof key === \"string\" && (val === void 0 || isJSONValue(val))\n  );\n}\nexport {\n  AISDKError,\n  APICallError,\n  EmptyResponseBodyError,\n  InvalidArgumentError,\n  InvalidPromptError,\n  InvalidResponseDataError,\n  JSONParseError,\n  LoadAPIKeyError,\n  LoadSettingError,\n  NoContentGeneratedError,\n  NoSuchModelError,\n  TooManyEmbeddingValuesForCallError,\n  TypeValidationError,\n  UnsupportedFunctionalityError,\n  getErrorMessage,\n  isJSONArray,\n  isJSONObject,\n  isJSONValue\n};\n//# sourceMappingURL=index.mjs.map","class ParseError extends Error {\n  constructor(message, options) {\n    super(message), this.name = \"ParseError\", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;\n  }\n}\nfunction noop(_arg) {\n}\nfunction createParser(callbacks) {\n  if (typeof callbacks == \"function\")\n    throw new TypeError(\n      \"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?\"\n    );\n  const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks;\n  let incompleteLine = \"\", isFirstChunk = !0, id, data = \"\", eventType = \"\";\n  function feed(newChunk) {\n    const chunk = isFirstChunk ? newChunk.replace(/^\\xEF\\xBB\\xBF/, \"\") : newChunk, [complete, incomplete] = splitLines(`${incompleteLine}${chunk}`);\n    for (const line of complete)\n      parseLine(line);\n    incompleteLine = incomplete, isFirstChunk = !1;\n  }\n  function parseLine(line) {\n    if (line === \"\") {\n      dispatchEvent();\n      return;\n    }\n    if (line.startsWith(\":\")) {\n      onComment && onComment(line.slice(line.startsWith(\": \") ? 2 : 1));\n      return;\n    }\n    const fieldSeparatorIndex = line.indexOf(\":\");\n    if (fieldSeparatorIndex !== -1) {\n      const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === \" \" ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);\n      processField(field, value, line);\n      return;\n    }\n    processField(line, \"\", line);\n  }\n  function processField(field, value, line) {\n    switch (field) {\n      case \"event\":\n        eventType = value;\n        break;\n      case \"data\":\n        data = `${data}${value}\n`;\n        break;\n      case \"id\":\n        id = value.includes(\"\\0\") ? void 0 : value;\n        break;\n      case \"retry\":\n        /^\\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(\n          new ParseError(`Invalid \\`retry\\` value: \"${value}\"`, {\n            type: \"invalid-retry\",\n            value,\n            line\n          })\n        );\n        break;\n      default:\n        onError(\n          new ParseError(\n            `Unknown field \"${field.length > 20 ? `${field.slice(0, 20)}\\u2026` : field}\"`,\n            { type: \"unknown-field\", field, value, line }\n          )\n        );\n        break;\n    }\n  }\n  function dispatchEvent() {\n    data.length > 0 && onEvent({\n      id,\n      event: eventType || void 0,\n      // If the data buffer's last character is a U+000A LINE FEED (LF) character,\n      // then remove the last character from the data buffer.\n      data: data.endsWith(`\n`) ? data.slice(0, -1) : data\n    }), id = void 0, data = \"\", eventType = \"\";\n  }\n  function reset(options = {}) {\n    incompleteLine && options.consume && parseLine(incompleteLine), isFirstChunk = !0, id = void 0, data = \"\", eventType = \"\", incompleteLine = \"\";\n  }\n  return { feed, reset };\n}\nfunction splitLines(chunk) {\n  const lines = [];\n  let incompleteLine = \"\", searchIndex = 0;\n  for (; searchIndex < chunk.length; ) {\n    const crIndex = chunk.indexOf(\"\\r\", searchIndex), lfIndex = chunk.indexOf(`\n`, searchIndex);\n    let lineEnd = -1;\n    if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {\n      incompleteLine = chunk.slice(searchIndex);\n      break;\n    } else {\n      const line = chunk.slice(searchIndex, lineEnd);\n      lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === \"\\r\" && chunk[searchIndex] === `\n` && searchIndex++;\n    }\n  }\n  return [lines, incompleteLine];\n}\nexport {\n  ParseError,\n  createParser\n};\n//# sourceMappingURL=index.js.map\n","import { createParser } from \"./index.js\";\nimport { ParseError } from \"./index.js\";\nclass EventSourceParserStream extends TransformStream {\n  constructor({ onError, onRetry, onComment } = {}) {\n    let parser;\n    super({\n      start(controller) {\n        parser = createParser({\n          onEvent: (event) => {\n            controller.enqueue(event);\n          },\n          onError(error) {\n            onError === \"terminate\" ? controller.error(error) : typeof onError == \"function\" && onError(error);\n          },\n          onRetry,\n          onComment\n        });\n      },\n      transform(chunk) {\n        parser.feed(chunk);\n      }\n    });\n  }\n}\nexport {\n  EventSourceParserStream,\n  ParseError\n};\n//# sourceMappingURL=stream.js.map\n","// src/combine-headers.ts\nfunction combineHeaders(...headers) {\n  return headers.reduce(\n    (combinedHeaders, currentHeaders) => ({\n      ...combinedHeaders,\n      ...currentHeaders != null ? currentHeaders : {}\n    }),\n    {}\n  );\n}\n\n// src/convert-async-iterator-to-readable-stream.ts\nfunction convertAsyncIteratorToReadableStream(iterator) {\n  let cancelled = false;\n  return new ReadableStream({\n    /**\n     * Called when the consumer wants to pull more data from the stream.\n     *\n     * @param {ReadableStreamDefaultController<T>} controller - The controller to enqueue data into the stream.\n     * @returns {Promise<void>}\n     */\n    async pull(controller) {\n      if (cancelled) return;\n      try {\n        const { value, done } = await iterator.next();\n        if (done) {\n          controller.close();\n        } else {\n          controller.enqueue(value);\n        }\n      } catch (error) {\n        controller.error(error);\n      }\n    },\n    /**\n     * Called when the consumer cancels the stream.\n     */\n    async cancel(reason) {\n      cancelled = true;\n      if (iterator.return) {\n        try {\n          await iterator.return(reason);\n        } catch (e) {\n        }\n      }\n    }\n  });\n}\n\n// src/create-tool-name-mapping.ts\nfunction createToolNameMapping({\n  tools = [],\n  providerToolNames\n}) {\n  const customToolNameToProviderToolName = {};\n  const providerToolNameToCustomToolName = {};\n  for (const tool2 of tools) {\n    if (tool2.type === \"provider\" && tool2.id in providerToolNames) {\n      const providerToolName = providerToolNames[tool2.id];\n      customToolNameToProviderToolName[tool2.name] = providerToolName;\n      providerToolNameToCustomToolName[providerToolName] = tool2.name;\n    }\n  }\n  return {\n    toProviderToolName: (customToolName) => {\n      var _a2;\n      return (_a2 = customToolNameToProviderToolName[customToolName]) != null ? _a2 : customToolName;\n    },\n    toCustomToolName: (providerToolName) => {\n      var _a2;\n      return (_a2 = providerToolNameToCustomToolName[providerToolName]) != null ? _a2 : providerToolName;\n    }\n  };\n}\n\n// src/delay.ts\nasync function delay(delayInMs, options) {\n  if (delayInMs == null) {\n    return Promise.resolve();\n  }\n  const signal = options == null ? void 0 : options.abortSignal;\n  return new Promise((resolve2, reject) => {\n    if (signal == null ? void 0 : signal.aborted) {\n      reject(createAbortError());\n      return;\n    }\n    const timeoutId = setTimeout(() => {\n      cleanup();\n      resolve2();\n    }, delayInMs);\n    const cleanup = () => {\n      clearTimeout(timeoutId);\n      signal == null ? void 0 : signal.removeEventListener(\"abort\", onAbort);\n    };\n    const onAbort = () => {\n      cleanup();\n      reject(createAbortError());\n    };\n    signal == null ? void 0 : signal.addEventListener(\"abort\", onAbort);\n  });\n}\nfunction createAbortError() {\n  return new DOMException(\"Delay was aborted\", \"AbortError\");\n}\n\n// src/delayed-promise.ts\nvar DelayedPromise = class {\n  constructor() {\n    this.status = { type: \"pending\" };\n    this._resolve = void 0;\n    this._reject = void 0;\n  }\n  get promise() {\n    if (this._promise) {\n      return this._promise;\n    }\n    this._promise = new Promise((resolve2, reject) => {\n      if (this.status.type === \"resolved\") {\n        resolve2(this.status.value);\n      } else if (this.status.type === \"rejected\") {\n        reject(this.status.error);\n      }\n      this._resolve = resolve2;\n      this._reject = reject;\n    });\n    return this._promise;\n  }\n  resolve(value) {\n    var _a2;\n    this.status = { type: \"resolved\", value };\n    if (this._promise) {\n      (_a2 = this._resolve) == null ? void 0 : _a2.call(this, value);\n    }\n  }\n  reject(error) {\n    var _a2;\n    this.status = { type: \"rejected\", error };\n    if (this._promise) {\n      (_a2 = this._reject) == null ? void 0 : _a2.call(this, error);\n    }\n  }\n  isResolved() {\n    return this.status.type === \"resolved\";\n  }\n  isRejected() {\n    return this.status.type === \"rejected\";\n  }\n  isPending() {\n    return this.status.type === \"pending\";\n  }\n};\n\n// src/extract-response-headers.ts\nfunction extractResponseHeaders(response) {\n  return Object.fromEntries([...response.headers]);\n}\n\n// src/uint8-utils.ts\nvar { btoa, atob } = globalThis;\nfunction convertBase64ToUint8Array(base64String) {\n  const base64Url = base64String.replace(/-/g, \"+\").replace(/_/g, \"/\");\n  const latin1string = atob(base64Url);\n  return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));\n}\nfunction convertUint8ArrayToBase64(array) {\n  let latin1string = \"\";\n  for (let i = 0; i < array.length; i++) {\n    latin1string += String.fromCodePoint(array[i]);\n  }\n  return btoa(latin1string);\n}\nfunction convertToBase64(value) {\n  return value instanceof Uint8Array ? convertUint8ArrayToBase64(value) : value;\n}\n\n// src/convert-image-model-file-to-data-uri.ts\nfunction convertImageModelFileToDataUri(file) {\n  if (file.type === \"url\") return file.url;\n  return `data:${file.mediaType};base64,${typeof file.data === \"string\" ? file.data : convertUint8ArrayToBase64(file.data)}`;\n}\n\n// src/convert-to-form-data.ts\nfunction convertToFormData(input, options = {}) {\n  const { useArrayBrackets = true } = options;\n  const formData = new FormData();\n  for (const [key, value] of Object.entries(input)) {\n    if (value == null) {\n      continue;\n    }\n    if (Array.isArray(value)) {\n      if (value.length === 1) {\n        formData.append(key, value[0]);\n        continue;\n      }\n      const arrayKey = useArrayBrackets ? `${key}[]` : key;\n      for (const item of value) {\n        formData.append(arrayKey, item);\n      }\n      continue;\n    }\n    formData.append(key, value);\n  }\n  return formData;\n}\n\n// src/download-error.ts\nimport { AISDKError } from \"@ai-sdk/provider\";\nvar name = \"AI_DownloadError\";\nvar marker = `vercel.ai.error.${name}`;\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar DownloadError = class extends (_b = AISDKError, _a = symbol, _b) {\n  constructor({\n    url,\n    statusCode,\n    statusText,\n    cause,\n    message = cause == null ? `Failed to download ${url}: ${statusCode} ${statusText}` : `Failed to download ${url}: ${cause}`\n  }) {\n    super({ name, message, cause });\n    this[_a] = true;\n    this.url = url;\n    this.statusCode = statusCode;\n    this.statusText = statusText;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker);\n  }\n};\n\n// src/download-blob.ts\nasync function downloadBlob(url) {\n  try {\n    const response = await fetch(url);\n    if (!response.ok) {\n      throw new DownloadError({\n        url,\n        statusCode: response.status,\n        statusText: response.statusText\n      });\n    }\n    return await response.blob();\n  } catch (error) {\n    if (DownloadError.isInstance(error)) {\n      throw error;\n    }\n    throw new DownloadError({ url, cause: error });\n  }\n}\n\n// src/generate-id.ts\nimport { InvalidArgumentError } from \"@ai-sdk/provider\";\nvar createIdGenerator = ({\n  prefix,\n  size = 16,\n  alphabet = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\",\n  separator = \"-\"\n} = {}) => {\n  const generator = () => {\n    const alphabetLength = alphabet.length;\n    const chars = new Array(size);\n    for (let i = 0; i < size; i++) {\n      chars[i] = alphabet[Math.random() * alphabetLength | 0];\n    }\n    return chars.join(\"\");\n  };\n  if (prefix == null) {\n    return generator;\n  }\n  if (alphabet.includes(separator)) {\n    throw new InvalidArgumentError({\n      argument: \"separator\",\n      message: `The separator \"${separator}\" must not be part of the alphabet \"${alphabet}\".`\n    });\n  }\n  return () => `${prefix}${separator}${generator()}`;\n};\nvar generateId = createIdGenerator();\n\n// src/get-error-message.ts\nfunction getErrorMessage(error) {\n  if (error == null) {\n    return \"unknown error\";\n  }\n  if (typeof error === \"string\") {\n    return error;\n  }\n  if (error instanceof Error) {\n    return error.message;\n  }\n  return JSON.stringify(error);\n}\n\n// src/get-from-api.ts\nimport { APICallError as APICallError2 } from \"@ai-sdk/provider\";\n\n// src/handle-fetch-error.ts\nimport { APICallError } from \"@ai-sdk/provider\";\n\n// src/is-abort-error.ts\nfunction isAbortError(error) {\n  return (error instanceof Error || error instanceof DOMException) && (error.name === \"AbortError\" || error.name === \"ResponseAborted\" || // Next.js\n  error.name === \"TimeoutError\");\n}\n\n// src/handle-fetch-error.ts\nvar FETCH_FAILED_ERROR_MESSAGES = [\"fetch failed\", \"failed to fetch\"];\nvar BUN_ERROR_CODES = [\n  \"ConnectionRefused\",\n  \"ConnectionClosed\",\n  \"FailedToOpenSocket\",\n  \"ECONNRESET\",\n  \"ECONNREFUSED\",\n  \"ETIMEDOUT\",\n  \"EPIPE\"\n];\nfunction isBunNetworkError(error) {\n  if (!(error instanceof Error)) {\n    return false;\n  }\n  const code = error.code;\n  if (typeof code === \"string\" && BUN_ERROR_CODES.includes(code)) {\n    return true;\n  }\n  return false;\n}\nfunction handleFetchError({\n  error,\n  url,\n  requestBodyValues\n}) {\n  if (isAbortError(error)) {\n    return error;\n  }\n  if (error instanceof TypeError && FETCH_FAILED_ERROR_MESSAGES.includes(error.message.toLowerCase())) {\n    const cause = error.cause;\n    if (cause != null) {\n      return new APICallError({\n        message: `Cannot connect to API: ${cause.message}`,\n        cause,\n        url,\n        requestBodyValues,\n        isRetryable: true\n        // retry when network error\n      });\n    }\n  }\n  if (isBunNetworkError(error)) {\n    return new APICallError({\n      message: `Cannot connect to API: ${error.message}`,\n      cause: error,\n      url,\n      requestBodyValues,\n      isRetryable: true\n    });\n  }\n  return error;\n}\n\n// src/get-runtime-environment-user-agent.ts\nfunction getRuntimeEnvironmentUserAgent(globalThisAny = globalThis) {\n  var _a2, _b2, _c;\n  if (globalThisAny.window) {\n    return `runtime/browser`;\n  }\n  if ((_a2 = globalThisAny.navigator) == null ? void 0 : _a2.userAgent) {\n    return `runtime/${globalThisAny.navigator.userAgent.toLowerCase()}`;\n  }\n  if ((_c = (_b2 = globalThisAny.process) == null ? void 0 : _b2.versions) == null ? void 0 : _c.node) {\n    return `runtime/node.js/${globalThisAny.process.version.substring(0)}`;\n  }\n  if (globalThisAny.EdgeRuntime) {\n    return `runtime/vercel-edge`;\n  }\n  return \"runtime/unknown\";\n}\n\n// src/normalize-headers.ts\nfunction normalizeHeaders(headers) {\n  if (headers == null) {\n    return {};\n  }\n  const normalized = {};\n  if (headers instanceof Headers) {\n    headers.forEach((value, key) => {\n      normalized[key.toLowerCase()] = value;\n    });\n  } else {\n    if (!Array.isArray(headers)) {\n      headers = Object.entries(headers);\n    }\n    for (const [key, value] of headers) {\n      if (value != null) {\n        normalized[key.toLowerCase()] = value;\n      }\n    }\n  }\n  return normalized;\n}\n\n// src/with-user-agent-suffix.ts\nfunction withUserAgentSuffix(headers, ...userAgentSuffixParts) {\n  const normalizedHeaders = new Headers(normalizeHeaders(headers));\n  const currentUserAgentHeader = normalizedHeaders.get(\"user-agent\") || \"\";\n  normalizedHeaders.set(\n    \"user-agent\",\n    [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(\" \")\n  );\n  return Object.fromEntries(normalizedHeaders.entries());\n}\n\n// src/version.ts\nvar VERSION = true ? \"4.0.11\" : \"0.0.0-test\";\n\n// src/get-from-api.ts\nvar getOriginalFetch = () => globalThis.fetch;\nvar getFromApi = async ({\n  url,\n  headers = {},\n  successfulResponseHandler,\n  failedResponseHandler,\n  abortSignal,\n  fetch: fetch2 = getOriginalFetch()\n}) => {\n  try {\n    const response = await fetch2(url, {\n      method: \"GET\",\n      headers: withUserAgentSuffix(\n        headers,\n        `ai-sdk/provider-utils/${VERSION}`,\n        getRuntimeEnvironmentUserAgent()\n      ),\n      signal: abortSignal\n    });\n    const responseHeaders = extractResponseHeaders(response);\n    if (!response.ok) {\n      let errorInformation;\n      try {\n        errorInformation = await failedResponseHandler({\n          response,\n          url,\n          requestBodyValues: {}\n        });\n      } catch (error) {\n        if (isAbortError(error) || APICallError2.isInstance(error)) {\n          throw error;\n        }\n        throw new APICallError2({\n          message: \"Failed to process error response\",\n          cause: error,\n          statusCode: response.status,\n          url,\n          responseHeaders,\n          requestBodyValues: {}\n        });\n      }\n      throw errorInformation.value;\n    }\n    try {\n      return await successfulResponseHandler({\n        response,\n        url,\n        requestBodyValues: {}\n      });\n    } catch (error) {\n      if (error instanceof Error) {\n        if (isAbortError(error) || APICallError2.isInstance(error)) {\n          throw error;\n        }\n      }\n      throw new APICallError2({\n        message: \"Failed to process successful response\",\n        cause: error,\n        statusCode: response.status,\n        url,\n        responseHeaders,\n        requestBodyValues: {}\n      });\n    }\n  } catch (error) {\n    throw handleFetchError({ error, url, requestBodyValues: {} });\n  }\n};\n\n// src/inject-json-instruction.ts\nvar DEFAULT_SCHEMA_PREFIX = \"JSON schema:\";\nvar DEFAULT_SCHEMA_SUFFIX = \"You MUST answer with a JSON object that matches the JSON schema above.\";\nvar DEFAULT_GENERIC_SUFFIX = \"You MUST answer with JSON.\";\nfunction injectJsonInstruction({\n  prompt,\n  schema,\n  schemaPrefix = schema != null ? DEFAULT_SCHEMA_PREFIX : void 0,\n  schemaSuffix = schema != null ? DEFAULT_SCHEMA_SUFFIX : DEFAULT_GENERIC_SUFFIX\n}) {\n  return [\n    prompt != null && prompt.length > 0 ? prompt : void 0,\n    prompt != null && prompt.length > 0 ? \"\" : void 0,\n    // add a newline if prompt is not null\n    schemaPrefix,\n    schema != null ? JSON.stringify(schema) : void 0,\n    schemaSuffix\n  ].filter((line) => line != null).join(\"\\n\");\n}\nfunction injectJsonInstructionIntoMessages({\n  messages,\n  schema,\n  schemaPrefix,\n  schemaSuffix\n}) {\n  var _a2, _b2;\n  const systemMessage = ((_a2 = messages[0]) == null ? void 0 : _a2.role) === \"system\" ? { ...messages[0] } : { role: \"system\", content: \"\" };\n  systemMessage.content = injectJsonInstruction({\n    prompt: systemMessage.content,\n    schema,\n    schemaPrefix,\n    schemaSuffix\n  });\n  return [\n    systemMessage,\n    ...((_b2 = messages[0]) == null ? void 0 : _b2.role) === \"system\" ? messages.slice(1) : messages\n  ];\n}\n\n// src/is-non-nullable.ts\nfunction isNonNullable(value) {\n  return value != null;\n}\n\n// src/is-url-supported.ts\nfunction isUrlSupported({\n  mediaType,\n  url,\n  supportedUrls\n}) {\n  url = url.toLowerCase();\n  mediaType = mediaType.toLowerCase();\n  return Object.entries(supportedUrls).map(([key, value]) => {\n    const mediaType2 = key.toLowerCase();\n    return mediaType2 === \"*\" || mediaType2 === \"*/*\" ? { mediaTypePrefix: \"\", regexes: value } : { mediaTypePrefix: mediaType2.replace(/\\*/, \"\"), regexes: value };\n  }).filter(({ mediaTypePrefix }) => mediaType.startsWith(mediaTypePrefix)).flatMap(({ regexes }) => regexes).some((pattern) => pattern.test(url));\n}\n\n// src/load-api-key.ts\nimport { LoadAPIKeyError } from \"@ai-sdk/provider\";\nfunction loadApiKey({\n  apiKey,\n  environmentVariableName,\n  apiKeyParameterName = \"apiKey\",\n  description\n}) {\n  if (typeof apiKey === \"string\") {\n    return apiKey;\n  }\n  if (apiKey != null) {\n    throw new LoadAPIKeyError({\n      message: `${description} API key must be a string.`\n    });\n  }\n  if (typeof process === \"undefined\") {\n    throw new LoadAPIKeyError({\n      message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables is not supported in this environment.`\n    });\n  }\n  apiKey = process.env[environmentVariableName];\n  if (apiKey == null) {\n    throw new LoadAPIKeyError({\n      message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter or the ${environmentVariableName} environment variable.`\n    });\n  }\n  if (typeof apiKey !== \"string\") {\n    throw new LoadAPIKeyError({\n      message: `${description} API key must be a string. The value of the ${environmentVariableName} environment variable is not a string.`\n    });\n  }\n  return apiKey;\n}\n\n// src/load-optional-setting.ts\nfunction loadOptionalSetting({\n  settingValue,\n  environmentVariableName\n}) {\n  if (typeof settingValue === \"string\") {\n    return settingValue;\n  }\n  if (settingValue != null || typeof process === \"undefined\") {\n    return void 0;\n  }\n  settingValue = process.env[environmentVariableName];\n  if (settingValue == null || typeof settingValue !== \"string\") {\n    return void 0;\n  }\n  return settingValue;\n}\n\n// src/load-setting.ts\nimport { LoadSettingError } from \"@ai-sdk/provider\";\nfunction loadSetting({\n  settingValue,\n  environmentVariableName,\n  settingName,\n  description\n}) {\n  if (typeof settingValue === \"string\") {\n    return settingValue;\n  }\n  if (settingValue != null) {\n    throw new LoadSettingError({\n      message: `${description} setting must be a string.`\n    });\n  }\n  if (typeof process === \"undefined\") {\n    throw new LoadSettingError({\n      message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables is not supported in this environment.`\n    });\n  }\n  settingValue = process.env[environmentVariableName];\n  if (settingValue == null) {\n    throw new LoadSettingError({\n      message: `${description} setting is missing. Pass it using the '${settingName}' parameter or the ${environmentVariableName} environment variable.`\n    });\n  }\n  if (typeof settingValue !== \"string\") {\n    throw new LoadSettingError({\n      message: `${description} setting must be a string. The value of the ${environmentVariableName} environment variable is not a string.`\n    });\n  }\n  return settingValue;\n}\n\n// src/media-type-to-extension.ts\nfunction mediaTypeToExtension(mediaType) {\n  var _a2;\n  const [_type, subtype = \"\"] = mediaType.toLowerCase().split(\"/\");\n  return (_a2 = {\n    mpeg: \"mp3\",\n    \"x-wav\": \"wav\",\n    opus: \"ogg\",\n    mp4: \"m4a\",\n    \"x-m4a\": \"m4a\"\n  }[subtype]) != null ? _a2 : subtype;\n}\n\n// src/parse-json.ts\nimport {\n  JSONParseError,\n  TypeValidationError as TypeValidationError3\n} from \"@ai-sdk/provider\";\n\n// src/secure-json-parse.ts\nvar suspectProtoRx = /\"__proto__\"\\s*:/;\nvar suspectConstructorRx = /\"constructor\"\\s*:/;\nfunction _parse(text) {\n  const obj = JSON.parse(text);\n  if (obj === null || typeof obj !== \"object\") {\n    return obj;\n  }\n  if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) {\n    return obj;\n  }\n  return filter(obj);\n}\nfunction filter(obj) {\n  let next = [obj];\n  while (next.length) {\n    const nodes = next;\n    next = [];\n    for (const node of nodes) {\n      if (Object.prototype.hasOwnProperty.call(node, \"__proto__\")) {\n        throw new SyntaxError(\"Object contains forbidden prototype property\");\n      }\n      if (Object.prototype.hasOwnProperty.call(node, \"constructor\") && Object.prototype.hasOwnProperty.call(node.constructor, \"prototype\")) {\n        throw new SyntaxError(\"Object contains forbidden prototype property\");\n      }\n      for (const key in node) {\n        const value = node[key];\n        if (value && typeof value === \"object\") {\n          next.push(value);\n        }\n      }\n    }\n  }\n  return obj;\n}\nfunction secureJsonParse(text) {\n  const { stackTraceLimit } = Error;\n  try {\n    Error.stackTraceLimit = 0;\n  } catch (e) {\n    return _parse(text);\n  }\n  try {\n    return _parse(text);\n  } finally {\n    Error.stackTraceLimit = stackTraceLimit;\n  }\n}\n\n// src/validate-types.ts\nimport { TypeValidationError as TypeValidationError2 } from \"@ai-sdk/provider\";\n\n// src/schema.ts\nimport { TypeValidationError } from \"@ai-sdk/provider\";\nimport * as z4 from \"zod/v4\";\n\n// src/add-additional-properties-to-json-schema.ts\nfunction addAdditionalPropertiesToJsonSchema(jsonSchema2) {\n  if (jsonSchema2.type === \"object\" || Array.isArray(jsonSchema2.type) && jsonSchema2.type.includes(\"object\")) {\n    jsonSchema2.additionalProperties = false;\n    const { properties } = jsonSchema2;\n    if (properties != null) {\n      for (const key of Object.keys(properties)) {\n        properties[key] = visit(properties[key]);\n      }\n    }\n  }\n  if (jsonSchema2.items != null) {\n    jsonSchema2.items = Array.isArray(jsonSchema2.items) ? jsonSchema2.items.map(visit) : visit(jsonSchema2.items);\n  }\n  if (jsonSchema2.anyOf != null) {\n    jsonSchema2.anyOf = jsonSchema2.anyOf.map(visit);\n  }\n  if (jsonSchema2.allOf != null) {\n    jsonSchema2.allOf = jsonSchema2.allOf.map(visit);\n  }\n  if (jsonSchema2.oneOf != null) {\n    jsonSchema2.oneOf = jsonSchema2.oneOf.map(visit);\n  }\n  const { definitions } = jsonSchema2;\n  if (definitions != null) {\n    for (const key of Object.keys(definitions)) {\n      definitions[key] = visit(definitions[key]);\n    }\n  }\n  return jsonSchema2;\n}\nfunction visit(def) {\n  if (typeof def === \"boolean\") return def;\n  return addAdditionalPropertiesToJsonSchema(def);\n}\n\n// src/to-json-schema/zod3-to-json-schema/options.ts\nvar ignoreOverride = Symbol(\n  \"Let zodToJsonSchema decide on which parser to use\"\n);\nvar defaultOptions = {\n  name: void 0,\n  $refStrategy: \"root\",\n  basePath: [\"#\"],\n  effectStrategy: \"input\",\n  pipeStrategy: \"all\",\n  dateStrategy: \"format:date-time\",\n  mapStrategy: \"entries\",\n  removeAdditionalStrategy: \"passthrough\",\n  allowedAdditionalProperties: true,\n  rejectedAdditionalProperties: false,\n  definitionPath: \"definitions\",\n  strictUnions: false,\n  definitions: {},\n  errorMessages: false,\n  patternStrategy: \"escape\",\n  applyRegexFlags: false,\n  emailStrategy: \"format:email\",\n  base64Strategy: \"contentEncoding:base64\",\n  nameStrategy: \"ref\"\n};\nvar getDefaultOptions = (options) => typeof options === \"string\" ? {\n  ...defaultOptions,\n  name: options\n} : {\n  ...defaultOptions,\n  ...options\n};\n\n// src/to-json-schema/zod3-to-json-schema/select-parser.ts\nimport { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind3 } from \"zod/v3\";\n\n// src/to-json-schema/zod3-to-json-schema/parsers/any.ts\nfunction parseAnyDef() {\n  return {};\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/array.ts\nimport { ZodFirstPartyTypeKind } from \"zod/v3\";\nfunction parseArrayDef(def, refs) {\n  var _a2, _b2, _c;\n  const res = {\n    type: \"array\"\n  };\n  if (((_a2 = def.type) == null ? void 0 : _a2._def) && ((_c = (_b2 = def.type) == null ? void 0 : _b2._def) == null ? void 0 : _c.typeName) !== ZodFirstPartyTypeKind.ZodAny) {\n    res.items = parseDef(def.type._def, {\n      ...refs,\n      currentPath: [...refs.currentPath, \"items\"]\n    });\n  }\n  if (def.minLength) {\n    res.minItems = def.minLength.value;\n  }\n  if (def.maxLength) {\n    res.maxItems = def.maxLength.value;\n  }\n  if (def.exactLength) {\n    res.minItems = def.exactLength.value;\n    res.maxItems = def.exactLength.value;\n  }\n  return res;\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/bigint.ts\nfunction parseBigintDef(def) {\n  const res = {\n    type: \"integer\",\n    format: \"int64\"\n  };\n  if (!def.checks) return res;\n  for (const check of def.checks) {\n    switch (check.kind) {\n      case \"min\":\n        if (check.inclusive) {\n          res.minimum = check.value;\n        } else {\n          res.exclusiveMinimum = check.value;\n        }\n        break;\n      case \"max\":\n        if (check.inclusive) {\n          res.maximum = check.value;\n        } else {\n          res.exclusiveMaximum = check.value;\n        }\n        break;\n      case \"multipleOf\":\n        res.multipleOf = check.value;\n        break;\n    }\n  }\n  return res;\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/boolean.ts\nfunction parseBooleanDef() {\n  return { type: \"boolean\" };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/branded.ts\nfunction parseBrandedDef(_def, refs) {\n  return parseDef(_def.type._def, refs);\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/catch.ts\nvar parseCatchDef = (def, refs) => {\n  return parseDef(def.innerType._def, refs);\n};\n\n// src/to-json-schema/zod3-to-json-schema/parsers/date.ts\nfunction parseDateDef(def, refs, overrideDateStrategy) {\n  const strategy = overrideDateStrategy != null ? overrideDateStrategy : refs.dateStrategy;\n  if (Array.isArray(strategy)) {\n    return {\n      anyOf: strategy.map((item, i) => parseDateDef(def, refs, item))\n    };\n  }\n  switch (strategy) {\n    case \"string\":\n    case \"format:date-time\":\n      return {\n        type: \"string\",\n        format: \"date-time\"\n      };\n    case \"format:date\":\n      return {\n        type: \"string\",\n        format: \"date\"\n      };\n    case \"integer\":\n      return integerDateParser(def);\n  }\n}\nvar integerDateParser = (def) => {\n  const res = {\n    type: \"integer\",\n    format: \"unix-time\"\n  };\n  for (const check of def.checks) {\n    switch (check.kind) {\n      case \"min\":\n        res.minimum = check.value;\n        break;\n      case \"max\":\n        res.maximum = check.value;\n        break;\n    }\n  }\n  return res;\n};\n\n// src/to-json-schema/zod3-to-json-schema/parsers/default.ts\nfunction parseDefaultDef(_def, refs) {\n  return {\n    ...parseDef(_def.innerType._def, refs),\n    default: _def.defaultValue()\n  };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/effects.ts\nfunction parseEffectsDef(_def, refs) {\n  return refs.effectStrategy === \"input\" ? parseDef(_def.schema._def, refs) : parseAnyDef();\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/enum.ts\nfunction parseEnumDef(def) {\n  return {\n    type: \"string\",\n    enum: Array.from(def.values)\n  };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/intersection.ts\nvar isJsonSchema7AllOfType = (type) => {\n  if (\"type\" in type && type.type === \"string\") return false;\n  return \"allOf\" in type;\n};\nfunction parseIntersectionDef(def, refs) {\n  const allOf = [\n    parseDef(def.left._def, {\n      ...refs,\n      currentPath: [...refs.currentPath, \"allOf\", \"0\"]\n    }),\n    parseDef(def.right._def, {\n      ...refs,\n      currentPath: [...refs.currentPath, \"allOf\", \"1\"]\n    })\n  ].filter((x) => !!x);\n  const mergedAllOf = [];\n  allOf.forEach((schema) => {\n    if (isJsonSchema7AllOfType(schema)) {\n      mergedAllOf.push(...schema.allOf);\n    } else {\n      let nestedSchema = schema;\n      if (\"additionalProperties\" in schema && schema.additionalProperties === false) {\n        const { additionalProperties, ...rest } = schema;\n        nestedSchema = rest;\n      }\n      mergedAllOf.push(nestedSchema);\n    }\n  });\n  return mergedAllOf.length ? { allOf: mergedAllOf } : void 0;\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/literal.ts\nfunction parseLiteralDef(def) {\n  const parsedType = typeof def.value;\n  if (parsedType !== \"bigint\" && parsedType !== \"number\" && parsedType !== \"boolean\" && parsedType !== \"string\") {\n    return {\n      type: Array.isArray(def.value) ? \"array\" : \"object\"\n    };\n  }\n  return {\n    type: parsedType === \"bigint\" ? \"integer\" : parsedType,\n    const: def.value\n  };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/record.ts\nimport {\n  ZodFirstPartyTypeKind as ZodFirstPartyTypeKind2\n} from \"zod/v3\";\n\n// src/to-json-schema/zod3-to-json-schema/parsers/string.ts\nvar emojiRegex = void 0;\nvar zodPatterns = {\n  /**\n   * `c` was changed to `[cC]` to replicate /i flag\n   */\n  cuid: /^[cC][^\\s-]{8,}$/,\n  cuid2: /^[0-9a-z]+$/,\n  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,\n  /**\n   * `a-z` was added to replicate /i flag\n   */\n  email: /^(?!\\.)(?!.*\\.\\.)([a-zA-Z0-9_'+\\-\\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\\-]*\\.)+[a-zA-Z]{2,}$/,\n  /**\n   * Constructed a valid Unicode RegExp\n   *\n   * Lazily instantiate since this type of regex isn't supported\n   * in all envs (e.g. React Native).\n   *\n   * See:\n   * https://github.com/colinhacks/zod/issues/2433\n   * Fix in Zod:\n   * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b\n   */\n  emoji: () => {\n    if (emojiRegex === void 0) {\n      emojiRegex = RegExp(\n        \"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\",\n        \"u\"\n      );\n    }\n    return emojiRegex;\n  },\n  /**\n   * Unused\n   */\n  uuid: /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/,\n  /**\n   * Unused\n   */\n  ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,\n  ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/,\n  /**\n   * Unused\n   */\n  ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,\n  ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,\n  base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,\n  base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,\n  nanoid: /^[a-zA-Z0-9_-]{21}$/,\n  jwt: /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/\n};\nfunction parseStringDef(def, refs) {\n  const res = {\n    type: \"string\"\n  };\n  if (def.checks) {\n    for (const check of def.checks) {\n      switch (check.kind) {\n        case \"min\":\n          res.minLength = typeof res.minLength === \"number\" ? Math.max(res.minLength, check.value) : check.value;\n          break;\n        case \"max\":\n          res.maxLength = typeof res.maxLength === \"number\" ? Math.min(res.maxLength, check.value) : check.value;\n          break;\n        case \"email\":\n          switch (refs.emailStrategy) {\n            case \"format:email\":\n              addFormat(res, \"email\", check.message, refs);\n              break;\n            case \"format:idn-email\":\n              addFormat(res, \"idn-email\", check.message, refs);\n              break;\n            case \"pattern:zod\":\n              addPattern(res, zodPatterns.email, check.message, refs);\n              break;\n          }\n          break;\n        case \"url\":\n          addFormat(res, \"uri\", check.message, refs);\n          break;\n        case \"uuid\":\n          addFormat(res, \"uuid\", check.message, refs);\n          break;\n        case \"regex\":\n          addPattern(res, check.regex, check.message, refs);\n          break;\n        case \"cuid\":\n          addPattern(res, zodPatterns.cuid, check.message, refs);\n          break;\n        case \"cuid2\":\n          addPattern(res, zodPatterns.cuid2, check.message, refs);\n          break;\n        case \"startsWith\":\n          addPattern(\n            res,\n            RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`),\n            check.message,\n            refs\n          );\n          break;\n        case \"endsWith\":\n          addPattern(\n            res,\n            RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`),\n            check.message,\n            refs\n          );\n          break;\n        case \"datetime\":\n          addFormat(res, \"date-time\", check.message, refs);\n          break;\n        case \"date\":\n          addFormat(res, \"date\", check.message, refs);\n          break;\n        case \"time\":\n          addFormat(res, \"time\", check.message, refs);\n          break;\n        case \"duration\":\n          addFormat(res, \"duration\", check.message, refs);\n          break;\n        case \"length\":\n          res.minLength = typeof res.minLength === \"number\" ? Math.max(res.minLength, check.value) : check.value;\n          res.maxLength = typeof res.maxLength === \"number\" ? Math.min(res.maxLength, check.value) : check.value;\n          break;\n        case \"includes\": {\n          addPattern(\n            res,\n            RegExp(escapeLiteralCheckValue(check.value, refs)),\n            check.message,\n            refs\n          );\n          break;\n        }\n        case \"ip\": {\n          if (check.version !== \"v6\") {\n            addFormat(res, \"ipv4\", check.message, refs);\n          }\n          if (check.version !== \"v4\") {\n            addFormat(res, \"ipv6\", check.message, refs);\n          }\n          break;\n        }\n        case \"base64url\":\n          addPattern(res, zodPatterns.base64url, check.message, refs);\n          break;\n        case \"jwt\":\n          addPattern(res, zodPatterns.jwt, check.message, refs);\n          break;\n        case \"cidr\": {\n          if (check.version !== \"v6\") {\n            addPattern(res, zodPatterns.ipv4Cidr, check.message, refs);\n          }\n          if (check.version !== \"v4\") {\n            addPattern(res, zodPatterns.ipv6Cidr, check.message, refs);\n          }\n          break;\n        }\n        case \"emoji\":\n          addPattern(res, zodPatterns.emoji(), check.message, refs);\n          break;\n        case \"ulid\": {\n          addPattern(res, zodPatterns.ulid, check.message, refs);\n          break;\n        }\n        case \"base64\": {\n          switch (refs.base64Strategy) {\n            case \"format:binary\": {\n              addFormat(res, \"binary\", check.message, refs);\n              break;\n            }\n            case \"contentEncoding:base64\": {\n              res.contentEncoding = \"base64\";\n              break;\n            }\n            case \"pattern:zod\": {\n              addPattern(res, zodPatterns.base64, check.message, refs);\n              break;\n            }\n          }\n          break;\n        }\n        case \"nanoid\": {\n          addPattern(res, zodPatterns.nanoid, check.message, refs);\n        }\n        case \"toLowerCase\":\n        case \"toUpperCase\":\n        case \"trim\":\n          break;\n        default:\n          /* @__PURE__ */ ((_) => {\n          })(check);\n      }\n    }\n  }\n  return res;\n}\nfunction escapeLiteralCheckValue(literal, refs) {\n  return refs.patternStrategy === \"escape\" ? escapeNonAlphaNumeric(literal) : literal;\n}\nvar ALPHA_NUMERIC = new Set(\n  \"ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789\"\n);\nfunction escapeNonAlphaNumeric(source) {\n  let result = \"\";\n  for (let i = 0; i < source.length; i++) {\n    if (!ALPHA_NUMERIC.has(source[i])) {\n      result += \"\\\\\";\n    }\n    result += source[i];\n  }\n  return result;\n}\nfunction addFormat(schema, value, message, refs) {\n  var _a2;\n  if (schema.format || ((_a2 = schema.anyOf) == null ? void 0 : _a2.some((x) => x.format))) {\n    if (!schema.anyOf) {\n      schema.anyOf = [];\n    }\n    if (schema.format) {\n      schema.anyOf.push({\n        format: schema.format\n      });\n      delete schema.format;\n    }\n    schema.anyOf.push({\n      format: value,\n      ...message && refs.errorMessages && { errorMessage: { format: message } }\n    });\n  } else {\n    schema.format = value;\n  }\n}\nfunction addPattern(schema, regex, message, refs) {\n  var _a2;\n  if (schema.pattern || ((_a2 = schema.allOf) == null ? void 0 : _a2.some((x) => x.pattern))) {\n    if (!schema.allOf) {\n      schema.allOf = [];\n    }\n    if (schema.pattern) {\n      schema.allOf.push({\n        pattern: schema.pattern\n      });\n      delete schema.pattern;\n    }\n    schema.allOf.push({\n      pattern: stringifyRegExpWithFlags(regex, refs),\n      ...message && refs.errorMessages && { errorMessage: { pattern: message } }\n    });\n  } else {\n    schema.pattern = stringifyRegExpWithFlags(regex, refs);\n  }\n}\nfunction stringifyRegExpWithFlags(regex, refs) {\n  var _a2;\n  if (!refs.applyRegexFlags || !regex.flags) {\n    return regex.source;\n  }\n  const flags = {\n    i: regex.flags.includes(\"i\"),\n    // Case-insensitive\n    m: regex.flags.includes(\"m\"),\n    // `^` and `$` matches adjacent to newline characters\n    s: regex.flags.includes(\"s\")\n    // `.` matches newlines\n  };\n  const source = flags.i ? regex.source.toLowerCase() : regex.source;\n  let pattern = \"\";\n  let isEscaped = false;\n  let inCharGroup = false;\n  let inCharRange = false;\n  for (let i = 0; i < source.length; i++) {\n    if (isEscaped) {\n      pattern += source[i];\n      isEscaped = false;\n      continue;\n    }\n    if (flags.i) {\n      if (inCharGroup) {\n        if (source[i].match(/[a-z]/)) {\n          if (inCharRange) {\n            pattern += source[i];\n            pattern += `${source[i - 2]}-${source[i]}`.toUpperCase();\n            inCharRange = false;\n          } else if (source[i + 1] === \"-\" && ((_a2 = source[i + 2]) == null ? void 0 : _a2.match(/[a-z]/))) {\n            pattern += source[i];\n            inCharRange = true;\n          } else {\n            pattern += `${source[i]}${source[i].toUpperCase()}`;\n          }\n          continue;\n        }\n      } else if (source[i].match(/[a-z]/)) {\n        pattern += `[${source[i]}${source[i].toUpperCase()}]`;\n        continue;\n      }\n    }\n    if (flags.m) {\n      if (source[i] === \"^\") {\n        pattern += `(^|(?<=[\\r\n]))`;\n        continue;\n      } else if (source[i] === \"$\") {\n        pattern += `($|(?=[\\r\n]))`;\n        continue;\n      }\n    }\n    if (flags.s && source[i] === \".\") {\n      pattern += inCharGroup ? `${source[i]}\\r\n` : `[${source[i]}\\r\n]`;\n      continue;\n    }\n    pattern += source[i];\n    if (source[i] === \"\\\\\") {\n      isEscaped = true;\n    } else if (inCharGroup && source[i] === \"]\") {\n      inCharGroup = false;\n    } else if (!inCharGroup && source[i] === \"[\") {\n      inCharGroup = true;\n    }\n  }\n  try {\n    new RegExp(pattern);\n  } catch (e) {\n    console.warn(\n      `Could not convert regex pattern at ${refs.currentPath.join(\n        \"/\"\n      )} to a flag-independent form! Falling back to the flag-ignorant source`\n    );\n    return regex.source;\n  }\n  return pattern;\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/record.ts\nfunction parseRecordDef(def, refs) {\n  var _a2, _b2, _c, _d, _e, _f;\n  const schema = {\n    type: \"object\",\n    additionalProperties: (_a2 = parseDef(def.valueType._def, {\n      ...refs,\n      currentPath: [...refs.currentPath, \"additionalProperties\"]\n    })) != null ? _a2 : refs.allowedAdditionalProperties\n  };\n  if (((_b2 = def.keyType) == null ? void 0 : _b2._def.typeName) === ZodFirstPartyTypeKind2.ZodString && ((_c = def.keyType._def.checks) == null ? void 0 : _c.length)) {\n    const { type, ...keyType } = parseStringDef(def.keyType._def, refs);\n    return {\n      ...schema,\n      propertyNames: keyType\n    };\n  } else if (((_d = def.keyType) == null ? void 0 : _d._def.typeName) === ZodFirstPartyTypeKind2.ZodEnum) {\n    return {\n      ...schema,\n      propertyNames: {\n        enum: def.keyType._def.values\n      }\n    };\n  } else if (((_e = def.keyType) == null ? void 0 : _e._def.typeName) === ZodFirstPartyTypeKind2.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind2.ZodString && ((_f = def.keyType._def.type._def.checks) == null ? void 0 : _f.length)) {\n    const { type, ...keyType } = parseBrandedDef(\n      def.keyType._def,\n      refs\n    );\n    return {\n      ...schema,\n      propertyNames: keyType\n    };\n  }\n  return schema;\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/map.ts\nfunction parseMapDef(def, refs) {\n  if (refs.mapStrategy === \"record\") {\n    return parseRecordDef(def, refs);\n  }\n  const keys = parseDef(def.keyType._def, {\n    ...refs,\n    currentPath: [...refs.currentPath, \"items\", \"items\", \"0\"]\n  }) || parseAnyDef();\n  const values = parseDef(def.valueType._def, {\n    ...refs,\n    currentPath: [...refs.currentPath, \"items\", \"items\", \"1\"]\n  }) || parseAnyDef();\n  return {\n    type: \"array\",\n    maxItems: 125,\n    items: {\n      type: \"array\",\n      items: [keys, values],\n      minItems: 2,\n      maxItems: 2\n    }\n  };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/native-enum.ts\nfunction parseNativeEnumDef(def) {\n  const object = def.values;\n  const actualKeys = Object.keys(def.values).filter((key) => {\n    return typeof object[object[key]] !== \"number\";\n  });\n  const actualValues = actualKeys.map((key) => object[key]);\n  const parsedTypes = Array.from(\n    new Set(actualValues.map((values) => typeof values))\n  );\n  return {\n    type: parsedTypes.length === 1 ? parsedTypes[0] === \"string\" ? \"string\" : \"number\" : [\"string\", \"number\"],\n    enum: actualValues\n  };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/never.ts\nfunction parseNeverDef() {\n  return { not: parseAnyDef() };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/null.ts\nfunction parseNullDef() {\n  return {\n    type: \"null\"\n  };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/union.ts\nvar primitiveMappings = {\n  ZodString: \"string\",\n  ZodNumber: \"number\",\n  ZodBigInt: \"integer\",\n  ZodBoolean: \"boolean\",\n  ZodNull: \"null\"\n};\nfunction parseUnionDef(def, refs) {\n  const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;\n  if (options.every(\n    (x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length)\n  )) {\n    const types = options.reduce((types2, x) => {\n      const type = primitiveMappings[x._def.typeName];\n      return type && !types2.includes(type) ? [...types2, type] : types2;\n    }, []);\n    return {\n      type: types.length > 1 ? types : types[0]\n    };\n  } else if (options.every((x) => x._def.typeName === \"ZodLiteral\" && !x.description)) {\n    const types = options.reduce(\n      (acc, x) => {\n        const type = typeof x._def.value;\n        switch (type) {\n          case \"string\":\n          case \"number\":\n          case \"boolean\":\n            return [...acc, type];\n          case \"bigint\":\n            return [...acc, \"integer\"];\n          case \"object\":\n            if (x._def.value === null) return [...acc, \"null\"];\n          case \"symbol\":\n          case \"undefined\":\n          case \"function\":\n          default:\n            return acc;\n        }\n      },\n      []\n    );\n    if (types.length === options.length) {\n      const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);\n      return {\n        type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],\n        enum: options.reduce(\n          (acc, x) => {\n            return acc.includes(x._def.value) ? acc : [...acc, x._def.value];\n          },\n          []\n        )\n      };\n    }\n  } else if (options.every((x) => x._def.typeName === \"ZodEnum\")) {\n    return {\n      type: \"string\",\n      enum: options.reduce(\n        (acc, x) => [\n          ...acc,\n          ...x._def.values.filter((x2) => !acc.includes(x2))\n        ],\n        []\n      )\n    };\n  }\n  return asAnyOf(def, refs);\n}\nvar asAnyOf = (def, refs) => {\n  const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map(\n    (x, i) => parseDef(x._def, {\n      ...refs,\n      currentPath: [...refs.currentPath, \"anyOf\", `${i}`]\n    })\n  ).filter(\n    (x) => !!x && (!refs.strictUnions || typeof x === \"object\" && Object.keys(x).length > 0)\n  );\n  return anyOf.length ? { anyOf } : void 0;\n};\n\n// src/to-json-schema/zod3-to-json-schema/parsers/nullable.ts\nfunction parseNullableDef(def, refs) {\n  if ([\"ZodString\", \"ZodNumber\", \"ZodBigInt\", \"ZodBoolean\", \"ZodNull\"].includes(\n    def.innerType._def.typeName\n  ) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {\n    return {\n      type: [\n        primitiveMappings[def.innerType._def.typeName],\n        \"null\"\n      ]\n    };\n  }\n  const base = parseDef(def.innerType._def, {\n    ...refs,\n    currentPath: [...refs.currentPath, \"anyOf\", \"0\"]\n  });\n  return base && { anyOf: [base, { type: \"null\" }] };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/number.ts\nfunction parseNumberDef(def) {\n  const res = {\n    type: \"number\"\n  };\n  if (!def.checks) return res;\n  for (const check of def.checks) {\n    switch (check.kind) {\n      case \"int\":\n        res.type = \"integer\";\n        break;\n      case \"min\":\n        if (check.inclusive) {\n          res.minimum = check.value;\n        } else {\n          res.exclusiveMinimum = check.value;\n        }\n        break;\n      case \"max\":\n        if (check.inclusive) {\n          res.maximum = check.value;\n        } else {\n          res.exclusiveMaximum = check.value;\n        }\n        break;\n      case \"multipleOf\":\n        res.multipleOf = check.value;\n        break;\n    }\n  }\n  return res;\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/object.ts\nfunction parseObjectDef(def, refs) {\n  const result = {\n    type: \"object\",\n    properties: {}\n  };\n  const required = [];\n  const shape = def.shape();\n  for (const propName in shape) {\n    let propDef = shape[propName];\n    if (propDef === void 0 || propDef._def === void 0) {\n      continue;\n    }\n    const propOptional = safeIsOptional(propDef);\n    const parsedDef = parseDef(propDef._def, {\n      ...refs,\n      currentPath: [...refs.currentPath, \"properties\", propName],\n      propertyPath: [...refs.currentPath, \"properties\", propName]\n    });\n    if (parsedDef === void 0) {\n      continue;\n    }\n    result.properties[propName] = parsedDef;\n    if (!propOptional) {\n      required.push(propName);\n    }\n  }\n  if (required.length) {\n    result.required = required;\n  }\n  const additionalProperties = decideAdditionalProperties(def, refs);\n  if (additionalProperties !== void 0) {\n    result.additionalProperties = additionalProperties;\n  }\n  return result;\n}\nfunction decideAdditionalProperties(def, refs) {\n  if (def.catchall._def.typeName !== \"ZodNever\") {\n    return parseDef(def.catchall._def, {\n      ...refs,\n      currentPath: [...refs.currentPath, \"additionalProperties\"]\n    });\n  }\n  switch (def.unknownKeys) {\n    case \"passthrough\":\n      return refs.allowedAdditionalProperties;\n    case \"strict\":\n      return refs.rejectedAdditionalProperties;\n    case \"strip\":\n      return refs.removeAdditionalStrategy === \"strict\" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;\n  }\n}\nfunction safeIsOptional(schema) {\n  try {\n    return schema.isOptional();\n  } catch (e) {\n    return true;\n  }\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/optional.ts\nvar parseOptionalDef = (def, refs) => {\n  var _a2;\n  if (refs.currentPath.toString() === ((_a2 = refs.propertyPath) == null ? void 0 : _a2.toString())) {\n    return parseDef(def.innerType._def, refs);\n  }\n  const innerSchema = parseDef(def.innerType._def, {\n    ...refs,\n    currentPath: [...refs.currentPath, \"anyOf\", \"1\"]\n  });\n  return innerSchema ? { anyOf: [{ not: parseAnyDef() }, innerSchema] } : parseAnyDef();\n};\n\n// src/to-json-schema/zod3-to-json-schema/parsers/pipeline.ts\nvar parsePipelineDef = (def, refs) => {\n  if (refs.pipeStrategy === \"input\") {\n    return parseDef(def.in._def, refs);\n  } else if (refs.pipeStrategy === \"output\") {\n    return parseDef(def.out._def, refs);\n  }\n  const a = parseDef(def.in._def, {\n    ...refs,\n    currentPath: [...refs.currentPath, \"allOf\", \"0\"]\n  });\n  const b = parseDef(def.out._def, {\n    ...refs,\n    currentPath: [...refs.currentPath, \"allOf\", a ? \"1\" : \"0\"]\n  });\n  return {\n    allOf: [a, b].filter((x) => x !== void 0)\n  };\n};\n\n// src/to-json-schema/zod3-to-json-schema/parsers/promise.ts\nfunction parsePromiseDef(def, refs) {\n  return parseDef(def.type._def, refs);\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/set.ts\nfunction parseSetDef(def, refs) {\n  const items = parseDef(def.valueType._def, {\n    ...refs,\n    currentPath: [...refs.currentPath, \"items\"]\n  });\n  const schema = {\n    type: \"array\",\n    uniqueItems: true,\n    items\n  };\n  if (def.minSize) {\n    schema.minItems = def.minSize.value;\n  }\n  if (def.maxSize) {\n    schema.maxItems = def.maxSize.value;\n  }\n  return schema;\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/tuple.ts\nfunction parseTupleDef(def, refs) {\n  if (def.rest) {\n    return {\n      type: \"array\",\n      minItems: def.items.length,\n      items: def.items.map(\n        (x, i) => parseDef(x._def, {\n          ...refs,\n          currentPath: [...refs.currentPath, \"items\", `${i}`]\n        })\n      ).reduce(\n        (acc, x) => x === void 0 ? acc : [...acc, x],\n        []\n      ),\n      additionalItems: parseDef(def.rest._def, {\n        ...refs,\n        currentPath: [...refs.currentPath, \"additionalItems\"]\n      })\n    };\n  } else {\n    return {\n      type: \"array\",\n      minItems: def.items.length,\n      maxItems: def.items.length,\n      items: def.items.map(\n        (x, i) => parseDef(x._def, {\n          ...refs,\n          currentPath: [...refs.currentPath, \"items\", `${i}`]\n        })\n      ).reduce(\n        (acc, x) => x === void 0 ? acc : [...acc, x],\n        []\n      )\n    };\n  }\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/undefined.ts\nfunction parseUndefinedDef() {\n  return {\n    not: parseAnyDef()\n  };\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/unknown.ts\nfunction parseUnknownDef() {\n  return parseAnyDef();\n}\n\n// src/to-json-schema/zod3-to-json-schema/parsers/readonly.ts\nvar parseReadonlyDef = (def, refs) => {\n  return parseDef(def.innerType._def, refs);\n};\n\n// src/to-json-schema/zod3-to-json-schema/select-parser.ts\nvar selectParser = (def, typeName, refs) => {\n  switch (typeName) {\n    case ZodFirstPartyTypeKind3.ZodString:\n      return parseStringDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodNumber:\n      return parseNumberDef(def);\n    case ZodFirstPartyTypeKind3.ZodObject:\n      return parseObjectDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodBigInt:\n      return parseBigintDef(def);\n    case ZodFirstPartyTypeKind3.ZodBoolean:\n      return parseBooleanDef();\n    case ZodFirstPartyTypeKind3.ZodDate:\n      return parseDateDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodUndefined:\n      return parseUndefinedDef();\n    case ZodFirstPartyTypeKind3.ZodNull:\n      return parseNullDef();\n    case ZodFirstPartyTypeKind3.ZodArray:\n      return parseArrayDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodUnion:\n    case ZodFirstPartyTypeKind3.ZodDiscriminatedUnion:\n      return parseUnionDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodIntersection:\n      return parseIntersectionDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodTuple:\n      return parseTupleDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodRecord:\n      return parseRecordDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodLiteral:\n      return parseLiteralDef(def);\n    case ZodFirstPartyTypeKind3.ZodEnum:\n      return parseEnumDef(def);\n    case ZodFirstPartyTypeKind3.ZodNativeEnum:\n      return parseNativeEnumDef(def);\n    case ZodFirstPartyTypeKind3.ZodNullable:\n      return parseNullableDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodOptional:\n      return parseOptionalDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodMap:\n      return parseMapDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodSet:\n      return parseSetDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodLazy:\n      return () => def.getter()._def;\n    case ZodFirstPartyTypeKind3.ZodPromise:\n      return parsePromiseDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodNaN:\n    case ZodFirstPartyTypeKind3.ZodNever:\n      return parseNeverDef();\n    case ZodFirstPartyTypeKind3.ZodEffects:\n      return parseEffectsDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodAny:\n      return parseAnyDef();\n    case ZodFirstPartyTypeKind3.ZodUnknown:\n      return parseUnknownDef();\n    case ZodFirstPartyTypeKind3.ZodDefault:\n      return parseDefaultDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodBranded:\n      return parseBrandedDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodReadonly:\n      return parseReadonlyDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodCatch:\n      return parseCatchDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodPipeline:\n      return parsePipelineDef(def, refs);\n    case ZodFirstPartyTypeKind3.ZodFunction:\n    case ZodFirstPartyTypeKind3.ZodVoid:\n    case ZodFirstPartyTypeKind3.ZodSymbol:\n      return void 0;\n    default:\n      return /* @__PURE__ */ ((_) => void 0)(typeName);\n  }\n};\n\n// src/to-json-schema/zod3-to-json-schema/get-relative-path.ts\nvar getRelativePath = (pathA, pathB) => {\n  let i = 0;\n  for (; i < pathA.length && i < pathB.length; i++) {\n    if (pathA[i] !== pathB[i]) break;\n  }\n  return [(pathA.length - i).toString(), ...pathB.slice(i)].join(\"/\");\n};\n\n// src/to-json-schema/zod3-to-json-schema/parse-def.ts\nfunction parseDef(def, refs, forceResolution = false) {\n  var _a2;\n  const seenItem = refs.seen.get(def);\n  if (refs.override) {\n    const overrideResult = (_a2 = refs.override) == null ? void 0 : _a2.call(\n      refs,\n      def,\n      refs,\n      seenItem,\n      forceResolution\n    );\n    if (overrideResult !== ignoreOverride) {\n      return overrideResult;\n    }\n  }\n  if (seenItem && !forceResolution) {\n    const seenSchema = get$ref(seenItem, refs);\n    if (seenSchema !== void 0) {\n      return seenSchema;\n    }\n  }\n  const newItem = { def, path: refs.currentPath, jsonSchema: void 0 };\n  refs.seen.set(def, newItem);\n  const jsonSchemaOrGetter = selectParser(def, def.typeName, refs);\n  const jsonSchema2 = typeof jsonSchemaOrGetter === \"function\" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;\n  if (jsonSchema2) {\n    addMeta(def, refs, jsonSchema2);\n  }\n  if (refs.postProcess) {\n    const postProcessResult = refs.postProcess(jsonSchema2, def, refs);\n    newItem.jsonSchema = jsonSchema2;\n    return postProcessResult;\n  }\n  newItem.jsonSchema = jsonSchema2;\n  return jsonSchema2;\n}\nvar get$ref = (item, refs) => {\n  switch (refs.$refStrategy) {\n    case \"root\":\n      return { $ref: item.path.join(\"/\") };\n    case \"relative\":\n      return { $ref: getRelativePath(refs.currentPath, item.path) };\n    case \"none\":\n    case \"seen\": {\n      if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {\n        console.warn(\n          `Recursive reference detected at ${refs.currentPath.join(\n            \"/\"\n          )}! Defaulting to any`\n        );\n        return parseAnyDef();\n      }\n      return refs.$refStrategy === \"seen\" ? parseAnyDef() : void 0;\n    }\n  }\n};\nvar addMeta = (def, refs, jsonSchema2) => {\n  if (def.description) {\n    jsonSchema2.description = def.description;\n  }\n  return jsonSchema2;\n};\n\n// src/to-json-schema/zod3-to-json-schema/refs.ts\nvar getRefs = (options) => {\n  const _options = getDefaultOptions(options);\n  const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;\n  return {\n    ..._options,\n    currentPath,\n    propertyPath: void 0,\n    seen: new Map(\n      Object.entries(_options.definitions).map(([name2, def]) => [\n        def._def,\n        {\n          def: def._def,\n          path: [..._options.basePath, _options.definitionPath, name2],\n          // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.\n          jsonSchema: void 0\n        }\n      ])\n    )\n  };\n};\n\n// src/to-json-schema/zod3-to-json-schema/zod3-to-json-schema.ts\nvar zod3ToJsonSchema = (schema, options) => {\n  var _a2;\n  const refs = getRefs(options);\n  let definitions = typeof options === \"object\" && options.definitions ? Object.entries(options.definitions).reduce(\n    (acc, [name3, schema2]) => {\n      var _a3;\n      return {\n        ...acc,\n        [name3]: (_a3 = parseDef(\n          schema2._def,\n          {\n            ...refs,\n            currentPath: [...refs.basePath, refs.definitionPath, name3]\n          },\n          true\n        )) != null ? _a3 : parseAnyDef()\n      };\n    },\n    {}\n  ) : void 0;\n  const name2 = typeof options === \"string\" ? options : (options == null ? void 0 : options.nameStrategy) === \"title\" ? void 0 : options == null ? void 0 : options.name;\n  const main = (_a2 = parseDef(\n    schema._def,\n    name2 === void 0 ? refs : {\n      ...refs,\n      currentPath: [...refs.basePath, refs.definitionPath, name2]\n    },\n    false\n  )) != null ? _a2 : parseAnyDef();\n  const title = typeof options === \"object\" && options.name !== void 0 && options.nameStrategy === \"title\" ? options.name : void 0;\n  if (title !== void 0) {\n    main.title = title;\n  }\n  const combined = name2 === void 0 ? definitions ? {\n    ...main,\n    [refs.definitionPath]: definitions\n  } : main : {\n    $ref: [\n      ...refs.$refStrategy === \"relative\" ? [] : refs.basePath,\n      refs.definitionPath,\n      name2\n    ].join(\"/\"),\n    [refs.definitionPath]: {\n      ...definitions,\n      [name2]: main\n    }\n  };\n  combined.$schema = \"http://json-schema.org/draft-07/schema#\";\n  return combined;\n};\n\n// src/schema.ts\nvar schemaSymbol = Symbol.for(\"vercel.ai.schema\");\nfunction lazySchema(createSchema) {\n  let schema;\n  return () => {\n    if (schema == null) {\n      schema = createSchema();\n    }\n    return schema;\n  };\n}\nfunction jsonSchema(jsonSchema2, {\n  validate\n} = {}) {\n  return {\n    [schemaSymbol]: true,\n    _type: void 0,\n    // should never be used directly\n    get jsonSchema() {\n      if (typeof jsonSchema2 === \"function\") {\n        jsonSchema2 = jsonSchema2();\n      }\n      return jsonSchema2;\n    },\n    validate\n  };\n}\nfunction isSchema(value) {\n  return typeof value === \"object\" && value !== null && schemaSymbol in value && value[schemaSymbol] === true && \"jsonSchema\" in value && \"validate\" in value;\n}\nfunction asSchema(schema) {\n  return schema == null ? jsonSchema({ properties: {}, additionalProperties: false }) : isSchema(schema) ? schema : \"~standard\" in schema ? schema[\"~standard\"].vendor === \"zod\" ? zodSchema(schema) : standardSchema(schema) : schema();\n}\nfunction standardSchema(standardSchema2) {\n  return jsonSchema(\n    () => addAdditionalPropertiesToJsonSchema(\n      standardSchema2[\"~standard\"].jsonSchema.input({\n        target: \"draft-07\"\n      })\n    ),\n    {\n      validate: async (value) => {\n        const result = await standardSchema2[\"~standard\"].validate(value);\n        return \"value\" in result ? { success: true, value: result.value } : {\n          success: false,\n          error: new TypeValidationError({\n            value,\n            cause: result.issues\n          })\n        };\n      }\n    }\n  );\n}\nfunction zod3Schema(zodSchema2, options) {\n  var _a2;\n  const useReferences = (_a2 = options == null ? void 0 : options.useReferences) != null ? _a2 : false;\n  return jsonSchema(\n    // defer json schema creation to avoid unnecessary computation when only validation is needed\n    () => zod3ToJsonSchema(zodSchema2, {\n      $refStrategy: useReferences ? \"root\" : \"none\"\n    }),\n    {\n      validate: async (value) => {\n        const result = await zodSchema2.safeParseAsync(value);\n        return result.success ? { success: true, value: result.data } : { success: false, error: result.error };\n      }\n    }\n  );\n}\nfunction zod4Schema(zodSchema2, options) {\n  var _a2;\n  const useReferences = (_a2 = options == null ? void 0 : options.useReferences) != null ? _a2 : false;\n  return jsonSchema(\n    // defer json schema creation to avoid unnecessary computation when only validation is needed\n    () => addAdditionalPropertiesToJsonSchema(\n      z4.toJSONSchema(zodSchema2, {\n        target: \"draft-7\",\n        io: \"input\",\n        reused: useReferences ? \"ref\" : \"inline\"\n      })\n    ),\n    {\n      validate: async (value) => {\n        const result = await z4.safeParseAsync(zodSchema2, value);\n        return result.success ? { success: true, value: result.data } : { success: false, error: result.error };\n      }\n    }\n  );\n}\nfunction isZod4Schema(zodSchema2) {\n  return \"_zod\" in zodSchema2;\n}\nfunction zodSchema(zodSchema2, options) {\n  if (isZod4Schema(zodSchema2)) {\n    return zod4Schema(zodSchema2, options);\n  } else {\n    return zod3Schema(zodSchema2, options);\n  }\n}\n\n// src/validate-types.ts\nasync function validateTypes({\n  value,\n  schema,\n  context\n}) {\n  const result = await safeValidateTypes({ value, schema, context });\n  if (!result.success) {\n    throw TypeValidationError2.wrap({ value, cause: result.error, context });\n  }\n  return result.value;\n}\nasync function safeValidateTypes({\n  value,\n  schema,\n  context\n}) {\n  const actualSchema = asSchema(schema);\n  try {\n    if (actualSchema.validate == null) {\n      return { success: true, value, rawValue: value };\n    }\n    const result = await actualSchema.validate(value);\n    if (result.success) {\n      return { success: true, value: result.value, rawValue: value };\n    }\n    return {\n      success: false,\n      error: TypeValidationError2.wrap({ value, cause: result.error, context }),\n      rawValue: value\n    };\n  } catch (error) {\n    return {\n      success: false,\n      error: TypeValidationError2.wrap({ value, cause: error, context }),\n      rawValue: value\n    };\n  }\n}\n\n// src/parse-json.ts\nasync function parseJSON({\n  text,\n  schema\n}) {\n  try {\n    const value = secureJsonParse(text);\n    if (schema == null) {\n      return value;\n    }\n    return validateTypes({ value, schema });\n  } catch (error) {\n    if (JSONParseError.isInstance(error) || TypeValidationError3.isInstance(error)) {\n      throw error;\n    }\n    throw new JSONParseError({ text, cause: error });\n  }\n}\nasync function safeParseJSON({\n  text,\n  schema\n}) {\n  try {\n    const value = secureJsonParse(text);\n    if (schema == null) {\n      return { success: true, value, rawValue: value };\n    }\n    return await safeValidateTypes({ value, schema });\n  } catch (error) {\n    return {\n      success: false,\n      error: JSONParseError.isInstance(error) ? error : new JSONParseError({ text, cause: error }),\n      rawValue: void 0\n    };\n  }\n}\nfunction isParsableJson(input) {\n  try {\n    secureJsonParse(input);\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n// src/parse-json-event-stream.ts\nimport {\n  EventSourceParserStream\n} from \"eventsource-parser/stream\";\nfunction parseJsonEventStream({\n  stream,\n  schema\n}) {\n  return stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream()).pipeThrough(\n    new TransformStream({\n      async transform({ data }, controller) {\n        if (data === \"[DONE]\") {\n          return;\n        }\n        controller.enqueue(await safeParseJSON({ text: data, schema }));\n      }\n    })\n  );\n}\n\n// src/parse-provider-options.ts\nimport { InvalidArgumentError as InvalidArgumentError2 } from \"@ai-sdk/provider\";\nasync function parseProviderOptions({\n  provider,\n  providerOptions,\n  schema\n}) {\n  if ((providerOptions == null ? void 0 : providerOptions[provider]) == null) {\n    return void 0;\n  }\n  const parsedProviderOptions = await safeValidateTypes({\n    value: providerOptions[provider],\n    schema\n  });\n  if (!parsedProviderOptions.success) {\n    throw new InvalidArgumentError2({\n      argument: \"providerOptions\",\n      message: `invalid ${provider} provider options`,\n      cause: parsedProviderOptions.error\n    });\n  }\n  return parsedProviderOptions.value;\n}\n\n// src/post-to-api.ts\nimport { APICallError as APICallError3 } from \"@ai-sdk/provider\";\nvar getOriginalFetch2 = () => globalThis.fetch;\nvar postJsonToApi = async ({\n  url,\n  headers,\n  body,\n  failedResponseHandler,\n  successfulResponseHandler,\n  abortSignal,\n  fetch: fetch2\n}) => postToApi({\n  url,\n  headers: {\n    \"Content-Type\": \"application/json\",\n    ...headers\n  },\n  body: {\n    content: JSON.stringify(body),\n    values: body\n  },\n  failedResponseHandler,\n  successfulResponseHandler,\n  abortSignal,\n  fetch: fetch2\n});\nvar postFormDataToApi = async ({\n  url,\n  headers,\n  formData,\n  failedResponseHandler,\n  successfulResponseHandler,\n  abortSignal,\n  fetch: fetch2\n}) => postToApi({\n  url,\n  headers,\n  body: {\n    content: formData,\n    values: Object.fromEntries(formData.entries())\n  },\n  failedResponseHandler,\n  successfulResponseHandler,\n  abortSignal,\n  fetch: fetch2\n});\nvar postToApi = async ({\n  url,\n  headers = {},\n  body,\n  successfulResponseHandler,\n  failedResponseHandler,\n  abortSignal,\n  fetch: fetch2 = getOriginalFetch2()\n}) => {\n  try {\n    const response = await fetch2(url, {\n      method: \"POST\",\n      headers: withUserAgentSuffix(\n        headers,\n        `ai-sdk/provider-utils/${VERSION}`,\n        getRuntimeEnvironmentUserAgent()\n      ),\n      body: body.content,\n      signal: abortSignal\n    });\n    const responseHeaders = extractResponseHeaders(response);\n    if (!response.ok) {\n      let errorInformation;\n      try {\n        errorInformation = await failedResponseHandler({\n          response,\n          url,\n          requestBodyValues: body.values\n        });\n      } catch (error) {\n        if (isAbortError(error) || APICallError3.isInstance(error)) {\n          throw error;\n        }\n        throw new APICallError3({\n          message: \"Failed to process error response\",\n          cause: error,\n          statusCode: response.status,\n          url,\n          responseHeaders,\n          requestBodyValues: body.values\n        });\n      }\n      throw errorInformation.value;\n    }\n    try {\n      return await successfulResponseHandler({\n        response,\n        url,\n        requestBodyValues: body.values\n      });\n    } catch (error) {\n      if (error instanceof Error) {\n        if (isAbortError(error) || APICallError3.isInstance(error)) {\n          throw error;\n        }\n      }\n      throw new APICallError3({\n        message: \"Failed to process successful response\",\n        cause: error,\n        statusCode: response.status,\n        url,\n        responseHeaders,\n        requestBodyValues: body.values\n      });\n    }\n  } catch (error) {\n    throw handleFetchError({ error, url, requestBodyValues: body.values });\n  }\n};\n\n// src/types/tool.ts\nfunction tool(tool2) {\n  return tool2;\n}\nfunction dynamicTool(tool2) {\n  return { ...tool2, type: \"dynamic\" };\n}\n\n// src/provider-tool-factory.ts\nfunction createProviderToolFactory({\n  id,\n  inputSchema\n}) {\n  return ({\n    execute,\n    outputSchema,\n    needsApproval,\n    toModelOutput,\n    onInputStart,\n    onInputDelta,\n    onInputAvailable,\n    ...args\n  }) => tool({\n    type: \"provider\",\n    id,\n    args,\n    inputSchema,\n    outputSchema,\n    execute,\n    needsApproval,\n    toModelOutput,\n    onInputStart,\n    onInputDelta,\n    onInputAvailable\n  });\n}\nfunction createProviderToolFactoryWithOutputSchema({\n  id,\n  inputSchema,\n  outputSchema,\n  supportsDeferredResults\n}) {\n  return ({\n    execute,\n    needsApproval,\n    toModelOutput,\n    onInputStart,\n    onInputDelta,\n    onInputAvailable,\n    ...args\n  }) => tool({\n    type: \"provider\",\n    id,\n    args,\n    inputSchema,\n    outputSchema,\n    execute,\n    needsApproval,\n    toModelOutput,\n    onInputStart,\n    onInputDelta,\n    onInputAvailable,\n    supportsDeferredResults\n  });\n}\n\n// src/remove-undefined-entries.ts\nfunction removeUndefinedEntries(record) {\n  return Object.fromEntries(\n    Object.entries(record).filter(([_key, value]) => value != null)\n  );\n}\n\n// src/resolve.ts\nasync function resolve(value) {\n  if (typeof value === \"function\") {\n    value = value();\n  }\n  return Promise.resolve(value);\n}\n\n// src/response-handler.ts\nimport { APICallError as APICallError4, EmptyResponseBodyError } from \"@ai-sdk/provider\";\nvar createJsonErrorResponseHandler = ({\n  errorSchema,\n  errorToMessage,\n  isRetryable\n}) => async ({ response, url, requestBodyValues }) => {\n  const responseBody = await response.text();\n  const responseHeaders = extractResponseHeaders(response);\n  if (responseBody.trim() === \"\") {\n    return {\n      responseHeaders,\n      value: new APICallError4({\n        message: response.statusText,\n        url,\n        requestBodyValues,\n        statusCode: response.status,\n        responseHeaders,\n        responseBody,\n        isRetryable: isRetryable == null ? void 0 : isRetryable(response)\n      })\n    };\n  }\n  try {\n    const parsedError = await parseJSON({\n      text: responseBody,\n      schema: errorSchema\n    });\n    return {\n      responseHeaders,\n      value: new APICallError4({\n        message: errorToMessage(parsedError),\n        url,\n        requestBodyValues,\n        statusCode: response.status,\n        responseHeaders,\n        responseBody,\n        data: parsedError,\n        isRetryable: isRetryable == null ? void 0 : isRetryable(response, parsedError)\n      })\n    };\n  } catch (parseError) {\n    return {\n      responseHeaders,\n      value: new APICallError4({\n        message: response.statusText,\n        url,\n        requestBodyValues,\n        statusCode: response.status,\n        responseHeaders,\n        responseBody,\n        isRetryable: isRetryable == null ? void 0 : isRetryable(response)\n      })\n    };\n  }\n};\nvar createEventSourceResponseHandler = (chunkSchema) => async ({ response }) => {\n  const responseHeaders = extractResponseHeaders(response);\n  if (response.body == null) {\n    throw new EmptyResponseBodyError({});\n  }\n  return {\n    responseHeaders,\n    value: parseJsonEventStream({\n      stream: response.body,\n      schema: chunkSchema\n    })\n  };\n};\nvar createJsonResponseHandler = (responseSchema) => async ({ response, url, requestBodyValues }) => {\n  const responseBody = await response.text();\n  const parsedResult = await safeParseJSON({\n    text: responseBody,\n    schema: responseSchema\n  });\n  const responseHeaders = extractResponseHeaders(response);\n  if (!parsedResult.success) {\n    throw new APICallError4({\n      message: \"Invalid JSON response\",\n      cause: parsedResult.error,\n      statusCode: response.status,\n      responseHeaders,\n      responseBody,\n      url,\n      requestBodyValues\n    });\n  }\n  return {\n    responseHeaders,\n    value: parsedResult.value,\n    rawValue: parsedResult.rawValue\n  };\n};\nvar createBinaryResponseHandler = () => async ({ response, url, requestBodyValues }) => {\n  const responseHeaders = extractResponseHeaders(response);\n  if (!response.body) {\n    throw new APICallError4({\n      message: \"Response body is empty\",\n      url,\n      requestBodyValues,\n      statusCode: response.status,\n      responseHeaders,\n      responseBody: void 0\n    });\n  }\n  try {\n    const buffer = await response.arrayBuffer();\n    return {\n      responseHeaders,\n      value: new Uint8Array(buffer)\n    };\n  } catch (error) {\n    throw new APICallError4({\n      message: \"Failed to read response as array buffer\",\n      url,\n      requestBodyValues,\n      statusCode: response.status,\n      responseHeaders,\n      responseBody: void 0,\n      cause: error\n    });\n  }\n};\nvar createStatusCodeErrorResponseHandler = () => async ({ response, url, requestBodyValues }) => {\n  const responseHeaders = extractResponseHeaders(response);\n  const responseBody = await response.text();\n  return {\n    responseHeaders,\n    value: new APICallError4({\n      message: response.statusText,\n      url,\n      requestBodyValues,\n      statusCode: response.status,\n      responseHeaders,\n      responseBody\n    })\n  };\n};\n\n// src/without-trailing-slash.ts\nfunction withoutTrailingSlash(url) {\n  return url == null ? void 0 : url.replace(/\\/$/, \"\");\n}\n\n// src/is-async-iterable.ts\nfunction isAsyncIterable(obj) {\n  return obj != null && typeof obj[Symbol.asyncIterator] === \"function\";\n}\n\n// src/types/execute-tool.ts\nasync function* executeTool({\n  execute,\n  input,\n  options\n}) {\n  const result = execute(input, options);\n  if (isAsyncIterable(result)) {\n    let lastOutput;\n    for await (const output of result) {\n      lastOutput = output;\n      yield { type: \"preliminary\", output };\n    }\n    yield { type: \"final\", output: lastOutput };\n  } else {\n    yield { type: \"final\", output: await result };\n  }\n}\n\n// src/index.ts\nexport * from \"@standard-schema/spec\";\nimport {\n  EventSourceParserStream as EventSourceParserStream2\n} from \"eventsource-parser/stream\";\nexport {\n  DelayedPromise,\n  DownloadError,\n  EventSourceParserStream2 as EventSourceParserStream,\n  VERSION,\n  asSchema,\n  combineHeaders,\n  convertAsyncIteratorToReadableStream,\n  convertBase64ToUint8Array,\n  convertImageModelFileToDataUri,\n  convertToBase64,\n  convertToFormData,\n  convertUint8ArrayToBase64,\n  createBinaryResponseHandler,\n  createEventSourceResponseHandler,\n  createIdGenerator,\n  createJsonErrorResponseHandler,\n  createJsonResponseHandler,\n  createProviderToolFactory,\n  createProviderToolFactoryWithOutputSchema,\n  createStatusCodeErrorResponseHandler,\n  createToolNameMapping,\n  delay,\n  downloadBlob,\n  dynamicTool,\n  executeTool,\n  extractResponseHeaders,\n  generateId,\n  getErrorMessage,\n  getFromApi,\n  getRuntimeEnvironmentUserAgent,\n  injectJsonInstructionIntoMessages,\n  isAbortError,\n  isNonNullable,\n  isParsableJson,\n  isUrlSupported,\n  jsonSchema,\n  lazySchema,\n  loadApiKey,\n  loadOptionalSetting,\n  loadSetting,\n  mediaTypeToExtension,\n  normalizeHeaders,\n  parseJSON,\n  parseJsonEventStream,\n  parseProviderOptions,\n  postFormDataToApi,\n  postJsonToApi,\n  postToApi,\n  removeUndefinedEntries,\n  resolve,\n  safeParseJSON,\n  safeValidateTypes,\n  tool,\n  validateTypes,\n  withUserAgentSuffix,\n  withoutTrailingSlash,\n  zodSchema\n};\n//# sourceMappingURL=index.mjs.map","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar get_context_exports = {};\n__export(get_context_exports, {\n  SYMBOL_FOR_REQ_CONTEXT: () => SYMBOL_FOR_REQ_CONTEXT,\n  getContext: () => getContext\n});\nmodule.exports = __toCommonJS(get_context_exports);\nconst SYMBOL_FOR_REQ_CONTEXT = Symbol.for(\"@vercel/request-context\");\nfunction getContext() {\n  const fromSymbol = globalThis;\n  return fromSymbol[SYMBOL_FOR_REQ_CONTEXT]?.get?.() ?? {};\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  SYMBOL_FOR_REQ_CONTEXT,\n  getContext\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar get_vercel_oidc_token_exports = {};\n__export(get_vercel_oidc_token_exports, {\n  getVercelOidcToken: () => getVercelOidcToken,\n  getVercelOidcTokenSync: () => getVercelOidcTokenSync\n});\nmodule.exports = __toCommonJS(get_vercel_oidc_token_exports);\nvar import_get_context = require(\"./get-context\");\nvar import_token_error = require(\"./token-error\");\nasync function getVercelOidcToken() {\n  let token = \"\";\n  let err;\n  try {\n    token = getVercelOidcTokenSync();\n  } catch (error) {\n    err = error;\n  }\n  try {\n    const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([\n      await import(\"./token-util.js\"),\n      await import(\"./token.js\")\n    ]);\n    if (!token || isExpired(getTokenPayload(token))) {\n      await refreshToken();\n      token = getVercelOidcTokenSync();\n    }\n  } catch (error) {\n    let message = err instanceof Error ? err.message : \"\";\n    if (error instanceof Error) {\n      message = `${message}\n${error.message}`;\n    }\n    if (message) {\n      throw new import_token_error.VercelOidcTokenError(message);\n    }\n    throw error;\n  }\n  return token;\n}\nfunction getVercelOidcTokenSync() {\n  const token = (0, import_get_context.getContext)().headers?.[\"x-vercel-oidc-token\"] ?? process.env.VERCEL_OIDC_TOKEN;\n  if (!token) {\n    throw new Error(\n      `The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?`\n    );\n  }\n  return token;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  getVercelOidcToken,\n  getVercelOidcTokenSync\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar src_exports = {};\n__export(src_exports, {\n  getContext: () => import_get_context.getContext,\n  getVercelOidcToken: () => import_get_vercel_oidc_token.getVercelOidcToken,\n  getVercelOidcTokenSync: () => import_get_vercel_oidc_token.getVercelOidcTokenSync\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_get_vercel_oidc_token = require(\"./get-vercel-oidc-token\");\nvar import_get_context = require(\"./get-context\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  getContext,\n  getVercelOidcToken,\n  getVercelOidcTokenSync\n});\n","// src/gateway-provider.ts\nimport {\n  loadOptionalSetting,\n  withoutTrailingSlash\n} from \"@ai-sdk/provider-utils\";\n\n// src/errors/as-gateway-error.ts\nimport { APICallError } from \"@ai-sdk/provider\";\n\n// src/errors/create-gateway-error.ts\nimport { z as z2 } from \"zod/v4\";\n\n// src/errors/gateway-error.ts\nvar marker = \"vercel.ai.gateway.error\";\nvar symbol = Symbol.for(marker);\nvar _a, _b;\nvar GatewayError = class _GatewayError extends (_b = Error, _a = symbol, _b) {\n  constructor({\n    message,\n    statusCode = 500,\n    cause,\n    generationId\n  }) {\n    super(generationId ? `${message} [${generationId}]` : message);\n    this[_a] = true;\n    this.statusCode = statusCode;\n    this.cause = cause;\n    this.generationId = generationId;\n  }\n  /**\n   * Checks if the given error is a Gateway Error.\n   * @param {unknown} error - The error to check.\n   * @returns {boolean} True if the error is a Gateway Error, false otherwise.\n   */\n  static isInstance(error) {\n    return _GatewayError.hasMarker(error);\n  }\n  static hasMarker(error) {\n    return typeof error === \"object\" && error !== null && symbol in error && error[symbol] === true;\n  }\n};\n\n// src/errors/gateway-authentication-error.ts\nvar name = \"GatewayAuthenticationError\";\nvar marker2 = `vercel.ai.gateway.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2, _b2;\nvar GatewayAuthenticationError = class _GatewayAuthenticationError extends (_b2 = GatewayError, _a2 = symbol2, _b2) {\n  constructor({\n    message = \"Authentication failed\",\n    statusCode = 401,\n    cause,\n    generationId\n  } = {}) {\n    super({ message, statusCode, cause, generationId });\n    this[_a2] = true;\n    // used in isInstance\n    this.name = name;\n    this.type = \"authentication_error\";\n  }\n  static isInstance(error) {\n    return GatewayError.hasMarker(error) && symbol2 in error;\n  }\n  /**\n   * Creates a contextual error message when authentication fails\n   */\n  static createContextualError({\n    apiKeyProvided,\n    oidcTokenProvided,\n    message = \"Authentication failed\",\n    statusCode = 401,\n    cause,\n    generationId\n  }) {\n    let contextualMessage;\n    if (apiKeyProvided) {\n      contextualMessage = `AI Gateway authentication failed: Invalid API key.\n\nCreate a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys\n\nProvide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;\n    } else if (oidcTokenProvided) {\n      contextualMessage = `AI Gateway authentication failed: Invalid OIDC token.\n\nRun 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.\n\nAlternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;\n    } else {\n      contextualMessage = `AI Gateway authentication failed: No authentication provided.\n\nOption 1 - API key:\nCreate an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys\nProvide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.\n\nOption 2 - OIDC token:\nRun 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;\n    }\n    return new _GatewayAuthenticationError({\n      message: contextualMessage,\n      statusCode,\n      cause,\n      generationId\n    });\n  }\n};\n\n// src/errors/gateway-invalid-request-error.ts\nvar name2 = \"GatewayInvalidRequestError\";\nvar marker3 = `vercel.ai.gateway.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3, _b3;\nvar GatewayInvalidRequestError = class extends (_b3 = GatewayError, _a3 = symbol3, _b3) {\n  constructor({\n    message = \"Invalid request\",\n    statusCode = 400,\n    cause,\n    generationId\n  } = {}) {\n    super({ message, statusCode, cause, generationId });\n    this[_a3] = true;\n    // used in isInstance\n    this.name = name2;\n    this.type = \"invalid_request_error\";\n  }\n  static isInstance(error) {\n    return GatewayError.hasMarker(error) && symbol3 in error;\n  }\n};\n\n// src/errors/gateway-rate-limit-error.ts\nvar name3 = \"GatewayRateLimitError\";\nvar marker4 = `vercel.ai.gateway.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4, _b4;\nvar GatewayRateLimitError = class extends (_b4 = GatewayError, _a4 = symbol4, _b4) {\n  constructor({\n    message = \"Rate limit exceeded\",\n    statusCode = 429,\n    cause,\n    generationId\n  } = {}) {\n    super({ message, statusCode, cause, generationId });\n    this[_a4] = true;\n    // used in isInstance\n    this.name = name3;\n    this.type = \"rate_limit_exceeded\";\n  }\n  static isInstance(error) {\n    return GatewayError.hasMarker(error) && symbol4 in error;\n  }\n};\n\n// src/errors/gateway-model-not-found-error.ts\nimport { z } from \"zod/v4\";\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nvar name4 = \"GatewayModelNotFoundError\";\nvar marker5 = `vercel.ai.gateway.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar modelNotFoundParamSchema = lazySchema(\n  () => zodSchema(\n    z.object({\n      modelId: z.string()\n    })\n  )\n);\nvar _a5, _b5;\nvar GatewayModelNotFoundError = class extends (_b5 = GatewayError, _a5 = symbol5, _b5) {\n  constructor({\n    message = \"Model not found\",\n    statusCode = 404,\n    modelId,\n    cause,\n    generationId\n  } = {}) {\n    super({ message, statusCode, cause, generationId });\n    this[_a5] = true;\n    // used in isInstance\n    this.name = name4;\n    this.type = \"model_not_found\";\n    this.modelId = modelId;\n  }\n  static isInstance(error) {\n    return GatewayError.hasMarker(error) && symbol5 in error;\n  }\n};\n\n// src/errors/gateway-internal-server-error.ts\nvar name5 = \"GatewayInternalServerError\";\nvar marker6 = `vercel.ai.gateway.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6, _b6;\nvar GatewayInternalServerError = class extends (_b6 = GatewayError, _a6 = symbol6, _b6) {\n  constructor({\n    message = \"Internal server error\",\n    statusCode = 500,\n    cause,\n    generationId\n  } = {}) {\n    super({ message, statusCode, cause, generationId });\n    this[_a6] = true;\n    // used in isInstance\n    this.name = name5;\n    this.type = \"internal_server_error\";\n  }\n  static isInstance(error) {\n    return GatewayError.hasMarker(error) && symbol6 in error;\n  }\n};\n\n// src/errors/gateway-response-error.ts\nvar name6 = \"GatewayResponseError\";\nvar marker7 = `vercel.ai.gateway.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7, _b7;\nvar GatewayResponseError = class extends (_b7 = GatewayError, _a7 = symbol7, _b7) {\n  constructor({\n    message = \"Invalid response from Gateway\",\n    statusCode = 502,\n    response,\n    validationError,\n    cause,\n    generationId\n  } = {}) {\n    super({ message, statusCode, cause, generationId });\n    this[_a7] = true;\n    // used in isInstance\n    this.name = name6;\n    this.type = \"response_error\";\n    this.response = response;\n    this.validationError = validationError;\n  }\n  static isInstance(error) {\n    return GatewayError.hasMarker(error) && symbol7 in error;\n  }\n};\n\n// src/errors/create-gateway-error.ts\nimport {\n  lazySchema as lazySchema2,\n  safeValidateTypes,\n  zodSchema as zodSchema2\n} from \"@ai-sdk/provider-utils\";\nasync function createGatewayErrorFromResponse({\n  response,\n  statusCode,\n  defaultMessage = \"Gateway request failed\",\n  cause,\n  authMethod\n}) {\n  var _a8;\n  const parseResult = await safeValidateTypes({\n    value: response,\n    schema: gatewayErrorResponseSchema\n  });\n  if (!parseResult.success) {\n    const rawGenerationId = typeof response === \"object\" && response !== null && \"generationId\" in response ? response.generationId : void 0;\n    return new GatewayResponseError({\n      message: `Invalid error response format: ${defaultMessage}`,\n      statusCode,\n      response,\n      validationError: parseResult.error,\n      cause,\n      generationId: rawGenerationId\n    });\n  }\n  const validatedResponse = parseResult.value;\n  const errorType = validatedResponse.error.type;\n  const message = validatedResponse.error.message;\n  const generationId = (_a8 = validatedResponse.generationId) != null ? _a8 : void 0;\n  switch (errorType) {\n    case \"authentication_error\":\n      return GatewayAuthenticationError.createContextualError({\n        apiKeyProvided: authMethod === \"api-key\",\n        oidcTokenProvided: authMethod === \"oidc\",\n        statusCode,\n        cause,\n        generationId\n      });\n    case \"invalid_request_error\":\n      return new GatewayInvalidRequestError({\n        message,\n        statusCode,\n        cause,\n        generationId\n      });\n    case \"rate_limit_exceeded\":\n      return new GatewayRateLimitError({\n        message,\n        statusCode,\n        cause,\n        generationId\n      });\n    case \"model_not_found\": {\n      const modelResult = await safeValidateTypes({\n        value: validatedResponse.error.param,\n        schema: modelNotFoundParamSchema\n      });\n      return new GatewayModelNotFoundError({\n        message,\n        statusCode,\n        modelId: modelResult.success ? modelResult.value.modelId : void 0,\n        cause,\n        generationId\n      });\n    }\n    case \"internal_server_error\":\n      return new GatewayInternalServerError({\n        message,\n        statusCode,\n        cause,\n        generationId\n      });\n    default:\n      return new GatewayInternalServerError({\n        message,\n        statusCode,\n        cause,\n        generationId\n      });\n  }\n}\nvar gatewayErrorResponseSchema = lazySchema2(\n  () => zodSchema2(\n    z2.object({\n      error: z2.object({\n        message: z2.string(),\n        type: z2.string().nullish(),\n        param: z2.unknown().nullish(),\n        code: z2.union([z2.string(), z2.number()]).nullish()\n      }),\n      generationId: z2.string().nullish()\n    })\n  )\n);\n\n// src/errors/as-gateway-error.ts\nfunction asGatewayError(error, authMethod) {\n  var _a8;\n  if (GatewayError.isInstance(error)) {\n    return error;\n  }\n  if (APICallError.isInstance(error)) {\n    return createGatewayErrorFromResponse({\n      response: extractApiCallResponse(error),\n      statusCode: (_a8 = error.statusCode) != null ? _a8 : 500,\n      defaultMessage: \"Gateway request failed\",\n      cause: error,\n      authMethod\n    });\n  }\n  return createGatewayErrorFromResponse({\n    response: {},\n    statusCode: 500,\n    defaultMessage: error instanceof Error ? `Gateway request failed: ${error.message}` : \"Unknown Gateway error\",\n    cause: error,\n    authMethod\n  });\n}\n\n// src/errors/extract-api-call-response.ts\nfunction extractApiCallResponse(error) {\n  if (error.data !== void 0) {\n    return error.data;\n  }\n  if (error.responseBody != null) {\n    try {\n      return JSON.parse(error.responseBody);\n    } catch (e) {\n      return error.responseBody;\n    }\n  }\n  return {};\n}\n\n// src/errors/parse-auth-method.ts\nimport { z as z3 } from \"zod/v4\";\nimport {\n  lazySchema as lazySchema3,\n  safeValidateTypes as safeValidateTypes2,\n  zodSchema as zodSchema3\n} from \"@ai-sdk/provider-utils\";\nvar GATEWAY_AUTH_METHOD_HEADER = \"ai-gateway-auth-method\";\nasync function parseAuthMethod(headers) {\n  const result = await safeValidateTypes2({\n    value: headers[GATEWAY_AUTH_METHOD_HEADER],\n    schema: gatewayAuthMethodSchema\n  });\n  return result.success ? result.value : void 0;\n}\nvar gatewayAuthMethodSchema = lazySchema3(\n  () => zodSchema3(z3.union([z3.literal(\"api-key\"), z3.literal(\"oidc\")]))\n);\n\n// src/gateway-fetch-metadata.ts\nimport {\n  createJsonErrorResponseHandler,\n  createJsonResponseHandler,\n  getFromApi,\n  lazySchema as lazySchema4,\n  resolve,\n  zodSchema as zodSchema4\n} from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nvar GatewayFetchMetadata = class {\n  constructor(config) {\n    this.config = config;\n  }\n  async getAvailableModels() {\n    try {\n      const { value } = await getFromApi({\n        url: `${this.config.baseURL}/config`,\n        headers: await resolve(this.config.headers()),\n        successfulResponseHandler: createJsonResponseHandler(\n          gatewayAvailableModelsResponseSchema\n        ),\n        failedResponseHandler: createJsonErrorResponseHandler({\n          errorSchema: z4.any(),\n          errorToMessage: (data) => data\n        }),\n        fetch: this.config.fetch\n      });\n      return value;\n    } catch (error) {\n      throw await asGatewayError(error);\n    }\n  }\n  async getCredits() {\n    try {\n      const baseUrl = new URL(this.config.baseURL);\n      const { value } = await getFromApi({\n        url: `${baseUrl.origin}/v1/credits`,\n        headers: await resolve(this.config.headers()),\n        successfulResponseHandler: createJsonResponseHandler(\n          gatewayCreditsResponseSchema\n        ),\n        failedResponseHandler: createJsonErrorResponseHandler({\n          errorSchema: z4.any(),\n          errorToMessage: (data) => data\n        }),\n        fetch: this.config.fetch\n      });\n      return value;\n    } catch (error) {\n      throw await asGatewayError(error);\n    }\n  }\n};\nvar gatewayAvailableModelsResponseSchema = lazySchema4(\n  () => zodSchema4(\n    z4.object({\n      models: z4.array(\n        z4.object({\n          id: z4.string(),\n          name: z4.string(),\n          description: z4.string().nullish(),\n          pricing: z4.object({\n            input: z4.string(),\n            output: z4.string(),\n            input_cache_read: z4.string().nullish(),\n            input_cache_write: z4.string().nullish()\n          }).transform(\n            ({ input, output, input_cache_read, input_cache_write }) => ({\n              input,\n              output,\n              ...input_cache_read ? { cachedInputTokens: input_cache_read } : {},\n              ...input_cache_write ? { cacheCreationInputTokens: input_cache_write } : {}\n            })\n          ).nullish(),\n          specification: z4.object({\n            specificationVersion: z4.literal(\"v3\"),\n            provider: z4.string(),\n            modelId: z4.string()\n          }),\n          modelType: z4.enum([\"language\", \"embedding\", \"image\"]).nullish()\n        })\n      )\n    })\n  )\n);\nvar gatewayCreditsResponseSchema = lazySchema4(\n  () => zodSchema4(\n    z4.object({\n      balance: z4.string(),\n      total_used: z4.string()\n    }).transform(({ balance, total_used }) => ({\n      balance,\n      totalUsed: total_used\n    }))\n  )\n);\n\n// src/gateway-language-model.ts\nimport {\n  combineHeaders,\n  createEventSourceResponseHandler,\n  createJsonErrorResponseHandler as createJsonErrorResponseHandler2,\n  createJsonResponseHandler as createJsonResponseHandler2,\n  postJsonToApi,\n  resolve as resolve2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\nvar GatewayLanguageModel = class {\n  constructor(modelId, config) {\n    this.modelId = modelId;\n    this.config = config;\n    this.specificationVersion = \"v3\";\n    this.supportedUrls = { \"*/*\": [/.*/] };\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async getArgs(options) {\n    const { abortSignal: _abortSignal, ...optionsWithoutSignal } = options;\n    return {\n      args: this.maybeEncodeFileParts(optionsWithoutSignal),\n      warnings: []\n    };\n  }\n  async doGenerate(options) {\n    const { args, warnings } = await this.getArgs(options);\n    const { abortSignal } = options;\n    const resolvedHeaders = await resolve2(this.config.headers());\n    try {\n      const {\n        responseHeaders,\n        value: responseBody,\n        rawValue: rawResponse\n      } = await postJsonToApi({\n        url: this.getUrl(),\n        headers: combineHeaders(\n          resolvedHeaders,\n          options.headers,\n          this.getModelConfigHeaders(this.modelId, false),\n          await resolve2(this.config.o11yHeaders)\n        ),\n        body: args,\n        successfulResponseHandler: createJsonResponseHandler2(z5.any()),\n        failedResponseHandler: createJsonErrorResponseHandler2({\n          errorSchema: z5.any(),\n          errorToMessage: (data) => data\n        }),\n        ...abortSignal && { abortSignal },\n        fetch: this.config.fetch\n      });\n      return {\n        ...responseBody,\n        request: { body: args },\n        response: { headers: responseHeaders, body: rawResponse },\n        warnings\n      };\n    } catch (error) {\n      throw await asGatewayError(error, await parseAuthMethod(resolvedHeaders));\n    }\n  }\n  async doStream(options) {\n    const { args, warnings } = await this.getArgs(options);\n    const { abortSignal } = options;\n    const resolvedHeaders = await resolve2(this.config.headers());\n    try {\n      const { value: response, responseHeaders } = await postJsonToApi({\n        url: this.getUrl(),\n        headers: combineHeaders(\n          resolvedHeaders,\n          options.headers,\n          this.getModelConfigHeaders(this.modelId, true),\n          await resolve2(this.config.o11yHeaders)\n        ),\n        body: args,\n        successfulResponseHandler: createEventSourceResponseHandler(z5.any()),\n        failedResponseHandler: createJsonErrorResponseHandler2({\n          errorSchema: z5.any(),\n          errorToMessage: (data) => data\n        }),\n        ...abortSignal && { abortSignal },\n        fetch: this.config.fetch\n      });\n      return {\n        stream: response.pipeThrough(\n          new TransformStream({\n            start(controller) {\n              if (warnings.length > 0) {\n                controller.enqueue({ type: \"stream-start\", warnings });\n              }\n            },\n            transform(chunk, controller) {\n              if (chunk.success) {\n                const streamPart = chunk.value;\n                if (streamPart.type === \"raw\" && !options.includeRawChunks) {\n                  return;\n                }\n                if (streamPart.type === \"response-metadata\" && streamPart.timestamp && typeof streamPart.timestamp === \"string\") {\n                  streamPart.timestamp = new Date(streamPart.timestamp);\n                }\n                controller.enqueue(streamPart);\n              } else {\n                controller.error(\n                  chunk.error\n                );\n              }\n            }\n          })\n        ),\n        request: { body: args },\n        response: { headers: responseHeaders }\n      };\n    } catch (error) {\n      throw await asGatewayError(error, await parseAuthMethod(resolvedHeaders));\n    }\n  }\n  isFilePart(part) {\n    return part && typeof part === \"object\" && \"type\" in part && part.type === \"file\";\n  }\n  /**\n   * Encodes file parts in the prompt to base64. Mutates the passed options\n   * instance directly to avoid copying the file data.\n   * @param options - The options to encode.\n   * @returns The options with the file parts encoded.\n   */\n  maybeEncodeFileParts(options) {\n    for (const message of options.prompt) {\n      for (const part of message.content) {\n        if (this.isFilePart(part)) {\n          const filePart = part;\n          if (filePart.data instanceof Uint8Array) {\n            const buffer = Uint8Array.from(filePart.data);\n            const base64Data = Buffer.from(buffer).toString(\"base64\");\n            filePart.data = new URL(\n              `data:${filePart.mediaType || \"application/octet-stream\"};base64,${base64Data}`\n            );\n          }\n        }\n      }\n    }\n    return options;\n  }\n  getUrl() {\n    return `${this.config.baseURL}/language-model`;\n  }\n  getModelConfigHeaders(modelId, streaming) {\n    return {\n      \"ai-language-model-specification-version\": \"3\",\n      \"ai-language-model-id\": modelId,\n      \"ai-language-model-streaming\": String(streaming)\n    };\n  }\n};\n\n// src/gateway-embedding-model.ts\nimport {\n  combineHeaders as combineHeaders2,\n  createJsonErrorResponseHandler as createJsonErrorResponseHandler3,\n  createJsonResponseHandler as createJsonResponseHandler3,\n  lazySchema as lazySchema5,\n  postJsonToApi as postJsonToApi2,\n  resolve as resolve3,\n  zodSchema as zodSchema5\n} from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar GatewayEmbeddingModel = class {\n  constructor(modelId, config) {\n    this.modelId = modelId;\n    this.config = config;\n    this.specificationVersion = \"v3\";\n    this.maxEmbeddingsPerCall = 2048;\n    this.supportsParallelCalls = true;\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async doEmbed({\n    values,\n    headers,\n    abortSignal,\n    providerOptions\n  }) {\n    var _a8;\n    const resolvedHeaders = await resolve3(this.config.headers());\n    try {\n      const {\n        responseHeaders,\n        value: responseBody,\n        rawValue\n      } = await postJsonToApi2({\n        url: this.getUrl(),\n        headers: combineHeaders2(\n          resolvedHeaders,\n          headers != null ? headers : {},\n          this.getModelConfigHeaders(),\n          await resolve3(this.config.o11yHeaders)\n        ),\n        body: {\n          values,\n          ...providerOptions ? { providerOptions } : {}\n        },\n        successfulResponseHandler: createJsonResponseHandler3(\n          gatewayEmbeddingResponseSchema\n        ),\n        failedResponseHandler: createJsonErrorResponseHandler3({\n          errorSchema: z6.any(),\n          errorToMessage: (data) => data\n        }),\n        ...abortSignal && { abortSignal },\n        fetch: this.config.fetch\n      });\n      return {\n        embeddings: responseBody.embeddings,\n        usage: (_a8 = responseBody.usage) != null ? _a8 : void 0,\n        providerMetadata: responseBody.providerMetadata,\n        response: { headers: responseHeaders, body: rawValue },\n        warnings: []\n      };\n    } catch (error) {\n      throw await asGatewayError(error, await parseAuthMethod(resolvedHeaders));\n    }\n  }\n  getUrl() {\n    return `${this.config.baseURL}/embedding-model`;\n  }\n  getModelConfigHeaders() {\n    return {\n      \"ai-embedding-model-specification-version\": \"3\",\n      \"ai-model-id\": this.modelId\n    };\n  }\n};\nvar gatewayEmbeddingResponseSchema = lazySchema5(\n  () => zodSchema5(\n    z6.object({\n      embeddings: z6.array(z6.array(z6.number())),\n      usage: z6.object({ tokens: z6.number() }).nullish(),\n      providerMetadata: z6.record(z6.string(), z6.record(z6.string(), z6.unknown())).optional()\n    })\n  )\n);\n\n// src/gateway-image-model.ts\nimport {\n  combineHeaders as combineHeaders3,\n  convertUint8ArrayToBase64,\n  createJsonResponseHandler as createJsonResponseHandler4,\n  createJsonErrorResponseHandler as createJsonErrorResponseHandler4,\n  postJsonToApi as postJsonToApi3,\n  resolve as resolve4\n} from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod/v4\";\nvar GatewayImageModel = class {\n  constructor(modelId, config) {\n    this.modelId = modelId;\n    this.config = config;\n    this.specificationVersion = \"v3\";\n    // Set a very large number to prevent client-side splitting of requests\n    this.maxImagesPerCall = Number.MAX_SAFE_INTEGER;\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async doGenerate({\n    prompt,\n    n,\n    size,\n    aspectRatio,\n    seed,\n    files,\n    mask,\n    providerOptions,\n    headers,\n    abortSignal\n  }) {\n    var _a8;\n    const resolvedHeaders = await resolve4(this.config.headers());\n    try {\n      const {\n        responseHeaders,\n        value: responseBody,\n        rawValue\n      } = await postJsonToApi3({\n        url: this.getUrl(),\n        headers: combineHeaders3(\n          resolvedHeaders,\n          headers != null ? headers : {},\n          this.getModelConfigHeaders(),\n          await resolve4(this.config.o11yHeaders)\n        ),\n        body: {\n          prompt,\n          n,\n          ...size && { size },\n          ...aspectRatio && { aspectRatio },\n          ...seed && { seed },\n          ...providerOptions && { providerOptions },\n          ...files && {\n            files: files.map((file) => maybeEncodeImageFile(file))\n          },\n          ...mask && { mask: maybeEncodeImageFile(mask) }\n        },\n        successfulResponseHandler: createJsonResponseHandler4(\n          gatewayImageResponseSchema\n        ),\n        failedResponseHandler: createJsonErrorResponseHandler4({\n          errorSchema: z7.any(),\n          errorToMessage: (data) => data\n        }),\n        ...abortSignal && { abortSignal },\n        fetch: this.config.fetch\n      });\n      return {\n        images: responseBody.images,\n        // Always base64 strings from server\n        warnings: (_a8 = responseBody.warnings) != null ? _a8 : [],\n        providerMetadata: responseBody.providerMetadata,\n        response: {\n          timestamp: /* @__PURE__ */ new Date(),\n          modelId: this.modelId,\n          headers: responseHeaders\n        }\n      };\n    } catch (error) {\n      throw asGatewayError(error, await parseAuthMethod(resolvedHeaders));\n    }\n  }\n  getUrl() {\n    return `${this.config.baseURL}/image-model`;\n  }\n  getModelConfigHeaders() {\n    return {\n      \"ai-image-model-specification-version\": \"3\",\n      \"ai-model-id\": this.modelId\n    };\n  }\n};\nfunction maybeEncodeImageFile(file) {\n  if (file.type === \"file\" && file.data instanceof Uint8Array) {\n    return {\n      ...file,\n      data: convertUint8ArrayToBase64(file.data)\n    };\n  }\n  return file;\n}\nvar providerMetadataEntrySchema = z7.object({\n  images: z7.array(z7.unknown()).optional()\n}).catchall(z7.unknown());\nvar gatewayImageResponseSchema = z7.object({\n  images: z7.array(z7.string()),\n  // Always base64 strings over the wire\n  warnings: z7.array(\n    z7.object({\n      type: z7.literal(\"other\"),\n      message: z7.string()\n    })\n  ).optional(),\n  providerMetadata: z7.record(z7.string(), providerMetadataEntrySchema).optional()\n});\n\n// src/tool/parallel-search.ts\nimport {\n  createProviderToolFactoryWithOutputSchema,\n  lazySchema as lazySchema6,\n  zodSchema as zodSchema6\n} from \"@ai-sdk/provider-utils\";\nimport { z as z8 } from \"zod\";\nvar parallelSearchInputSchema = lazySchema6(\n  () => zodSchema6(\n    z8.object({\n      objective: z8.string().describe(\n        \"Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters.\"\n      ),\n      search_queries: z8.array(z8.string()).optional().describe(\n        \"Optional search queries to supplement the objective. Maximum 200 characters per query.\"\n      ),\n      mode: z8.enum([\"one-shot\", \"agentic\"]).optional().describe(\n        'Mode preset: \"one-shot\" for comprehensive results with longer excerpts (default), \"agentic\" for concise, token-efficient results for multi-step workflows.'\n      ),\n      max_results: z8.number().optional().describe(\n        \"Maximum number of results to return (1-20). Defaults to 10 if not specified.\"\n      ),\n      source_policy: z8.object({\n        include_domains: z8.array(z8.string()).optional().describe(\"List of domains to include in search results.\"),\n        exclude_domains: z8.array(z8.string()).optional().describe(\"List of domains to exclude from search results.\"),\n        after_date: z8.string().optional().describe(\n          \"Only include results published after this date (ISO 8601 format).\"\n        )\n      }).optional().describe(\n        \"Source policy for controlling which domains to include/exclude and freshness.\"\n      ),\n      excerpts: z8.object({\n        max_chars_per_result: z8.number().optional().describe(\"Maximum characters per result.\"),\n        max_chars_total: z8.number().optional().describe(\"Maximum total characters across all results.\")\n      }).optional().describe(\"Excerpt configuration for controlling result length.\"),\n      fetch_policy: z8.object({\n        max_age_seconds: z8.number().optional().describe(\n          \"Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.\"\n        )\n      }).optional().describe(\"Fetch policy for controlling content freshness.\")\n    })\n  )\n);\nvar parallelSearchOutputSchema = lazySchema6(\n  () => zodSchema6(\n    z8.union([\n      // Success response\n      z8.object({\n        searchId: z8.string(),\n        results: z8.array(\n          z8.object({\n            url: z8.string(),\n            title: z8.string(),\n            excerpt: z8.string(),\n            publishDate: z8.string().nullable().optional(),\n            relevanceScore: z8.number().optional()\n          })\n        )\n      }),\n      // Error response\n      z8.object({\n        error: z8.enum([\n          \"api_error\",\n          \"rate_limit\",\n          \"timeout\",\n          \"invalid_input\",\n          \"configuration_error\",\n          \"unknown\"\n        ]),\n        statusCode: z8.number().optional(),\n        message: z8.string()\n      })\n    ])\n  )\n);\nvar parallelSearchToolFactory = createProviderToolFactoryWithOutputSchema({\n  id: \"gateway.parallel_search\",\n  inputSchema: parallelSearchInputSchema,\n  outputSchema: parallelSearchOutputSchema\n});\nvar parallelSearch = (config = {}) => parallelSearchToolFactory(config);\n\n// src/tool/perplexity-search.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,\n  lazySchema as lazySchema7,\n  zodSchema as zodSchema7\n} from \"@ai-sdk/provider-utils\";\nimport { z as z9 } from \"zod\";\nvar perplexitySearchInputSchema = lazySchema7(\n  () => zodSchema7(\n    z9.object({\n      query: z9.union([z9.string(), z9.array(z9.string())]).describe(\n        \"Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries.\"\n      ),\n      max_results: z9.number().optional().describe(\n        \"Maximum number of search results to return (1-20, default: 10)\"\n      ),\n      max_tokens_per_page: z9.number().optional().describe(\n        \"Maximum number of tokens to extract per search result page (256-2048, default: 2048)\"\n      ),\n      max_tokens: z9.number().optional().describe(\n        \"Maximum total tokens across all search results (default: 25000, max: 1000000)\"\n      ),\n      country: z9.string().optional().describe(\n        \"Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')\"\n      ),\n      search_domain_filter: z9.array(z9.string()).optional().describe(\n        \"List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']\"\n      ),\n      search_language_filter: z9.array(z9.string()).optional().describe(\n        \"List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']\"\n      ),\n      search_after_date: z9.string().optional().describe(\n        \"Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter.\"\n      ),\n      search_before_date: z9.string().optional().describe(\n        \"Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter.\"\n      ),\n      last_updated_after_filter: z9.string().optional().describe(\n        \"Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter.\"\n      ),\n      last_updated_before_filter: z9.string().optional().describe(\n        \"Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter.\"\n      ),\n      search_recency_filter: z9.enum([\"day\", \"week\", \"month\", \"year\"]).optional().describe(\n        \"Filter results by relative time period. Cannot be used with search_after_date or search_before_date.\"\n      )\n    })\n  )\n);\nvar perplexitySearchOutputSchema = lazySchema7(\n  () => zodSchema7(\n    z9.union([\n      // Success response\n      z9.object({\n        results: z9.array(\n          z9.object({\n            title: z9.string(),\n            url: z9.string(),\n            snippet: z9.string(),\n            date: z9.string().optional(),\n            lastUpdated: z9.string().optional()\n          })\n        ),\n        id: z9.string()\n      }),\n      // Error response\n      z9.object({\n        error: z9.enum([\n          \"api_error\",\n          \"rate_limit\",\n          \"timeout\",\n          \"invalid_input\",\n          \"unknown\"\n        ]),\n        statusCode: z9.number().optional(),\n        message: z9.string()\n      })\n    ])\n  )\n);\nvar perplexitySearchToolFactory = createProviderToolFactoryWithOutputSchema2({\n  id: \"gateway.perplexity_search\",\n  inputSchema: perplexitySearchInputSchema,\n  outputSchema: perplexitySearchOutputSchema\n});\nvar perplexitySearch = (config = {}) => perplexitySearchToolFactory(config);\n\n// src/gateway-tools.ts\nvar gatewayTools = {\n  /**\n   * Search the web using Parallel AI's Search API for LLM-optimized excerpts.\n   *\n   * Takes a natural language objective and returns relevant excerpts,\n   * replacing multiple keyword searches with a single call for broad\n   * or complex queries. Supports different search types for depth vs\n   * breadth tradeoffs.\n   */\n  parallelSearch,\n  /**\n   * Search the web using Perplexity's Search API for real-time information,\n   * news, research papers, and articles.\n   *\n   * Provides ranked search results with advanced filtering options including\n   * domain, language, date range, and recency filters.\n   */\n  perplexitySearch\n};\n\n// src/vercel-environment.ts\nimport { getContext } from \"@vercel/oidc\";\nimport { getVercelOidcToken } from \"@vercel/oidc\";\nasync function getVercelRequestId() {\n  var _a8;\n  return (_a8 = getContext().headers) == null ? void 0 : _a8[\"x-vercel-id\"];\n}\n\n// src/gateway-provider.ts\nimport { withUserAgentSuffix } from \"@ai-sdk/provider-utils\";\n\n// src/version.ts\nvar VERSION = true ? \"3.0.29\" : \"0.0.0-test\";\n\n// src/gateway-provider.ts\nvar AI_GATEWAY_PROTOCOL_VERSION = \"0.0.1\";\nfunction createGatewayProvider(options = {}) {\n  var _a8, _b8;\n  let pendingMetadata = null;\n  let metadataCache = null;\n  const cacheRefreshMillis = (_a8 = options.metadataCacheRefreshMillis) != null ? _a8 : 1e3 * 60 * 5;\n  let lastFetchTime = 0;\n  const baseURL = (_b8 = withoutTrailingSlash(options.baseURL)) != null ? _b8 : \"https://ai-gateway.vercel.sh/v3/ai\";\n  const getHeaders = async () => {\n    try {\n      const auth = await getGatewayAuthToken(options);\n      return withUserAgentSuffix(\n        {\n          Authorization: `Bearer ${auth.token}`,\n          \"ai-gateway-protocol-version\": AI_GATEWAY_PROTOCOL_VERSION,\n          [GATEWAY_AUTH_METHOD_HEADER]: auth.authMethod,\n          ...options.headers\n        },\n        `ai-sdk/gateway/${VERSION}`\n      );\n    } catch (error) {\n      throw GatewayAuthenticationError.createContextualError({\n        apiKeyProvided: false,\n        oidcTokenProvided: false,\n        statusCode: 401,\n        cause: error\n      });\n    }\n  };\n  const createO11yHeaders = () => {\n    const deploymentId = loadOptionalSetting({\n      settingValue: void 0,\n      environmentVariableName: \"VERCEL_DEPLOYMENT_ID\"\n    });\n    const environment = loadOptionalSetting({\n      settingValue: void 0,\n      environmentVariableName: \"VERCEL_ENV\"\n    });\n    const region = loadOptionalSetting({\n      settingValue: void 0,\n      environmentVariableName: \"VERCEL_REGION\"\n    });\n    return async () => {\n      const requestId = await getVercelRequestId();\n      return {\n        ...deploymentId && { \"ai-o11y-deployment-id\": deploymentId },\n        ...environment && { \"ai-o11y-environment\": environment },\n        ...region && { \"ai-o11y-region\": region },\n        ...requestId && { \"ai-o11y-request-id\": requestId }\n      };\n    };\n  };\n  const createLanguageModel = (modelId) => {\n    return new GatewayLanguageModel(modelId, {\n      provider: \"gateway\",\n      baseURL,\n      headers: getHeaders,\n      fetch: options.fetch,\n      o11yHeaders: createO11yHeaders()\n    });\n  };\n  const getAvailableModels = async () => {\n    var _a9, _b9, _c;\n    const now = (_c = (_b9 = (_a9 = options._internal) == null ? void 0 : _a9.currentDate) == null ? void 0 : _b9.call(_a9).getTime()) != null ? _c : Date.now();\n    if (!pendingMetadata || now - lastFetchTime > cacheRefreshMillis) {\n      lastFetchTime = now;\n      pendingMetadata = new GatewayFetchMetadata({\n        baseURL,\n        headers: getHeaders,\n        fetch: options.fetch\n      }).getAvailableModels().then((metadata) => {\n        metadataCache = metadata;\n        return metadata;\n      }).catch(async (error) => {\n        throw await asGatewayError(\n          error,\n          await parseAuthMethod(await getHeaders())\n        );\n      });\n    }\n    return metadataCache ? Promise.resolve(metadataCache) : pendingMetadata;\n  };\n  const getCredits = async () => {\n    return new GatewayFetchMetadata({\n      baseURL,\n      headers: getHeaders,\n      fetch: options.fetch\n    }).getCredits().catch(async (error) => {\n      throw await asGatewayError(\n        error,\n        await parseAuthMethod(await getHeaders())\n      );\n    });\n  };\n  const provider = function(modelId) {\n    if (new.target) {\n      throw new Error(\n        \"The Gateway Provider model function cannot be called with the new keyword.\"\n      );\n    }\n    return createLanguageModel(modelId);\n  };\n  provider.specificationVersion = \"v3\";\n  provider.getAvailableModels = getAvailableModels;\n  provider.getCredits = getCredits;\n  provider.imageModel = (modelId) => {\n    return new GatewayImageModel(modelId, {\n      provider: \"gateway\",\n      baseURL,\n      headers: getHeaders,\n      fetch: options.fetch,\n      o11yHeaders: createO11yHeaders()\n    });\n  };\n  provider.languageModel = createLanguageModel;\n  const createEmbeddingModel = (modelId) => {\n    return new GatewayEmbeddingModel(modelId, {\n      provider: \"gateway\",\n      baseURL,\n      headers: getHeaders,\n      fetch: options.fetch,\n      o11yHeaders: createO11yHeaders()\n    });\n  };\n  provider.embeddingModel = createEmbeddingModel;\n  provider.textEmbeddingModel = createEmbeddingModel;\n  provider.tools = gatewayTools;\n  return provider;\n}\nvar gateway = createGatewayProvider();\nasync function getGatewayAuthToken(options) {\n  const apiKey = loadOptionalSetting({\n    settingValue: options.apiKey,\n    environmentVariableName: \"AI_GATEWAY_API_KEY\"\n  });\n  if (apiKey) {\n    return {\n      token: apiKey,\n      authMethod: \"api-key\"\n    };\n  }\n  const oidcToken = await getVercelOidcToken();\n  return {\n    token: oidcToken,\n    authMethod: \"oidc\"\n  };\n}\nexport {\n  GatewayAuthenticationError,\n  GatewayError,\n  GatewayInternalServerError,\n  GatewayInvalidRequestError,\n  GatewayModelNotFoundError,\n  GatewayRateLimitError,\n  GatewayResponseError,\n  createGatewayProvider as createGateway,\n  createGatewayProvider,\n  gateway\n};\n//# sourceMappingURL=index.mjs.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexport var _globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '1.9.0';\n//# sourceMappingURL=version.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VERSION } from '../version';\nvar re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n *    - 1.x package cannot use global 2.x package\n *    - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n *    - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n *    - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nexport function _makeCompatibilityCheck(ownVersion) {\n    var acceptedVersions = new Set([ownVersion]);\n    var rejectedVersions = new Set();\n    var myVersionMatch = ownVersion.match(re);\n    if (!myVersionMatch) {\n        // we cannot guarantee compatibility so we always return noop\n        return function () { return false; };\n    }\n    var ownVersionParsed = {\n        major: +myVersionMatch[1],\n        minor: +myVersionMatch[2],\n        patch: +myVersionMatch[3],\n        prerelease: myVersionMatch[4],\n    };\n    // if ownVersion has a prerelease tag, versions must match exactly\n    if (ownVersionParsed.prerelease != null) {\n        return function isExactmatch(globalVersion) {\n            return globalVersion === ownVersion;\n        };\n    }\n    function _reject(v) {\n        rejectedVersions.add(v);\n        return false;\n    }\n    function _accept(v) {\n        acceptedVersions.add(v);\n        return true;\n    }\n    return function isCompatible(globalVersion) {\n        if (acceptedVersions.has(globalVersion)) {\n            return true;\n        }\n        if (rejectedVersions.has(globalVersion)) {\n            return false;\n        }\n        var globalVersionMatch = globalVersion.match(re);\n        if (!globalVersionMatch) {\n            // cannot parse other version\n            // we cannot guarantee compatibility so we always noop\n            return _reject(globalVersion);\n        }\n        var globalVersionParsed = {\n            major: +globalVersionMatch[1],\n            minor: +globalVersionMatch[2],\n            patch: +globalVersionMatch[3],\n            prerelease: globalVersionMatch[4],\n        };\n        // if globalVersion has a prerelease tag, versions must match exactly\n        if (globalVersionParsed.prerelease != null) {\n            return _reject(globalVersion);\n        }\n        // major versions must match\n        if (ownVersionParsed.major !== globalVersionParsed.major) {\n            return _reject(globalVersion);\n        }\n        if (ownVersionParsed.major === 0) {\n            if (ownVersionParsed.minor === globalVersionParsed.minor &&\n                ownVersionParsed.patch <= globalVersionParsed.patch) {\n                return _accept(globalVersion);\n            }\n            return _reject(globalVersion);\n        }\n        if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n            return _accept(globalVersion);\n        }\n        return _reject(globalVersion);\n    };\n}\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n *    - 1.x package cannot use global 2.x package\n *    - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n *    - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n *    - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexport var isCompatible = _makeCompatibilityCheck(VERSION);\n//# sourceMappingURL=semver.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { _globalThis } from '../platform';\nimport { VERSION } from '../version';\nimport { isCompatible } from './semver';\nvar major = VERSION.split('.')[0];\nvar GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(\"opentelemetry.js.api.\" + major);\nvar _global = _globalThis;\nexport function registerGlobal(type, instance, diag, allowOverride) {\n    var _a;\n    if (allowOverride === void 0) { allowOverride = false; }\n    var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n        version: VERSION,\n    });\n    if (!allowOverride && api[type]) {\n        // already registered an API of this type\n        var err = new Error(\"@opentelemetry/api: Attempted duplicate registration of API: \" + type);\n        diag.error(err.stack || err.message);\n        return false;\n    }\n    if (api.version !== VERSION) {\n        // All registered APIs must be of the same version exactly\n        var err = new Error(\"@opentelemetry/api: Registration of version v\" + api.version + \" for \" + type + \" does not match previously registered API v\" + VERSION);\n        diag.error(err.stack || err.message);\n        return false;\n    }\n    api[type] = instance;\n    diag.debug(\"@opentelemetry/api: Registered a global for \" + type + \" v\" + VERSION + \".\");\n    return true;\n}\nexport function getGlobal(type) {\n    var _a, _b;\n    var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n    if (!globalVersion || !isCompatible(globalVersion)) {\n        return;\n    }\n    return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexport function unregisterGlobal(type, diag) {\n    diag.debug(\"@opentelemetry/api: Unregistering a global for \" + type + \" v\" + VERSION + \".\");\n    var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n    if (api) {\n        delete api[type];\n    }\n}\n//# sourceMappingURL=global-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { getGlobal } from '../internal/global-utils';\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nvar DiagComponentLogger = /** @class */ (function () {\n    function DiagComponentLogger(props) {\n        this._namespace = props.namespace || 'DiagComponentLogger';\n    }\n    DiagComponentLogger.prototype.debug = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        return logProxy('debug', this._namespace, args);\n    };\n    DiagComponentLogger.prototype.error = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        return logProxy('error', this._namespace, args);\n    };\n    DiagComponentLogger.prototype.info = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        return logProxy('info', this._namespace, args);\n    };\n    DiagComponentLogger.prototype.warn = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        return logProxy('warn', this._namespace, args);\n    };\n    DiagComponentLogger.prototype.verbose = function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        return logProxy('verbose', this._namespace, args);\n    };\n    return DiagComponentLogger;\n}());\nexport { DiagComponentLogger };\nfunction logProxy(funcName, namespace, args) {\n    var logger = getGlobal('diag');\n    // shortcut if logger not set\n    if (!logger) {\n        return;\n    }\n    args.unshift(namespace);\n    return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n}\n//# sourceMappingURL=ComponentLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nexport var DiagLogLevel;\n(function (DiagLogLevel) {\n    /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n    DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n    /** Identifies an error scenario */\n    DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n    /** Identifies a warning scenario */\n    DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n    /** General informational log message */\n    DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n    /** General debug log message */\n    DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n    /**\n     * Detailed trace level logging should only be used for development, should only be set\n     * in a development environment.\n     */\n    DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n    /** Used to set the logging level to include all logging */\n    DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DiagLogLevel } from '../types';\nexport function createLogLevelDiagLogger(maxLevel, logger) {\n    if (maxLevel < DiagLogLevel.NONE) {\n        maxLevel = DiagLogLevel.NONE;\n    }\n    else if (maxLevel > DiagLogLevel.ALL) {\n        maxLevel = DiagLogLevel.ALL;\n    }\n    // In case the logger is null or undefined\n    logger = logger || {};\n    function _filterFunc(funcName, theLevel) {\n        var theFunc = logger[funcName];\n        if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n            return theFunc.bind(logger);\n        }\n        return function () { };\n    }\n    return {\n        error: _filterFunc('error', DiagLogLevel.ERROR),\n        warn: _filterFunc('warn', DiagLogLevel.WARN),\n        info: _filterFunc('info', DiagLogLevel.INFO),\n        debug: _filterFunc('debug', DiagLogLevel.DEBUG),\n        verbose: _filterFunc('verbose', DiagLogLevel.VERBOSE),\n    };\n}\n//# sourceMappingURL=logLevelLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { DiagComponentLogger } from '../diag/ComponentLogger';\nimport { createLogLevelDiagLogger } from '../diag/internal/logLevelLogger';\nimport { DiagLogLevel, } from '../diag/types';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nvar API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nvar DiagAPI = /** @class */ (function () {\n    /**\n     * Private internal constructor\n     * @private\n     */\n    function DiagAPI() {\n        function _logProxy(funcName) {\n            return function () {\n                var args = [];\n                for (var _i = 0; _i < arguments.length; _i++) {\n                    args[_i] = arguments[_i];\n                }\n                var logger = getGlobal('diag');\n                // shortcut if logger not set\n                if (!logger)\n                    return;\n                return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n            };\n        }\n        // Using self local variable for minification purposes as 'this' cannot be minified\n        var self = this;\n        // DiagAPI specific functions\n        var setLogger = function (logger, optionsOrLogLevel) {\n            var _a, _b, _c;\n            if (optionsOrLogLevel === void 0) { optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }; }\n            if (logger === self) {\n                // There isn't much we can do here.\n                // Logging to the console might break the user application.\n                // Try to log to self. If a logger was previously registered it will receive the log.\n                var err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n                self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n                return false;\n            }\n            if (typeof optionsOrLogLevel === 'number') {\n                optionsOrLogLevel = {\n                    logLevel: optionsOrLogLevel,\n                };\n            }\n            var oldLogger = getGlobal('diag');\n            var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n            // There already is an logger registered. We'll let it know before overwriting it.\n            if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n                var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '<failed to generate stacktrace>';\n                oldLogger.warn(\"Current logger will be overwritten from \" + stack);\n                newLogger.warn(\"Current logger will overwrite one already registered from \" + stack);\n            }\n            return registerGlobal('diag', newLogger, self, true);\n        };\n        self.setLogger = setLogger;\n        self.disable = function () {\n            unregisterGlobal(API_NAME, self);\n        };\n        self.createComponentLogger = function (options) {\n            return new DiagComponentLogger(options);\n        };\n        self.verbose = _logProxy('verbose');\n        self.debug = _logProxy('debug');\n        self.info = _logProxy('info');\n        self.warn = _logProxy('warn');\n        self.error = _logProxy('error');\n    }\n    /** Get the singleton instance of the DiagAPI API */\n    DiagAPI.instance = function () {\n        if (!this._instance) {\n            this._instance = new DiagAPI();\n        }\n        return this._instance;\n    };\n    return DiagAPI;\n}());\nexport { DiagAPI };\n//# sourceMappingURL=diag.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Get a key to uniquely identify a context value */\nexport function createContextKey(description) {\n    // The specification states that for the same input, multiple calls should\n    // return different keys. Due to the nature of the JS dependency management\n    // system, this creates problems where multiple versions of some package\n    // could hold different keys for the same property.\n    //\n    // Therefore, we use Symbol.for which returns the same key for the same input.\n    return Symbol.for(description);\n}\nvar BaseContext = /** @class */ (function () {\n    /**\n     * Construct a new context which inherits values from an optional parent context.\n     *\n     * @param parentContext a context from which to inherit values\n     */\n    function BaseContext(parentContext) {\n        // for minification\n        var self = this;\n        self._currentContext = parentContext ? new Map(parentContext) : new Map();\n        self.getValue = function (key) { return self._currentContext.get(key); };\n        self.setValue = function (key, value) {\n            var context = new BaseContext(self._currentContext);\n            context._currentContext.set(key, value);\n            return context;\n        };\n        self.deleteValue = function (key) {\n            var context = new BaseContext(self._currentContext);\n            context._currentContext.delete(key);\n            return context;\n        };\n    }\n    return BaseContext;\n}());\n/** The root context is used as the default parent context when there is no active context */\nexport var ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { ROOT_CONTEXT } from './context';\nvar NoopContextManager = /** @class */ (function () {\n    function NoopContextManager() {\n    }\n    NoopContextManager.prototype.active = function () {\n        return ROOT_CONTEXT;\n    };\n    NoopContextManager.prototype.with = function (_context, fn, thisArg) {\n        var args = [];\n        for (var _i = 3; _i < arguments.length; _i++) {\n            args[_i - 3] = arguments[_i];\n        }\n        return fn.call.apply(fn, __spreadArray([thisArg], __read(args), false));\n    };\n    NoopContextManager.prototype.bind = function (_context, target) {\n        return target;\n    };\n    NoopContextManager.prototype.enable = function () {\n        return this;\n    };\n    NoopContextManager.prototype.disable = function () {\n        return this;\n    };\n    return NoopContextManager;\n}());\nexport { NoopContextManager };\n//# sourceMappingURL=NoopContextManager.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { NoopContextManager } from '../context/NoopContextManager';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'context';\nvar NOOP_CONTEXT_MANAGER = new NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nvar ContextAPI = /** @class */ (function () {\n    /** Empty private constructor prevents end users from constructing a new instance of the API */\n    function ContextAPI() {\n    }\n    /** Get the singleton instance of the Context API */\n    ContextAPI.getInstance = function () {\n        if (!this._instance) {\n            this._instance = new ContextAPI();\n        }\n        return this._instance;\n    };\n    /**\n     * Set the current context manager.\n     *\n     * @returns true if the context manager was successfully registered, else false\n     */\n    ContextAPI.prototype.setGlobalContextManager = function (contextManager) {\n        return registerGlobal(API_NAME, contextManager, DiagAPI.instance());\n    };\n    /**\n     * Get the currently active context\n     */\n    ContextAPI.prototype.active = function () {\n        return this._getContextManager().active();\n    };\n    /**\n     * Execute a function with an active context\n     *\n     * @param context context to be active during function execution\n     * @param fn function to execute in a context\n     * @param thisArg optional receiver to be used for calling fn\n     * @param args optional arguments forwarded to fn\n     */\n    ContextAPI.prototype.with = function (context, fn, thisArg) {\n        var _a;\n        var args = [];\n        for (var _i = 3; _i < arguments.length; _i++) {\n            args[_i - 3] = arguments[_i];\n        }\n        return (_a = this._getContextManager()).with.apply(_a, __spreadArray([context, fn, thisArg], __read(args), false));\n    };\n    /**\n     * Bind a context to a target function or event emitter\n     *\n     * @param context context to bind to the event emitter or function. Defaults to the currently active context\n     * @param target function or event emitter to bind\n     */\n    ContextAPI.prototype.bind = function (context, target) {\n        return this._getContextManager().bind(context, target);\n    };\n    ContextAPI.prototype._getContextManager = function () {\n        return getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER;\n    };\n    /** Disable and remove the global context manager */\n    ContextAPI.prototype.disable = function () {\n        this._getContextManager().disable();\n        unregisterGlobal(API_NAME, DiagAPI.instance());\n    };\n    return ContextAPI;\n}());\nexport { ContextAPI };\n//# sourceMappingURL=context.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var TraceFlags;\n(function (TraceFlags) {\n    /** Represents no flag set. */\n    TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n    /** Bit to represent whether trace is sampled in trace flags. */\n    TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags || (TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TraceFlags } from './trace_flags';\nexport var INVALID_SPANID = '0000000000000000';\nexport var INVALID_TRACEID = '00000000000000000000000000000000';\nexport var INVALID_SPAN_CONTEXT = {\n    traceId: INVALID_TRACEID,\n    spanId: INVALID_SPANID,\n    traceFlags: TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPAN_CONTEXT } from './invalid-span-constants';\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nvar NonRecordingSpan = /** @class */ (function () {\n    function NonRecordingSpan(_spanContext) {\n        if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; }\n        this._spanContext = _spanContext;\n    }\n    // Returns a SpanContext.\n    NonRecordingSpan.prototype.spanContext = function () {\n        return this._spanContext;\n    };\n    // By default does nothing\n    NonRecordingSpan.prototype.setAttribute = function (_key, _value) {\n        return this;\n    };\n    // By default does nothing\n    NonRecordingSpan.prototype.setAttributes = function (_attributes) {\n        return this;\n    };\n    // By default does nothing\n    NonRecordingSpan.prototype.addEvent = function (_name, _attributes) {\n        return this;\n    };\n    NonRecordingSpan.prototype.addLink = function (_link) {\n        return this;\n    };\n    NonRecordingSpan.prototype.addLinks = function (_links) {\n        return this;\n    };\n    // By default does nothing\n    NonRecordingSpan.prototype.setStatus = function (_status) {\n        return this;\n    };\n    // By default does nothing\n    NonRecordingSpan.prototype.updateName = function (_name) {\n        return this;\n    };\n    // By default does nothing\n    NonRecordingSpan.prototype.end = function (_endTime) { };\n    // isRecording always returns false for NonRecordingSpan.\n    NonRecordingSpan.prototype.isRecording = function () {\n        return false;\n    };\n    // By default does nothing\n    NonRecordingSpan.prototype.recordException = function (_exception, _time) { };\n    return NonRecordingSpan;\n}());\nexport { NonRecordingSpan };\n//# sourceMappingURL=NonRecordingSpan.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContextKey } from '../context/context';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { ContextAPI } from '../api/context';\n/**\n * span key\n */\nvar SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nexport function getSpan(context) {\n    return context.getValue(SPAN_KEY) || undefined;\n}\n/**\n * Gets the span from the current context, if one exists.\n */\nexport function getActiveSpan() {\n    return getSpan(ContextAPI.getInstance().active());\n}\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nexport function setSpan(context, span) {\n    return context.setValue(SPAN_KEY, span);\n}\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nexport function deleteSpan(context) {\n    return context.deleteValue(SPAN_KEY);\n}\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nexport function setSpanContext(context, spanContext) {\n    return setSpan(context, new NonRecordingSpan(spanContext));\n}\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nexport function getSpanContext(context) {\n    var _a;\n    return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\n//# sourceMappingURL=context-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPANID, INVALID_TRACEID } from './invalid-span-constants';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nvar VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nvar VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nexport function isValidTraceId(traceId) {\n    return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;\n}\nexport function isValidSpanId(spanId) {\n    return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;\n}\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nexport function isSpanContextValid(spanContext) {\n    return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\n}\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nexport function wrapSpanContext(spanContext) {\n    return new NonRecordingSpan(spanContext);\n}\n//# sourceMappingURL=spancontext-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextAPI } from '../api/context';\nimport { getSpanContext, setSpan } from '../trace/context-utils';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { isSpanContextValid } from './spancontext-utils';\nvar contextApi = ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nvar NoopTracer = /** @class */ (function () {\n    function NoopTracer() {\n    }\n    // startSpan starts a noop span.\n    NoopTracer.prototype.startSpan = function (name, options, context) {\n        if (context === void 0) { context = contextApi.active(); }\n        var root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n        if (root) {\n            return new NonRecordingSpan();\n        }\n        var parentFromContext = context && getSpanContext(context);\n        if (isSpanContext(parentFromContext) &&\n            isSpanContextValid(parentFromContext)) {\n            return new NonRecordingSpan(parentFromContext);\n        }\n        else {\n            return new NonRecordingSpan();\n        }\n    };\n    NoopTracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) {\n        var opts;\n        var ctx;\n        var fn;\n        if (arguments.length < 2) {\n            return;\n        }\n        else if (arguments.length === 2) {\n            fn = arg2;\n        }\n        else if (arguments.length === 3) {\n            opts = arg2;\n            fn = arg3;\n        }\n        else {\n            opts = arg2;\n            ctx = arg3;\n            fn = arg4;\n        }\n        var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n        var span = this.startSpan(name, opts, parentContext);\n        var contextWithSpanSet = setSpan(parentContext, span);\n        return contextApi.with(contextWithSpanSet, fn, undefined, span);\n    };\n    return NoopTracer;\n}());\nexport { NoopTracer };\nfunction isSpanContext(spanContext) {\n    return (typeof spanContext === 'object' &&\n        typeof spanContext['spanId'] === 'string' &&\n        typeof spanContext['traceId'] === 'string' &&\n        typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopTracer } from './NoopTracer';\nvar NOOP_TRACER = new NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nvar ProxyTracer = /** @class */ (function () {\n    function ProxyTracer(_provider, name, version, options) {\n        this._provider = _provider;\n        this.name = name;\n        this.version = version;\n        this.options = options;\n    }\n    ProxyTracer.prototype.startSpan = function (name, options, context) {\n        return this._getTracer().startSpan(name, options, context);\n    };\n    ProxyTracer.prototype.startActiveSpan = function (_name, _options, _context, _fn) {\n        var tracer = this._getTracer();\n        return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n    };\n    /**\n     * Try to get a tracer from the proxy tracer provider.\n     * If the proxy tracer provider has no delegate, return a noop tracer.\n     */\n    ProxyTracer.prototype._getTracer = function () {\n        if (this._delegate) {\n            return this._delegate;\n        }\n        var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n        if (!tracer) {\n            return NOOP_TRACER;\n        }\n        this._delegate = tracer;\n        return this._delegate;\n    };\n    return ProxyTracer;\n}());\nexport { ProxyTracer };\n//# sourceMappingURL=ProxyTracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopTracer } from './NoopTracer';\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nvar NoopTracerProvider = /** @class */ (function () {\n    function NoopTracerProvider() {\n    }\n    NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {\n        return new NoopTracer();\n    };\n    return NoopTracerProvider;\n}());\nexport { NoopTracerProvider };\n//# sourceMappingURL=NoopTracerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ProxyTracer } from './ProxyTracer';\nimport { NoopTracerProvider } from './NoopTracerProvider';\nvar NOOP_TRACER_PROVIDER = new NoopTracerProvider();\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n *   When a delegate is set, traces are provided from the delegate.\n *   When a delegate is set after tracers have already been provided,\n *   all tracers already provided will use the provided delegate implementation.\n */\nvar ProxyTracerProvider = /** @class */ (function () {\n    function ProxyTracerProvider() {\n    }\n    /**\n     * Get a {@link ProxyTracer}\n     */\n    ProxyTracerProvider.prototype.getTracer = function (name, version, options) {\n        var _a;\n        return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options));\n    };\n    ProxyTracerProvider.prototype.getDelegate = function () {\n        var _a;\n        return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n    };\n    /**\n     * Set the delegate tracer provider\n     */\n    ProxyTracerProvider.prototype.setDelegate = function (delegate) {\n        this._delegate = delegate;\n    };\n    ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {\n        var _a;\n        return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n    };\n    return ProxyTracerProvider;\n}());\nexport { ProxyTracerProvider };\n//# sourceMappingURL=ProxyTracerProvider.js.map","/**\n * An enumeration of status codes.\n */\nexport var SpanStatusCode;\n(function (SpanStatusCode) {\n    /**\n     * The default status.\n     */\n    SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n    /**\n     * The operation has been validated by an Application developer or\n     * Operator to have completed successfully.\n     */\n    SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n    /**\n     * The operation contains an error.\n     */\n    SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode || (SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { ContextAPI } from './api/context';\n/** Entrypoint for context API */\nexport var context = ContextAPI.getInstance();\n//# sourceMappingURL=context-api.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { ProxyTracerProvider } from '../trace/ProxyTracerProvider';\nimport { isSpanContextValid, wrapSpanContext, } from '../trace/spancontext-utils';\nimport { deleteSpan, getActiveSpan, getSpan, getSpanContext, setSpan, setSpanContext, } from '../trace/context-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nvar TraceAPI = /** @class */ (function () {\n    /** Empty private constructor prevents end users from constructing a new instance of the API */\n    function TraceAPI() {\n        this._proxyTracerProvider = new ProxyTracerProvider();\n        this.wrapSpanContext = wrapSpanContext;\n        this.isSpanContextValid = isSpanContextValid;\n        this.deleteSpan = deleteSpan;\n        this.getSpan = getSpan;\n        this.getActiveSpan = getActiveSpan;\n        this.getSpanContext = getSpanContext;\n        this.setSpan = setSpan;\n        this.setSpanContext = setSpanContext;\n    }\n    /** Get the singleton instance of the Trace API */\n    TraceAPI.getInstance = function () {\n        if (!this._instance) {\n            this._instance = new TraceAPI();\n        }\n        return this._instance;\n    };\n    /**\n     * Set the current global tracer.\n     *\n     * @returns true if the tracer provider was successfully registered, else false\n     */\n    TraceAPI.prototype.setGlobalTracerProvider = function (provider) {\n        var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());\n        if (success) {\n            this._proxyTracerProvider.setDelegate(provider);\n        }\n        return success;\n    };\n    /**\n     * Returns the global tracer provider.\n     */\n    TraceAPI.prototype.getTracerProvider = function () {\n        return getGlobal(API_NAME) || this._proxyTracerProvider;\n    };\n    /**\n     * Returns a tracer from the global tracer provider.\n     */\n    TraceAPI.prototype.getTracer = function (name, version) {\n        return this.getTracerProvider().getTracer(name, version);\n    };\n    /** Remove the global tracer provider */\n    TraceAPI.prototype.disable = function () {\n        unregisterGlobal(API_NAME, DiagAPI.instance());\n        this._proxyTracerProvider = new ProxyTracerProvider();\n    };\n    return TraceAPI;\n}());\nexport { TraceAPI };\n//# sourceMappingURL=trace.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { TraceAPI } from './api/trace';\n/** Entrypoint for trace API */\nexport var trace = TraceAPI.getInstance();\n//# sourceMappingURL=trace-api.js.map","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n  for (var name20 in all)\n    __defProp(target, name20, { get: all[name20], enumerable: true });\n};\n\n// src/index.ts\nimport { createGateway, gateway as gateway2 } from \"@ai-sdk/gateway\";\nimport {\n  asSchema as asSchema5,\n  createIdGenerator as createIdGenerator5,\n  dynamicTool,\n  generateId,\n  jsonSchema,\n  parseJsonEventStream as parseJsonEventStream3,\n  tool,\n  zodSchema as zodSchema3\n} from \"@ai-sdk/provider-utils\";\n\n// src/generate-text/generate-text.ts\nimport {\n  createIdGenerator,\n  getErrorMessage as getErrorMessage5,\n  withUserAgentSuffix as withUserAgentSuffix2\n} from \"@ai-sdk/provider-utils\";\n\n// src/error/index.ts\nimport {\n  AISDKError as AISDKError20,\n  APICallError,\n  EmptyResponseBodyError,\n  InvalidPromptError,\n  InvalidResponseDataError,\n  JSONParseError,\n  LoadAPIKeyError,\n  LoadSettingError,\n  NoContentGeneratedError,\n  NoSuchModelError,\n  TooManyEmbeddingValuesForCallError,\n  TypeValidationError,\n  UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\n\n// src/error/invalid-argument-error.ts\nimport { AISDKError } from \"@ai-sdk/provider\";\nvar name = \"AI_InvalidArgumentError\";\nvar marker = `vercel.ai.error.${name}`;\nvar symbol = Symbol.for(marker);\nvar _a;\nvar InvalidArgumentError = class extends AISDKError {\n  constructor({\n    parameter,\n    value,\n    message\n  }) {\n    super({\n      name,\n      message: `Invalid argument for parameter ${parameter}: ${message}`\n    });\n    this[_a] = true;\n    this.parameter = parameter;\n    this.value = value;\n  }\n  static isInstance(error) {\n    return AISDKError.hasMarker(error, marker);\n  }\n};\n_a = symbol;\n\n// src/error/invalid-stream-part-error.ts\nimport { AISDKError as AISDKError2 } from \"@ai-sdk/provider\";\nvar name2 = \"AI_InvalidStreamPartError\";\nvar marker2 = `vercel.ai.error.${name2}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2;\nvar InvalidStreamPartError = class extends AISDKError2 {\n  constructor({\n    chunk,\n    message\n  }) {\n    super({ name: name2, message });\n    this[_a2] = true;\n    this.chunk = chunk;\n  }\n  static isInstance(error) {\n    return AISDKError2.hasMarker(error, marker2);\n  }\n};\n_a2 = symbol2;\n\n// src/error/invalid-tool-approval-error.ts\nimport { AISDKError as AISDKError3 } from \"@ai-sdk/provider\";\nvar name3 = \"AI_InvalidToolApprovalError\";\nvar marker3 = `vercel.ai.error.${name3}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3;\nvar InvalidToolApprovalError = class extends AISDKError3 {\n  constructor({ approvalId }) {\n    super({\n      name: name3,\n      message: `Tool approval response references unknown approvalId: \"${approvalId}\". No matching tool-approval-request found in message history.`\n    });\n    this[_a3] = true;\n    this.approvalId = approvalId;\n  }\n  static isInstance(error) {\n    return AISDKError3.hasMarker(error, marker3);\n  }\n};\n_a3 = symbol3;\n\n// src/error/invalid-tool-input-error.ts\nimport { AISDKError as AISDKError4, getErrorMessage } from \"@ai-sdk/provider\";\nvar name4 = \"AI_InvalidToolInputError\";\nvar marker4 = `vercel.ai.error.${name4}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4;\nvar InvalidToolInputError = class extends AISDKError4 {\n  constructor({\n    toolInput,\n    toolName,\n    cause,\n    message = `Invalid input for tool ${toolName}: ${getErrorMessage(cause)}`\n  }) {\n    super({ name: name4, message, cause });\n    this[_a4] = true;\n    this.toolInput = toolInput;\n    this.toolName = toolName;\n  }\n  static isInstance(error) {\n    return AISDKError4.hasMarker(error, marker4);\n  }\n};\n_a4 = symbol4;\n\n// src/error/tool-call-not-found-for-approval-error.ts\nimport { AISDKError as AISDKError5 } from \"@ai-sdk/provider\";\nvar name5 = \"AI_ToolCallNotFoundForApprovalError\";\nvar marker5 = `vercel.ai.error.${name5}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5;\nvar ToolCallNotFoundForApprovalError = class extends AISDKError5 {\n  constructor({\n    toolCallId,\n    approvalId\n  }) {\n    super({\n      name: name5,\n      message: `Tool call \"${toolCallId}\" not found for approval request \"${approvalId}\".`\n    });\n    this[_a5] = true;\n    this.toolCallId = toolCallId;\n    this.approvalId = approvalId;\n  }\n  static isInstance(error) {\n    return AISDKError5.hasMarker(error, marker5);\n  }\n};\n_a5 = symbol5;\n\n// src/error/missing-tool-result-error.ts\nimport { AISDKError as AISDKError6 } from \"@ai-sdk/provider\";\nvar name6 = \"AI_MissingToolResultsError\";\nvar marker6 = `vercel.ai.error.${name6}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6;\nvar MissingToolResultsError = class extends AISDKError6 {\n  constructor({ toolCallIds }) {\n    super({\n      name: name6,\n      message: `Tool result${toolCallIds.length > 1 ? \"s are\" : \" is\"} missing for tool call${toolCallIds.length > 1 ? \"s\" : \"\"} ${toolCallIds.join(\n        \", \"\n      )}.`\n    });\n    this[_a6] = true;\n    this.toolCallIds = toolCallIds;\n  }\n  static isInstance(error) {\n    return AISDKError6.hasMarker(error, marker6);\n  }\n};\n_a6 = symbol6;\n\n// src/error/no-image-generated-error.ts\nimport { AISDKError as AISDKError7 } from \"@ai-sdk/provider\";\nvar name7 = \"AI_NoImageGeneratedError\";\nvar marker7 = `vercel.ai.error.${name7}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7;\nvar NoImageGeneratedError = class extends AISDKError7 {\n  constructor({\n    message = \"No image generated.\",\n    cause,\n    responses\n  }) {\n    super({ name: name7, message, cause });\n    this[_a7] = true;\n    this.responses = responses;\n  }\n  static isInstance(error) {\n    return AISDKError7.hasMarker(error, marker7);\n  }\n};\n_a7 = symbol7;\n\n// src/error/no-object-generated-error.ts\nimport { AISDKError as AISDKError8 } from \"@ai-sdk/provider\";\nvar name8 = \"AI_NoObjectGeneratedError\";\nvar marker8 = `vercel.ai.error.${name8}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8;\nvar NoObjectGeneratedError = class extends AISDKError8 {\n  constructor({\n    message = \"No object generated.\",\n    cause,\n    text: text2,\n    response,\n    usage,\n    finishReason\n  }) {\n    super({ name: name8, message, cause });\n    this[_a8] = true;\n    this.text = text2;\n    this.response = response;\n    this.usage = usage;\n    this.finishReason = finishReason;\n  }\n  static isInstance(error) {\n    return AISDKError8.hasMarker(error, marker8);\n  }\n};\n_a8 = symbol8;\n\n// src/error/no-output-generated-error.ts\nimport { AISDKError as AISDKError9 } from \"@ai-sdk/provider\";\nvar name9 = \"AI_NoOutputGeneratedError\";\nvar marker9 = `vercel.ai.error.${name9}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9;\nvar NoOutputGeneratedError = class extends AISDKError9 {\n  // used in isInstance\n  constructor({\n    message = \"No output generated.\",\n    cause\n  } = {}) {\n    super({ name: name9, message, cause });\n    this[_a9] = true;\n  }\n  static isInstance(error) {\n    return AISDKError9.hasMarker(error, marker9);\n  }\n};\n_a9 = symbol9;\n\n// src/error/no-speech-generated-error.ts\nimport { AISDKError as AISDKError10 } from \"@ai-sdk/provider\";\nvar name10 = \"AI_NoSpeechGeneratedError\";\nvar marker10 = `vercel.ai.error.${name10}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10;\nvar NoSpeechGeneratedError = class extends AISDKError10 {\n  constructor(options) {\n    super({\n      name: name10,\n      message: \"No speech audio generated.\"\n    });\n    this[_a10] = true;\n    this.responses = options.responses;\n  }\n  static isInstance(error) {\n    return AISDKError10.hasMarker(error, marker10);\n  }\n};\n_a10 = symbol10;\n\n// src/error/no-transcript-generated-error.ts\nimport { AISDKError as AISDKError11 } from \"@ai-sdk/provider\";\nvar name11 = \"AI_NoTranscriptGeneratedError\";\nvar marker11 = `vercel.ai.error.${name11}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11;\nvar NoTranscriptGeneratedError = class extends AISDKError11 {\n  constructor(options) {\n    super({\n      name: name11,\n      message: \"No transcript generated.\"\n    });\n    this[_a11] = true;\n    this.responses = options.responses;\n  }\n  static isInstance(error) {\n    return AISDKError11.hasMarker(error, marker11);\n  }\n};\n_a11 = symbol11;\n\n// src/error/no-such-tool-error.ts\nimport { AISDKError as AISDKError12 } from \"@ai-sdk/provider\";\nvar name12 = \"AI_NoSuchToolError\";\nvar marker12 = `vercel.ai.error.${name12}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12;\nvar NoSuchToolError = class extends AISDKError12 {\n  constructor({\n    toolName,\n    availableTools = void 0,\n    message = `Model tried to call unavailable tool '${toolName}'. ${availableTools === void 0 ? \"No tools are available.\" : `Available tools: ${availableTools.join(\", \")}.`}`\n  }) {\n    super({ name: name12, message });\n    this[_a12] = true;\n    this.toolName = toolName;\n    this.availableTools = availableTools;\n  }\n  static isInstance(error) {\n    return AISDKError12.hasMarker(error, marker12);\n  }\n};\n_a12 = symbol12;\n\n// src/error/tool-call-repair-error.ts\nimport { AISDKError as AISDKError13, getErrorMessage as getErrorMessage2 } from \"@ai-sdk/provider\";\nvar name13 = \"AI_ToolCallRepairError\";\nvar marker13 = `vercel.ai.error.${name13}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13;\nvar ToolCallRepairError = class extends AISDKError13 {\n  constructor({\n    cause,\n    originalError,\n    message = `Error repairing tool call: ${getErrorMessage2(cause)}`\n  }) {\n    super({ name: name13, message, cause });\n    this[_a13] = true;\n    this.originalError = originalError;\n  }\n  static isInstance(error) {\n    return AISDKError13.hasMarker(error, marker13);\n  }\n};\n_a13 = symbol13;\n\n// src/error/unsupported-model-version-error.ts\nimport { AISDKError as AISDKError14 } from \"@ai-sdk/provider\";\nvar UnsupportedModelVersionError = class extends AISDKError14 {\n  constructor(options) {\n    super({\n      name: \"AI_UnsupportedModelVersionError\",\n      message: `Unsupported model version ${options.version} for provider \"${options.provider}\" and model \"${options.modelId}\". AI SDK 5 only supports models that implement specification version \"v2\".`\n    });\n    this.version = options.version;\n    this.provider = options.provider;\n    this.modelId = options.modelId;\n  }\n};\n\n// src/error/ui-message-stream-error.ts\nimport { AISDKError as AISDKError15 } from \"@ai-sdk/provider\";\nvar name14 = \"AI_UIMessageStreamError\";\nvar marker14 = `vercel.ai.error.${name14}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14;\nvar UIMessageStreamError = class extends AISDKError15 {\n  constructor({\n    chunkType,\n    chunkId,\n    message\n  }) {\n    super({ name: name14, message });\n    this[_a14] = true;\n    this.chunkType = chunkType;\n    this.chunkId = chunkId;\n  }\n  static isInstance(error) {\n    return AISDKError15.hasMarker(error, marker14);\n  }\n};\n_a14 = symbol14;\n\n// src/prompt/invalid-data-content-error.ts\nimport { AISDKError as AISDKError16 } from \"@ai-sdk/provider\";\nvar name15 = \"AI_InvalidDataContentError\";\nvar marker15 = `vercel.ai.error.${name15}`;\nvar symbol15 = Symbol.for(marker15);\nvar _a15;\nvar InvalidDataContentError = class extends AISDKError16 {\n  constructor({\n    content,\n    cause,\n    message = `Invalid data content. Expected a base64 string, Uint8Array, ArrayBuffer, or Buffer, but got ${typeof content}.`\n  }) {\n    super({ name: name15, message, cause });\n    this[_a15] = true;\n    this.content = content;\n  }\n  static isInstance(error) {\n    return AISDKError16.hasMarker(error, marker15);\n  }\n};\n_a15 = symbol15;\n\n// src/prompt/invalid-message-role-error.ts\nimport { AISDKError as AISDKError17 } from \"@ai-sdk/provider\";\nvar name16 = \"AI_InvalidMessageRoleError\";\nvar marker16 = `vercel.ai.error.${name16}`;\nvar symbol16 = Symbol.for(marker16);\nvar _a16;\nvar InvalidMessageRoleError = class extends AISDKError17 {\n  constructor({\n    role,\n    message = `Invalid message role: '${role}'. Must be one of: \"system\", \"user\", \"assistant\", \"tool\".`\n  }) {\n    super({ name: name16, message });\n    this[_a16] = true;\n    this.role = role;\n  }\n  static isInstance(error) {\n    return AISDKError17.hasMarker(error, marker16);\n  }\n};\n_a16 = symbol16;\n\n// src/prompt/message-conversion-error.ts\nimport { AISDKError as AISDKError18 } from \"@ai-sdk/provider\";\nvar name17 = \"AI_MessageConversionError\";\nvar marker17 = `vercel.ai.error.${name17}`;\nvar symbol17 = Symbol.for(marker17);\nvar _a17;\nvar MessageConversionError = class extends AISDKError18 {\n  constructor({\n    originalMessage,\n    message\n  }) {\n    super({ name: name17, message });\n    this[_a17] = true;\n    this.originalMessage = originalMessage;\n  }\n  static isInstance(error) {\n    return AISDKError18.hasMarker(error, marker17);\n  }\n};\n_a17 = symbol17;\n\n// src/error/index.ts\nimport { DownloadError } from \"@ai-sdk/provider-utils\";\n\n// src/util/retry-error.ts\nimport { AISDKError as AISDKError19 } from \"@ai-sdk/provider\";\nvar name18 = \"AI_RetryError\";\nvar marker18 = `vercel.ai.error.${name18}`;\nvar symbol18 = Symbol.for(marker18);\nvar _a18;\nvar RetryError = class extends AISDKError19 {\n  constructor({\n    message,\n    reason,\n    errors\n  }) {\n    super({ name: name18, message });\n    this[_a18] = true;\n    this.reason = reason;\n    this.errors = errors;\n    this.lastError = errors[errors.length - 1];\n  }\n  static isInstance(error) {\n    return AISDKError19.hasMarker(error, marker18);\n  }\n};\n_a18 = symbol18;\n\n// src/logger/log-warnings.ts\nfunction formatWarning({\n  warning,\n  provider,\n  model\n}) {\n  const prefix = `AI SDK Warning (${provider} / ${model}):`;\n  switch (warning.type) {\n    case \"unsupported\": {\n      let message = `${prefix} The feature \"${warning.feature}\" is not supported.`;\n      if (warning.details) {\n        message += ` ${warning.details}`;\n      }\n      return message;\n    }\n    case \"compatibility\": {\n      let message = `${prefix} The feature \"${warning.feature}\" is used in a compatibility mode.`;\n      if (warning.details) {\n        message += ` ${warning.details}`;\n      }\n      return message;\n    }\n    case \"other\": {\n      return `${prefix} ${warning.message}`;\n    }\n    default: {\n      return `${prefix} ${JSON.stringify(warning, null, 2)}`;\n    }\n  }\n}\nvar FIRST_WARNING_INFO_MESSAGE = \"AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.\";\nvar hasLoggedBefore = false;\nvar logWarnings = (options) => {\n  if (options.warnings.length === 0) {\n    return;\n  }\n  const logger = globalThis.AI_SDK_LOG_WARNINGS;\n  if (logger === false) {\n    return;\n  }\n  if (typeof logger === \"function\") {\n    logger(options);\n    return;\n  }\n  if (!hasLoggedBefore) {\n    hasLoggedBefore = true;\n    console.info(FIRST_WARNING_INFO_MESSAGE);\n  }\n  for (const warning of options.warnings) {\n    console.warn(\n      formatWarning({\n        warning,\n        provider: options.provider,\n        model: options.model\n      })\n    );\n  }\n};\n\n// src/model/resolve-model.ts\nimport { gateway } from \"@ai-sdk/gateway\";\n\n// src/util/log-v2-compatibility-warning.ts\nfunction logV2CompatibilityWarning({\n  provider,\n  modelId\n}) {\n  logWarnings({\n    warnings: [\n      {\n        type: \"compatibility\",\n        feature: \"specificationVersion\",\n        details: `Using v2 specification compatibility mode. Some features may not be available.`\n      }\n    ],\n    provider,\n    model: modelId\n  });\n}\n\n// src/model/as-embedding-model-v3.ts\nfunction asEmbeddingModelV3(model) {\n  if (model.specificationVersion === \"v3\") {\n    return model;\n  }\n  logV2CompatibilityWarning({\n    provider: model.provider,\n    modelId: model.modelId\n  });\n  return new Proxy(model, {\n    get(target, prop) {\n      if (prop === \"specificationVersion\")\n        return \"v3\";\n      return target[prop];\n    }\n  });\n}\n\n// src/model/as-image-model-v3.ts\nfunction asImageModelV3(model) {\n  if (model.specificationVersion === \"v3\") {\n    return model;\n  }\n  logV2CompatibilityWarning({\n    provider: model.provider,\n    modelId: model.modelId\n  });\n  return new Proxy(model, {\n    get(target, prop) {\n      if (prop === \"specificationVersion\")\n        return \"v3\";\n      return target[prop];\n    }\n  });\n}\n\n// src/model/as-language-model-v3.ts\nfunction asLanguageModelV3(model) {\n  if (model.specificationVersion === \"v3\") {\n    return model;\n  }\n  logV2CompatibilityWarning({\n    provider: model.provider,\n    modelId: model.modelId\n  });\n  return new Proxy(model, {\n    get(target, prop) {\n      switch (prop) {\n        case \"specificationVersion\":\n          return \"v3\";\n        case \"doGenerate\":\n          return async (...args) => {\n            const result = await target.doGenerate(...args);\n            return {\n              ...result,\n              finishReason: convertV2FinishReasonToV3(result.finishReason),\n              usage: convertV2UsageToV3(result.usage)\n            };\n          };\n        case \"doStream\":\n          return async (...args) => {\n            const result = await target.doStream(...args);\n            return {\n              ...result,\n              stream: convertV2StreamToV3(result.stream)\n            };\n          };\n        default:\n          return target[prop];\n      }\n    }\n  });\n}\nfunction convertV2StreamToV3(stream) {\n  return stream.pipeThrough(\n    new TransformStream({\n      transform(chunk, controller) {\n        switch (chunk.type) {\n          case \"finish\":\n            controller.enqueue({\n              ...chunk,\n              finishReason: convertV2FinishReasonToV3(chunk.finishReason),\n              usage: convertV2UsageToV3(chunk.usage)\n            });\n            break;\n          default:\n            controller.enqueue(chunk);\n            break;\n        }\n      }\n    })\n  );\n}\nfunction convertV2FinishReasonToV3(finishReason) {\n  return {\n    unified: finishReason === \"unknown\" ? \"other\" : finishReason,\n    raw: void 0\n  };\n}\nfunction convertV2UsageToV3(usage) {\n  return {\n    inputTokens: {\n      total: usage.inputTokens,\n      noCache: void 0,\n      cacheRead: usage.cachedInputTokens,\n      cacheWrite: void 0\n    },\n    outputTokens: {\n      total: usage.outputTokens,\n      text: void 0,\n      reasoning: usage.reasoningTokens\n    }\n  };\n}\n\n// src/model/as-speech-model-v3.ts\nfunction asSpeechModelV3(model) {\n  if (model.specificationVersion === \"v3\") {\n    return model;\n  }\n  logV2CompatibilityWarning({\n    provider: model.provider,\n    modelId: model.modelId\n  });\n  return new Proxy(model, {\n    get(target, prop) {\n      if (prop === \"specificationVersion\")\n        return \"v3\";\n      return target[prop];\n    }\n  });\n}\n\n// src/model/as-transcription-model-v3.ts\nfunction asTranscriptionModelV3(model) {\n  if (model.specificationVersion === \"v3\") {\n    return model;\n  }\n  logV2CompatibilityWarning({\n    provider: model.provider,\n    modelId: model.modelId\n  });\n  return new Proxy(model, {\n    get(target, prop) {\n      if (prop === \"specificationVersion\")\n        return \"v3\";\n      return target[prop];\n    }\n  });\n}\n\n// src/model/resolve-model.ts\nfunction resolveLanguageModel(model) {\n  if (typeof model !== \"string\") {\n    if (model.specificationVersion !== \"v3\" && model.specificationVersion !== \"v2\") {\n      const unsupportedModel = model;\n      throw new UnsupportedModelVersionError({\n        version: unsupportedModel.specificationVersion,\n        provider: unsupportedModel.provider,\n        modelId: unsupportedModel.modelId\n      });\n    }\n    return asLanguageModelV3(model);\n  }\n  return getGlobalProvider().languageModel(model);\n}\nfunction resolveEmbeddingModel(model) {\n  if (typeof model !== \"string\") {\n    if (model.specificationVersion !== \"v3\" && model.specificationVersion !== \"v2\") {\n      const unsupportedModel = model;\n      throw new UnsupportedModelVersionError({\n        version: unsupportedModel.specificationVersion,\n        provider: unsupportedModel.provider,\n        modelId: unsupportedModel.modelId\n      });\n    }\n    return asEmbeddingModelV3(model);\n  }\n  return getGlobalProvider().embeddingModel(model);\n}\nfunction resolveTranscriptionModel(model) {\n  var _a20, _b;\n  if (typeof model !== \"string\") {\n    if (model.specificationVersion !== \"v3\" && model.specificationVersion !== \"v2\") {\n      const unsupportedModel = model;\n      throw new UnsupportedModelVersionError({\n        version: unsupportedModel.specificationVersion,\n        provider: unsupportedModel.provider,\n        modelId: unsupportedModel.modelId\n      });\n    }\n    return asTranscriptionModelV3(model);\n  }\n  return (_b = (_a20 = getGlobalProvider()).transcriptionModel) == null ? void 0 : _b.call(_a20, model);\n}\nfunction resolveSpeechModel(model) {\n  var _a20, _b;\n  if (typeof model !== \"string\") {\n    if (model.specificationVersion !== \"v3\" && model.specificationVersion !== \"v2\") {\n      const unsupportedModel = model;\n      throw new UnsupportedModelVersionError({\n        version: unsupportedModel.specificationVersion,\n        provider: unsupportedModel.provider,\n        modelId: unsupportedModel.modelId\n      });\n    }\n    return asSpeechModelV3(model);\n  }\n  return (_b = (_a20 = getGlobalProvider()).speechModel) == null ? void 0 : _b.call(_a20, model);\n}\nfunction resolveImageModel(model) {\n  if (typeof model !== \"string\") {\n    if (model.specificationVersion !== \"v3\" && model.specificationVersion !== \"v2\") {\n      const unsupportedModel = model;\n      throw new UnsupportedModelVersionError({\n        version: unsupportedModel.specificationVersion,\n        provider: unsupportedModel.provider,\n        modelId: unsupportedModel.modelId\n      });\n    }\n    return asImageModelV3(model);\n  }\n  return getGlobalProvider().imageModel(model);\n}\nfunction getGlobalProvider() {\n  var _a20;\n  return (_a20 = globalThis.AI_SDK_DEFAULT_PROVIDER) != null ? _a20 : gateway;\n}\n\n// src/prompt/call-settings.ts\nfunction getTotalTimeoutMs(timeout) {\n  if (timeout == null) {\n    return void 0;\n  }\n  if (typeof timeout === \"number\") {\n    return timeout;\n  }\n  return timeout.totalMs;\n}\nfunction getStepTimeoutMs(timeout) {\n  if (timeout == null || typeof timeout === \"number\") {\n    return void 0;\n  }\n  return timeout.stepMs;\n}\nfunction getChunkTimeoutMs(timeout) {\n  if (timeout == null || typeof timeout === \"number\") {\n    return void 0;\n  }\n  return timeout.chunkMs;\n}\n\n// src/prompt/convert-to-language-model-prompt.ts\nimport {\n  isUrlSupported\n} from \"@ai-sdk/provider-utils\";\n\n// src/util/detect-media-type.ts\nimport { convertBase64ToUint8Array } from \"@ai-sdk/provider-utils\";\nvar imageMediaTypeSignatures = [\n  {\n    mediaType: \"image/gif\",\n    bytesPrefix: [71, 73, 70]\n    // GIF\n  },\n  {\n    mediaType: \"image/png\",\n    bytesPrefix: [137, 80, 78, 71]\n    // PNG\n  },\n  {\n    mediaType: \"image/jpeg\",\n    bytesPrefix: [255, 216]\n    // JPEG\n  },\n  {\n    mediaType: \"image/webp\",\n    bytesPrefix: [\n      82,\n      73,\n      70,\n      70,\n      // \"RIFF\"\n      null,\n      null,\n      null,\n      null,\n      // file size (variable)\n      87,\n      69,\n      66,\n      80\n      // \"WEBP\"\n    ]\n  },\n  {\n    mediaType: \"image/bmp\",\n    bytesPrefix: [66, 77]\n  },\n  {\n    mediaType: \"image/tiff\",\n    bytesPrefix: [73, 73, 42, 0]\n  },\n  {\n    mediaType: \"image/tiff\",\n    bytesPrefix: [77, 77, 0, 42]\n  },\n  {\n    mediaType: \"image/avif\",\n    bytesPrefix: [\n      0,\n      0,\n      0,\n      32,\n      102,\n      116,\n      121,\n      112,\n      97,\n      118,\n      105,\n      102\n    ]\n  },\n  {\n    mediaType: \"image/heic\",\n    bytesPrefix: [\n      0,\n      0,\n      0,\n      32,\n      102,\n      116,\n      121,\n      112,\n      104,\n      101,\n      105,\n      99\n    ]\n  }\n];\nvar audioMediaTypeSignatures = [\n  {\n    mediaType: \"audio/mpeg\",\n    bytesPrefix: [255, 251]\n  },\n  {\n    mediaType: \"audio/mpeg\",\n    bytesPrefix: [255, 250]\n  },\n  {\n    mediaType: \"audio/mpeg\",\n    bytesPrefix: [255, 243]\n  },\n  {\n    mediaType: \"audio/mpeg\",\n    bytesPrefix: [255, 242]\n  },\n  {\n    mediaType: \"audio/mpeg\",\n    bytesPrefix: [255, 227]\n  },\n  {\n    mediaType: \"audio/mpeg\",\n    bytesPrefix: [255, 226]\n  },\n  {\n    mediaType: \"audio/wav\",\n    bytesPrefix: [\n      82,\n      // R\n      73,\n      // I\n      70,\n      // F\n      70,\n      // F\n      null,\n      null,\n      null,\n      null,\n      87,\n      // W\n      65,\n      // A\n      86,\n      // V\n      69\n      // E\n    ]\n  },\n  {\n    mediaType: \"audio/ogg\",\n    bytesPrefix: [79, 103, 103, 83]\n  },\n  {\n    mediaType: \"audio/flac\",\n    bytesPrefix: [102, 76, 97, 67]\n  },\n  {\n    mediaType: \"audio/aac\",\n    bytesPrefix: [64, 21, 0, 0]\n  },\n  {\n    mediaType: \"audio/mp4\",\n    bytesPrefix: [102, 116, 121, 112]\n  },\n  {\n    mediaType: \"audio/webm\",\n    bytesPrefix: [26, 69, 223, 163]\n  }\n];\nvar stripID3 = (data) => {\n  const bytes = typeof data === \"string\" ? convertBase64ToUint8Array(data) : data;\n  const id3Size = (bytes[6] & 127) << 21 | (bytes[7] & 127) << 14 | (bytes[8] & 127) << 7 | bytes[9] & 127;\n  return bytes.slice(id3Size + 10);\n};\nfunction stripID3TagsIfPresent(data) {\n  const hasId3 = typeof data === \"string\" && data.startsWith(\"SUQz\") || typeof data !== \"string\" && data.length > 10 && data[0] === 73 && // 'I'\n  data[1] === 68 && // 'D'\n  data[2] === 51;\n  return hasId3 ? stripID3(data) : data;\n}\nfunction detectMediaType({\n  data,\n  signatures\n}) {\n  const processedData = stripID3TagsIfPresent(data);\n  const bytes = typeof processedData === \"string\" ? convertBase64ToUint8Array(\n    processedData.substring(0, Math.min(processedData.length, 24))\n  ) : processedData;\n  for (const signature of signatures) {\n    if (bytes.length >= signature.bytesPrefix.length && signature.bytesPrefix.every(\n      (byte, index) => byte === null || bytes[index] === byte\n    )) {\n      return signature.mediaType;\n    }\n  }\n  return void 0;\n}\n\n// src/util/download/download.ts\nimport { DownloadError as DownloadError2 } from \"@ai-sdk/provider-utils\";\nimport {\n  withUserAgentSuffix,\n  getRuntimeEnvironmentUserAgent\n} from \"@ai-sdk/provider-utils\";\n\n// src/version.ts\nvar VERSION = true ? \"6.0.64\" : \"0.0.0-test\";\n\n// src/util/download/download.ts\nvar download = async ({ url }) => {\n  var _a20;\n  const urlText = url.toString();\n  try {\n    const response = await fetch(urlText, {\n      headers: withUserAgentSuffix(\n        {},\n        `ai-sdk/${VERSION}`,\n        getRuntimeEnvironmentUserAgent()\n      )\n    });\n    if (!response.ok) {\n      throw new DownloadError2({\n        url: urlText,\n        statusCode: response.status,\n        statusText: response.statusText\n      });\n    }\n    return {\n      data: new Uint8Array(await response.arrayBuffer()),\n      mediaType: (_a20 = response.headers.get(\"content-type\")) != null ? _a20 : void 0\n    };\n  } catch (error) {\n    if (DownloadError2.isInstance(error)) {\n      throw error;\n    }\n    throw new DownloadError2({ url: urlText, cause: error });\n  }\n};\n\n// src/util/download/download-function.ts\nvar createDefaultDownloadFunction = (download2 = download) => (requestedDownloads) => Promise.all(\n  requestedDownloads.map(\n    async (requestedDownload) => requestedDownload.isUrlSupportedByModel ? null : download2(requestedDownload)\n  )\n);\n\n// src/prompt/data-content.ts\nimport { AISDKError as AISDKError21 } from \"@ai-sdk/provider\";\nimport {\n  convertBase64ToUint8Array as convertBase64ToUint8Array2,\n  convertUint8ArrayToBase64\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\n\n// src/prompt/split-data-url.ts\nfunction splitDataUrl(dataUrl) {\n  try {\n    const [header, base64Content] = dataUrl.split(\",\");\n    return {\n      mediaType: header.split(\";\")[0].split(\":\")[1],\n      base64Content\n    };\n  } catch (error) {\n    return {\n      mediaType: void 0,\n      base64Content: void 0\n    };\n  }\n}\n\n// src/prompt/data-content.ts\nvar dataContentSchema = z.union([\n  z.string(),\n  z.instanceof(Uint8Array),\n  z.instanceof(ArrayBuffer),\n  z.custom(\n    // Buffer might not be available in some environments such as CloudFlare:\n    (value) => {\n      var _a20, _b;\n      return (_b = (_a20 = globalThis.Buffer) == null ? void 0 : _a20.isBuffer(value)) != null ? _b : false;\n    },\n    { message: \"Must be a Buffer\" }\n  )\n]);\nfunction convertToLanguageModelV3DataContent(content) {\n  if (content instanceof Uint8Array) {\n    return { data: content, mediaType: void 0 };\n  }\n  if (content instanceof ArrayBuffer) {\n    return { data: new Uint8Array(content), mediaType: void 0 };\n  }\n  if (typeof content === \"string\") {\n    try {\n      content = new URL(content);\n    } catch (error) {\n    }\n  }\n  if (content instanceof URL && content.protocol === \"data:\") {\n    const { mediaType: dataUrlMediaType, base64Content } = splitDataUrl(\n      content.toString()\n    );\n    if (dataUrlMediaType == null || base64Content == null) {\n      throw new AISDKError21({\n        name: \"InvalidDataContentError\",\n        message: `Invalid data URL format in content ${content.toString()}`\n      });\n    }\n    return { data: base64Content, mediaType: dataUrlMediaType };\n  }\n  return { data: content, mediaType: void 0 };\n}\nfunction convertDataContentToBase64String(content) {\n  if (typeof content === \"string\") {\n    return content;\n  }\n  if (content instanceof ArrayBuffer) {\n    return convertUint8ArrayToBase64(new Uint8Array(content));\n  }\n  return convertUint8ArrayToBase64(content);\n}\nfunction convertDataContentToUint8Array(content) {\n  if (content instanceof Uint8Array) {\n    return content;\n  }\n  if (typeof content === \"string\") {\n    try {\n      return convertBase64ToUint8Array2(content);\n    } catch (error) {\n      throw new InvalidDataContentError({\n        message: \"Invalid data content. Content string is not a base64-encoded media.\",\n        content,\n        cause: error\n      });\n    }\n  }\n  if (content instanceof ArrayBuffer) {\n    return new Uint8Array(content);\n  }\n  throw new InvalidDataContentError({ content });\n}\n\n// src/util/as-array.ts\nfunction asArray(value) {\n  return value === void 0 ? [] : Array.isArray(value) ? value : [value];\n}\n\n// src/prompt/convert-to-language-model-prompt.ts\nasync function convertToLanguageModelPrompt({\n  prompt,\n  supportedUrls,\n  download: download2 = createDefaultDownloadFunction()\n}) {\n  const downloadedAssets = await downloadAssets(\n    prompt.messages,\n    download2,\n    supportedUrls\n  );\n  const approvalIdToToolCallId = /* @__PURE__ */ new Map();\n  for (const message of prompt.messages) {\n    if (message.role === \"assistant\" && Array.isArray(message.content)) {\n      for (const part of message.content) {\n        if (part.type === \"tool-approval-request\" && \"approvalId\" in part && \"toolCallId\" in part) {\n          approvalIdToToolCallId.set(\n            part.approvalId,\n            part.toolCallId\n          );\n        }\n      }\n    }\n  }\n  const approvedToolCallIds = /* @__PURE__ */ new Set();\n  for (const message of prompt.messages) {\n    if (message.role === \"tool\") {\n      for (const part of message.content) {\n        if (part.type === \"tool-approval-response\") {\n          const toolCallId = approvalIdToToolCallId.get(part.approvalId);\n          if (toolCallId) {\n            approvedToolCallIds.add(toolCallId);\n          }\n        }\n      }\n    }\n  }\n  const messages = [\n    ...prompt.system != null ? typeof prompt.system === \"string\" ? [{ role: \"system\", content: prompt.system }] : asArray(prompt.system).map((message) => ({\n      role: \"system\",\n      content: message.content,\n      providerOptions: message.providerOptions\n    })) : [],\n    ...prompt.messages.map(\n      (message) => convertToLanguageModelMessage({ message, downloadedAssets })\n    )\n  ];\n  const combinedMessages = [];\n  for (const message of messages) {\n    if (message.role !== \"tool\") {\n      combinedMessages.push(message);\n      continue;\n    }\n    const lastCombinedMessage = combinedMessages.at(-1);\n    if ((lastCombinedMessage == null ? void 0 : lastCombinedMessage.role) === \"tool\") {\n      lastCombinedMessage.content.push(...message.content);\n    } else {\n      combinedMessages.push(message);\n    }\n  }\n  const toolCallIds = /* @__PURE__ */ new Set();\n  for (const message of combinedMessages) {\n    switch (message.role) {\n      case \"assistant\": {\n        for (const content of message.content) {\n          if (content.type === \"tool-call\" && !content.providerExecuted) {\n            toolCallIds.add(content.toolCallId);\n          }\n        }\n        break;\n      }\n      case \"tool\": {\n        for (const content of message.content) {\n          if (content.type === \"tool-result\") {\n            toolCallIds.delete(content.toolCallId);\n          }\n        }\n        break;\n      }\n      case \"user\":\n      case \"system\":\n        for (const id of approvedToolCallIds) {\n          toolCallIds.delete(id);\n        }\n        if (toolCallIds.size > 0) {\n          throw new MissingToolResultsError({\n            toolCallIds: Array.from(toolCallIds)\n          });\n        }\n        break;\n    }\n  }\n  for (const id of approvedToolCallIds) {\n    toolCallIds.delete(id);\n  }\n  if (toolCallIds.size > 0) {\n    throw new MissingToolResultsError({ toolCallIds: Array.from(toolCallIds) });\n  }\n  return combinedMessages.filter(\n    // Filter out empty tool messages (e.g. if they only contained\n    // tool-approval-response parts that were removed).\n    // This prevents sending invalid empty messages to the provider.\n    // Note: provider-executed tool-approval-response parts are preserved.\n    (message) => message.role !== \"tool\" || message.content.length > 0\n  );\n}\nfunction convertToLanguageModelMessage({\n  message,\n  downloadedAssets\n}) {\n  const role = message.role;\n  switch (role) {\n    case \"system\": {\n      return {\n        role: \"system\",\n        content: message.content,\n        providerOptions: message.providerOptions\n      };\n    }\n    case \"user\": {\n      if (typeof message.content === \"string\") {\n        return {\n          role: \"user\",\n          content: [{ type: \"text\", text: message.content }],\n          providerOptions: message.providerOptions\n        };\n      }\n      return {\n        role: \"user\",\n        content: message.content.map((part) => convertPartToLanguageModelPart(part, downloadedAssets)).filter((part) => part.type !== \"text\" || part.text !== \"\"),\n        providerOptions: message.providerOptions\n      };\n    }\n    case \"assistant\": {\n      if (typeof message.content === \"string\") {\n        return {\n          role: \"assistant\",\n          content: [{ type: \"text\", text: message.content }],\n          providerOptions: message.providerOptions\n        };\n      }\n      return {\n        role: \"assistant\",\n        content: message.content.filter(\n          // remove empty text parts (no text, and no provider options):\n          (part) => part.type !== \"text\" || part.text !== \"\" || part.providerOptions != null\n        ).filter(\n          (part) => part.type !== \"tool-approval-request\"\n        ).map((part) => {\n          const providerOptions = part.providerOptions;\n          switch (part.type) {\n            case \"file\": {\n              const { data, mediaType } = convertToLanguageModelV3DataContent(\n                part.data\n              );\n              return {\n                type: \"file\",\n                data,\n                filename: part.filename,\n                mediaType: mediaType != null ? mediaType : part.mediaType,\n                providerOptions\n              };\n            }\n            case \"reasoning\": {\n              return {\n                type: \"reasoning\",\n                text: part.text,\n                providerOptions\n              };\n            }\n            case \"text\": {\n              return {\n                type: \"text\",\n                text: part.text,\n                providerOptions\n              };\n            }\n            case \"tool-call\": {\n              return {\n                type: \"tool-call\",\n                toolCallId: part.toolCallId,\n                toolName: part.toolName,\n                input: part.input,\n                providerExecuted: part.providerExecuted,\n                providerOptions\n              };\n            }\n            case \"tool-result\": {\n              return {\n                type: \"tool-result\",\n                toolCallId: part.toolCallId,\n                toolName: part.toolName,\n                output: mapToolResultOutput(part.output),\n                providerOptions\n              };\n            }\n          }\n        }),\n        providerOptions: message.providerOptions\n      };\n    }\n    case \"tool\": {\n      return {\n        role: \"tool\",\n        content: message.content.filter(\n          // Only include tool-approval-response for provider-executed tools\n          (part) => part.type !== \"tool-approval-response\" || part.providerExecuted\n        ).map((part) => {\n          switch (part.type) {\n            case \"tool-result\": {\n              return {\n                type: \"tool-result\",\n                toolCallId: part.toolCallId,\n                toolName: part.toolName,\n                output: mapToolResultOutput(part.output),\n                providerOptions: part.providerOptions\n              };\n            }\n            case \"tool-approval-response\": {\n              return {\n                type: \"tool-approval-response\",\n                approvalId: part.approvalId,\n                approved: part.approved,\n                reason: part.reason\n              };\n            }\n          }\n        }),\n        providerOptions: message.providerOptions\n      };\n    }\n    default: {\n      const _exhaustiveCheck = role;\n      throw new InvalidMessageRoleError({ role: _exhaustiveCheck });\n    }\n  }\n}\nasync function downloadAssets(messages, download2, supportedUrls) {\n  const plannedDownloads = messages.filter((message) => message.role === \"user\").map((message) => message.content).filter(\n    (content) => Array.isArray(content)\n  ).flat().filter(\n    (part) => part.type === \"image\" || part.type === \"file\"\n  ).map((part) => {\n    var _a20;\n    const mediaType = (_a20 = part.mediaType) != null ? _a20 : part.type === \"image\" ? \"image/*\" : void 0;\n    let data = part.type === \"image\" ? part.image : part.data;\n    if (typeof data === \"string\") {\n      try {\n        data = new URL(data);\n      } catch (ignored) {\n      }\n    }\n    return { mediaType, data };\n  }).filter(\n    (part) => part.data instanceof URL\n  ).map((part) => ({\n    url: part.data,\n    isUrlSupportedByModel: part.mediaType != null && isUrlSupported({\n      url: part.data.toString(),\n      mediaType: part.mediaType,\n      supportedUrls\n    })\n  }));\n  const downloadedFiles = await download2(plannedDownloads);\n  return Object.fromEntries(\n    downloadedFiles.map(\n      (file, index) => file == null ? null : [\n        plannedDownloads[index].url.toString(),\n        { data: file.data, mediaType: file.mediaType }\n      ]\n    ).filter((file) => file != null)\n  );\n}\nfunction convertPartToLanguageModelPart(part, downloadedAssets) {\n  var _a20;\n  if (part.type === \"text\") {\n    return {\n      type: \"text\",\n      text: part.text,\n      providerOptions: part.providerOptions\n    };\n  }\n  let originalData;\n  const type = part.type;\n  switch (type) {\n    case \"image\":\n      originalData = part.image;\n      break;\n    case \"file\":\n      originalData = part.data;\n      break;\n    default:\n      throw new Error(`Unsupported part type: ${type}`);\n  }\n  const { data: convertedData, mediaType: convertedMediaType } = convertToLanguageModelV3DataContent(originalData);\n  let mediaType = convertedMediaType != null ? convertedMediaType : part.mediaType;\n  let data = convertedData;\n  if (data instanceof URL) {\n    const downloadedFile = downloadedAssets[data.toString()];\n    if (downloadedFile) {\n      data = downloadedFile.data;\n      mediaType != null ? mediaType : mediaType = downloadedFile.mediaType;\n    }\n  }\n  switch (type) {\n    case \"image\": {\n      if (data instanceof Uint8Array || typeof data === \"string\") {\n        mediaType = (_a20 = detectMediaType({ data, signatures: imageMediaTypeSignatures })) != null ? _a20 : mediaType;\n      }\n      return {\n        type: \"file\",\n        mediaType: mediaType != null ? mediaType : \"image/*\",\n        // any image\n        filename: void 0,\n        data,\n        providerOptions: part.providerOptions\n      };\n    }\n    case \"file\": {\n      if (mediaType == null) {\n        throw new Error(`Media type is missing for file part`);\n      }\n      return {\n        type: \"file\",\n        mediaType,\n        filename: part.filename,\n        data,\n        providerOptions: part.providerOptions\n      };\n    }\n  }\n}\nfunction mapToolResultOutput(output) {\n  if (output.type !== \"content\") {\n    return output;\n  }\n  return {\n    type: \"content\",\n    value: output.value.map((item) => {\n      if (item.type !== \"media\") {\n        return item;\n      }\n      if (item.mediaType.startsWith(\"image/\")) {\n        return {\n          type: \"image-data\",\n          data: item.data,\n          mediaType: item.mediaType\n        };\n      }\n      return {\n        type: \"file-data\",\n        data: item.data,\n        mediaType: item.mediaType\n      };\n    })\n  };\n}\n\n// src/prompt/create-tool-model-output.ts\nimport { getErrorMessage as getErrorMessage3 } from \"@ai-sdk/provider\";\nasync function createToolModelOutput({\n  toolCallId,\n  input,\n  output,\n  tool: tool2,\n  errorMode\n}) {\n  if (errorMode === \"text\") {\n    return { type: \"error-text\", value: getErrorMessage3(output) };\n  } else if (errorMode === \"json\") {\n    return { type: \"error-json\", value: toJSONValue(output) };\n  }\n  if (tool2 == null ? void 0 : tool2.toModelOutput) {\n    return await tool2.toModelOutput({ toolCallId, input, output });\n  }\n  return typeof output === \"string\" ? { type: \"text\", value: output } : { type: \"json\", value: toJSONValue(output) };\n}\nfunction toJSONValue(value) {\n  return value === void 0 ? null : value;\n}\n\n// src/prompt/prepare-call-settings.ts\nfunction prepareCallSettings({\n  maxOutputTokens,\n  temperature,\n  topP,\n  topK,\n  presencePenalty,\n  frequencyPenalty,\n  seed,\n  stopSequences\n}) {\n  if (maxOutputTokens != null) {\n    if (!Number.isInteger(maxOutputTokens)) {\n      throw new InvalidArgumentError({\n        parameter: \"maxOutputTokens\",\n        value: maxOutputTokens,\n        message: \"maxOutputTokens must be an integer\"\n      });\n    }\n    if (maxOutputTokens < 1) {\n      throw new InvalidArgumentError({\n        parameter: \"maxOutputTokens\",\n        value: maxOutputTokens,\n        message: \"maxOutputTokens must be >= 1\"\n      });\n    }\n  }\n  if (temperature != null) {\n    if (typeof temperature !== \"number\") {\n      throw new InvalidArgumentError({\n        parameter: \"temperature\",\n        value: temperature,\n        message: \"temperature must be a number\"\n      });\n    }\n  }\n  if (topP != null) {\n    if (typeof topP !== \"number\") {\n      throw new InvalidArgumentError({\n        parameter: \"topP\",\n        value: topP,\n        message: \"topP must be a number\"\n      });\n    }\n  }\n  if (topK != null) {\n    if (typeof topK !== \"number\") {\n      throw new InvalidArgumentError({\n        parameter: \"topK\",\n        value: topK,\n        message: \"topK must be a number\"\n      });\n    }\n  }\n  if (presencePenalty != null) {\n    if (typeof presencePenalty !== \"number\") {\n      throw new InvalidArgumentError({\n        parameter: \"presencePenalty\",\n        value: presencePenalty,\n        message: \"presencePenalty must be a number\"\n      });\n    }\n  }\n  if (frequencyPenalty != null) {\n    if (typeof frequencyPenalty !== \"number\") {\n      throw new InvalidArgumentError({\n        parameter: \"frequencyPenalty\",\n        value: frequencyPenalty,\n        message: \"frequencyPenalty must be a number\"\n      });\n    }\n  }\n  if (seed != null) {\n    if (!Number.isInteger(seed)) {\n      throw new InvalidArgumentError({\n        parameter: \"seed\",\n        value: seed,\n        message: \"seed must be an integer\"\n      });\n    }\n  }\n  return {\n    maxOutputTokens,\n    temperature,\n    topP,\n    topK,\n    presencePenalty,\n    frequencyPenalty,\n    stopSequences,\n    seed\n  };\n}\n\n// src/prompt/prepare-tools-and-tool-choice.ts\nimport { asSchema } from \"@ai-sdk/provider-utils\";\n\n// src/util/is-non-empty-object.ts\nfunction isNonEmptyObject(object2) {\n  return object2 != null && Object.keys(object2).length > 0;\n}\n\n// src/prompt/prepare-tools-and-tool-choice.ts\nasync function prepareToolsAndToolChoice({\n  tools,\n  toolChoice,\n  activeTools\n}) {\n  if (!isNonEmptyObject(tools)) {\n    return {\n      tools: void 0,\n      toolChoice: void 0\n    };\n  }\n  const filteredTools = activeTools != null ? Object.entries(tools).filter(\n    ([name20]) => activeTools.includes(name20)\n  ) : Object.entries(tools);\n  const languageModelTools = [];\n  for (const [name20, tool2] of filteredTools) {\n    const toolType = tool2.type;\n    switch (toolType) {\n      case void 0:\n      case \"dynamic\":\n      case \"function\":\n        languageModelTools.push({\n          type: \"function\",\n          name: name20,\n          description: tool2.description,\n          inputSchema: await asSchema(tool2.inputSchema).jsonSchema,\n          ...tool2.inputExamples != null ? { inputExamples: tool2.inputExamples } : {},\n          providerOptions: tool2.providerOptions,\n          ...tool2.strict != null ? { strict: tool2.strict } : {}\n        });\n        break;\n      case \"provider\":\n        languageModelTools.push({\n          type: \"provider\",\n          name: name20,\n          id: tool2.id,\n          args: tool2.args\n        });\n        break;\n      default: {\n        const exhaustiveCheck = toolType;\n        throw new Error(`Unsupported tool type: ${exhaustiveCheck}`);\n      }\n    }\n  }\n  return {\n    tools: languageModelTools,\n    toolChoice: toolChoice == null ? { type: \"auto\" } : typeof toolChoice === \"string\" ? { type: toolChoice } : { type: \"tool\", toolName: toolChoice.toolName }\n  };\n}\n\n// src/prompt/standardize-prompt.ts\nimport { InvalidPromptError as InvalidPromptError2 } from \"@ai-sdk/provider\";\nimport {\n  safeValidateTypes\n} from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\n\n// src/prompt/message.ts\nimport { z as z5 } from \"zod/v4\";\n\n// src/types/provider-metadata.ts\nimport { z as z3 } from \"zod/v4\";\n\n// src/types/json-value.ts\nimport { z as z2 } from \"zod/v4\";\nvar jsonValueSchema = z2.lazy(\n  () => z2.union([\n    z2.null(),\n    z2.string(),\n    z2.number(),\n    z2.boolean(),\n    z2.record(z2.string(), jsonValueSchema.optional()),\n    z2.array(jsonValueSchema)\n  ])\n);\n\n// src/types/provider-metadata.ts\nvar providerMetadataSchema = z3.record(\n  z3.string(),\n  z3.record(z3.string(), jsonValueSchema.optional())\n);\n\n// src/prompt/content-part.ts\nimport { z as z4 } from \"zod/v4\";\nvar textPartSchema = z4.object({\n  type: z4.literal(\"text\"),\n  text: z4.string(),\n  providerOptions: providerMetadataSchema.optional()\n});\nvar imagePartSchema = z4.object({\n  type: z4.literal(\"image\"),\n  image: z4.union([dataContentSchema, z4.instanceof(URL)]),\n  mediaType: z4.string().optional(),\n  providerOptions: providerMetadataSchema.optional()\n});\nvar filePartSchema = z4.object({\n  type: z4.literal(\"file\"),\n  data: z4.union([dataContentSchema, z4.instanceof(URL)]),\n  filename: z4.string().optional(),\n  mediaType: z4.string(),\n  providerOptions: providerMetadataSchema.optional()\n});\nvar reasoningPartSchema = z4.object({\n  type: z4.literal(\"reasoning\"),\n  text: z4.string(),\n  providerOptions: providerMetadataSchema.optional()\n});\nvar toolCallPartSchema = z4.object({\n  type: z4.literal(\"tool-call\"),\n  toolCallId: z4.string(),\n  toolName: z4.string(),\n  input: z4.unknown(),\n  providerOptions: providerMetadataSchema.optional(),\n  providerExecuted: z4.boolean().optional()\n});\nvar outputSchema = z4.discriminatedUnion(\n  \"type\",\n  [\n    z4.object({\n      type: z4.literal(\"text\"),\n      value: z4.string(),\n      providerOptions: providerMetadataSchema.optional()\n    }),\n    z4.object({\n      type: z4.literal(\"json\"),\n      value: jsonValueSchema,\n      providerOptions: providerMetadataSchema.optional()\n    }),\n    z4.object({\n      type: z4.literal(\"execution-denied\"),\n      reason: z4.string().optional(),\n      providerOptions: providerMetadataSchema.optional()\n    }),\n    z4.object({\n      type: z4.literal(\"error-text\"),\n      value: z4.string(),\n      providerOptions: providerMetadataSchema.optional()\n    }),\n    z4.object({\n      type: z4.literal(\"error-json\"),\n      value: jsonValueSchema,\n      providerOptions: providerMetadataSchema.optional()\n    }),\n    z4.object({\n      type: z4.literal(\"content\"),\n      value: z4.array(\n        z4.union([\n          z4.object({\n            type: z4.literal(\"text\"),\n            text: z4.string(),\n            providerOptions: providerMetadataSchema.optional()\n          }),\n          z4.object({\n            type: z4.literal(\"media\"),\n            data: z4.string(),\n            mediaType: z4.string()\n          }),\n          z4.object({\n            type: z4.literal(\"file-data\"),\n            data: z4.string(),\n            mediaType: z4.string(),\n            filename: z4.string().optional(),\n            providerOptions: providerMetadataSchema.optional()\n          }),\n          z4.object({\n            type: z4.literal(\"file-url\"),\n            url: z4.string(),\n            providerOptions: providerMetadataSchema.optional()\n          }),\n          z4.object({\n            type: z4.literal(\"file-id\"),\n            fileId: z4.union([z4.string(), z4.record(z4.string(), z4.string())]),\n            providerOptions: providerMetadataSchema.optional()\n          }),\n          z4.object({\n            type: z4.literal(\"image-data\"),\n            data: z4.string(),\n            mediaType: z4.string(),\n            providerOptions: providerMetadataSchema.optional()\n          }),\n          z4.object({\n            type: z4.literal(\"image-url\"),\n            url: z4.string(),\n            providerOptions: providerMetadataSchema.optional()\n          }),\n          z4.object({\n            type: z4.literal(\"image-file-id\"),\n            fileId: z4.union([z4.string(), z4.record(z4.string(), z4.string())]),\n            providerOptions: providerMetadataSchema.optional()\n          }),\n          z4.object({\n            type: z4.literal(\"custom\"),\n            providerOptions: providerMetadataSchema.optional()\n          })\n        ])\n      )\n    })\n  ]\n);\nvar toolResultPartSchema = z4.object({\n  type: z4.literal(\"tool-result\"),\n  toolCallId: z4.string(),\n  toolName: z4.string(),\n  output: outputSchema,\n  providerOptions: providerMetadataSchema.optional()\n});\nvar toolApprovalRequestSchema = z4.object({\n  type: z4.literal(\"tool-approval-request\"),\n  approvalId: z4.string(),\n  toolCallId: z4.string()\n});\nvar toolApprovalResponseSchema = z4.object({\n  type: z4.literal(\"tool-approval-response\"),\n  approvalId: z4.string(),\n  approved: z4.boolean(),\n  reason: z4.string().optional()\n});\n\n// src/prompt/message.ts\nvar systemModelMessageSchema = z5.object(\n  {\n    role: z5.literal(\"system\"),\n    content: z5.string(),\n    providerOptions: providerMetadataSchema.optional()\n  }\n);\nvar userModelMessageSchema = z5.object({\n  role: z5.literal(\"user\"),\n  content: z5.union([\n    z5.string(),\n    z5.array(z5.union([textPartSchema, imagePartSchema, filePartSchema]))\n  ]),\n  providerOptions: providerMetadataSchema.optional()\n});\nvar assistantModelMessageSchema = z5.object({\n  role: z5.literal(\"assistant\"),\n  content: z5.union([\n    z5.string(),\n    z5.array(\n      z5.union([\n        textPartSchema,\n        filePartSchema,\n        reasoningPartSchema,\n        toolCallPartSchema,\n        toolResultPartSchema,\n        toolApprovalRequestSchema\n      ])\n    )\n  ]),\n  providerOptions: providerMetadataSchema.optional()\n});\nvar toolModelMessageSchema = z5.object({\n  role: z5.literal(\"tool\"),\n  content: z5.array(z5.union([toolResultPartSchema, toolApprovalResponseSchema])),\n  providerOptions: providerMetadataSchema.optional()\n});\nvar modelMessageSchema = z5.union([\n  systemModelMessageSchema,\n  userModelMessageSchema,\n  assistantModelMessageSchema,\n  toolModelMessageSchema\n]);\n\n// src/prompt/standardize-prompt.ts\nasync function standardizePrompt(prompt) {\n  if (prompt.prompt == null && prompt.messages == null) {\n    throw new InvalidPromptError2({\n      prompt,\n      message: \"prompt or messages must be defined\"\n    });\n  }\n  if (prompt.prompt != null && prompt.messages != null) {\n    throw new InvalidPromptError2({\n      prompt,\n      message: \"prompt and messages cannot be defined at the same time\"\n    });\n  }\n  if (prompt.system != null && typeof prompt.system !== \"string\" && !asArray(prompt.system).every(\n    (message) => typeof message === \"object\" && message !== null && \"role\" in message && message.role === \"system\"\n  )) {\n    throw new InvalidPromptError2({\n      prompt,\n      message: \"system must be a string, SystemModelMessage, or array of SystemModelMessage\"\n    });\n  }\n  let messages;\n  if (prompt.prompt != null && typeof prompt.prompt === \"string\") {\n    messages = [{ role: \"user\", content: prompt.prompt }];\n  } else if (prompt.prompt != null && Array.isArray(prompt.prompt)) {\n    messages = prompt.prompt;\n  } else if (prompt.messages != null) {\n    messages = prompt.messages;\n  } else {\n    throw new InvalidPromptError2({\n      prompt,\n      message: \"prompt or messages must be defined\"\n    });\n  }\n  if (messages.length === 0) {\n    throw new InvalidPromptError2({\n      prompt,\n      message: \"messages must not be empty\"\n    });\n  }\n  const validationResult = await safeValidateTypes({\n    value: messages,\n    schema: z6.array(modelMessageSchema)\n  });\n  if (!validationResult.success) {\n    throw new InvalidPromptError2({\n      prompt,\n      message: \"The messages do not match the ModelMessage[] schema.\",\n      cause: validationResult.error\n    });\n  }\n  return {\n    messages,\n    system: prompt.system\n  };\n}\n\n// src/prompt/wrap-gateway-error.ts\nimport { GatewayAuthenticationError } from \"@ai-sdk/gateway\";\nimport { AISDKError as AISDKError22 } from \"@ai-sdk/provider\";\nfunction wrapGatewayError(error) {\n  if (!GatewayAuthenticationError.isInstance(error))\n    return error;\n  const isProductionEnv = (process == null ? void 0 : process.env.NODE_ENV) === \"production\";\n  const moreInfoURL = \"https://ai-sdk.dev/unauthenticated-ai-gateway\";\n  if (isProductionEnv) {\n    return new AISDKError22({\n      name: \"GatewayError\",\n      message: `Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${moreInfoURL}`\n    });\n  }\n  return Object.assign(\n    new Error(`\\x1B[1m\\x1B[31mUnauthenticated request to AI Gateway.\\x1B[0m\n\nTo authenticate, set the \\x1B[33mAI_GATEWAY_API_KEY\\x1B[0m environment variable with your API key.\n\nAlternatively, you can use a provider module instead of the AI Gateway.\n\nLearn more: \\x1B[34m${moreInfoURL}\\x1B[0m\n\n`),\n    { name: \"GatewayAuthenticationError\" }\n  );\n}\n\n// src/telemetry/assemble-operation-name.ts\nfunction assembleOperationName({\n  operationId,\n  telemetry\n}) {\n  return {\n    // standardized operation and resource name:\n    \"operation.name\": `${operationId}${(telemetry == null ? void 0 : telemetry.functionId) != null ? ` ${telemetry.functionId}` : \"\"}`,\n    \"resource.name\": telemetry == null ? void 0 : telemetry.functionId,\n    // detailed, AI SDK specific data:\n    \"ai.operationId\": operationId,\n    \"ai.telemetry.functionId\": telemetry == null ? void 0 : telemetry.functionId\n  };\n}\n\n// src/telemetry/get-base-telemetry-attributes.ts\nfunction getBaseTelemetryAttributes({\n  model,\n  settings,\n  telemetry,\n  headers\n}) {\n  var _a20;\n  return {\n    \"ai.model.provider\": model.provider,\n    \"ai.model.id\": model.modelId,\n    // settings:\n    ...Object.entries(settings).reduce((attributes, [key, value]) => {\n      if (key === \"timeout\") {\n        const totalTimeoutMs = getTotalTimeoutMs(\n          value\n        );\n        if (totalTimeoutMs != null) {\n          attributes[`ai.settings.${key}`] = totalTimeoutMs;\n        }\n      } else {\n        attributes[`ai.settings.${key}`] = value;\n      }\n      return attributes;\n    }, {}),\n    // add metadata as attributes:\n    ...Object.entries((_a20 = telemetry == null ? void 0 : telemetry.metadata) != null ? _a20 : {}).reduce(\n      (attributes, [key, value]) => {\n        attributes[`ai.telemetry.metadata.${key}`] = value;\n        return attributes;\n      },\n      {}\n    ),\n    // request headers\n    ...Object.entries(headers != null ? headers : {}).reduce((attributes, [key, value]) => {\n      if (value !== void 0) {\n        attributes[`ai.request.headers.${key}`] = value;\n      }\n      return attributes;\n    }, {})\n  };\n}\n\n// src/telemetry/get-tracer.ts\nimport { trace } from \"@opentelemetry/api\";\n\n// src/telemetry/noop-tracer.ts\nvar noopTracer = {\n  startSpan() {\n    return noopSpan;\n  },\n  startActiveSpan(name20, arg1, arg2, arg3) {\n    if (typeof arg1 === \"function\") {\n      return arg1(noopSpan);\n    }\n    if (typeof arg2 === \"function\") {\n      return arg2(noopSpan);\n    }\n    if (typeof arg3 === \"function\") {\n      return arg3(noopSpan);\n    }\n  }\n};\nvar noopSpan = {\n  spanContext() {\n    return noopSpanContext;\n  },\n  setAttribute() {\n    return this;\n  },\n  setAttributes() {\n    return this;\n  },\n  addEvent() {\n    return this;\n  },\n  addLink() {\n    return this;\n  },\n  addLinks() {\n    return this;\n  },\n  setStatus() {\n    return this;\n  },\n  updateName() {\n    return this;\n  },\n  end() {\n    return this;\n  },\n  isRecording() {\n    return false;\n  },\n  recordException() {\n    return this;\n  }\n};\nvar noopSpanContext = {\n  traceId: \"\",\n  spanId: \"\",\n  traceFlags: 0\n};\n\n// src/telemetry/get-tracer.ts\nfunction getTracer({\n  isEnabled = false,\n  tracer\n} = {}) {\n  if (!isEnabled) {\n    return noopTracer;\n  }\n  if (tracer) {\n    return tracer;\n  }\n  return trace.getTracer(\"ai\");\n}\n\n// src/telemetry/record-span.ts\nimport {\n  SpanStatusCode,\n  context\n} from \"@opentelemetry/api\";\nasync function recordSpan({\n  name: name20,\n  tracer,\n  attributes,\n  fn,\n  endWhenDone = true\n}) {\n  return tracer.startActiveSpan(\n    name20,\n    { attributes: await attributes },\n    async (span) => {\n      const ctx = context.active();\n      try {\n        const result = await context.with(ctx, () => fn(span));\n        if (endWhenDone) {\n          span.end();\n        }\n        return result;\n      } catch (error) {\n        try {\n          recordErrorOnSpan(span, error);\n        } finally {\n          span.end();\n        }\n        throw error;\n      }\n    }\n  );\n}\nfunction recordErrorOnSpan(span, error) {\n  if (error instanceof Error) {\n    span.recordException({\n      name: error.name,\n      message: error.message,\n      stack: error.stack\n    });\n    span.setStatus({\n      code: SpanStatusCode.ERROR,\n      message: error.message\n    });\n  } else {\n    span.setStatus({ code: SpanStatusCode.ERROR });\n  }\n}\n\n// src/telemetry/select-telemetry-attributes.ts\nasync function selectTelemetryAttributes({\n  telemetry,\n  attributes\n}) {\n  if ((telemetry == null ? void 0 : telemetry.isEnabled) !== true) {\n    return {};\n  }\n  const resultAttributes = {};\n  for (const [key, value] of Object.entries(attributes)) {\n    if (value == null) {\n      continue;\n    }\n    if (typeof value === \"object\" && \"input\" in value && typeof value.input === \"function\") {\n      if ((telemetry == null ? void 0 : telemetry.recordInputs) === false) {\n        continue;\n      }\n      const result = await value.input();\n      if (result != null) {\n        resultAttributes[key] = result;\n      }\n      continue;\n    }\n    if (typeof value === \"object\" && \"output\" in value && typeof value.output === \"function\") {\n      if ((telemetry == null ? void 0 : telemetry.recordOutputs) === false) {\n        continue;\n      }\n      const result = await value.output();\n      if (result != null) {\n        resultAttributes[key] = result;\n      }\n      continue;\n    }\n    resultAttributes[key] = value;\n  }\n  return resultAttributes;\n}\n\n// src/telemetry/stringify-for-telemetry.ts\nfunction stringifyForTelemetry(prompt) {\n  return JSON.stringify(\n    prompt.map((message) => ({\n      ...message,\n      content: typeof message.content === \"string\" ? message.content : message.content.map(\n        (part) => part.type === \"file\" ? {\n          ...part,\n          data: part.data instanceof Uint8Array ? convertDataContentToBase64String(part.data) : part.data\n        } : part\n      )\n    }))\n  );\n}\n\n// src/types/usage.ts\nfunction asLanguageModelUsage(usage) {\n  return {\n    inputTokens: usage.inputTokens.total,\n    inputTokenDetails: {\n      noCacheTokens: usage.inputTokens.noCache,\n      cacheReadTokens: usage.inputTokens.cacheRead,\n      cacheWriteTokens: usage.inputTokens.cacheWrite\n    },\n    outputTokens: usage.outputTokens.total,\n    outputTokenDetails: {\n      textTokens: usage.outputTokens.text,\n      reasoningTokens: usage.outputTokens.reasoning\n    },\n    totalTokens: addTokenCounts(\n      usage.inputTokens.total,\n      usage.outputTokens.total\n    ),\n    raw: usage.raw,\n    reasoningTokens: usage.outputTokens.reasoning,\n    cachedInputTokens: usage.inputTokens.cacheRead\n  };\n}\nfunction createNullLanguageModelUsage() {\n  return {\n    inputTokens: void 0,\n    inputTokenDetails: {\n      noCacheTokens: void 0,\n      cacheReadTokens: void 0,\n      cacheWriteTokens: void 0\n    },\n    outputTokens: void 0,\n    outputTokenDetails: {\n      textTokens: void 0,\n      reasoningTokens: void 0\n    },\n    totalTokens: void 0,\n    raw: void 0\n  };\n}\nfunction addLanguageModelUsage(usage1, usage2) {\n  var _a20, _b, _c, _d, _e, _f, _g, _h, _i, _j;\n  return {\n    inputTokens: addTokenCounts(usage1.inputTokens, usage2.inputTokens),\n    inputTokenDetails: {\n      noCacheTokens: addTokenCounts(\n        (_a20 = usage1.inputTokenDetails) == null ? void 0 : _a20.noCacheTokens,\n        (_b = usage2.inputTokenDetails) == null ? void 0 : _b.noCacheTokens\n      ),\n      cacheReadTokens: addTokenCounts(\n        (_c = usage1.inputTokenDetails) == null ? void 0 : _c.cacheReadTokens,\n        (_d = usage2.inputTokenDetails) == null ? void 0 : _d.cacheReadTokens\n      ),\n      cacheWriteTokens: addTokenCounts(\n        (_e = usage1.inputTokenDetails) == null ? void 0 : _e.cacheWriteTokens,\n        (_f = usage2.inputTokenDetails) == null ? void 0 : _f.cacheWriteTokens\n      )\n    },\n    outputTokens: addTokenCounts(usage1.outputTokens, usage2.outputTokens),\n    outputTokenDetails: {\n      textTokens: addTokenCounts(\n        (_g = usage1.outputTokenDetails) == null ? void 0 : _g.textTokens,\n        (_h = usage2.outputTokenDetails) == null ? void 0 : _h.textTokens\n      ),\n      reasoningTokens: addTokenCounts(\n        (_i = usage1.outputTokenDetails) == null ? void 0 : _i.reasoningTokens,\n        (_j = usage2.outputTokenDetails) == null ? void 0 : _j.reasoningTokens\n      )\n    },\n    totalTokens: addTokenCounts(usage1.totalTokens, usage2.totalTokens),\n    reasoningTokens: addTokenCounts(\n      usage1.reasoningTokens,\n      usage2.reasoningTokens\n    ),\n    cachedInputTokens: addTokenCounts(\n      usage1.cachedInputTokens,\n      usage2.cachedInputTokens\n    )\n  };\n}\nfunction addTokenCounts(tokenCount1, tokenCount2) {\n  return tokenCount1 == null && tokenCount2 == null ? void 0 : (tokenCount1 != null ? tokenCount1 : 0) + (tokenCount2 != null ? tokenCount2 : 0);\n}\nfunction addImageModelUsage(usage1, usage2) {\n  return {\n    inputTokens: addTokenCounts(usage1.inputTokens, usage2.inputTokens),\n    outputTokens: addTokenCounts(usage1.outputTokens, usage2.outputTokens),\n    totalTokens: addTokenCounts(usage1.totalTokens, usage2.totalTokens)\n  };\n}\n\n// src/util/merge-objects.ts\nfunction mergeObjects(base, overrides) {\n  if (base === void 0 && overrides === void 0) {\n    return void 0;\n  }\n  if (base === void 0) {\n    return overrides;\n  }\n  if (overrides === void 0) {\n    return base;\n  }\n  const result = { ...base };\n  for (const key in overrides) {\n    if (Object.prototype.hasOwnProperty.call(overrides, key)) {\n      const overridesValue = overrides[key];\n      if (overridesValue === void 0)\n        continue;\n      const baseValue = key in base ? base[key] : void 0;\n      const isSourceObject = overridesValue !== null && typeof overridesValue === \"object\" && !Array.isArray(overridesValue) && !(overridesValue instanceof Date) && !(overridesValue instanceof RegExp);\n      const isTargetObject = baseValue !== null && baseValue !== void 0 && typeof baseValue === \"object\" && !Array.isArray(baseValue) && !(baseValue instanceof Date) && !(baseValue instanceof RegExp);\n      if (isSourceObject && isTargetObject) {\n        result[key] = mergeObjects(\n          baseValue,\n          overridesValue\n        );\n      } else {\n        result[key] = overridesValue;\n      }\n    }\n  }\n  return result;\n}\n\n// src/util/retry-with-exponential-backoff.ts\nimport { APICallError as APICallError2 } from \"@ai-sdk/provider\";\nimport { delay, getErrorMessage as getErrorMessage4, isAbortError } from \"@ai-sdk/provider-utils\";\nfunction getRetryDelayInMs({\n  error,\n  exponentialBackoffDelay\n}) {\n  const headers = error.responseHeaders;\n  if (!headers)\n    return exponentialBackoffDelay;\n  let ms;\n  const retryAfterMs = headers[\"retry-after-ms\"];\n  if (retryAfterMs) {\n    const timeoutMs = parseFloat(retryAfterMs);\n    if (!Number.isNaN(timeoutMs)) {\n      ms = timeoutMs;\n    }\n  }\n  const retryAfter = headers[\"retry-after\"];\n  if (retryAfter && ms === void 0) {\n    const timeoutSeconds = parseFloat(retryAfter);\n    if (!Number.isNaN(timeoutSeconds)) {\n      ms = timeoutSeconds * 1e3;\n    } else {\n      ms = Date.parse(retryAfter) - Date.now();\n    }\n  }\n  if (ms != null && !Number.isNaN(ms) && 0 <= ms && (ms < 60 * 1e3 || ms < exponentialBackoffDelay)) {\n    return ms;\n  }\n  return exponentialBackoffDelay;\n}\nvar retryWithExponentialBackoffRespectingRetryHeaders = ({\n  maxRetries = 2,\n  initialDelayInMs = 2e3,\n  backoffFactor = 2,\n  abortSignal\n} = {}) => async (f) => _retryWithExponentialBackoff(f, {\n  maxRetries,\n  delayInMs: initialDelayInMs,\n  backoffFactor,\n  abortSignal\n});\nasync function _retryWithExponentialBackoff(f, {\n  maxRetries,\n  delayInMs,\n  backoffFactor,\n  abortSignal\n}, errors = []) {\n  try {\n    return await f();\n  } catch (error) {\n    if (isAbortError(error)) {\n      throw error;\n    }\n    if (maxRetries === 0) {\n      throw error;\n    }\n    const errorMessage = getErrorMessage4(error);\n    const newErrors = [...errors, error];\n    const tryNumber = newErrors.length;\n    if (tryNumber > maxRetries) {\n      throw new RetryError({\n        message: `Failed after ${tryNumber} attempts. Last error: ${errorMessage}`,\n        reason: \"maxRetriesExceeded\",\n        errors: newErrors\n      });\n    }\n    if (error instanceof Error && APICallError2.isInstance(error) && error.isRetryable === true && tryNumber <= maxRetries) {\n      await delay(\n        getRetryDelayInMs({\n          error,\n          exponentialBackoffDelay: delayInMs\n        }),\n        { abortSignal }\n      );\n      return _retryWithExponentialBackoff(\n        f,\n        {\n          maxRetries,\n          delayInMs: backoffFactor * delayInMs,\n          backoffFactor,\n          abortSignal\n        },\n        newErrors\n      );\n    }\n    if (tryNumber === 1) {\n      throw error;\n    }\n    throw new RetryError({\n      message: `Failed after ${tryNumber} attempts with non-retryable error: '${errorMessage}'`,\n      reason: \"errorNotRetryable\",\n      errors: newErrors\n    });\n  }\n}\n\n// src/util/prepare-retries.ts\nfunction prepareRetries({\n  maxRetries,\n  abortSignal\n}) {\n  if (maxRetries != null) {\n    if (!Number.isInteger(maxRetries)) {\n      throw new InvalidArgumentError({\n        parameter: \"maxRetries\",\n        value: maxRetries,\n        message: \"maxRetries must be an integer\"\n      });\n    }\n    if (maxRetries < 0) {\n      throw new InvalidArgumentError({\n        parameter: \"maxRetries\",\n        value: maxRetries,\n        message: \"maxRetries must be >= 0\"\n      });\n    }\n  }\n  const maxRetriesResult = maxRetries != null ? maxRetries : 2;\n  return {\n    maxRetries: maxRetriesResult,\n    retry: retryWithExponentialBackoffRespectingRetryHeaders({\n      maxRetries: maxRetriesResult,\n      abortSignal\n    })\n  };\n}\n\n// src/generate-text/collect-tool-approvals.ts\nfunction collectToolApprovals({\n  messages\n}) {\n  const lastMessage = messages.at(-1);\n  if ((lastMessage == null ? void 0 : lastMessage.role) != \"tool\") {\n    return {\n      approvedToolApprovals: [],\n      deniedToolApprovals: []\n    };\n  }\n  const toolCallsByToolCallId = {};\n  for (const message of messages) {\n    if (message.role === \"assistant\" && typeof message.content !== \"string\") {\n      const content = message.content;\n      for (const part of content) {\n        if (part.type === \"tool-call\") {\n          toolCallsByToolCallId[part.toolCallId] = part;\n        }\n      }\n    }\n  }\n  const toolApprovalRequestsByApprovalId = {};\n  for (const message of messages) {\n    if (message.role === \"assistant\" && typeof message.content !== \"string\") {\n      const content = message.content;\n      for (const part of content) {\n        if (part.type === \"tool-approval-request\") {\n          toolApprovalRequestsByApprovalId[part.approvalId] = part;\n        }\n      }\n    }\n  }\n  const toolResults = {};\n  for (const part of lastMessage.content) {\n    if (part.type === \"tool-result\") {\n      toolResults[part.toolCallId] = part;\n    }\n  }\n  const approvedToolApprovals = [];\n  const deniedToolApprovals = [];\n  const approvalResponses = lastMessage.content.filter(\n    (part) => part.type === \"tool-approval-response\"\n  );\n  for (const approvalResponse of approvalResponses) {\n    const approvalRequest = toolApprovalRequestsByApprovalId[approvalResponse.approvalId];\n    if (approvalRequest == null) {\n      throw new InvalidToolApprovalError({\n        approvalId: approvalResponse.approvalId\n      });\n    }\n    if (toolResults[approvalRequest.toolCallId] != null) {\n      continue;\n    }\n    const toolCall = toolCallsByToolCallId[approvalRequest.toolCallId];\n    if (toolCall == null) {\n      throw new ToolCallNotFoundForApprovalError({\n        toolCallId: approvalRequest.toolCallId,\n        approvalId: approvalRequest.approvalId\n      });\n    }\n    const approval = {\n      approvalRequest,\n      approvalResponse,\n      toolCall\n    };\n    if (approvalResponse.approved) {\n      approvedToolApprovals.push(approval);\n    } else {\n      deniedToolApprovals.push(approval);\n    }\n  }\n  return { approvedToolApprovals, deniedToolApprovals };\n}\n\n// src/generate-text/execute-tool-call.ts\nimport { executeTool } from \"@ai-sdk/provider-utils\";\nasync function executeToolCall({\n  toolCall,\n  tools,\n  tracer,\n  telemetry,\n  messages,\n  abortSignal,\n  experimental_context,\n  onPreliminaryToolResult\n}) {\n  const { toolName, toolCallId, input } = toolCall;\n  const tool2 = tools == null ? void 0 : tools[toolName];\n  if ((tool2 == null ? void 0 : tool2.execute) == null) {\n    return void 0;\n  }\n  return recordSpan({\n    name: \"ai.toolCall\",\n    attributes: selectTelemetryAttributes({\n      telemetry,\n      attributes: {\n        ...assembleOperationName({\n          operationId: \"ai.toolCall\",\n          telemetry\n        }),\n        \"ai.toolCall.name\": toolName,\n        \"ai.toolCall.id\": toolCallId,\n        \"ai.toolCall.args\": {\n          output: () => JSON.stringify(input)\n        }\n      }\n    }),\n    tracer,\n    fn: async (span) => {\n      let output;\n      try {\n        const stream = executeTool({\n          execute: tool2.execute.bind(tool2),\n          input,\n          options: {\n            toolCallId,\n            messages,\n            abortSignal,\n            experimental_context\n          }\n        });\n        for await (const part of stream) {\n          if (part.type === \"preliminary\") {\n            onPreliminaryToolResult == null ? void 0 : onPreliminaryToolResult({\n              ...toolCall,\n              type: \"tool-result\",\n              output: part.output,\n              preliminary: true\n            });\n          } else {\n            output = part.output;\n          }\n        }\n      } catch (error) {\n        recordErrorOnSpan(span, error);\n        return {\n          type: \"tool-error\",\n          toolCallId,\n          toolName,\n          input,\n          error,\n          dynamic: tool2.type === \"dynamic\",\n          ...toolCall.providerMetadata != null ? { providerMetadata: toolCall.providerMetadata } : {}\n        };\n      }\n      try {\n        span.setAttributes(\n          await selectTelemetryAttributes({\n            telemetry,\n            attributes: {\n              \"ai.toolCall.result\": {\n                output: () => JSON.stringify(output)\n              }\n            }\n          })\n        );\n      } catch (ignored) {\n      }\n      return {\n        type: \"tool-result\",\n        toolCallId,\n        toolName,\n        input,\n        output,\n        dynamic: tool2.type === \"dynamic\",\n        ...toolCall.providerMetadata != null ? { providerMetadata: toolCall.providerMetadata } : {}\n      };\n    }\n  });\n}\n\n// src/generate-text/extract-text-content.ts\nfunction extractTextContent(content) {\n  const parts = content.filter(\n    (content2) => content2.type === \"text\"\n  );\n  if (parts.length === 0) {\n    return void 0;\n  }\n  return parts.map((content2) => content2.text).join(\"\");\n}\n\n// src/generate-text/generated-file.ts\nimport {\n  convertBase64ToUint8Array as convertBase64ToUint8Array3,\n  convertUint8ArrayToBase64 as convertUint8ArrayToBase642\n} from \"@ai-sdk/provider-utils\";\nvar DefaultGeneratedFile = class {\n  constructor({\n    data,\n    mediaType\n  }) {\n    const isUint8Array = data instanceof Uint8Array;\n    this.base64Data = isUint8Array ? void 0 : data;\n    this.uint8ArrayData = isUint8Array ? data : void 0;\n    this.mediaType = mediaType;\n  }\n  // lazy conversion with caching to avoid unnecessary conversion overhead:\n  get base64() {\n    if (this.base64Data == null) {\n      this.base64Data = convertUint8ArrayToBase642(this.uint8ArrayData);\n    }\n    return this.base64Data;\n  }\n  // lazy conversion with caching to avoid unnecessary conversion overhead:\n  get uint8Array() {\n    if (this.uint8ArrayData == null) {\n      this.uint8ArrayData = convertBase64ToUint8Array3(this.base64Data);\n    }\n    return this.uint8ArrayData;\n  }\n};\nvar DefaultGeneratedFileWithType = class extends DefaultGeneratedFile {\n  constructor(options) {\n    super(options);\n    this.type = \"file\";\n  }\n};\n\n// src/generate-text/is-approval-needed.ts\nasync function isApprovalNeeded({\n  tool: tool2,\n  toolCall,\n  messages,\n  experimental_context\n}) {\n  if (tool2.needsApproval == null) {\n    return false;\n  }\n  if (typeof tool2.needsApproval === \"boolean\") {\n    return tool2.needsApproval;\n  }\n  return await tool2.needsApproval(toolCall.input, {\n    toolCallId: toolCall.toolCallId,\n    messages,\n    experimental_context\n  });\n}\n\n// src/generate-text/output.ts\nvar output_exports = {};\n__export(output_exports, {\n  array: () => array,\n  choice: () => choice,\n  json: () => json,\n  object: () => object,\n  text: () => text\n});\nimport {\n  TypeValidationError as TypeValidationError2\n} from \"@ai-sdk/provider\";\nimport {\n  asSchema as asSchema2,\n  resolve,\n  safeParseJSON as safeParseJSON2,\n  safeValidateTypes as safeValidateTypes2\n} from \"@ai-sdk/provider-utils\";\n\n// src/util/parse-partial-json.ts\nimport { safeParseJSON } from \"@ai-sdk/provider-utils\";\n\n// src/util/fix-json.ts\nfunction fixJson(input) {\n  const stack = [\"ROOT\"];\n  let lastValidIndex = -1;\n  let literalStart = null;\n  function processValueStart(char, i, swapState) {\n    {\n      switch (char) {\n        case '\"': {\n          lastValidIndex = i;\n          stack.pop();\n          stack.push(swapState);\n          stack.push(\"INSIDE_STRING\");\n          break;\n        }\n        case \"f\":\n        case \"t\":\n        case \"n\": {\n          lastValidIndex = i;\n          literalStart = i;\n          stack.pop();\n          stack.push(swapState);\n          stack.push(\"INSIDE_LITERAL\");\n          break;\n        }\n        case \"-\": {\n          stack.pop();\n          stack.push(swapState);\n          stack.push(\"INSIDE_NUMBER\");\n          break;\n        }\n        case \"0\":\n        case \"1\":\n        case \"2\":\n        case \"3\":\n        case \"4\":\n        case \"5\":\n        case \"6\":\n        case \"7\":\n        case \"8\":\n        case \"9\": {\n          lastValidIndex = i;\n          stack.pop();\n          stack.push(swapState);\n          stack.push(\"INSIDE_NUMBER\");\n          break;\n        }\n        case \"{\": {\n          lastValidIndex = i;\n          stack.pop();\n          stack.push(swapState);\n          stack.push(\"INSIDE_OBJECT_START\");\n          break;\n        }\n        case \"[\": {\n          lastValidIndex = i;\n          stack.pop();\n          stack.push(swapState);\n          stack.push(\"INSIDE_ARRAY_START\");\n          break;\n        }\n      }\n    }\n  }\n  function processAfterObjectValue(char, i) {\n    switch (char) {\n      case \",\": {\n        stack.pop();\n        stack.push(\"INSIDE_OBJECT_AFTER_COMMA\");\n        break;\n      }\n      case \"}\": {\n        lastValidIndex = i;\n        stack.pop();\n        break;\n      }\n    }\n  }\n  function processAfterArrayValue(char, i) {\n    switch (char) {\n      case \",\": {\n        stack.pop();\n        stack.push(\"INSIDE_ARRAY_AFTER_COMMA\");\n        break;\n      }\n      case \"]\": {\n        lastValidIndex = i;\n        stack.pop();\n        break;\n      }\n    }\n  }\n  for (let i = 0; i < input.length; i++) {\n    const char = input[i];\n    const currentState = stack[stack.length - 1];\n    switch (currentState) {\n      case \"ROOT\":\n        processValueStart(char, i, \"FINISH\");\n        break;\n      case \"INSIDE_OBJECT_START\": {\n        switch (char) {\n          case '\"': {\n            stack.pop();\n            stack.push(\"INSIDE_OBJECT_KEY\");\n            break;\n          }\n          case \"}\": {\n            lastValidIndex = i;\n            stack.pop();\n            break;\n          }\n        }\n        break;\n      }\n      case \"INSIDE_OBJECT_AFTER_COMMA\": {\n        switch (char) {\n          case '\"': {\n            stack.pop();\n            stack.push(\"INSIDE_OBJECT_KEY\");\n            break;\n          }\n        }\n        break;\n      }\n      case \"INSIDE_OBJECT_KEY\": {\n        switch (char) {\n          case '\"': {\n            stack.pop();\n            stack.push(\"INSIDE_OBJECT_AFTER_KEY\");\n            break;\n          }\n        }\n        break;\n      }\n      case \"INSIDE_OBJECT_AFTER_KEY\": {\n        switch (char) {\n          case \":\": {\n            stack.pop();\n            stack.push(\"INSIDE_OBJECT_BEFORE_VALUE\");\n            break;\n          }\n        }\n        break;\n      }\n      case \"INSIDE_OBJECT_BEFORE_VALUE\": {\n        processValueStart(char, i, \"INSIDE_OBJECT_AFTER_VALUE\");\n        break;\n      }\n      case \"INSIDE_OBJECT_AFTER_VALUE\": {\n        processAfterObjectValue(char, i);\n        break;\n      }\n      case \"INSIDE_STRING\": {\n        switch (char) {\n          case '\"': {\n            stack.pop();\n            lastValidIndex = i;\n            break;\n          }\n          case \"\\\\\": {\n            stack.push(\"INSIDE_STRING_ESCAPE\");\n            break;\n          }\n          default: {\n            lastValidIndex = i;\n          }\n        }\n        break;\n      }\n      case \"INSIDE_ARRAY_START\": {\n        switch (char) {\n          case \"]\": {\n            lastValidIndex = i;\n            stack.pop();\n            break;\n          }\n          default: {\n            lastValidIndex = i;\n            processValueStart(char, i, \"INSIDE_ARRAY_AFTER_VALUE\");\n            break;\n          }\n        }\n        break;\n      }\n      case \"INSIDE_ARRAY_AFTER_VALUE\": {\n        switch (char) {\n          case \",\": {\n            stack.pop();\n            stack.push(\"INSIDE_ARRAY_AFTER_COMMA\");\n            break;\n          }\n          case \"]\": {\n            lastValidIndex = i;\n            stack.pop();\n            break;\n          }\n          default: {\n            lastValidIndex = i;\n            break;\n          }\n        }\n        break;\n      }\n      case \"INSIDE_ARRAY_AFTER_COMMA\": {\n        processValueStart(char, i, \"INSIDE_ARRAY_AFTER_VALUE\");\n        break;\n      }\n      case \"INSIDE_STRING_ESCAPE\": {\n        stack.pop();\n        lastValidIndex = i;\n        break;\n      }\n      case \"INSIDE_NUMBER\": {\n        switch (char) {\n          case \"0\":\n          case \"1\":\n          case \"2\":\n          case \"3\":\n          case \"4\":\n          case \"5\":\n          case \"6\":\n          case \"7\":\n          case \"8\":\n          case \"9\": {\n            lastValidIndex = i;\n            break;\n          }\n          case \"e\":\n          case \"E\":\n          case \"-\":\n          case \".\": {\n            break;\n          }\n          case \",\": {\n            stack.pop();\n            if (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") {\n              processAfterArrayValue(char, i);\n            }\n            if (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") {\n              processAfterObjectValue(char, i);\n            }\n            break;\n          }\n          case \"}\": {\n            stack.pop();\n            if (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") {\n              processAfterObjectValue(char, i);\n            }\n            break;\n          }\n          case \"]\": {\n            stack.pop();\n            if (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") {\n              processAfterArrayValue(char, i);\n            }\n            break;\n          }\n          default: {\n            stack.pop();\n            break;\n          }\n        }\n        break;\n      }\n      case \"INSIDE_LITERAL\": {\n        const partialLiteral = input.substring(literalStart, i + 1);\n        if (!\"false\".startsWith(partialLiteral) && !\"true\".startsWith(partialLiteral) && !\"null\".startsWith(partialLiteral)) {\n          stack.pop();\n          if (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") {\n            processAfterObjectValue(char, i);\n          } else if (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") {\n            processAfterArrayValue(char, i);\n          }\n        } else {\n          lastValidIndex = i;\n        }\n        break;\n      }\n    }\n  }\n  let result = input.slice(0, lastValidIndex + 1);\n  for (let i = stack.length - 1; i >= 0; i--) {\n    const state = stack[i];\n    switch (state) {\n      case \"INSIDE_STRING\": {\n        result += '\"';\n        break;\n      }\n      case \"INSIDE_OBJECT_KEY\":\n      case \"INSIDE_OBJECT_AFTER_KEY\":\n      case \"INSIDE_OBJECT_AFTER_COMMA\":\n      case \"INSIDE_OBJECT_START\":\n      case \"INSIDE_OBJECT_BEFORE_VALUE\":\n      case \"INSIDE_OBJECT_AFTER_VALUE\": {\n        result += \"}\";\n        break;\n      }\n      case \"INSIDE_ARRAY_START\":\n      case \"INSIDE_ARRAY_AFTER_COMMA\":\n      case \"INSIDE_ARRAY_AFTER_VALUE\": {\n        result += \"]\";\n        break;\n      }\n      case \"INSIDE_LITERAL\": {\n        const partialLiteral = input.substring(literalStart, input.length);\n        if (\"true\".startsWith(partialLiteral)) {\n          result += \"true\".slice(partialLiteral.length);\n        } else if (\"false\".startsWith(partialLiteral)) {\n          result += \"false\".slice(partialLiteral.length);\n        } else if (\"null\".startsWith(partialLiteral)) {\n          result += \"null\".slice(partialLiteral.length);\n        }\n      }\n    }\n  }\n  return result;\n}\n\n// src/util/parse-partial-json.ts\nasync function parsePartialJson(jsonText) {\n  if (jsonText === void 0) {\n    return { value: void 0, state: \"undefined-input\" };\n  }\n  let result = await safeParseJSON({ text: jsonText });\n  if (result.success) {\n    return { value: result.value, state: \"successful-parse\" };\n  }\n  result = await safeParseJSON({ text: fixJson(jsonText) });\n  if (result.success) {\n    return { value: result.value, state: \"repaired-parse\" };\n  }\n  return { value: void 0, state: \"failed-parse\" };\n}\n\n// src/generate-text/output.ts\nvar text = () => ({\n  name: \"text\",\n  responseFormat: Promise.resolve({ type: \"text\" }),\n  async parseCompleteOutput({ text: text2 }) {\n    return text2;\n  },\n  async parsePartialOutput({ text: text2 }) {\n    return { partial: text2 };\n  },\n  createElementStreamTransform() {\n    return void 0;\n  }\n});\nvar object = ({\n  schema: inputSchema,\n  name: name20,\n  description\n}) => {\n  const schema = asSchema2(inputSchema);\n  return {\n    name: \"object\",\n    responseFormat: resolve(schema.jsonSchema).then((jsonSchema2) => ({\n      type: \"json\",\n      schema: jsonSchema2,\n      ...name20 != null && { name: name20 },\n      ...description != null && { description }\n    })),\n    async parseCompleteOutput({ text: text2 }, context2) {\n      const parseResult = await safeParseJSON2({ text: text2 });\n      if (!parseResult.success) {\n        throw new NoObjectGeneratedError({\n          message: \"No object generated: could not parse the response.\",\n          cause: parseResult.error,\n          text: text2,\n          response: context2.response,\n          usage: context2.usage,\n          finishReason: context2.finishReason\n        });\n      }\n      const validationResult = await safeValidateTypes2({\n        value: parseResult.value,\n        schema\n      });\n      if (!validationResult.success) {\n        throw new NoObjectGeneratedError({\n          message: \"No object generated: response did not match schema.\",\n          cause: validationResult.error,\n          text: text2,\n          response: context2.response,\n          usage: context2.usage,\n          finishReason: context2.finishReason\n        });\n      }\n      return validationResult.value;\n    },\n    async parsePartialOutput({ text: text2 }) {\n      const result = await parsePartialJson(text2);\n      switch (result.state) {\n        case \"failed-parse\":\n        case \"undefined-input\": {\n          return void 0;\n        }\n        case \"repaired-parse\":\n        case \"successful-parse\": {\n          return {\n            // Note: currently no validation of partial results:\n            partial: result.value\n          };\n        }\n      }\n    },\n    createElementStreamTransform() {\n      return void 0;\n    }\n  };\n};\nvar array = ({\n  element: inputElementSchema,\n  name: name20,\n  description\n}) => {\n  const elementSchema = asSchema2(inputElementSchema);\n  return {\n    name: \"array\",\n    // JSON schema that describes an array of elements:\n    responseFormat: resolve(elementSchema.jsonSchema).then((jsonSchema2) => {\n      const { $schema, ...itemSchema } = jsonSchema2;\n      return {\n        type: \"json\",\n        schema: {\n          $schema: \"http://json-schema.org/draft-07/schema#\",\n          type: \"object\",\n          properties: {\n            elements: { type: \"array\", items: itemSchema }\n          },\n          required: [\"elements\"],\n          additionalProperties: false\n        },\n        ...name20 != null && { name: name20 },\n        ...description != null && { description }\n      };\n    }),\n    async parseCompleteOutput({ text: text2 }, context2) {\n      const parseResult = await safeParseJSON2({ text: text2 });\n      if (!parseResult.success) {\n        throw new NoObjectGeneratedError({\n          message: \"No object generated: could not parse the response.\",\n          cause: parseResult.error,\n          text: text2,\n          response: context2.response,\n          usage: context2.usage,\n          finishReason: context2.finishReason\n        });\n      }\n      const outerValue = parseResult.value;\n      if (outerValue == null || typeof outerValue !== \"object\" || !(\"elements\" in outerValue) || !Array.isArray(outerValue.elements)) {\n        throw new NoObjectGeneratedError({\n          message: \"No object generated: response did not match schema.\",\n          cause: new TypeValidationError2({\n            value: outerValue,\n            cause: \"response must be an object with an elements array\"\n          }),\n          text: text2,\n          response: context2.response,\n          usage: context2.usage,\n          finishReason: context2.finishReason\n        });\n      }\n      for (const element of outerValue.elements) {\n        const validationResult = await safeValidateTypes2({\n          value: element,\n          schema: elementSchema\n        });\n        if (!validationResult.success) {\n          throw new NoObjectGeneratedError({\n            message: \"No object generated: response did not match schema.\",\n            cause: validationResult.error,\n            text: text2,\n            response: context2.response,\n            usage: context2.usage,\n            finishReason: context2.finishReason\n          });\n        }\n      }\n      return outerValue.elements;\n    },\n    async parsePartialOutput({ text: text2 }) {\n      const result = await parsePartialJson(text2);\n      switch (result.state) {\n        case \"failed-parse\":\n        case \"undefined-input\": {\n          return void 0;\n        }\n        case \"repaired-parse\":\n        case \"successful-parse\": {\n          const outerValue = result.value;\n          if (outerValue == null || typeof outerValue !== \"object\" || !(\"elements\" in outerValue) || !Array.isArray(outerValue.elements)) {\n            return void 0;\n          }\n          const rawElements = result.state === \"repaired-parse\" && outerValue.elements.length > 0 ? outerValue.elements.slice(0, -1) : outerValue.elements;\n          const parsedElements = [];\n          for (const rawElement of rawElements) {\n            const validationResult = await safeValidateTypes2({\n              value: rawElement,\n              schema: elementSchema\n            });\n            if (validationResult.success) {\n              parsedElements.push(validationResult.value);\n            }\n          }\n          return { partial: parsedElements };\n        }\n      }\n    },\n    createElementStreamTransform() {\n      let publishedElements = 0;\n      return new TransformStream({\n        transform({ partialOutput }, controller) {\n          if (partialOutput != null) {\n            for (; publishedElements < partialOutput.length; publishedElements++) {\n              controller.enqueue(partialOutput[publishedElements]);\n            }\n          }\n        }\n      });\n    }\n  };\n};\nvar choice = ({\n  options: choiceOptions,\n  name: name20,\n  description\n}) => {\n  return {\n    name: \"choice\",\n    // JSON schema that describes an enumeration:\n    responseFormat: Promise.resolve({\n      type: \"json\",\n      schema: {\n        $schema: \"http://json-schema.org/draft-07/schema#\",\n        type: \"object\",\n        properties: {\n          result: { type: \"string\", enum: choiceOptions }\n        },\n        required: [\"result\"],\n        additionalProperties: false\n      },\n      ...name20 != null && { name: name20 },\n      ...description != null && { description }\n    }),\n    async parseCompleteOutput({ text: text2 }, context2) {\n      const parseResult = await safeParseJSON2({ text: text2 });\n      if (!parseResult.success) {\n        throw new NoObjectGeneratedError({\n          message: \"No object generated: could not parse the response.\",\n          cause: parseResult.error,\n          text: text2,\n          response: context2.response,\n          usage: context2.usage,\n          finishReason: context2.finishReason\n        });\n      }\n      const outerValue = parseResult.value;\n      if (outerValue == null || typeof outerValue !== \"object\" || !(\"result\" in outerValue) || typeof outerValue.result !== \"string\" || !choiceOptions.includes(outerValue.result)) {\n        throw new NoObjectGeneratedError({\n          message: \"No object generated: response did not match schema.\",\n          cause: new TypeValidationError2({\n            value: outerValue,\n            cause: \"response must be an object that contains a choice value.\"\n          }),\n          text: text2,\n          response: context2.response,\n          usage: context2.usage,\n          finishReason: context2.finishReason\n        });\n      }\n      return outerValue.result;\n    },\n    async parsePartialOutput({ text: text2 }) {\n      const result = await parsePartialJson(text2);\n      switch (result.state) {\n        case \"failed-parse\":\n        case \"undefined-input\": {\n          return void 0;\n        }\n        case \"repaired-parse\":\n        case \"successful-parse\": {\n          const outerValue = result.value;\n          if (outerValue == null || typeof outerValue !== \"object\" || !(\"result\" in outerValue) || typeof outerValue.result !== \"string\") {\n            return void 0;\n          }\n          const potentialMatches = choiceOptions.filter(\n            (choiceOption) => choiceOption.startsWith(outerValue.result)\n          );\n          if (result.state === \"successful-parse\") {\n            return potentialMatches.includes(outerValue.result) ? { partial: outerValue.result } : void 0;\n          } else {\n            return potentialMatches.length === 1 ? { partial: potentialMatches[0] } : void 0;\n          }\n        }\n      }\n    },\n    createElementStreamTransform() {\n      return void 0;\n    }\n  };\n};\nvar json = ({\n  name: name20,\n  description\n} = {}) => {\n  return {\n    name: \"json\",\n    responseFormat: Promise.resolve({\n      type: \"json\",\n      ...name20 != null && { name: name20 },\n      ...description != null && { description }\n    }),\n    async parseCompleteOutput({ text: text2 }, context2) {\n      const parseResult = await safeParseJSON2({ text: text2 });\n      if (!parseResult.success) {\n        throw new NoObjectGeneratedError({\n          message: \"No object generated: could not parse the response.\",\n          cause: parseResult.error,\n          text: text2,\n          response: context2.response,\n          usage: context2.usage,\n          finishReason: context2.finishReason\n        });\n      }\n      return parseResult.value;\n    },\n    async parsePartialOutput({ text: text2 }) {\n      const result = await parsePartialJson(text2);\n      switch (result.state) {\n        case \"failed-parse\":\n        case \"undefined-input\": {\n          return void 0;\n        }\n        case \"repaired-parse\":\n        case \"successful-parse\": {\n          return result.value === void 0 ? void 0 : { partial: result.value };\n        }\n      }\n    },\n    createElementStreamTransform() {\n      return void 0;\n    }\n  };\n};\n\n// src/generate-text/parse-tool-call.ts\nimport {\n  asSchema as asSchema3,\n  safeParseJSON as safeParseJSON3,\n  safeValidateTypes as safeValidateTypes3\n} from \"@ai-sdk/provider-utils\";\nasync function parseToolCall({\n  toolCall,\n  tools,\n  repairToolCall,\n  system,\n  messages\n}) {\n  var _a20;\n  try {\n    if (tools == null) {\n      if (toolCall.providerExecuted && toolCall.dynamic) {\n        return await parseProviderExecutedDynamicToolCall(toolCall);\n      }\n      throw new NoSuchToolError({ toolName: toolCall.toolName });\n    }\n    try {\n      return await doParseToolCall({ toolCall, tools });\n    } catch (error) {\n      if (repairToolCall == null || !(NoSuchToolError.isInstance(error) || InvalidToolInputError.isInstance(error))) {\n        throw error;\n      }\n      let repairedToolCall = null;\n      try {\n        repairedToolCall = await repairToolCall({\n          toolCall,\n          tools,\n          inputSchema: async ({ toolName }) => {\n            const { inputSchema } = tools[toolName];\n            return await asSchema3(inputSchema).jsonSchema;\n          },\n          system,\n          messages,\n          error\n        });\n      } catch (repairError) {\n        throw new ToolCallRepairError({\n          cause: repairError,\n          originalError: error\n        });\n      }\n      if (repairedToolCall == null) {\n        throw error;\n      }\n      return await doParseToolCall({ toolCall: repairedToolCall, tools });\n    }\n  } catch (error) {\n    const parsedInput = await safeParseJSON3({ text: toolCall.input });\n    const input = parsedInput.success ? parsedInput.value : toolCall.input;\n    return {\n      type: \"tool-call\",\n      toolCallId: toolCall.toolCallId,\n      toolName: toolCall.toolName,\n      input,\n      dynamic: true,\n      invalid: true,\n      error,\n      title: (_a20 = tools == null ? void 0 : tools[toolCall.toolName]) == null ? void 0 : _a20.title,\n      providerExecuted: toolCall.providerExecuted,\n      providerMetadata: toolCall.providerMetadata\n    };\n  }\n}\nasync function parseProviderExecutedDynamicToolCall(toolCall) {\n  const parseResult = toolCall.input.trim() === \"\" ? { success: true, value: {} } : await safeParseJSON3({ text: toolCall.input });\n  if (parseResult.success === false) {\n    throw new InvalidToolInputError({\n      toolName: toolCall.toolName,\n      toolInput: toolCall.input,\n      cause: parseResult.error\n    });\n  }\n  return {\n    type: \"tool-call\",\n    toolCallId: toolCall.toolCallId,\n    toolName: toolCall.toolName,\n    input: parseResult.value,\n    providerExecuted: true,\n    dynamic: true,\n    providerMetadata: toolCall.providerMetadata\n  };\n}\nasync function doParseToolCall({\n  toolCall,\n  tools\n}) {\n  const toolName = toolCall.toolName;\n  const tool2 = tools[toolName];\n  if (tool2 == null) {\n    if (toolCall.providerExecuted && toolCall.dynamic) {\n      return await parseProviderExecutedDynamicToolCall(toolCall);\n    }\n    throw new NoSuchToolError({\n      toolName: toolCall.toolName,\n      availableTools: Object.keys(tools)\n    });\n  }\n  const schema = asSchema3(tool2.inputSchema);\n  const parseResult = toolCall.input.trim() === \"\" ? await safeValidateTypes3({ value: {}, schema }) : await safeParseJSON3({ text: toolCall.input, schema });\n  if (parseResult.success === false) {\n    throw new InvalidToolInputError({\n      toolName,\n      toolInput: toolCall.input,\n      cause: parseResult.error\n    });\n  }\n  return tool2.type === \"dynamic\" ? {\n    type: \"tool-call\",\n    toolCallId: toolCall.toolCallId,\n    toolName: toolCall.toolName,\n    input: parseResult.value,\n    providerExecuted: toolCall.providerExecuted,\n    providerMetadata: toolCall.providerMetadata,\n    dynamic: true,\n    title: tool2.title\n  } : {\n    type: \"tool-call\",\n    toolCallId: toolCall.toolCallId,\n    toolName,\n    input: parseResult.value,\n    providerExecuted: toolCall.providerExecuted,\n    providerMetadata: toolCall.providerMetadata,\n    title: tool2.title\n  };\n}\n\n// src/generate-text/step-result.ts\nvar DefaultStepResult = class {\n  constructor({\n    content,\n    finishReason,\n    rawFinishReason,\n    usage,\n    warnings,\n    request,\n    response,\n    providerMetadata\n  }) {\n    this.content = content;\n    this.finishReason = finishReason;\n    this.rawFinishReason = rawFinishReason;\n    this.usage = usage;\n    this.warnings = warnings;\n    this.request = request;\n    this.response = response;\n    this.providerMetadata = providerMetadata;\n  }\n  get text() {\n    return this.content.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\");\n  }\n  get reasoning() {\n    return this.content.filter((part) => part.type === \"reasoning\");\n  }\n  get reasoningText() {\n    return this.reasoning.length === 0 ? void 0 : this.reasoning.map((part) => part.text).join(\"\");\n  }\n  get files() {\n    return this.content.filter((part) => part.type === \"file\").map((part) => part.file);\n  }\n  get sources() {\n    return this.content.filter((part) => part.type === \"source\");\n  }\n  get toolCalls() {\n    return this.content.filter((part) => part.type === \"tool-call\");\n  }\n  get staticToolCalls() {\n    return this.toolCalls.filter(\n      (toolCall) => toolCall.dynamic !== true\n    );\n  }\n  get dynamicToolCalls() {\n    return this.toolCalls.filter(\n      (toolCall) => toolCall.dynamic === true\n    );\n  }\n  get toolResults() {\n    return this.content.filter((part) => part.type === \"tool-result\");\n  }\n  get staticToolResults() {\n    return this.toolResults.filter(\n      (toolResult) => toolResult.dynamic !== true\n    );\n  }\n  get dynamicToolResults() {\n    return this.toolResults.filter(\n      (toolResult) => toolResult.dynamic === true\n    );\n  }\n};\n\n// src/generate-text/stop-condition.ts\nfunction stepCountIs(stepCount) {\n  return ({ steps }) => steps.length === stepCount;\n}\nfunction hasToolCall(toolName) {\n  return ({ steps }) => {\n    var _a20, _b, _c;\n    return (_c = (_b = (_a20 = steps[steps.length - 1]) == null ? void 0 : _a20.toolCalls) == null ? void 0 : _b.some(\n      (toolCall) => toolCall.toolName === toolName\n    )) != null ? _c : false;\n  };\n}\nasync function isStopConditionMet({\n  stopConditions,\n  steps\n}) {\n  return (await Promise.all(stopConditions.map((condition) => condition({ steps })))).some((result) => result);\n}\n\n// src/generate-text/to-response-messages.ts\nasync function toResponseMessages({\n  content: inputContent,\n  tools\n}) {\n  const responseMessages = [];\n  const content = [];\n  for (const part of inputContent) {\n    if (part.type === \"source\") {\n      continue;\n    }\n    if ((part.type === \"tool-result\" || part.type === \"tool-error\") && !part.providerExecuted) {\n      continue;\n    }\n    if (part.type === \"text\" && part.text.length === 0) {\n      continue;\n    }\n    switch (part.type) {\n      case \"text\":\n        content.push({\n          type: \"text\",\n          text: part.text,\n          providerOptions: part.providerMetadata\n        });\n        break;\n      case \"reasoning\":\n        content.push({\n          type: \"reasoning\",\n          text: part.text,\n          providerOptions: part.providerMetadata\n        });\n        break;\n      case \"file\":\n        content.push({\n          type: \"file\",\n          data: part.file.base64,\n          mediaType: part.file.mediaType,\n          providerOptions: part.providerMetadata\n        });\n        break;\n      case \"tool-call\":\n        content.push({\n          type: \"tool-call\",\n          toolCallId: part.toolCallId,\n          toolName: part.toolName,\n          input: part.input,\n          providerExecuted: part.providerExecuted,\n          providerOptions: part.providerMetadata\n        });\n        break;\n      case \"tool-result\": {\n        const output = await createToolModelOutput({\n          toolCallId: part.toolCallId,\n          input: part.input,\n          tool: tools == null ? void 0 : tools[part.toolName],\n          output: part.output,\n          errorMode: \"none\"\n        });\n        content.push({\n          type: \"tool-result\",\n          toolCallId: part.toolCallId,\n          toolName: part.toolName,\n          output,\n          providerOptions: part.providerMetadata\n        });\n        break;\n      }\n      case \"tool-error\": {\n        const output = await createToolModelOutput({\n          toolCallId: part.toolCallId,\n          input: part.input,\n          tool: tools == null ? void 0 : tools[part.toolName],\n          output: part.error,\n          errorMode: \"json\"\n        });\n        content.push({\n          type: \"tool-result\",\n          toolCallId: part.toolCallId,\n          toolName: part.toolName,\n          output,\n          providerOptions: part.providerMetadata\n        });\n        break;\n      }\n      case \"tool-approval-request\":\n        content.push({\n          type: \"tool-approval-request\",\n          approvalId: part.approvalId,\n          toolCallId: part.toolCall.toolCallId\n        });\n        break;\n    }\n  }\n  if (content.length > 0) {\n    responseMessages.push({\n      role: \"assistant\",\n      content\n    });\n  }\n  const toolResultContent = [];\n  for (const part of inputContent) {\n    if (!(part.type === \"tool-result\" || part.type === \"tool-error\") || part.providerExecuted) {\n      continue;\n    }\n    const output = await createToolModelOutput({\n      toolCallId: part.toolCallId,\n      input: part.input,\n      tool: tools == null ? void 0 : tools[part.toolName],\n      output: part.type === \"tool-result\" ? part.output : part.error,\n      errorMode: part.type === \"tool-error\" ? \"text\" : \"none\"\n    });\n    toolResultContent.push({\n      type: \"tool-result\",\n      toolCallId: part.toolCallId,\n      toolName: part.toolName,\n      output,\n      ...part.providerMetadata != null ? { providerOptions: part.providerMetadata } : {}\n    });\n  }\n  if (toolResultContent.length > 0) {\n    responseMessages.push({\n      role: \"tool\",\n      content: toolResultContent\n    });\n  }\n  return responseMessages;\n}\n\n// src/util/merge-abort-signals.ts\nfunction mergeAbortSignals(...signals) {\n  const validSignals = signals.filter(\n    (signal) => signal != null\n  );\n  if (validSignals.length === 0) {\n    return void 0;\n  }\n  if (validSignals.length === 1) {\n    return validSignals[0];\n  }\n  const controller = new AbortController();\n  for (const signal of validSignals) {\n    if (signal.aborted) {\n      controller.abort(signal.reason);\n      return controller.signal;\n    }\n    signal.addEventListener(\n      \"abort\",\n      () => {\n        controller.abort(signal.reason);\n      },\n      { once: true }\n    );\n  }\n  return controller.signal;\n}\n\n// src/generate-text/generate-text.ts\nvar originalGenerateId = createIdGenerator({\n  prefix: \"aitxt\",\n  size: 24\n});\nasync function generateText({\n  model: modelArg,\n  tools,\n  toolChoice,\n  system,\n  prompt,\n  messages,\n  maxRetries: maxRetriesArg,\n  abortSignal,\n  timeout,\n  headers,\n  stopWhen = stepCountIs(1),\n  experimental_output,\n  output = experimental_output,\n  experimental_telemetry: telemetry,\n  providerOptions,\n  experimental_activeTools,\n  activeTools = experimental_activeTools,\n  experimental_prepareStep,\n  prepareStep = experimental_prepareStep,\n  experimental_repairToolCall: repairToolCall,\n  experimental_download: download2,\n  experimental_context,\n  experimental_include: include,\n  _internal: { generateId: generateId2 = originalGenerateId } = {},\n  onStepFinish,\n  onFinish,\n  ...settings\n}) {\n  const model = resolveLanguageModel(modelArg);\n  const stopConditions = asArray(stopWhen);\n  const totalTimeoutMs = getTotalTimeoutMs(timeout);\n  const stepTimeoutMs = getStepTimeoutMs(timeout);\n  const stepAbortController = stepTimeoutMs != null ? new AbortController() : void 0;\n  const mergedAbortSignal = mergeAbortSignals(\n    abortSignal,\n    totalTimeoutMs != null ? AbortSignal.timeout(totalTimeoutMs) : void 0,\n    stepAbortController == null ? void 0 : stepAbortController.signal\n  );\n  const { maxRetries, retry } = prepareRetries({\n    maxRetries: maxRetriesArg,\n    abortSignal: mergedAbortSignal\n  });\n  const callSettings = prepareCallSettings(settings);\n  const headersWithUserAgent = withUserAgentSuffix2(\n    headers != null ? headers : {},\n    `ai/${VERSION}`\n  );\n  const baseTelemetryAttributes = getBaseTelemetryAttributes({\n    model,\n    telemetry,\n    headers: headersWithUserAgent,\n    settings: { ...callSettings, maxRetries }\n  });\n  const initialPrompt = await standardizePrompt({\n    system,\n    prompt,\n    messages\n  });\n  const tracer = getTracer(telemetry);\n  try {\n    return await recordSpan({\n      name: \"ai.generateText\",\n      attributes: selectTelemetryAttributes({\n        telemetry,\n        attributes: {\n          ...assembleOperationName({\n            operationId: \"ai.generateText\",\n            telemetry\n          }),\n          ...baseTelemetryAttributes,\n          // model:\n          \"ai.model.provider\": model.provider,\n          \"ai.model.id\": model.modelId,\n          // specific settings that only make sense on the outer level:\n          \"ai.prompt\": {\n            input: () => JSON.stringify({ system, prompt, messages })\n          }\n        }\n      }),\n      tracer,\n      fn: async (span) => {\n        var _a20, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;\n        const initialMessages = initialPrompt.messages;\n        const responseMessages = [];\n        const { approvedToolApprovals, deniedToolApprovals } = collectToolApprovals({ messages: initialMessages });\n        const localApprovedToolApprovals = approvedToolApprovals.filter(\n          (toolApproval) => !toolApproval.toolCall.providerExecuted\n        );\n        if (deniedToolApprovals.length > 0 || localApprovedToolApprovals.length > 0) {\n          const toolOutputs = await executeTools({\n            toolCalls: localApprovedToolApprovals.map(\n              (toolApproval) => toolApproval.toolCall\n            ),\n            tools,\n            tracer,\n            telemetry,\n            messages: initialMessages,\n            abortSignal: mergedAbortSignal,\n            experimental_context\n          });\n          const toolContent = [];\n          for (const output2 of toolOutputs) {\n            const modelOutput = await createToolModelOutput({\n              toolCallId: output2.toolCallId,\n              input: output2.input,\n              tool: tools == null ? void 0 : tools[output2.toolName],\n              output: output2.type === \"tool-result\" ? output2.output : output2.error,\n              errorMode: output2.type === \"tool-error\" ? \"json\" : \"none\"\n            });\n            toolContent.push({\n              type: \"tool-result\",\n              toolCallId: output2.toolCallId,\n              toolName: output2.toolName,\n              output: modelOutput\n            });\n          }\n          for (const toolApproval of deniedToolApprovals) {\n            toolContent.push({\n              type: \"tool-result\",\n              toolCallId: toolApproval.toolCall.toolCallId,\n              toolName: toolApproval.toolCall.toolName,\n              output: {\n                type: \"execution-denied\",\n                reason: toolApproval.approvalResponse.reason,\n                // For provider-executed tools, include approvalId so provider can correlate\n                ...toolApproval.toolCall.providerExecuted && {\n                  providerOptions: {\n                    openai: {\n                      approvalId: toolApproval.approvalResponse.approvalId\n                    }\n                  }\n                }\n              }\n            });\n          }\n          responseMessages.push({\n            role: \"tool\",\n            content: toolContent\n          });\n        }\n        const providerExecutedToolApprovals = [\n          ...approvedToolApprovals,\n          ...deniedToolApprovals\n        ].filter((toolApproval) => toolApproval.toolCall.providerExecuted);\n        if (providerExecutedToolApprovals.length > 0) {\n          responseMessages.push({\n            role: \"tool\",\n            content: providerExecutedToolApprovals.map(\n              (toolApproval) => ({\n                type: \"tool-approval-response\",\n                approvalId: toolApproval.approvalResponse.approvalId,\n                approved: toolApproval.approvalResponse.approved,\n                reason: toolApproval.approvalResponse.reason,\n                providerExecuted: true\n              })\n            )\n          });\n        }\n        const callSettings2 = prepareCallSettings(settings);\n        let currentModelResponse;\n        let clientToolCalls = [];\n        let clientToolOutputs = [];\n        const steps = [];\n        const pendingDeferredToolCalls = /* @__PURE__ */ new Map();\n        do {\n          const stepTimeoutId = stepTimeoutMs != null ? setTimeout(() => stepAbortController.abort(), stepTimeoutMs) : void 0;\n          try {\n            const stepInputMessages = [...initialMessages, ...responseMessages];\n            const prepareStepResult = await (prepareStep == null ? void 0 : prepareStep({\n              model,\n              steps,\n              stepNumber: steps.length,\n              messages: stepInputMessages,\n              experimental_context\n            }));\n            const stepModel = resolveLanguageModel(\n              (_a20 = prepareStepResult == null ? void 0 : prepareStepResult.model) != null ? _a20 : model\n            );\n            const promptMessages = await convertToLanguageModelPrompt({\n              prompt: {\n                system: (_b = prepareStepResult == null ? void 0 : prepareStepResult.system) != null ? _b : initialPrompt.system,\n                messages: (_c = prepareStepResult == null ? void 0 : prepareStepResult.messages) != null ? _c : stepInputMessages\n              },\n              supportedUrls: await stepModel.supportedUrls,\n              download: download2\n            });\n            experimental_context = (_d = prepareStepResult == null ? void 0 : prepareStepResult.experimental_context) != null ? _d : experimental_context;\n            const { toolChoice: stepToolChoice, tools: stepTools } = await prepareToolsAndToolChoice({\n              tools,\n              toolChoice: (_e = prepareStepResult == null ? void 0 : prepareStepResult.toolChoice) != null ? _e : toolChoice,\n              activeTools: (_f = prepareStepResult == null ? void 0 : prepareStepResult.activeTools) != null ? _f : activeTools\n            });\n            currentModelResponse = await retry(\n              () => {\n                var _a21;\n                return recordSpan({\n                  name: \"ai.generateText.doGenerate\",\n                  attributes: selectTelemetryAttributes({\n                    telemetry,\n                    attributes: {\n                      ...assembleOperationName({\n                        operationId: \"ai.generateText.doGenerate\",\n                        telemetry\n                      }),\n                      ...baseTelemetryAttributes,\n                      // model:\n                      \"ai.model.provider\": stepModel.provider,\n                      \"ai.model.id\": stepModel.modelId,\n                      // prompt:\n                      \"ai.prompt.messages\": {\n                        input: () => stringifyForTelemetry(promptMessages)\n                      },\n                      \"ai.prompt.tools\": {\n                        // convert the language model level tools:\n                        input: () => stepTools == null ? void 0 : stepTools.map((tool2) => JSON.stringify(tool2))\n                      },\n                      \"ai.prompt.toolChoice\": {\n                        input: () => stepToolChoice != null ? JSON.stringify(stepToolChoice) : void 0\n                      },\n                      // standardized gen-ai llm span attributes:\n                      \"gen_ai.system\": stepModel.provider,\n                      \"gen_ai.request.model\": stepModel.modelId,\n                      \"gen_ai.request.frequency_penalty\": settings.frequencyPenalty,\n                      \"gen_ai.request.max_tokens\": settings.maxOutputTokens,\n                      \"gen_ai.request.presence_penalty\": settings.presencePenalty,\n                      \"gen_ai.request.stop_sequences\": settings.stopSequences,\n                      \"gen_ai.request.temperature\": (_a21 = settings.temperature) != null ? _a21 : void 0,\n                      \"gen_ai.request.top_k\": settings.topK,\n                      \"gen_ai.request.top_p\": settings.topP\n                    }\n                  }),\n                  tracer,\n                  fn: async (span2) => {\n                    var _a22, _b2, _c2, _d2, _e2, _f2, _g2, _h2;\n                    const stepProviderOptions = mergeObjects(\n                      providerOptions,\n                      prepareStepResult == null ? void 0 : prepareStepResult.providerOptions\n                    );\n                    const result = await stepModel.doGenerate({\n                      ...callSettings2,\n                      tools: stepTools,\n                      toolChoice: stepToolChoice,\n                      responseFormat: await (output == null ? void 0 : output.responseFormat),\n                      prompt: promptMessages,\n                      providerOptions: stepProviderOptions,\n                      abortSignal: mergedAbortSignal,\n                      headers: headersWithUserAgent\n                    });\n                    const responseData = {\n                      id: (_b2 = (_a22 = result.response) == null ? void 0 : _a22.id) != null ? _b2 : generateId2(),\n                      timestamp: (_d2 = (_c2 = result.response) == null ? void 0 : _c2.timestamp) != null ? _d2 : /* @__PURE__ */ new Date(),\n                      modelId: (_f2 = (_e2 = result.response) == null ? void 0 : _e2.modelId) != null ? _f2 : stepModel.modelId,\n                      headers: (_g2 = result.response) == null ? void 0 : _g2.headers,\n                      body: (_h2 = result.response) == null ? void 0 : _h2.body\n                    };\n                    span2.setAttributes(\n                      await selectTelemetryAttributes({\n                        telemetry,\n                        attributes: {\n                          \"ai.response.finishReason\": result.finishReason.unified,\n                          \"ai.response.text\": {\n                            output: () => extractTextContent(result.content)\n                          },\n                          \"ai.response.toolCalls\": {\n                            output: () => {\n                              const toolCalls = asToolCalls(result.content);\n                              return toolCalls == null ? void 0 : JSON.stringify(toolCalls);\n                            }\n                          },\n                          \"ai.response.id\": responseData.id,\n                          \"ai.response.model\": responseData.modelId,\n                          \"ai.response.timestamp\": responseData.timestamp.toISOString(),\n                          \"ai.response.providerMetadata\": JSON.stringify(\n                            result.providerMetadata\n                          ),\n                          // TODO rename telemetry attributes to inputTokens and outputTokens\n                          \"ai.usage.promptTokens\": result.usage.inputTokens.total,\n                          \"ai.usage.completionTokens\": result.usage.outputTokens.total,\n                          // standardized gen-ai llm span attributes:\n                          \"gen_ai.response.finish_reasons\": [\n                            result.finishReason.unified\n                          ],\n                          \"gen_ai.response.id\": responseData.id,\n                          \"gen_ai.response.model\": responseData.modelId,\n                          \"gen_ai.usage.input_tokens\": result.usage.inputTokens.total,\n                          \"gen_ai.usage.output_tokens\": result.usage.outputTokens.total\n                        }\n                      })\n                    );\n                    return { ...result, response: responseData };\n                  }\n                });\n              }\n            );\n            const stepToolCalls = await Promise.all(\n              currentModelResponse.content.filter(\n                (part) => part.type === \"tool-call\"\n              ).map(\n                (toolCall) => parseToolCall({\n                  toolCall,\n                  tools,\n                  repairToolCall,\n                  system,\n                  messages: stepInputMessages\n                })\n              )\n            );\n            const toolApprovalRequests = {};\n            for (const toolCall of stepToolCalls) {\n              if (toolCall.invalid) {\n                continue;\n              }\n              const tool2 = tools == null ? void 0 : tools[toolCall.toolName];\n              if (tool2 == null) {\n                continue;\n              }\n              if ((tool2 == null ? void 0 : tool2.onInputAvailable) != null) {\n                await tool2.onInputAvailable({\n                  input: toolCall.input,\n                  toolCallId: toolCall.toolCallId,\n                  messages: stepInputMessages,\n                  abortSignal: mergedAbortSignal,\n                  experimental_context\n                });\n              }\n              if (await isApprovalNeeded({\n                tool: tool2,\n                toolCall,\n                messages: stepInputMessages,\n                experimental_context\n              })) {\n                toolApprovalRequests[toolCall.toolCallId] = {\n                  type: \"tool-approval-request\",\n                  approvalId: generateId2(),\n                  toolCall\n                };\n              }\n            }\n            const invalidToolCalls = stepToolCalls.filter(\n              (toolCall) => toolCall.invalid && toolCall.dynamic\n            );\n            clientToolOutputs = [];\n            for (const toolCall of invalidToolCalls) {\n              clientToolOutputs.push({\n                type: \"tool-error\",\n                toolCallId: toolCall.toolCallId,\n                toolName: toolCall.toolName,\n                input: toolCall.input,\n                error: getErrorMessage5(toolCall.error),\n                dynamic: true\n              });\n            }\n            clientToolCalls = stepToolCalls.filter(\n              (toolCall) => !toolCall.providerExecuted\n            );\n            if (tools != null) {\n              clientToolOutputs.push(\n                ...await executeTools({\n                  toolCalls: clientToolCalls.filter(\n                    (toolCall) => !toolCall.invalid && toolApprovalRequests[toolCall.toolCallId] == null\n                  ),\n                  tools,\n                  tracer,\n                  telemetry,\n                  messages: stepInputMessages,\n                  abortSignal: mergedAbortSignal,\n                  experimental_context\n                })\n              );\n            }\n            for (const toolCall of stepToolCalls) {\n              if (!toolCall.providerExecuted)\n                continue;\n              const tool2 = tools == null ? void 0 : tools[toolCall.toolName];\n              if ((tool2 == null ? void 0 : tool2.type) === \"provider\" && tool2.supportsDeferredResults) {\n                const hasResultInResponse = currentModelResponse.content.some(\n                  (part) => part.type === \"tool-result\" && part.toolCallId === toolCall.toolCallId\n                );\n                if (!hasResultInResponse) {\n                  pendingDeferredToolCalls.set(toolCall.toolCallId, {\n                    toolName: toolCall.toolName\n                  });\n                }\n              }\n            }\n            for (const part of currentModelResponse.content) {\n              if (part.type === \"tool-result\") {\n                pendingDeferredToolCalls.delete(part.toolCallId);\n              }\n            }\n            const stepContent = asContent({\n              content: currentModelResponse.content,\n              toolCalls: stepToolCalls,\n              toolOutputs: clientToolOutputs,\n              toolApprovalRequests: Object.values(toolApprovalRequests),\n              tools\n            });\n            responseMessages.push(\n              ...await toResponseMessages({\n                content: stepContent,\n                tools\n              })\n            );\n            const stepRequest = ((_g = include == null ? void 0 : include.requestBody) != null ? _g : true) ? (_h = currentModelResponse.request) != null ? _h : {} : { ...currentModelResponse.request, body: void 0 };\n            const stepResponse = {\n              ...currentModelResponse.response,\n              // deep clone msgs to avoid mutating past messages in multi-step:\n              messages: structuredClone(responseMessages),\n              // Conditionally include response body:\n              body: ((_i = include == null ? void 0 : include.responseBody) != null ? _i : true) ? (_j = currentModelResponse.response) == null ? void 0 : _j.body : void 0\n            };\n            const currentStepResult = new DefaultStepResult({\n              content: stepContent,\n              finishReason: currentModelResponse.finishReason.unified,\n              rawFinishReason: currentModelResponse.finishReason.raw,\n              usage: asLanguageModelUsage(currentModelResponse.usage),\n              warnings: currentModelResponse.warnings,\n              providerMetadata: currentModelResponse.providerMetadata,\n              request: stepRequest,\n              response: stepResponse\n            });\n            logWarnings({\n              warnings: (_k = currentModelResponse.warnings) != null ? _k : [],\n              provider: stepModel.provider,\n              model: stepModel.modelId\n            });\n            steps.push(currentStepResult);\n            await (onStepFinish == null ? void 0 : onStepFinish(currentStepResult));\n          } finally {\n            if (stepTimeoutId != null) {\n              clearTimeout(stepTimeoutId);\n            }\n          }\n        } while (\n          // Continue if:\n          // 1. There are client tool calls that have all been executed, OR\n          // 2. There are pending deferred results from provider-executed tools\n          (clientToolCalls.length > 0 && clientToolOutputs.length === clientToolCalls.length || pendingDeferredToolCalls.size > 0) && // continue until a stop condition is met:\n          !await isStopConditionMet({ stopConditions, steps })\n        );\n        span.setAttributes(\n          await selectTelemetryAttributes({\n            telemetry,\n            attributes: {\n              \"ai.response.finishReason\": currentModelResponse.finishReason.unified,\n              \"ai.response.text\": {\n                output: () => extractTextContent(currentModelResponse.content)\n              },\n              \"ai.response.toolCalls\": {\n                output: () => {\n                  const toolCalls = asToolCalls(currentModelResponse.content);\n                  return toolCalls == null ? void 0 : JSON.stringify(toolCalls);\n                }\n              },\n              \"ai.response.providerMetadata\": JSON.stringify(\n                currentModelResponse.providerMetadata\n              ),\n              // TODO rename telemetry attributes to inputTokens and outputTokens\n              \"ai.usage.promptTokens\": currentModelResponse.usage.inputTokens.total,\n              \"ai.usage.completionTokens\": currentModelResponse.usage.outputTokens.total\n            }\n          })\n        );\n        const lastStep = steps[steps.length - 1];\n        const totalUsage = steps.reduce(\n          (totalUsage2, step) => {\n            return addLanguageModelUsage(totalUsage2, step.usage);\n          },\n          {\n            inputTokens: void 0,\n            outputTokens: void 0,\n            totalTokens: void 0,\n            reasoningTokens: void 0,\n            cachedInputTokens: void 0\n          }\n        );\n        await (onFinish == null ? void 0 : onFinish({\n          finishReason: lastStep.finishReason,\n          rawFinishReason: lastStep.rawFinishReason,\n          usage: lastStep.usage,\n          content: lastStep.content,\n          text: lastStep.text,\n          reasoningText: lastStep.reasoningText,\n          reasoning: lastStep.reasoning,\n          files: lastStep.files,\n          sources: lastStep.sources,\n          toolCalls: lastStep.toolCalls,\n          staticToolCalls: lastStep.staticToolCalls,\n          dynamicToolCalls: lastStep.dynamicToolCalls,\n          toolResults: lastStep.toolResults,\n          staticToolResults: lastStep.staticToolResults,\n          dynamicToolResults: lastStep.dynamicToolResults,\n          request: lastStep.request,\n          response: lastStep.response,\n          warnings: lastStep.warnings,\n          providerMetadata: lastStep.providerMetadata,\n          steps,\n          totalUsage,\n          experimental_context\n        }));\n        let resolvedOutput;\n        if (lastStep.finishReason === \"stop\") {\n          const outputSpecification = output != null ? output : text();\n          resolvedOutput = await outputSpecification.parseCompleteOutput(\n            { text: lastStep.text },\n            {\n              response: lastStep.response,\n              usage: lastStep.usage,\n              finishReason: lastStep.finishReason\n            }\n          );\n        }\n        return new DefaultGenerateTextResult({\n          steps,\n          totalUsage,\n          output: resolvedOutput\n        });\n      }\n    });\n  } catch (error) {\n    throw wrapGatewayError(error);\n  }\n}\nasync function executeTools({\n  toolCalls,\n  tools,\n  tracer,\n  telemetry,\n  messages,\n  abortSignal,\n  experimental_context\n}) {\n  const toolOutputs = await Promise.all(\n    toolCalls.map(\n      async (toolCall) => executeToolCall({\n        toolCall,\n        tools,\n        tracer,\n        telemetry,\n        messages,\n        abortSignal,\n        experimental_context\n      })\n    )\n  );\n  return toolOutputs.filter(\n    (output) => output != null\n  );\n}\nvar DefaultGenerateTextResult = class {\n  constructor(options) {\n    this.steps = options.steps;\n    this._output = options.output;\n    this.totalUsage = options.totalUsage;\n  }\n  get finalStep() {\n    return this.steps[this.steps.length - 1];\n  }\n  get content() {\n    return this.finalStep.content;\n  }\n  get text() {\n    return this.finalStep.text;\n  }\n  get files() {\n    return this.finalStep.files;\n  }\n  get reasoningText() {\n    return this.finalStep.reasoningText;\n  }\n  get reasoning() {\n    return this.finalStep.reasoning;\n  }\n  get toolCalls() {\n    return this.finalStep.toolCalls;\n  }\n  get staticToolCalls() {\n    return this.finalStep.staticToolCalls;\n  }\n  get dynamicToolCalls() {\n    return this.finalStep.dynamicToolCalls;\n  }\n  get toolResults() {\n    return this.finalStep.toolResults;\n  }\n  get staticToolResults() {\n    return this.finalStep.staticToolResults;\n  }\n  get dynamicToolResults() {\n    return this.finalStep.dynamicToolResults;\n  }\n  get sources() {\n    return this.finalStep.sources;\n  }\n  get finishReason() {\n    return this.finalStep.finishReason;\n  }\n  get rawFinishReason() {\n    return this.finalStep.rawFinishReason;\n  }\n  get warnings() {\n    return this.finalStep.warnings;\n  }\n  get providerMetadata() {\n    return this.finalStep.providerMetadata;\n  }\n  get response() {\n    return this.finalStep.response;\n  }\n  get request() {\n    return this.finalStep.request;\n  }\n  get usage() {\n    return this.finalStep.usage;\n  }\n  get experimental_output() {\n    return this.output;\n  }\n  get output() {\n    if (this._output == null) {\n      throw new NoOutputGeneratedError();\n    }\n    return this._output;\n  }\n};\nfunction asToolCalls(content) {\n  const parts = content.filter(\n    (part) => part.type === \"tool-call\"\n  );\n  if (parts.length === 0) {\n    return void 0;\n  }\n  return parts.map((toolCall) => ({\n    toolCallId: toolCall.toolCallId,\n    toolName: toolCall.toolName,\n    input: toolCall.input\n  }));\n}\nfunction asContent({\n  content,\n  toolCalls,\n  toolOutputs,\n  toolApprovalRequests,\n  tools\n}) {\n  const contentParts = [];\n  for (const part of content) {\n    switch (part.type) {\n      case \"text\":\n      case \"reasoning\":\n      case \"source\":\n        contentParts.push(part);\n        break;\n      case \"file\": {\n        contentParts.push({\n          type: \"file\",\n          file: new DefaultGeneratedFile(part),\n          ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n        });\n        break;\n      }\n      case \"tool-call\": {\n        contentParts.push(\n          toolCalls.find((toolCall) => toolCall.toolCallId === part.toolCallId)\n        );\n        break;\n      }\n      case \"tool-result\": {\n        const toolCall = toolCalls.find(\n          (toolCall2) => toolCall2.toolCallId === part.toolCallId\n        );\n        if (toolCall == null) {\n          const tool2 = tools == null ? void 0 : tools[part.toolName];\n          const supportsDeferredResults = (tool2 == null ? void 0 : tool2.type) === \"provider\" && tool2.supportsDeferredResults;\n          if (!supportsDeferredResults) {\n            throw new Error(`Tool call ${part.toolCallId} not found.`);\n          }\n          if (part.isError) {\n            contentParts.push({\n              type: \"tool-error\",\n              toolCallId: part.toolCallId,\n              toolName: part.toolName,\n              input: void 0,\n              error: part.result,\n              providerExecuted: true,\n              dynamic: part.dynamic\n            });\n          } else {\n            contentParts.push({\n              type: \"tool-result\",\n              toolCallId: part.toolCallId,\n              toolName: part.toolName,\n              input: void 0,\n              output: part.result,\n              providerExecuted: true,\n              dynamic: part.dynamic\n            });\n          }\n          break;\n        }\n        if (part.isError) {\n          contentParts.push({\n            type: \"tool-error\",\n            toolCallId: part.toolCallId,\n            toolName: part.toolName,\n            input: toolCall.input,\n            error: part.result,\n            providerExecuted: true,\n            dynamic: toolCall.dynamic\n          });\n        } else {\n          contentParts.push({\n            type: \"tool-result\",\n            toolCallId: part.toolCallId,\n            toolName: part.toolName,\n            input: toolCall.input,\n            output: part.result,\n            providerExecuted: true,\n            dynamic: toolCall.dynamic\n          });\n        }\n        break;\n      }\n      case \"tool-approval-request\": {\n        const toolCall = toolCalls.find(\n          (toolCall2) => toolCall2.toolCallId === part.toolCallId\n        );\n        if (toolCall == null) {\n          throw new ToolCallNotFoundForApprovalError({\n            toolCallId: part.toolCallId,\n            approvalId: part.approvalId\n          });\n        }\n        contentParts.push({\n          type: \"tool-approval-request\",\n          approvalId: part.approvalId,\n          toolCall\n        });\n        break;\n      }\n    }\n  }\n  return [...contentParts, ...toolOutputs, ...toolApprovalRequests];\n}\n\n// src/generate-text/stream-text.ts\nimport {\n  getErrorMessage as getErrorMessage7,\n  UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nimport {\n  createIdGenerator as createIdGenerator2,\n  DelayedPromise,\n  isAbortError as isAbortError2\n} from \"@ai-sdk/provider-utils\";\n\n// src/util/prepare-headers.ts\nfunction prepareHeaders(headers, defaultHeaders) {\n  const responseHeaders = new Headers(headers != null ? headers : {});\n  for (const [key, value] of Object.entries(defaultHeaders)) {\n    if (!responseHeaders.has(key)) {\n      responseHeaders.set(key, value);\n    }\n  }\n  return responseHeaders;\n}\n\n// src/text-stream/create-text-stream-response.ts\nfunction createTextStreamResponse({\n  status,\n  statusText,\n  headers,\n  textStream\n}) {\n  return new Response(textStream.pipeThrough(new TextEncoderStream()), {\n    status: status != null ? status : 200,\n    statusText,\n    headers: prepareHeaders(headers, {\n      \"content-type\": \"text/plain; charset=utf-8\"\n    })\n  });\n}\n\n// src/util/write-to-server-response.ts\nfunction writeToServerResponse({\n  response,\n  status,\n  statusText,\n  headers,\n  stream\n}) {\n  const statusCode = status != null ? status : 200;\n  if (statusText !== void 0) {\n    response.writeHead(statusCode, statusText, headers);\n  } else {\n    response.writeHead(statusCode, headers);\n  }\n  const reader = stream.getReader();\n  const read = async () => {\n    try {\n      while (true) {\n        const { done, value } = await reader.read();\n        if (done)\n          break;\n        const canContinue = response.write(value);\n        if (!canContinue) {\n          await new Promise((resolve3) => {\n            response.once(\"drain\", resolve3);\n          });\n        }\n      }\n    } catch (error) {\n      throw error;\n    } finally {\n      response.end();\n    }\n  };\n  read();\n}\n\n// src/text-stream/pipe-text-stream-to-response.ts\nfunction pipeTextStreamToResponse({\n  response,\n  status,\n  statusText,\n  headers,\n  textStream\n}) {\n  writeToServerResponse({\n    response,\n    status,\n    statusText,\n    headers: Object.fromEntries(\n      prepareHeaders(headers, {\n        \"content-type\": \"text/plain; charset=utf-8\"\n      }).entries()\n    ),\n    stream: textStream.pipeThrough(new TextEncoderStream())\n  });\n}\n\n// src/ui-message-stream/json-to-sse-transform-stream.ts\nvar JsonToSseTransformStream = class extends TransformStream {\n  constructor() {\n    super({\n      transform(part, controller) {\n        controller.enqueue(`data: ${JSON.stringify(part)}\n\n`);\n      },\n      flush(controller) {\n        controller.enqueue(\"data: [DONE]\\n\\n\");\n      }\n    });\n  }\n};\n\n// src/ui-message-stream/ui-message-stream-headers.ts\nvar UI_MESSAGE_STREAM_HEADERS = {\n  \"content-type\": \"text/event-stream\",\n  \"cache-control\": \"no-cache\",\n  connection: \"keep-alive\",\n  \"x-vercel-ai-ui-message-stream\": \"v1\",\n  \"x-accel-buffering\": \"no\"\n  // disable nginx buffering\n};\n\n// src/ui-message-stream/create-ui-message-stream-response.ts\nfunction createUIMessageStreamResponse({\n  status,\n  statusText,\n  headers,\n  stream,\n  consumeSseStream\n}) {\n  let sseStream = stream.pipeThrough(new JsonToSseTransformStream());\n  if (consumeSseStream) {\n    const [stream1, stream2] = sseStream.tee();\n    sseStream = stream1;\n    consumeSseStream({ stream: stream2 });\n  }\n  return new Response(sseStream.pipeThrough(new TextEncoderStream()), {\n    status,\n    statusText,\n    headers: prepareHeaders(headers, UI_MESSAGE_STREAM_HEADERS)\n  });\n}\n\n// src/ui-message-stream/get-response-ui-message-id.ts\nfunction getResponseUIMessageId({\n  originalMessages,\n  responseMessageId\n}) {\n  if (originalMessages == null) {\n    return void 0;\n  }\n  const lastMessage = originalMessages[originalMessages.length - 1];\n  return (lastMessage == null ? void 0 : lastMessage.role) === \"assistant\" ? lastMessage.id : typeof responseMessageId === \"function\" ? responseMessageId() : responseMessageId;\n}\n\n// src/ui/process-ui-message-stream.ts\nimport { validateTypes } from \"@ai-sdk/provider-utils\";\n\n// src/ui-message-stream/ui-message-chunks.ts\nimport { z as z7 } from \"zod/v4\";\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nvar uiMessageChunkSchema = lazySchema(\n  () => zodSchema(\n    z7.union([\n      z7.strictObject({\n        type: z7.literal(\"text-start\"),\n        id: z7.string(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"text-delta\"),\n        id: z7.string(),\n        delta: z7.string(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"text-end\"),\n        id: z7.string(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"error\"),\n        errorText: z7.string()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"tool-input-start\"),\n        toolCallId: z7.string(),\n        toolName: z7.string(),\n        providerExecuted: z7.boolean().optional(),\n        providerMetadata: providerMetadataSchema.optional(),\n        dynamic: z7.boolean().optional(),\n        title: z7.string().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"tool-input-delta\"),\n        toolCallId: z7.string(),\n        inputTextDelta: z7.string()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"tool-input-available\"),\n        toolCallId: z7.string(),\n        toolName: z7.string(),\n        input: z7.unknown(),\n        providerExecuted: z7.boolean().optional(),\n        providerMetadata: providerMetadataSchema.optional(),\n        dynamic: z7.boolean().optional(),\n        title: z7.string().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"tool-input-error\"),\n        toolCallId: z7.string(),\n        toolName: z7.string(),\n        input: z7.unknown(),\n        providerExecuted: z7.boolean().optional(),\n        providerMetadata: providerMetadataSchema.optional(),\n        dynamic: z7.boolean().optional(),\n        errorText: z7.string(),\n        title: z7.string().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"tool-approval-request\"),\n        approvalId: z7.string(),\n        toolCallId: z7.string()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"tool-output-available\"),\n        toolCallId: z7.string(),\n        output: z7.unknown(),\n        providerExecuted: z7.boolean().optional(),\n        dynamic: z7.boolean().optional(),\n        preliminary: z7.boolean().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"tool-output-error\"),\n        toolCallId: z7.string(),\n        errorText: z7.string(),\n        providerExecuted: z7.boolean().optional(),\n        dynamic: z7.boolean().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"tool-output-denied\"),\n        toolCallId: z7.string()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"reasoning-start\"),\n        id: z7.string(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"reasoning-delta\"),\n        id: z7.string(),\n        delta: z7.string(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"reasoning-end\"),\n        id: z7.string(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"source-url\"),\n        sourceId: z7.string(),\n        url: z7.string(),\n        title: z7.string().optional(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"source-document\"),\n        sourceId: z7.string(),\n        mediaType: z7.string(),\n        title: z7.string(),\n        filename: z7.string().optional(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"file\"),\n        url: z7.string(),\n        mediaType: z7.string(),\n        providerMetadata: providerMetadataSchema.optional()\n      }),\n      z7.strictObject({\n        type: z7.custom(\n          (value) => typeof value === \"string\" && value.startsWith(\"data-\"),\n          { message: 'Type must start with \"data-\"' }\n        ),\n        id: z7.string().optional(),\n        data: z7.unknown(),\n        transient: z7.boolean().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"start-step\")\n      }),\n      z7.strictObject({\n        type: z7.literal(\"finish-step\")\n      }),\n      z7.strictObject({\n        type: z7.literal(\"start\"),\n        messageId: z7.string().optional(),\n        messageMetadata: z7.unknown().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"finish\"),\n        finishReason: z7.enum([\n          \"stop\",\n          \"length\",\n          \"content-filter\",\n          \"tool-calls\",\n          \"error\",\n          \"other\"\n        ]).optional(),\n        messageMetadata: z7.unknown().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"abort\"),\n        reason: z7.string().optional()\n      }),\n      z7.strictObject({\n        type: z7.literal(\"message-metadata\"),\n        messageMetadata: z7.unknown()\n      })\n    ])\n  )\n);\nfunction isDataUIMessageChunk(chunk) {\n  return chunk.type.startsWith(\"data-\");\n}\n\n// src/ui/ui-messages.ts\nfunction isDataUIPart(part) {\n  return part.type.startsWith(\"data-\");\n}\nfunction isTextUIPart(part) {\n  return part.type === \"text\";\n}\nfunction isFileUIPart(part) {\n  return part.type === \"file\";\n}\nfunction isReasoningUIPart(part) {\n  return part.type === \"reasoning\";\n}\nfunction isStaticToolUIPart(part) {\n  return part.type.startsWith(\"tool-\");\n}\nfunction isDynamicToolUIPart(part) {\n  return part.type === \"dynamic-tool\";\n}\nfunction isToolUIPart(part) {\n  return isStaticToolUIPart(part) || isDynamicToolUIPart(part);\n}\nvar isToolOrDynamicToolUIPart = isToolUIPart;\nfunction getStaticToolName(part) {\n  return part.type.split(\"-\").slice(1).join(\"-\");\n}\nfunction getToolName(part) {\n  return isDynamicToolUIPart(part) ? part.toolName : getStaticToolName(part);\n}\nvar getToolOrDynamicToolName = getToolName;\n\n// src/ui/process-ui-message-stream.ts\nfunction createStreamingUIMessageState({\n  lastMessage,\n  messageId\n}) {\n  return {\n    message: (lastMessage == null ? void 0 : lastMessage.role) === \"assistant\" ? lastMessage : {\n      id: messageId,\n      metadata: void 0,\n      role: \"assistant\",\n      parts: []\n    },\n    activeTextParts: {},\n    activeReasoningParts: {},\n    partialToolCalls: {}\n  };\n}\nfunction processUIMessageStream({\n  stream,\n  messageMetadataSchema,\n  dataPartSchemas,\n  runUpdateMessageJob,\n  onError,\n  onToolCall,\n  onData\n}) {\n  return stream.pipeThrough(\n    new TransformStream({\n      async transform(chunk, controller) {\n        await runUpdateMessageJob(async ({ state, write }) => {\n          var _a20, _b, _c, _d;\n          function getToolInvocation(toolCallId) {\n            const toolInvocations = state.message.parts.filter(isToolUIPart);\n            const toolInvocation = toolInvocations.find(\n              (invocation) => invocation.toolCallId === toolCallId\n            );\n            if (toolInvocation == null) {\n              throw new UIMessageStreamError({\n                chunkType: \"tool-invocation\",\n                chunkId: toolCallId,\n                message: `No tool invocation found for tool call ID \"${toolCallId}\".`\n              });\n            }\n            return toolInvocation;\n          }\n          function updateToolPart(options) {\n            var _a21;\n            const part = state.message.parts.find(\n              (part2) => isStaticToolUIPart(part2) && part2.toolCallId === options.toolCallId\n            );\n            const anyOptions = options;\n            const anyPart = part;\n            if (part != null) {\n              part.state = options.state;\n              anyPart.input = anyOptions.input;\n              anyPart.output = anyOptions.output;\n              anyPart.errorText = anyOptions.errorText;\n              anyPart.rawInput = anyOptions.rawInput;\n              anyPart.preliminary = anyOptions.preliminary;\n              if (options.title !== void 0) {\n                anyPart.title = options.title;\n              }\n              anyPart.providerExecuted = (_a21 = anyOptions.providerExecuted) != null ? _a21 : part.providerExecuted;\n              if (anyOptions.providerMetadata != null) {\n                part.callProviderMetadata = anyOptions.providerMetadata;\n              }\n            } else {\n              state.message.parts.push({\n                type: `tool-${options.toolName}`,\n                toolCallId: options.toolCallId,\n                state: options.state,\n                title: options.title,\n                input: anyOptions.input,\n                output: anyOptions.output,\n                rawInput: anyOptions.rawInput,\n                errorText: anyOptions.errorText,\n                providerExecuted: anyOptions.providerExecuted,\n                preliminary: anyOptions.preliminary,\n                ...anyOptions.providerMetadata != null ? { callProviderMetadata: anyOptions.providerMetadata } : {}\n              });\n            }\n          }\n          function updateDynamicToolPart(options) {\n            var _a21, _b2;\n            const part = state.message.parts.find(\n              (part2) => part2.type === \"dynamic-tool\" && part2.toolCallId === options.toolCallId\n            );\n            const anyOptions = options;\n            const anyPart = part;\n            if (part != null) {\n              part.state = options.state;\n              anyPart.toolName = options.toolName;\n              anyPart.input = anyOptions.input;\n              anyPart.output = anyOptions.output;\n              anyPart.errorText = anyOptions.errorText;\n              anyPart.rawInput = (_a21 = anyOptions.rawInput) != null ? _a21 : anyPart.rawInput;\n              anyPart.preliminary = anyOptions.preliminary;\n              if (options.title !== void 0) {\n                anyPart.title = options.title;\n              }\n              anyPart.providerExecuted = (_b2 = anyOptions.providerExecuted) != null ? _b2 : part.providerExecuted;\n              if (anyOptions.providerMetadata != null) {\n                part.callProviderMetadata = anyOptions.providerMetadata;\n              }\n            } else {\n              state.message.parts.push({\n                type: \"dynamic-tool\",\n                toolName: options.toolName,\n                toolCallId: options.toolCallId,\n                state: options.state,\n                input: anyOptions.input,\n                output: anyOptions.output,\n                errorText: anyOptions.errorText,\n                preliminary: anyOptions.preliminary,\n                providerExecuted: anyOptions.providerExecuted,\n                title: options.title,\n                ...anyOptions.providerMetadata != null ? { callProviderMetadata: anyOptions.providerMetadata } : {}\n              });\n            }\n          }\n          async function updateMessageMetadata(metadata) {\n            if (metadata != null) {\n              const mergedMetadata = state.message.metadata != null ? mergeObjects(state.message.metadata, metadata) : metadata;\n              if (messageMetadataSchema != null) {\n                await validateTypes({\n                  value: mergedMetadata,\n                  schema: messageMetadataSchema,\n                  context: {\n                    field: \"message.metadata\",\n                    entityId: state.message.id\n                  }\n                });\n              }\n              state.message.metadata = mergedMetadata;\n            }\n          }\n          switch (chunk.type) {\n            case \"text-start\": {\n              const textPart = {\n                type: \"text\",\n                text: \"\",\n                providerMetadata: chunk.providerMetadata,\n                state: \"streaming\"\n              };\n              state.activeTextParts[chunk.id] = textPart;\n              state.message.parts.push(textPart);\n              write();\n              break;\n            }\n            case \"text-delta\": {\n              const textPart = state.activeTextParts[chunk.id];\n              if (textPart == null) {\n                throw new UIMessageStreamError({\n                  chunkType: \"text-delta\",\n                  chunkId: chunk.id,\n                  message: `Received text-delta for missing text part with ID \"${chunk.id}\". Ensure a \"text-start\" chunk is sent before any \"text-delta\" chunks.`\n                });\n              }\n              textPart.text += chunk.delta;\n              textPart.providerMetadata = (_a20 = chunk.providerMetadata) != null ? _a20 : textPart.providerMetadata;\n              write();\n              break;\n            }\n            case \"text-end\": {\n              const textPart = state.activeTextParts[chunk.id];\n              if (textPart == null) {\n                throw new UIMessageStreamError({\n                  chunkType: \"text-end\",\n                  chunkId: chunk.id,\n                  message: `Received text-end for missing text part with ID \"${chunk.id}\". Ensure a \"text-start\" chunk is sent before any \"text-end\" chunks.`\n                });\n              }\n              textPart.state = \"done\";\n              textPart.providerMetadata = (_b = chunk.providerMetadata) != null ? _b : textPart.providerMetadata;\n              delete state.activeTextParts[chunk.id];\n              write();\n              break;\n            }\n            case \"reasoning-start\": {\n              const reasoningPart = {\n                type: \"reasoning\",\n                text: \"\",\n                providerMetadata: chunk.providerMetadata,\n                state: \"streaming\"\n              };\n              state.activeReasoningParts[chunk.id] = reasoningPart;\n              state.message.parts.push(reasoningPart);\n              write();\n              break;\n            }\n            case \"reasoning-delta\": {\n              const reasoningPart = state.activeReasoningParts[chunk.id];\n              if (reasoningPart == null) {\n                throw new UIMessageStreamError({\n                  chunkType: \"reasoning-delta\",\n                  chunkId: chunk.id,\n                  message: `Received reasoning-delta for missing reasoning part with ID \"${chunk.id}\". Ensure a \"reasoning-start\" chunk is sent before any \"reasoning-delta\" chunks.`\n                });\n              }\n              reasoningPart.text += chunk.delta;\n              reasoningPart.providerMetadata = (_c = chunk.providerMetadata) != null ? _c : reasoningPart.providerMetadata;\n              write();\n              break;\n            }\n            case \"reasoning-end\": {\n              const reasoningPart = state.activeReasoningParts[chunk.id];\n              if (reasoningPart == null) {\n                throw new UIMessageStreamError({\n                  chunkType: \"reasoning-end\",\n                  chunkId: chunk.id,\n                  message: `Received reasoning-end for missing reasoning part with ID \"${chunk.id}\". Ensure a \"reasoning-start\" chunk is sent before any \"reasoning-end\" chunks.`\n                });\n              }\n              reasoningPart.providerMetadata = (_d = chunk.providerMetadata) != null ? _d : reasoningPart.providerMetadata;\n              reasoningPart.state = \"done\";\n              delete state.activeReasoningParts[chunk.id];\n              write();\n              break;\n            }\n            case \"file\": {\n              state.message.parts.push({\n                type: \"file\",\n                mediaType: chunk.mediaType,\n                url: chunk.url\n              });\n              write();\n              break;\n            }\n            case \"source-url\": {\n              state.message.parts.push({\n                type: \"source-url\",\n                sourceId: chunk.sourceId,\n                url: chunk.url,\n                title: chunk.title,\n                providerMetadata: chunk.providerMetadata\n              });\n              write();\n              break;\n            }\n            case \"source-document\": {\n              state.message.parts.push({\n                type: \"source-document\",\n                sourceId: chunk.sourceId,\n                mediaType: chunk.mediaType,\n                title: chunk.title,\n                filename: chunk.filename,\n                providerMetadata: chunk.providerMetadata\n              });\n              write();\n              break;\n            }\n            case \"tool-input-start\": {\n              const toolInvocations = state.message.parts.filter(isStaticToolUIPart);\n              state.partialToolCalls[chunk.toolCallId] = {\n                text: \"\",\n                toolName: chunk.toolName,\n                index: toolInvocations.length,\n                dynamic: chunk.dynamic,\n                title: chunk.title\n              };\n              if (chunk.dynamic) {\n                updateDynamicToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: chunk.toolName,\n                  state: \"input-streaming\",\n                  input: void 0,\n                  providerExecuted: chunk.providerExecuted,\n                  title: chunk.title,\n                  providerMetadata: chunk.providerMetadata\n                });\n              } else {\n                updateToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: chunk.toolName,\n                  state: \"input-streaming\",\n                  input: void 0,\n                  providerExecuted: chunk.providerExecuted,\n                  title: chunk.title,\n                  providerMetadata: chunk.providerMetadata\n                });\n              }\n              write();\n              break;\n            }\n            case \"tool-input-delta\": {\n              const partialToolCall = state.partialToolCalls[chunk.toolCallId];\n              if (partialToolCall == null) {\n                throw new UIMessageStreamError({\n                  chunkType: \"tool-input-delta\",\n                  chunkId: chunk.toolCallId,\n                  message: `Received tool-input-delta for missing tool call with ID \"${chunk.toolCallId}\". Ensure a \"tool-input-start\" chunk is sent before any \"tool-input-delta\" chunks.`\n                });\n              }\n              partialToolCall.text += chunk.inputTextDelta;\n              const { value: partialArgs } = await parsePartialJson(\n                partialToolCall.text\n              );\n              if (partialToolCall.dynamic) {\n                updateDynamicToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: partialToolCall.toolName,\n                  state: \"input-streaming\",\n                  input: partialArgs,\n                  title: partialToolCall.title\n                });\n              } else {\n                updateToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: partialToolCall.toolName,\n                  state: \"input-streaming\",\n                  input: partialArgs,\n                  title: partialToolCall.title\n                });\n              }\n              write();\n              break;\n            }\n            case \"tool-input-available\": {\n              if (chunk.dynamic) {\n                updateDynamicToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: chunk.toolName,\n                  state: \"input-available\",\n                  input: chunk.input,\n                  providerExecuted: chunk.providerExecuted,\n                  providerMetadata: chunk.providerMetadata,\n                  title: chunk.title\n                });\n              } else {\n                updateToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: chunk.toolName,\n                  state: \"input-available\",\n                  input: chunk.input,\n                  providerExecuted: chunk.providerExecuted,\n                  providerMetadata: chunk.providerMetadata,\n                  title: chunk.title\n                });\n              }\n              write();\n              if (onToolCall && !chunk.providerExecuted) {\n                await onToolCall({\n                  toolCall: chunk\n                });\n              }\n              break;\n            }\n            case \"tool-input-error\": {\n              if (chunk.dynamic) {\n                updateDynamicToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: chunk.toolName,\n                  state: \"output-error\",\n                  input: chunk.input,\n                  errorText: chunk.errorText,\n                  providerExecuted: chunk.providerExecuted,\n                  providerMetadata: chunk.providerMetadata\n                });\n              } else {\n                updateToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: chunk.toolName,\n                  state: \"output-error\",\n                  input: void 0,\n                  rawInput: chunk.input,\n                  errorText: chunk.errorText,\n                  providerExecuted: chunk.providerExecuted,\n                  providerMetadata: chunk.providerMetadata\n                });\n              }\n              write();\n              break;\n            }\n            case \"tool-approval-request\": {\n              const toolInvocation = getToolInvocation(chunk.toolCallId);\n              toolInvocation.state = \"approval-requested\";\n              toolInvocation.approval = { id: chunk.approvalId };\n              write();\n              break;\n            }\n            case \"tool-output-denied\": {\n              const toolInvocation = getToolInvocation(chunk.toolCallId);\n              toolInvocation.state = \"output-denied\";\n              write();\n              break;\n            }\n            case \"tool-output-available\": {\n              const toolInvocation = getToolInvocation(chunk.toolCallId);\n              if (toolInvocation.type === \"dynamic-tool\") {\n                updateDynamicToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: toolInvocation.toolName,\n                  state: \"output-available\",\n                  input: toolInvocation.input,\n                  output: chunk.output,\n                  preliminary: chunk.preliminary,\n                  providerExecuted: chunk.providerExecuted,\n                  title: toolInvocation.title\n                });\n              } else {\n                updateToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: getStaticToolName(toolInvocation),\n                  state: \"output-available\",\n                  input: toolInvocation.input,\n                  output: chunk.output,\n                  providerExecuted: chunk.providerExecuted,\n                  preliminary: chunk.preliminary,\n                  title: toolInvocation.title\n                });\n              }\n              write();\n              break;\n            }\n            case \"tool-output-error\": {\n              const toolInvocation = getToolInvocation(chunk.toolCallId);\n              if (toolInvocation.type === \"dynamic-tool\") {\n                updateDynamicToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: toolInvocation.toolName,\n                  state: \"output-error\",\n                  input: toolInvocation.input,\n                  errorText: chunk.errorText,\n                  providerExecuted: chunk.providerExecuted,\n                  title: toolInvocation.title\n                });\n              } else {\n                updateToolPart({\n                  toolCallId: chunk.toolCallId,\n                  toolName: getStaticToolName(toolInvocation),\n                  state: \"output-error\",\n                  input: toolInvocation.input,\n                  rawInput: toolInvocation.rawInput,\n                  errorText: chunk.errorText,\n                  providerExecuted: chunk.providerExecuted,\n                  title: toolInvocation.title\n                });\n              }\n              write();\n              break;\n            }\n            case \"start-step\": {\n              state.message.parts.push({ type: \"step-start\" });\n              break;\n            }\n            case \"finish-step\": {\n              state.activeTextParts = {};\n              state.activeReasoningParts = {};\n              break;\n            }\n            case \"start\": {\n              if (chunk.messageId != null) {\n                state.message.id = chunk.messageId;\n              }\n              await updateMessageMetadata(chunk.messageMetadata);\n              if (chunk.messageId != null || chunk.messageMetadata != null) {\n                write();\n              }\n              break;\n            }\n            case \"finish\": {\n              if (chunk.finishReason != null) {\n                state.finishReason = chunk.finishReason;\n              }\n              await updateMessageMetadata(chunk.messageMetadata);\n              if (chunk.messageMetadata != null) {\n                write();\n              }\n              break;\n            }\n            case \"message-metadata\": {\n              await updateMessageMetadata(chunk.messageMetadata);\n              if (chunk.messageMetadata != null) {\n                write();\n              }\n              break;\n            }\n            case \"error\": {\n              onError == null ? void 0 : onError(new Error(chunk.errorText));\n              break;\n            }\n            default: {\n              if (isDataUIMessageChunk(chunk)) {\n                if ((dataPartSchemas == null ? void 0 : dataPartSchemas[chunk.type]) != null) {\n                  const partIdx = state.message.parts.findIndex(\n                    (p) => \"id\" in p && \"data\" in p && p.id === chunk.id && p.type === chunk.type\n                  );\n                  const actualPartIdx = partIdx >= 0 ? partIdx : state.message.parts.length;\n                  await validateTypes({\n                    value: chunk.data,\n                    schema: dataPartSchemas[chunk.type],\n                    context: {\n                      field: `message.parts[${actualPartIdx}].data`,\n                      entityName: chunk.type,\n                      entityId: chunk.id\n                    }\n                  });\n                }\n                const dataChunk = chunk;\n                if (dataChunk.transient) {\n                  onData == null ? void 0 : onData(dataChunk);\n                  break;\n                }\n                const existingUIPart = dataChunk.id != null ? state.message.parts.find(\n                  (chunkArg) => dataChunk.type === chunkArg.type && dataChunk.id === chunkArg.id\n                ) : void 0;\n                if (existingUIPart != null) {\n                  existingUIPart.data = dataChunk.data;\n                } else {\n                  state.message.parts.push(dataChunk);\n                }\n                onData == null ? void 0 : onData(dataChunk);\n                write();\n              }\n            }\n          }\n          controller.enqueue(chunk);\n        });\n      }\n    })\n  );\n}\n\n// src/ui-message-stream/handle-ui-message-stream-finish.ts\nfunction handleUIMessageStreamFinish({\n  messageId,\n  originalMessages = [],\n  onFinish,\n  onError,\n  stream\n}) {\n  let lastMessage = originalMessages == null ? void 0 : originalMessages[originalMessages.length - 1];\n  if ((lastMessage == null ? void 0 : lastMessage.role) !== \"assistant\") {\n    lastMessage = void 0;\n  } else {\n    messageId = lastMessage.id;\n  }\n  let isAborted = false;\n  const idInjectedStream = stream.pipeThrough(\n    new TransformStream({\n      transform(chunk, controller) {\n        if (chunk.type === \"start\") {\n          const startChunk = chunk;\n          if (startChunk.messageId == null && messageId != null) {\n            startChunk.messageId = messageId;\n          }\n        }\n        if (chunk.type === \"abort\") {\n          isAborted = true;\n        }\n        controller.enqueue(chunk);\n      }\n    })\n  );\n  if (onFinish == null) {\n    return idInjectedStream;\n  }\n  const state = createStreamingUIMessageState({\n    lastMessage: lastMessage ? structuredClone(lastMessage) : void 0,\n    messageId: messageId != null ? messageId : \"\"\n    // will be overridden by the stream\n  });\n  const runUpdateMessageJob = async (job) => {\n    await job({ state, write: () => {\n    } });\n  };\n  let finishCalled = false;\n  const callOnFinish = async () => {\n    if (finishCalled || !onFinish) {\n      return;\n    }\n    finishCalled = true;\n    const isContinuation = state.message.id === (lastMessage == null ? void 0 : lastMessage.id);\n    await onFinish({\n      isAborted,\n      isContinuation,\n      responseMessage: state.message,\n      messages: [\n        ...isContinuation ? originalMessages.slice(0, -1) : originalMessages,\n        state.message\n      ],\n      finishReason: state.finishReason\n    });\n  };\n  return processUIMessageStream({\n    stream: idInjectedStream,\n    runUpdateMessageJob,\n    onError\n  }).pipeThrough(\n    new TransformStream({\n      transform(chunk, controller) {\n        controller.enqueue(chunk);\n      },\n      // @ts-expect-error cancel is still new and missing from types https://developer.mozilla.org/en-US/docs/Web/API/TransformStream#browser_compatibility\n      async cancel() {\n        await callOnFinish();\n      },\n      async flush() {\n        await callOnFinish();\n      }\n    })\n  );\n}\n\n// src/ui-message-stream/pipe-ui-message-stream-to-response.ts\nfunction pipeUIMessageStreamToResponse({\n  response,\n  status,\n  statusText,\n  headers,\n  stream,\n  consumeSseStream\n}) {\n  let sseStream = stream.pipeThrough(new JsonToSseTransformStream());\n  if (consumeSseStream) {\n    const [stream1, stream2] = sseStream.tee();\n    sseStream = stream1;\n    consumeSseStream({ stream: stream2 });\n  }\n  writeToServerResponse({\n    response,\n    status,\n    statusText,\n    headers: Object.fromEntries(\n      prepareHeaders(headers, UI_MESSAGE_STREAM_HEADERS).entries()\n    ),\n    stream: sseStream.pipeThrough(new TextEncoderStream())\n  });\n}\n\n// src/util/async-iterable-stream.ts\nfunction createAsyncIterableStream(source) {\n  const stream = source.pipeThrough(new TransformStream());\n  stream[Symbol.asyncIterator] = function() {\n    const reader = this.getReader();\n    let finished = false;\n    async function cleanup(cancelStream) {\n      var _a20;\n      if (finished)\n        return;\n      finished = true;\n      try {\n        if (cancelStream) {\n          await ((_a20 = reader.cancel) == null ? void 0 : _a20.call(reader));\n        }\n      } finally {\n        try {\n          reader.releaseLock();\n        } catch (e) {\n        }\n      }\n    }\n    return {\n      /**\n       * Reads the next chunk from the stream.\n       * @returns A promise resolving to the next IteratorResult.\n       */\n      async next() {\n        if (finished) {\n          return { done: true, value: void 0 };\n        }\n        const { done, value } = await reader.read();\n        if (done) {\n          await cleanup(true);\n          return { done: true, value: void 0 };\n        }\n        return { done: false, value };\n      },\n      /**\n       * May be called on early exit (e.g., break from for-await) or after completion.\n       * Ensures the stream is cancelled and resources are released.\n       * @returns A promise resolving to a completed IteratorResult.\n       */\n      async return() {\n        await cleanup(true);\n        return { done: true, value: void 0 };\n      },\n      /**\n       * Called on early exit with error.\n       * Ensures the stream is cancelled and resources are released, then rethrows the error.\n       * @param err The error to throw.\n       * @returns A promise that rejects with the provided error.\n       */\n      async throw(err) {\n        await cleanup(true);\n        throw err;\n      }\n    };\n  };\n  return stream;\n}\n\n// src/util/consume-stream.ts\nasync function consumeStream({\n  stream,\n  onError\n}) {\n  const reader = stream.getReader();\n  try {\n    while (true) {\n      const { done } = await reader.read();\n      if (done)\n        break;\n    }\n  } catch (error) {\n    onError == null ? void 0 : onError(error);\n  } finally {\n    reader.releaseLock();\n  }\n}\n\n// src/util/create-resolvable-promise.ts\nfunction createResolvablePromise() {\n  let resolve3;\n  let reject;\n  const promise = new Promise((res, rej) => {\n    resolve3 = res;\n    reject = rej;\n  });\n  return {\n    promise,\n    resolve: resolve3,\n    reject\n  };\n}\n\n// src/util/create-stitchable-stream.ts\nfunction createStitchableStream() {\n  let innerStreamReaders = [];\n  let controller = null;\n  let isClosed = false;\n  let waitForNewStream = createResolvablePromise();\n  const terminate = () => {\n    isClosed = true;\n    waitForNewStream.resolve();\n    innerStreamReaders.forEach((reader) => reader.cancel());\n    innerStreamReaders = [];\n    controller == null ? void 0 : controller.close();\n  };\n  const processPull = async () => {\n    if (isClosed && innerStreamReaders.length === 0) {\n      controller == null ? void 0 : controller.close();\n      return;\n    }\n    if (innerStreamReaders.length === 0) {\n      waitForNewStream = createResolvablePromise();\n      await waitForNewStream.promise;\n      return processPull();\n    }\n    try {\n      const { value, done } = await innerStreamReaders[0].read();\n      if (done) {\n        innerStreamReaders.shift();\n        if (innerStreamReaders.length === 0 && isClosed) {\n          controller == null ? void 0 : controller.close();\n        } else {\n          await processPull();\n        }\n      } else {\n        controller == null ? void 0 : controller.enqueue(value);\n      }\n    } catch (error) {\n      controller == null ? void 0 : controller.error(error);\n      innerStreamReaders.shift();\n      terminate();\n    }\n  };\n  return {\n    stream: new ReadableStream({\n      start(controllerParam) {\n        controller = controllerParam;\n      },\n      pull: processPull,\n      async cancel() {\n        for (const reader of innerStreamReaders) {\n          await reader.cancel();\n        }\n        innerStreamReaders = [];\n        isClosed = true;\n      }\n    }),\n    addStream: (innerStream) => {\n      if (isClosed) {\n        throw new Error(\"Cannot add inner stream: outer stream is closed\");\n      }\n      innerStreamReaders.push(innerStream.getReader());\n      waitForNewStream.resolve();\n    },\n    /**\n     * Gracefully close the outer stream. This will let the inner streams\n     * finish processing and then close the outer stream.\n     */\n    close: () => {\n      isClosed = true;\n      waitForNewStream.resolve();\n      if (innerStreamReaders.length === 0) {\n        controller == null ? void 0 : controller.close();\n      }\n    },\n    /**\n     * Immediately close the outer stream. This will cancel all inner streams\n     * and close the outer stream.\n     */\n    terminate\n  };\n}\n\n// src/util/now.ts\nfunction now() {\n  var _a20, _b;\n  return (_b = (_a20 = globalThis == null ? void 0 : globalThis.performance) == null ? void 0 : _a20.now()) != null ? _b : Date.now();\n}\n\n// src/generate-text/run-tools-transformation.ts\nimport {\n  getErrorMessage as getErrorMessage6\n} from \"@ai-sdk/provider-utils\";\nfunction runToolsTransformation({\n  tools,\n  generatorStream,\n  tracer,\n  telemetry,\n  system,\n  messages,\n  abortSignal,\n  repairToolCall,\n  experimental_context,\n  generateId: generateId2\n}) {\n  let toolResultsStreamController = null;\n  const toolResultsStream = new ReadableStream({\n    start(controller) {\n      toolResultsStreamController = controller;\n    }\n  });\n  const outstandingToolResults = /* @__PURE__ */ new Set();\n  const toolInputs = /* @__PURE__ */ new Map();\n  const toolCallsByToolCallId = /* @__PURE__ */ new Map();\n  let canClose = false;\n  let finishChunk = void 0;\n  function attemptClose() {\n    if (canClose && outstandingToolResults.size === 0) {\n      if (finishChunk != null) {\n        toolResultsStreamController.enqueue(finishChunk);\n      }\n      toolResultsStreamController.close();\n    }\n  }\n  const forwardStream = new TransformStream({\n    async transform(chunk, controller) {\n      const chunkType = chunk.type;\n      switch (chunkType) {\n        case \"stream-start\":\n        case \"text-start\":\n        case \"text-delta\":\n        case \"text-end\":\n        case \"reasoning-start\":\n        case \"reasoning-delta\":\n        case \"reasoning-end\":\n        case \"tool-input-start\":\n        case \"tool-input-delta\":\n        case \"tool-input-end\":\n        case \"source\":\n        case \"response-metadata\":\n        case \"error\":\n        case \"raw\": {\n          controller.enqueue(chunk);\n          break;\n        }\n        case \"file\": {\n          controller.enqueue({\n            type: \"file\",\n            file: new DefaultGeneratedFileWithType({\n              data: chunk.data,\n              mediaType: chunk.mediaType\n            })\n          });\n          break;\n        }\n        case \"finish\": {\n          finishChunk = {\n            type: \"finish\",\n            finishReason: chunk.finishReason.unified,\n            rawFinishReason: chunk.finishReason.raw,\n            usage: asLanguageModelUsage(chunk.usage),\n            providerMetadata: chunk.providerMetadata\n          };\n          break;\n        }\n        case \"tool-approval-request\": {\n          const toolCall = toolCallsByToolCallId.get(chunk.toolCallId);\n          if (toolCall == null) {\n            toolResultsStreamController.enqueue({\n              type: \"error\",\n              error: new ToolCallNotFoundForApprovalError({\n                toolCallId: chunk.toolCallId,\n                approvalId: chunk.approvalId\n              })\n            });\n            break;\n          }\n          controller.enqueue({\n            type: \"tool-approval-request\",\n            approvalId: chunk.approvalId,\n            toolCall\n          });\n          break;\n        }\n        case \"tool-call\": {\n          try {\n            const toolCall = await parseToolCall({\n              toolCall: chunk,\n              tools,\n              repairToolCall,\n              system,\n              messages\n            });\n            toolCallsByToolCallId.set(toolCall.toolCallId, toolCall);\n            controller.enqueue(toolCall);\n            if (toolCall.invalid) {\n              toolResultsStreamController.enqueue({\n                type: \"tool-error\",\n                toolCallId: toolCall.toolCallId,\n                toolName: toolCall.toolName,\n                input: toolCall.input,\n                error: getErrorMessage6(toolCall.error),\n                dynamic: true,\n                title: toolCall.title\n              });\n              break;\n            }\n            const tool2 = tools == null ? void 0 : tools[toolCall.toolName];\n            if (tool2 == null) {\n              break;\n            }\n            if (tool2.onInputAvailable != null) {\n              await tool2.onInputAvailable({\n                input: toolCall.input,\n                toolCallId: toolCall.toolCallId,\n                messages,\n                abortSignal,\n                experimental_context\n              });\n            }\n            if (await isApprovalNeeded({\n              tool: tool2,\n              toolCall,\n              messages,\n              experimental_context\n            })) {\n              toolResultsStreamController.enqueue({\n                type: \"tool-approval-request\",\n                approvalId: generateId2(),\n                toolCall\n              });\n              break;\n            }\n            toolInputs.set(toolCall.toolCallId, toolCall.input);\n            if (tool2.execute != null && toolCall.providerExecuted !== true) {\n              const toolExecutionId = generateId2();\n              outstandingToolResults.add(toolExecutionId);\n              executeToolCall({\n                toolCall,\n                tools,\n                tracer,\n                telemetry,\n                messages,\n                abortSignal,\n                experimental_context,\n                onPreliminaryToolResult: (result) => {\n                  toolResultsStreamController.enqueue(result);\n                }\n              }).then((result) => {\n                toolResultsStreamController.enqueue(result);\n              }).catch((error) => {\n                toolResultsStreamController.enqueue({\n                  type: \"error\",\n                  error\n                });\n              }).finally(() => {\n                outstandingToolResults.delete(toolExecutionId);\n                attemptClose();\n              });\n            }\n          } catch (error) {\n            toolResultsStreamController.enqueue({ type: \"error\", error });\n          }\n          break;\n        }\n        case \"tool-result\": {\n          const toolName = chunk.toolName;\n          if (chunk.isError) {\n            toolResultsStreamController.enqueue({\n              type: \"tool-error\",\n              toolCallId: chunk.toolCallId,\n              toolName,\n              input: toolInputs.get(chunk.toolCallId),\n              providerExecuted: true,\n              error: chunk.result,\n              dynamic: chunk.dynamic\n            });\n          } else {\n            controller.enqueue({\n              type: \"tool-result\",\n              toolCallId: chunk.toolCallId,\n              toolName,\n              input: toolInputs.get(chunk.toolCallId),\n              output: chunk.result,\n              providerExecuted: true,\n              dynamic: chunk.dynamic\n            });\n          }\n          break;\n        }\n        default: {\n          const _exhaustiveCheck = chunkType;\n          throw new Error(`Unhandled chunk type: ${_exhaustiveCheck}`);\n        }\n      }\n    },\n    flush() {\n      canClose = true;\n      attemptClose();\n    }\n  });\n  return new ReadableStream({\n    async start(controller) {\n      return Promise.all([\n        generatorStream.pipeThrough(forwardStream).pipeTo(\n          new WritableStream({\n            write(chunk) {\n              controller.enqueue(chunk);\n            },\n            close() {\n            }\n          })\n        ),\n        toolResultsStream.pipeTo(\n          new WritableStream({\n            write(chunk) {\n              controller.enqueue(chunk);\n            },\n            close() {\n              controller.close();\n            }\n          })\n        )\n      ]);\n    }\n  });\n}\n\n// src/generate-text/stream-text.ts\nvar originalGenerateId2 = createIdGenerator2({\n  prefix: \"aitxt\",\n  size: 24\n});\nfunction streamText({\n  model,\n  tools,\n  toolChoice,\n  system,\n  prompt,\n  messages,\n  maxRetries,\n  abortSignal,\n  timeout,\n  headers,\n  stopWhen = stepCountIs(1),\n  experimental_output,\n  output = experimental_output,\n  experimental_telemetry: telemetry,\n  prepareStep,\n  providerOptions,\n  experimental_activeTools,\n  activeTools = experimental_activeTools,\n  experimental_repairToolCall: repairToolCall,\n  experimental_transform: transform,\n  experimental_download: download2,\n  includeRawChunks = false,\n  onChunk,\n  onError = ({ error }) => {\n    console.error(error);\n  },\n  onFinish,\n  onAbort,\n  onStepFinish,\n  experimental_context,\n  experimental_include: include,\n  _internal: { now: now2 = now, generateId: generateId2 = originalGenerateId2 } = {},\n  ...settings\n}) {\n  const totalTimeoutMs = getTotalTimeoutMs(timeout);\n  const stepTimeoutMs = getStepTimeoutMs(timeout);\n  const chunkTimeoutMs = getChunkTimeoutMs(timeout);\n  const stepAbortController = stepTimeoutMs != null ? new AbortController() : void 0;\n  const chunkAbortController = chunkTimeoutMs != null ? new AbortController() : void 0;\n  return new DefaultStreamTextResult({\n    model: resolveLanguageModel(model),\n    telemetry,\n    headers,\n    settings,\n    maxRetries,\n    abortSignal: mergeAbortSignals(\n      abortSignal,\n      totalTimeoutMs != null ? AbortSignal.timeout(totalTimeoutMs) : void 0,\n      stepAbortController == null ? void 0 : stepAbortController.signal,\n      chunkAbortController == null ? void 0 : chunkAbortController.signal\n    ),\n    stepTimeoutMs,\n    stepAbortController,\n    chunkTimeoutMs,\n    chunkAbortController,\n    system,\n    prompt,\n    messages,\n    tools,\n    toolChoice,\n    transforms: asArray(transform),\n    activeTools,\n    repairToolCall,\n    stopConditions: asArray(stopWhen),\n    output,\n    providerOptions,\n    prepareStep,\n    includeRawChunks,\n    onChunk,\n    onError,\n    onFinish,\n    onAbort,\n    onStepFinish,\n    now: now2,\n    generateId: generateId2,\n    experimental_context,\n    download: download2,\n    include\n  });\n}\nfunction createOutputTransformStream(output) {\n  let firstTextChunkId = void 0;\n  let text2 = \"\";\n  let textChunk = \"\";\n  let textProviderMetadata = void 0;\n  let lastPublishedJson = \"\";\n  function publishTextChunk({\n    controller,\n    partialOutput = void 0\n  }) {\n    controller.enqueue({\n      part: {\n        type: \"text-delta\",\n        id: firstTextChunkId,\n        text: textChunk,\n        providerMetadata: textProviderMetadata\n      },\n      partialOutput\n    });\n    textChunk = \"\";\n  }\n  return new TransformStream({\n    async transform(chunk, controller) {\n      var _a20;\n      if (chunk.type === \"finish-step\" && textChunk.length > 0) {\n        publishTextChunk({ controller });\n      }\n      if (chunk.type !== \"text-delta\" && chunk.type !== \"text-start\" && chunk.type !== \"text-end\") {\n        controller.enqueue({ part: chunk, partialOutput: void 0 });\n        return;\n      }\n      if (firstTextChunkId == null) {\n        firstTextChunkId = chunk.id;\n      } else if (chunk.id !== firstTextChunkId) {\n        controller.enqueue({ part: chunk, partialOutput: void 0 });\n        return;\n      }\n      if (chunk.type === \"text-start\") {\n        controller.enqueue({ part: chunk, partialOutput: void 0 });\n        return;\n      }\n      if (chunk.type === \"text-end\") {\n        if (textChunk.length > 0) {\n          publishTextChunk({ controller });\n        }\n        controller.enqueue({ part: chunk, partialOutput: void 0 });\n        return;\n      }\n      text2 += chunk.text;\n      textChunk += chunk.text;\n      textProviderMetadata = (_a20 = chunk.providerMetadata) != null ? _a20 : textProviderMetadata;\n      const result = await output.parsePartialOutput({ text: text2 });\n      if (result !== void 0) {\n        const currentJson = JSON.stringify(result.partial);\n        if (currentJson !== lastPublishedJson) {\n          publishTextChunk({ controller, partialOutput: result.partial });\n          lastPublishedJson = currentJson;\n        }\n      }\n    }\n  });\n}\nvar DefaultStreamTextResult = class {\n  constructor({\n    model,\n    telemetry,\n    headers,\n    settings,\n    maxRetries: maxRetriesArg,\n    abortSignal,\n    stepTimeoutMs,\n    stepAbortController,\n    chunkTimeoutMs,\n    chunkAbortController,\n    system,\n    prompt,\n    messages,\n    tools,\n    toolChoice,\n    transforms,\n    activeTools,\n    repairToolCall,\n    stopConditions,\n    output,\n    providerOptions,\n    prepareStep,\n    includeRawChunks,\n    now: now2,\n    generateId: generateId2,\n    onChunk,\n    onError,\n    onFinish,\n    onAbort,\n    onStepFinish,\n    experimental_context,\n    download: download2,\n    include\n  }) {\n    this._totalUsage = new DelayedPromise();\n    this._finishReason = new DelayedPromise();\n    this._rawFinishReason = new DelayedPromise();\n    this._steps = new DelayedPromise();\n    this.outputSpecification = output;\n    this.includeRawChunks = includeRawChunks;\n    this.tools = tools;\n    let stepFinish;\n    let recordedContent = [];\n    const recordedResponseMessages = [];\n    let recordedFinishReason = void 0;\n    let recordedRawFinishReason = void 0;\n    let recordedTotalUsage = void 0;\n    let recordedRequest = {};\n    let recordedWarnings = [];\n    const recordedSteps = [];\n    const pendingDeferredToolCalls = /* @__PURE__ */ new Map();\n    let rootSpan;\n    let activeTextContent = {};\n    let activeReasoningContent = {};\n    const eventProcessor = new TransformStream({\n      async transform(chunk, controller) {\n        var _a20, _b, _c, _d;\n        controller.enqueue(chunk);\n        const { part } = chunk;\n        if (part.type === \"text-delta\" || part.type === \"reasoning-delta\" || part.type === \"source\" || part.type === \"tool-call\" || part.type === \"tool-result\" || part.type === \"tool-input-start\" || part.type === \"tool-input-delta\" || part.type === \"raw\") {\n          await (onChunk == null ? void 0 : onChunk({ chunk: part }));\n        }\n        if (part.type === \"error\") {\n          await onError({ error: wrapGatewayError(part.error) });\n        }\n        if (part.type === \"text-start\") {\n          activeTextContent[part.id] = {\n            type: \"text\",\n            text: \"\",\n            providerMetadata: part.providerMetadata\n          };\n          recordedContent.push(activeTextContent[part.id]);\n        }\n        if (part.type === \"text-delta\") {\n          const activeText = activeTextContent[part.id];\n          if (activeText == null) {\n            controller.enqueue({\n              part: {\n                type: \"error\",\n                error: `text part ${part.id} not found`\n              },\n              partialOutput: void 0\n            });\n            return;\n          }\n          activeText.text += part.text;\n          activeText.providerMetadata = (_a20 = part.providerMetadata) != null ? _a20 : activeText.providerMetadata;\n        }\n        if (part.type === \"text-end\") {\n          const activeText = activeTextContent[part.id];\n          if (activeText == null) {\n            controller.enqueue({\n              part: {\n                type: \"error\",\n                error: `text part ${part.id} not found`\n              },\n              partialOutput: void 0\n            });\n            return;\n          }\n          activeText.providerMetadata = (_b = part.providerMetadata) != null ? _b : activeText.providerMetadata;\n          delete activeTextContent[part.id];\n        }\n        if (part.type === \"reasoning-start\") {\n          activeReasoningContent[part.id] = {\n            type: \"reasoning\",\n            text: \"\",\n            providerMetadata: part.providerMetadata\n          };\n          recordedContent.push(activeReasoningContent[part.id]);\n        }\n        if (part.type === \"reasoning-delta\") {\n          const activeReasoning = activeReasoningContent[part.id];\n          if (activeReasoning == null) {\n            controller.enqueue({\n              part: {\n                type: \"error\",\n                error: `reasoning part ${part.id} not found`\n              },\n              partialOutput: void 0\n            });\n            return;\n          }\n          activeReasoning.text += part.text;\n          activeReasoning.providerMetadata = (_c = part.providerMetadata) != null ? _c : activeReasoning.providerMetadata;\n        }\n        if (part.type === \"reasoning-end\") {\n          const activeReasoning = activeReasoningContent[part.id];\n          if (activeReasoning == null) {\n            controller.enqueue({\n              part: {\n                type: \"error\",\n                error: `reasoning part ${part.id} not found`\n              },\n              partialOutput: void 0\n            });\n            return;\n          }\n          activeReasoning.providerMetadata = (_d = part.providerMetadata) != null ? _d : activeReasoning.providerMetadata;\n          delete activeReasoningContent[part.id];\n        }\n        if (part.type === \"file\") {\n          recordedContent.push({ type: \"file\", file: part.file });\n        }\n        if (part.type === \"source\") {\n          recordedContent.push(part);\n        }\n        if (part.type === \"tool-call\") {\n          recordedContent.push(part);\n        }\n        if (part.type === \"tool-result\" && !part.preliminary) {\n          recordedContent.push(part);\n        }\n        if (part.type === \"tool-approval-request\") {\n          recordedContent.push(part);\n        }\n        if (part.type === \"tool-error\") {\n          recordedContent.push(part);\n        }\n        if (part.type === \"start-step\") {\n          recordedContent = [];\n          activeReasoningContent = {};\n          activeTextContent = {};\n          recordedRequest = part.request;\n          recordedWarnings = part.warnings;\n        }\n        if (part.type === \"finish-step\") {\n          const stepMessages = await toResponseMessages({\n            content: recordedContent,\n            tools\n          });\n          const currentStepResult = new DefaultStepResult({\n            content: recordedContent,\n            finishReason: part.finishReason,\n            rawFinishReason: part.rawFinishReason,\n            usage: part.usage,\n            warnings: recordedWarnings,\n            request: recordedRequest,\n            response: {\n              ...part.response,\n              messages: [...recordedResponseMessages, ...stepMessages]\n            },\n            providerMetadata: part.providerMetadata\n          });\n          await (onStepFinish == null ? void 0 : onStepFinish(currentStepResult));\n          logWarnings({\n            warnings: recordedWarnings,\n            provider: model.provider,\n            model: model.modelId\n          });\n          recordedSteps.push(currentStepResult);\n          recordedResponseMessages.push(...stepMessages);\n          stepFinish.resolve();\n        }\n        if (part.type === \"finish\") {\n          recordedTotalUsage = part.totalUsage;\n          recordedFinishReason = part.finishReason;\n          recordedRawFinishReason = part.rawFinishReason;\n        }\n      },\n      async flush(controller) {\n        try {\n          if (recordedSteps.length === 0) {\n            const error = (abortSignal == null ? void 0 : abortSignal.aborted) ? abortSignal.reason : new NoOutputGeneratedError({\n              message: \"No output generated. Check the stream for errors.\"\n            });\n            self._finishReason.reject(error);\n            self._rawFinishReason.reject(error);\n            self._totalUsage.reject(error);\n            self._steps.reject(error);\n            return;\n          }\n          const finishReason = recordedFinishReason != null ? recordedFinishReason : \"other\";\n          const totalUsage = recordedTotalUsage != null ? recordedTotalUsage : createNullLanguageModelUsage();\n          self._finishReason.resolve(finishReason);\n          self._rawFinishReason.resolve(recordedRawFinishReason);\n          self._totalUsage.resolve(totalUsage);\n          self._steps.resolve(recordedSteps);\n          const finalStep = recordedSteps[recordedSteps.length - 1];\n          await (onFinish == null ? void 0 : onFinish({\n            finishReason: finalStep.finishReason,\n            rawFinishReason: finalStep.rawFinishReason,\n            totalUsage,\n            usage: finalStep.usage,\n            content: finalStep.content,\n            text: finalStep.text,\n            reasoningText: finalStep.reasoningText,\n            reasoning: finalStep.reasoning,\n            files: finalStep.files,\n            sources: finalStep.sources,\n            toolCalls: finalStep.toolCalls,\n            staticToolCalls: finalStep.staticToolCalls,\n            dynamicToolCalls: finalStep.dynamicToolCalls,\n            toolResults: finalStep.toolResults,\n            staticToolResults: finalStep.staticToolResults,\n            dynamicToolResults: finalStep.dynamicToolResults,\n            request: finalStep.request,\n            response: finalStep.response,\n            warnings: finalStep.warnings,\n            providerMetadata: finalStep.providerMetadata,\n            steps: recordedSteps,\n            experimental_context\n          }));\n          rootSpan.setAttributes(\n            await selectTelemetryAttributes({\n              telemetry,\n              attributes: {\n                \"ai.response.finishReason\": finishReason,\n                \"ai.response.text\": { output: () => finalStep.text },\n                \"ai.response.toolCalls\": {\n                  output: () => {\n                    var _a20;\n                    return ((_a20 = finalStep.toolCalls) == null ? void 0 : _a20.length) ? JSON.stringify(finalStep.toolCalls) : void 0;\n                  }\n                },\n                \"ai.response.providerMetadata\": JSON.stringify(\n                  finalStep.providerMetadata\n                ),\n                \"ai.usage.inputTokens\": totalUsage.inputTokens,\n                \"ai.usage.outputTokens\": totalUsage.outputTokens,\n                \"ai.usage.totalTokens\": totalUsage.totalTokens,\n                \"ai.usage.reasoningTokens\": totalUsage.reasoningTokens,\n                \"ai.usage.cachedInputTokens\": totalUsage.cachedInputTokens\n              }\n            })\n          );\n        } catch (error) {\n          controller.error(error);\n        } finally {\n          rootSpan.end();\n        }\n      }\n    });\n    const stitchableStream = createStitchableStream();\n    this.addStream = stitchableStream.addStream;\n    this.closeStream = stitchableStream.close;\n    const reader = stitchableStream.stream.getReader();\n    let stream = new ReadableStream({\n      async start(controller) {\n        controller.enqueue({ type: \"start\" });\n      },\n      async pull(controller) {\n        function abort() {\n          onAbort == null ? void 0 : onAbort({ steps: recordedSteps });\n          controller.enqueue({\n            type: \"abort\",\n            // The `reason` is usually of type DOMException, but it can also be of any type,\n            // so we use getErrorMessage for serialization because it is already designed to accept values of the unknown type.\n            // See: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/reason\n            ...(abortSignal == null ? void 0 : abortSignal.reason) !== void 0 ? { reason: getErrorMessage7(abortSignal.reason) } : {}\n          });\n          controller.close();\n        }\n        try {\n          const { done, value } = await reader.read();\n          if (done) {\n            controller.close();\n            return;\n          }\n          if (abortSignal == null ? void 0 : abortSignal.aborted) {\n            abort();\n            return;\n          }\n          controller.enqueue(value);\n        } catch (error) {\n          if (isAbortError2(error) && (abortSignal == null ? void 0 : abortSignal.aborted)) {\n            abort();\n          } else {\n            controller.error(error);\n          }\n        }\n      },\n      cancel(reason) {\n        return stitchableStream.stream.cancel(reason);\n      }\n    });\n    for (const transform of transforms) {\n      stream = stream.pipeThrough(\n        transform({\n          tools,\n          stopStream() {\n            stitchableStream.terminate();\n          }\n        })\n      );\n    }\n    this.baseStream = stream.pipeThrough(createOutputTransformStream(output != null ? output : text())).pipeThrough(eventProcessor);\n    const { maxRetries, retry } = prepareRetries({\n      maxRetries: maxRetriesArg,\n      abortSignal\n    });\n    const tracer = getTracer(telemetry);\n    const callSettings = prepareCallSettings(settings);\n    const baseTelemetryAttributes = getBaseTelemetryAttributes({\n      model,\n      telemetry,\n      headers,\n      settings: { ...callSettings, maxRetries }\n    });\n    const self = this;\n    recordSpan({\n      name: \"ai.streamText\",\n      attributes: selectTelemetryAttributes({\n        telemetry,\n        attributes: {\n          ...assembleOperationName({ operationId: \"ai.streamText\", telemetry }),\n          ...baseTelemetryAttributes,\n          // specific settings that only make sense on the outer level:\n          \"ai.prompt\": {\n            input: () => JSON.stringify({ system, prompt, messages })\n          }\n        }\n      }),\n      tracer,\n      endWhenDone: false,\n      fn: async (rootSpanArg) => {\n        rootSpan = rootSpanArg;\n        const initialPrompt = await standardizePrompt({\n          system,\n          prompt,\n          messages\n        });\n        const initialMessages = initialPrompt.messages;\n        const initialResponseMessages = [];\n        const { approvedToolApprovals, deniedToolApprovals } = collectToolApprovals({ messages: initialMessages });\n        if (deniedToolApprovals.length > 0 || approvedToolApprovals.length > 0) {\n          const providerExecutedToolApprovals = [\n            ...approvedToolApprovals,\n            ...deniedToolApprovals\n          ].filter((toolApproval) => toolApproval.toolCall.providerExecuted);\n          const localApprovedToolApprovals = approvedToolApprovals.filter(\n            (toolApproval) => !toolApproval.toolCall.providerExecuted\n          );\n          const localDeniedToolApprovals = deniedToolApprovals.filter(\n            (toolApproval) => !toolApproval.toolCall.providerExecuted\n          );\n          const deniedProviderExecutedToolApprovals = deniedToolApprovals.filter(\n            (toolApproval) => toolApproval.toolCall.providerExecuted\n          );\n          let toolExecutionStepStreamController;\n          const toolExecutionStepStream = new ReadableStream({\n            start(controller) {\n              toolExecutionStepStreamController = controller;\n            }\n          });\n          self.addStream(toolExecutionStepStream);\n          try {\n            for (const toolApproval of [\n              ...localDeniedToolApprovals,\n              ...deniedProviderExecutedToolApprovals\n            ]) {\n              toolExecutionStepStreamController == null ? void 0 : toolExecutionStepStreamController.enqueue({\n                type: \"tool-output-denied\",\n                toolCallId: toolApproval.toolCall.toolCallId,\n                toolName: toolApproval.toolCall.toolName\n              });\n            }\n            const toolOutputs = [];\n            await Promise.all(\n              localApprovedToolApprovals.map(async (toolApproval) => {\n                const result = await executeToolCall({\n                  toolCall: toolApproval.toolCall,\n                  tools,\n                  tracer,\n                  telemetry,\n                  messages: initialMessages,\n                  abortSignal,\n                  experimental_context,\n                  onPreliminaryToolResult: (result2) => {\n                    toolExecutionStepStreamController == null ? void 0 : toolExecutionStepStreamController.enqueue(result2);\n                  }\n                });\n                if (result != null) {\n                  toolExecutionStepStreamController == null ? void 0 : toolExecutionStepStreamController.enqueue(result);\n                  toolOutputs.push(result);\n                }\n              })\n            );\n            if (providerExecutedToolApprovals.length > 0) {\n              initialResponseMessages.push({\n                role: \"tool\",\n                content: providerExecutedToolApprovals.map(\n                  (toolApproval) => ({\n                    type: \"tool-approval-response\",\n                    approvalId: toolApproval.approvalResponse.approvalId,\n                    approved: toolApproval.approvalResponse.approved,\n                    reason: toolApproval.approvalResponse.reason,\n                    providerExecuted: true\n                  })\n                )\n              });\n            }\n            if (toolOutputs.length > 0 || localDeniedToolApprovals.length > 0) {\n              const localToolContent = [];\n              for (const output2 of toolOutputs) {\n                localToolContent.push({\n                  type: \"tool-result\",\n                  toolCallId: output2.toolCallId,\n                  toolName: output2.toolName,\n                  output: await createToolModelOutput({\n                    toolCallId: output2.toolCallId,\n                    input: output2.input,\n                    tool: tools == null ? void 0 : tools[output2.toolName],\n                    output: output2.type === \"tool-result\" ? output2.output : output2.error,\n                    errorMode: output2.type === \"tool-error\" ? \"json\" : \"none\"\n                  })\n                });\n              }\n              for (const toolApproval of localDeniedToolApprovals) {\n                localToolContent.push({\n                  type: \"tool-result\",\n                  toolCallId: toolApproval.toolCall.toolCallId,\n                  toolName: toolApproval.toolCall.toolName,\n                  output: {\n                    type: \"execution-denied\",\n                    reason: toolApproval.approvalResponse.reason\n                  }\n                });\n              }\n              initialResponseMessages.push({\n                role: \"tool\",\n                content: localToolContent\n              });\n            }\n          } finally {\n            toolExecutionStepStreamController == null ? void 0 : toolExecutionStepStreamController.close();\n          }\n        }\n        recordedResponseMessages.push(...initialResponseMessages);\n        async function streamStep({\n          currentStep,\n          responseMessages,\n          usage\n        }) {\n          var _a20, _b, _c, _d, _e, _f, _g;\n          const includeRawChunks2 = self.includeRawChunks;\n          const stepTimeoutId = stepTimeoutMs != null ? setTimeout(() => stepAbortController.abort(), stepTimeoutMs) : void 0;\n          let chunkTimeoutId = void 0;\n          function resetChunkTimeout() {\n            if (chunkTimeoutMs != null) {\n              if (chunkTimeoutId != null) {\n                clearTimeout(chunkTimeoutId);\n              }\n              chunkTimeoutId = setTimeout(\n                () => chunkAbortController.abort(),\n                chunkTimeoutMs\n              );\n            }\n          }\n          function clearChunkTimeout() {\n            if (chunkTimeoutId != null) {\n              clearTimeout(chunkTimeoutId);\n              chunkTimeoutId = void 0;\n            }\n          }\n          function clearStepTimeout() {\n            if (stepTimeoutId != null) {\n              clearTimeout(stepTimeoutId);\n            }\n          }\n          try {\n            stepFinish = new DelayedPromise();\n            const stepInputMessages = [...initialMessages, ...responseMessages];\n            const prepareStepResult = await (prepareStep == null ? void 0 : prepareStep({\n              model,\n              steps: recordedSteps,\n              stepNumber: recordedSteps.length,\n              messages: stepInputMessages,\n              experimental_context\n            }));\n            const stepModel = resolveLanguageModel(\n              (_a20 = prepareStepResult == null ? void 0 : prepareStepResult.model) != null ? _a20 : model\n            );\n            const promptMessages = await convertToLanguageModelPrompt({\n              prompt: {\n                system: (_b = prepareStepResult == null ? void 0 : prepareStepResult.system) != null ? _b : initialPrompt.system,\n                messages: (_c = prepareStepResult == null ? void 0 : prepareStepResult.messages) != null ? _c : stepInputMessages\n              },\n              supportedUrls: await stepModel.supportedUrls,\n              download: download2\n            });\n            const { toolChoice: stepToolChoice, tools: stepTools } = await prepareToolsAndToolChoice({\n              tools,\n              toolChoice: (_d = prepareStepResult == null ? void 0 : prepareStepResult.toolChoice) != null ? _d : toolChoice,\n              activeTools: (_e = prepareStepResult == null ? void 0 : prepareStepResult.activeTools) != null ? _e : activeTools\n            });\n            experimental_context = (_f = prepareStepResult == null ? void 0 : prepareStepResult.experimental_context) != null ? _f : experimental_context;\n            const stepProviderOptions = mergeObjects(\n              providerOptions,\n              prepareStepResult == null ? void 0 : prepareStepResult.providerOptions\n            );\n            const {\n              result: { stream: stream2, response, request },\n              doStreamSpan,\n              startTimestampMs\n            } = await retry(\n              () => recordSpan({\n                name: \"ai.streamText.doStream\",\n                attributes: selectTelemetryAttributes({\n                  telemetry,\n                  attributes: {\n                    ...assembleOperationName({\n                      operationId: \"ai.streamText.doStream\",\n                      telemetry\n                    }),\n                    ...baseTelemetryAttributes,\n                    // model:\n                    \"ai.model.provider\": stepModel.provider,\n                    \"ai.model.id\": stepModel.modelId,\n                    // prompt:\n                    \"ai.prompt.messages\": {\n                      input: () => stringifyForTelemetry(promptMessages)\n                    },\n                    \"ai.prompt.tools\": {\n                      // convert the language model level tools:\n                      input: () => stepTools == null ? void 0 : stepTools.map((tool2) => JSON.stringify(tool2))\n                    },\n                    \"ai.prompt.toolChoice\": {\n                      input: () => stepToolChoice != null ? JSON.stringify(stepToolChoice) : void 0\n                    },\n                    // standardized gen-ai llm span attributes:\n                    \"gen_ai.system\": stepModel.provider,\n                    \"gen_ai.request.model\": stepModel.modelId,\n                    \"gen_ai.request.frequency_penalty\": callSettings.frequencyPenalty,\n                    \"gen_ai.request.max_tokens\": callSettings.maxOutputTokens,\n                    \"gen_ai.request.presence_penalty\": callSettings.presencePenalty,\n                    \"gen_ai.request.stop_sequences\": callSettings.stopSequences,\n                    \"gen_ai.request.temperature\": callSettings.temperature,\n                    \"gen_ai.request.top_k\": callSettings.topK,\n                    \"gen_ai.request.top_p\": callSettings.topP\n                  }\n                }),\n                tracer,\n                endWhenDone: false,\n                fn: async (doStreamSpan2) => ({\n                  startTimestampMs: now2(),\n                  // get before the call\n                  doStreamSpan: doStreamSpan2,\n                  result: await stepModel.doStream({\n                    ...callSettings,\n                    tools: stepTools,\n                    toolChoice: stepToolChoice,\n                    responseFormat: await (output == null ? void 0 : output.responseFormat),\n                    prompt: promptMessages,\n                    providerOptions: stepProviderOptions,\n                    abortSignal,\n                    headers,\n                    includeRawChunks: includeRawChunks2\n                  })\n                })\n              })\n            );\n            const streamWithToolResults = runToolsTransformation({\n              tools,\n              generatorStream: stream2,\n              tracer,\n              telemetry,\n              system,\n              messages: stepInputMessages,\n              repairToolCall,\n              abortSignal,\n              experimental_context,\n              generateId: generateId2\n            });\n            const stepRequest = ((_g = include == null ? void 0 : include.requestBody) != null ? _g : true) ? request != null ? request : {} : { ...request, body: void 0 };\n            const stepToolCalls = [];\n            const stepToolOutputs = [];\n            let warnings;\n            const activeToolCallToolNames = {};\n            let stepFinishReason = \"other\";\n            let stepRawFinishReason = void 0;\n            let stepUsage = createNullLanguageModelUsage();\n            let stepProviderMetadata;\n            let stepFirstChunk = true;\n            let stepResponse = {\n              id: generateId2(),\n              timestamp: /* @__PURE__ */ new Date(),\n              modelId: model.modelId\n            };\n            let activeText = \"\";\n            self.addStream(\n              streamWithToolResults.pipeThrough(\n                new TransformStream({\n                  async transform(chunk, controller) {\n                    var _a21, _b2, _c2, _d2, _e2;\n                    resetChunkTimeout();\n                    if (chunk.type === \"stream-start\") {\n                      warnings = chunk.warnings;\n                      return;\n                    }\n                    if (stepFirstChunk) {\n                      const msToFirstChunk = now2() - startTimestampMs;\n                      stepFirstChunk = false;\n                      doStreamSpan.addEvent(\"ai.stream.firstChunk\", {\n                        \"ai.response.msToFirstChunk\": msToFirstChunk\n                      });\n                      doStreamSpan.setAttributes({\n                        \"ai.response.msToFirstChunk\": msToFirstChunk\n                      });\n                      controller.enqueue({\n                        type: \"start-step\",\n                        request: stepRequest,\n                        warnings: warnings != null ? warnings : []\n                      });\n                    }\n                    const chunkType = chunk.type;\n                    switch (chunkType) {\n                      case \"tool-approval-request\":\n                      case \"text-start\":\n                      case \"text-end\": {\n                        controller.enqueue(chunk);\n                        break;\n                      }\n                      case \"text-delta\": {\n                        if (chunk.delta.length > 0) {\n                          controller.enqueue({\n                            type: \"text-delta\",\n                            id: chunk.id,\n                            text: chunk.delta,\n                            providerMetadata: chunk.providerMetadata\n                          });\n                          activeText += chunk.delta;\n                        }\n                        break;\n                      }\n                      case \"reasoning-start\":\n                      case \"reasoning-end\": {\n                        controller.enqueue(chunk);\n                        break;\n                      }\n                      case \"reasoning-delta\": {\n                        controller.enqueue({\n                          type: \"reasoning-delta\",\n                          id: chunk.id,\n                          text: chunk.delta,\n                          providerMetadata: chunk.providerMetadata\n                        });\n                        break;\n                      }\n                      case \"tool-call\": {\n                        controller.enqueue(chunk);\n                        stepToolCalls.push(chunk);\n                        break;\n                      }\n                      case \"tool-result\": {\n                        controller.enqueue(chunk);\n                        if (!chunk.preliminary) {\n                          stepToolOutputs.push(chunk);\n                        }\n                        break;\n                      }\n                      case \"tool-error\": {\n                        controller.enqueue(chunk);\n                        stepToolOutputs.push(chunk);\n                        break;\n                      }\n                      case \"response-metadata\": {\n                        stepResponse = {\n                          id: (_a21 = chunk.id) != null ? _a21 : stepResponse.id,\n                          timestamp: (_b2 = chunk.timestamp) != null ? _b2 : stepResponse.timestamp,\n                          modelId: (_c2 = chunk.modelId) != null ? _c2 : stepResponse.modelId\n                        };\n                        break;\n                      }\n                      case \"finish\": {\n                        stepUsage = chunk.usage;\n                        stepFinishReason = chunk.finishReason;\n                        stepRawFinishReason = chunk.rawFinishReason;\n                        stepProviderMetadata = chunk.providerMetadata;\n                        const msToFinish = now2() - startTimestampMs;\n                        doStreamSpan.addEvent(\"ai.stream.finish\");\n                        doStreamSpan.setAttributes({\n                          \"ai.response.msToFinish\": msToFinish,\n                          \"ai.response.avgOutputTokensPerSecond\": 1e3 * ((_d2 = stepUsage.outputTokens) != null ? _d2 : 0) / msToFinish\n                        });\n                        break;\n                      }\n                      case \"file\": {\n                        controller.enqueue(chunk);\n                        break;\n                      }\n                      case \"source\": {\n                        controller.enqueue(chunk);\n                        break;\n                      }\n                      case \"tool-input-start\": {\n                        activeToolCallToolNames[chunk.id] = chunk.toolName;\n                        const tool2 = tools == null ? void 0 : tools[chunk.toolName];\n                        if ((tool2 == null ? void 0 : tool2.onInputStart) != null) {\n                          await tool2.onInputStart({\n                            toolCallId: chunk.id,\n                            messages: stepInputMessages,\n                            abortSignal,\n                            experimental_context\n                          });\n                        }\n                        controller.enqueue({\n                          ...chunk,\n                          dynamic: (_e2 = chunk.dynamic) != null ? _e2 : (tool2 == null ? void 0 : tool2.type) === \"dynamic\",\n                          title: tool2 == null ? void 0 : tool2.title\n                        });\n                        break;\n                      }\n                      case \"tool-input-end\": {\n                        delete activeToolCallToolNames[chunk.id];\n                        controller.enqueue(chunk);\n                        break;\n                      }\n                      case \"tool-input-delta\": {\n                        const toolName = activeToolCallToolNames[chunk.id];\n                        const tool2 = tools == null ? void 0 : tools[toolName];\n                        if ((tool2 == null ? void 0 : tool2.onInputDelta) != null) {\n                          await tool2.onInputDelta({\n                            inputTextDelta: chunk.delta,\n                            toolCallId: chunk.id,\n                            messages: stepInputMessages,\n                            abortSignal,\n                            experimental_context\n                          });\n                        }\n                        controller.enqueue(chunk);\n                        break;\n                      }\n                      case \"error\": {\n                        controller.enqueue(chunk);\n                        stepFinishReason = \"error\";\n                        break;\n                      }\n                      case \"raw\": {\n                        if (includeRawChunks2) {\n                          controller.enqueue(chunk);\n                        }\n                        break;\n                      }\n                      default: {\n                        const exhaustiveCheck = chunkType;\n                        throw new Error(\n                          `Unknown chunk type: ${exhaustiveCheck}`\n                        );\n                      }\n                    }\n                  },\n                  // invoke onFinish callback and resolve toolResults promise when the stream is about to close:\n                  async flush(controller) {\n                    const stepToolCallsJson = stepToolCalls.length > 0 ? JSON.stringify(stepToolCalls) : void 0;\n                    try {\n                      doStreamSpan.setAttributes(\n                        await selectTelemetryAttributes({\n                          telemetry,\n                          attributes: {\n                            \"ai.response.finishReason\": stepFinishReason,\n                            \"ai.response.text\": {\n                              output: () => activeText\n                            },\n                            \"ai.response.toolCalls\": {\n                              output: () => stepToolCallsJson\n                            },\n                            \"ai.response.id\": stepResponse.id,\n                            \"ai.response.model\": stepResponse.modelId,\n                            \"ai.response.timestamp\": stepResponse.timestamp.toISOString(),\n                            \"ai.response.providerMetadata\": JSON.stringify(stepProviderMetadata),\n                            \"ai.usage.inputTokens\": stepUsage.inputTokens,\n                            \"ai.usage.outputTokens\": stepUsage.outputTokens,\n                            \"ai.usage.totalTokens\": stepUsage.totalTokens,\n                            \"ai.usage.reasoningTokens\": stepUsage.reasoningTokens,\n                            \"ai.usage.cachedInputTokens\": stepUsage.cachedInputTokens,\n                            // standardized gen-ai llm span attributes:\n                            \"gen_ai.response.finish_reasons\": [\n                              stepFinishReason\n                            ],\n                            \"gen_ai.response.id\": stepResponse.id,\n                            \"gen_ai.response.model\": stepResponse.modelId,\n                            \"gen_ai.usage.input_tokens\": stepUsage.inputTokens,\n                            \"gen_ai.usage.output_tokens\": stepUsage.outputTokens\n                          }\n                        })\n                      );\n                    } catch (error) {\n                    } finally {\n                      doStreamSpan.end();\n                    }\n                    controller.enqueue({\n                      type: \"finish-step\",\n                      finishReason: stepFinishReason,\n                      rawFinishReason: stepRawFinishReason,\n                      usage: stepUsage,\n                      providerMetadata: stepProviderMetadata,\n                      response: {\n                        ...stepResponse,\n                        headers: response == null ? void 0 : response.headers\n                      }\n                    });\n                    const combinedUsage = addLanguageModelUsage(\n                      usage,\n                      stepUsage\n                    );\n                    await stepFinish.promise;\n                    const clientToolCalls = stepToolCalls.filter(\n                      (toolCall) => toolCall.providerExecuted !== true\n                    );\n                    const clientToolOutputs = stepToolOutputs.filter(\n                      (toolOutput) => toolOutput.providerExecuted !== true\n                    );\n                    for (const toolCall of stepToolCalls) {\n                      if (toolCall.providerExecuted !== true)\n                        continue;\n                      const tool2 = tools == null ? void 0 : tools[toolCall.toolName];\n                      if ((tool2 == null ? void 0 : tool2.type) === \"provider\" && tool2.supportsDeferredResults) {\n                        const hasResultInStep = stepToolOutputs.some(\n                          (output2) => (output2.type === \"tool-result\" || output2.type === \"tool-error\") && output2.toolCallId === toolCall.toolCallId\n                        );\n                        if (!hasResultInStep) {\n                          pendingDeferredToolCalls.set(toolCall.toolCallId, {\n                            toolName: toolCall.toolName\n                          });\n                        }\n                      }\n                    }\n                    for (const output2 of stepToolOutputs) {\n                      if (output2.type === \"tool-result\" || output2.type === \"tool-error\") {\n                        pendingDeferredToolCalls.delete(output2.toolCallId);\n                      }\n                    }\n                    clearStepTimeout();\n                    clearChunkTimeout();\n                    if (\n                      // Continue if:\n                      // 1. There are client tool calls that have all been executed, OR\n                      // 2. There are pending deferred results from provider-executed tools\n                      (clientToolCalls.length > 0 && clientToolOutputs.length === clientToolCalls.length || pendingDeferredToolCalls.size > 0) && // continue until a stop condition is met:\n                      !await isStopConditionMet({\n                        stopConditions,\n                        steps: recordedSteps\n                      })\n                    ) {\n                      responseMessages.push(\n                        ...await toResponseMessages({\n                          content: (\n                            // use transformed content to create the messages for the next step:\n                            recordedSteps[recordedSteps.length - 1].content\n                          ),\n                          tools\n                        })\n                      );\n                      try {\n                        await streamStep({\n                          currentStep: currentStep + 1,\n                          responseMessages,\n                          usage: combinedUsage\n                        });\n                      } catch (error) {\n                        controller.enqueue({\n                          type: \"error\",\n                          error\n                        });\n                        self.closeStream();\n                      }\n                    } else {\n                      controller.enqueue({\n                        type: \"finish\",\n                        finishReason: stepFinishReason,\n                        rawFinishReason: stepRawFinishReason,\n                        totalUsage: combinedUsage\n                      });\n                      self.closeStream();\n                    }\n                  }\n                })\n              )\n            );\n          } finally {\n            clearStepTimeout();\n            clearChunkTimeout();\n          }\n        }\n        await streamStep({\n          currentStep: 0,\n          responseMessages: initialResponseMessages,\n          usage: createNullLanguageModelUsage()\n        });\n      }\n    }).catch((error) => {\n      self.addStream(\n        new ReadableStream({\n          start(controller) {\n            controller.enqueue({ type: \"error\", error });\n            controller.close();\n          }\n        })\n      );\n      self.closeStream();\n    });\n  }\n  get steps() {\n    this.consumeStream();\n    return this._steps.promise;\n  }\n  get finalStep() {\n    return this.steps.then((steps) => steps[steps.length - 1]);\n  }\n  get content() {\n    return this.finalStep.then((step) => step.content);\n  }\n  get warnings() {\n    return this.finalStep.then((step) => step.warnings);\n  }\n  get providerMetadata() {\n    return this.finalStep.then((step) => step.providerMetadata);\n  }\n  get text() {\n    return this.finalStep.then((step) => step.text);\n  }\n  get reasoningText() {\n    return this.finalStep.then((step) => step.reasoningText);\n  }\n  get reasoning() {\n    return this.finalStep.then((step) => step.reasoning);\n  }\n  get sources() {\n    return this.finalStep.then((step) => step.sources);\n  }\n  get files() {\n    return this.finalStep.then((step) => step.files);\n  }\n  get toolCalls() {\n    return this.finalStep.then((step) => step.toolCalls);\n  }\n  get staticToolCalls() {\n    return this.finalStep.then((step) => step.staticToolCalls);\n  }\n  get dynamicToolCalls() {\n    return this.finalStep.then((step) => step.dynamicToolCalls);\n  }\n  get toolResults() {\n    return this.finalStep.then((step) => step.toolResults);\n  }\n  get staticToolResults() {\n    return this.finalStep.then((step) => step.staticToolResults);\n  }\n  get dynamicToolResults() {\n    return this.finalStep.then((step) => step.dynamicToolResults);\n  }\n  get usage() {\n    return this.finalStep.then((step) => step.usage);\n  }\n  get request() {\n    return this.finalStep.then((step) => step.request);\n  }\n  get response() {\n    return this.finalStep.then((step) => step.response);\n  }\n  get totalUsage() {\n    this.consumeStream();\n    return this._totalUsage.promise;\n  }\n  get finishReason() {\n    this.consumeStream();\n    return this._finishReason.promise;\n  }\n  get rawFinishReason() {\n    this.consumeStream();\n    return this._rawFinishReason.promise;\n  }\n  /**\n   * Split out a new stream from the original stream.\n   * The original stream is replaced to allow for further splitting,\n   * since we do not know how many times the stream will be split.\n   *\n   * Note: this leads to buffering the stream content on the server.\n   * However, the LLM results are expected to be small enough to not cause issues.\n   */\n  teeStream() {\n    const [stream1, stream2] = this.baseStream.tee();\n    this.baseStream = stream2;\n    return stream1;\n  }\n  get textStream() {\n    return createAsyncIterableStream(\n      this.teeStream().pipeThrough(\n        new TransformStream({\n          transform({ part }, controller) {\n            if (part.type === \"text-delta\") {\n              controller.enqueue(part.text);\n            }\n          }\n        })\n      )\n    );\n  }\n  get fullStream() {\n    return createAsyncIterableStream(\n      this.teeStream().pipeThrough(\n        new TransformStream({\n          transform({ part }, controller) {\n            controller.enqueue(part);\n          }\n        })\n      )\n    );\n  }\n  async consumeStream(options) {\n    var _a20;\n    try {\n      await consumeStream({\n        stream: this.fullStream,\n        onError: options == null ? void 0 : options.onError\n      });\n    } catch (error) {\n      (_a20 = options == null ? void 0 : options.onError) == null ? void 0 : _a20.call(options, error);\n    }\n  }\n  get experimental_partialOutputStream() {\n    return this.partialOutputStream;\n  }\n  get partialOutputStream() {\n    return createAsyncIterableStream(\n      this.teeStream().pipeThrough(\n        new TransformStream({\n          transform({ partialOutput }, controller) {\n            if (partialOutput != null) {\n              controller.enqueue(partialOutput);\n            }\n          }\n        })\n      )\n    );\n  }\n  get elementStream() {\n    var _a20, _b, _c;\n    const transform = (_a20 = this.outputSpecification) == null ? void 0 : _a20.createElementStreamTransform();\n    if (transform == null) {\n      throw new UnsupportedFunctionalityError2({\n        functionality: `element streams in ${(_c = (_b = this.outputSpecification) == null ? void 0 : _b.name) != null ? _c : \"text\"} mode`\n      });\n    }\n    return createAsyncIterableStream(this.teeStream().pipeThrough(transform));\n  }\n  get output() {\n    return this.finalStep.then((step) => {\n      var _a20;\n      const output = (_a20 = this.outputSpecification) != null ? _a20 : text();\n      return output.parseCompleteOutput(\n        { text: step.text },\n        {\n          response: step.response,\n          usage: step.usage,\n          finishReason: step.finishReason\n        }\n      );\n    });\n  }\n  toUIMessageStream({\n    originalMessages,\n    generateMessageId,\n    onFinish,\n    messageMetadata,\n    sendReasoning = true,\n    sendSources = false,\n    sendStart = true,\n    sendFinish = true,\n    onError = getErrorMessage7\n  } = {}) {\n    const responseMessageId = generateMessageId != null ? getResponseUIMessageId({\n      originalMessages,\n      responseMessageId: generateMessageId\n    }) : void 0;\n    const isDynamic = (part) => {\n      var _a20;\n      const tool2 = (_a20 = this.tools) == null ? void 0 : _a20[part.toolName];\n      if (tool2 == null) {\n        return part.dynamic;\n      }\n      return (tool2 == null ? void 0 : tool2.type) === \"dynamic\" ? true : void 0;\n    };\n    const baseStream = this.fullStream.pipeThrough(\n      new TransformStream({\n        transform: async (part, controller) => {\n          const messageMetadataValue = messageMetadata == null ? void 0 : messageMetadata({ part });\n          const partType = part.type;\n          switch (partType) {\n            case \"text-start\": {\n              controller.enqueue({\n                type: \"text-start\",\n                id: part.id,\n                ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n              });\n              break;\n            }\n            case \"text-delta\": {\n              controller.enqueue({\n                type: \"text-delta\",\n                id: part.id,\n                delta: part.text,\n                ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n              });\n              break;\n            }\n            case \"text-end\": {\n              controller.enqueue({\n                type: \"text-end\",\n                id: part.id,\n                ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n              });\n              break;\n            }\n            case \"reasoning-start\": {\n              controller.enqueue({\n                type: \"reasoning-start\",\n                id: part.id,\n                ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n              });\n              break;\n            }\n            case \"reasoning-delta\": {\n              if (sendReasoning) {\n                controller.enqueue({\n                  type: \"reasoning-delta\",\n                  id: part.id,\n                  delta: part.text,\n                  ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n                });\n              }\n              break;\n            }\n            case \"reasoning-end\": {\n              controller.enqueue({\n                type: \"reasoning-end\",\n                id: part.id,\n                ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n              });\n              break;\n            }\n            case \"file\": {\n              controller.enqueue({\n                type: \"file\",\n                mediaType: part.file.mediaType,\n                url: `data:${part.file.mediaType};base64,${part.file.base64}`\n              });\n              break;\n            }\n            case \"source\": {\n              if (sendSources && part.sourceType === \"url\") {\n                controller.enqueue({\n                  type: \"source-url\",\n                  sourceId: part.id,\n                  url: part.url,\n                  title: part.title,\n                  ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n                });\n              }\n              if (sendSources && part.sourceType === \"document\") {\n                controller.enqueue({\n                  type: \"source-document\",\n                  sourceId: part.id,\n                  mediaType: part.mediaType,\n                  title: part.title,\n                  filename: part.filename,\n                  ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {}\n                });\n              }\n              break;\n            }\n            case \"tool-input-start\": {\n              const dynamic = isDynamic(part);\n              controller.enqueue({\n                type: \"tool-input-start\",\n                toolCallId: part.id,\n                toolName: part.toolName,\n                ...part.providerExecuted != null ? { providerExecuted: part.providerExecuted } : {},\n                ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {},\n                ...dynamic != null ? { dynamic } : {},\n                ...part.title != null ? { title: part.title } : {}\n              });\n              break;\n            }\n            case \"tool-input-delta\": {\n              controller.enqueue({\n                type: \"tool-input-delta\",\n                toolCallId: part.id,\n                inputTextDelta: part.delta\n              });\n              break;\n            }\n            case \"tool-call\": {\n              const dynamic = isDynamic(part);\n              if (part.invalid) {\n                controller.enqueue({\n                  type: \"tool-input-error\",\n                  toolCallId: part.toolCallId,\n                  toolName: part.toolName,\n                  input: part.input,\n                  ...part.providerExecuted != null ? { providerExecuted: part.providerExecuted } : {},\n                  ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {},\n                  ...dynamic != null ? { dynamic } : {},\n                  errorText: onError(part.error),\n                  ...part.title != null ? { title: part.title } : {}\n                });\n              } else {\n                controller.enqueue({\n                  type: \"tool-input-available\",\n                  toolCallId: part.toolCallId,\n                  toolName: part.toolName,\n                  input: part.input,\n                  ...part.providerExecuted != null ? { providerExecuted: part.providerExecuted } : {},\n                  ...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {},\n                  ...dynamic != null ? { dynamic } : {},\n                  ...part.title != null ? { title: part.title } : {}\n                });\n              }\n              break;\n            }\n            case \"tool-approval-request\": {\n              controller.enqueue({\n                type: \"tool-approval-request\",\n                approvalId: part.approvalId,\n                toolCallId: part.toolCall.toolCallId\n              });\n              break;\n            }\n            case \"tool-result\": {\n              const dynamic = isDynamic(part);\n              controller.enqueue({\n                type: \"tool-output-available\",\n                toolCallId: part.toolCallId,\n                output: part.output,\n                ...part.providerExecuted != null ? { providerExecuted: part.providerExecuted } : {},\n                ...part.preliminary != null ? { preliminary: part.preliminary } : {},\n                ...dynamic != null ? { dynamic } : {}\n              });\n              break;\n            }\n            case \"tool-error\": {\n              const dynamic = isDynamic(part);\n              controller.enqueue({\n                type: \"tool-output-error\",\n                toolCallId: part.toolCallId,\n                errorText: onError(part.error),\n                ...part.providerExecuted != null ? { providerExecuted: part.providerExecuted } : {},\n                ...dynamic != null ? { dynamic } : {}\n              });\n              break;\n            }\n            case \"tool-output-denied\": {\n              controller.enqueue({\n                type: \"tool-output-denied\",\n                toolCallId: part.toolCallId\n              });\n              break;\n            }\n            case \"error\": {\n              controller.enqueue({\n                type: \"error\",\n                errorText: onError(part.error)\n              });\n              break;\n            }\n            case \"start-step\": {\n              controller.enqueue({ type: \"start-step\" });\n              break;\n            }\n            case \"finish-step\": {\n              controller.enqueue({ type: \"finish-step\" });\n              break;\n            }\n            case \"start\": {\n              if (sendStart) {\n                controller.enqueue({\n                  type: \"start\",\n                  ...messageMetadataValue != null ? { messageMetadata: messageMetadataValue } : {},\n                  ...responseMessageId != null ? { messageId: responseMessageId } : {}\n                });\n              }\n              break;\n            }\n            case \"finish\": {\n              if (sendFinish) {\n                controller.enqueue({\n                  type: \"finish\",\n                  finishReason: part.finishReason,\n                  ...messageMetadataValue != null ? { messageMetadata: messageMetadataValue } : {}\n                });\n              }\n              break;\n            }\n            case \"abort\": {\n              controller.enqueue(part);\n              break;\n            }\n            case \"tool-input-end\": {\n              break;\n            }\n            case \"raw\": {\n              break;\n            }\n            default: {\n              const exhaustiveCheck = partType;\n              throw new Error(`Unknown chunk type: ${exhaustiveCheck}`);\n            }\n          }\n          if (messageMetadataValue != null && partType !== \"start\" && partType !== \"finish\") {\n            controller.enqueue({\n              type: \"message-metadata\",\n              messageMetadata: messageMetadataValue\n            });\n          }\n        }\n      })\n    );\n    return createAsyncIterableStream(\n      handleUIMessageStreamFinish({\n        stream: baseStream,\n        messageId: responseMessageId != null ? responseMessageId : generateMessageId == null ? void 0 : generateMessageId(),\n        originalMessages,\n        onFinish,\n        onError\n      })\n    );\n  }\n  pipeUIMessageStreamToResponse(response, {\n    originalMessages,\n    generateMessageId,\n    onFinish,\n    messageMetadata,\n    sendReasoning,\n    sendSources,\n    sendFinish,\n    sendStart,\n    onError,\n    ...init\n  } = {}) {\n    pipeUIMessageStreamToResponse({\n      response,\n      stream: this.toUIMessageStream({\n        originalMessages,\n        generateMessageId,\n        onFinish,\n        messageMetadata,\n        sendReasoning,\n        sendSources,\n        sendFinish,\n        sendStart,\n        onError\n      }),\n      ...init\n    });\n  }\n  pipeTextStreamToResponse(response, init) {\n    pipeTextStreamToResponse({\n      response,\n      textStream: this.textStream,\n      ...init\n    });\n  }\n  toUIMessageStreamResponse({\n    originalMessages,\n    generateMessageId,\n    onFinish,\n    messageMetadata,\n    sendReasoning,\n    sendSources,\n    sendFinish,\n    sendStart,\n    onError,\n    ...init\n  } = {}) {\n    return createUIMessageStreamResponse({\n      stream: this.toUIMessageStream({\n        originalMessages,\n        generateMessageId,\n        onFinish,\n        messageMetadata,\n        sendReasoning,\n        sendSources,\n        sendFinish,\n        sendStart,\n        onError\n      }),\n      ...init\n    });\n  }\n  toTextStreamResponse(init) {\n    return createTextStreamResponse({\n      textStream: this.textStream,\n      ...init\n    });\n  }\n};\n\n// src/agent/tool-loop-agent.ts\nvar ToolLoopAgent = class {\n  constructor(settings) {\n    this.version = \"agent-v1\";\n    this.settings = settings;\n  }\n  /**\n   * The id of the agent.\n   */\n  get id() {\n    return this.settings.id;\n  }\n  /**\n   * The tools that the agent can use.\n   */\n  get tools() {\n    return this.settings.tools;\n  }\n  async prepareCall(options) {\n    var _a20, _b, _c, _d;\n    const { onStepFinish: _settingsOnStepFinish, ...settingsWithoutCallback } = this.settings;\n    const baseCallArgs = {\n      ...settingsWithoutCallback,\n      stopWhen: (_a20 = this.settings.stopWhen) != null ? _a20 : stepCountIs(20),\n      ...options\n    };\n    const preparedCallArgs = (_d = await ((_c = (_b = this.settings).prepareCall) == null ? void 0 : _c.call(\n      _b,\n      baseCallArgs\n    ))) != null ? _d : baseCallArgs;\n    const { instructions, messages, prompt, ...callArgs } = preparedCallArgs;\n    return {\n      ...callArgs,\n      // restore prompt types\n      ...{ system: instructions, messages, prompt }\n    };\n  }\n  mergeOnStepFinishCallbacks(methodCallback) {\n    const constructorCallback = this.settings.onStepFinish;\n    if (methodCallback && constructorCallback) {\n      return async (stepResult) => {\n        await constructorCallback(stepResult);\n        await methodCallback(stepResult);\n      };\n    }\n    return methodCallback != null ? methodCallback : constructorCallback;\n  }\n  /**\n   * Generates an output from the agent (non-streaming).\n   */\n  async generate({\n    abortSignal,\n    timeout,\n    onStepFinish,\n    ...options\n  }) {\n    return generateText({\n      ...await this.prepareCall(options),\n      abortSignal,\n      timeout,\n      onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish)\n    });\n  }\n  /**\n   * Streams an output from the agent (streaming).\n   */\n  async stream({\n    abortSignal,\n    timeout,\n    experimental_transform,\n    onStepFinish,\n    ...options\n  }) {\n    return streamText({\n      ...await this.prepareCall(options),\n      abortSignal,\n      timeout,\n      experimental_transform,\n      onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish)\n    });\n  }\n};\n\n// src/ui-message-stream/create-ui-message-stream.ts\nimport {\n  generateId as generateIdFunc,\n  getErrorMessage as getErrorMessage8\n} from \"@ai-sdk/provider-utils\";\nfunction createUIMessageStream({\n  execute,\n  onError = getErrorMessage8,\n  originalMessages,\n  onFinish,\n  generateId: generateId2 = generateIdFunc\n}) {\n  let controller;\n  const ongoingStreamPromises = [];\n  const stream = new ReadableStream({\n    start(controllerArg) {\n      controller = controllerArg;\n    }\n  });\n  function safeEnqueue(data) {\n    try {\n      controller.enqueue(data);\n    } catch (error) {\n    }\n  }\n  try {\n    const result = execute({\n      writer: {\n        write(part) {\n          safeEnqueue(part);\n        },\n        merge(streamArg) {\n          ongoingStreamPromises.push(\n            (async () => {\n              const reader = streamArg.getReader();\n              while (true) {\n                const { done, value } = await reader.read();\n                if (done)\n                  break;\n                safeEnqueue(value);\n              }\n            })().catch((error) => {\n              safeEnqueue({\n                type: \"error\",\n                errorText: onError(error)\n              });\n            })\n          );\n        },\n        onError\n      }\n    });\n    if (result) {\n      ongoingStreamPromises.push(\n        result.catch((error) => {\n          safeEnqueue({\n            type: \"error\",\n            errorText: onError(error)\n          });\n        })\n      );\n    }\n  } catch (error) {\n    safeEnqueue({\n      type: \"error\",\n      errorText: onError(error)\n    });\n  }\n  const waitForStreams = new Promise(async (resolve3) => {\n    while (ongoingStreamPromises.length > 0) {\n      await ongoingStreamPromises.shift();\n    }\n    resolve3();\n  });\n  waitForStreams.finally(() => {\n    try {\n      controller.close();\n    } catch (error) {\n    }\n  });\n  return handleUIMessageStreamFinish({\n    stream,\n    messageId: generateId2(),\n    originalMessages,\n    onFinish,\n    onError\n  });\n}\n\n// src/ui-message-stream/read-ui-message-stream.ts\nfunction readUIMessageStream({\n  message,\n  stream,\n  onError,\n  terminateOnError = false\n}) {\n  var _a20;\n  let controller;\n  let hasErrored = false;\n  const outputStream = new ReadableStream({\n    start(controllerParam) {\n      controller = controllerParam;\n    }\n  });\n  const state = createStreamingUIMessageState({\n    messageId: (_a20 = message == null ? void 0 : message.id) != null ? _a20 : \"\",\n    lastMessage: message\n  });\n  const handleError = (error) => {\n    onError == null ? void 0 : onError(error);\n    if (!hasErrored && terminateOnError) {\n      hasErrored = true;\n      controller == null ? void 0 : controller.error(error);\n    }\n  };\n  consumeStream({\n    stream: processUIMessageStream({\n      stream,\n      runUpdateMessageJob(job) {\n        return job({\n          state,\n          write: () => {\n            controller == null ? void 0 : controller.enqueue(structuredClone(state.message));\n          }\n        });\n      },\n      onError: handleError\n    }),\n    onError: handleError\n  }).finally(() => {\n    if (!hasErrored) {\n      controller == null ? void 0 : controller.close();\n    }\n  });\n  return createAsyncIterableStream(outputStream);\n}\n\n// src/ui/convert-to-model-messages.ts\nimport {\n  isNonNullable\n} from \"@ai-sdk/provider-utils\";\nasync function convertToModelMessages(messages, options) {\n  const modelMessages = [];\n  if (options == null ? void 0 : options.ignoreIncompleteToolCalls) {\n    messages = messages.map((message) => ({\n      ...message,\n      parts: message.parts.filter(\n        (part) => !isToolUIPart(part) || part.state !== \"input-streaming\" && part.state !== \"input-available\"\n      )\n    }));\n  }\n  for (const message of messages) {\n    switch (message.role) {\n      case \"system\": {\n        const textParts = message.parts.filter(\n          (part) => part.type === \"text\"\n        );\n        const providerMetadata = textParts.reduce((acc, part) => {\n          if (part.providerMetadata != null) {\n            return { ...acc, ...part.providerMetadata };\n          }\n          return acc;\n        }, {});\n        modelMessages.push({\n          role: \"system\",\n          content: textParts.map((part) => part.text).join(\"\"),\n          ...Object.keys(providerMetadata).length > 0 ? { providerOptions: providerMetadata } : {}\n        });\n        break;\n      }\n      case \"user\": {\n        modelMessages.push({\n          role: \"user\",\n          content: message.parts.map((part) => {\n            var _a20;\n            if (isTextUIPart(part)) {\n              return {\n                type: \"text\",\n                text: part.text,\n                ...part.providerMetadata != null ? { providerOptions: part.providerMetadata } : {}\n              };\n            }\n            if (isFileUIPart(part)) {\n              return {\n                type: \"file\",\n                mediaType: part.mediaType,\n                filename: part.filename,\n                data: part.url,\n                ...part.providerMetadata != null ? { providerOptions: part.providerMetadata } : {}\n              };\n            }\n            if (isDataUIPart(part)) {\n              return (_a20 = options == null ? void 0 : options.convertDataPart) == null ? void 0 : _a20.call(\n                options,\n                part\n              );\n            }\n          }).filter(isNonNullable)\n        });\n        break;\n      }\n      case \"assistant\": {\n        if (message.parts != null) {\n          let block = [];\n          async function processBlock() {\n            var _a20, _b, _c, _d, _e, _f;\n            if (block.length === 0) {\n              return;\n            }\n            const content = [];\n            for (const part of block) {\n              if (isTextUIPart(part)) {\n                content.push({\n                  type: \"text\",\n                  text: part.text,\n                  ...part.providerMetadata != null ? { providerOptions: part.providerMetadata } : {}\n                });\n              } else if (isFileUIPart(part)) {\n                content.push({\n                  type: \"file\",\n                  mediaType: part.mediaType,\n                  filename: part.filename,\n                  data: part.url\n                });\n              } else if (isReasoningUIPart(part)) {\n                content.push({\n                  type: \"reasoning\",\n                  text: part.text,\n                  providerOptions: part.providerMetadata\n                });\n              } else if (isToolUIPart(part)) {\n                const toolName = getToolName(part);\n                if (part.state !== \"input-streaming\") {\n                  content.push({\n                    type: \"tool-call\",\n                    toolCallId: part.toolCallId,\n                    toolName,\n                    input: part.state === \"output-error\" ? (_a20 = part.input) != null ? _a20 : \"rawInput\" in part ? part.rawInput : void 0 : part.input,\n                    providerExecuted: part.providerExecuted,\n                    ...part.callProviderMetadata != null ? { providerOptions: part.callProviderMetadata } : {}\n                  });\n                  if (part.approval != null) {\n                    content.push({\n                      type: \"tool-approval-request\",\n                      approvalId: part.approval.id,\n                      toolCallId: part.toolCallId\n                    });\n                  }\n                  if (part.providerExecuted === true && part.state !== \"approval-responded\" && (part.state === \"output-available\" || part.state === \"output-error\")) {\n                    content.push({\n                      type: \"tool-result\",\n                      toolCallId: part.toolCallId,\n                      toolName,\n                      output: await createToolModelOutput({\n                        toolCallId: part.toolCallId,\n                        input: part.input,\n                        output: part.state === \"output-error\" ? part.errorText : part.output,\n                        tool: (_b = options == null ? void 0 : options.tools) == null ? void 0 : _b[toolName],\n                        errorMode: part.state === \"output-error\" ? \"json\" : \"none\"\n                      }),\n                      ...part.callProviderMetadata != null ? { providerOptions: part.callProviderMetadata } : {}\n                    });\n                  }\n                }\n              } else if (isDataUIPart(part)) {\n                const dataPart = (_c = options == null ? void 0 : options.convertDataPart) == null ? void 0 : _c.call(\n                  options,\n                  part\n                );\n                if (dataPart != null) {\n                  content.push(dataPart);\n                }\n              } else {\n                const _exhaustiveCheck = part;\n                throw new Error(`Unsupported part: ${_exhaustiveCheck}`);\n              }\n            }\n            modelMessages.push({\n              role: \"assistant\",\n              content\n            });\n            const toolParts = block.filter(\n              (part) => {\n                var _a21;\n                return isToolUIPart(part) && (part.providerExecuted !== true || ((_a21 = part.approval) == null ? void 0 : _a21.approved) != null);\n              }\n            );\n            if (toolParts.length > 0) {\n              {\n                const content2 = [];\n                for (const toolPart of toolParts) {\n                  if (((_d = toolPart.approval) == null ? void 0 : _d.approved) != null) {\n                    content2.push({\n                      type: \"tool-approval-response\",\n                      approvalId: toolPart.approval.id,\n                      approved: toolPart.approval.approved,\n                      reason: toolPart.approval.reason,\n                      providerExecuted: toolPart.providerExecuted\n                    });\n                  }\n                  if (toolPart.providerExecuted === true) {\n                    continue;\n                  }\n                  switch (toolPart.state) {\n                    case \"output-denied\": {\n                      content2.push({\n                        type: \"tool-result\",\n                        toolCallId: toolPart.toolCallId,\n                        toolName: getToolName(toolPart),\n                        output: {\n                          type: \"error-text\",\n                          value: (_e = toolPart.approval.reason) != null ? _e : \"Tool execution denied.\"\n                        },\n                        ...toolPart.callProviderMetadata != null ? { providerOptions: toolPart.callProviderMetadata } : {}\n                      });\n                      break;\n                    }\n                    case \"output-error\":\n                    case \"output-available\": {\n                      const toolName = getToolName(toolPart);\n                      content2.push({\n                        type: \"tool-result\",\n                        toolCallId: toolPart.toolCallId,\n                        toolName,\n                        output: await createToolModelOutput({\n                          toolCallId: toolPart.toolCallId,\n                          input: toolPart.input,\n                          output: toolPart.state === \"output-error\" ? toolPart.errorText : toolPart.output,\n                          tool: (_f = options == null ? void 0 : options.tools) == null ? void 0 : _f[toolName],\n                          errorMode: toolPart.state === \"output-error\" ? \"text\" : \"none\"\n                        }),\n                        ...toolPart.callProviderMetadata != null ? { providerOptions: toolPart.callProviderMetadata } : {}\n                      });\n                      break;\n                    }\n                  }\n                }\n                if (content2.length > 0) {\n                  modelMessages.push({\n                    role: \"tool\",\n                    content: content2\n                  });\n                }\n              }\n            }\n            block = [];\n          }\n          for (const part of message.parts) {\n            if (isTextUIPart(part) || isReasoningUIPart(part) || isFileUIPart(part) || isToolUIPart(part) || isDataUIPart(part)) {\n              block.push(part);\n            } else if (part.type === \"step-start\") {\n              await processBlock();\n            }\n          }\n          await processBlock();\n          break;\n        }\n        break;\n      }\n      default: {\n        const _exhaustiveCheck = message.role;\n        throw new MessageConversionError({\n          originalMessage: message,\n          message: `Unsupported role: ${_exhaustiveCheck}`\n        });\n      }\n    }\n  }\n  return modelMessages;\n}\n\n// src/ui/validate-ui-messages.ts\nimport { TypeValidationError as TypeValidationError3 } from \"@ai-sdk/provider\";\nimport {\n  lazySchema as lazySchema2,\n  validateTypes as validateTypes2,\n  zodSchema as zodSchema2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z8 } from \"zod/v4\";\nvar uiMessagesSchema = lazySchema2(\n  () => zodSchema2(\n    z8.array(\n      z8.object({\n        id: z8.string(),\n        role: z8.enum([\"system\", \"user\", \"assistant\"]),\n        metadata: z8.unknown().optional(),\n        parts: z8.array(\n          z8.union([\n            z8.object({\n              type: z8.literal(\"text\"),\n              text: z8.string(),\n              state: z8.enum([\"streaming\", \"done\"]).optional(),\n              providerMetadata: providerMetadataSchema.optional()\n            }),\n            z8.object({\n              type: z8.literal(\"reasoning\"),\n              text: z8.string(),\n              state: z8.enum([\"streaming\", \"done\"]).optional(),\n              providerMetadata: providerMetadataSchema.optional()\n            }),\n            z8.object({\n              type: z8.literal(\"source-url\"),\n              sourceId: z8.string(),\n              url: z8.string(),\n              title: z8.string().optional(),\n              providerMetadata: providerMetadataSchema.optional()\n            }),\n            z8.object({\n              type: z8.literal(\"source-document\"),\n              sourceId: z8.string(),\n              mediaType: z8.string(),\n              title: z8.string(),\n              filename: z8.string().optional(),\n              providerMetadata: providerMetadataSchema.optional()\n            }),\n            z8.object({\n              type: z8.literal(\"file\"),\n              mediaType: z8.string(),\n              filename: z8.string().optional(),\n              url: z8.string(),\n              providerMetadata: providerMetadataSchema.optional()\n            }),\n            z8.object({\n              type: z8.literal(\"step-start\")\n            }),\n            z8.object({\n              type: z8.string().startsWith(\"data-\"),\n              id: z8.string().optional(),\n              data: z8.unknown()\n            }),\n            z8.object({\n              type: z8.literal(\"dynamic-tool\"),\n              toolName: z8.string(),\n              toolCallId: z8.string(),\n              state: z8.literal(\"input-streaming\"),\n              input: z8.unknown().optional(),\n              providerExecuted: z8.boolean().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              approval: z8.never().optional()\n            }),\n            z8.object({\n              type: z8.literal(\"dynamic-tool\"),\n              toolName: z8.string(),\n              toolCallId: z8.string(),\n              state: z8.literal(\"input-available\"),\n              input: z8.unknown(),\n              providerExecuted: z8.boolean().optional(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.never().optional()\n            }),\n            z8.object({\n              type: z8.literal(\"dynamic-tool\"),\n              toolName: z8.string(),\n              toolCallId: z8.string(),\n              state: z8.literal(\"approval-requested\"),\n              input: z8.unknown(),\n              providerExecuted: z8.boolean().optional(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.never().optional(),\n                reason: z8.never().optional()\n              })\n            }),\n            z8.object({\n              type: z8.literal(\"dynamic-tool\"),\n              toolName: z8.string(),\n              toolCallId: z8.string(),\n              state: z8.literal(\"approval-responded\"),\n              input: z8.unknown(),\n              providerExecuted: z8.boolean().optional(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.boolean(),\n                reason: z8.string().optional()\n              })\n            }),\n            z8.object({\n              type: z8.literal(\"dynamic-tool\"),\n              toolName: z8.string(),\n              toolCallId: z8.string(),\n              state: z8.literal(\"output-available\"),\n              input: z8.unknown(),\n              providerExecuted: z8.boolean().optional(),\n              output: z8.unknown(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              preliminary: z8.boolean().optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.literal(true),\n                reason: z8.string().optional()\n              }).optional()\n            }),\n            z8.object({\n              type: z8.literal(\"dynamic-tool\"),\n              toolName: z8.string(),\n              toolCallId: z8.string(),\n              state: z8.literal(\"output-error\"),\n              input: z8.unknown(),\n              rawInput: z8.unknown().optional(),\n              providerExecuted: z8.boolean().optional(),\n              output: z8.never().optional(),\n              errorText: z8.string(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.literal(true),\n                reason: z8.string().optional()\n              }).optional()\n            }),\n            z8.object({\n              type: z8.literal(\"dynamic-tool\"),\n              toolName: z8.string(),\n              toolCallId: z8.string(),\n              state: z8.literal(\"output-denied\"),\n              input: z8.unknown(),\n              providerExecuted: z8.boolean().optional(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.literal(false),\n                reason: z8.string().optional()\n              })\n            }),\n            z8.object({\n              type: z8.string().startsWith(\"tool-\"),\n              toolCallId: z8.string(),\n              state: z8.literal(\"input-streaming\"),\n              providerExecuted: z8.boolean().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              input: z8.unknown().optional(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              approval: z8.never().optional()\n            }),\n            z8.object({\n              type: z8.string().startsWith(\"tool-\"),\n              toolCallId: z8.string(),\n              state: z8.literal(\"input-available\"),\n              providerExecuted: z8.boolean().optional(),\n              input: z8.unknown(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.never().optional()\n            }),\n            z8.object({\n              type: z8.string().startsWith(\"tool-\"),\n              toolCallId: z8.string(),\n              state: z8.literal(\"approval-requested\"),\n              input: z8.unknown(),\n              providerExecuted: z8.boolean().optional(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.never().optional(),\n                reason: z8.never().optional()\n              })\n            }),\n            z8.object({\n              type: z8.string().startsWith(\"tool-\"),\n              toolCallId: z8.string(),\n              state: z8.literal(\"approval-responded\"),\n              input: z8.unknown(),\n              providerExecuted: z8.boolean().optional(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.boolean(),\n                reason: z8.string().optional()\n              })\n            }),\n            z8.object({\n              type: z8.string().startsWith(\"tool-\"),\n              toolCallId: z8.string(),\n              state: z8.literal(\"output-available\"),\n              providerExecuted: z8.boolean().optional(),\n              input: z8.unknown(),\n              output: z8.unknown(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              preliminary: z8.boolean().optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.literal(true),\n                reason: z8.string().optional()\n              }).optional()\n            }),\n            z8.object({\n              type: z8.string().startsWith(\"tool-\"),\n              toolCallId: z8.string(),\n              state: z8.literal(\"output-error\"),\n              providerExecuted: z8.boolean().optional(),\n              input: z8.unknown(),\n              rawInput: z8.unknown().optional(),\n              output: z8.never().optional(),\n              errorText: z8.string(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.literal(true),\n                reason: z8.string().optional()\n              }).optional()\n            }),\n            z8.object({\n              type: z8.string().startsWith(\"tool-\"),\n              toolCallId: z8.string(),\n              state: z8.literal(\"output-denied\"),\n              providerExecuted: z8.boolean().optional(),\n              input: z8.unknown(),\n              output: z8.never().optional(),\n              errorText: z8.never().optional(),\n              callProviderMetadata: providerMetadataSchema.optional(),\n              approval: z8.object({\n                id: z8.string(),\n                approved: z8.literal(false),\n                reason: z8.string().optional()\n              })\n            })\n          ])\n        ).nonempty(\"Message must contain at least one part\")\n      })\n    ).nonempty(\"Messages array must not be empty\")\n  )\n);\nasync function safeValidateUIMessages({\n  messages,\n  metadataSchema,\n  dataSchemas,\n  tools\n}) {\n  try {\n    if (messages == null) {\n      return {\n        success: false,\n        error: new InvalidArgumentError({\n          parameter: \"messages\",\n          value: messages,\n          message: \"messages parameter must be provided\"\n        })\n      };\n    }\n    const validatedMessages = await validateTypes2({\n      value: messages,\n      schema: uiMessagesSchema\n    });\n    if (metadataSchema) {\n      for (const [msgIdx, message] of validatedMessages.entries()) {\n        await validateTypes2({\n          value: message.metadata,\n          schema: metadataSchema,\n          context: {\n            field: `messages[${msgIdx}].metadata`,\n            entityId: message.id\n          }\n        });\n      }\n    }\n    if (dataSchemas || tools) {\n      for (const [msgIdx, message] of validatedMessages.entries()) {\n        for (const [partIdx, part] of message.parts.entries()) {\n          if (dataSchemas && part.type.startsWith(\"data-\")) {\n            const dataPart = part;\n            const dataName = dataPart.type.slice(5);\n            const dataSchema = dataSchemas[dataName];\n            if (!dataSchema) {\n              return {\n                success: false,\n                error: new TypeValidationError3({\n                  value: dataPart.data,\n                  cause: `No data schema found for data part ${dataName}`,\n                  context: {\n                    field: `messages[${msgIdx}].parts[${partIdx}].data`,\n                    entityName: dataName,\n                    entityId: dataPart.id\n                  }\n                })\n              };\n            }\n            await validateTypes2({\n              value: dataPart.data,\n              schema: dataSchema,\n              context: {\n                field: `messages[${msgIdx}].parts[${partIdx}].data`,\n                entityName: dataName,\n                entityId: dataPart.id\n              }\n            });\n          }\n          if (tools && part.type.startsWith(\"tool-\")) {\n            const toolPart = part;\n            const toolName = toolPart.type.slice(5);\n            const tool2 = tools[toolName];\n            if (!tool2) {\n              return {\n                success: false,\n                error: new TypeValidationError3({\n                  value: toolPart.input,\n                  cause: `No tool schema found for tool part ${toolName}`,\n                  context: {\n                    field: `messages[${msgIdx}].parts[${partIdx}].input`,\n                    entityName: toolName,\n                    entityId: toolPart.toolCallId\n                  }\n                })\n              };\n            }\n            if (toolPart.state === \"input-available\" || toolPart.state === \"output-available\" || toolPart.state === \"output-error\" && toolPart.input !== void 0) {\n              await validateTypes2({\n                value: toolPart.input,\n                schema: tool2.inputSchema,\n                context: {\n                  field: `messages[${msgIdx}].parts[${partIdx}].input`,\n                  entityName: toolName,\n                  entityId: toolPart.toolCallId\n                }\n              });\n            }\n            if (toolPart.state === \"output-available\" && tool2.outputSchema) {\n              await validateTypes2({\n                value: toolPart.output,\n                schema: tool2.outputSchema,\n                context: {\n                  field: `messages[${msgIdx}].parts[${partIdx}].output`,\n                  entityName: toolName,\n                  entityId: toolPart.toolCallId\n                }\n              });\n            }\n          }\n        }\n      }\n    }\n    return {\n      success: true,\n      data: validatedMessages\n    };\n  } catch (error) {\n    const err = error;\n    return {\n      success: false,\n      error: err\n    };\n  }\n}\nasync function validateUIMessages({\n  messages,\n  metadataSchema,\n  dataSchemas,\n  tools\n}) {\n  const response = await safeValidateUIMessages({\n    messages,\n    metadataSchema,\n    dataSchemas,\n    tools\n  });\n  if (!response.success)\n    throw response.error;\n  return response.data;\n}\n\n// src/agent/create-agent-ui-stream.ts\nasync function createAgentUIStream({\n  agent,\n  uiMessages,\n  options,\n  abortSignal,\n  timeout,\n  experimental_transform,\n  onStepFinish,\n  ...uiMessageStreamOptions\n}) {\n  const validatedMessages = await validateUIMessages({\n    messages: uiMessages,\n    tools: agent.tools\n  });\n  const modelMessages = await convertToModelMessages(validatedMessages, {\n    tools: agent.tools\n  });\n  const result = await agent.stream({\n    prompt: modelMessages,\n    options,\n    abortSignal,\n    timeout,\n    experimental_transform,\n    onStepFinish\n  });\n  return result.toUIMessageStream(uiMessageStreamOptions);\n}\n\n// src/agent/create-agent-ui-stream-response.ts\nasync function createAgentUIStreamResponse({\n  headers,\n  status,\n  statusText,\n  consumeSseStream,\n  ...options\n}) {\n  return createUIMessageStreamResponse({\n    headers,\n    status,\n    statusText,\n    consumeSseStream,\n    stream: await createAgentUIStream(options)\n  });\n}\n\n// src/agent/pipe-agent-ui-stream-to-response.ts\nasync function pipeAgentUIStreamToResponse({\n  response,\n  headers,\n  status,\n  statusText,\n  consumeSseStream,\n  ...options\n}) {\n  pipeUIMessageStreamToResponse({\n    response,\n    headers,\n    status,\n    statusText,\n    consumeSseStream,\n    stream: await createAgentUIStream(options)\n  });\n}\n\n// src/embed/embed.ts\nimport { withUserAgentSuffix as withUserAgentSuffix3 } from \"@ai-sdk/provider-utils\";\nasync function embed({\n  model: modelArg,\n  value,\n  providerOptions,\n  maxRetries: maxRetriesArg,\n  abortSignal,\n  headers,\n  experimental_telemetry: telemetry\n}) {\n  const model = resolveEmbeddingModel(modelArg);\n  const { maxRetries, retry } = prepareRetries({\n    maxRetries: maxRetriesArg,\n    abortSignal\n  });\n  const headersWithUserAgent = withUserAgentSuffix3(\n    headers != null ? headers : {},\n    `ai/${VERSION}`\n  );\n  const baseTelemetryAttributes = getBaseTelemetryAttributes({\n    model,\n    telemetry,\n    headers: headersWithUserAgent,\n    settings: { maxRetries }\n  });\n  const tracer = getTracer(telemetry);\n  return recordSpan({\n    name: \"ai.embed\",\n    attributes: selectTelemetryAttributes({\n      telemetry,\n      attributes: {\n        ...assembleOperationName({ operationId: \"ai.embed\", telemetry }),\n        ...baseTelemetryAttributes,\n        \"ai.value\": { input: () => JSON.stringify(value) }\n      }\n    }),\n    tracer,\n    fn: async (span) => {\n      const { embedding, usage, warnings, response, providerMetadata } = await retry(\n        () => (\n          // nested spans to align with the embedMany telemetry data:\n          recordSpan({\n            name: \"ai.embed.doEmbed\",\n            attributes: selectTelemetryAttributes({\n              telemetry,\n              attributes: {\n                ...assembleOperationName({\n                  operationId: \"ai.embed.doEmbed\",\n                  telemetry\n                }),\n                ...baseTelemetryAttributes,\n                // specific settings that only make sense on the outer level:\n                \"ai.values\": { input: () => [JSON.stringify(value)] }\n              }\n            }),\n            tracer,\n            fn: async (doEmbedSpan) => {\n              var _a20;\n              const modelResponse = await model.doEmbed({\n                values: [value],\n                abortSignal,\n                headers: headersWithUserAgent,\n                providerOptions\n              });\n              const embedding2 = modelResponse.embeddings[0];\n              const usage2 = (_a20 = modelResponse.usage) != null ? _a20 : { tokens: NaN };\n              doEmbedSpan.setAttributes(\n                await selectTelemetryAttributes({\n                  telemetry,\n                  attributes: {\n                    \"ai.embeddings\": {\n                      output: () => modelResponse.embeddings.map(\n                        (embedding3) => JSON.stringify(embedding3)\n                      )\n                    },\n                    \"ai.usage.tokens\": usage2.tokens\n                  }\n                })\n              );\n              return {\n                embedding: embedding2,\n                usage: usage2,\n                warnings: modelResponse.warnings,\n                providerMetadata: modelResponse.providerMetadata,\n                response: modelResponse.response\n              };\n            }\n          })\n        )\n      );\n      span.setAttributes(\n        await selectTelemetryAttributes({\n          telemetry,\n          attributes: {\n            \"ai.embedding\": { output: () => JSON.stringify(embedding) },\n            \"ai.usage.tokens\": usage.tokens\n          }\n        })\n      );\n      logWarnings({ warnings, provider: model.provider, model: model.modelId });\n      return new DefaultEmbedResult({\n        value,\n        embedding,\n        usage,\n        warnings,\n        providerMetadata,\n        response\n      });\n    }\n  });\n}\nvar DefaultEmbedResult = class {\n  constructor(options) {\n    this.value = options.value;\n    this.embedding = options.embedding;\n    this.usage = options.usage;\n    this.warnings = options.warnings;\n    this.providerMetadata = options.providerMetadata;\n    this.response = options.response;\n  }\n};\n\n// src/embed/embed-many.ts\nimport { withUserAgentSuffix as withUserAgentSuffix4 } from \"@ai-sdk/provider-utils\";\n\n// src/util/split-array.ts\nfunction splitArray(array2, chunkSize) {\n  if (chunkSize <= 0) {\n    throw new Error(\"chunkSize must be greater than 0\");\n  }\n  const result = [];\n  for (let i = 0; i < array2.length; i += chunkSize) {\n    result.push(array2.slice(i, i + chunkSize));\n  }\n  return result;\n}\n\n// src/embed/embed-many.ts\nasync function embedMany({\n  model: modelArg,\n  values,\n  maxParallelCalls = Infinity,\n  maxRetries: maxRetriesArg,\n  abortSignal,\n  headers,\n  providerOptions,\n  experimental_telemetry: telemetry\n}) {\n  const model = resolveEmbeddingModel(modelArg);\n  const { maxRetries, retry } = prepareRetries({\n    maxRetries: maxRetriesArg,\n    abortSignal\n  });\n  const headersWithUserAgent = withUserAgentSuffix4(\n    headers != null ? headers : {},\n    `ai/${VERSION}`\n  );\n  const baseTelemetryAttributes = getBaseTelemetryAttributes({\n    model,\n    telemetry,\n    headers: headersWithUserAgent,\n    settings: { maxRetries }\n  });\n  const tracer = getTracer(telemetry);\n  return recordSpan({\n    name: \"ai.embedMany\",\n    attributes: selectTelemetryAttributes({\n      telemetry,\n      attributes: {\n        ...assembleOperationName({ operationId: \"ai.embedMany\", telemetry }),\n        ...baseTelemetryAttributes,\n        // specific settings that only make sense on the outer level:\n        \"ai.values\": {\n          input: () => values.map((value) => JSON.stringify(value))\n        }\n      }\n    }),\n    tracer,\n    fn: async (span) => {\n      var _a20;\n      const [maxEmbeddingsPerCall, supportsParallelCalls] = await Promise.all([\n        model.maxEmbeddingsPerCall,\n        model.supportsParallelCalls\n      ]);\n      if (maxEmbeddingsPerCall == null || maxEmbeddingsPerCall === Infinity) {\n        const { embeddings: embeddings2, usage, warnings: warnings2, response, providerMetadata: providerMetadata2 } = await retry(() => {\n          return recordSpan({\n            name: \"ai.embedMany.doEmbed\",\n            attributes: selectTelemetryAttributes({\n              telemetry,\n              attributes: {\n                ...assembleOperationName({\n                  operationId: \"ai.embedMany.doEmbed\",\n                  telemetry\n                }),\n                ...baseTelemetryAttributes,\n                // specific settings that only make sense on the outer level:\n                \"ai.values\": {\n                  input: () => values.map((value) => JSON.stringify(value))\n                }\n              }\n            }),\n            tracer,\n            fn: async (doEmbedSpan) => {\n              var _a21;\n              const modelResponse = await model.doEmbed({\n                values,\n                abortSignal,\n                headers: headersWithUserAgent,\n                providerOptions\n              });\n              const embeddings3 = modelResponse.embeddings;\n              const usage2 = (_a21 = modelResponse.usage) != null ? _a21 : { tokens: NaN };\n              doEmbedSpan.setAttributes(\n                await selectTelemetryAttributes({\n                  telemetry,\n                  attributes: {\n                    \"ai.embeddings\": {\n                      output: () => embeddings3.map(\n                        (embedding) => JSON.stringify(embedding)\n                      )\n                    },\n                    \"ai.usage.tokens\": usage2.tokens\n                  }\n                })\n              );\n              return {\n                embeddings: embeddings3,\n                usage: usage2,\n                warnings: modelResponse.warnings,\n                providerMetadata: modelResponse.providerMetadata,\n                response: modelResponse.response\n              };\n            }\n          });\n        });\n        span.setAttributes(\n          await selectTelemetryAttributes({\n            telemetry,\n            attributes: {\n              \"ai.embeddings\": {\n                output: () => embeddings2.map((embedding) => JSON.stringify(embedding))\n              },\n              \"ai.usage.tokens\": usage.tokens\n            }\n          })\n        );\n        logWarnings({\n          warnings: warnings2,\n          provider: model.provider,\n          model: model.modelId\n        });\n        return new DefaultEmbedManyResult({\n          values,\n          embeddings: embeddings2,\n          usage,\n          warnings: warnings2,\n          providerMetadata: providerMetadata2,\n          responses: [response]\n        });\n      }\n      const valueChunks = splitArray(values, maxEmbeddingsPerCall);\n      const embeddings = [];\n      const warnings = [];\n      const responses = [];\n      let tokens = 0;\n      let providerMetadata;\n      const parallelChunks = splitArray(\n        valueChunks,\n        supportsParallelCalls ? maxParallelCalls : 1\n      );\n      for (const parallelChunk of parallelChunks) {\n        const results = await Promise.all(\n          parallelChunk.map((chunk) => {\n            return retry(() => {\n              return recordSpan({\n                name: \"ai.embedMany.doEmbed\",\n                attributes: selectTelemetryAttributes({\n                  telemetry,\n                  attributes: {\n                    ...assembleOperationName({\n                      operationId: \"ai.embedMany.doEmbed\",\n                      telemetry\n                    }),\n                    ...baseTelemetryAttributes,\n                    // specific settings that only make sense on the outer level:\n                    \"ai.values\": {\n                      input: () => chunk.map((value) => JSON.stringify(value))\n                    }\n                  }\n                }),\n                tracer,\n                fn: async (doEmbedSpan) => {\n                  var _a21;\n                  const modelResponse = await model.doEmbed({\n                    values: chunk,\n                    abortSignal,\n                    headers: headersWithUserAgent,\n                    providerOptions\n                  });\n                  const embeddings2 = modelResponse.embeddings;\n                  const usage = (_a21 = modelResponse.usage) != null ? _a21 : { tokens: NaN };\n                  doEmbedSpan.setAttributes(\n                    await selectTelemetryAttributes({\n                      telemetry,\n                      attributes: {\n                        \"ai.embeddings\": {\n                          output: () => embeddings2.map(\n                            (embedding) => JSON.stringify(embedding)\n                          )\n                        },\n                        \"ai.usage.tokens\": usage.tokens\n                      }\n                    })\n                  );\n                  return {\n                    embeddings: embeddings2,\n                    usage,\n                    warnings: modelResponse.warnings,\n                    providerMetadata: modelResponse.providerMetadata,\n                    response: modelResponse.response\n                  };\n                }\n              });\n            });\n          })\n        );\n        for (const result of results) {\n          embeddings.push(...result.embeddings);\n          warnings.push(...result.warnings);\n          responses.push(result.response);\n          tokens += result.usage.tokens;\n          if (result.providerMetadata) {\n            if (!providerMetadata) {\n              providerMetadata = { ...result.providerMetadata };\n            } else {\n              for (const [providerName, metadata] of Object.entries(\n                result.providerMetadata\n              )) {\n                providerMetadata[providerName] = {\n                  ...(_a20 = providerMetadata[providerName]) != null ? _a20 : {},\n                  ...metadata\n                };\n              }\n            }\n          }\n        }\n      }\n      span.setAttributes(\n        await selectTelemetryAttributes({\n          telemetry,\n          attributes: {\n            \"ai.embeddings\": {\n              output: () => embeddings.map((embedding) => JSON.stringify(embedding))\n            },\n            \"ai.usage.tokens\": tokens\n          }\n        })\n      );\n      logWarnings({\n        warnings,\n        provider: model.provider,\n        model: model.modelId\n      });\n      return new DefaultEmbedManyResult({\n        values,\n        embeddings,\n        usage: { tokens },\n        warnings,\n        providerMetadata,\n        responses\n      });\n    }\n  });\n}\nvar DefaultEmbedManyResult = class {\n  constructor(options) {\n    this.values = options.values;\n    this.embeddings = options.embeddings;\n    this.usage = options.usage;\n    this.warnings = options.warnings;\n    this.providerMetadata = options.providerMetadata;\n    this.responses = options.responses;\n  }\n};\n\n// src/generate-image/generate-image.ts\nimport {\n  convertBase64ToUint8Array as convertBase64ToUint8Array4,\n  withUserAgentSuffix as withUserAgentSuffix5\n} from \"@ai-sdk/provider-utils\";\nasync function generateImage({\n  model: modelArg,\n  prompt: promptArg,\n  n = 1,\n  maxImagesPerCall,\n  size,\n  aspectRatio,\n  seed,\n  providerOptions,\n  maxRetries: maxRetriesArg,\n  abortSignal,\n  headers\n}) {\n  var _a20, _b;\n  const model = resolveImageModel(modelArg);\n  const headersWithUserAgent = withUserAgentSuffix5(\n    headers != null ? headers : {},\n    `ai/${VERSION}`\n  );\n  const { retry } = prepareRetries({\n    maxRetries: maxRetriesArg,\n    abortSignal\n  });\n  const maxImagesPerCallWithDefault = (_a20 = maxImagesPerCall != null ? maxImagesPerCall : await invokeModelMaxImagesPerCall(model)) != null ? _a20 : 1;\n  const callCount = Math.ceil(n / maxImagesPerCallWithDefault);\n  const callImageCounts = Array.from({ length: callCount }, (_, i) => {\n    if (i < callCount - 1) {\n      return maxImagesPerCallWithDefault;\n    }\n    const remainder = n % maxImagesPerCallWithDefault;\n    return remainder === 0 ? maxImagesPerCallWithDefault : remainder;\n  });\n  const results = await Promise.all(\n    callImageCounts.map(\n      async (callImageCount) => retry(() => {\n        const { prompt, files, mask } = normalizePrompt(promptArg);\n        return model.doGenerate({\n          prompt,\n          files,\n          mask,\n          n: callImageCount,\n          abortSignal,\n          headers: headersWithUserAgent,\n          size,\n          aspectRatio,\n          seed,\n          providerOptions: providerOptions != null ? providerOptions : {}\n        });\n      })\n    )\n  );\n  const images = [];\n  const warnings = [];\n  const responses = [];\n  const providerMetadata = {};\n  let totalUsage = {\n    inputTokens: void 0,\n    outputTokens: void 0,\n    totalTokens: void 0\n  };\n  for (const result of results) {\n    images.push(\n      ...result.images.map(\n        (image) => {\n          var _a21;\n          return new DefaultGeneratedFile({\n            data: image,\n            mediaType: (_a21 = detectMediaType({\n              data: image,\n              signatures: imageMediaTypeSignatures\n            })) != null ? _a21 : \"image/png\"\n          });\n        }\n      )\n    );\n    warnings.push(...result.warnings);\n    if (result.usage != null) {\n      totalUsage = addImageModelUsage(totalUsage, result.usage);\n    }\n    if (result.providerMetadata) {\n      for (const [providerName, metadata] of Object.entries(result.providerMetadata)) {\n        if (providerName === \"gateway\") {\n          const currentEntry = providerMetadata[providerName];\n          if (currentEntry != null && typeof currentEntry === \"object\") {\n            providerMetadata[providerName] = {\n              ...currentEntry,\n              ...metadata\n            };\n          } else {\n            providerMetadata[providerName] = metadata;\n          }\n          const imagesValue = providerMetadata[providerName].images;\n          if (Array.isArray(imagesValue) && imagesValue.length === 0) {\n            delete providerMetadata[providerName].images;\n          }\n        } else {\n          (_b = providerMetadata[providerName]) != null ? _b : providerMetadata[providerName] = { images: [] };\n          providerMetadata[providerName].images.push(\n            ...result.providerMetadata[providerName].images\n          );\n        }\n      }\n    }\n    responses.push(result.response);\n  }\n  logWarnings({ warnings, provider: model.provider, model: model.modelId });\n  if (!images.length) {\n    throw new NoImageGeneratedError({ responses });\n  }\n  return new DefaultGenerateImageResult({\n    images,\n    warnings,\n    responses,\n    providerMetadata,\n    usage: totalUsage\n  });\n}\nvar DefaultGenerateImageResult = class {\n  constructor(options) {\n    this.images = options.images;\n    this.warnings = options.warnings;\n    this.responses = options.responses;\n    this.providerMetadata = options.providerMetadata;\n    this.usage = options.usage;\n  }\n  get image() {\n    return this.images[0];\n  }\n};\nasync function invokeModelMaxImagesPerCall(model) {\n  const isFunction = model.maxImagesPerCall instanceof Function;\n  if (!isFunction) {\n    return model.maxImagesPerCall;\n  }\n  return model.maxImagesPerCall({\n    modelId: model.modelId\n  });\n}\nfunction normalizePrompt(prompt) {\n  if (typeof prompt === \"string\") {\n    return { prompt, files: void 0, mask: void 0 };\n  }\n  return {\n    prompt: prompt.text,\n    files: prompt.images.map(toImageModelV3File),\n    mask: prompt.mask ? toImageModelV3File(prompt.mask) : void 0\n  };\n}\nfunction toImageModelV3File(dataContent) {\n  if (typeof dataContent === \"string\" && dataContent.startsWith(\"http\")) {\n    return {\n      type: \"url\",\n      url: dataContent\n    };\n  }\n  if (typeof dataContent === \"string\" && dataContent.startsWith(\"data:\")) {\n    const { mediaType: dataUrlMediaType, base64Content } = splitDataUrl(dataContent);\n    if (base64Content != null) {\n      const uint8Data2 = convertBase64ToUint8Array4(base64Content);\n      return {\n        type: \"file\",\n        data: uint8Data2,\n        mediaType: dataUrlMediaType || detectMediaType({\n          data: uint8Data2,\n          signatures: imageMediaTypeSignatures\n        }) || \"image/png\"\n      };\n    }\n  }\n  const uint8Data = convertDataContentToUint8Array(dataContent);\n  return {\n    type: \"file\",\n    data: uint8Data,\n    mediaType: detectMediaType({\n      data: uint8Data,\n      signatures: imageMediaTypeSignatures\n    }) || \"image/png\"\n  };\n}\n\n// src/generate-image/index.ts\nvar experimental_generateImage = generateImage;\n\n// src/generate-object/generate-object.ts\nimport {\n  createIdGenerator as createIdGenerator3,\n  withUserAgentSuffix as withUserAgentSuffix6\n} from \"@ai-sdk/provider-utils\";\n\n// src/generate-text/extract-reasoning-content.ts\nfunction extractReasoningContent(content) {\n  const parts = content.filter(\n    (content2) => content2.type === \"reasoning\"\n  );\n  return parts.length === 0 ? void 0 : parts.map((content2) => content2.text).join(\"\\n\");\n}\n\n// src/generate-object/output-strategy.ts\nimport {\n  isJSONArray,\n  isJSONObject,\n  TypeValidationError as TypeValidationError4,\n  UnsupportedFunctionalityError as UnsupportedFunctionalityError3\n} from \"@ai-sdk/provider\";\nimport {\n  asSchema as asSchema4,\n  safeValidateTypes as safeValidateTypes4\n} from \"@ai-sdk/provider-utils\";\nvar noSchemaOutputStrategy = {\n  type: \"no-schema\",\n  jsonSchema: async () => void 0,\n  async validatePartialResult({ value, textDelta }) {\n    return { success: true, value: { partial: value, textDelta } };\n  },\n  async validateFinalResult(value, context2) {\n    return value === void 0 ? {\n      success: false,\n      error: new NoObjectGeneratedError({\n        message: \"No object generated: response did not match schema.\",\n        text: context2.text,\n        response: context2.response,\n        usage: context2.usage,\n        finishReason: context2.finishReason\n      })\n    } : { success: true, value };\n  },\n  createElementStream() {\n    throw new UnsupportedFunctionalityError3({\n      functionality: \"element streams in no-schema mode\"\n    });\n  }\n};\nvar objectOutputStrategy = (schema) => ({\n  type: \"object\",\n  jsonSchema: async () => await schema.jsonSchema,\n  async validatePartialResult({ value, textDelta }) {\n    return {\n      success: true,\n      value: {\n        // Note: currently no validation of partial results:\n        partial: value,\n        textDelta\n      }\n    };\n  },\n  async validateFinalResult(value) {\n    return safeValidateTypes4({ value, schema });\n  },\n  createElementStream() {\n    throw new UnsupportedFunctionalityError3({\n      functionality: \"element streams in object mode\"\n    });\n  }\n});\nvar arrayOutputStrategy = (schema) => {\n  return {\n    type: \"array\",\n    // wrap in object that contains array of elements, since most LLMs will not\n    // be able to generate an array directly:\n    // possible future optimization: use arrays directly when model supports grammar-guided generation\n    jsonSchema: async () => {\n      const { $schema, ...itemSchema } = await schema.jsonSchema;\n      return {\n        $schema: \"http://json-schema.org/draft-07/schema#\",\n        type: \"object\",\n        properties: {\n          elements: { type: \"array\", items: itemSchema }\n        },\n        required: [\"elements\"],\n        additionalProperties: false\n      };\n    },\n    async validatePartialResult({\n      value,\n      latestObject,\n      isFirstDelta,\n      isFinalDelta\n    }) {\n      var _a20;\n      if (!isJSONObject(value) || !isJSONArray(value.elements)) {\n        return {\n          success: false,\n          error: new TypeValidationError4({\n            value,\n            cause: \"value must be an object that contains an array of elements\"\n          })\n        };\n      }\n      const inputArray = value.elements;\n      const resultArray = [];\n      for (let i = 0; i < inputArray.length; i++) {\n        const element = inputArray[i];\n        const result = await safeValidateTypes4({ value: element, schema });\n        if (i === inputArray.length - 1 && !isFinalDelta) {\n          continue;\n        }\n        if (!result.success) {\n          return result;\n        }\n        resultArray.push(result.value);\n      }\n      const publishedElementCount = (_a20 = latestObject == null ? void 0 : latestObject.length) != null ? _a20 : 0;\n      let textDelta = \"\";\n      if (isFirstDelta) {\n        textDelta += \"[\";\n      }\n      if (publishedElementCount > 0) {\n        textDelta += \",\";\n      }\n      textDelta += resultArray.slice(publishedElementCount).map((element) => JSON.stringify(element)).join(\",\");\n      if (isFinalDelta) {\n        textDelta += \"]\";\n      }\n      return {\n        success: true,\n        value: {\n          partial: resultArray,\n          textDelta\n        }\n      };\n    },\n    async validateFinalResult(value) {\n      if (!isJSONObject(value) || !isJSONArray(value.elements)) {\n        return {\n          success: false,\n          error: new TypeValidationError4({\n            value,\n            cause: \"value must be an object that contains an array of elements\"\n          })\n        };\n      }\n      const inputArray = value.elements;\n      for (const element of inputArray) {\n        const result = await safeValidateTypes4({ value: element, schema });\n        if (!result.success) {\n          return result;\n        }\n      }\n      return { success: true, value: inputArray };\n    },\n    createElementStream(originalStream) {\n      let publishedElements = 0;\n      return createAsyncIterableStream(\n        originalStream.pipeThrough(\n          new TransformStream({\n            transform(chunk, controller) {\n              switch (chunk.type) {\n                case \"object\": {\n                  const array2 = chunk.object;\n                  for (; publishedElements < array2.length; publishedElements++) {\n                    controller.enqueue(array2[publishedElements]);\n                  }\n                  break;\n                }\n                case \"text-delta\":\n                case \"finish\":\n                case \"error\":\n                  break;\n                default: {\n                  const _exhaustiveCheck = chunk;\n                  throw new Error(\n                    `Unsupported chunk type: ${_exhaustiveCheck}`\n                  );\n                }\n              }\n            }\n          })\n        )\n      );\n    }\n  };\n};\nvar enumOutputStrategy = (enumValues) => {\n  return {\n    type: \"enum\",\n    // wrap in object that contains result, since most LLMs will not\n    // be able to generate an enum value directly:\n    // possible future optimization: use enums directly when model supports top-level enums\n    jsonSchema: async () => ({\n      $schema: \"http://json-schema.org/draft-07/schema#\",\n      type: \"object\",\n      properties: {\n        result: { type: \"string\", enum: enumValues }\n      },\n      required: [\"result\"],\n      additionalProperties: false\n    }),\n    async validateFinalResult(value) {\n      if (!isJSONObject(value) || typeof value.result !== \"string\") {\n        return {\n          success: false,\n          error: new TypeValidationError4({\n            value,\n            cause: 'value must be an object that contains a string in the \"result\" property.'\n          })\n        };\n      }\n      const result = value.result;\n      return enumValues.includes(result) ? { success: true, value: result } : {\n        success: false,\n        error: new TypeValidationError4({\n          value,\n          cause: \"value must be a string in the enum\"\n        })\n      };\n    },\n    async validatePartialResult({ value, textDelta }) {\n      if (!isJSONObject(value) || typeof value.result !== \"string\") {\n        return {\n          success: false,\n          error: new TypeValidationError4({\n            value,\n            cause: 'value must be an object that contains a string in the \"result\" property.'\n          })\n        };\n      }\n      const result = value.result;\n      const possibleEnumValues = enumValues.filter(\n        (enumValue) => enumValue.startsWith(result)\n      );\n      if (value.result.length === 0 || possibleEnumValues.length === 0) {\n        return {\n          success: false,\n          error: new TypeValidationError4({\n            value,\n            cause: \"value must be a string in the enum\"\n          })\n        };\n      }\n      return {\n        success: true,\n        value: {\n          partial: possibleEnumValues.length > 1 ? result : possibleEnumValues[0],\n          textDelta\n        }\n      };\n    },\n    createElementStream() {\n      throw new UnsupportedFunctionalityError3({\n        functionality: \"element streams in enum mode\"\n      });\n    }\n  };\n};\nfunction getOutputStrategy({\n  output,\n  schema,\n  enumValues\n}) {\n  switch (output) {\n    case \"object\":\n      return objectOutputStrategy(asSchema4(schema));\n    case \"array\":\n      return arrayOutputStrategy(asSchema4(schema));\n    case \"enum\":\n      return enumOutputStrategy(enumValues);\n    case \"no-schema\":\n      return noSchemaOutputStrategy;\n    default: {\n      const _exhaustiveCheck = output;\n      throw new Error(`Unsupported output: ${_exhaustiveCheck}`);\n    }\n  }\n}\n\n// src/generate-object/parse-and-validate-object-result.ts\nimport { JSONParseError as JSONParseError2, TypeValidationError as TypeValidationError5 } from \"@ai-sdk/provider\";\nimport { safeParseJSON as safeParseJSON4 } from \"@ai-sdk/provider-utils\";\nasync function parseAndValidateObjectResult(result, outputStrategy, context2) {\n  const parseResult = await safeParseJSON4({ text: result });\n  if (!parseResult.success) {\n    throw new NoObjectGeneratedError({\n      message: \"No object generated: could not parse the response.\",\n      cause: parseResult.error,\n      text: result,\n      response: context2.response,\n      usage: context2.usage,\n      finishReason: context2.finishReason\n    });\n  }\n  const validationResult = await outputStrategy.validateFinalResult(\n    parseResult.value,\n    {\n      text: result,\n      response: context2.response,\n      usage: context2.usage\n    }\n  );\n  if (!validationResult.success) {\n    throw new NoObjectGeneratedError({\n      message: \"No object generated: response did not match schema.\",\n      cause: validationResult.error,\n      text: result,\n      response: context2.response,\n      usage: context2.usage,\n      finishReason: context2.finishReason\n    });\n  }\n  return validationResult.value;\n}\nasync function parseAndValidateObjectResultWithRepair(result, outputStrategy, repairText, context2) {\n  try {\n    return await parseAndValidateObjectResult(result, outputStrategy, context2);\n  } catch (error) {\n    if (repairText != null && NoObjectGeneratedError.isInstance(error) && (JSONParseError2.isInstance(error.cause) || TypeValidationError5.isInstance(error.cause))) {\n      const repairedText = await repairText({\n        text: result,\n        error: error.cause\n      });\n      if (repairedText === null) {\n        throw error;\n      }\n      return await parseAndValidateObjectResult(\n        repairedText,\n        outputStrategy,\n        context2\n      );\n    }\n    throw error;\n  }\n}\n\n// src/generate-object/validate-object-generation-input.ts\nfunction validateObjectGenerationInput({\n  output,\n  schema,\n  schemaName,\n  schemaDescription,\n  enumValues\n}) {\n  if (output != null && output !== \"object\" && output !== \"array\" && output !== \"enum\" && output !== \"no-schema\") {\n    throw new InvalidArgumentError({\n      parameter: \"output\",\n      value: output,\n      message: \"Invalid output type.\"\n    });\n  }\n  if (output === \"no-schema\") {\n    if (schema != null) {\n      throw new InvalidArgumentError({\n        parameter: \"schema\",\n        value: schema,\n        message: \"Schema is not supported for no-schema output.\"\n      });\n    }\n    if (schemaDescription != null) {\n      throw new InvalidArgumentError({\n        parameter: \"schemaDescription\",\n        value: schemaDescription,\n        message: \"Schema description is not supported for no-schema output.\"\n      });\n    }\n    if (schemaName != null) {\n      throw new InvalidArgumentError({\n        parameter: \"schemaName\",\n        value: schemaName,\n        message: \"Schema name is not supported for no-schema output.\"\n      });\n    }\n    if (enumValues != null) {\n      throw new InvalidArgumentError({\n        parameter: \"enumValues\",\n        value: enumValues,\n        message: \"Enum values are not supported for no-schema output.\"\n      });\n    }\n  }\n  if (output === \"object\") {\n    if (schema == null) {\n      throw new InvalidArgumentError({\n        parameter: \"schema\",\n        value: schema,\n        message: \"Schema is required for object output.\"\n      });\n    }\n    if (enumValues != null) {\n      throw new InvalidArgumentError({\n        parameter: \"enumValues\",\n        value: enumValues,\n        message: \"Enum values are not supported for object output.\"\n      });\n    }\n  }\n  if (output === \"array\") {\n    if (schema == null) {\n      throw new InvalidArgumentError({\n        parameter: \"schema\",\n        value: schema,\n        message: \"Element schema is required for array output.\"\n      });\n    }\n    if (enumValues != null) {\n      throw new InvalidArgumentError({\n        parameter: \"enumValues\",\n        value: enumValues,\n        message: \"Enum values are not supported for array output.\"\n      });\n    }\n  }\n  if (output === \"enum\") {\n    if (schema != null) {\n      throw new InvalidArgumentError({\n        parameter: \"schema\",\n        value: schema,\n        message: \"Schema is not supported for enum output.\"\n      });\n    }\n    if (schemaDescription != null) {\n      throw new InvalidArgumentError({\n        parameter: \"schemaDescription\",\n        value: schemaDescription,\n        message: \"Schema description is not supported for enum output.\"\n      });\n    }\n    if (schemaName != null) {\n      throw new InvalidArgumentError({\n        parameter: \"schemaName\",\n        value: schemaName,\n        message: \"Schema name is not supported for enum output.\"\n      });\n    }\n    if (enumValues == null) {\n      throw new InvalidArgumentError({\n        parameter: \"enumValues\",\n        value: enumValues,\n        message: \"Enum values are required for enum output.\"\n      });\n    }\n    for (const value of enumValues) {\n      if (typeof value !== \"string\") {\n        throw new InvalidArgumentError({\n          parameter: \"enumValues\",\n          value,\n          message: \"Enum values must be strings.\"\n        });\n      }\n    }\n  }\n}\n\n// src/generate-object/generate-object.ts\nvar originalGenerateId3 = createIdGenerator3({ prefix: \"aiobj\", size: 24 });\nasync function generateObject(options) {\n  const {\n    model: modelArg,\n    output = \"object\",\n    system,\n    prompt,\n    messages,\n    maxRetries: maxRetriesArg,\n    abortSignal,\n    headers,\n    experimental_repairText: repairText,\n    experimental_telemetry: telemetry,\n    experimental_download: download2,\n    providerOptions,\n    _internal: {\n      generateId: generateId2 = originalGenerateId3,\n      currentDate = () => /* @__PURE__ */ new Date()\n    } = {},\n    ...settings\n  } = options;\n  const model = resolveLanguageModel(modelArg);\n  const enumValues = \"enum\" in options ? options.enum : void 0;\n  const {\n    schema: inputSchema,\n    schemaDescription,\n    schemaName\n  } = \"schema\" in options ? options : {};\n  validateObjectGenerationInput({\n    output,\n    schema: inputSchema,\n    schemaName,\n    schemaDescription,\n    enumValues\n  });\n  const { maxRetries, retry } = prepareRetries({\n    maxRetries: maxRetriesArg,\n    abortSignal\n  });\n  const outputStrategy = getOutputStrategy({\n    output,\n    schema: inputSchema,\n    enumValues\n  });\n  const callSettings = prepareCallSettings(settings);\n  const headersWithUserAgent = withUserAgentSuffix6(\n    headers != null ? headers : {},\n    `ai/${VERSION}`\n  );\n  const baseTelemetryAttributes = getBaseTelemetryAttributes({\n    model,\n    telemetry,\n    headers: headersWithUserAgent,\n    settings: { ...callSettings, maxRetries }\n  });\n  const tracer = getTracer(telemetry);\n  const jsonSchema2 = await outputStrategy.jsonSchema();\n  try {\n    return await recordSpan({\n      name: \"ai.generateObject\",\n      attributes: selectTelemetryAttributes({\n        telemetry,\n        attributes: {\n          ...assembleOperationName({\n            operationId: \"ai.generateObject\",\n            telemetry\n          }),\n          ...baseTelemetryAttributes,\n          // specific settings that only make sense on the outer level:\n          \"ai.prompt\": {\n            input: () => JSON.stringify({ system, prompt, messages })\n          },\n          \"ai.schema\": jsonSchema2 != null ? { input: () => JSON.stringify(jsonSchema2) } : void 0,\n          \"ai.schema.name\": schemaName,\n          \"ai.schema.description\": schemaDescription,\n          \"ai.settings.output\": outputStrategy.type\n        }\n      }),\n      tracer,\n      fn: async (span) => {\n        var _a20;\n        let result;\n        let finishReason;\n        let usage;\n        let warnings;\n        let response;\n        let request;\n        let resultProviderMetadata;\n        let reasoning;\n        const standardizedPrompt = await standardizePrompt({\n          system,\n          prompt,\n          messages\n        });\n        const promptMessages = await convertToLanguageModelPrompt({\n          prompt: standardizedPrompt,\n          supportedUrls: await model.supportedUrls,\n          download: download2\n        });\n        const generateResult = await retry(\n          () => recordSpan({\n            name: \"ai.generateObject.doGenerate\",\n            attributes: selectTelemetryAttributes({\n              telemetry,\n              attributes: {\n                ...assembleOperationName({\n                  operationId: \"ai.generateObject.doGenerate\",\n                  telemetry\n                }),\n                ...baseTelemetryAttributes,\n                \"ai.prompt.messages\": {\n                  input: () => stringifyForTelemetry(promptMessages)\n                },\n                // standardized gen-ai llm span attributes:\n                \"gen_ai.system\": model.provider,\n                \"gen_ai.request.model\": model.modelId,\n                \"gen_ai.request.frequency_penalty\": callSettings.frequencyPenalty,\n                \"gen_ai.request.max_tokens\": callSettings.maxOutputTokens,\n                \"gen_ai.request.presence_penalty\": callSettings.presencePenalty,\n                \"gen_ai.request.temperature\": callSettings.temperature,\n                \"gen_ai.request.top_k\": callSettings.topK,\n                \"gen_ai.request.top_p\": callSettings.topP\n              }\n            }),\n            tracer,\n            fn: async (span2) => {\n              var _a21, _b, _c, _d, _e, _f, _g, _h;\n              const result2 = await model.doGenerate({\n                responseFormat: {\n                  type: \"json\",\n                  schema: jsonSchema2,\n                  name: schemaName,\n                  description: schemaDescription\n                },\n                ...prepareCallSettings(settings),\n                prompt: promptMessages,\n                providerOptions,\n                abortSignal,\n                headers: headersWithUserAgent\n              });\n              const responseData = {\n                id: (_b = (_a21 = result2.response) == null ? void 0 : _a21.id) != null ? _b : generateId2(),\n                timestamp: (_d = (_c = result2.response) == null ? void 0 : _c.timestamp) != null ? _d : currentDate(),\n                modelId: (_f = (_e = result2.response) == null ? void 0 : _e.modelId) != null ? _f : model.modelId,\n                headers: (_g = result2.response) == null ? void 0 : _g.headers,\n                body: (_h = result2.response) == null ? void 0 : _h.body\n              };\n              const text2 = extractTextContent(result2.content);\n              const reasoning2 = extractReasoningContent(result2.content);\n              if (text2 === void 0) {\n                throw new NoObjectGeneratedError({\n                  message: \"No object generated: the model did not return a response.\",\n                  response: responseData,\n                  usage: asLanguageModelUsage(result2.usage),\n                  finishReason: result2.finishReason.unified\n                });\n              }\n              span2.setAttributes(\n                await selectTelemetryAttributes({\n                  telemetry,\n                  attributes: {\n                    \"ai.response.finishReason\": result2.finishReason.unified,\n                    \"ai.response.object\": { output: () => text2 },\n                    \"ai.response.id\": responseData.id,\n                    \"ai.response.model\": responseData.modelId,\n                    \"ai.response.timestamp\": responseData.timestamp.toISOString(),\n                    \"ai.response.providerMetadata\": JSON.stringify(\n                      result2.providerMetadata\n                    ),\n                    // TODO rename telemetry attributes to inputTokens and outputTokens\n                    \"ai.usage.promptTokens\": result2.usage.inputTokens.total,\n                    \"ai.usage.completionTokens\": result2.usage.outputTokens.total,\n                    // standardized gen-ai llm span attributes:\n                    \"gen_ai.response.finish_reasons\": [\n                      result2.finishReason.unified\n                    ],\n                    \"gen_ai.response.id\": responseData.id,\n                    \"gen_ai.response.model\": responseData.modelId,\n                    \"gen_ai.usage.input_tokens\": result2.usage.inputTokens.total,\n                    \"gen_ai.usage.output_tokens\": result2.usage.outputTokens.total\n                  }\n                })\n              );\n              return {\n                ...result2,\n                objectText: text2,\n                reasoning: reasoning2,\n                responseData\n              };\n            }\n          })\n        );\n        result = generateResult.objectText;\n        finishReason = generateResult.finishReason.unified;\n        usage = asLanguageModelUsage(generateResult.usage);\n        warnings = generateResult.warnings;\n        resultProviderMetadata = generateResult.providerMetadata;\n        request = (_a20 = generateResult.request) != null ? _a20 : {};\n        response = generateResult.responseData;\n        reasoning = generateResult.reasoning;\n        logWarnings({\n          warnings,\n          provider: model.provider,\n          model: model.modelId\n        });\n        const object2 = await parseAndValidateObjectResultWithRepair(\n          result,\n          outputStrategy,\n          repairText,\n          {\n            response,\n            usage,\n            finishReason\n          }\n        );\n        span.setAttributes(\n          await selectTelemetryAttributes({\n            telemetry,\n            attributes: {\n              \"ai.response.finishReason\": finishReason,\n              \"ai.response.object\": {\n                output: () => JSON.stringify(object2)\n              },\n              \"ai.response.providerMetadata\": JSON.stringify(\n                resultProviderMetadata\n              ),\n              // TODO rename telemetry attributes to inputTokens and outputTokens\n              \"ai.usage.promptTokens\": usage.inputTokens,\n              \"ai.usage.completionTokens\": usage.outputTokens\n            }\n          })\n        );\n        return new DefaultGenerateObjectResult({\n          object: object2,\n          reasoning,\n          finishReason,\n          usage,\n          warnings,\n          request,\n          response,\n          providerMetadata: resultProviderMetadata\n        });\n      }\n    });\n  } catch (error) {\n    throw wrapGatewayError(error);\n  }\n}\nvar DefaultGenerateObjectResult = class {\n  constructor(options) {\n    this.object = options.object;\n    this.finishReason = options.finishReason;\n    this.usage = options.usage;\n    this.warnings = options.warnings;\n    this.providerMetadata = options.providerMetadata;\n    this.response = options.response;\n    this.request = options.request;\n    this.reasoning = options.reasoning;\n  }\n  toJsonResponse(init) {\n    var _a20;\n    return new Response(JSON.stringify(this.object), {\n      status: (_a20 = init == null ? void 0 : init.status) != null ? _a20 : 200,\n      headers: prepareHeaders(init == null ? void 0 : init.headers, {\n        \"content-type\": \"application/json; charset=utf-8\"\n      })\n    });\n  }\n};\n\n// src/generate-object/stream-object.ts\nimport {\n  createIdGenerator as createIdGenerator4,\n  DelayedPromise as DelayedPromise2\n} from \"@ai-sdk/provider-utils\";\n\n// src/util/cosine-similarity.ts\nfunction cosineSimilarity(vector1, vector2) {\n  if (vector1.length !== vector2.length) {\n    throw new InvalidArgumentError({\n      parameter: \"vector1,vector2\",\n      value: { vector1Length: vector1.length, vector2Length: vector2.length },\n      message: `Vectors must have the same length`\n    });\n  }\n  const n = vector1.length;\n  if (n === 0) {\n    return 0;\n  }\n  let magnitudeSquared1 = 0;\n  let magnitudeSquared2 = 0;\n  let dotProduct = 0;\n  for (let i = 0; i < n; i++) {\n    const value1 = vector1[i];\n    const value2 = vector2[i];\n    magnitudeSquared1 += value1 * value1;\n    magnitudeSquared2 += value2 * value2;\n    dotProduct += value1 * value2;\n  }\n  return magnitudeSquared1 === 0 || magnitudeSquared2 === 0 ? 0 : dotProduct / (Math.sqrt(magnitudeSquared1) * Math.sqrt(magnitudeSquared2));\n}\n\n// src/util/data-url.ts\nfunction getTextFromDataUrl(dataUrl) {\n  const [header, base64Content] = dataUrl.split(\",\");\n  const mediaType = header.split(\";\")[0].split(\":\")[1];\n  if (mediaType == null || base64Content == null) {\n    throw new Error(\"Invalid data URL format\");\n  }\n  try {\n    return window.atob(base64Content);\n  } catch (error) {\n    throw new Error(`Error decoding data URL`);\n  }\n}\n\n// src/util/is-deep-equal-data.ts\nfunction isDeepEqualData(obj1, obj2) {\n  if (obj1 === obj2)\n    return true;\n  if (obj1 == null || obj2 == null)\n    return false;\n  if (typeof obj1 !== \"object\" && typeof obj2 !== \"object\")\n    return obj1 === obj2;\n  if (obj1.constructor !== obj2.constructor)\n    return false;\n  if (obj1 instanceof Date && obj2 instanceof Date) {\n    return obj1.getTime() === obj2.getTime();\n  }\n  if (Array.isArray(obj1)) {\n    if (obj1.length !== obj2.length)\n      return false;\n    for (let i = 0; i < obj1.length; i++) {\n      if (!isDeepEqualData(obj1[i], obj2[i]))\n        return false;\n    }\n    return true;\n  }\n  const keys1 = Object.keys(obj1);\n  const keys2 = Object.keys(obj2);\n  if (keys1.length !== keys2.length)\n    return false;\n  for (const key of keys1) {\n    if (!keys2.includes(key))\n      return false;\n    if (!isDeepEqualData(obj1[key], obj2[key]))\n      return false;\n  }\n  return true;\n}\n\n// src/util/serial-job-executor.ts\nvar SerialJobExecutor = class {\n  constructor() {\n    this.queue = [];\n    this.isProcessing = false;\n  }\n  async processQueue() {\n    if (this.isProcessing) {\n      return;\n    }\n    this.isProcessing = true;\n    while (this.queue.length > 0) {\n      await this.queue[0]();\n      this.queue.shift();\n    }\n    this.isProcessing = false;\n  }\n  async run(job) {\n    return new Promise((resolve3, reject) => {\n      this.queue.push(async () => {\n        try {\n          await job();\n          resolve3();\n        } catch (error) {\n          reject(error);\n        }\n      });\n      void this.processQueue();\n    });\n  }\n};\n\n// src/util/simulate-readable-stream.ts\nimport { delay as delayFunction } from \"@ai-sdk/provider-utils\";\nfunction simulateReadableStream({\n  chunks,\n  initialDelayInMs = 0,\n  chunkDelayInMs = 0,\n  _internal\n}) {\n  var _a20;\n  const delay2 = (_a20 = _internal == null ? void 0 : _internal.delay) != null ? _a20 : delayFunction;\n  let index = 0;\n  return new ReadableStream({\n    async pull(controller) {\n      if (index < chunks.length) {\n        await delay2(index === 0 ? initialDelayInMs : chunkDelayInMs);\n        controller.enqueue(chunks[index++]);\n      } else {\n        controller.close();\n      }\n    }\n  });\n}\n\n// src/generate-object/stream-object.ts\nvar originalGenerateId4 = createIdGenerator4({ prefix: \"aiobj\", size: 24 });\nfunction streamObject(options) {\n  const {\n    model,\n    output = \"object\",\n    system,\n    prompt,\n    messages,\n    maxRetries,\n    abortSignal,\n    headers,\n    experimental_repairText: repairText,\n    experimental_telemetry: telemetry,\n    experimental_download: download2,\n    providerOptions,\n    onError = ({ error }) => {\n      console.error(error);\n    },\n    onFinish,\n    _internal: {\n      generateId: generateId2 = originalGenerateId4,\n      currentDate = () => /* @__PURE__ */ new Date(),\n      now: now2 = now\n    } = {},\n    ...settings\n  } = options;\n  const enumValues = \"enum\" in options && options.enum ? options.enum : void 0;\n  const {\n    schema: inputSchema,\n    schemaDescription,\n    schemaName\n  } = \"schema\" in options ? options : {};\n  validateObjectGenerationInput({\n    output,\n    schema: inputSchema,\n    schemaName,\n    schemaDescription,\n    enumValues\n  });\n  const outputStrategy = getOutputStrategy({\n    output,\n    schema: inputSchema,\n    enumValues\n  });\n  return new DefaultStreamObjectResult({\n    model,\n    telemetry,\n    headers,\n    settings,\n    maxRetries,\n    abortSignal,\n    outputStrategy,\n    system,\n    prompt,\n    messages,\n    schemaName,\n    schemaDescription,\n    providerOptions,\n    repairText,\n    onError,\n    onFinish,\n    download: download2,\n    generateId: generateId2,\n    currentDate,\n    now: now2\n  });\n}\nvar DefaultStreamObjectResult = class {\n  constructor({\n    model: modelArg,\n    headers,\n    telemetry,\n    settings,\n    maxRetries: maxRetriesArg,\n    abortSignal,\n    outputStrategy,\n    system,\n    prompt,\n    messages,\n    schemaName,\n    schemaDescription,\n    providerOptions,\n    repairText,\n    onError,\n    onFinish,\n    download: download2,\n    generateId: generateId2,\n    currentDate,\n    now: now2\n  }) {\n    this._object = new DelayedPromise2();\n    this._usage = new DelayedPromise2();\n    this._providerMetadata = new DelayedPromise2();\n    this._warnings = new DelayedPromise2();\n    this._request = new DelayedPromise2();\n    this._response = new DelayedPromise2();\n    this._finishReason = new DelayedPromise2();\n    const model = resolveLanguageModel(modelArg);\n    const { maxRetries, retry } = prepareRetries({\n      maxRetries: maxRetriesArg,\n      abortSignal\n    });\n    const callSettings = prepareCallSettings(settings);\n    const baseTelemetryAttributes = getBaseTelemetryAttributes({\n      model,\n      telemetry,\n      headers,\n      settings: { ...callSettings, maxRetries }\n    });\n    const tracer = getTracer(telemetry);\n    const self = this;\n    const stitchableStream = createStitchableStream();\n    const eventProcessor = new TransformStream({\n      transform(chunk, controller) {\n        controller.enqueue(chunk);\n        if (chunk.type === \"error\") {\n          onError({ error: wrapGatewayError(chunk.error) });\n        }\n      }\n    });\n    this.baseStream = stitchableStream.stream.pipeThrough(eventProcessor);\n    recordSpan({\n      name: \"ai.streamObject\",\n      attributes: selectTelemetryAttributes({\n        telemetry,\n        attributes: {\n          ...assembleOperationName({\n            operationId: \"ai.streamObject\",\n            telemetry\n          }),\n          ...baseTelemetryAttributes,\n          // specific settings that only make sense on the outer level:\n          \"ai.prompt\": {\n            input: () => JSON.stringify({ system, prompt, messages })\n          },\n          \"ai.schema\": {\n            input: async () => JSON.stringify(await outputStrategy.jsonSchema())\n          },\n          \"ai.schema.name\": schemaName,\n          \"ai.schema.description\": schemaDescription,\n          \"ai.settings.output\": outputStrategy.type\n        }\n      }),\n      tracer,\n      endWhenDone: false,\n      fn: async (rootSpan) => {\n        const standardizedPrompt = await standardizePrompt({\n          system,\n          prompt,\n          messages\n        });\n        const callOptions = {\n          responseFormat: {\n            type: \"json\",\n            schema: await outputStrategy.jsonSchema(),\n            name: schemaName,\n            description: schemaDescription\n          },\n          ...prepareCallSettings(settings),\n          prompt: await convertToLanguageModelPrompt({\n            prompt: standardizedPrompt,\n            supportedUrls: await model.supportedUrls,\n            download: download2\n          }),\n          providerOptions,\n          abortSignal,\n          headers,\n          includeRawChunks: false\n        };\n        const transformer = {\n          transform: (chunk, controller) => {\n            switch (chunk.type) {\n              case \"text-delta\":\n                controller.enqueue(chunk.delta);\n                break;\n              case \"response-metadata\":\n              case \"finish\":\n              case \"error\":\n              case \"stream-start\":\n                controller.enqueue(chunk);\n                break;\n            }\n          }\n        };\n        const {\n          result: { stream, response, request },\n          doStreamSpan,\n          startTimestampMs\n        } = await retry(\n          () => recordSpan({\n            name: \"ai.streamObject.doStream\",\n            attributes: selectTelemetryAttributes({\n              telemetry,\n              attributes: {\n                ...assembleOperationName({\n                  operationId: \"ai.streamObject.doStream\",\n                  telemetry\n                }),\n                ...baseTelemetryAttributes,\n                \"ai.prompt.messages\": {\n                  input: () => stringifyForTelemetry(callOptions.prompt)\n                },\n                // standardized gen-ai llm span attributes:\n                \"gen_ai.system\": model.provider,\n                \"gen_ai.request.model\": model.modelId,\n                \"gen_ai.request.frequency_penalty\": callSettings.frequencyPenalty,\n                \"gen_ai.request.max_tokens\": callSettings.maxOutputTokens,\n                \"gen_ai.request.presence_penalty\": callSettings.presencePenalty,\n                \"gen_ai.request.temperature\": callSettings.temperature,\n                \"gen_ai.request.top_k\": callSettings.topK,\n                \"gen_ai.request.top_p\": callSettings.topP\n              }\n            }),\n            tracer,\n            endWhenDone: false,\n            fn: async (doStreamSpan2) => ({\n              startTimestampMs: now2(),\n              doStreamSpan: doStreamSpan2,\n              result: await model.doStream(callOptions)\n            })\n          })\n        );\n        self._request.resolve(request != null ? request : {});\n        let warnings;\n        let usage = createNullLanguageModelUsage();\n        let finishReason;\n        let providerMetadata;\n        let object2;\n        let error;\n        let accumulatedText = \"\";\n        let textDelta = \"\";\n        let fullResponse = {\n          id: generateId2(),\n          timestamp: currentDate(),\n          modelId: model.modelId\n        };\n        let latestObjectJson = void 0;\n        let latestObject = void 0;\n        let isFirstChunk = true;\n        let isFirstDelta = true;\n        const transformedStream = stream.pipeThrough(new TransformStream(transformer)).pipeThrough(\n          new TransformStream({\n            async transform(chunk, controller) {\n              var _a20, _b, _c;\n              if (typeof chunk === \"object\" && chunk.type === \"stream-start\") {\n                warnings = chunk.warnings;\n                return;\n              }\n              if (isFirstChunk) {\n                const msToFirstChunk = now2() - startTimestampMs;\n                isFirstChunk = false;\n                doStreamSpan.addEvent(\"ai.stream.firstChunk\", {\n                  \"ai.stream.msToFirstChunk\": msToFirstChunk\n                });\n                doStreamSpan.setAttributes({\n                  \"ai.stream.msToFirstChunk\": msToFirstChunk\n                });\n              }\n              if (typeof chunk === \"string\") {\n                accumulatedText += chunk;\n                textDelta += chunk;\n                const { value: currentObjectJson, state: parseState } = await parsePartialJson(accumulatedText);\n                if (currentObjectJson !== void 0 && !isDeepEqualData(latestObjectJson, currentObjectJson)) {\n                  const validationResult = await outputStrategy.validatePartialResult({\n                    value: currentObjectJson,\n                    textDelta,\n                    latestObject,\n                    isFirstDelta,\n                    isFinalDelta: parseState === \"successful-parse\"\n                  });\n                  if (validationResult.success && !isDeepEqualData(\n                    latestObject,\n                    validationResult.value.partial\n                  )) {\n                    latestObjectJson = currentObjectJson;\n                    latestObject = validationResult.value.partial;\n                    controller.enqueue({\n                      type: \"object\",\n                      object: latestObject\n                    });\n                    controller.enqueue({\n                      type: \"text-delta\",\n                      textDelta: validationResult.value.textDelta\n                    });\n                    textDelta = \"\";\n                    isFirstDelta = false;\n                  }\n                }\n                return;\n              }\n              switch (chunk.type) {\n                case \"response-metadata\": {\n                  fullResponse = {\n                    id: (_a20 = chunk.id) != null ? _a20 : fullResponse.id,\n                    timestamp: (_b = chunk.timestamp) != null ? _b : fullResponse.timestamp,\n                    modelId: (_c = chunk.modelId) != null ? _c : fullResponse.modelId\n                  };\n                  break;\n                }\n                case \"finish\": {\n                  if (textDelta !== \"\") {\n                    controller.enqueue({ type: \"text-delta\", textDelta });\n                  }\n                  finishReason = chunk.finishReason.unified;\n                  usage = asLanguageModelUsage(chunk.usage);\n                  providerMetadata = chunk.providerMetadata;\n                  controller.enqueue({\n                    ...chunk,\n                    finishReason: chunk.finishReason.unified,\n                    usage,\n                    response: fullResponse\n                  });\n                  logWarnings({\n                    warnings: warnings != null ? warnings : [],\n                    provider: model.provider,\n                    model: model.modelId\n                  });\n                  self._usage.resolve(usage);\n                  self._providerMetadata.resolve(providerMetadata);\n                  self._warnings.resolve(warnings);\n                  self._response.resolve({\n                    ...fullResponse,\n                    headers: response == null ? void 0 : response.headers\n                  });\n                  self._finishReason.resolve(finishReason != null ? finishReason : \"other\");\n                  try {\n                    object2 = await parseAndValidateObjectResultWithRepair(\n                      accumulatedText,\n                      outputStrategy,\n                      repairText,\n                      {\n                        response: fullResponse,\n                        usage,\n                        finishReason\n                      }\n                    );\n                    self._object.resolve(object2);\n                  } catch (e) {\n                    error = e;\n                    self._object.reject(e);\n                  }\n                  break;\n                }\n                default: {\n                  controller.enqueue(chunk);\n                  break;\n                }\n              }\n            },\n            // invoke onFinish callback and resolve toolResults promise when the stream is about to close:\n            async flush(controller) {\n              try {\n                const finalUsage = usage != null ? usage : {\n                  promptTokens: NaN,\n                  completionTokens: NaN,\n                  totalTokens: NaN\n                };\n                doStreamSpan.setAttributes(\n                  await selectTelemetryAttributes({\n                    telemetry,\n                    attributes: {\n                      \"ai.response.finishReason\": finishReason,\n                      \"ai.response.object\": {\n                        output: () => JSON.stringify(object2)\n                      },\n                      \"ai.response.id\": fullResponse.id,\n                      \"ai.response.model\": fullResponse.modelId,\n                      \"ai.response.timestamp\": fullResponse.timestamp.toISOString(),\n                      \"ai.response.providerMetadata\": JSON.stringify(providerMetadata),\n                      \"ai.usage.inputTokens\": finalUsage.inputTokens,\n                      \"ai.usage.outputTokens\": finalUsage.outputTokens,\n                      \"ai.usage.totalTokens\": finalUsage.totalTokens,\n                      \"ai.usage.reasoningTokens\": finalUsage.reasoningTokens,\n                      \"ai.usage.cachedInputTokens\": finalUsage.cachedInputTokens,\n                      // standardized gen-ai llm span attributes:\n                      \"gen_ai.response.finish_reasons\": [finishReason],\n                      \"gen_ai.response.id\": fullResponse.id,\n                      \"gen_ai.response.model\": fullResponse.modelId,\n                      \"gen_ai.usage.input_tokens\": finalUsage.inputTokens,\n                      \"gen_ai.usage.output_tokens\": finalUsage.outputTokens\n                    }\n                  })\n                );\n                doStreamSpan.end();\n                rootSpan.setAttributes(\n                  await selectTelemetryAttributes({\n                    telemetry,\n                    attributes: {\n                      \"ai.usage.inputTokens\": finalUsage.inputTokens,\n                      \"ai.usage.outputTokens\": finalUsage.outputTokens,\n                      \"ai.usage.totalTokens\": finalUsage.totalTokens,\n                      \"ai.usage.reasoningTokens\": finalUsage.reasoningTokens,\n                      \"ai.usage.cachedInputTokens\": finalUsage.cachedInputTokens,\n                      \"ai.response.object\": {\n                        output: () => JSON.stringify(object2)\n                      },\n                      \"ai.response.providerMetadata\": JSON.stringify(providerMetadata)\n                    }\n                  })\n                );\n                await (onFinish == null ? void 0 : onFinish({\n                  usage: finalUsage,\n                  object: object2,\n                  error,\n                  response: {\n                    ...fullResponse,\n                    headers: response == null ? void 0 : response.headers\n                  },\n                  warnings,\n                  providerMetadata\n                }));\n              } catch (error2) {\n                controller.enqueue({ type: \"error\", error: error2 });\n              } finally {\n                rootSpan.end();\n              }\n            }\n          })\n        );\n        stitchableStream.addStream(transformedStream);\n      }\n    }).catch((error) => {\n      stitchableStream.addStream(\n        new ReadableStream({\n          start(controller) {\n            controller.enqueue({ type: \"error\", error });\n            controller.close();\n          }\n        })\n      );\n    }).finally(() => {\n      stitchableStream.close();\n    });\n    this.outputStrategy = outputStrategy;\n  }\n  get object() {\n    return this._object.promise;\n  }\n  get usage() {\n    return this._usage.promise;\n  }\n  get providerMetadata() {\n    return this._providerMetadata.promise;\n  }\n  get warnings() {\n    return this._warnings.promise;\n  }\n  get request() {\n    return this._request.promise;\n  }\n  get response() {\n    return this._response.promise;\n  }\n  get finishReason() {\n    return this._finishReason.promise;\n  }\n  get partialObjectStream() {\n    return createAsyncIterableStream(\n      this.baseStream.pipeThrough(\n        new TransformStream({\n          transform(chunk, controller) {\n            switch (chunk.type) {\n              case \"object\":\n                controller.enqueue(chunk.object);\n                break;\n              case \"text-delta\":\n              case \"finish\":\n              case \"error\":\n                break;\n              default: {\n                const _exhaustiveCheck = chunk;\n                throw new Error(`Unsupported chunk type: ${_exhaustiveCheck}`);\n              }\n            }\n          }\n        })\n      )\n    );\n  }\n  get elementStream() {\n    return this.outputStrategy.createElementStream(this.baseStream);\n  }\n  get textStream() {\n    return createAsyncIterableStream(\n      this.baseStream.pipeThrough(\n        new TransformStream({\n          transform(chunk, controller) {\n            switch (chunk.type) {\n              case \"text-delta\":\n                controller.enqueue(chunk.textDelta);\n                break;\n              case \"object\":\n              case \"finish\":\n              case \"error\":\n                break;\n              default: {\n                const _exhaustiveCheck = chunk;\n                throw new Error(`Unsupported chunk type: ${_exhaustiveCheck}`);\n              }\n            }\n          }\n        })\n      )\n    );\n  }\n  get fullStream() {\n    return createAsyncIterableStream(this.baseStream);\n  }\n  pipeTextStreamToResponse(response, init) {\n    pipeTextStreamToResponse({\n      response,\n      textStream: this.textStream,\n      ...init\n    });\n  }\n  toTextStreamResponse(init) {\n    return createTextStreamResponse({\n      textStream: this.textStream,\n      ...init\n    });\n  }\n};\n\n// src/generate-speech/generate-speech.ts\nimport { withUserAgentSuffix as withUserAgentSuffix7 } from \"@ai-sdk/provider-utils\";\n\n// src/generate-speech/generated-audio-file.ts\nvar DefaultGeneratedAudioFile = class extends DefaultGeneratedFile {\n  constructor({\n    data,\n    mediaType\n  }) {\n    super({ data, mediaType });\n    let format = \"mp3\";\n    if (mediaType) {\n      const mediaTypeParts = mediaType.split(\"/\");\n      if (mediaTypeParts.length === 2) {\n        if (mediaType !== \"audio/mpeg\") {\n          format = mediaTypeParts[1];\n        }\n      }\n    }\n    if (!format) {\n      throw new Error(\n        \"Audio format must be provided or determinable from media type\"\n      );\n    }\n    this.format = format;\n  }\n};\n\n// src/generate-speech/generate-speech.ts\nasync function generateSpeech({\n  model,\n  text: text2,\n  voice,\n  outputFormat,\n  instructions,\n  speed,\n  language,\n  providerOptions = {},\n  maxRetries: maxRetriesArg,\n  abortSignal,\n  headers\n}) {\n  var _a20;\n  const resolvedModel = resolveSpeechModel(model);\n  if (!resolvedModel) {\n    throw new Error(\"Model could not be resolved\");\n  }\n  const headersWithUserAgent = withUserAgentSuffix7(\n    headers != null ? headers : {},\n    `ai/${VERSION}`\n  );\n  const { retry } = prepareRetries({\n    maxRetries: maxRetriesArg,\n    abortSignal\n  });\n  const result = await retry(\n    () => resolvedModel.doGenerate({\n      text: text2,\n      voice,\n      outputFormat,\n      instructions,\n      speed,\n      language,\n      abortSignal,\n      headers: headersWithUserAgent,\n      providerOptions\n    })\n  );\n  if (!result.audio || result.audio.length === 0) {\n    throw new NoSpeechGeneratedError({ responses: [result.response] });\n  }\n  logWarnings({\n    warnings: result.warnings,\n    provider: resolvedModel.provider,\n    model: resolvedModel.modelId\n  });\n  return new DefaultSpeechResult({\n    audio: new DefaultGeneratedAudioFile({\n      data: result.audio,\n      mediaType: (_a20 = detectMediaType({\n        data: result.audio,\n        signatures: audioMediaTypeSignatures\n      })) != null ? _a20 : \"audio/mp3\"\n    }),\n    warnings: result.warnings,\n    responses: [result.response],\n    providerMetadata: result.providerMetadata\n  });\n}\nvar DefaultSpeechResult = class {\n  constructor(options) {\n    var _a20;\n    this.audio = options.audio;\n    this.warnings = options.warnings;\n    this.responses = options.responses;\n    this.providerMetadata = (_a20 = options.providerMetadata) != null ? _a20 : {};\n  }\n};\n\n// src/generate-text/prune-messages.ts\nfunction pruneMessages({\n  messages,\n  reasoning = \"none\",\n  toolCalls = [],\n  emptyMessages = \"remove\"\n}) {\n  if (reasoning === \"all\" || reasoning === \"before-last-message\") {\n    messages = messages.map((message, messageIndex) => {\n      if (message.role !== \"assistant\" || typeof message.content === \"string\" || reasoning === \"before-last-message\" && messageIndex === messages.length - 1) {\n        return message;\n      }\n      return {\n        ...message,\n        content: message.content.filter((part) => part.type !== \"reasoning\")\n      };\n    });\n  }\n  if (toolCalls === \"none\") {\n    toolCalls = [];\n  } else if (toolCalls === \"all\") {\n    toolCalls = [{ type: \"all\" }];\n  } else if (toolCalls === \"before-last-message\") {\n    toolCalls = [{ type: \"before-last-message\" }];\n  } else if (typeof toolCalls === \"string\") {\n    toolCalls = [{ type: toolCalls }];\n  }\n  for (const toolCall of toolCalls) {\n    const keepLastMessagesCount = toolCall.type === \"all\" ? void 0 : toolCall.type === \"before-last-message\" ? 1 : Number(\n      toolCall.type.slice(\"before-last-\".length).slice(0, -\"-messages\".length)\n    );\n    const keptToolCallIds = /* @__PURE__ */ new Set();\n    const keptApprovalIds = /* @__PURE__ */ new Set();\n    if (keepLastMessagesCount != null) {\n      for (const message of messages.slice(-keepLastMessagesCount)) {\n        if ((message.role === \"assistant\" || message.role === \"tool\") && typeof message.content !== \"string\") {\n          for (const part of message.content) {\n            if (part.type === \"tool-call\" || part.type === \"tool-result\") {\n              keptToolCallIds.add(part.toolCallId);\n            } else if (part.type === \"tool-approval-request\" || part.type === \"tool-approval-response\") {\n              keptApprovalIds.add(part.approvalId);\n            }\n          }\n        }\n      }\n    }\n    messages = messages.map((message, messageIndex) => {\n      if (message.role !== \"assistant\" && message.role !== \"tool\" || typeof message.content === \"string\" || keepLastMessagesCount && messageIndex >= messages.length - keepLastMessagesCount) {\n        return message;\n      }\n      const toolCallIdToToolName = {};\n      const approvalIdToToolName = {};\n      return {\n        ...message,\n        content: message.content.filter((part) => {\n          if (part.type !== \"tool-call\" && part.type !== \"tool-result\" && part.type !== \"tool-approval-request\" && part.type !== \"tool-approval-response\") {\n            return true;\n          }\n          if (part.type === \"tool-call\") {\n            toolCallIdToToolName[part.toolCallId] = part.toolName;\n          } else if (part.type === \"tool-approval-request\") {\n            approvalIdToToolName[part.approvalId] = toolCallIdToToolName[part.toolCallId];\n          }\n          if ((part.type === \"tool-call\" || part.type === \"tool-result\") && keptToolCallIds.has(part.toolCallId) || (part.type === \"tool-approval-request\" || part.type === \"tool-approval-response\") && keptApprovalIds.has(part.approvalId)) {\n            return true;\n          }\n          return toolCall.tools != null && !toolCall.tools.includes(\n            part.type === \"tool-call\" || part.type === \"tool-result\" ? part.toolName : approvalIdToToolName[part.approvalId]\n          );\n        })\n      };\n    });\n  }\n  if (emptyMessages === \"remove\") {\n    messages = messages.filter((message) => message.content.length > 0);\n  }\n  return messages;\n}\n\n// src/generate-text/smooth-stream.ts\nimport { delay as originalDelay } from \"@ai-sdk/provider-utils\";\nimport { InvalidArgumentError as InvalidArgumentError2 } from \"@ai-sdk/provider\";\nvar CHUNKING_REGEXPS = {\n  word: /\\S+\\s+/m,\n  line: /\\n+/m\n};\nfunction smoothStream({\n  delayInMs = 10,\n  chunking = \"word\",\n  _internal: { delay: delay2 = originalDelay } = {}\n} = {}) {\n  let detectChunk;\n  if (chunking != null && typeof chunking === \"object\" && \"segment\" in chunking && typeof chunking.segment === \"function\") {\n    const segmenter = chunking;\n    detectChunk = (buffer) => {\n      if (buffer.length === 0)\n        return null;\n      const iterator = segmenter.segment(buffer)[Symbol.iterator]();\n      const first = iterator.next().value;\n      return (first == null ? void 0 : first.segment) || null;\n    };\n  } else if (typeof chunking === \"function\") {\n    detectChunk = (buffer) => {\n      const match = chunking(buffer);\n      if (match == null) {\n        return null;\n      }\n      if (!match.length) {\n        throw new Error(`Chunking function must return a non-empty string.`);\n      }\n      if (!buffer.startsWith(match)) {\n        throw new Error(\n          `Chunking function must return a match that is a prefix of the buffer. Received: \"${match}\" expected to start with \"${buffer}\"`\n        );\n      }\n      return match;\n    };\n  } else {\n    const chunkingRegex = typeof chunking === \"string\" ? CHUNKING_REGEXPS[chunking] : chunking instanceof RegExp ? chunking : void 0;\n    if (chunkingRegex == null) {\n      throw new InvalidArgumentError2({\n        argument: \"chunking\",\n        message: `Chunking must be \"word\", \"line\", a RegExp, an Intl.Segmenter, or a ChunkDetector function. Received: ${chunking}`\n      });\n    }\n    detectChunk = (buffer) => {\n      const match = chunkingRegex.exec(buffer);\n      if (!match) {\n        return null;\n      }\n      return buffer.slice(0, match.index) + (match == null ? void 0 : match[0]);\n    };\n  }\n  return () => {\n    let buffer = \"\";\n    let id = \"\";\n    let type = void 0;\n    let providerMetadata = void 0;\n    function flushBuffer(controller) {\n      if (buffer.length > 0 && type !== void 0) {\n        controller.enqueue({\n          type,\n          text: buffer,\n          id,\n          ...providerMetadata != null ? { providerMetadata } : {}\n        });\n        buffer = \"\";\n        providerMetadata = void 0;\n      }\n    }\n    return new TransformStream({\n      async transform(chunk, controller) {\n        if (chunk.type !== \"text-delta\" && chunk.type !== \"reasoning-delta\") {\n          flushBuffer(controller);\n          controller.enqueue(chunk);\n          return;\n        }\n        if ((chunk.type !== type || chunk.id !== id) && buffer.length > 0) {\n          flushBuffer(controller);\n        }\n        buffer += chunk.text;\n        id = chunk.id;\n        type = chunk.type;\n        if (chunk.providerMetadata != null) {\n          providerMetadata = chunk.providerMetadata;\n        }\n        let match;\n        while ((match = detectChunk(buffer)) != null) {\n          controller.enqueue({ type, text: match, id });\n          buffer = buffer.slice(match.length);\n          await delay2(delayInMs);\n        }\n      }\n    });\n  };\n}\n\n// src/middleware/default-embedding-settings-middleware.ts\nfunction defaultEmbeddingSettingsMiddleware({\n  settings\n}) {\n  return {\n    specificationVersion: \"v3\",\n    transformParams: async ({ params }) => {\n      return mergeObjects(settings, params);\n    }\n  };\n}\n\n// src/middleware/default-settings-middleware.ts\nfunction defaultSettingsMiddleware({\n  settings\n}) {\n  return {\n    specificationVersion: \"v3\",\n    transformParams: async ({ params }) => {\n      return mergeObjects(settings, params);\n    }\n  };\n}\n\n// src/middleware/extract-json-middleware.ts\nfunction defaultTransform(text2) {\n  return text2.replace(/^```(?:json)?\\s*\\n?/, \"\").replace(/\\n?```\\s*$/, \"\").trim();\n}\nfunction extractJsonMiddleware(options) {\n  var _a20;\n  const transform = (_a20 = options == null ? void 0 : options.transform) != null ? _a20 : defaultTransform;\n  const hasCustomTransform = (options == null ? void 0 : options.transform) !== void 0;\n  return {\n    specificationVersion: \"v3\",\n    wrapGenerate: async ({ doGenerate }) => {\n      const { content, ...rest } = await doGenerate();\n      const transformedContent = [];\n      for (const part of content) {\n        if (part.type !== \"text\") {\n          transformedContent.push(part);\n          continue;\n        }\n        transformedContent.push({\n          ...part,\n          text: transform(part.text)\n        });\n      }\n      return { content: transformedContent, ...rest };\n    },\n    wrapStream: async ({ doStream }) => {\n      const { stream, ...rest } = await doStream();\n      const textBlocks = {};\n      const SUFFIX_BUFFER_SIZE = 12;\n      return {\n        stream: stream.pipeThrough(\n          new TransformStream({\n            transform: (chunk, controller) => {\n              if (chunk.type === \"text-start\") {\n                textBlocks[chunk.id] = {\n                  startEvent: chunk,\n                  // Custom transforms need to buffer all content\n                  phase: hasCustomTransform ? \"buffering\" : \"prefix\",\n                  buffer: \"\",\n                  prefixStripped: false\n                };\n                return;\n              }\n              if (chunk.type === \"text-delta\") {\n                const block = textBlocks[chunk.id];\n                if (!block) {\n                  controller.enqueue(chunk);\n                  return;\n                }\n                block.buffer += chunk.delta;\n                if (block.phase === \"buffering\") {\n                  return;\n                }\n                if (block.phase === \"prefix\") {\n                  if (block.buffer.length > 0 && !block.buffer.startsWith(\"`\")) {\n                    block.phase = \"streaming\";\n                    controller.enqueue(block.startEvent);\n                  } else if (block.buffer.startsWith(\"```\")) {\n                    if (block.buffer.includes(\"\\n\")) {\n                      const prefixMatch = block.buffer.match(/^```(?:json)?\\s*\\n/);\n                      if (prefixMatch) {\n                        block.buffer = block.buffer.slice(\n                          prefixMatch[0].length\n                        );\n                        block.prefixStripped = true;\n                        block.phase = \"streaming\";\n                        controller.enqueue(block.startEvent);\n                      } else {\n                        block.phase = \"streaming\";\n                        controller.enqueue(block.startEvent);\n                      }\n                    }\n                  } else if (block.buffer.length >= 3 && !block.buffer.startsWith(\"```\")) {\n                    block.phase = \"streaming\";\n                    controller.enqueue(block.startEvent);\n                  }\n                }\n                if (block.phase === \"streaming\" && block.buffer.length > SUFFIX_BUFFER_SIZE) {\n                  const toStream = block.buffer.slice(0, -SUFFIX_BUFFER_SIZE);\n                  block.buffer = block.buffer.slice(-SUFFIX_BUFFER_SIZE);\n                  controller.enqueue({\n                    type: \"text-delta\",\n                    id: chunk.id,\n                    delta: toStream\n                  });\n                }\n                return;\n              }\n              if (chunk.type === \"text-end\") {\n                const block = textBlocks[chunk.id];\n                if (block) {\n                  if (block.phase === \"prefix\" || block.phase === \"buffering\") {\n                    controller.enqueue(block.startEvent);\n                  }\n                  let remaining = block.buffer;\n                  if (block.phase === \"buffering\") {\n                    remaining = transform(remaining);\n                  } else if (block.prefixStripped) {\n                    remaining = remaining.replace(/\\n?```\\s*$/, \"\").trimEnd();\n                  } else {\n                    remaining = transform(remaining);\n                  }\n                  if (remaining.length > 0) {\n                    controller.enqueue({\n                      type: \"text-delta\",\n                      id: chunk.id,\n                      delta: remaining\n                    });\n                  }\n                  controller.enqueue(chunk);\n                  delete textBlocks[chunk.id];\n                  return;\n                }\n              }\n              controller.enqueue(chunk);\n            }\n          })\n        ),\n        ...rest\n      };\n    }\n  };\n}\n\n// src/util/get-potential-start-index.ts\nfunction getPotentialStartIndex(text2, searchedText) {\n  if (searchedText.length === 0) {\n    return null;\n  }\n  const directIndex = text2.indexOf(searchedText);\n  if (directIndex !== -1) {\n    return directIndex;\n  }\n  for (let i = text2.length - 1; i >= 0; i--) {\n    const suffix = text2.substring(i);\n    if (searchedText.startsWith(suffix)) {\n      return i;\n    }\n  }\n  return null;\n}\n\n// src/middleware/extract-reasoning-middleware.ts\nfunction extractReasoningMiddleware({\n  tagName,\n  separator = \"\\n\",\n  startWithReasoning = false\n}) {\n  const openingTag = `<${tagName}>`;\n  const closingTag = `</${tagName}>`;\n  return {\n    specificationVersion: \"v3\",\n    wrapGenerate: async ({ doGenerate }) => {\n      const { content, ...rest } = await doGenerate();\n      const transformedContent = [];\n      for (const part of content) {\n        if (part.type !== \"text\") {\n          transformedContent.push(part);\n          continue;\n        }\n        const text2 = startWithReasoning ? openingTag + part.text : part.text;\n        const regexp = new RegExp(`${openingTag}(.*?)${closingTag}`, \"gs\");\n        const matches = Array.from(text2.matchAll(regexp));\n        if (!matches.length) {\n          transformedContent.push(part);\n          continue;\n        }\n        const reasoningText = matches.map((match) => match[1]).join(separator);\n        let textWithoutReasoning = text2;\n        for (let i = matches.length - 1; i >= 0; i--) {\n          const match = matches[i];\n          const beforeMatch = textWithoutReasoning.slice(0, match.index);\n          const afterMatch = textWithoutReasoning.slice(\n            match.index + match[0].length\n          );\n          textWithoutReasoning = beforeMatch + (beforeMatch.length > 0 && afterMatch.length > 0 ? separator : \"\") + afterMatch;\n        }\n        transformedContent.push({\n          type: \"reasoning\",\n          text: reasoningText\n        });\n        transformedContent.push({\n          type: \"text\",\n          text: textWithoutReasoning\n        });\n      }\n      return { content: transformedContent, ...rest };\n    },\n    wrapStream: async ({ doStream }) => {\n      const { stream, ...rest } = await doStream();\n      const reasoningExtractions = {};\n      let delayedTextStart;\n      return {\n        stream: stream.pipeThrough(\n          new TransformStream({\n            transform: (chunk, controller) => {\n              if (chunk.type === \"text-start\") {\n                delayedTextStart = chunk;\n                return;\n              }\n              if (chunk.type === \"text-end\" && delayedTextStart) {\n                controller.enqueue(delayedTextStart);\n                delayedTextStart = void 0;\n              }\n              if (chunk.type !== \"text-delta\") {\n                controller.enqueue(chunk);\n                return;\n              }\n              if (reasoningExtractions[chunk.id] == null) {\n                reasoningExtractions[chunk.id] = {\n                  isFirstReasoning: true,\n                  isFirstText: true,\n                  afterSwitch: false,\n                  isReasoning: startWithReasoning,\n                  buffer: \"\",\n                  idCounter: 0,\n                  textId: chunk.id\n                };\n              }\n              const activeExtraction = reasoningExtractions[chunk.id];\n              activeExtraction.buffer += chunk.delta;\n              function publish(text2) {\n                if (text2.length > 0) {\n                  const prefix = activeExtraction.afterSwitch && (activeExtraction.isReasoning ? !activeExtraction.isFirstReasoning : !activeExtraction.isFirstText) ? separator : \"\";\n                  if (activeExtraction.isReasoning && (activeExtraction.afterSwitch || activeExtraction.isFirstReasoning)) {\n                    controller.enqueue({\n                      type: \"reasoning-start\",\n                      id: `reasoning-${activeExtraction.idCounter}`\n                    });\n                  }\n                  if (activeExtraction.isReasoning) {\n                    controller.enqueue({\n                      type: \"reasoning-delta\",\n                      delta: prefix + text2,\n                      id: `reasoning-${activeExtraction.idCounter}`\n                    });\n                  } else {\n                    if (delayedTextStart) {\n                      controller.enqueue(delayedTextStart);\n                      delayedTextStart = void 0;\n                    }\n                    controller.enqueue({\n                      type: \"text-delta\",\n                      delta: prefix + text2,\n                      id: activeExtraction.textId\n                    });\n                  }\n                  activeExtraction.afterSwitch = false;\n                  if (activeExtraction.isReasoning) {\n                    activeExtraction.isFirstReasoning = false;\n                  } else {\n                    activeExtraction.isFirstText = false;\n                  }\n                }\n              }\n              do {\n                const nextTag = activeExtraction.isReasoning ? closingTag : openingTag;\n                const startIndex = getPotentialStartIndex(\n                  activeExtraction.buffer,\n                  nextTag\n                );\n                if (startIndex == null) {\n                  publish(activeExtraction.buffer);\n                  activeExtraction.buffer = \"\";\n                  break;\n                }\n                publish(activeExtraction.buffer.slice(0, startIndex));\n                const foundFullMatch = startIndex + nextTag.length <= activeExtraction.buffer.length;\n                if (foundFullMatch) {\n                  activeExtraction.buffer = activeExtraction.buffer.slice(\n                    startIndex + nextTag.length\n                  );\n                  if (activeExtraction.isReasoning) {\n                    if (activeExtraction.isFirstReasoning) {\n                      controller.enqueue({\n                        type: \"reasoning-start\",\n                        id: `reasoning-${activeExtraction.idCounter}`\n                      });\n                    }\n                    controller.enqueue({\n                      type: \"reasoning-end\",\n                      id: `reasoning-${activeExtraction.idCounter++}`\n                    });\n                  }\n                  activeExtraction.isReasoning = !activeExtraction.isReasoning;\n                  activeExtraction.afterSwitch = true;\n                } else {\n                  activeExtraction.buffer = activeExtraction.buffer.slice(startIndex);\n                  break;\n                }\n              } while (true);\n            }\n          })\n        ),\n        ...rest\n      };\n    }\n  };\n}\n\n// src/middleware/simulate-streaming-middleware.ts\nfunction simulateStreamingMiddleware() {\n  return {\n    specificationVersion: \"v3\",\n    wrapStream: async ({ doGenerate }) => {\n      const result = await doGenerate();\n      let id = 0;\n      const simulatedStream = new ReadableStream({\n        start(controller) {\n          controller.enqueue({\n            type: \"stream-start\",\n            warnings: result.warnings\n          });\n          controller.enqueue({ type: \"response-metadata\", ...result.response });\n          for (const part of result.content) {\n            switch (part.type) {\n              case \"text\": {\n                if (part.text.length > 0) {\n                  controller.enqueue({ type: \"text-start\", id: String(id) });\n                  controller.enqueue({\n                    type: \"text-delta\",\n                    id: String(id),\n                    delta: part.text\n                  });\n                  controller.enqueue({ type: \"text-end\", id: String(id) });\n                  id++;\n                }\n                break;\n              }\n              case \"reasoning\": {\n                controller.enqueue({\n                  type: \"reasoning-start\",\n                  id: String(id),\n                  providerMetadata: part.providerMetadata\n                });\n                controller.enqueue({\n                  type: \"reasoning-delta\",\n                  id: String(id),\n                  delta: part.text\n                });\n                controller.enqueue({ type: \"reasoning-end\", id: String(id) });\n                id++;\n                break;\n              }\n              default: {\n                controller.enqueue(part);\n                break;\n              }\n            }\n          }\n          controller.enqueue({\n            type: \"finish\",\n            finishReason: result.finishReason,\n            usage: result.usage,\n            providerMetadata: result.providerMetadata\n          });\n          controller.close();\n        }\n      });\n      return {\n        stream: simulatedStream,\n        request: result.request,\n        response: result.response\n      };\n    }\n  };\n}\n\n// src/middleware/add-tool-input-examples-middleware.ts\nfunction defaultFormatExample(example) {\n  return JSON.stringify(example.input);\n}\nfunction addToolInputExamplesMiddleware({\n  prefix = \"Input Examples:\",\n  format = defaultFormatExample,\n  remove = true\n} = {}) {\n  return {\n    specificationVersion: \"v3\",\n    transformParams: async ({ params }) => {\n      var _a20;\n      if (!((_a20 = params.tools) == null ? void 0 : _a20.length)) {\n        return params;\n      }\n      const transformedTools = params.tools.map((tool2) => {\n        var _a21;\n        if (tool2.type !== \"function\" || !((_a21 = tool2.inputExamples) == null ? void 0 : _a21.length)) {\n          return tool2;\n        }\n        const formattedExamples = tool2.inputExamples.map((example, index) => format(example, index)).join(\"\\n\");\n        const examplesSection = `${prefix}\n${formattedExamples}`;\n        const toolDescription = tool2.description ? `${tool2.description}\n\n${examplesSection}` : examplesSection;\n        return {\n          ...tool2,\n          description: toolDescription,\n          inputExamples: remove ? void 0 : tool2.inputExamples\n        };\n      });\n      return {\n        ...params,\n        tools: transformedTools\n      };\n    }\n  };\n}\n\n// src/middleware/wrap-language-model.ts\nvar wrapLanguageModel = ({\n  model,\n  middleware: middlewareArg,\n  modelId,\n  providerId\n}) => {\n  return [...asArray(middlewareArg)].reverse().reduce((wrappedModel, middleware) => {\n    return doWrap({ model: wrappedModel, middleware, modelId, providerId });\n  }, model);\n};\nvar doWrap = ({\n  model,\n  middleware: {\n    transformParams,\n    wrapGenerate,\n    wrapStream,\n    overrideProvider,\n    overrideModelId,\n    overrideSupportedUrls\n  },\n  modelId,\n  providerId\n}) => {\n  var _a20, _b, _c;\n  async function doTransform({\n    params,\n    type\n  }) {\n    return transformParams ? await transformParams({ params, type, model }) : params;\n  }\n  return {\n    specificationVersion: \"v3\",\n    provider: (_a20 = providerId != null ? providerId : overrideProvider == null ? void 0 : overrideProvider({ model })) != null ? _a20 : model.provider,\n    modelId: (_b = modelId != null ? modelId : overrideModelId == null ? void 0 : overrideModelId({ model })) != null ? _b : model.modelId,\n    supportedUrls: (_c = overrideSupportedUrls == null ? void 0 : overrideSupportedUrls({ model })) != null ? _c : model.supportedUrls,\n    async doGenerate(params) {\n      const transformedParams = await doTransform({ params, type: \"generate\" });\n      const doGenerate = async () => model.doGenerate(transformedParams);\n      const doStream = async () => model.doStream(transformedParams);\n      return wrapGenerate ? wrapGenerate({\n        doGenerate,\n        doStream,\n        params: transformedParams,\n        model\n      }) : doGenerate();\n    },\n    async doStream(params) {\n      const transformedParams = await doTransform({ params, type: \"stream\" });\n      const doGenerate = async () => model.doGenerate(transformedParams);\n      const doStream = async () => model.doStream(transformedParams);\n      return wrapStream ? wrapStream({ doGenerate, doStream, params: transformedParams, model }) : doStream();\n    }\n  };\n};\n\n// src/middleware/wrap-embedding-model.ts\nvar wrapEmbeddingModel = ({\n  model,\n  middleware: middlewareArg,\n  modelId,\n  providerId\n}) => {\n  return [...asArray(middlewareArg)].reverse().reduce((wrappedModel, middleware) => {\n    return doWrap2({ model: wrappedModel, middleware, modelId, providerId });\n  }, model);\n};\nvar doWrap2 = ({\n  model,\n  middleware: {\n    transformParams,\n    wrapEmbed,\n    overrideProvider,\n    overrideModelId,\n    overrideMaxEmbeddingsPerCall,\n    overrideSupportsParallelCalls\n  },\n  modelId,\n  providerId\n}) => {\n  var _a20, _b, _c, _d;\n  async function doTransform({\n    params\n  }) {\n    return transformParams ? await transformParams({ params, model }) : params;\n  }\n  return {\n    specificationVersion: \"v3\",\n    provider: (_a20 = providerId != null ? providerId : overrideProvider == null ? void 0 : overrideProvider({ model })) != null ? _a20 : model.provider,\n    modelId: (_b = modelId != null ? modelId : overrideModelId == null ? void 0 : overrideModelId({ model })) != null ? _b : model.modelId,\n    maxEmbeddingsPerCall: (_c = overrideMaxEmbeddingsPerCall == null ? void 0 : overrideMaxEmbeddingsPerCall({ model })) != null ? _c : model.maxEmbeddingsPerCall,\n    supportsParallelCalls: (_d = overrideSupportsParallelCalls == null ? void 0 : overrideSupportsParallelCalls({ model })) != null ? _d : model.supportsParallelCalls,\n    async doEmbed(params) {\n      const transformedParams = await doTransform({ params });\n      const doEmbed = async () => model.doEmbed(transformedParams);\n      return wrapEmbed ? wrapEmbed({\n        doEmbed,\n        params: transformedParams,\n        model\n      }) : doEmbed();\n    }\n  };\n};\n\n// src/middleware/wrap-image-model.ts\nvar wrapImageModel = ({\n  model,\n  middleware: middlewareArg,\n  modelId,\n  providerId\n}) => {\n  return [...asArray(middlewareArg)].reverse().reduce((wrappedModel, middleware) => {\n    return doWrap3({ model: wrappedModel, middleware, modelId, providerId });\n  }, model);\n};\nvar doWrap3 = ({\n  model,\n  middleware: {\n    transformParams,\n    wrapGenerate,\n    overrideProvider,\n    overrideModelId,\n    overrideMaxImagesPerCall\n  },\n  modelId,\n  providerId\n}) => {\n  var _a20, _b, _c;\n  async function doTransform({ params }) {\n    return transformParams ? await transformParams({ params, model }) : params;\n  }\n  const maxImagesPerCallRaw = (_a20 = overrideMaxImagesPerCall == null ? void 0 : overrideMaxImagesPerCall({ model })) != null ? _a20 : model.maxImagesPerCall;\n  const maxImagesPerCall = maxImagesPerCallRaw instanceof Function ? maxImagesPerCallRaw.bind(model) : maxImagesPerCallRaw;\n  return {\n    specificationVersion: \"v3\",\n    provider: (_b = providerId != null ? providerId : overrideProvider == null ? void 0 : overrideProvider({ model })) != null ? _b : model.provider,\n    modelId: (_c = modelId != null ? modelId : overrideModelId == null ? void 0 : overrideModelId({ model })) != null ? _c : model.modelId,\n    maxImagesPerCall,\n    async doGenerate(params) {\n      const transformedParams = await doTransform({ params });\n      const doGenerate = async () => model.doGenerate(transformedParams);\n      return wrapGenerate ? wrapGenerate({\n        doGenerate,\n        params: transformedParams,\n        model\n      }) : doGenerate();\n    }\n  };\n};\n\n// src/model/as-provider-v3.ts\nfunction asProviderV3(provider) {\n  if (\"specificationVersion\" in provider && provider.specificationVersion === \"v3\") {\n    return provider;\n  }\n  const v2Provider = provider;\n  return {\n    specificationVersion: \"v3\",\n    languageModel: (modelId) => asLanguageModelV3(v2Provider.languageModel(modelId)),\n    embeddingModel: (modelId) => asEmbeddingModelV3(v2Provider.textEmbeddingModel(modelId)),\n    imageModel: (modelId) => asImageModelV3(v2Provider.imageModel(modelId)),\n    transcriptionModel: v2Provider.transcriptionModel ? (modelId) => asTranscriptionModelV3(v2Provider.transcriptionModel(modelId)) : void 0,\n    speechModel: v2Provider.speechModel ? (modelId) => asSpeechModelV3(v2Provider.speechModel(modelId)) : void 0,\n    rerankingModel: void 0\n    // v2 providers don't have reranking models\n  };\n}\n\n// src/middleware/wrap-provider.ts\nfunction wrapProvider({\n  provider,\n  languageModelMiddleware,\n  imageModelMiddleware\n}) {\n  const providerV3 = asProviderV3(provider);\n  return {\n    specificationVersion: \"v3\",\n    languageModel: (modelId) => wrapLanguageModel({\n      model: providerV3.languageModel(modelId),\n      middleware: languageModelMiddleware\n    }),\n    embeddingModel: providerV3.embeddingModel,\n    imageModel: (modelId) => {\n      let model = providerV3.imageModel(modelId);\n      if (imageModelMiddleware != null) {\n        model = wrapImageModel({ model, middleware: imageModelMiddleware });\n      }\n      return model;\n    },\n    transcriptionModel: providerV3.transcriptionModel,\n    speechModel: providerV3.speechModel,\n    rerankingModel: providerV3.rerankingModel\n  };\n}\n\n// src/registry/custom-provider.ts\nimport {\n  NoSuchModelError as NoSuchModelError2\n} from \"@ai-sdk/provider\";\nfunction customProvider({\n  languageModels,\n  embeddingModels,\n  imageModels,\n  transcriptionModels,\n  speechModels,\n  rerankingModels,\n  fallbackProvider: fallbackProviderArg\n}) {\n  const fallbackProvider = fallbackProviderArg ? asProviderV3(fallbackProviderArg) : void 0;\n  return {\n    specificationVersion: \"v3\",\n    languageModel(modelId) {\n      if (languageModels != null && modelId in languageModels) {\n        return languageModels[modelId];\n      }\n      if (fallbackProvider) {\n        return fallbackProvider.languageModel(modelId);\n      }\n      throw new NoSuchModelError2({ modelId, modelType: \"languageModel\" });\n    },\n    embeddingModel(modelId) {\n      if (embeddingModels != null && modelId in embeddingModels) {\n        return embeddingModels[modelId];\n      }\n      if (fallbackProvider) {\n        return fallbackProvider.embeddingModel(modelId);\n      }\n      throw new NoSuchModelError2({ modelId, modelType: \"embeddingModel\" });\n    },\n    imageModel(modelId) {\n      if (imageModels != null && modelId in imageModels) {\n        return imageModels[modelId];\n      }\n      if (fallbackProvider == null ? void 0 : fallbackProvider.imageModel) {\n        return fallbackProvider.imageModel(modelId);\n      }\n      throw new NoSuchModelError2({ modelId, modelType: \"imageModel\" });\n    },\n    transcriptionModel(modelId) {\n      if (transcriptionModels != null && modelId in transcriptionModels) {\n        return transcriptionModels[modelId];\n      }\n      if (fallbackProvider == null ? void 0 : fallbackProvider.transcriptionModel) {\n        return fallbackProvider.transcriptionModel(modelId);\n      }\n      throw new NoSuchModelError2({ modelId, modelType: \"transcriptionModel\" });\n    },\n    speechModel(modelId) {\n      if (speechModels != null && modelId in speechModels) {\n        return speechModels[modelId];\n      }\n      if (fallbackProvider == null ? void 0 : fallbackProvider.speechModel) {\n        return fallbackProvider.speechModel(modelId);\n      }\n      throw new NoSuchModelError2({ modelId, modelType: \"speechModel\" });\n    },\n    rerankingModel(modelId) {\n      if (rerankingModels != null && modelId in rerankingModels) {\n        return rerankingModels[modelId];\n      }\n      if (fallbackProvider == null ? void 0 : fallbackProvider.rerankingModel) {\n        return fallbackProvider.rerankingModel(modelId);\n      }\n      throw new NoSuchModelError2({ modelId, modelType: \"rerankingModel\" });\n    }\n  };\n}\nvar experimental_customProvider = customProvider;\n\n// src/registry/no-such-provider-error.ts\nimport { AISDKError as AISDKError23, NoSuchModelError as NoSuchModelError3 } from \"@ai-sdk/provider\";\nvar name19 = \"AI_NoSuchProviderError\";\nvar marker19 = `vercel.ai.error.${name19}`;\nvar symbol19 = Symbol.for(marker19);\nvar _a19;\nvar NoSuchProviderError = class extends NoSuchModelError3 {\n  constructor({\n    modelId,\n    modelType,\n    providerId,\n    availableProviders,\n    message = `No such provider: ${providerId} (available providers: ${availableProviders.join()})`\n  }) {\n    super({ errorName: name19, modelId, modelType, message });\n    this[_a19] = true;\n    this.providerId = providerId;\n    this.availableProviders = availableProviders;\n  }\n  static isInstance(error) {\n    return AISDKError23.hasMarker(error, marker19);\n  }\n};\n_a19 = symbol19;\n\n// src/registry/provider-registry.ts\nimport {\n  NoSuchModelError as NoSuchModelError4\n} from \"@ai-sdk/provider\";\nfunction createProviderRegistry(providers, {\n  separator = \":\",\n  languageModelMiddleware,\n  imageModelMiddleware\n} = {}) {\n  const registry = new DefaultProviderRegistry({\n    separator,\n    languageModelMiddleware,\n    imageModelMiddleware\n  });\n  for (const [id, provider] of Object.entries(providers)) {\n    registry.registerProvider({ id, provider });\n  }\n  return registry;\n}\nvar experimental_createProviderRegistry = createProviderRegistry;\nvar DefaultProviderRegistry = class {\n  constructor({\n    separator,\n    languageModelMiddleware,\n    imageModelMiddleware\n  }) {\n    this.providers = {};\n    this.separator = separator;\n    this.languageModelMiddleware = languageModelMiddleware;\n    this.imageModelMiddleware = imageModelMiddleware;\n  }\n  registerProvider({\n    id,\n    provider\n  }) {\n    this.providers[id] = provider;\n  }\n  getProvider(id, modelType) {\n    const provider = this.providers[id];\n    if (provider == null) {\n      throw new NoSuchProviderError({\n        modelId: id,\n        modelType,\n        providerId: id,\n        availableProviders: Object.keys(this.providers)\n      });\n    }\n    return provider;\n  }\n  splitId(id, modelType) {\n    const index = id.indexOf(this.separator);\n    if (index === -1) {\n      throw new NoSuchModelError4({\n        modelId: id,\n        modelType,\n        message: `Invalid ${modelType} id for registry: ${id} (must be in the format \"providerId${this.separator}modelId\")`\n      });\n    }\n    return [id.slice(0, index), id.slice(index + this.separator.length)];\n  }\n  languageModel(id) {\n    var _a20, _b;\n    const [providerId, modelId] = this.splitId(id, \"languageModel\");\n    let model = (_b = (_a20 = this.getProvider(providerId, \"languageModel\")).languageModel) == null ? void 0 : _b.call(\n      _a20,\n      modelId\n    );\n    if (model == null) {\n      throw new NoSuchModelError4({ modelId: id, modelType: \"languageModel\" });\n    }\n    if (this.languageModelMiddleware != null) {\n      model = wrapLanguageModel({\n        model,\n        middleware: this.languageModelMiddleware\n      });\n    }\n    return model;\n  }\n  embeddingModel(id) {\n    var _a20;\n    const [providerId, modelId] = this.splitId(id, \"embeddingModel\");\n    const provider = this.getProvider(providerId, \"embeddingModel\");\n    const model = (_a20 = provider.embeddingModel) == null ? void 0 : _a20.call(provider, modelId);\n    if (model == null) {\n      throw new NoSuchModelError4({\n        modelId: id,\n        modelType: \"embeddingModel\"\n      });\n    }\n    return model;\n  }\n  imageModel(id) {\n    var _a20;\n    const [providerId, modelId] = this.splitId(id, \"imageModel\");\n    const provider = this.getProvider(providerId, \"imageModel\");\n    let model = (_a20 = provider.imageModel) == null ? void 0 : _a20.call(provider, modelId);\n    if (model == null) {\n      throw new NoSuchModelError4({ modelId: id, modelType: \"imageModel\" });\n    }\n    if (this.imageModelMiddleware != null) {\n      model = wrapImageModel({\n        model,\n        middleware: this.imageModelMiddleware\n      });\n    }\n    return model;\n  }\n  transcriptionModel(id) {\n    var _a20;\n    const [providerId, modelId] = this.splitId(id, \"transcriptionModel\");\n    const provider = this.getProvider(providerId, \"transcriptionModel\");\n    const model = (_a20 = provider.transcriptionModel) == null ? void 0 : _a20.call(provider, modelId);\n    if (model == null) {\n      throw new NoSuchModelError4({\n        modelId: id,\n        modelType: \"transcriptionModel\"\n      });\n    }\n    return model;\n  }\n  speechModel(id) {\n    var _a20;\n    const [providerId, modelId] = this.splitId(id, \"speechModel\");\n    const provider = this.getProvider(providerId, \"speechModel\");\n    const model = (_a20 = provider.speechModel) == null ? void 0 : _a20.call(provider, modelId);\n    if (model == null) {\n      throw new NoSuchModelError4({ modelId: id, modelType: \"speechModel\" });\n    }\n    return model;\n  }\n  rerankingModel(id) {\n    var _a20;\n    const [providerId, modelId] = this.splitId(id, \"rerankingModel\");\n    const provider = this.getProvider(providerId, \"rerankingModel\");\n    const model = (_a20 = provider.rerankingModel) == null ? void 0 : _a20.call(provider, modelId);\n    if (model == null) {\n      throw new NoSuchModelError4({ modelId: id, modelType: \"rerankingModel\" });\n    }\n    return model;\n  }\n};\n\n// src/rerank/rerank.ts\nasync function rerank({\n  model,\n  documents,\n  query,\n  topN,\n  maxRetries: maxRetriesArg,\n  abortSignal,\n  headers,\n  providerOptions,\n  experimental_telemetry: telemetry\n}) {\n  if (documents.length === 0) {\n    return new DefaultRerankResult({\n      originalDocuments: [],\n      ranking: [],\n      providerMetadata: void 0,\n      response: {\n        timestamp: /* @__PURE__ */ new Date(),\n        modelId: model.modelId\n      }\n    });\n  }\n  const { maxRetries, retry } = prepareRetries({\n    maxRetries: maxRetriesArg,\n    abortSignal\n  });\n  const documentsToSend = typeof documents[0] === \"string\" ? { type: \"text\", values: documents } : { type: \"object\", values: documents };\n  const baseTelemetryAttributes = getBaseTelemetryAttributes({\n    model,\n    telemetry,\n    headers,\n    settings: { maxRetries }\n  });\n  const tracer = getTracer(telemetry);\n  return recordSpan({\n    name: \"ai.rerank\",\n    attributes: selectTelemetryAttributes({\n      telemetry,\n      attributes: {\n        ...assembleOperationName({ operationId: \"ai.rerank\", telemetry }),\n        ...baseTelemetryAttributes,\n        \"ai.documents\": {\n          input: () => documents.map((document) => JSON.stringify(document))\n        }\n      }\n    }),\n    tracer,\n    fn: async () => {\n      var _a20, _b;\n      const { ranking, response, providerMetadata, warnings } = await retry(\n        () => recordSpan({\n          name: \"ai.rerank.doRerank\",\n          attributes: selectTelemetryAttributes({\n            telemetry,\n            attributes: {\n              ...assembleOperationName({\n                operationId: \"ai.rerank.doRerank\",\n                telemetry\n              }),\n              ...baseTelemetryAttributes,\n              // specific settings that only make sense on the outer level:\n              \"ai.documents\": {\n                input: () => documents.map((document) => JSON.stringify(document))\n              }\n            }\n          }),\n          tracer,\n          fn: async (doRerankSpan) => {\n            const modelResponse = await model.doRerank({\n              documents: documentsToSend,\n              query,\n              topN,\n              providerOptions,\n              abortSignal,\n              headers\n            });\n            const ranking2 = modelResponse.ranking;\n            doRerankSpan.setAttributes(\n              await selectTelemetryAttributes({\n                telemetry,\n                attributes: {\n                  \"ai.ranking.type\": documentsToSend.type,\n                  \"ai.ranking\": {\n                    output: () => ranking2.map((ranking3) => JSON.stringify(ranking3))\n                  }\n                }\n              })\n            );\n            return {\n              ranking: ranking2,\n              providerMetadata: modelResponse.providerMetadata,\n              response: modelResponse.response,\n              warnings: modelResponse.warnings\n            };\n          }\n        })\n      );\n      logWarnings({\n        warnings: warnings != null ? warnings : [],\n        provider: model.provider,\n        model: model.modelId\n      });\n      return new DefaultRerankResult({\n        originalDocuments: documents,\n        ranking: ranking.map((ranking2) => ({\n          originalIndex: ranking2.index,\n          score: ranking2.relevanceScore,\n          document: documents[ranking2.index]\n        })),\n        providerMetadata,\n        response: {\n          id: response == null ? void 0 : response.id,\n          timestamp: (_a20 = response == null ? void 0 : response.timestamp) != null ? _a20 : /* @__PURE__ */ new Date(),\n          modelId: (_b = response == null ? void 0 : response.modelId) != null ? _b : model.modelId,\n          headers: response == null ? void 0 : response.headers,\n          body: response == null ? void 0 : response.body\n        }\n      });\n    }\n  });\n}\nvar DefaultRerankResult = class {\n  constructor(options) {\n    this.originalDocuments = options.originalDocuments;\n    this.ranking = options.ranking;\n    this.response = options.response;\n    this.providerMetadata = options.providerMetadata;\n  }\n  get rerankedDocuments() {\n    return this.ranking.map((ranking) => ranking.document);\n  }\n};\n\n// src/transcribe/transcribe.ts\nimport { withUserAgentSuffix as withUserAgentSuffix8 } from \"@ai-sdk/provider-utils\";\nasync function transcribe({\n  model,\n  audio,\n  providerOptions = {},\n  maxRetries: maxRetriesArg,\n  abortSignal,\n  headers\n}) {\n  const resolvedModel = resolveTranscriptionModel(model);\n  if (!resolvedModel) {\n    throw new Error(\"Model could not be resolved\");\n  }\n  const { retry } = prepareRetries({\n    maxRetries: maxRetriesArg,\n    abortSignal\n  });\n  const headersWithUserAgent = withUserAgentSuffix8(\n    headers != null ? headers : {},\n    `ai/${VERSION}`\n  );\n  const audioData = audio instanceof URL ? (await download({ url: audio })).data : convertDataContentToUint8Array(audio);\n  const result = await retry(\n    () => {\n      var _a20;\n      return resolvedModel.doGenerate({\n        audio: audioData,\n        abortSignal,\n        headers: headersWithUserAgent,\n        providerOptions,\n        mediaType: (_a20 = detectMediaType({\n          data: audioData,\n          signatures: audioMediaTypeSignatures\n        })) != null ? _a20 : \"audio/wav\"\n      });\n    }\n  );\n  logWarnings({\n    warnings: result.warnings,\n    provider: resolvedModel.provider,\n    model: resolvedModel.modelId\n  });\n  if (!result.text) {\n    throw new NoTranscriptGeneratedError({ responses: [result.response] });\n  }\n  return new DefaultTranscriptionResult({\n    text: result.text,\n    segments: result.segments,\n    language: result.language,\n    durationInSeconds: result.durationInSeconds,\n    warnings: result.warnings,\n    responses: [result.response],\n    providerMetadata: result.providerMetadata\n  });\n}\nvar DefaultTranscriptionResult = class {\n  constructor(options) {\n    var _a20;\n    this.text = options.text;\n    this.segments = options.segments;\n    this.language = options.language;\n    this.durationInSeconds = options.durationInSeconds;\n    this.warnings = options.warnings;\n    this.responses = options.responses;\n    this.providerMetadata = (_a20 = options.providerMetadata) != null ? _a20 : {};\n  }\n};\n\n// src/ui/call-completion-api.ts\nimport {\n  parseJsonEventStream,\n  withUserAgentSuffix as withUserAgentSuffix9,\n  getRuntimeEnvironmentUserAgent as getRuntimeEnvironmentUserAgent2\n} from \"@ai-sdk/provider-utils\";\n\n// src/ui/process-text-stream.ts\nasync function processTextStream({\n  stream,\n  onTextPart\n}) {\n  const reader = stream.pipeThrough(new TextDecoderStream()).getReader();\n  while (true) {\n    const { done, value } = await reader.read();\n    if (done) {\n      break;\n    }\n    await onTextPart(value);\n  }\n}\n\n// src/ui/call-completion-api.ts\nvar getOriginalFetch = () => fetch;\nasync function callCompletionApi({\n  api,\n  prompt,\n  credentials,\n  headers,\n  body,\n  streamProtocol = \"data\",\n  setCompletion,\n  setLoading,\n  setError,\n  setAbortController,\n  onFinish,\n  onError,\n  fetch: fetch2 = getOriginalFetch()\n}) {\n  var _a20;\n  try {\n    setLoading(true);\n    setError(void 0);\n    const abortController = new AbortController();\n    setAbortController(abortController);\n    setCompletion(\"\");\n    const response = await fetch2(api, {\n      method: \"POST\",\n      body: JSON.stringify({\n        prompt,\n        ...body\n      }),\n      credentials,\n      headers: withUserAgentSuffix9(\n        {\n          \"Content-Type\": \"application/json\",\n          ...headers\n        },\n        `ai-sdk/${VERSION}`,\n        getRuntimeEnvironmentUserAgent2()\n      ),\n      signal: abortController.signal\n    }).catch((err) => {\n      throw err;\n    });\n    if (!response.ok) {\n      throw new Error(\n        (_a20 = await response.text()) != null ? _a20 : \"Failed to fetch the chat response.\"\n      );\n    }\n    if (!response.body) {\n      throw new Error(\"The response body is empty.\");\n    }\n    let result = \"\";\n    switch (streamProtocol) {\n      case \"text\": {\n        await processTextStream({\n          stream: response.body,\n          onTextPart: (chunk) => {\n            result += chunk;\n            setCompletion(result);\n          }\n        });\n        break;\n      }\n      case \"data\": {\n        await consumeStream({\n          stream: parseJsonEventStream({\n            stream: response.body,\n            schema: uiMessageChunkSchema\n          }).pipeThrough(\n            new TransformStream({\n              async transform(part) {\n                if (!part.success) {\n                  throw part.error;\n                }\n                const streamPart = part.value;\n                if (streamPart.type === \"text-delta\") {\n                  result += streamPart.delta;\n                  setCompletion(result);\n                } else if (streamPart.type === \"error\") {\n                  throw new Error(streamPart.errorText);\n                }\n              }\n            })\n          ),\n          onError: (error) => {\n            throw error;\n          }\n        });\n        break;\n      }\n      default: {\n        const exhaustiveCheck = streamProtocol;\n        throw new Error(`Unknown stream protocol: ${exhaustiveCheck}`);\n      }\n    }\n    if (onFinish) {\n      onFinish(prompt, result);\n    }\n    setAbortController(null);\n    return result;\n  } catch (err) {\n    if (err.name === \"AbortError\") {\n      setAbortController(null);\n      return null;\n    }\n    if (err instanceof Error) {\n      if (onError) {\n        onError(err);\n      }\n    }\n    setError(err);\n  } finally {\n    setLoading(false);\n  }\n}\n\n// src/ui/chat.ts\nimport {\n  generateId as generateIdFunc2\n} from \"@ai-sdk/provider-utils\";\n\n// src/ui/convert-file-list-to-file-ui-parts.ts\nasync function convertFileListToFileUIParts(files) {\n  if (files == null) {\n    return [];\n  }\n  if (!globalThis.FileList || !(files instanceof globalThis.FileList)) {\n    throw new Error(\"FileList is not supported in the current environment\");\n  }\n  return Promise.all(\n    Array.from(files).map(async (file) => {\n      const { name: name20, type } = file;\n      const dataUrl = await new Promise((resolve3, reject) => {\n        const reader = new FileReader();\n        reader.onload = (readerEvent) => {\n          var _a20;\n          resolve3((_a20 = readerEvent.target) == null ? void 0 : _a20.result);\n        };\n        reader.onerror = (error) => reject(error);\n        reader.readAsDataURL(file);\n      });\n      return {\n        type: \"file\",\n        mediaType: type,\n        filename: name20,\n        url: dataUrl\n      };\n    })\n  );\n}\n\n// src/ui/default-chat-transport.ts\nimport { parseJsonEventStream as parseJsonEventStream2 } from \"@ai-sdk/provider-utils\";\n\n// src/ui/http-chat-transport.ts\nimport {\n  normalizeHeaders,\n  resolve as resolve2,\n  withUserAgentSuffix as withUserAgentSuffix10,\n  getRuntimeEnvironmentUserAgent as getRuntimeEnvironmentUserAgent3\n} from \"@ai-sdk/provider-utils\";\nvar HttpChatTransport = class {\n  constructor({\n    api = \"/api/chat\",\n    credentials,\n    headers,\n    body,\n    fetch: fetch2,\n    prepareSendMessagesRequest,\n    prepareReconnectToStreamRequest\n  }) {\n    this.api = api;\n    this.credentials = credentials;\n    this.headers = headers;\n    this.body = body;\n    this.fetch = fetch2;\n    this.prepareSendMessagesRequest = prepareSendMessagesRequest;\n    this.prepareReconnectToStreamRequest = prepareReconnectToStreamRequest;\n  }\n  async sendMessages({\n    abortSignal,\n    ...options\n  }) {\n    var _a20, _b, _c, _d, _e;\n    const resolvedBody = await resolve2(this.body);\n    const resolvedHeaders = await resolve2(this.headers);\n    const resolvedCredentials = await resolve2(this.credentials);\n    const baseHeaders = {\n      ...normalizeHeaders(resolvedHeaders),\n      ...normalizeHeaders(options.headers)\n    };\n    const preparedRequest = await ((_a20 = this.prepareSendMessagesRequest) == null ? void 0 : _a20.call(this, {\n      api: this.api,\n      id: options.chatId,\n      messages: options.messages,\n      body: { ...resolvedBody, ...options.body },\n      headers: baseHeaders,\n      credentials: resolvedCredentials,\n      requestMetadata: options.metadata,\n      trigger: options.trigger,\n      messageId: options.messageId\n    }));\n    const api = (_b = preparedRequest == null ? void 0 : preparedRequest.api) != null ? _b : this.api;\n    const headers = (preparedRequest == null ? void 0 : preparedRequest.headers) !== void 0 ? normalizeHeaders(preparedRequest.headers) : baseHeaders;\n    const body = (preparedRequest == null ? void 0 : preparedRequest.body) !== void 0 ? preparedRequest.body : {\n      ...resolvedBody,\n      ...options.body,\n      id: options.chatId,\n      messages: options.messages,\n      trigger: options.trigger,\n      messageId: options.messageId\n    };\n    const credentials = (_c = preparedRequest == null ? void 0 : preparedRequest.credentials) != null ? _c : resolvedCredentials;\n    const fetch2 = (_d = this.fetch) != null ? _d : globalThis.fetch;\n    const response = await fetch2(api, {\n      method: \"POST\",\n      headers: withUserAgentSuffix10(\n        {\n          \"Content-Type\": \"application/json\",\n          ...headers\n        },\n        `ai-sdk/${VERSION}`,\n        getRuntimeEnvironmentUserAgent3()\n      ),\n      body: JSON.stringify(body),\n      credentials,\n      signal: abortSignal\n    });\n    if (!response.ok) {\n      throw new Error(\n        (_e = await response.text()) != null ? _e : \"Failed to fetch the chat response.\"\n      );\n    }\n    if (!response.body) {\n      throw new Error(\"The response body is empty.\");\n    }\n    return this.processResponseStream(response.body);\n  }\n  async reconnectToStream(options) {\n    var _a20, _b, _c, _d, _e;\n    const resolvedBody = await resolve2(this.body);\n    const resolvedHeaders = await resolve2(this.headers);\n    const resolvedCredentials = await resolve2(this.credentials);\n    const baseHeaders = {\n      ...normalizeHeaders(resolvedHeaders),\n      ...normalizeHeaders(options.headers)\n    };\n    const preparedRequest = await ((_a20 = this.prepareReconnectToStreamRequest) == null ? void 0 : _a20.call(this, {\n      api: this.api,\n      id: options.chatId,\n      body: { ...resolvedBody, ...options.body },\n      headers: baseHeaders,\n      credentials: resolvedCredentials,\n      requestMetadata: options.metadata\n    }));\n    const api = (_b = preparedRequest == null ? void 0 : preparedRequest.api) != null ? _b : `${this.api}/${options.chatId}/stream`;\n    const headers = (preparedRequest == null ? void 0 : preparedRequest.headers) !== void 0 ? normalizeHeaders(preparedRequest.headers) : baseHeaders;\n    const credentials = (_c = preparedRequest == null ? void 0 : preparedRequest.credentials) != null ? _c : resolvedCredentials;\n    const fetch2 = (_d = this.fetch) != null ? _d : globalThis.fetch;\n    const response = await fetch2(api, {\n      method: \"GET\",\n      headers: withUserAgentSuffix10(\n        headers,\n        `ai-sdk/${VERSION}`,\n        getRuntimeEnvironmentUserAgent3()\n      ),\n      credentials\n    });\n    if (response.status === 204) {\n      return null;\n    }\n    if (!response.ok) {\n      throw new Error(\n        (_e = await response.text()) != null ? _e : \"Failed to fetch the chat response.\"\n      );\n    }\n    if (!response.body) {\n      throw new Error(\"The response body is empty.\");\n    }\n    return this.processResponseStream(response.body);\n  }\n};\n\n// src/ui/default-chat-transport.ts\nvar DefaultChatTransport = class extends HttpChatTransport {\n  constructor(options = {}) {\n    super(options);\n  }\n  processResponseStream(stream) {\n    return parseJsonEventStream2({\n      stream,\n      schema: uiMessageChunkSchema\n    }).pipeThrough(\n      new TransformStream({\n        async transform(chunk, controller) {\n          if (!chunk.success) {\n            throw chunk.error;\n          }\n          controller.enqueue(chunk.value);\n        }\n      })\n    );\n  }\n};\n\n// src/ui/chat.ts\nvar AbstractChat = class {\n  constructor({\n    generateId: generateId2 = generateIdFunc2,\n    id = generateId2(),\n    transport = new DefaultChatTransport(),\n    messageMetadataSchema,\n    dataPartSchemas,\n    state,\n    onError,\n    onToolCall,\n    onFinish,\n    onData,\n    sendAutomaticallyWhen\n  }) {\n    this.activeResponse = void 0;\n    this.jobExecutor = new SerialJobExecutor();\n    /**\n     * Appends or replaces a user message to the chat list. This triggers the API call to fetch\n     * the assistant's response.\n     *\n     * If a messageId is provided, the message will be replaced.\n     */\n    this.sendMessage = async (message, options) => {\n      var _a20, _b, _c, _d;\n      if (message == null) {\n        await this.makeRequest({\n          trigger: \"submit-message\",\n          messageId: (_a20 = this.lastMessage) == null ? void 0 : _a20.id,\n          ...options\n        });\n        return;\n      }\n      let uiMessage;\n      if (\"text\" in message || \"files\" in message) {\n        const fileParts = Array.isArray(message.files) ? message.files : await convertFileListToFileUIParts(message.files);\n        uiMessage = {\n          parts: [\n            ...fileParts,\n            ...\"text\" in message && message.text != null ? [{ type: \"text\", text: message.text }] : []\n          ]\n        };\n      } else {\n        uiMessage = message;\n      }\n      if (message.messageId != null) {\n        const messageIndex = this.state.messages.findIndex(\n          (m) => m.id === message.messageId\n        );\n        if (messageIndex === -1) {\n          throw new Error(`message with id ${message.messageId} not found`);\n        }\n        if (this.state.messages[messageIndex].role !== \"user\") {\n          throw new Error(\n            `message with id ${message.messageId} is not a user message`\n          );\n        }\n        this.state.messages = this.state.messages.slice(0, messageIndex + 1);\n        this.state.replaceMessage(messageIndex, {\n          ...uiMessage,\n          id: message.messageId,\n          role: (_b = uiMessage.role) != null ? _b : \"user\",\n          metadata: message.metadata\n        });\n      } else {\n        this.state.pushMessage({\n          ...uiMessage,\n          id: (_c = uiMessage.id) != null ? _c : this.generateId(),\n          role: (_d = uiMessage.role) != null ? _d : \"user\",\n          metadata: message.metadata\n        });\n      }\n      await this.makeRequest({\n        trigger: \"submit-message\",\n        messageId: message.messageId,\n        ...options\n      });\n    };\n    /**\n     * Regenerate the assistant message with the provided message id.\n     * If no message id is provided, the last assistant message will be regenerated.\n     */\n    this.regenerate = async ({\n      messageId,\n      ...options\n    } = {}) => {\n      const messageIndex = messageId == null ? this.state.messages.length - 1 : this.state.messages.findIndex((message) => message.id === messageId);\n      if (messageIndex === -1) {\n        throw new Error(`message ${messageId} not found`);\n      }\n      this.state.messages = this.state.messages.slice(\n        0,\n        // if the message is a user message, we need to include it in the request:\n        this.messages[messageIndex].role === \"assistant\" ? messageIndex : messageIndex + 1\n      );\n      await this.makeRequest({\n        trigger: \"regenerate-message\",\n        messageId,\n        ...options\n      });\n    };\n    /**\n     * Attempt to resume an ongoing streaming response.\n     */\n    this.resumeStream = async (options = {}) => {\n      await this.makeRequest({ trigger: \"resume-stream\", ...options });\n    };\n    /**\n     * Clear the error state and set the status to ready if the chat is in an error state.\n     */\n    this.clearError = () => {\n      if (this.status === \"error\") {\n        this.state.error = void 0;\n        this.setStatus({ status: \"ready\" });\n      }\n    };\n    this.addToolApprovalResponse = async ({\n      id,\n      approved,\n      reason\n    }) => this.jobExecutor.run(async () => {\n      const messages = this.state.messages;\n      const lastMessage = messages[messages.length - 1];\n      const updatePart = (part) => isToolUIPart(part) && part.state === \"approval-requested\" && part.approval.id === id ? {\n        ...part,\n        state: \"approval-responded\",\n        approval: { id, approved, reason }\n      } : part;\n      this.state.replaceMessage(messages.length - 1, {\n        ...lastMessage,\n        parts: lastMessage.parts.map(updatePart)\n      });\n      if (this.activeResponse) {\n        this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(updatePart);\n      }\n      if (this.status !== \"streaming\" && this.status !== \"submitted\" && this.sendAutomaticallyWhen) {\n        this.shouldSendAutomatically().then((shouldSend) => {\n          var _a20;\n          if (shouldSend) {\n            this.makeRequest({\n              trigger: \"submit-message\",\n              messageId: (_a20 = this.lastMessage) == null ? void 0 : _a20.id\n            });\n          }\n        });\n      }\n    });\n    this.addToolOutput = async ({\n      state = \"output-available\",\n      tool: tool2,\n      toolCallId,\n      output,\n      errorText\n    }) => this.jobExecutor.run(async () => {\n      const messages = this.state.messages;\n      const lastMessage = messages[messages.length - 1];\n      const updatePart = (part) => isToolUIPart(part) && part.toolCallId === toolCallId ? { ...part, state, output, errorText } : part;\n      this.state.replaceMessage(messages.length - 1, {\n        ...lastMessage,\n        parts: lastMessage.parts.map(updatePart)\n      });\n      if (this.activeResponse) {\n        this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(updatePart);\n      }\n      if (this.status !== \"streaming\" && this.status !== \"submitted\" && this.sendAutomaticallyWhen) {\n        this.shouldSendAutomatically().then((shouldSend) => {\n          var _a20;\n          if (shouldSend) {\n            this.makeRequest({\n              trigger: \"submit-message\",\n              messageId: (_a20 = this.lastMessage) == null ? void 0 : _a20.id\n            });\n          }\n        });\n      }\n    });\n    /** @deprecated Use addToolOutput */\n    this.addToolResult = this.addToolOutput;\n    /**\n     * Abort the current request immediately, keep the generated tokens if any.\n     */\n    this.stop = async () => {\n      var _a20;\n      if (this.status !== \"streaming\" && this.status !== \"submitted\")\n        return;\n      if ((_a20 = this.activeResponse) == null ? void 0 : _a20.abortController) {\n        this.activeResponse.abortController.abort();\n      }\n    };\n    this.id = id;\n    this.transport = transport;\n    this.generateId = generateId2;\n    this.messageMetadataSchema = messageMetadataSchema;\n    this.dataPartSchemas = dataPartSchemas;\n    this.state = state;\n    this.onError = onError;\n    this.onToolCall = onToolCall;\n    this.onFinish = onFinish;\n    this.onData = onData;\n    this.sendAutomaticallyWhen = sendAutomaticallyWhen;\n  }\n  /**\n   * Hook status:\n   *\n   * - `submitted`: The message has been sent to the API and we're awaiting the start of the response stream.\n   * - `streaming`: The response is actively streaming in from the API, receiving chunks of data.\n   * - `ready`: The full response has been received and processed; a new user message can be submitted.\n   * - `error`: An error occurred during the API request, preventing successful completion.\n   */\n  get status() {\n    return this.state.status;\n  }\n  setStatus({\n    status,\n    error\n  }) {\n    if (this.status === status)\n      return;\n    this.state.status = status;\n    this.state.error = error;\n  }\n  get error() {\n    return this.state.error;\n  }\n  get messages() {\n    return this.state.messages;\n  }\n  get lastMessage() {\n    return this.state.messages[this.state.messages.length - 1];\n  }\n  set messages(messages) {\n    this.state.messages = messages;\n  }\n  async shouldSendAutomatically() {\n    if (!this.sendAutomaticallyWhen)\n      return false;\n    const result = this.sendAutomaticallyWhen({\n      messages: this.state.messages\n    });\n    if (result && typeof result === \"object\" && \"then\" in result) {\n      return await result;\n    }\n    return result;\n  }\n  async makeRequest({\n    trigger,\n    metadata,\n    headers,\n    body,\n    messageId\n  }) {\n    var _a20, _b, _c;\n    this.setStatus({ status: \"submitted\", error: void 0 });\n    const lastMessage = this.lastMessage;\n    let isAbort = false;\n    let isDisconnect = false;\n    let isError = false;\n    try {\n      const activeResponse = {\n        state: createStreamingUIMessageState({\n          lastMessage: this.state.snapshot(lastMessage),\n          messageId: this.generateId()\n        }),\n        abortController: new AbortController()\n      };\n      activeResponse.abortController.signal.addEventListener(\"abort\", () => {\n        isAbort = true;\n      });\n      this.activeResponse = activeResponse;\n      let stream;\n      if (trigger === \"resume-stream\") {\n        const reconnect = await this.transport.reconnectToStream({\n          chatId: this.id,\n          metadata,\n          headers,\n          body\n        });\n        if (reconnect == null) {\n          this.setStatus({ status: \"ready\" });\n          return;\n        }\n        stream = reconnect;\n      } else {\n        stream = await this.transport.sendMessages({\n          chatId: this.id,\n          messages: this.state.messages,\n          abortSignal: activeResponse.abortController.signal,\n          metadata,\n          headers,\n          body,\n          trigger,\n          messageId\n        });\n      }\n      const runUpdateMessageJob = (job) => (\n        // serialize the job execution to avoid race conditions:\n        this.jobExecutor.run(\n          () => job({\n            state: activeResponse.state,\n            write: () => {\n              var _a21;\n              this.setStatus({ status: \"streaming\" });\n              const replaceLastMessage = activeResponse.state.message.id === ((_a21 = this.lastMessage) == null ? void 0 : _a21.id);\n              if (replaceLastMessage) {\n                this.state.replaceMessage(\n                  this.state.messages.length - 1,\n                  activeResponse.state.message\n                );\n              } else {\n                this.state.pushMessage(activeResponse.state.message);\n              }\n            }\n          })\n        )\n      );\n      await consumeStream({\n        stream: processUIMessageStream({\n          stream,\n          onToolCall: this.onToolCall,\n          onData: this.onData,\n          messageMetadataSchema: this.messageMetadataSchema,\n          dataPartSchemas: this.dataPartSchemas,\n          runUpdateMessageJob,\n          onError: (error) => {\n            throw error;\n          }\n        }),\n        onError: (error) => {\n          throw error;\n        }\n      });\n      this.setStatus({ status: \"ready\" });\n    } catch (err) {\n      if (isAbort || err.name === \"AbortError\") {\n        isAbort = true;\n        this.setStatus({ status: \"ready\" });\n        return null;\n      }\n      isError = true;\n      if (err instanceof TypeError && (err.message.toLowerCase().includes(\"fetch\") || err.message.toLowerCase().includes(\"network\"))) {\n        isDisconnect = true;\n      }\n      if (this.onError && err instanceof Error) {\n        this.onError(err);\n      }\n      this.setStatus({ status: \"error\", error: err });\n    } finally {\n      try {\n        (_b = this.onFinish) == null ? void 0 : _b.call(this, {\n          message: this.activeResponse.state.message,\n          messages: this.state.messages,\n          isAbort,\n          isDisconnect,\n          isError,\n          finishReason: (_a20 = this.activeResponse) == null ? void 0 : _a20.state.finishReason\n        });\n      } catch (err) {\n        console.error(err);\n      }\n      this.activeResponse = void 0;\n    }\n    if (!isError && await this.shouldSendAutomatically()) {\n      await this.makeRequest({\n        trigger: \"submit-message\",\n        messageId: (_c = this.lastMessage) == null ? void 0 : _c.id,\n        metadata,\n        headers,\n        body\n      });\n    }\n  }\n};\n\n// src/ui/direct-chat-transport.ts\nvar DirectChatTransport = class {\n  constructor({\n    agent,\n    options,\n    ...uiMessageStreamOptions\n  }) {\n    this.agent = agent;\n    this.agentOptions = options;\n    this.uiMessageStreamOptions = uiMessageStreamOptions;\n  }\n  async sendMessages({\n    messages,\n    abortSignal\n  }) {\n    const validatedMessages = await validateUIMessages({\n      messages,\n      tools: this.agent.tools\n    });\n    const modelMessages = await convertToModelMessages(validatedMessages, {\n      tools: this.agent.tools\n    });\n    const result = await this.agent.stream({\n      prompt: modelMessages,\n      abortSignal,\n      ...this.agentOptions !== void 0 ? { options: this.agentOptions } : {}\n    });\n    return result.toUIMessageStream(this.uiMessageStreamOptions);\n  }\n  /**\n   * Direct transport does not support reconnection since there is no\n   * persistent server-side stream to reconnect to.\n   *\n   * @returns Always returns `null`\n   */\n  async reconnectToStream(_options) {\n    return null;\n  }\n};\n\n// src/ui/last-assistant-message-is-complete-with-approval-responses.ts\nfunction lastAssistantMessageIsCompleteWithApprovalResponses({\n  messages\n}) {\n  const message = messages[messages.length - 1];\n  if (!message) {\n    return false;\n  }\n  if (message.role !== \"assistant\") {\n    return false;\n  }\n  const lastStepStartIndex = message.parts.reduce((lastIndex, part, index) => {\n    return part.type === \"step-start\" ? index : lastIndex;\n  }, -1);\n  const lastStepToolInvocations = message.parts.slice(lastStepStartIndex + 1).filter(isToolUIPart).filter((part) => !part.providerExecuted);\n  return (\n    // has at least one tool approval response\n    lastStepToolInvocations.filter((part) => part.state === \"approval-responded\").length > 0 && // all tool approvals must have a response\n    lastStepToolInvocations.every(\n      (part) => part.state === \"output-available\" || part.state === \"output-error\" || part.state === \"approval-responded\"\n    )\n  );\n}\n\n// src/ui/last-assistant-message-is-complete-with-tool-calls.ts\nfunction lastAssistantMessageIsCompleteWithToolCalls({\n  messages\n}) {\n  const message = messages[messages.length - 1];\n  if (!message) {\n    return false;\n  }\n  if (message.role !== \"assistant\") {\n    return false;\n  }\n  const lastStepStartIndex = message.parts.reduce((lastIndex, part, index) => {\n    return part.type === \"step-start\" ? index : lastIndex;\n  }, -1);\n  const lastStepToolInvocations = message.parts.slice(lastStepStartIndex + 1).filter(isToolUIPart).filter((part) => !part.providerExecuted);\n  return lastStepToolInvocations.length > 0 && lastStepToolInvocations.every(\n    (part) => part.state === \"output-available\" || part.state === \"output-error\"\n  );\n}\n\n// src/ui/transform-text-to-ui-message-stream.ts\nfunction transformTextToUiMessageStream({\n  stream\n}) {\n  return stream.pipeThrough(\n    new TransformStream({\n      start(controller) {\n        controller.enqueue({ type: \"start\" });\n        controller.enqueue({ type: \"start-step\" });\n        controller.enqueue({ type: \"text-start\", id: \"text-1\" });\n      },\n      async transform(part, controller) {\n        controller.enqueue({ type: \"text-delta\", id: \"text-1\", delta: part });\n      },\n      async flush(controller) {\n        controller.enqueue({ type: \"text-end\", id: \"text-1\" });\n        controller.enqueue({ type: \"finish-step\" });\n        controller.enqueue({ type: \"finish\" });\n      }\n    })\n  );\n}\n\n// src/ui/text-stream-chat-transport.ts\nvar TextStreamChatTransport = class extends HttpChatTransport {\n  constructor(options = {}) {\n    super(options);\n  }\n  processResponseStream(stream) {\n    return transformTextToUiMessageStream({\n      stream: stream.pipeThrough(new TextDecoderStream())\n    });\n  }\n};\nexport {\n  AISDKError20 as AISDKError,\n  APICallError,\n  AbstractChat,\n  DefaultChatTransport,\n  DirectChatTransport,\n  DownloadError,\n  EmptyResponseBodyError,\n  ToolLoopAgent as Experimental_Agent,\n  HttpChatTransport,\n  InvalidArgumentError,\n  InvalidDataContentError,\n  InvalidMessageRoleError,\n  InvalidPromptError,\n  InvalidResponseDataError,\n  InvalidStreamPartError,\n  InvalidToolApprovalError,\n  InvalidToolInputError,\n  JSONParseError,\n  JsonToSseTransformStream,\n  LoadAPIKeyError,\n  LoadSettingError,\n  MessageConversionError,\n  MissingToolResultsError,\n  NoContentGeneratedError,\n  NoImageGeneratedError,\n  NoObjectGeneratedError,\n  NoOutputGeneratedError,\n  NoSpeechGeneratedError,\n  NoSuchModelError,\n  NoSuchProviderError,\n  NoSuchToolError,\n  NoTranscriptGeneratedError,\n  output_exports as Output,\n  RetryError,\n  SerialJobExecutor,\n  TextStreamChatTransport,\n  TooManyEmbeddingValuesForCallError,\n  ToolCallNotFoundForApprovalError,\n  ToolCallRepairError,\n  ToolLoopAgent,\n  TypeValidationError,\n  UIMessageStreamError,\n  UI_MESSAGE_STREAM_HEADERS,\n  UnsupportedFunctionalityError,\n  UnsupportedModelVersionError,\n  addToolInputExamplesMiddleware,\n  asSchema5 as asSchema,\n  assistantModelMessageSchema,\n  callCompletionApi,\n  consumeStream,\n  convertFileListToFileUIParts,\n  convertToModelMessages,\n  cosineSimilarity,\n  createAgentUIStream,\n  createAgentUIStreamResponse,\n  createGateway,\n  createIdGenerator5 as createIdGenerator,\n  createProviderRegistry,\n  createTextStreamResponse,\n  createUIMessageStream,\n  createUIMessageStreamResponse,\n  customProvider,\n  defaultEmbeddingSettingsMiddleware,\n  defaultSettingsMiddleware,\n  dynamicTool,\n  embed,\n  embedMany,\n  experimental_createProviderRegistry,\n  experimental_customProvider,\n  experimental_generateImage,\n  generateSpeech as experimental_generateSpeech,\n  transcribe as experimental_transcribe,\n  extractJsonMiddleware,\n  extractReasoningMiddleware,\n  gateway2 as gateway,\n  generateId,\n  generateImage,\n  generateObject,\n  generateText,\n  getStaticToolName,\n  getTextFromDataUrl,\n  getToolName,\n  getToolOrDynamicToolName,\n  hasToolCall,\n  isDataUIPart,\n  isDeepEqualData,\n  isFileUIPart,\n  isReasoningUIPart,\n  isStaticToolUIPart,\n  isTextUIPart,\n  isToolOrDynamicToolUIPart,\n  isToolUIPart,\n  jsonSchema,\n  lastAssistantMessageIsCompleteWithApprovalResponses,\n  lastAssistantMessageIsCompleteWithToolCalls,\n  modelMessageSchema,\n  parseJsonEventStream3 as parseJsonEventStream,\n  parsePartialJson,\n  pipeAgentUIStreamToResponse,\n  pipeTextStreamToResponse,\n  pipeUIMessageStreamToResponse,\n  pruneMessages,\n  readUIMessageStream,\n  rerank,\n  safeValidateUIMessages,\n  simulateReadableStream,\n  simulateStreamingMiddleware,\n  smoothStream,\n  stepCountIs,\n  streamObject,\n  streamText,\n  systemModelMessageSchema,\n  tool,\n  toolModelMessageSchema,\n  uiMessageChunkSchema,\n  userModelMessageSchema,\n  validateUIMessages,\n  wrapEmbeddingModel,\n  wrapImageModel,\n  wrapLanguageModel,\n  wrapProvider,\n  zodSchema3 as zodSchema\n};\n//# sourceMappingURL=index.mjs.map","import { AgentExecutionError, ConfigurationError, LLMProviderError, UserInputError } from \"./errors-CEDWDXew.js\";\nimport { logIssue, logWarn } from \"./logging-B7X3yL0T.js\";\nimport { ApiClientError, ApiError, ApiServerError, isApiAuthenticationErrorDeep } from \"./errors-DG2FreDU.js\";\nimport { APICallError, NoObjectGeneratedError, RetryError } from \"ai\";\n\n//#region src/internal/error-handling.ts\n/**\n* Type guard to identify user input validation errors.\n*/\nfunction isUserInputError(error) {\n\treturn error instanceof UserInputError;\n}\n/**\n* Type guard to identify configuration errors.\n*/\nfunction isConfigurationError(error) {\n\treturn error instanceof ConfigurationError;\n}\n/**\n* Type guard to identify LLM provider errors.\n*/\nfunction isLLMProviderError(error) {\n\treturn error instanceof LLMProviderError;\n}\n/**\n* Type guard for unexpected embedded-agent failures that already created a\n* Sentry issue at the agent boundary.\n*/\nfunction isAgentExecutionError(error) {\n\treturn error instanceof AgentExecutionError;\n}\n/**\n* Type guard to identify API errors.\n*/\nfunction isApiError(error) {\n\treturn error instanceof ApiError;\n}\n/**\n* Type guard to identify API client errors (4xx).\n*/\nfunction isApiClientError(error) {\n\treturn error instanceof ApiClientError;\n}\n/**\n* Type guard to identify API server errors (5xx).\n*/\nfunction isApiServerError(error) {\n\treturn error instanceof ApiServerError;\n}\n/**\n* Type guard to identify AI SDK API call errors.\n*/\nfunction isAPICallError(error) {\n\treturn APICallError.isInstance(error);\n}\nconst GENERIC_CONFIG_ERROR_MESSAGE = [\n\t\"**Feature Unavailable**\",\n\t\"This feature is temporarily unavailable due to a server configuration issue.\",\n\t\"The service operator has been notified. Please try again later.\"\n].join(\"\\n\\n\");\nconst GENERIC_AI_PROVIDER_ERROR_MESSAGE = [\n\t\"**Feature Unavailable**\",\n\t\"AI-powered features are temporarily unavailable because the upstream AI provider rejected or could not complete this request.\",\n\t\"Other Sentry MCP tools that do not require AI should still work. Please try again later.\"\n].join(\"\\n\\n\");\n/**\n* Expected/user-facing tool failures that should return a formatted MCP error\n* response without creating a Sentry issue or recording a span exception.\n*\n* Includes AI provider outages (budget exhaustion, rate limits, region blocks,\n* 5xx/network failures from the upstream LLM) so tool calls degrade cleanly.\n*/\nfunction isExpectedToolError(error) {\n\tif (isUserInputError(error) || isConfigurationError(error) || isLLMProviderError(error) || isAgentExecutionError(error) || isApiClientError(error) || isApiAuthenticationErrorDeep(error)) return true;\n\tif (isAPICallError(error) || RetryError.isInstance(error)) return true;\n\treturn NoObjectGeneratedError.isInstance(error);\n}\n/**\n* Format a server-side configuration error for user display.\n*\n* For HTTP transport, the detailed message is hidden (the user cannot fix\n* server-side configuration) — the error is logged to Sentry and a generic\n* message is returned instead.\n* For stdio/unset transport, the detailed parts are returned as-is.\n*/\nfunction formatServerConfigError(error, detailedParts, options) {\n\tif (options?.transport === \"http\") {\n\t\tlogIssue(error);\n\t\treturn GENERIC_CONFIG_ERROR_MESSAGE;\n\t}\n\treturn detailedParts.join(\"\\n\\n\");\n}\n/**\n* Format an AI provider availability failure for user display.\n*\n* These are expected operational failures (budget limits, rate limits, region\n* restrictions, provider outages). Always log as a warning — never create a\n* Sentry issue per request — and hide provider internals on HTTP transport.\n*/\nfunction formatAiProviderError(error, detailedParts, options) {\n\tlogWarn(error, {\n\t\tloggerScope: [\"error-handling\", \"llm-provider\"],\n\t\tcontexts: { aiProvider: {\n\t\t\terrorType: error.name,\n\t\t\ttransport: options?.transport ?? null\n\t\t} }\n\t});\n\tif (options?.transport === \"http\") return GENERIC_AI_PROVIDER_ERROR_MESSAGE;\n\treturn detailedParts.join(\"\\n\\n\");\n}\n/**\n* Format an error for user display with markdown formatting.\n* This is used by tool handlers to format errors for MCP responses.\n*\n* When transport is \"http\", server configuration errors create a Sentry issue\n* and return a generic message (users can't fix server-side config).\n* AI provider outages are different: they always log as warnings and return a\n* graceful availability message so a provider budget/outage does not flood issues.\n* When transport is \"stdio\" or undefined, detailed messages are returned\n* (operators/users can fix their own config).\n*\n* SECURITY: Only return trusted error messages to prevent prompt injection vulnerabilities.\n* We trust: Sentry API errors, our own UserInputError/ConfigurationError messages, and system templates.\n*/\nasync function formatErrorForUser(error, options) {\n\tif (isUserInputError(error)) return [\n\t\t\"**Input Error**\",\n\t\t\"It looks like there was a problem with the input you provided.\",\n\t\terror.message,\n\t\t\"You may be able to resolve the issue by addressing the concern and trying again.\"\n\t].join(\"\\n\\n\");\n\tif (isConfigurationError(error)) return formatServerConfigError(error, [\n\t\t\"**Configuration Error**\",\n\t\t\"There appears to be a configuration issue with your setup.\",\n\t\terror.message,\n\t\t\"Please check your environment configuration and try again.\"\n\t], options);\n\tif (isLLMProviderError(error)) return formatAiProviderError(error, [\n\t\t\"**AI Provider Error**\",\n\t\t\"The AI provider service is not available for this request.\",\n\t\terror.message,\n\t\t\"This is a service availability issue. Other non-AI tools should still work.\"\n\t], options);\n\tif (isAgentExecutionError(error)) {\n\t\tconst parts$1 = [\n\t\t\t\"**AI Processing Error**\",\n\t\t\t\"The AI agent failed to complete this request.\",\n\t\t\t\"The service operator has been notified. Please try again, or rephrase your request.\"\n\t\t];\n\t\tif (error.eventId) parts$1.push(`**Event ID**: ${error.eventId}`);\n\t\treturn parts$1.join(\"\\n\\n\");\n\t}\n\tif (isAPICallError(error) || RetryError.isInstance(error)) {\n\t\tconst statusCode = isAPICallError(error) ? error.statusCode : void 0;\n\t\tconst detail = statusCode && statusCode >= 500 ? \"The AI provider is currently unavailable.\" : statusCode && statusCode >= 400 ? \"The AI provider rejected this request.\" : \"The AI provider could not complete this request.\";\n\t\treturn formatAiProviderError(error, [\n\t\t\t\"**AI Provider Error**\",\n\t\t\tdetail,\n\t\t\terror.message,\n\t\t\t\"This is a service availability issue. Other non-AI tools should still work.\"\n\t\t], options);\n\t}\n\tif (NoObjectGeneratedError.isInstance(error)) return [\"**AI Processing Error**\", \"The AI was unable to process your query. Please try rephrasing your request.\"].join(\"\\n\\n\");\n\tif (isApiAuthenticationErrorDeep(error)) return [\"**Authorization Expired**\", \"Sentry rejected the stored access token for this session. Please re-authorize to continue.\"].join(\"\\n\\n\");\n\tif (isApiClientError(error)) {\n\t\tconst statusText = error.status ? `There was an HTTP ${error.status} error with your request to the Sentry API.` : \"There was an error with your request.\";\n\t\treturn [\n\t\t\t\"**Input Error**\",\n\t\t\tstatusText,\n\t\t\terror.toUserMessage(),\n\t\t\t\"You may be able to resolve the issue by addressing the concern and trying again.\"\n\t\t].join(\"\\n\\n\");\n\t}\n\tif (isApiServerError(error)) {\n\t\tconst eventId$1 = logIssue(error);\n\t\tconst statusText = error.status ? `There was an HTTP ${error.status} server error with the Sentry API.` : \"There was a server error.\";\n\t\tconst parts$1 = [\n\t\t\t\"**Error**\",\n\t\t\tstatusText,\n\t\t\terror.message\n\t\t];\n\t\tif (eventId$1) parts$1.push(`**Event ID**: ${eventId$1}`);\n\t\tparts$1.push(\"Please contact support if the problem persists.\");\n\t\treturn parts$1.join(\"\\n\\n\");\n\t}\n\tif (isApiError(error)) {\n\t\tconst statusText = error.status ? `There was an HTTP ${error.status} error with your request to the Sentry API.` : \"There was an error with your request.\";\n\t\treturn [\n\t\t\t\"**Error**\",\n\t\t\tstatusText,\n\t\t\terror.message,\n\t\t\t\"You may be able to resolve the issue by addressing the concern and trying again.\"\n\t\t].join(\"\\n\\n\");\n\t}\n\tconst eventId = logIssue(error);\n\tconst parts = [\n\t\t\"**Error**\",\n\t\t\"It looks like there was a problem communicating with the Sentry API.\",\n\t\t\"Please report the following to the user for the Sentry team:\"\n\t];\n\tif (eventId) parts.push(`**Event ID**: ${eventId}`);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst errorMsg = error instanceof Error ? error.message : String(error);\n\t\tif (errorMsg) parts.push(errorMsg);\n\t}\n\treturn parts.join(\"\\n\\n\");\n}\n\n//#endregion\nexport { formatErrorForUser, isAPICallError, isAgentExecutionError, isApiClientError, isApiError, isApiServerError, isConfigurationError, isExpectedToolError, isLLMProviderError, isUserInputError };\n//# sourceMappingURL=error-handling-BsZo3KBt.js.map","//#region src/internal/constraint-helpers.ts\n/**\n* Determines which tool parameter keys should be filtered out of the schema\n* because they will be injected from constraints.\n*\n* Handles parameter aliases: when a projectSlug constraint exists and the tool\n* has a projectSlugOrId parameter, the alias will be applied UNLESS projectSlugOrId\n* is explicitly constrained with a truthy value.\n*\n* @param constraints - The active constraints (org, project, region)\n* @param toolInputSchema - The tool's input schema definition\n* @returns Array of parameter keys that should be filtered from the schema\n*\n* @example\n* ```typescript\n* const constraints = { projectSlug: \"my-project\", organizationSlug: \"my-org\" };\n* const schema = { organizationSlug: z.string(), projectSlugOrId: z.string() };\n* const keys = getConstraintKeysToFilter(constraints, schema);\n* // Returns: [\"organizationSlug\", \"projectSlugOrId\"]\n* // projectSlugOrId is included because projectSlug constraint will map to it\n* ```\n*/\nfunction getConstraintKeysToFilter(constraints, toolInputSchema) {\n\treturn Object.entries(constraints).flatMap(([key, value]) => {\n\t\tif (!value || typeof value !== \"string\") return [];\n\t\tconst keys = [];\n\t\tif (key in toolInputSchema) keys.push(key);\n\t\tif (key === \"projectSlug\" && \"projectSlugOrId\" in toolInputSchema && !(\"projectSlugOrId\" in constraints && constraints.projectSlugOrId)) keys.push(\"projectSlugOrId\");\n\t\treturn keys;\n\t});\n}\n/**\n* Builds the constraint parameters that should be injected into tool calls.\n*\n* Handles parameter aliases: when a projectSlug constraint exists and the tool\n* has a projectSlugOrId parameter, the constraint value will be injected as\n* projectSlugOrId UNLESS projectSlugOrId is explicitly constrained with a truthy value.\n*\n* @param constraints - The active constraints (org, project, region)\n* @param toolInputSchema - The tool's input schema definition\n* @returns Object mapping parameter names to constraint values\n*\n* @example\n* ```typescript\n* const constraints = { projectSlug: \"my-project\", organizationSlug: \"my-org\" };\n* const schema = { organizationSlug: z.string(), projectSlugOrId: z.string() };\n* const params = getConstraintParametersToInject(constraints, schema);\n* // Returns: { organizationSlug: \"my-org\", projectSlugOrId: \"my-project\" }\n* // projectSlug constraint is injected as projectSlugOrId parameter\n* ```\n*/\nfunction getConstraintParametersToInject(constraints, toolInputSchema) {\n\treturn Object.fromEntries(Object.entries(constraints).flatMap(([key, value]) => {\n\t\tif (!value || typeof value !== \"string\") return [];\n\t\tconst entries = [];\n\t\tif (key in toolInputSchema) entries.push([key, value]);\n\t\tif (key === \"projectSlug\" && \"projectSlugOrId\" in toolInputSchema && !(\"projectSlugOrId\" in constraints && constraints.projectSlugOrId)) entries.push([\"projectSlugOrId\", value]);\n\t\treturn entries;\n\t}));\n}\n\n//#endregion\nexport { getConstraintKeysToFilter, getConstraintParametersToInject };\n//# sourceMappingURL=constraint-helpers-C-VlK4t-.js.map","//#region src/tools/surfaces.ts\n/**\n* Central policy for direct MCP exposure.\n*\n* Tool modules define behavior: name, description, schema, annotations, and\n* handler. Ordinary tools are catalog-eligible by default. This file only lists\n* wrapper/infrastructure tools outside the catalog and the explicit subset also\n* exposed through tools/list.\n*/\nconst CATALOG_INFRASTRUCTURE_TOOL_NAMES = [\"search_sentry_tools\", \"execute_sentry_tool\"];\nconst WRAPPER_TOOL_NAMES = [];\nconst TOP_LEVEL_TOOL_NAMES = [\n\t\"find_organizations\",\n\t\"find_projects\",\n\t\"update_issue\",\n\t\"search_events\",\n\t\"analyze_issue_with_seer\",\n\t\"search_issues\",\n\t\"get_sentry_resource\",\n\t...CATALOG_INFRASTRUCTURE_TOOL_NAMES\n];\nconst EXPERIMENTAL_TOP_LEVEL_TOOL_NAMES = TOP_LEVEL_TOOL_NAMES;\nconst topLevelToolNames = new Set(TOP_LEVEL_TOOL_NAMES);\nconst wrapperToolNames = new Set(WRAPPER_TOOL_NAMES);\nconst catalogInfrastructureToolNames = new Set(CATALOG_INFRASTRUCTURE_TOOL_NAMES);\nfunction isOutsideCatalogToolName(toolName) {\n\treturn wrapperToolNames.has(toolName) || catalogInfrastructureToolNames.has(toolName);\n}\nfunction isDefaultTopLevelToolName(toolName) {\n\treturn topLevelToolNames.has(toolName);\n}\nfunction isTopLevelToolName(toolName, _experimentalMode) {\n\treturn topLevelToolNames.has(toolName);\n}\nfunction getTopLevelToolNames({ experimentalMode: _experimentalMode }) {\n\treturn TOP_LEVEL_TOOL_NAMES;\n}\nfunction isWrapperToolName(toolName) {\n\treturn wrapperToolNames.has(toolName);\n}\nfunction isCatalogInfrastructureToolName(toolName) {\n\treturn catalogInfrastructureToolNames.has(toolName);\n}\n\n//#endregion\nexport { CATALOG_INFRASTRUCTURE_TOOL_NAMES, EXPERIMENTAL_TOP_LEVEL_TOOL_NAMES, TOP_LEVEL_TOOL_NAMES, WRAPPER_TOOL_NAMES, getTopLevelToolNames, isCatalogInfrastructureToolName, isDefaultTopLevelToolName, isOutsideCatalogToolName, isTopLevelToolName, isWrapperToolName };\n//# sourceMappingURL=surfaces-B1_F0pzt.js.map","//#region src/tools/types.ts\n/**\n* Resolves a tool description to a string.\n* Handles both static strings and dynamic description functions.\n*/\nfunction resolveDescription(description, context) {\n\treturn typeof description === \"function\" ? description(context) : description;\n}\n/**\n* Determines if a tool is enabled for the current release mode.\n*/\nfunction isToolVisibleInMode(tool, experimentalMode) {\n\tif (tool.experimental && !experimentalMode) return false;\n\tif (tool.hideInExperimentalMode && experimentalMode) return false;\n\treturn true;\n}\n\n//#endregion\nexport { isToolVisibleInMode, resolveDescription };\n//# sourceMappingURL=types-DGnYE-i7.js.map","import { isEnabledBySkills } from \"./skills-Dj4T8Duc.js\";\nimport { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { getConstraintKeysToFilter, getConstraintParametersToInject } from \"./constraint-helpers-C-VlK4t-.js\";\nimport { isCatalogInfrastructureToolName, isOutsideCatalogToolName, isTopLevelToolName } from \"./surfaces-B1_F0pzt.js\";\nimport { isToolVisibleInMode, resolveDescription } from \"./types-DGnYE-i7.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/catalog-runtime/availability.ts\nfunction getToolPlacement({ key, experimentalMode, useDefaultSurfacePolicy }) {\n\tif (useDefaultSurfacePolicy) return {\n\t\tisCatalogTool: !isOutsideCatalogToolName(key),\n\t\tisTopLevel: isTopLevelToolName(key, experimentalMode)\n\t};\n\treturn {\n\t\tisCatalogTool: true,\n\t\tisTopLevel: true\n\t};\n}\nfunction hasRequiredCapabilities({ tool, context }) {\n\tif (!context.constraints.projectSlug || !context.constraints.projectCapabilities || !tool.requiredCapabilities?.length) return true;\n\tconst caps = context.constraints.projectCapabilities;\n\treturn tool.requiredCapabilities.every((cap) => caps[cap] === true);\n}\nfunction isAllowedBySkills({ tool, context }) {\n\tconst grantedSkills = context.grantedSkills ? new Set(context.grantedSkills) : void 0;\n\tif (!grantedSkills) return false;\n\treturn tool.skills.length > 0 && isEnabledBySkills(grantedSkills, tool.skills);\n}\nfunction isHiddenByConstraints({ key, context }) {\n\treturn key === \"find_organizations\" && !!context.constraints.organizationSlug || key === \"find_projects\" && !!context.constraints.projectSlug || key === \"create_project\" && !!context.constraints.projectSlug;\n}\nfunction getFilteredInputSchema(tool, context) {\n\tconst constraintKeysToFilter = new Set(getConstraintKeysToFilter(context.constraints, tool.inputSchema));\n\treturn Object.fromEntries(Object.entries(tool.inputSchema).filter(([key]) => !constraintKeysToFilter.has(key)));\n}\nfunction injectConstraintParams(params, tool, context) {\n\treturn {\n\t\t...params,\n\t\t...getConstraintParametersToInject(context.constraints, tool.inputSchema)\n\t};\n}\nfunction getAvailableTools({ tools, context, experimentalMode, useDefaultSurfacePolicy }) {\n\tconst availableTools = [];\n\tfor (const [key, tool] of Object.entries(tools)) {\n\t\tconst placement = getToolPlacement({\n\t\t\tkey,\n\t\t\texperimentalMode,\n\t\t\tuseDefaultSurfacePolicy\n\t\t});\n\t\tif (!placement.isCatalogTool && !placement.isTopLevel) continue;\n\t\tif (!isToolVisibleInMode(tool, experimentalMode)) continue;\n\t\tif (!isAllowedBySkills({\n\t\t\ttool,\n\t\t\tcontext\n\t\t})) continue;\n\t\tif (isHiddenByConstraints({\n\t\t\tkey,\n\t\t\tcontext\n\t\t})) continue;\n\t\tif (!hasRequiredCapabilities({\n\t\t\ttool,\n\t\t\tcontext\n\t\t})) continue;\n\t\tavailableTools.push({\n\t\t\tkey,\n\t\t\ttool,\n\t\t\t...placement\n\t\t});\n\t}\n\treturn availableTools;\n}\nfunction getToolsForMcpRegistration({ tools, context, experimentalMode, useDefaultSurfacePolicy }) {\n\tconst availableTools = getAvailableTools({\n\t\ttools,\n\t\tcontext,\n\t\texperimentalMode,\n\t\tuseDefaultSurfacePolicy\n\t});\n\treturn availableTools.filter(({ isTopLevel }) => isTopLevel);\n}\nfunction getSearchableTools({ tools, context, experimentalMode, useDefaultSurfacePolicy }) {\n\treturn getAvailableTools({\n\t\ttools,\n\t\tcontext,\n\t\texperimentalMode,\n\t\tuseDefaultSurfacePolicy\n\t}).filter(({ key, isCatalogTool }) => isCatalogTool && !isCatalogInfrastructureToolName(key));\n}\nfunction formatZodIssues(error) {\n\treturn error.issues.map((issue) => {\n\t\tconst path = issue.path.length > 0 ? issue.path.join(\".\") : \"arguments\";\n\t\treturn `${path}: ${issue.message}`;\n\t}).join(\"; \");\n}\nasync function executeToolHandler({ tool, params, context }) {\n\tconst paramsWithConstraints = prepareToolParams({\n\t\ttool,\n\t\tparams,\n\t\tcontext\n\t});\n\treturn tool.handler(paramsWithConstraints, context);\n}\nfunction prepareToolParams({ tool, params, context }) {\n\tconst filteredInputSchema = getFilteredInputSchema(tool, context);\n\tconst schema = z.object(filteredInputSchema);\n\tconst parsed = schema.safeParse(params);\n\tif (!parsed.success) throw new UserInputError(`Invalid arguments for ${tool.name}: ${formatZodIssues(parsed.error)}`);\n\treturn injectConstraintParams(parsed.data, tool, context);\n}\nfunction resolveToolDescription(tool, context) {\n\treturn resolveDescription(tool.description, context);\n}\n\n//#endregion\nexport { executeToolHandler, getAvailableTools, getFilteredInputSchema, getSearchableTools, getToolsForMcpRegistration, injectConstraintParams, prepareToolParams, resolveToolDescription };\n//# sourceMappingURL=availability-zLnbaxcD.js.map","//#region src/internal/tool-helpers/define.ts\nfunction defineTool(config) {\n\treturn config;\n}\n\n//#endregion\nexport { defineTool };\n//# sourceMappingURL=define-SD6AQa4b.js.map","import { SENTRY_ALLOWED_REGION_DOMAINS } from \"./constants-CEZaLsGe.js\";\nimport { UserInputError } from \"./errors-CEDWDXew.js\";\n\n//#region src/internal/tool-helpers/validate-region-url.ts\n/**\n* Validates that a regionUrl is valid.\n* Prevents SSRF attacks by only allowing the base host itself or domains from an allowlist.\n*\n* Rules:\n* 1. By default, only the base host itself is allowed as regionUrl\n* 2. For other domains, they must be in SENTRY_ALLOWED_REGION_DOMAINS\n* 3. Protocol MUST be HTTPS for security\n*\n* @param regionUrl - The region URL to validate\n* @param baseHost - The base host to validate against\n* @returns The validated host if valid\n* @throws {UserInputError} If the regionUrl is invalid or not allowed\n*/\nfunction validateRegionUrl(regionUrl, baseHost) {\n\tlet parsedUrl;\n\ttry {\n\t\tparsedUrl = new URL(regionUrl);\n\t} catch {\n\t\tthrow new UserInputError(`Invalid regionUrl provided: ${regionUrl}. Must be a valid URL.`);\n\t}\n\tif (parsedUrl.protocol !== \"https:\") throw new UserInputError(`Invalid regionUrl provided: ${regionUrl}. Must use HTTPS protocol for security.`);\n\tif (parsedUrl.host === \"https\" || parsedUrl.host === \"http\") throw new UserInputError(`Invalid regionUrl provided: ${regionUrl}. The host cannot be just a protocol name.`);\n\tconst regionHost = parsedUrl.host.toLowerCase();\n\tconst baseLower = baseHost.toLowerCase();\n\tif (regionHost === baseLower) return regionHost;\n\tif (!SENTRY_ALLOWED_REGION_DOMAINS.has(regionHost)) throw new UserInputError(`Invalid regionUrl: ${regionUrl}. The domain '${regionHost}' is not allowed. Allowed domains are: ${Array.from(SENTRY_ALLOWED_REGION_DOMAINS).join(\", \")}`);\n\treturn regionHost;\n}\n\n//#endregion\nexport { validateRegionUrl };\n//# sourceMappingURL=validate-region-url-C2aYIha9.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ApiAuthenticationError, ApiClientError, ApiNotFoundError } from \"./errors-DG2FreDU.js\";\nimport { SentryApiService } from \"./client-IUNQkit5.js\";\nimport { validateRegionUrl } from \"./validate-region-url-C2aYIha9.js\";\n\n//#region src/internal/tool-helpers/api.ts\n/**\n* Create a Sentry API service from server context with optional region override\n* @param context - Server context containing host and access token\n* @param opts - Options object containing optional regionUrl override\n* @returns Configured SentryApiService instance using the context's configured protocol\n* @throws {UserInputError} When regionUrl is provided but invalid\n*/\nfunction apiServiceFromContext(context, opts = {}) {\n\tlet host = context.sentryHost;\n\tif (opts.regionUrl?.trim()) {\n\t\tconst baseHost = context.sentryHost || \"sentry.io\";\n\t\thost = validateRegionUrl(opts.regionUrl.trim(), baseHost);\n\t}\n\treturn new SentryApiService({\n\t\thost,\n\t\tprotocol: context.sentryProtocol,\n\t\taccessToken: context.accessToken,\n\t\tclientId: context.clientId,\n\t\tclientName: context.clientName,\n\t\tclientFamily: context.clientFamily,\n\t\tutmSource: context.utmSource\n\t});\n}\n/**\n* Maps API errors to user-friendly errors based on context\n* @param error - The error to handle\n* @param params - The parameters that were used in the API call\n* @returns Never - always throws an error\n* @throws {UserInputError} For 4xx errors that are likely user input issues\n* @throws {Error} For other errors\n*/\nfunction handleApiError(error, params) {\n\tif (error instanceof ApiAuthenticationError) throw error;\n\tif (error instanceof ApiClientError) {\n\t\tlet message = `API error (${error.status}): ${error.message}`;\n\t\tif (error instanceof ApiNotFoundError && params) {\n\t\t\tconst paramsList = [];\n\t\t\tfor (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== \"\") paramsList.push(`${key}: '${value}'`);\n\t\t\tif (paramsList.length > 0) message = `Resource not found (404): ${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => `  - ${p}`).join(\"\\n\")}`;\n\t\t}\n\t\tthrow new UserInputError(message, { cause: error });\n\t}\n\tthrow error;\n}\n/**\n* Wraps an async API call with automatic error handling\n* @param fn - The async function to execute\n* @param params - The parameters that were used in the API call\n* @returns The result of the function\n* @throws {UserInputError} For user input errors\n* @throws {Error} For other errors\n*/\nasync function withApiErrorHandling(fn, params) {\n\ttry {\n\t\treturn await fn();\n\t} catch (error) {\n\t\thandleApiError(error, params);\n\t}\n}\n\n//#endregion\nexport { apiServiceFromContext, handleApiError, withApiErrorHandling };\n//# sourceMappingURL=api-EaEPyKlQ.js.map","//#region src/internal/tool-helpers/results.ts\n/**\n* Marks a tool result as structured-only. The server generates compatibility\n* text for clients that do not read structuredContent yet.\n*/\nfunction structuredResult(structuredContent) {\n\treturn { structuredContent };\n}\n\n//#endregion\nexport { structuredResult };\n//# sourceMappingURL=results-NF1RJbDZ.js.map","import { ALL_SKILLS } from \"./skills-Dj4T8Duc.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/catalog/whoami.ts\nconst whoamiOutputSchema = z.object({\n\tuser: z.object({\n\t\tid: z.string(),\n\t\tname: z.string().nullable(),\n\t\temail: z.string()\n\t}),\n\tsessionConstraints: z.object({\n\t\torganizationSlug: z.string().optional(),\n\t\tprojectSlug: z.string().optional(),\n\t\tregionUrl: z.string().optional()\n\t}).nullable()\n});\nvar whoami_default = defineTool({\n\tname: \"whoami\",\n\tdescription: [\n\t\t\"Identify the authenticated user in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Get the user's name and email address.\"\n\t].join(\"\\n\"),\n\tinputSchema: {},\n\toutputSchema: whoamiOutputSchema,\n\tskills: ALL_SKILLS,\n\trequiredScopes: [],\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context);\n\t\tconst user = await apiService.getAuthenticatedUser();\n\t\tconst constraints = context.constraints;\n\t\tconst sessionConstraints = constraints.organizationSlug || constraints.projectSlug || constraints.regionUrl ? {\n\t\t\t...constraints.organizationSlug ? { organizationSlug: constraints.organizationSlug } : {},\n\t\t\t...constraints.projectSlug ? { projectSlug: constraints.projectSlug } : {},\n\t\t\t...constraints.regionUrl ? { regionUrl: constraints.regionUrl } : {}\n\t\t} : null;\n\t\treturn structuredResult({\n\t\t\tuser: {\n\t\t\t\tid: String(user.id),\n\t\t\t\tname: user.name ?? null,\n\t\t\t\temail: user.email\n\t\t\t},\n\t\t\tsessionConstraints\n\t\t});\n\t}\n});\n\n//#endregion\nexport { whoamiOutputSchema, whoami_default };\n//# sourceMappingURL=whoami-Bz6QKirR.js.map","import { ALL_SKILLS } from \"./skills-Dj4T8Duc.js\";\nimport { ParamSearchQuery } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/catalog/find-organizations.ts\nconst RESULT_LIMIT = 25;\nconst findOrganizationsOutputSchema = z.object({\n\torganizations: z.array(z.object({\n\t\tslug: z.string(),\n\t\twebUrl: z.string().url().nullable(),\n\t\tregionUrl: z.string().url().nullable()\n\t})),\n\thasMore: z.boolean()\n});\nfunction normalizeUrl(url) {\n\treturn url?.trim() ? url : null;\n}\nvar find_organizations_default = defineTool({\n\tname: \"find_organizations\",\n\tskills: ALL_SKILLS,\n\trequiredScopes: [\"org:read\"],\n\tdescription: [\n\t\t\"Find organizations that the user has access to in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- View organizations in Sentry\",\n\t\t\"- Find an organization's slug to aid other tool requests\",\n\t\t\"- Search for specific organizations by name or slug\",\n\t\t\"\",\n\t\t`Returns up to ${RESULT_LIMIT} results. If you hit this limit, use the query parameter to narrow down results.`\n\t].join(\"\\n\"),\n\tinputSchema: { query: ParamSearchQuery.nullable().default(null) },\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findOrganizationsOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context);\n\t\tconst organizations = await apiService.listOrganizations({\n\t\t\tquery: params.query ?? void 0,\n\t\t\tlimit: RESULT_LIMIT + 1\n\t\t});\n\t\treturn structuredResult({\n\t\t\torganizations: organizations.slice(0, RESULT_LIMIT).map((organization) => ({\n\t\t\t\tslug: organization.slug,\n\t\t\t\twebUrl: normalizeUrl(organization.links?.organizationUrl),\n\t\t\t\tregionUrl: normalizeUrl(organization.links?.regionUrl)\n\t\t\t})),\n\t\t\thasMore: organizations.length > RESULT_LIMIT\n\t\t});\n\t}\n});\n\n//#endregion\nexport { findOrganizationsOutputSchema, find_organizations_default };\n//# sourceMappingURL=find-organizations-CXTZEMsb.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl, ParamSearchQuery } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/find-teams.ts\nconst RESULT_LIMIT = 25;\nconst findTeamsOutputSchema = z.object({\n\tteams: z.array(z.object({\n\t\tslug: z.string(),\n\t\tid: z.string()\n\t})),\n\thasMore: z.boolean()\n});\nvar find_teams_default = defineTool({\n\tname: \"find_teams\",\n\tskills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"project-management\"\n\t],\n\trequiredScopes: [\"team:read\"],\n\tdescription: [\n\t\t\"Find teams in an organization in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- View teams in a Sentry organization\",\n\t\t\"- Find a team's slug and numeric ID to aid other tool requests\",\n\t\t\"- Search for specific teams by name or slug\",\n\t\t\"\",\n\t\t`Returns up to ${RESULT_LIMIT} results. When hasMore is true, use the query parameter to narrow down results.`\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tquery: ParamSearchQuery.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findTeamsOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tif (!organizationSlug) throw new UserInputError(\"Organization slug is required. Please provide an organizationSlug parameter.\");\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst teams = await apiService.listTeams(organizationSlug, {\n\t\t\tquery: params.query ?? void 0,\n\t\t\tlimit: RESULT_LIMIT + 1\n\t\t});\n\t\treturn structuredResult({\n\t\t\tteams: teams.slice(0, RESULT_LIMIT).map((team) => ({\n\t\t\t\tslug: team.slug,\n\t\t\t\tid: String(team.id)\n\t\t\t})),\n\t\t\thasMore: teams.length > RESULT_LIMIT\n\t\t});\n\t}\n});\n\n//#endregion\nexport { findTeamsOutputSchema, find_teams_default };\n//# sourceMappingURL=find-teams-ZsyAWNb7.js.map","import { ALL_SKILLS } from \"./skills-Dj4T8Duc.js\";\nimport { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl, ParamSearchQuery } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/find-projects.ts\nconst RESULT_LIMIT = 25;\nconst findProjectsOutputSchema = z.object({\n\tprojects: z.array(z.object({ slug: z.string() })),\n\thasMore: z.boolean()\n});\nvar find_projects_default = defineTool({\n\tname: \"find_projects\",\n\tskills: ALL_SKILLS,\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Find projects in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- View projects in a Sentry organization\",\n\t\t\"- Find a project's slug to aid other tool requests\",\n\t\t\"- Search for specific projects by name or slug\",\n\t\t\"\",\n\t\t`Returns up to ${RESULT_LIMIT} results. When hasMore is true, use the query parameter to narrow down results.`\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tquery: ParamSearchQuery.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findProjectsOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tif (!organizationSlug) throw new UserInputError(\"Organization slug is required. Please provide an organizationSlug parameter.\");\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst projects = await apiService.listProjects(organizationSlug, {\n\t\t\tquery: params.query ?? void 0,\n\t\t\tlimit: RESULT_LIMIT + 1\n\t\t});\n\t\treturn structuredResult({\n\t\t\tprojects: projects.slice(0, RESULT_LIMIT).map((project) => ({ slug: project.slug })),\n\t\t\thasMore: projects.length > RESULT_LIMIT\n\t\t});\n\t}\n});\n\n//#endregion\nexport { findProjectsOutputSchema, find_projects_default };\n//# sourceMappingURL=find-projects-BYeZfQDF.js.map","import { ParamOrganizationSlug, ParamProjectSlugOrAll, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/find-releases.ts\nconst RESULT_LIMIT = 25;\nconst findReleasesOutputSchema = z.object({\n\treleases: z.array(z.object({\n\t\tversion: z.string(),\n\t\tdateCreated: z.string().datetime(),\n\t\tdateReleased: z.string().datetime().nullable(),\n\t\tfirstEvent: z.string().datetime().nullable(),\n\t\tlastEvent: z.string().datetime().nullable(),\n\t\tnewIssues: z.number(),\n\t\tprojects: z.array(z.string()),\n\t\tlastCommit: z.object({\n\t\t\tid: z.string(),\n\t\t\tmessage: z.string().nullable(),\n\t\t\tauthor: z.string().nullable(),\n\t\t\tdateCreated: z.string().datetime()\n\t\t}).nullable(),\n\t\tlastDeploy: z.object({\n\t\t\tid: z.string(),\n\t\t\tenvironment: z.string().nullable(),\n\t\t\tdateStarted: z.string().datetime().nullable(),\n\t\t\tdateFinished: z.string().datetime().nullable()\n\t\t}).nullable()\n\t})),\n\thasMore: z.boolean()\n});\nvar find_releases_default = defineTool({\n\tname: \"find_releases\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Find releases in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Find recent releases in a Sentry organization\",\n\t\t\"- Find the most recent version released of a specific project\",\n\t\t\"- Determine when a release was deployed to an environment\",\n\t\t\"\",\n\t\t`Returns up to ${RESULT_LIMIT} results. When hasMore is true, use the projectSlug or query parameter to narrow down results.`,\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Find the most recent releases in the 'my-organization' organization\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"find_releases(organizationSlug='my-organization')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Find releases matching '2ce6a27' in the 'my-organization' organization\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"find_releases(organizationSlug='my-organization', query='2ce6a27')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlugOrAll.nullable().default(null),\n\t\tquery: z.string().trim().describe(\"Search for versions which contain the provided string.\").nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findReleasesOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst releases = await apiService.listReleases({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug ?? void 0,\n\t\t\tquery: params.query ?? void 0,\n\t\t\tlimit: RESULT_LIMIT + 1\n\t\t});\n\t\treturn structuredResult({\n\t\t\treleases: releases.slice(0, RESULT_LIMIT).map((release) => ({\n\t\t\t\tversion: release.shortVersion,\n\t\t\t\tdateCreated: new Date(release.dateCreated).toISOString(),\n\t\t\t\tdateReleased: release.dateReleased ? new Date(release.dateReleased).toISOString() : null,\n\t\t\t\tfirstEvent: release.firstEvent ? new Date(release.firstEvent).toISOString() : null,\n\t\t\t\tlastEvent: release.lastEvent ? new Date(release.lastEvent).toISOString() : null,\n\t\t\t\tnewIssues: release.newGroups,\n\t\t\t\tprojects: release.projects.map((project) => project.slug).filter((slug) => slug !== null),\n\t\t\t\tlastCommit: release.lastCommit ? {\n\t\t\t\t\tid: String(release.lastCommit.id),\n\t\t\t\t\tmessage: release.lastCommit.message,\n\t\t\t\t\tauthor: release.lastCommit.author?.name ?? release.lastCommit.author?.email ?? null,\n\t\t\t\t\tdateCreated: new Date(release.lastCommit.dateCreated).toISOString()\n\t\t\t\t} : null,\n\t\t\t\tlastDeploy: release.lastDeploy ? {\n\t\t\t\t\tid: String(release.lastDeploy.id),\n\t\t\t\t\tenvironment: release.lastDeploy.environment,\n\t\t\t\t\tdateStarted: release.lastDeploy.dateStarted ? new Date(release.lastDeploy.dateStarted).toISOString() : null,\n\t\t\t\t\tdateFinished: release.lastDeploy.dateFinished ? new Date(release.lastDeploy.dateFinished).toISOString() : null\n\t\t\t\t} : null\n\t\t\t})),\n\t\t\thasMore: releases.length > RESULT_LIMIT\n\t\t});\n\t}\n});\n\n//#endregion\nexport { findReleasesOutputSchema, find_releases_default };\n//# sourceMappingURL=find-releases-fkgr4qqZ.js.map","//#region src/internal/type-guards.ts\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n//#endregion\nexport { isPlainObject };\n//# sourceMappingURL=type-guards-DHLAzjf2.js.map","import { isPlainObject } from \"./type-guards-DHLAzjf2.js\";\n\n//#region src/tools/catalog/support/api-formatting.ts\nfunction formatId(value) {\n\treturn value === void 0 || value === null ? \"unknown\" : String(value);\n}\nfunction formatDate(value) {\n\tif (!value) return null;\n\tconst date = new Date(value);\n\tif (Number.isNaN(date.getTime())) return value;\n\treturn date.toISOString();\n}\nfunction formatActor(value) {\n\tif (typeof value === \"string\") return value;\n\tif (!isPlainObject(value)) return \"unknown\";\n\tconst name = value.name;\n\tif (typeof name === \"string\" && name.trim()) return name;\n\tconst email = value.email;\n\tif (typeof email === \"string\" && email.trim()) return email;\n\tconst username = value.username;\n\tif (typeof username === \"string\" && username.trim()) return username;\n\treturn formatId(typeof value.id === \"string\" || typeof value.id === \"number\" ? value.id : void 0);\n}\nfunction formatUnknown(value) {\n\tif (value === null || value === void 0) return \"unknown\";\n\tif (typeof value === \"string\") return value;\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\treturn JSON.stringify(value);\n}\nfunction readString(value, key) {\n\tif (!value) return null;\n\tconst field = value[key];\n\treturn typeof field === \"string\" && field.trim() ? field : null;\n}\nfunction compactLines(lines) {\n\treturn lines.filter((line) => line !== null && line !== void 0 && line !== false);\n}\n\n//#endregion\nexport { compactLines, formatActor, formatDate, formatId, formatUnknown, readString };\n//# sourceMappingURL=api-formatting-nIGXUFdx.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\n\n//#region src/tools/catalog/support/project-constraints.ts\nfunction projectConstraintError(resourceLabel, projectSlug$1) {\n\treturn new UserInputError(`${resourceLabel} is outside the active project constraint. Expected project \"${projectSlug$1}\".`);\n}\nfunction projectSlug(project) {\n\treturn project?.slug ?? null;\n}\nfunction assertProjectRefWithinConstraint({ resourceLabel, scopedProjectSlug, project }) {\n\tif (!scopedProjectSlug) return;\n\tif (projectSlug(project) !== scopedProjectSlug) throw projectConstraintError(resourceLabel, scopedProjectSlug);\n}\nfunction assertProjectListContainsConstraint({ resourceLabel, scopedProjectSlug, projects }) {\n\tif (!scopedProjectSlug) return;\n\tconst hasMatchingProject = projects?.some((project) => projectSlug(project) === scopedProjectSlug) ?? false;\n\tif (!hasMatchingProject) throw projectConstraintError(resourceLabel, scopedProjectSlug);\n}\nfunction assertProjectConstraintEvidence({ resourceLabel, scopedProjectSlug, hasEvidence }) {\n\tif (!scopedProjectSlug || hasEvidence) return;\n\tthrow projectConstraintError(resourceLabel, scopedProjectSlug);\n}\n\n//#endregion\nexport { assertProjectConstraintEvidence, assertProjectListContainsConstraint, assertProjectRefWithinConstraint };\n//# sourceMappingURL=project-constraints-DlfcU4mm.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId, validateSlugOrId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { compactLines, formatActor, formatDate, formatId, formatUnknown } from \"./api-formatting-nIGXUFdx.js\";\nimport { assertProjectListContainsConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-release-details.ts\nfunction formatProjects(release) {\n\tif (!release.projects || release.projects.length === 0) return null;\n\treturn release.projects.map((project) => project.slug ?? project.name).join(\", \");\n}\nfunction formatDeploy(deploy) {\n\tconst lines = compactLines([\n\t\t`### Deploy ${formatId(deploy.id)}`,\n\t\t\"\",\n\t\tdeploy.environment ? `**Environment**: ${deploy.environment}` : null,\n\t\tdeploy.name ? `**Name**: ${deploy.name}` : null,\n\t\tformatDate(deploy.dateStarted) ? `**Started**: ${formatDate(deploy.dateStarted)}` : null,\n\t\tformatDate(deploy.dateFinished) ? `**Finished**: ${formatDate(deploy.dateFinished)}` : null,\n\t\tdeploy.url ? `**URL**: ${deploy.url}` : null\n\t]);\n\treturn lines.join(\"\\n\");\n}\nfunction formatCommit(commit) {\n\tconst author = commit.author ? formatActor(commit.author) : null;\n\tconst message = commit.message?.split(\"\\n\")[0] ?? \"No commit message\";\n\tconst repository = commit.repository?.name;\n\treturn compactLines([\n\t\t`- \\`${formatId(commit.id)}\\`: ${message}`,\n\t\tauthor ? `  - Author: ${author}` : null,\n\t\trepository ? `  - Repository: ${repository}` : null,\n\t\tformatDate(commit.dateCreated) ? `  - Created: ${formatDate(commit.dateCreated)}` : null\n\t]).join(\"\\n\");\n}\nfunction formatHealthOrMeta(release) {\n\tconst lines = [];\n\tif (release.currentProjectMeta) for (const [key, value] of Object.entries(release.currentProjectMeta)) lines.push(`- **${key}**: ${formatUnknown(value)}`);\n\tif (release.adoptionStages !== void 0) lines.push(`- **adoptionStages**: ${formatUnknown(release.adoptionStages)}`);\n\treturn lines;\n}\nvar get_release_details_default = defineTool({\n\tname: \"get_release_details\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Get details for a Sentry release.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Inspect an exact release version\",\n\t\t\"- Scope a release lookup to a specific project\",\n\t\t\"- See deploys and environments for a release\",\n\t\t\"- See recent commits attached to a release\",\n\t\t\"- Gather release health metadata when a project is known\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_release_details(organizationSlug='my-organization', releaseVersion='1.2.3')\",\n\t\t\"get_release_details(organizationSlug='my-organization', releaseVersion='1.2.3', projectSlugOrId='backend')\",\n\t\t\"get_release_details(organizationSlug='my-organization', releaseVersion='1.2.3', includeHealth=true, projectSlugOrId='backend')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\treleaseVersion: z.string().trim().min(1).describe(\"Exact release version.\"),\n\t\tprojectSlugOrId: z.string().trim().superRefine(validateSlugOrId).describe(\"Optional project slug or numeric ID. Use this to scope release details, deploys, and commits to one project; required for health metadata unless the session is already project-constrained.\").nullable().default(null),\n\t\tincludeHealth: z.boolean().describe(\"Include project-specific release health metadata. Requires projectSlugOrId unless the session is already project-constrained.\").default(false),\n\t\tincludeDeploys: z.boolean().describe(\"Include recent deploys for this release.\").default(true),\n\t\tincludeCommits: z.boolean().describe(\"Include recent commits attached to this release.\").default(true),\n\t\tlimit: z.number().int().positive().max(50).describe(\"Maximum number of deploys and commits to return, up to 50.\").default(10)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"release.version\", params.releaseVersion);\n\t\tconst scopedProjectSlug = context.constraints.projectSlug ?? void 0;\n\t\tconst requestedProjectSlugOrId = params.projectSlugOrId ?? void 0;\n\t\tconst projectSlugOrId = scopedProjectSlug ?? requestedProjectSlugOrId;\n\t\tif (projectSlugOrId) if (isNumericId(projectSlugOrId)) setTag(\"project.id\", projectSlugOrId);\n\t\telse setTag(\"project.slug\", projectSlugOrId);\n\t\tif (scopedProjectSlug && requestedProjectSlugOrId && requestedProjectSlugOrId !== scopedProjectSlug) {\n\t\t\tconst scopedProject = await apiService.getProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: scopedProjectSlug\n\t\t\t});\n\t\t\tconst scopedProjectId = String(scopedProject.id);\n\t\t\tif (requestedProjectSlugOrId !== scopedProjectId) throw new UserInputError(`Release project is outside the active project constraint. Expected project \"${scopedProjectSlug}\".`);\n\t\t}\n\t\tif (params.includeHealth && !projectSlugOrId) throw new UserInputError(\"Release health metadata requires a project. Provide `projectSlugOrId` or use a project-constrained session.\");\n\t\tconst release = await apiService.getReleaseDetails({\n\t\t\torganizationSlug,\n\t\t\treleaseVersion: params.releaseVersion,\n\t\t\tprojectSlugOrId,\n\t\t\tincludeHealth: params.includeHealth\n\t\t});\n\t\tif (release.projects && release.projects.length > 0) assertProjectListContainsConstraint({\n\t\t\tresourceLabel: \"Release\",\n\t\t\tscopedProjectSlug,\n\t\t\tprojects: release.projects\n\t\t});\n\t\tconst [deploys, commits] = await Promise.all([params.includeDeploys ? apiService.listReleaseDeploys({\n\t\t\torganizationSlug,\n\t\t\treleaseVersion: params.releaseVersion,\n\t\t\tprojectSlugOrId,\n\t\t\tlimit: params.limit\n\t\t}) : Promise.resolve([]), params.includeCommits ? apiService.listReleaseCommits({\n\t\t\torganizationSlug,\n\t\t\treleaseVersion: params.releaseVersion,\n\t\t\tprojectSlugOrId,\n\t\t\tlimit: params.limit\n\t\t}) : Promise.resolve([])]);\n\t\tconst releaseUrl = apiService.getReleaseUrl(organizationSlug, release.version);\n\t\tconst projects = formatProjects(release);\n\t\tconst author = release.lastCommit?.author ? formatActor(release.lastCommit.author) : null;\n\t\tconst output = compactLines([\n\t\t\t`# Release ${release.version} in **${organizationSlug}**`,\n\t\t\t\"\",\n\t\t\t`**ID**: ${formatId(release.id)}`,\n\t\t\trelease.shortVersion ? `**Short Version**: ${release.shortVersion}` : null,\n\t\t\tformatDate(release.dateCreated) ? `**Created**: ${formatDate(release.dateCreated)}` : null,\n\t\t\tformatDate(release.dateReleased) ? `**Released**: ${formatDate(release.dateReleased)}` : null,\n\t\t\tformatDate(release.firstEvent) ? `**First Event**: ${formatDate(release.firstEvent)}` : null,\n\t\t\tformatDate(release.lastEvent) ? `**Last Event**: ${formatDate(release.lastEvent)}` : null,\n\t\t\trelease.newGroups !== void 0 ? `**New Issues**: ${release.newGroups}` : null,\n\t\t\tprojects ? `**Projects**: ${projects}` : null,\n\t\t\t`**URL**: [Open Release](${releaseUrl})`\n\t\t]);\n\t\tif (release.lastCommit) {\n\t\t\toutput.push(\"\", \"## Last Commit\", \"\");\n\t\t\toutput.push(compactLines([\n\t\t\t\t`**Commit ID**: ${formatId(release.lastCommit.id)}`,\n\t\t\t\trelease.lastCommit.message ? `**Message**: ${release.lastCommit.message}` : null,\n\t\t\t\tauthor ? `**Author**: ${author}` : null,\n\t\t\t\tformatDate(release.lastCommit.dateCreated) ? `**Created**: ${formatDate(release.lastCommit.dateCreated)}` : null\n\t\t\t]).join(\"\\n\"));\n\t\t}\n\t\tconst healthLines = params.includeHealth ? formatHealthOrMeta(release) : [];\n\t\tif (healthLines.length > 0) output.push(\"\", \"## Health And Project Metadata\", \"\", ...healthLines);\n\t\tif (params.includeDeploys) {\n\t\t\toutput.push(\"\", \"## Deploys\", \"\");\n\t\t\toutput.push(deploys.length === 0 ? \"No deploys found.\" : deploys.slice(0, params.limit).map(formatDeploy).join(\"\\n\\n\"));\n\t\t}\n\t\tif (params.includeCommits) {\n\t\t\toutput.push(\"\", \"## Commits\", \"\");\n\t\t\toutput.push(commits.length === 0 ? \"No commits found.\" : commits.slice(0, params.limit).map(formatCommit).join(\"\\n\"));\n\t\t}\n\t\toutput.push(\"\", \"## Response Notes\", \"\");\n\t\toutput.push(`- Search issues introduced in this release with query \\`release:${release.version}\\`.`);\n\t\treturn `${output.join(\"\\n\")}\\n`;\n\t}\n});\n\n//#endregion\nexport { get_release_details_default };\n//# sourceMappingURL=get-release-details-0bKoH-Gv.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { compactLines, formatActor, formatDate, formatId, formatUnknown } from \"./api-formatting-nIGXUFdx.js\";\n\n//#region src/tools/support/dashboards/index.ts\nfunction formatList(values) {\n\tif (!values || values.length === 0) return null;\n\treturn values.map(String).join(\", \");\n}\nfunction dashboardIncludesProject(dashboard, projectId) {\n\tif (!projectId || dashboard.projects.length === 0) return true;\n\treturn dashboard.projects.some((dashboardProjectId) => Object.is(String(dashboardProjectId), String(projectId)));\n}\nfunction dashboardProjectConstraintError(resourceLabel, scopedProjectSlug) {\n\treturn new UserInputError(`${resourceLabel} is outside the active project constraint. Expected project \"${scopedProjectSlug}\".`);\n}\n/** Resolves an active project slug constraint to its numeric project ID. */\nasync function resolveDashboardProjectConstraint({ apiService, organizationSlug, scopedProjectSlug }) {\n\tif (!scopedProjectSlug) return null;\n\treturn apiService.getProject({\n\t\torganizationSlug,\n\t\tprojectSlugOrId: scopedProjectSlug\n\t});\n}\n/** Filters dashboard list items to those compatible with the active project. */\nfunction filterDashboardsByProjectConstraint({ dashboards, projectId }) {\n\treturn dashboards.filter((dashboard) => dashboardIncludesProject(dashboard, projectId ?? null));\n}\n/** Throws when a dashboard with explicit projects excludes the active project. */\nfunction assertDashboardWithinProjectConstraint({ dashboard, scopedProjectSlug, projectId }) {\n\tif (scopedProjectSlug && !dashboardIncludesProject(dashboard, projectId ?? null)) throw dashboardProjectConstraintError(\"Dashboard\", scopedProjectSlug);\n}\nfunction formatWidgetQuery(query) {\n\tconst lines = compactLines([\n\t\t`- **${query.name || \"Query\"}**`,\n\t\tquery.conditions ? `  - Conditions: \\`${query.conditions}\\`` : null,\n\t\tquery.fields?.length ? `  - Fields: ${query.fields.join(\", \")}` : null,\n\t\tquery.aggregates?.length ? `  - Aggregates: ${query.aggregates.join(\", \")}` : null,\n\t\tquery.columns?.length ? `  - Columns: ${query.columns.join(\", \")}` : null,\n\t\tquery.orderby ? `  - Sort: \\`${query.orderby}\\`` : null\n\t]);\n\treturn lines;\n}\nfunction formatWidget(widget, index) {\n\tconst layout = widget.layout;\n\tconst layoutText = layout && typeof layout === \"object\" ? [\n\t\t\"x\",\n\t\t\"y\",\n\t\t\"w\",\n\t\t\"h\"\n\t].filter((key) => layout[key] !== void 0).map((key) => `${key}=${formatUnknown(layout[key])}`).join(\", \") : null;\n\tconst lines = compactLines([\n\t\t`### ${index + 1}. ${widget.title}`,\n\t\t\"\",\n\t\t`**ID**: ${formatId(widget.id)}`,\n\t\t`**Display Type**: ${widget.displayType}`,\n\t\twidget.widgetType ? `**Widget Type**: ${widget.widgetType}` : null,\n\t\twidget.datasetSource ? `**Dataset**: ${widget.datasetSource}` : null,\n\t\twidget.interval ? `**Interval**: ${widget.interval}` : null,\n\t\twidget.limit !== null && widget.limit !== void 0 ? `**Limit**: ${widget.limit}` : null,\n\t\tlayoutText ? `**Layout**: ${layoutText}` : null,\n\t\twidget.description ? `**Description**: ${widget.description}` : null\n\t]);\n\tif (widget.queries.length > 0) {\n\t\tlines.push(\"\", \"#### Queries\", \"\");\n\t\tfor (const query of widget.queries) lines.push(...formatWidgetQuery(query));\n\t}\n\treturn lines.join(\"\\n\");\n}\nfunction formatFilters(filters) {\n\treturn Object.entries(filters).map(([key, value]) => `- **${key}**: ${formatUnknown(value)}`);\n}\n/** Formats saved dashboard metadata, filters, widgets, and query definitions. */\nfunction formatDashboardDetails({ dashboard, organizationSlug, dashboardUrl }) {\n\tconst lines = compactLines([\n\t\t`# Dashboard ${dashboard.title} in **${organizationSlug}**`,\n\t\t\"\",\n\t\t`**ID**: ${formatId(dashboard.id)}`,\n\t\t`**URL**: [Open Dashboard](${dashboardUrl})`,\n\t\tformatDate(dashboard.dateCreated) ? `**Created**: ${formatDate(dashboard.dateCreated)}` : null,\n\t\tdashboard.createdBy ? `**Created By**: ${formatActor(dashboard.createdBy)}` : null,\n\t\tformatList(dashboard.projects) ? `**Projects**: ${formatList(dashboard.projects)}` : null,\n\t\tformatList(dashboard.environment) ? `**Environments**: ${formatList(dashboard.environment)}` : null,\n\t\tdashboard.period ? `**Period**: ${dashboard.period}` : null,\n\t\tdashboard.start ? `**Start**: ${formatDate(dashboard.start)}` : null,\n\t\tdashboard.end ? `**End**: ${formatDate(dashboard.end)}` : null,\n\t\tdashboard.utc !== null && dashboard.utc !== void 0 ? `**UTC**: ${formatUnknown(dashboard.utc)}` : null,\n\t\tdashboard.expired !== void 0 ? `**Expired**: ${formatUnknown(dashboard.expired)}` : null,\n\t\tdashboard.prebuiltId !== null && dashboard.prebuiltId !== void 0 ? `**Prebuilt ID**: ${formatId(dashboard.prebuiltId)}` : null,\n\t\tdashboard.isFavorited ? \"**Favorited**: yes\" : null\n\t]);\n\tconst filterLines = formatFilters(dashboard.filters);\n\tif (filterLines.length > 0) lines.push(\"\", \"## Filters\", \"\", ...filterLines);\n\tlines.push(\"\", \"## Widgets\", \"\");\n\tif (dashboard.widgets.length === 0) lines.push(\"No widgets found.\");\n\telse lines.push(dashboard.widgets.map((widget, index) => formatWidget(widget, index)).join(\"\\n\\n\"));\n\tlines.push(\"\", \"## Response Notes\", \"\");\n\tlines.push(\"- Dashboard widgets include saved query definitions, not live query results.\");\n\treturn lines.join(\"\\n\");\n}\nfunction formatCandidates(candidates) {\n\treturn candidates.slice(0, 5).map((dashboard) => `- ${dashboard.title} (ID: ${formatId(dashboard.id)})`).join(\"\\n\");\n}\n/** Resolves a numeric dashboard ID directly or a single exact title match. */\nasync function resolveDashboardId({ apiService, organizationSlug, dashboardIdOrTitle, projectId }) {\n\tconst ref = dashboardIdOrTitle.trim();\n\tif (isNumericId(ref)) return ref;\n\tconst visibleDashboards = [];\n\tconst exactMatches = [];\n\tconst seenCursors = /* @__PURE__ */ new Set();\n\tlet cursor = null;\n\tdo {\n\t\tconst { dashboards, nextCursor } = await apiService.listDashboards({\n\t\t\torganizationSlug,\n\t\t\tquery: ref,\n\t\t\tsortBy: \"title\",\n\t\t\tlimit: 100,\n\t\t\tcursor\n\t\t});\n\t\tconst visiblePage = filterDashboardsByProjectConstraint({\n\t\t\tdashboards,\n\t\t\tprojectId\n\t\t});\n\t\tvisibleDashboards.push(...visiblePage);\n\t\texactMatches.push(...visiblePage.filter((dashboard) => dashboard.title.toLowerCase() === ref.toLowerCase()));\n\t\tif (!nextCursor || seenCursors.has(nextCursor)) break;\n\t\tseenCursors.add(nextCursor);\n\t\tcursor = nextCursor;\n\t} while (cursor);\n\tif (exactMatches.length === 1) return String(exactMatches[0].id);\n\tif (exactMatches.length > 1) throw new UserInputError(`Multiple dashboards match the title \"${ref}\". Use a dashboard ID instead.\\n\\n${formatCandidates(exactMatches)}`);\n\tconst candidateText = visibleDashboards.length ? `\\n\\nDid you mean:\\n${formatCandidates(visibleDashboards)}` : \"\";\n\tthrow new UserInputError(`No dashboard with title \"${ref}\" found in \"${organizationSlug}\".${candidateText}`);\n}\n\n//#endregion\nexport { assertDashboardWithinProjectConstraint, filterDashboardsByProjectConstraint, formatDashboardDetails, resolveDashboardId, resolveDashboardProjectConstraint };\n//# sourceMappingURL=dashboards-BCwvH2V2.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { formatActor } from \"./api-formatting-nIGXUFdx.js\";\nimport { filterDashboardsByProjectConstraint, resolveDashboardProjectConstraint } from \"./dashboards-BCwvH2V2.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/find-dashboards.ts\nconst PROJECT_DASHBOARD_CURSOR_PREFIX = \"mcp-dashboard-project:\";\nconst dashboardSummarySchema = z.object({\n\tid: z.string(),\n\ttitle: z.string(),\n\twidgetCount: z.number().int().nonnegative(),\n\twidgetTypes: z.array(z.string()),\n\tprojects: z.array(z.string()),\n\tenvironments: z.array(z.string()),\n\tcreatedBy: z.string().nullable(),\n\tdateCreated: z.string(),\n\tlastVisited: z.string().nullable(),\n\tisFavorited: z.boolean(),\n\tprebuiltId: z.string().nullable(),\n\turl: z.string().url()\n});\nconst findDashboardsOutputSchema = z.object({\n\tdashboards: z.array(dashboardSummarySchema),\n\tnextCursor: z.string().nullable()\n});\nfunction isProjectDashboardCursor(value) {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst cursor = value;\n\treturn cursor.v === 1 && (typeof cursor.apiCursor === \"string\" || cursor.apiCursor === null) && typeof cursor.offset === \"number\" && Number.isInteger(cursor.offset) && cursor.offset >= 0 && typeof cursor.pageLimit === \"number\" && Number.isInteger(cursor.pageLimit) && cursor.pageLimit > 0 && cursor.pageLimit <= 100;\n}\n/**\n* Encodes the project-scoped pagination state that Sentry's dashboard API\n* cannot represent: a visible-item offset inside one upstream API page.\n*/\nfunction encodeProjectDashboardCursor(cursor) {\n\tconst payload = Buffer.from(JSON.stringify({\n\t\tv: 1,\n\t\t...cursor\n\t})).toString(\"base64url\");\n\treturn `${PROJECT_DASHBOARD_CURSOR_PREFIX}${payload}`;\n}\n/** Decodes MCP-owned project cursors while leaving raw Sentry API cursors intact. */\nfunction decodeProjectDashboardCursor(cursor) {\n\tif (!cursor?.startsWith(PROJECT_DASHBOARD_CURSOR_PREFIX)) return null;\n\ttry {\n\t\tconst value = JSON.parse(Buffer.from(cursor.slice(22), \"base64url\").toString(\"utf8\"));\n\t\tif (isProjectDashboardCursor(value)) return value;\n\t} catch {}\n\tthrow new UserInputError(\"Invalid dashboard cursor. Pass the cursor exactly as returned by find_dashboards.\");\n}\n/** Ensures org-wide dashboard searches only pass raw Sentry cursors upstream. */\nfunction assertRawDashboardCursor(cursor) {\n\tif (!cursor?.startsWith(PROJECT_DASHBOARD_CURSOR_PREFIX)) return;\n\tthrow new UserInputError(\"Project-scoped dashboard cursors can only be used in project-scoped dashboard searches. Start a new org-wide find_dashboards request without a cursor.\");\n}\n/** Formats the next project cursor without exposing raw API cursors for constrained pages. */\nfunction formatProjectDashboardNextCursor({ apiCursor, offset = 0, pageLimit }) {\n\tif (!apiCursor) return null;\n\treturn encodeProjectDashboardCursor({\n\t\tapiCursor,\n\t\toffset,\n\t\tpageLimit\n\t});\n}\n/**\n* Lists dashboards visible to one project, refilling across API pages while\n* keeping Sentry's cursor page size stable for every followed API cursor.\n*/\nasync function listProjectVisibleDashboards({ apiService, organizationSlug, titleQuery, sort, limit, cursor, projectId }) {\n\tconst projectCursor = decodeProjectDashboardCursor(cursor);\n\tconst dashboards = [];\n\tconst seenCursors = /* @__PURE__ */ new Set();\n\tconst pageLimit = projectCursor?.pageLimit ?? limit;\n\tlet pageCursor = projectCursor ? projectCursor.apiCursor : cursor ?? null;\n\tlet visibleOffset = projectCursor?.offset ?? 0;\n\tlet nextCursor = null;\n\tif (pageCursor) seenCursors.add(pageCursor);\n\tdo {\n\t\tconst page = await apiService.listDashboards({\n\t\t\torganizationSlug,\n\t\t\tquery: titleQuery ?? void 0,\n\t\t\tsortBy: sort,\n\t\t\tlimit: pageLimit,\n\t\t\tcursor: pageCursor ?? void 0\n\t\t});\n\t\tconst visiblePage = filterDashboardsByProjectConstraint({\n\t\t\tdashboards: page.dashboards,\n\t\t\tprojectId\n\t\t});\n\t\tconst offsetVisiblePage = visiblePage.slice(visibleOffset);\n\t\tconst remaining = limit - dashboards.length;\n\t\tif (offsetVisiblePage.length > remaining) {\n\t\t\tdashboards.push(...offsetVisiblePage.slice(0, remaining));\n\t\t\treturn {\n\t\t\t\tdashboards,\n\t\t\t\tnextCursor: encodeProjectDashboardCursor({\n\t\t\t\t\tapiCursor: pageCursor,\n\t\t\t\t\toffset: visibleOffset + remaining,\n\t\t\t\t\tpageLimit\n\t\t\t\t})\n\t\t\t};\n\t\t}\n\t\tdashboards.push(...offsetVisiblePage);\n\t\tvisibleOffset = 0;\n\t\tnextCursor = page.nextCursor;\n\t\tif (!nextCursor || seenCursors.has(nextCursor)) {\n\t\t\tnextCursor = null;\n\t\t\tbreak;\n\t\t}\n\t\tseenCursors.add(nextCursor);\n\t\tpageCursor = nextCursor;\n\t} while (dashboards.length < limit);\n\treturn {\n\t\tdashboards,\n\t\tnextCursor: formatProjectDashboardNextCursor({\n\t\t\tapiCursor: nextCursor,\n\t\t\tpageLimit\n\t\t})\n\t};\n}\nvar find_dashboards_default = defineTool({\n\tname: \"find_dashboards\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"org:read\"],\n\tdescription: [\n\t\t\"Find Sentry dashboards in an organization.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- List dashboards in an organization\",\n\t\t\"- Find a dashboard ID before calling get_dashboard_details\",\n\t\t\"- Search dashboards by title\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"find_dashboards(organizationSlug='my-organization')\",\n\t\t\"find_dashboards(organizationSlug='my-organization', titleQuery='errors')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Dashboard IDs are organization-scoped.\",\n\t\t\"- Use `get_dashboard_details` after finding the correct dashboard ID.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\ttitleQuery: z.string().trim().describe(\"Optional title substring to search for.\").nullable().default(null),\n\t\tsort: z.enum([\n\t\t\t\"title\",\n\t\t\t\"-title\",\n\t\t\t\"dateCreated\",\n\t\t\t\"-dateCreated\"\n\t\t]).describe(\"Sort order for dashboard results.\").default(\"title\"),\n\t\tcursor: z.string().trim().describe(\"Optional pagination cursor from a previous response. Reuse cursors only with the same search scope and project constraint.\").nullable().default(null),\n\t\tlimit: z.number().int().positive().max(100).describe(\"Maximum number of dashboards to return.\").default(10)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findDashboardsOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst scopedProject = await resolveDashboardProjectConstraint({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tscopedProjectSlug: context.constraints.projectSlug\n\t\t});\n\t\tif (scopedProject) {\n\t\t\tsetTag(\"project.slug\", scopedProject.slug);\n\t\t\tsetTag(\"project.id\", String(scopedProject.id));\n\t\t}\n\t\tlet dashboards;\n\t\tlet nextCursor;\n\t\tif (scopedProject) ({dashboards, nextCursor} = await listProjectVisibleDashboards({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\ttitleQuery: params.titleQuery,\n\t\t\tsort: params.sort,\n\t\t\tlimit: params.limit,\n\t\t\tprojectId: scopedProject.id,\n\t\t\tcursor: params.cursor\n\t\t}));\n\t\telse {\n\t\t\tassertRawDashboardCursor(params.cursor);\n\t\t\t({dashboards, nextCursor} = await apiService.listDashboards({\n\t\t\t\torganizationSlug,\n\t\t\t\tquery: params.titleQuery ?? void 0,\n\t\t\t\tsortBy: params.sort,\n\t\t\t\tlimit: params.limit,\n\t\t\t\tcursor: params.cursor ?? void 0\n\t\t\t}));\n\t\t}\n\t\treturn structuredResult({\n\t\t\tdashboards: dashboards.map((dashboard) => ({\n\t\t\t\tid: String(dashboard.id),\n\t\t\t\ttitle: dashboard.title,\n\t\t\t\twidgetCount: dashboard.widgetPreview.length,\n\t\t\t\twidgetTypes: Array.from(new Set(dashboard.widgetDisplay)),\n\t\t\t\tprojects: dashboard.projects.map(String),\n\t\t\t\tenvironments: dashboard.environment,\n\t\t\t\tcreatedBy: dashboard.createdBy ? formatActor(dashboard.createdBy) : null,\n\t\t\t\tdateCreated: dashboard.dateCreated,\n\t\t\t\tlastVisited: dashboard.lastVisited ?? null,\n\t\t\t\tisFavorited: dashboard.isFavorited ?? false,\n\t\t\t\tprebuiltId: dashboard.prebuiltId === null || dashboard.prebuiltId === void 0 ? null : String(dashboard.prebuiltId),\n\t\t\t\turl: apiService.getDashboardUrl(organizationSlug, String(dashboard.id), { projectId: scopedProject?.id ?? (dashboard.projects.length === 1 ? dashboard.projects[0] : null) })\n\t\t\t})),\n\t\t\tnextCursor\n\t\t});\n\t}\n});\n\n//#endregion\nexport { findDashboardsOutputSchema, find_dashboards_default };\n//# sourceMappingURL=find-dashboards-DE0x5cIv.js.map","import { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { assertDashboardWithinProjectConstraint, formatDashboardDetails, resolveDashboardId, resolveDashboardProjectConstraint } from \"./dashboards-BCwvH2V2.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-dashboard-details.ts\nvar get_dashboard_details_default = defineTool({\n\tname: \"get_dashboard_details\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"org:read\"],\n\tdescription: [\n\t\t\"Get detailed information about a specific Sentry dashboard.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Inspect a dashboard's widgets and saved query definitions\",\n\t\t\"- View dashboard projects, environments, filters, layout, and widget IDs\",\n\t\t\"- Resolve a dashboard by exact title or numeric ID\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_dashboard_details(organizationSlug='my-organization', dashboardIdOrTitle='12345')\",\n\t\t\"get_dashboard_details(organizationSlug='my-organization', dashboardIdOrTitle='Errors Overview')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Numeric dashboard IDs are resolved directly.\",\n\t\t\"- Title lookups require one exact case-insensitive match. Use `find_dashboards` first if uncertain.\",\n\t\t\"- This returns saved widget query definitions, not live widget data.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tdashboardIdOrTitle: z.string().trim().min(1).describe(\"The dashboard's numeric ID or exact title.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst scopedProject = await resolveDashboardProjectConstraint({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tscopedProjectSlug: context.constraints.projectSlug\n\t\t});\n\t\tif (scopedProject) {\n\t\t\tsetTag(\"project.slug\", scopedProject.slug);\n\t\t\tsetTag(\"project.id\", String(scopedProject.id));\n\t\t}\n\t\tconst dashboardId = await resolveDashboardId({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tdashboardIdOrTitle: params.dashboardIdOrTitle,\n\t\t\tprojectId: scopedProject?.id\n\t\t});\n\t\tconst dashboard = await apiService.getDashboard({\n\t\t\torganizationSlug,\n\t\t\tdashboardId\n\t\t});\n\t\tassertDashboardWithinProjectConstraint({\n\t\t\tdashboard,\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tprojectId: scopedProject?.id\n\t\t});\n\t\treturn formatDashboardDetails({\n\t\t\tdashboard,\n\t\t\torganizationSlug,\n\t\t\tdashboardUrl: apiService.getDashboardUrl(organizationSlug, String(dashboard.id), {\n\t\t\t\tprojectId: scopedProject?.id ?? (dashboard.projects.length === 1 ? dashboard.projects[0] : null),\n\t\t\t\tstatsPeriod: dashboard.period ?? null\n\t\t\t})\n\t\t});\n\t}\n});\n\n//#endregion\nexport { get_dashboard_details_default };\n//# sourceMappingURL=get-dashboard-details-7tf-4Q_F.js.map","import { ParamOrganizationSlug, ParamProjectSlugOrAll, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/find-monitors.ts\nconst ENVIRONMENT_LIMIT = 5;\nconst monitorScheduleOutputSchema = z.object({\n\ttype: z.string().nullable(),\n\tvalue: z.string().nullable(),\n\tcheckInMargin: z.number().nullable(),\n\tmaxRuntime: z.number().nullable()\n});\nconst monitorEnvironmentOutputSchema = z.object({\n\tname: z.string().nullable(),\n\tstatus: z.string().nullable(),\n\tlastCheckIn: z.string().datetime().nullable()\n});\nconst monitorSummaryOutputSchema = z.object({\n\tid: z.string().nullable(),\n\tslug: z.string(),\n\tname: z.string(),\n\tprojectSlug: z.string().nullable(),\n\tstatus: z.string().nullable(),\n\towner: z.string().nullable(),\n\tlastCheckIn: z.string().datetime().nullable(),\n\tnextCheckIn: z.string().datetime().nullable(),\n\twebUrl: z.string().url(),\n\tschedule: monitorScheduleOutputSchema.nullable(),\n\tenvironments: z.array(monitorEnvironmentOutputSchema),\n\thasMoreEnvironments: z.boolean()\n});\nconst findMonitorsOutputSchema = z.object({\n\tmonitors: z.array(monitorSummaryOutputSchema),\n\thasMore: z.boolean()\n});\nfunction getOwnerName(monitor) {\n\tconst owner = monitor.owner;\n\tif (!owner) return null;\n\tif (typeof owner === \"string\") return owner.trim() || null;\n\treturn owner.name?.trim() || owner.email?.trim() || owner.username?.trim() || (owner.id === void 0 ? null : String(owner.id));\n}\nfunction parseSchedule(value) {\n\tif (typeof value === \"string\") return {\n\t\ttype: null,\n\t\tvalue: value.trim() || null\n\t};\n\tif (Array.isArray(value)) {\n\t\tconst [first, second, third] = value;\n\t\tif (first === \"crontab\" && typeof second === \"string\") return {\n\t\t\ttype: \"crontab\",\n\t\t\tvalue: second\n\t\t};\n\t\tif (first === \"interval\" && (typeof second === \"number\" || typeof second === \"string\") && typeof third === \"string\") return {\n\t\t\ttype: \"interval\",\n\t\t\tvalue: `${second} ${third}`\n\t\t};\n\t\tif ((typeof first === \"number\" || typeof first === \"string\") && typeof second === \"string\") return {\n\t\t\ttype: \"interval\",\n\t\t\tvalue: `${first} ${second}`\n\t\t};\n\t\treturn {\n\t\t\ttype: null,\n\t\t\tvalue: null\n\t\t};\n\t}\n\tif (!value || typeof value !== \"object\") return {\n\t\ttype: null,\n\t\tvalue: null\n\t};\n\tconst schedule = value;\n\tconst type = typeof schedule.type === \"string\" ? schedule.type : null;\n\tif (type === \"crontab\" && typeof schedule.value === \"string\") return {\n\t\ttype,\n\t\tvalue: schedule.value\n\t};\n\tif (type === \"interval\" && (typeof schedule.value === \"number\" || typeof schedule.value === \"string\") && typeof schedule.unit === \"string\") return {\n\t\ttype,\n\t\tvalue: `${schedule.value} ${schedule.unit}`\n\t};\n\treturn {\n\t\ttype,\n\t\tvalue: null\n\t};\n}\nfunction getSchedule(monitor) {\n\tconst config = monitor.config;\n\tif (!config) return null;\n\tconst parsedSchedule = parseSchedule(config.schedule);\n\tconst type = typeof config.schedule_type === \"string\" ? config.schedule_type : parsedSchedule.type;\n\tconst value = parsedSchedule.value;\n\tconst checkInMargin = typeof config.checkin_margin === \"number\" ? config.checkin_margin : null;\n\tconst maxRuntime = typeof config.max_runtime === \"number\" ? config.max_runtime : null;\n\tif (type === null && value === null && checkInMargin === null && maxRuntime === null) return null;\n\treturn {\n\t\ttype,\n\t\tvalue,\n\t\tcheckInMargin,\n\t\tmaxRuntime\n\t};\n}\nvar find_monitors_default = defineTool({\n\tname: \"find_monitors\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"org:read\"],\n\tdescription: [\n\t\t\"Find Sentry cron monitors.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- List cron monitors in an organization\",\n\t\t\"- Find a monitor by name or slug before getting details\",\n\t\t\"- Check monitor status, owner, project, schedule, or recent environment state\",\n\t\t\"- When `hasMore` is true, narrow the results with project, environment, owner, or query filters\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"find_monitors(organizationSlug='my-organization')\",\n\t\t\"find_monitors(organizationSlug='my-organization', projectSlug='backend', query='billing')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlugOrAll.nullable().default(null),\n\t\tenvironment: z.string().trim().describe(\"Optional environment name to limit monitor state.\").nullable().default(null),\n\t\towner: z.string().trim().describe(\"Optional owner filter, such as `user:123`, `team:456`, `myteams`, or `unassigned`.\").nullable().default(null),\n\t\tquery: z.string().trim().describe(\"Optional search query for monitor name or slug.\").nullable().default(null),\n\t\tlimit: z.number().int().positive().max(99).describe(\"Maximum number of monitors to return.\").default(10)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findMonitorsOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst requestedProjectSlug = params.projectSlug && params.projectSlug !== \"all\" ? params.projectSlug : void 0;\n\t\tif (requestedProjectSlug) assertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Monitor list\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: requestedProjectSlug }\n\t\t});\n\t\tconst projectSlug = context.constraints.projectSlug ?? requestedProjectSlug;\n\t\tif (projectSlug) setTag(\"project.slug\", projectSlug);\n\t\tconst monitors = await apiService.listMonitors({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug,\n\t\t\tenvironment: params.environment ?? void 0,\n\t\t\towner: params.owner ?? void 0,\n\t\t\tquery: params.query ?? void 0,\n\t\t\tlimit: params.limit + 1\n\t\t});\n\t\treturn structuredResult({\n\t\t\tmonitors: monitors.slice(0, params.limit).map((monitor) => {\n\t\t\t\tconst projectSlug$1 = monitor.project?.slug ?? monitor.project?.name ?? null;\n\t\t\t\tconst environments = monitor.environments ?? [];\n\t\t\t\treturn {\n\t\t\t\t\tid: monitor.id === void 0 ? null : String(monitor.id),\n\t\t\t\t\tslug: monitor.slug,\n\t\t\t\t\tname: monitor.name ?? monitor.slug,\n\t\t\t\t\tprojectSlug: projectSlug$1,\n\t\t\t\t\tstatus: monitor.status ?? null,\n\t\t\t\t\towner: getOwnerName(monitor),\n\t\t\t\t\tlastCheckIn: monitor.lastCheckIn ?? null,\n\t\t\t\t\tnextCheckIn: monitor.nextCheckIn ?? null,\n\t\t\t\t\twebUrl: apiService.getMonitorUrl(organizationSlug, monitor.slug, projectSlug$1 ?? void 0),\n\t\t\t\t\tschedule: getSchedule(monitor),\n\t\t\t\t\tenvironments: environments.slice(0, ENVIRONMENT_LIMIT).map((environment) => ({\n\t\t\t\t\t\tname: environment.name ?? null,\n\t\t\t\t\t\tstatus: environment.status ?? null,\n\t\t\t\t\t\tlastCheckIn: environment.lastCheckIn ?? null\n\t\t\t\t\t})),\n\t\t\t\t\thasMoreEnvironments: environments.length > ENVIRONMENT_LIMIT\n\t\t\t\t};\n\t\t\t}),\n\t\t\thasMore: monitors.length > params.limit\n\t\t});\n\t}\n});\n\n//#endregion\nexport { findMonitorsOutputSchema, find_monitors_default };\n//# sourceMappingURL=find-monitors-DOaVdrCU.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId, validateSlugOrId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug, ParamPeriod, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { compactLines, formatActor, formatDate, formatId, formatUnknown } from \"./api-formatting-nIGXUFdx.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-monitor-details.ts\nfunction formatProject(monitor) {\n\tif (!monitor.project) return null;\n\treturn monitor.project.slug ?? monitor.project.name ?? null;\n}\nfunction formatConfig(monitor) {\n\tconst config = monitor.config;\n\tif (!config) return [];\n\treturn [\n\t\t\"schedule\",\n\t\t\"schedule_type\",\n\t\t\"timezone\",\n\t\t\"checkin_margin\",\n\t\t\"max_runtime\"\n\t].filter((key) => config[key] !== void 0).map((key) => `- **${key}**: ${formatUnknown(config[key])}`);\n}\nfunction formatCheckIn(checkIn) {\n\tconst date = formatDate(checkIn.dateCreated) ?? formatDate(checkIn.dateUpdated) ?? \"unknown time\";\n\tconst duration = checkIn.duration === void 0 || checkIn.duration === null ? \"\" : `, ${checkIn.duration}s`;\n\tconst environment = checkIn.environment ? `, ${checkIn.environment}` : \"\";\n\treturn `- ${date}: ${checkIn.status ?? \"unknown\"}${duration}${environment}`;\n}\nfunction formatStat(stat) {\n\tconst timestamp = formatDate((/* @__PURE__ */ new Date(stat.ts * 1e3)).toISOString()) ?? String(stat.ts);\n\tconst parts = Object.entries(stat).filter(([key]) => key !== \"ts\").map(([key, value]) => `${key}=${formatUnknown(value)}`);\n\treturn `- ${timestamp}: ${parts.join(\", \") || \"no check-ins\"}`;\n}\nvar get_monitor_details_default = defineTool({\n\tname: \"get_monitor_details\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Get details for a Sentry cron monitor.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Inspect a monitor's schedule, status, owner, project, and environments\",\n\t\t\"- Review recent check-ins for missed, failed, timeout, or OK runs\",\n\t\t\"- Check monitor stats over a recent time range\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_monitor_details(organizationSlug='my-organization', monitorSlug='nightly-import')\",\n\t\t\"get_monitor_details(organizationSlug='my-organization', monitorSlug='nightly-import', projectSlugOrId='backend', environment='production', period='7d')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlugOrId: z.string().trim().superRefine(validateSlugOrId).nullable().default(null).describe(\"Optional project slug or numeric ID. Use this to disambiguate monitors with the same slug or to scope a monitor URL that includes a project segment.\"),\n\t\tmonitorSlug: z.string().trim().min(1).describe(\"Monitor slug or GUID.\"),\n\t\tenvironment: z.string().trim().describe(\"Optional environment name to filter monitor environments, recent check-ins, and stats.\").nullable().default(null),\n\t\tperiod: ParamPeriod.describe(\"Relative time range. Defaults to `24h` when `start` and `end` are omitted.\").nullable().default(null),\n\t\tstart: z.string().datetime().describe(\"Absolute start time. Must be provided with `end`; do not combine with `period`.\").nullable().default(null),\n\t\tend: z.string().datetime().describe(\"Absolute end time. Must be provided with `start`; do not combine with `period`.\").nullable().default(null),\n\t\tcheckInLimit: z.number().int().positive().max(50).describe(\"Maximum number of recent check-ins to include.\").default(10),\n\t\tincludeStats: z.boolean().describe(\"Include aggregate check-in stats for the selected time range.\").default(true),\n\t\trollupSeconds: z.number().int().positive().describe(\"Optional stats bucket size in seconds. Omit this to let Sentry choose an appropriate rollup.\").nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"monitor.slug\", params.monitorSlug);\n\t\tconst requestedProjectSlugOrId = params.projectSlugOrId ?? void 0;\n\t\tconst projectSlugOrId = requestedProjectSlugOrId ?? context.constraints.projectSlug ?? null;\n\t\tif (projectSlugOrId) if (isNumericId(projectSlugOrId)) setTag(\"project.id\", projectSlugOrId);\n\t\telse setTag(\"project.slug\", projectSlugOrId);\n\t\tif (requestedProjectSlugOrId && !isNumericId(requestedProjectSlugOrId)) assertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Monitor\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: requestedProjectSlugOrId }\n\t\t});\n\t\tif (requestedProjectSlugOrId && isNumericId(requestedProjectSlugOrId) && context.constraints.projectSlug) {\n\t\t\tconst scopedProject = await apiService.getProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: context.constraints.projectSlug\n\t\t\t});\n\t\t\tif (String(scopedProject.id) !== requestedProjectSlugOrId) throw new UserInputError(`Monitor is outside the active project constraint. Expected project \"${context.constraints.projectSlug}\".`);\n\t\t}\n\t\tconst start = params.start ?? void 0;\n\t\tconst end = params.end ?? void 0;\n\t\tif (start && !end || !start && end) throw new UserInputError(\"`start` and `end` must be provided together.\");\n\t\tconst hasAbsoluteTimeRange = start !== void 0 || end !== void 0;\n\t\tconst requestedPeriod = params.period?.trim() || void 0;\n\t\tif (hasAbsoluteTimeRange && requestedPeriod) throw new UserInputError(\"`period` cannot be combined with `start` and `end`.\");\n\t\tconst statsPeriod = hasAbsoluteTimeRange ? void 0 : requestedPeriod ?? \"24h\";\n\t\tconst monitor = await apiService.getMonitorDetails({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: projectSlugOrId ?? void 0,\n\t\t\tmonitorSlug: params.monitorSlug,\n\t\t\tenvironment: params.environment ?? void 0\n\t\t});\n\t\tassertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Monitor\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: monitor.project\n\t\t});\n\t\tconst project = formatProject(monitor);\n\t\tconst monitorUrl = apiService.getMonitorUrl(organizationSlug, monitor.slug, project ?? void 0);\n\t\tconst [checkIns, stats] = await Promise.all([apiService.listMonitorCheckIns({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: projectSlugOrId ?? void 0,\n\t\t\tmonitorSlug: params.monitorSlug,\n\t\t\tenvironment: params.environment ?? void 0,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\tlimit: params.checkInLimit\n\t\t}), params.includeStats ? apiService.getMonitorStats({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: projectSlugOrId ?? void 0,\n\t\t\tmonitorSlug: params.monitorSlug,\n\t\t\tenvironment: params.environment ?? void 0,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\trollup: params.rollupSeconds ?? void 0\n\t\t}) : Promise.resolve([])]);\n\t\tconst owner = monitor.owner ? formatActor(monitor.owner) : null;\n\t\tconst output = compactLines([\n\t\t\t`# Monitor ${monitor.name ?? monitor.slug} in **${organizationSlug}**`,\n\t\t\t\"\",\n\t\t\t`**Slug**: ${monitor.slug}`,\n\t\t\t`**ID**: ${formatId(monitor.id)}`,\n\t\t\tproject ? `**Project**: ${project}` : null,\n\t\t\tmonitor.status ? `**Status**: ${monitor.status}` : null,\n\t\t\tmonitor.type ? `**Type**: ${monitor.type}` : null,\n\t\t\towner ? `**Owner**: ${owner}` : null,\n\t\t\tformatDate(monitor.lastCheckIn) ? `**Last Check-In**: ${formatDate(monitor.lastCheckIn)}` : null,\n\t\t\tformatDate(monitor.nextCheckIn) ? `**Next Check-In**: ${formatDate(monitor.nextCheckIn)}` : null,\n\t\t\t`**URL**: [Open Monitor](${monitorUrl})`\n\t\t]);\n\t\tconst config = formatConfig(monitor);\n\t\tif (config.length > 0) output.push(\"\", \"## Schedule\", \"\", ...config);\n\t\tif (monitor.environments && monitor.environments.length > 0) {\n\t\t\toutput.push(\"\", \"## Environments\", \"\");\n\t\t\tfor (const environment of monitor.environments) output.push(compactLines([\n\t\t\t\t`- ${environment.name ?? \"unknown\"}`,\n\t\t\t\tenvironment.status ? `  - Status: ${environment.status}` : null,\n\t\t\t\tformatDate(environment.lastCheckIn) ? `  - Last check-in: ${formatDate(environment.lastCheckIn)}` : null,\n\t\t\t\tformatDate(environment.nextCheckIn) ? `  - Next check-in: ${formatDate(environment.nextCheckIn)}` : null\n\t\t\t]).join(\"\\n\"));\n\t\t}\n\t\toutput.push(\"\", \"## Recent Check-Ins\", \"\");\n\t\toutput.push(checkIns.length === 0 ? \"No check-ins found in this time range.\" : checkIns.slice(0, params.checkInLimit).map(formatCheckIn).join(\"\\n\"));\n\t\tif (params.includeStats) {\n\t\t\toutput.push(\"\", \"## Stats\", \"\");\n\t\t\toutput.push(stats.length === 0 ? \"No stats found in this time range.\" : stats.slice(-10).map(formatStat).join(\"\\n\"));\n\t\t}\n\t\toutput.push(\"\", \"## Response Notes\", \"\");\n\t\toutput.push(`- Search issues from this monitor with \\`search_issues\\` query \\`monitor.slug:${monitor.slug}\\`.`);\n\t\treturn `${output.join(\"\\n\")}\\n`;\n\t}\n});\n\n//#endregion\nexport { get_monitor_details_default };\n//# sourceMappingURL=get-monitor-details-CP_Cj6P3.js.map","import { formatActor } from \"./api-formatting-nIGXUFdx.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/catalog/support/uptime-monitors.ts\n/** Verified against UptimeSubscription.IntervalSeconds in getsentry/sentry. */\nconst UPTIME_INTERVAL_SECONDS = [\n\t60,\n\t300,\n\t600,\n\t1200,\n\t1800,\n\t3600\n];\n/** Verified against UptimeSubscription.SupportedHTTPMethods in getsentry/sentry. */\nconst UPTIME_HTTP_METHODS = [\n\t\"GET\",\n\t\"POST\",\n\t\"HEAD\",\n\t\"PUT\",\n\t\"DELETE\",\n\t\"PATCH\",\n\t\"OPTIONS\"\n];\nconst UPTIME_MONITOR_STATUSES = [\"active\", \"disabled\"];\nconst ParamUptimeIntervalSeconds = z.number().int().refine((value) => UPTIME_INTERVAL_SECONDS.includes(value), { message: `intervalSeconds must be one of: ${UPTIME_INTERVAL_SECONDS.join(\", \")}` }).describe(\"Seconds between checks. Allowed values: 60, 300, 600, 1200, 1800, 3600.\");\nconst ParamUptimeHttpMethod = z.enum(UPTIME_HTTP_METHODS).describe(\"HTTP method used for the uptime check request.\");\nconst ParamUptimeMonitorStatus = z.enum(UPTIME_MONITOR_STATUSES).describe(\"Monitor status. `disabled` stops checks and does not count against quota.\");\nconst ParamUptimeTimeoutMs = z.number().int().min(1e3).max(6e4).describe(\"Request timeout in milliseconds (1000-60000).\");\nconst ParamUptimeHeaders = z.array(z.tuple([z.string(), z.string()])).describe(\"Optional HTTP headers as an array of [name, value] pairs, e.g. [[\\\"Accept\\\",\\\"application/json\\\"]].\");\n/** Owner actor for create/update. Empty/whitespace rejected. */\nconst ParamUptimeOwner = z.string().trim().min(1).regex(/^(user|team):.+$/, \"owner must use `user:ID` or `team:ID` format (e.g. `user:123` or `team:456`).\").describe(\"Owner actor in `user:ID` or `team:ID` format.\");\nconst SENSITIVE_HEADER_NAMES = new Set([\n\t\"authorization\",\n\t\"proxy-authorization\",\n\t\"cookie\",\n\t\"set-cookie\",\n\t\"x-api-key\",\n\t\"x-auth-token\",\n\t\"x-access-token\",\n\t\"x-csrf-token\",\n\t\"x-sentry-auth\"\n]);\nfunction isSensitiveHeaderName(name) {\n\tconst normalized = name.trim().toLowerCase();\n\tif (SENSITIVE_HEADER_NAMES.has(normalized)) return true;\n\treturn normalized.includes(\"authorization\") || normalized.includes(\"api-key\") || normalized.includes(\"access-token\") || normalized.includes(\"secret\") || normalized.includes(\"password\");\n}\n/**\n* Format headers for tool output without leaking secrets.\n* Malformed short arrays are skipped. Sensitive values are redacted.\n*/\nfunction formatUptimeHeadersForOutput(headers) {\n\tif (!Array.isArray(headers) || headers.length === 0) return [];\n\tconst lines = [];\n\tfor (const header of headers) {\n\t\tif (!Array.isArray(header) || header.length < 2) continue;\n\t\tconst name = header[0];\n\t\tconst value = header[1];\n\t\tif (typeof name !== \"string\" || typeof value !== \"string\") continue;\n\t\tconst displayValue = isSensitiveHeaderName(name) ? \"[REDACTED]\" : value;\n\t\tlines.push(`- ${name}: ${displayValue}`);\n\t}\n\treturn lines;\n}\nconst uptimeStatusSchema = z.enum([\n\t\"ok\",\n\t\"failed\",\n\t\"unknown\"\n]);\n/** Compact list item for discovery. Omits config detail agents rarely need in lists. */\nconst uptimeMonitorListItemSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tprojectSlug: z.string(),\n\tstatus: z.string(),\n\tuptimeStatus: uptimeStatusSchema,\n\turl: z.string(),\n\tmethod: z.string().optional(),\n\tintervalSeconds: z.number(),\n\tenvironment: z.string().optional(),\n\towner: z.string().optional(),\n\twebUrl: z.string().url()\n});\n/**\n* Mutation/detail summary: list fields plus config knobs useful after create/update.\n* Optional fields are omitted when absent instead of returned as null.\n*/\nconst uptimeMonitorSummarySchema = uptimeMonitorListItemSchema.extend({\n\ttimeoutMs: z.number(),\n\trecoveryThreshold: z.number().optional(),\n\tdowntimeThreshold: z.number().optional(),\n\ttraceSampling: z.boolean().optional(),\n\tresponseCaptureEnabled: z.boolean().optional()\n});\nfunction getUptimeOwnerName(monitor) {\n\tif (!monitor.owner) return null;\n\tconst formatted = formatActor(monitor.owner);\n\treturn formatted === \"unknown\" ? null : formatted;\n}\nfunction formatUptimeStatus(value) {\n\tif (value === 1 || value === \"1\" || value === \"ok\") return \"ok\";\n\tif (value === 2 || value === \"2\" || value === \"failed\") return \"failed\";\n\treturn \"unknown\";\n}\nfunction optionalString(value) {\n\tif (value === void 0 || value === null) return void 0;\n\tconst trimmed = value.trim();\n\treturn trimmed.length > 0 ? trimmed : void 0;\n}\nfunction toUptimeMonitorListItem(monitor, webUrl) {\n\treturn {\n\t\tid: String(monitor.id),\n\t\tname: monitor.name,\n\t\tprojectSlug: monitor.projectSlug,\n\t\tstatus: monitor.status,\n\t\tuptimeStatus: formatUptimeStatus(monitor.uptimeStatus),\n\t\turl: monitor.url,\n\t\t...monitor.method ? { method: monitor.method } : {},\n\t\tintervalSeconds: monitor.intervalSeconds,\n\t\t...optionalString(monitor.environment) ? { environment: optionalString(monitor.environment) } : {},\n\t\t...getUptimeOwnerName(monitor) ? { owner: getUptimeOwnerName(monitor) } : {},\n\t\twebUrl\n\t};\n}\nfunction toUptimeMonitorSummary(monitor, webUrl) {\n\treturn {\n\t\t...toUptimeMonitorListItem(monitor, webUrl),\n\t\ttimeoutMs: monitor.timeoutMs,\n\t\t...monitor.recoveryThreshold !== void 0 && monitor.recoveryThreshold !== null ? { recoveryThreshold: monitor.recoveryThreshold } : {},\n\t\t...monitor.downtimeThreshold !== void 0 && monitor.downtimeThreshold !== null ? { downtimeThreshold: monitor.downtimeThreshold } : {},\n\t\t...monitor.traceSampling !== void 0 && monitor.traceSampling !== null ? { traceSampling: monitor.traceSampling } : {},\n\t\t...monitor.responseCaptureEnabled !== void 0 && monitor.responseCaptureEnabled !== null ? { responseCaptureEnabled: monitor.responseCaptureEnabled } : {}\n\t};\n}\n\n//#endregion\nexport { ParamUptimeHeaders, ParamUptimeHttpMethod, ParamUptimeIntervalSeconds, ParamUptimeMonitorStatus, ParamUptimeOwner, ParamUptimeTimeoutMs, UPTIME_HTTP_METHODS, UPTIME_INTERVAL_SECONDS, UPTIME_MONITOR_STATUSES, formatUptimeHeadersForOutput, formatUptimeStatus, getUptimeOwnerName, isSensitiveHeaderName, toUptimeMonitorListItem, toUptimeMonitorSummary, uptimeMonitorListItemSchema, uptimeMonitorSummarySchema, uptimeStatusSchema };\n//# sourceMappingURL=uptime-monitors-DdMrkrKy.js.map","import { ParamOrganizationSlug, ParamProjectSlugOrAll, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { toUptimeMonitorListItem, uptimeMonitorListItemSchema } from \"./uptime-monitors-DdMrkrKy.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/find-uptime-monitors.ts\nconst findUptimeMonitorsOutputSchema = z.object({\n\tmonitors: z.array(uptimeMonitorListItemSchema),\n\thasMore: z.boolean()\n});\nvar find_uptime_monitors_default = defineTool({\n\tname: \"find_uptime_monitors\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"org:read\", \"project:read\"],\n\tdescription: [\n\t\t\"Find Sentry uptime monitors.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- List HTTP uptime monitors in an organization\",\n\t\t\"- Find a monitor by name or URL before getting details\",\n\t\t\"- Check monitor status, owner, project, interval, or target URL\",\n\t\t\"- When `hasMore` is true, narrow results with project, environment, owner, or query filters\",\n\t\t\"\",\n\t\t\"This is separate from cron monitors (`find_monitors`).\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"find_uptime_monitors(organizationSlug='my-organization')\",\n\t\t\"find_uptime_monitors(organizationSlug='my-organization', projectSlug='backend', query='api')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlugOrAll.optional(),\n\t\tenvironment: z.string().trim().min(1).describe(\"Optional environment name to limit monitors.\").optional(),\n\t\towner: z.string().trim().min(1).describe(\"Optional owner filter, such as `user:123`, `team:456`, `myteams`, or `unassigned`.\").optional(),\n\t\tquery: z.string().trim().min(1).describe(\"Optional search query for monitor name or URL.\").optional(),\n\t\tlimit: z.number().int().positive().max(99).describe(\"Maximum number of monitors to return.\").default(10)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findUptimeMonitorsOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst requestedProjectSlug = params.projectSlug && params.projectSlug !== \"all\" ? params.projectSlug : void 0;\n\t\tif (requestedProjectSlug) assertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Uptime monitor list\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: requestedProjectSlug }\n\t\t});\n\t\tconst projectSlug = context.constraints.projectSlug ?? requestedProjectSlug;\n\t\tif (projectSlug) setTag(\"project.slug\", projectSlug);\n\t\tconst monitors = await apiService.listUptimeMonitors({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug,\n\t\t\tenvironment: params.environment,\n\t\t\towner: params.owner,\n\t\t\tquery: params.query,\n\t\t\tlimit: params.limit + 1\n\t\t});\n\t\treturn structuredResult({\n\t\t\tmonitors: monitors.slice(0, params.limit).map((monitor) => toUptimeMonitorListItem(monitor, apiService.getUptimeMonitorUrl(organizationSlug, monitor.id))),\n\t\t\thasMore: monitors.length > params.limit\n\t\t});\n\t}\n});\n\n//#endregion\nexport { findUptimeMonitorsOutputSchema, find_uptime_monitors_default };\n//# sourceMappingURL=find-uptime-monitors-NZjkNLjM.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamPeriod, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { compactLines, formatDate } from \"./api-formatting-nIGXUFdx.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { formatUptimeHeadersForOutput, formatUptimeStatus, getUptimeOwnerName } from \"./uptime-monitors-DdMrkrKy.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-uptime-monitor-details.ts\nfunction formatCheck(check, monitorEnvironment) {\n\tconst time = formatDate(check.timestamp) ?? formatDate(check.scheduledCheckTime) ?? \"unknown time\";\n\tconst status = check.checkStatus ?? \"unknown\";\n\tconst reason = check.checkStatusReason ? ` (${check.checkStatusReason})` : \"\";\n\tconst http = check.httpStatusCode === void 0 || check.httpStatusCode === null ? \"\" : `, HTTP ${check.httpStatusCode}`;\n\tconst duration = check.durationMs === void 0 ? \"\" : `, ${check.durationMs}ms`;\n\tconst region = check.regionName || check.region;\n\tconst regionPart = region ? `, ${region}` : \"\";\n\tconst checkEnvironment = check.environment?.trim();\n\tconst monitorEnv = monitorEnvironment?.trim() || null;\n\tconst environment = checkEnvironment && checkEnvironment !== monitorEnv ? `, ${checkEnvironment}` : \"\";\n\treturn `- ${time}: ${status}${reason}${http}${duration}${regionPart}${environment}`;\n}\nvar get_uptime_monitor_details_default = defineTool({\n\tname: \"get_uptime_monitor_details\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Get details for a Sentry uptime monitor, including recent checks.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Inspect an uptime monitor's URL, interval, thresholds, and status\",\n\t\t\"- Review recent HTTP check results (success/failure, status code, duration)\",\n\t\t\"- Debug why an uptime monitor is failing\",\n\t\t\"\",\n\t\t\"This is separate from cron monitors (`get_monitor_details`).\",\n\t\t\"\",\n\t\t\"Request bodies are never returned. Sensitive header values are redacted.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_uptime_monitor_details(organizationSlug='my-organization', projectSlug='backend', uptimeMonitorId='12345')\",\n\t\t\"get_uptime_monitor_details(organizationSlug='my-organization', projectSlug='backend', uptimeMonitorId='12345', period='7d', checkLimit=20)\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tuptimeMonitorId: z.string().trim().min(1).describe(\"Uptime monitor ID (detector id).\"),\n\t\tperiod: ParamPeriod.describe(\"Relative time range for recent checks. Defaults to `24h` when `start` and `end` are omitted.\").optional(),\n\t\tstart: z.string().datetime().describe(\"Absolute start time. Must be provided with `end`; do not combine with `period`.\").optional(),\n\t\tend: z.string().datetime().describe(\"Absolute end time. Must be provided with `start`; do not combine with `period`.\").optional(),\n\t\tcheckLimit: z.number().int().positive().max(50).describe(\"Maximum number of recent checks to include.\").default(10)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tsetTag(\"uptime.monitor_id\", params.uptimeMonitorId);\n\t\tassertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Uptime monitor\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: params.projectSlug }\n\t\t});\n\t\tconst start = params.start;\n\t\tconst end = params.end;\n\t\tif (start && !end || !start && end) throw new UserInputError(\"`start` and `end` must be provided together.\");\n\t\tconst hasAbsoluteTimeRange = start !== void 0 || end !== void 0;\n\t\tconst requestedPeriod = params.period?.trim() || void 0;\n\t\tif (hasAbsoluteTimeRange && requestedPeriod) throw new UserInputError(\"`period` cannot be combined with `start` and `end`.\");\n\t\tconst statsPeriod = hasAbsoluteTimeRange ? void 0 : requestedPeriod ?? \"24h\";\n\t\tconst monitor = await apiService.getUptimeMonitorDetails({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tuptimeMonitorId: params.uptimeMonitorId\n\t\t});\n\t\tassertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Uptime monitor\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: monitor.projectSlug }\n\t\t});\n\t\tconst checks = await apiService.listUptimeMonitorChecks({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tuptimeMonitorId: params.uptimeMonitorId,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\tlimit: params.checkLimit\n\t\t});\n\t\tconst webUrl = apiService.getUptimeMonitorUrl(organizationSlug, monitor.id);\n\t\tconst owner = getUptimeOwnerName(monitor);\n\t\tconst uptimeStatus = formatUptimeStatus(monitor.uptimeStatus);\n\t\tconst output = compactLines([\n\t\t\t`# Uptime Monitor ${monitor.name} in **${organizationSlug}**`,\n\t\t\t\"\",\n\t\t\t`**ID**: ${monitor.id}`,\n\t\t\t`**Project**: ${monitor.projectSlug}`,\n\t\t\t`**Status**: ${monitor.status}`,\n\t\t\t`**Uptime Status**: ${uptimeStatus}`,\n\t\t\t`**URL**: ${monitor.url}`,\n\t\t\tmonitor.method ? `**Method**: ${monitor.method}` : null,\n\t\t\t`**Interval**: ${monitor.intervalSeconds}s`,\n\t\t\t`**Timeout**: ${monitor.timeoutMs}ms`,\n\t\t\tmonitor.environment ? `**Environment**: ${monitor.environment}` : null,\n\t\t\towner ? `**Owner**: ${owner}` : null,\n\t\t\tmonitor.recoveryThreshold !== void 0 && monitor.recoveryThreshold !== null ? `**Recovery Threshold**: ${monitor.recoveryThreshold}` : null,\n\t\t\tmonitor.downtimeThreshold !== void 0 && monitor.downtimeThreshold !== null ? `**Downtime Threshold**: ${monitor.downtimeThreshold}` : null,\n\t\t\tmonitor.traceSampling !== void 0 && monitor.traceSampling !== null ? `**Trace Sampling**: ${monitor.traceSampling}` : null,\n\t\t\tmonitor.responseCaptureEnabled !== void 0 && monitor.responseCaptureEnabled !== null ? `**Response Capture**: ${monitor.responseCaptureEnabled}` : null,\n\t\t\t`**Web URL**: [Open Monitor](${webUrl})`\n\t\t]);\n\t\tconst headerLines = formatUptimeHeadersForOutput(monitor.headers);\n\t\tif (headerLines.length > 0) output.push(\"\", \"## Headers\", \"\", ...headerLines);\n\t\tif (monitor.body) output.push(\"\", \"## Request Payload\", \"\", \"Request body is configured but omitted from this view.\");\n\t\tif (monitor.assertion !== void 0 && monitor.assertion !== null) output.push(\"\", \"## Assertion\", \"\", \"```json\", JSON.stringify(monitor.assertion, null, 2), \"```\");\n\t\toutput.push(\"\", \"## Recent Checks\", \"\");\n\t\toutput.push(checks.length === 0 ? \"No checks found in this time range.\" : checks.slice(0, params.checkLimit).map((check) => formatCheck(check, monitor.environment)).join(\"\\n\"));\n\t\toutput.push(\"\", \"## Response Notes\", \"\");\n\t\toutput.push(`- Search related issues with \\`search_issues\\` query \\`uptime_rule:${monitor.id}\\`.`);\n\t\treturn `${output.join(\"\\n\")}\\n`;\n\t}\n});\n\n//#endregion\nexport { get_uptime_monitor_details_default };\n//# sourceMappingURL=get-uptime-monitor-details-DfFRiDqD.js.map","import { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { ParamUptimeHeaders, ParamUptimeHttpMethod, ParamUptimeIntervalSeconds, ParamUptimeMonitorStatus, ParamUptimeOwner, ParamUptimeTimeoutMs, toUptimeMonitorSummary, uptimeMonitorSummarySchema } from \"./uptime-monitors-DdMrkrKy.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/create-uptime-monitor.ts\nconst createUptimeMonitorOutputSchema = z.object({ monitor: uptimeMonitorSummarySchema });\nvar create_uptime_monitor_default = defineTool({\n\tname: \"create_uptime_monitor\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\"project:write\"],\n\tdescription: [\n\t\t\"Create a Sentry HTTP uptime monitor.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Start monitoring a URL for availability\",\n\t\t\"- Create a new uptime check with interval and timeout\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"Required fields match Sentry's uptime API: name, url, intervalSeconds, timeoutMs.\",\n\t\t\"Advanced response assertions are not supported in this MVP; configure them in the Sentry UI if needed.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"create_uptime_monitor(organizationSlug='my-organization', projectSlug='backend', name='API Health', url='https://api.example.com/health', intervalSeconds=60, timeoutMs=5000)\",\n\t\t\"create_uptime_monitor(organizationSlug='my-organization', projectSlug='backend', name='Checkout', url='https://example.com/checkout', intervalSeconds=300, timeoutMs=10000, method='GET', environment='production')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tname: z.string().trim().min(1).max(128).describe(\"Monitor display name.\"),\n\t\turl: z.string().url().describe(\"URL to check.\"),\n\t\tintervalSeconds: ParamUptimeIntervalSeconds,\n\t\ttimeoutMs: ParamUptimeTimeoutMs.default(5e3),\n\t\tmethod: ParamUptimeHttpMethod.optional(),\n\t\theaders: ParamUptimeHeaders.optional(),\n\t\tbody: z.string().describe(\"Optional request body for methods that support a body.\").optional(),\n\t\tstatus: ParamUptimeMonitorStatus.optional(),\n\t\towner: ParamUptimeOwner.optional(),\n\t\tenvironment: z.string().trim().min(1).max(64).describe(\"Optional environment name for created uptime issues.\").optional(),\n\t\ttraceSampling: z.boolean().describe(\"Whether check requests may be considered for tracing.\").optional(),\n\t\tresponseCaptureEnabled: z.boolean().describe(\"Capture response body/headers on failures.\").optional(),\n\t\trecoveryThreshold: z.number().int().min(1).describe(\"Consecutive successful checks required to recover.\").optional(),\n\t\tdowntimeThreshold: z.number().int().min(1).describe(\"Consecutive failed checks required to mark down.\").optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: createUptimeMonitorOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tassertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Uptime monitor\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: params.projectSlug }\n\t\t});\n\t\tconst monitor = await apiService.createUptimeMonitor({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tname: params.name,\n\t\t\turl: params.url,\n\t\t\tintervalSeconds: params.intervalSeconds,\n\t\t\ttimeoutMs: params.timeoutMs,\n\t\t\tmethod: params.method,\n\t\t\theaders: params.headers,\n\t\t\tbody: params.body,\n\t\t\tstatus: params.status,\n\t\t\towner: params.owner,\n\t\t\tenvironment: params.environment,\n\t\t\ttraceSampling: params.traceSampling,\n\t\t\tresponseCaptureEnabled: params.responseCaptureEnabled,\n\t\t\trecoveryThreshold: params.recoveryThreshold,\n\t\t\tdowntimeThreshold: params.downtimeThreshold\n\t\t});\n\t\treturn structuredResult({ monitor: toUptimeMonitorSummary(monitor, apiService.getUptimeMonitorUrl(organizationSlug, monitor.id)) });\n\t}\n});\n\n//#endregion\nexport { createUptimeMonitorOutputSchema, create_uptime_monitor_default };\n//# sourceMappingURL=create-uptime-monitor-fo-rIhsm.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { ParamUptimeHeaders, ParamUptimeHttpMethod, ParamUptimeIntervalSeconds, ParamUptimeMonitorStatus, ParamUptimeOwner, ParamUptimeTimeoutMs, toUptimeMonitorSummary, uptimeMonitorSummarySchema } from \"./uptime-monitors-DdMrkrKy.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/update-uptime-monitor.ts\nconst updateUptimeMonitorOutputSchema = z.object({ monitor: uptimeMonitorSummarySchema });\nfunction hasDefinedUpdate(value) {\n\treturn value !== void 0;\n}\nvar update_uptime_monitor_default = defineTool({\n\tname: \"update_uptime_monitor\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\"project:write\"],\n\tdescription: [\n\t\t\"Update a Sentry HTTP uptime monitor.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Change URL, interval, timeout, method, headers, or body\",\n\t\t\"- Enable or disable a monitor (`status`)\",\n\t\t\"- Update owner, environment, or failure thresholds\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"Omit a field to leave it unchanged. Pass explicit `null` to clear `owner`, `environment`, or `body`.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"update_uptime_monitor(organizationSlug='my-organization', projectSlug='backend', uptimeMonitorId='12345', status='disabled')\",\n\t\t\"update_uptime_monitor(organizationSlug='my-organization', projectSlug='backend', uptimeMonitorId='12345', intervalSeconds=300, timeoutMs=8000)\",\n\t\t\"update_uptime_monitor(organizationSlug='my-organization', projectSlug='backend', uptimeMonitorId='12345', owner=null)\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tuptimeMonitorId: z.string().trim().min(1).describe(\"Uptime monitor ID (detector id).\"),\n\t\tname: z.string().trim().min(1).max(128).optional(),\n\t\turl: z.string().url().optional(),\n\t\tintervalSeconds: ParamUptimeIntervalSeconds.optional(),\n\t\ttimeoutMs: ParamUptimeTimeoutMs.optional(),\n\t\tmethod: ParamUptimeHttpMethod.optional(),\n\t\theaders: ParamUptimeHeaders.optional(),\n\t\tbody: z.string().nullable().optional().describe(\"Request body. Pass `null` to clear the body.\"),\n\t\tstatus: ParamUptimeMonitorStatus.optional(),\n\t\towner: ParamUptimeOwner.nullable().optional().describe(\"Owner actor in `user:ID` or `team:ID` format. Pass `null` to clear the owner.\"),\n\t\tenvironment: z.string().trim().min(1).max(64).nullable().optional().describe(\"Environment name. Pass `null` to clear the environment.\"),\n\t\ttraceSampling: z.boolean().optional(),\n\t\tresponseCaptureEnabled: z.boolean().optional(),\n\t\trecoveryThreshold: z.number().int().min(1).optional(),\n\t\tdowntimeThreshold: z.number().int().min(1).optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: true,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: updateUptimeMonitorOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tsetTag(\"uptime.monitor_id\", params.uptimeMonitorId);\n\t\tassertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Uptime monitor\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: params.projectSlug }\n\t\t});\n\t\tconst hasUpdate = hasDefinedUpdate(params.name) || hasDefinedUpdate(params.url) || hasDefinedUpdate(params.intervalSeconds) || hasDefinedUpdate(params.timeoutMs) || hasDefinedUpdate(params.method) || hasDefinedUpdate(params.headers) || hasDefinedUpdate(params.body) || hasDefinedUpdate(params.status) || hasDefinedUpdate(params.owner) || hasDefinedUpdate(params.environment) || hasDefinedUpdate(params.traceSampling) || hasDefinedUpdate(params.responseCaptureEnabled) || hasDefinedUpdate(params.recoveryThreshold) || hasDefinedUpdate(params.downtimeThreshold);\n\t\tif (!hasUpdate) throw new UserInputError(\"Provide at least one field to update on the uptime monitor.\");\n\t\tconst monitor = await apiService.updateUptimeMonitor({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tuptimeMonitorId: params.uptimeMonitorId,\n\t\t\tname: params.name,\n\t\t\turl: params.url,\n\t\t\tintervalSeconds: params.intervalSeconds,\n\t\t\ttimeoutMs: params.timeoutMs,\n\t\t\tmethod: params.method,\n\t\t\theaders: params.headers,\n\t\t\tbody: params.body,\n\t\t\tstatus: params.status,\n\t\t\towner: params.owner,\n\t\t\tenvironment: params.environment,\n\t\t\ttraceSampling: params.traceSampling,\n\t\t\tresponseCaptureEnabled: params.responseCaptureEnabled,\n\t\t\trecoveryThreshold: params.recoveryThreshold,\n\t\t\tdowntimeThreshold: params.downtimeThreshold\n\t\t});\n\t\treturn structuredResult({ monitor: toUptimeMonitorSummary(monitor, apiService.getUptimeMonitorUrl(organizationSlug, monitor.id)) });\n\t}\n});\n\n//#endregion\nexport { updateUptimeMonitorOutputSchema, update_uptime_monitor_default };\n//# sourceMappingURL=update-uptime-monitor-CXyi5lFD.js.map","import { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/delete-uptime-monitor.ts\nconst deleteUptimeMonitorOutputSchema = z.object({\n\tsuccess: z.literal(true),\n\tuptimeMonitorId: z.string(),\n\tprojectSlug: z.string()\n});\nvar delete_uptime_monitor_default = defineTool({\n\tname: \"delete_uptime_monitor\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\"project:write\"],\n\tdescription: [\n\t\t\"Delete a Sentry HTTP uptime monitor.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to permanently remove an uptime monitor.\",\n\t\t\"\",\n\t\t\"Be careful when using this tool! Deletion cannot be undone.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"delete_uptime_monitor(organizationSlug='my-organization', projectSlug='backend', uptimeMonitorId='12345')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tuptimeMonitorId: z.string().trim().min(1).describe(\"Uptime monitor ID (detector id).\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: true,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: deleteUptimeMonitorOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tsetTag(\"uptime.monitor_id\", params.uptimeMonitorId);\n\t\tassertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Uptime monitor\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: params.projectSlug }\n\t\t});\n\t\tawait apiService.deleteUptimeMonitor({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tuptimeMonitorId: params.uptimeMonitorId\n\t\t});\n\t\treturn structuredResult({\n\t\t\tsuccess: true,\n\t\t\tuptimeMonitorId: params.uptimeMonitorId,\n\t\t\tprojectSlug: params.projectSlug\n\t\t});\n\t}\n});\n\n//#endregion\nexport { deleteUptimeMonitorOutputSchema, delete_uptime_monitor_default };\n//# sourceMappingURL=delete-uptime-monitor-CHj4Cluv.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamProjectSlugOrAll, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { formatActor, formatDate } from \"./api-formatting-nIGXUFdx.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/find-alert-rules.ts\nconst AlertRuleKind = z.enum([\n\t\"all\",\n\t\"issue\",\n\t\"metric\"\n]).describe(\"Which alert rule family to search. Use `all` to include metric alerts, plus issue alerts when a project is available.\");\nconst issueAlertRuleSummarySchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tstatus: z.string().nullable(),\n\tactionMatch: z.string().nullable(),\n\tfilterMatch: z.string().nullable(),\n\tfrequencyMinutes: z.number().nullable(),\n\tenvironment: z.string().nullable(),\n\towner: z.string().nullable(),\n\tdateCreated: z.string().nullable(),\n\tdateUpdated: z.string().nullable(),\n\tlastTriggered: z.string().nullable(),\n\twebUrl: z.string()\n});\nconst metricAlertRuleSummarySchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tstatus: z.union([z.string(), z.number()]).nullable(),\n\tdataset: z.string().nullable(),\n\taggregate: z.string().nullable(),\n\tquery: z.string().nullable(),\n\ttimeWindowMinutes: z.number().nullable(),\n\tprojects: z.array(z.string()),\n\tenvironment: z.string().nullable(),\n\towner: z.string().nullable(),\n\tdateCreated: z.string().nullable(),\n\twebUrl: z.string()\n});\nconst paginationStateSchema = z.object({ nextCursor: z.string().nullable() });\nconst findAlertRulesOutputSchema = z.object({\n\tissueRules: z.array(issueAlertRuleSummarySchema),\n\tmetricRules: z.array(metricAlertRuleSummarySchema),\n\tpagination: z.object({\n\t\tissue: paginationStateSchema.nullable(),\n\t\tmetric: paginationStateSchema.nullable()\n\t})\n});\nfunction getIssueAlertRuleFrequency(rule) {\n\tif (typeof rule.frequency === \"number\") return rule.frequency;\n\tconst frequency = rule.config.frequency;\n\treturn typeof frequency === \"number\" ? frequency : null;\n}\nfunction getIssueAlertRuleStatus(rule) {\n\tif (rule.status) return rule.status;\n\tif (rule.enabled === void 0) return null;\n\treturn rule.enabled ? \"enabled\" : \"disabled\";\n}\nfunction getOwner(owner) {\n\treturn owner ? formatActor(owner) : null;\n}\nvar find_alert_rules_default = defineTool({\n\tname: \"find_alert_rules\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"org:read\", \"project:read\"],\n\tdescription: [\n\t\t\"Find Sentry alert rules.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- List issue alert rules for a project\",\n\t\t\"- List metric alert rules for an organization or project\",\n\t\t\"- Find an alert rule ID by name before inspecting it\",\n\t\t\"- Check alert conditions, queries, triggers, actions, owner, or environment\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"find_alert_rules(organizationSlug='my-org')\",\n\t\t\"find_alert_rules(organizationSlug='my-org', projectSlug='backend')\",\n\t\t\"find_alert_rules(organizationSlug='my-org', kind='issue', projectSlug='backend', query='critical')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Issue alert rules are project-scoped, so `projectSlug` is required when `kind` is `issue`.\",\n\t\t\"- Metric alert rules can be listed organization-wide or project-scoped.\",\n\t\t\"- Issue and metric alert rules have independent pagination state. Reuse a nextCursor only with its matching kind.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tkind: AlertRuleKind.default(\"all\"),\n\t\tprojectSlug: ParamProjectSlugOrAll.nullable().default(null),\n\t\tquery: z.string().trim().describe(\"Optional search query for alert rule name.\").nullable().default(null),\n\t\tcursor: z.string().trim().describe(\"Optional pagination cursor from a previous Sentry API response.\").nullable().default(null),\n\t\tlimit: z.number().int().positive().max(100).describe(\"Maximum number of alert rules to return per alert family.\").default(10)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findAlertRulesOutputSchema,\n\tasync handler(params, context) {\n\t\tconst requestedProjectSlug = params.projectSlug && params.projectSlug !== \"all\" ? params.projectSlug : void 0;\n\t\tif (requestedProjectSlug) assertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Alert rule list\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: requestedProjectSlug }\n\t\t});\n\t\tconst projectSlug = context.constraints.projectSlug ?? requestedProjectSlug;\n\t\tif (params.kind === \"issue\" && !projectSlug) throw new UserInputError(\"projectSlug is required when searching issue alert rules.\");\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tif (projectSlug) setTag(\"project.slug\", projectSlug);\n\t\tconst includeIssue = params.kind !== \"metric\" && Boolean(projectSlug);\n\t\tconst includeMetric = params.kind !== \"issue\";\n\t\tif (params.cursor && includeIssue && includeMetric) throw new UserInputError(\"cursor cannot be used with `kind='all'` when both issue and metric alert rules are included. Retry with `kind='issue'` or `kind='metric'` using a cursor from the same alert rule family.\");\n\t\tconst issuePage = includeIssue && projectSlug ? await apiService.listIssueAlertRulesPage({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug,\n\t\t\tquery: params.query ?? void 0,\n\t\t\tcursor: params.cursor ?? void 0,\n\t\t\tlimit: params.limit\n\t\t}) : {\n\t\t\trules: [],\n\t\t\tnextCursor: null\n\t\t};\n\t\tconst metricPage = includeMetric ? await apiService.listMetricAlertRulesPage({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug,\n\t\t\tquery: params.query ?? void 0,\n\t\t\tcursor: params.cursor ?? void 0,\n\t\t\tlimit: params.limit\n\t\t}) : {\n\t\t\trules: [],\n\t\t\tnextCursor: null\n\t\t};\n\t\treturn structuredResult({\n\t\t\tissueRules: issuePage.rules.map((rule) => ({\n\t\t\t\tid: String(rule.id),\n\t\t\t\tname: rule.name,\n\t\t\t\tstatus: getIssueAlertRuleStatus(rule),\n\t\t\t\tactionMatch: rule.actionMatch ?? null,\n\t\t\t\tfilterMatch: rule.filterMatch ?? null,\n\t\t\t\tfrequencyMinutes: getIssueAlertRuleFrequency(rule),\n\t\t\t\tenvironment: rule.environment ?? null,\n\t\t\t\towner: getOwner(rule.owner),\n\t\t\t\tdateCreated: formatDate(rule.dateCreated),\n\t\t\t\tdateUpdated: formatDate(rule.dateUpdated),\n\t\t\t\tlastTriggered: formatDate(rule.lastTriggered),\n\t\t\t\twebUrl: apiService.getIssueAlertRuleUrl(organizationSlug, rule.id)\n\t\t\t})),\n\t\t\tmetricRules: metricPage.rules.map((rule) => ({\n\t\t\t\tid: String(rule.id),\n\t\t\t\tname: rule.name,\n\t\t\t\tstatus: rule.status ?? null,\n\t\t\t\tdataset: rule.dataset ?? null,\n\t\t\t\taggregate: rule.aggregate ?? null,\n\t\t\t\tquery: rule.query ?? null,\n\t\t\t\ttimeWindowMinutes: rule.timeWindow ?? null,\n\t\t\t\tprojects: rule.projects,\n\t\t\t\tenvironment: rule.environment ?? null,\n\t\t\t\towner: getOwner(rule.owner),\n\t\t\t\tdateCreated: formatDate(rule.dateCreated),\n\t\t\t\twebUrl: apiService.getMetricAlertRuleUrl(organizationSlug, rule.id)\n\t\t\t})),\n\t\t\tpagination: {\n\t\t\t\tissue: includeIssue ? { nextCursor: issuePage.nextCursor } : null,\n\t\t\t\tmetric: includeMetric ? { nextCursor: metricPage.nextCursor } : null\n\t\t\t}\n\t\t});\n\t}\n});\n\n//#endregion\nexport { findAlertRulesOutputSchema, find_alert_rules_default };\n//# sourceMappingURL=find-alert-rules-Co9XjMKY.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ApiNotFoundError } from \"./errors-DG2FreDU.js\";\nimport { isPlainObject } from \"./type-guards-DHLAzjf2.js\";\nimport { compactLines, formatActor, formatDate, formatId, formatUnknown } from \"./api-formatting-nIGXUFdx.js\";\n\n//#region src/tools/catalog/support/alerts.ts\nconst NUMERIC_ID_PATTERN = /^\\d+$/;\nconst COMPONENT_DETAIL_SKIP_KEYS = new Set([\n\t\"id\",\n\t\"type\",\n\t\"conditions\",\n\t\"actions\"\n]);\nconst WORKFLOW_GROUP_DETAIL_SKIP_KEYS = new Set([\n\t\"id\",\n\t\"type\",\n\t\"logicType\",\n\t\"conditions\",\n\t\"actions\"\n]);\nfunction isNumericAlertRuleId(value) {\n\treturn NUMERIC_ID_PATTERN.test(value);\n}\nfunction humanizeKey(value) {\n\tif (value === \"conditionResult\") return \"result\";\n\tif (value === \"targetIdentifier\") return \"target\";\n\tif (value === \"alertThreshold\") return \"threshold\";\n\treturn value.replace(/([a-z0-9])([A-Z])/g, \"$1 $2\").replace(/[_-]+/g, \" \").trim().toLowerCase();\n}\nfunction humanizeValue(value) {\n\tconst normalized = value.replace(/([a-z0-9])([A-Z])/g, \"$1 $2\").replace(/[_-]+/g, \" \").trim();\n\tif (!normalized) return value;\n\treturn normalized.charAt(0).toUpperCase() + normalized.slice(1);\n}\nfunction formatScalar(value) {\n\tif (typeof value === \"string\") {\n\t\tconst trimmed = value.trim();\n\t\treturn trimmed ? trimmed : null;\n\t}\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return formatUnknown(value);\n\treturn null;\n}\nfunction formatDetailValue(value) {\n\tif (Array.isArray(value)) {\n\t\tconst items = value.map(formatDetailValue).filter((item) => item !== null);\n\t\treturn items.length > 0 ? items.join(\", \") : null;\n\t}\n\tif (isPlainObject(value)) {\n\t\tconst details = Object.entries(value).filter(([key]) => key !== \"id\").map(([key, item]) => {\n\t\t\tconst formatted = formatDetailValue(item);\n\t\t\treturn formatted ? `${humanizeKey(key)}: ${formatted}` : null;\n\t\t}).filter((item) => item !== null);\n\t\treturn details.length > 0 ? details.join(\", \") : null;\n\t}\n\treturn formatScalar(value);\n}\nfunction shouldSkipDetail(key, value) {\n\treturn key === \"targetDisplay\" && typeof value === \"string\" && value.toLowerCase() === \"unknown\";\n}\nfunction getComponentDetailEntries(component, skippedKeys) {\n\tconst detailEntries = [];\n\tfor (const [key, value] of Object.entries(component)) if (!skippedKeys.has(key) && value !== void 0 && value !== null && !shouldSkipDetail(key, value)) {\n\t\tif (key === \"config\" && isPlainObject(value)) {\n\t\t\tdetailEntries.push(...Object.entries(value).filter(([configKey, configValue]) => !shouldSkipDetail(configKey, configValue)));\n\t\t\tcontinue;\n\t\t}\n\t\tdetailEntries.push([key, value]);\n\t}\n\treturn detailEntries;\n}\nfunction formatComponentDetails(component, skippedKeys) {\n\tconst details = getComponentDetailEntries(component, skippedKeys).map(([key, value]) => {\n\t\tconst formatted = formatDetailValue(value);\n\t\treturn formatted ? `${humanizeKey(key)}: ${formatted}` : null;\n\t}).filter((item) => item !== null).join(\", \");\n\treturn details || null;\n}\nfunction formatComponent(component) {\n\tconst type = typeof component.type === \"string\" ? component.type : null;\n\tconst label = type ? humanizeValue(type) : \"Component\";\n\tconst details = formatComponentDetails(component, COMPONENT_DETAIL_SKIP_KEYS);\n\tif (!details) return label;\n\treturn `${label} (${details})`;\n}\nfunction singularizeComponentLabel(label) {\n\tif (label.endsWith(\"ies\")) return `${label.slice(0, -3)}y`;\n\tif (label.endsWith(\"s\")) return label.slice(0, -1);\n\treturn label;\n}\nfunction formatThresholdTrigger(component) {\n\tconst label = formatScalar(component.label);\n\tconst threshold = formatScalar(component.alertThreshold);\n\tconst resolveThreshold = formatScalar(component.resolveThreshold);\n\tif (!threshold) return null;\n\tconst thresholdLabel = label ? `${humanizeValue(label)} threshold` : \"Threshold\";\n\treturn resolveThreshold ? `${thresholdLabel}: ${threshold}; resolves below: ${resolveThreshold}` : `${thresholdLabel}: ${threshold}`;\n}\nfunction formatWorkflowGroup(component, componentLabel) {\n\tconst lines = [];\n\tconst logicType = typeof component.logicType === \"string\" ? component.logicType : null;\n\tif (logicType) lines.push(`- Logic: ${logicType}`);\n\tconst componentDetails = componentLabel === \"Trigger\" ? formatThresholdTrigger(component) ?? formatComponentDetails(component, WORKFLOW_GROUP_DETAIL_SKIP_KEYS) : formatComponentDetails(component, WORKFLOW_GROUP_DETAIL_SKIP_KEYS);\n\tif (componentDetails) lines.push(`- ${componentLabel}: ${componentDetails}`);\n\tconst conditions = readComponentList(component.conditions);\n\tif (conditions?.length) {\n\t\tlines.push(`- Conditions: ${conditions.slice(0, 5).map(formatComponent).join(\"; \")}`);\n\t\tif (conditions.length > 5) lines.push(`- ...and ${conditions.length - 5} more conditions`);\n\t}\n\tconst actions = readComponentList(component.actions);\n\tif (actions?.length) {\n\t\tlines.push(`- Actions: ${actions.slice(0, 5).map(formatComponent).join(\"; \")}`);\n\t\tif (actions.length > 5) lines.push(`- ...and ${actions.length - 5} more actions`);\n\t}\n\tif (lines.length === 0) lines.push(`- ${formatComponent(component)}`);\n\treturn lines;\n}\nfunction readComponentList(value) {\n\tif (!Array.isArray(value)) return void 0;\n\treturn value.filter(isPlainObject);\n}\nfunction formatComponentSummary(label, components, headingLevel) {\n\tif (!components || components.length === 0) return [];\n\tconst heading = \"#\".repeat(Math.min(headingLevel, 6));\n\tconst lines = [\n\t\t\"\",\n\t\t`${heading} ${label}`,\n\t\t\"\"\n\t];\n\tconst componentLabel = singularizeComponentLabel(label);\n\tfor (const component of components.slice(0, 5)) lines.push(...formatWorkflowGroup(component, componentLabel));\n\tif (components.length > 5) lines.push(`- ...and ${components.length - 5} more`);\n\treturn lines;\n}\nfunction getIssueAlertRuleFrequency(rule) {\n\tif (rule.frequency !== void 0 && rule.frequency !== null) return rule.frequency;\n\tconst frequency = rule.config.frequency;\n\treturn typeof frequency === \"number\" ? frequency : null;\n}\nfunction formatIssueAlertRule(rule, projectSlug, options = {}) {\n\tconst headingLevel = options.headingLevel ?? 2;\n\tconst includeComponents = options.includeComponents ?? true;\n\tconst heading = \"#\".repeat(Math.min(headingLevel, 6));\n\tconst owner = rule.owner ? formatActor(rule.owner) : null;\n\tconst frequency = getIssueAlertRuleFrequency(rule);\n\tconst lines = compactLines([\n\t\t`${heading} ${rule.name}`,\n\t\t\"\",\n\t\t`**Kind**: Issue Alert`,\n\t\t`**ID**: ${formatId(rule.id)}`,\n\t\t`**Project**: ${projectSlug}`,\n\t\trule.status ? `**Status**: ${rule.status}` : rule.enabled !== void 0 ? `**Status**: ${rule.enabled ? \"enabled\" : \"disabled\"}` : null,\n\t\trule.actionMatch ? `**Action Match**: ${rule.actionMatch}` : null,\n\t\trule.filterMatch ? `**Filter Match**: ${rule.filterMatch}` : null,\n\t\tfrequency !== null ? `**Frequency**: ${frequency} minutes` : null,\n\t\trule.environment ? `**Environment**: ${rule.environment}` : null,\n\t\towner ? `**Owner**: ${owner}` : null,\n\t\tformatDate(rule.dateCreated) ? `**Created**: ${formatDate(rule.dateCreated)}` : null,\n\t\tformatDate(rule.dateUpdated) ? `**Updated**: ${formatDate(rule.dateUpdated)}` : null,\n\t\tformatDate(rule.lastTriggered) ? `**Last Triggered**: ${formatDate(rule.lastTriggered)}` : null,\n\t\toptions.url ? `**URL**: ${options.url}` : null\n\t]);\n\tif (includeComponents) {\n\t\tconst workflowTriggers = rule.triggers ? [rule.triggers] : [];\n\t\tlines.push(...formatComponentSummary(\"Conditions\", rule.conditions, headingLevel + 1), ...formatComponentSummary(\"Filters\", rule.filters, headingLevel + 1), ...formatComponentSummary(\"Actions\", rule.actions, headingLevel + 1), ...formatComponentSummary(\"Triggers\", workflowTriggers, headingLevel + 1), ...formatComponentSummary(\"Action Filters\", rule.actionFilters ?? [], headingLevel + 1));\n\t}\n\treturn lines.join(\"\\n\");\n}\nfunction formatMetricAlertRule(rule, options = {}) {\n\tconst headingLevel = options.headingLevel ?? 2;\n\tconst includeComponents = options.includeComponents ?? true;\n\tconst heading = \"#\".repeat(Math.min(headingLevel, 6));\n\tconst owner = rule.owner ? formatActor(rule.owner) : null;\n\tconst projects = rule.projects ?? [];\n\tconst lines = compactLines([\n\t\t`${heading} ${rule.name}`,\n\t\t\"\",\n\t\t`**Kind**: Metric Alert`,\n\t\t`**ID**: ${formatId(rule.id)}`,\n\t\trule.status !== void 0 ? `**Status**: ${formatUnknown(rule.status)}` : null,\n\t\trule.dataset ? `**Dataset**: ${rule.dataset}` : null,\n\t\trule.aggregate ? `**Aggregate**: ${rule.aggregate}` : null,\n\t\trule.query ? `**Query**: ${rule.query}` : null,\n\t\trule.timeWindow !== void 0 && rule.timeWindow !== null ? `**Time Window**: ${rule.timeWindow} minutes` : null,\n\t\tprojects.length > 0 ? `**Projects**: ${projects.join(\", \")}` : null,\n\t\trule.environment ? `**Environment**: ${rule.environment}` : null,\n\t\towner ? `**Owner**: ${owner}` : null,\n\t\tformatDate(rule.dateCreated) ? `**Created**: ${formatDate(rule.dateCreated)}` : null,\n\t\toptions.url ? `**URL**: ${options.url}` : null\n\t]);\n\tif (includeComponents) lines.push(...formatComponentSummary(\"Triggers\", rule.triggers, headingLevel + 1));\n\treturn lines.join(\"\\n\");\n}\nasync function findExactIssueAlertRuleMatches(apiService, params) {\n\tconst rules = await apiService.listIssueAlertRules({\n\t\torganizationSlug: params.organizationSlug,\n\t\tprojectSlug: params.projectSlug,\n\t\tquery: params.ruleName,\n\t\tlimit: 100\n\t});\n\treturn rules.filter((rule) => rule.name.toLowerCase() === params.ruleName.toLowerCase());\n}\nasync function findExactMetricAlertRuleMatches(apiService, params) {\n\tconst rules = await apiService.listMetricAlertRules({\n\t\torganizationSlug: params.organizationSlug,\n\t\tprojectSlug: params.projectSlug,\n\t\tquery: params.ruleName,\n\t\tlimit: 100\n\t});\n\treturn rules.filter((rule) => rule.name.toLowerCase() === params.ruleName.toLowerCase());\n}\nasync function resolveIssueAlertRule(apiService, params) {\n\tif (isNumericAlertRuleId(params.ruleIdOrName)) try {\n\t\treturn await apiService.getIssueAlertRule({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\truleId: params.ruleIdOrName\n\t\t});\n\t} catch (error) {\n\t\tif (!(error instanceof ApiNotFoundError)) throw error;\n\t}\n\tconst matches = await findExactIssueAlertRuleMatches(apiService, {\n\t\torganizationSlug: params.organizationSlug,\n\t\tprojectSlug: params.projectSlug,\n\t\truleName: params.ruleIdOrName\n\t});\n\tif (matches.length === 1) return apiService.getIssueAlertRule({\n\t\torganizationSlug: params.organizationSlug,\n\t\tprojectSlug: params.projectSlug,\n\t\truleId: matches[0].id\n\t});\n\tif (matches.length > 1) throw new UserInputError(`Multiple issue alert rules named \"${params.ruleIdOrName}\" were found. Retry with the numeric rule ID.`);\n\tthrow new UserInputError(`Issue alert rule \"${params.ruleIdOrName}\" was not found in project ${params.projectSlug}.`);\n}\nasync function resolveMetricAlertRule(apiService, params) {\n\tif (isNumericAlertRuleId(params.ruleIdOrName)) try {\n\t\treturn await apiService.getMetricAlertRule({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\truleId: params.ruleIdOrName\n\t\t});\n\t} catch (error) {\n\t\tif (!(error instanceof ApiNotFoundError)) throw error;\n\t}\n\tconst matches = await findExactMetricAlertRuleMatches(apiService, {\n\t\torganizationSlug: params.organizationSlug,\n\t\tprojectSlug: params.projectSlug,\n\t\truleName: params.ruleIdOrName\n\t});\n\tif (matches.length === 1) return apiService.getMetricAlertRule({\n\t\torganizationSlug: params.organizationSlug,\n\t\truleId: matches[0].id\n\t});\n\tif (matches.length > 1) throw new UserInputError(`Multiple metric alert rules named \"${params.ruleIdOrName}\" were found. Retry with the numeric rule ID.`);\n\tthrow new UserInputError(`Metric alert rule \"${params.ruleIdOrName}\" was not found.`);\n}\n\n//#endregion\nexport { formatIssueAlertRule, formatMetricAlertRule, isNumericAlertRuleId, resolveIssueAlertRule, resolveMetricAlertRule };\n//# sourceMappingURL=alerts-CVOIE5iC.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamProjectSlugOrAll, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { assertProjectRefWithinConstraint } from \"./project-constraints-DlfcU4mm.js\";\nimport { formatIssueAlertRule, formatMetricAlertRule, resolveIssueAlertRule, resolveMetricAlertRule } from \"./alerts-CVOIE5iC.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-alert-rule.ts\nconst AlertRuleKind = z.enum([\n\t\"all\",\n\t\"issue\",\n\t\"metric\"\n]).describe(\"Which alert rule family to inspect. Use `issue` or `metric` for numeric IDs; `all` treats the value as an exact-name lookup.\");\nfunction describeMatch(match) {\n\tconst project = match.projectSlug ? ` project ${match.projectSlug}` : \"\";\n\treturn `${match.kind} alert ${String(match.rule.id)} (${match.rule.name})${project}`;\n}\nfunction assertMetricAlertRuleWithinProject(rule, projectSlug) {\n\tif (!projectSlug) return;\n\tif (!rule.projects?.includes(projectSlug)) throw new UserInputError(`Metric alert rule is outside project \"${projectSlug}\".`);\n}\nvar get_alert_rule_default = defineTool({\n\tname: \"get_alert_rule\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"org:read\", \"project:read\"],\n\tdescription: [\n\t\t\"Get details for a Sentry alert rule.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to inspect an alert rule's exact conditions, query, triggers, and actions before explaining or planning changes.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_alert_rule(organizationSlug='my-org', kind='metric', ruleIdOrName='12345')\",\n\t\t\"get_alert_rule(organizationSlug='my-org', kind='issue', projectSlug='backend', ruleIdOrName='Notify backend team')\",\n\t\t\"get_alert_rule(organizationSlug='my-org', projectSlug='backend', ruleIdOrName='P95 latency')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use `kind='issue'` or `kind='metric'` for numeric IDs because issue and metric alerts use separate endpoints.\",\n\t\t\"- With `kind='all'`, a digit-only `ruleIdOrName` is treated as an exact alert rule name.\",\n\t\t\"- Issue alert rules are project-scoped, so `projectSlug` is required when `kind` is `issue`.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tkind: AlertRuleKind.default(\"all\"),\n\t\tprojectSlug: ParamProjectSlugOrAll.nullable().default(null),\n\t\truleIdOrName: z.string().trim().min(1).describe(\"The alert rule's numeric ID, or an exact alert rule name.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst requestedProjectSlug = params.projectSlug && params.projectSlug !== \"all\" ? params.projectSlug : void 0;\n\t\tif (requestedProjectSlug) assertProjectRefWithinConstraint({\n\t\t\tresourceLabel: \"Alert rule\",\n\t\t\tscopedProjectSlug: context.constraints.projectSlug,\n\t\t\tproject: { slug: requestedProjectSlug }\n\t\t});\n\t\tconst projectSlug = context.constraints.projectSlug ?? requestedProjectSlug;\n\t\tif (params.kind === \"issue\" && !projectSlug) throw new UserInputError(\"projectSlug is required when inspecting an issue alert rule.\");\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tif (projectSlug) setTag(\"project.slug\", projectSlug);\n\t\tlet match;\n\t\tif (params.kind === \"issue\") {\n\t\t\tconst rule = await resolveIssueAlertRule(apiService, {\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlug: projectSlug ?? \"\",\n\t\t\t\truleIdOrName: params.ruleIdOrName\n\t\t\t});\n\t\t\tmatch = {\n\t\t\t\tkind: \"issue\",\n\t\t\t\trule,\n\t\t\t\tprojectSlug: projectSlug ?? \"\"\n\t\t\t};\n\t\t} else if (params.kind === \"metric\") {\n\t\t\tconst rule = await resolveMetricAlertRule(apiService, {\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlug,\n\t\t\t\truleIdOrName: params.ruleIdOrName\n\t\t\t});\n\t\t\tassertMetricAlertRuleWithinProject(rule, projectSlug);\n\t\t\tmatch = {\n\t\t\t\tkind: \"metric\",\n\t\t\t\trule,\n\t\t\t\tprojectSlug\n\t\t\t};\n\t\t} else {\n\t\t\tconst matches = [];\n\t\t\tif (projectSlug) {\n\t\t\t\tconst issueRules = await apiService.listIssueAlertRules({\n\t\t\t\t\torganizationSlug,\n\t\t\t\t\tprojectSlug,\n\t\t\t\t\tquery: params.ruleIdOrName,\n\t\t\t\t\tlimit: 100\n\t\t\t\t});\n\t\t\t\tmatches.push(...issueRules.filter((rule) => rule.name.toLowerCase() === params.ruleIdOrName.toLowerCase()).map((rule) => ({\n\t\t\t\t\tkind: \"issue\",\n\t\t\t\t\trule,\n\t\t\t\t\tprojectSlug\n\t\t\t\t})));\n\t\t\t}\n\t\t\tconst metricRules = await apiService.listMetricAlertRules({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlug,\n\t\t\t\tquery: params.ruleIdOrName,\n\t\t\t\tlimit: 100\n\t\t\t});\n\t\t\tmatches.push(...metricRules.filter((rule) => rule.name.toLowerCase() === params.ruleIdOrName.toLowerCase()).map((rule) => ({\n\t\t\t\tkind: \"metric\",\n\t\t\t\trule,\n\t\t\t\tprojectSlug\n\t\t\t})));\n\t\t\tif (matches.length === 0) throw new UserInputError(`Alert rule \"${params.ruleIdOrName}\" was not found.`);\n\t\t\tif (matches.length > 1) throw new UserInputError(`Multiple alert rules named \"${params.ruleIdOrName}\" were found: ${matches.map(describeMatch).join(\", \")}. Retry with the numeric rule ID and explicit kind.`);\n\t\t\tconst [found] = matches;\n\t\t\tmatch = found.kind === \"issue\" ? {\n\t\t\t\t...found,\n\t\t\t\trule: await apiService.getIssueAlertRule({\n\t\t\t\t\torganizationSlug,\n\t\t\t\t\tprojectSlug: found.projectSlug,\n\t\t\t\t\truleId: found.rule.id\n\t\t\t\t})\n\t\t\t} : {\n\t\t\t\t...found,\n\t\t\t\trule: await apiService.getMetricAlertRule({\n\t\t\t\t\torganizationSlug,\n\t\t\t\t\truleId: found.rule.id\n\t\t\t\t})\n\t\t\t};\n\t\t\tif (match.kind === \"metric\") assertMetricAlertRuleWithinProject(match.rule, match.projectSlug);\n\t\t}\n\t\tconst scopeLabel = projectSlug ? `${organizationSlug}/${projectSlug}` : organizationSlug;\n\t\tlet output = `# Alert Rule in **${scopeLabel}**\\n\\n`;\n\t\toutput += match.kind === \"issue\" ? formatIssueAlertRule(match.rule, match.projectSlug, { url: apiService.getIssueAlertRuleUrl(organizationSlug, match.rule.id) }) : formatMetricAlertRule(match.rule, { url: apiService.getMetricAlertRuleUrl(organizationSlug, match.rule.id) });\n\t\toutput += \"\\n\\n## Response Notes\\n\\n\";\n\t\toutput += \"- Use these details to inspect alert conditions, filters, routing, and notification actions before changing the rule in Sentry.\\n\";\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { get_alert_rule_default };\n//# sourceMappingURL=get-alert-rule-WfTdEa_v.js.map","import { isTopLevelToolName } from \"./surfaces-B1_F0pzt.js\";\n\n//#region src/internal/tool-helpers/tool-call-formatting.ts\nfunction formatArgumentValue(value) {\n\tif (typeof value === \"string\") return `'${value.replaceAll(\"\\\\\", \"\\\\\\\\\").replaceAll(\"'\", \"\\\\'\")}'`;\n\tif (Array.isArray(value) || typeof value === \"object\") return JSON.stringify(value);\n\treturn String(value);\n}\nfunction formatArguments(args) {\n\treturn Object.entries(args).map(([key, value]) => `${key}=${formatArgumentValue(value)}`).join(\", \");\n}\nfunction formatPurpose(purpose) {\n\treturn purpose ? ` ${purpose}` : \"\";\n}\n/**\n* Checks the actual session tool set; missing availability preserves legacy\n* behavior for callers that cannot provide session-scoped tool metadata.\n*/\nfunction isToolAvailableInSession(toolName, availableToolNames) {\n\treturn !availableToolNames || availableToolNames.has(toolName);\n}\nfunction isDirectTool(toolName, experimentalMode, directToolNames) {\n\treturn directToolNames ? directToolNames.has(toolName) : isTopLevelToolName(toolName, experimentalMode);\n}\nfunction formatToolCall({ toolName, arguments: args = {} }) {\n\tconst formattedArgs = formatArguments(args);\n\treturn `${toolName}(${formattedArgs})`;\n}\n/**\n* Formats user-facing tool guidance as a direct call, catalog gateway call, or\n* fallback message based on the current session's available/direct tools.\n*/\nfunction formatToolCallInstruction({ toolName, arguments: _args = {}, experimentalMode, purpose, availableToolNames, directToolNames, fallbackInstruction }) {\n\tconst targetAvailable = isToolAvailableInSession(toolName, availableToolNames);\n\tif (targetAvailable && isDirectTool(toolName, experimentalMode, directToolNames)) return `Use the Sentry tool \\`${toolName}\\`${formatPurpose(purpose)}`;\n\tconst catalogGatewayAvailable = isToolAvailableInSession(\"search_sentry_tools\", availableToolNames) && isToolAvailableInSession(\"execute_sentry_tool\", availableToolNames) && isDirectTool(\"search_sentry_tools\", experimentalMode, directToolNames) && isDirectTool(\"execute_sentry_tool\", experimentalMode, directToolNames);\n\tif (targetAvailable && catalogGatewayAvailable) return `Use the Sentry tool \\`${toolName}\\`${formatPurpose(purpose)}`;\n\treturn fallbackInstruction ?? `The Sentry tool \\`${toolName}\\` is not available in this session`;\n}\n/**\n* Formats user-facing guidance only when the target tool is available in the\n* current session; otherwise returns null so callers can omit the guidance.\n*/\nfunction formatAvailableToolCallInstruction({ toolName, experimentalMode, purpose, availableToolNames, directToolNames }) {\n\tif (!isToolAvailableInSession(toolName, availableToolNames)) return null;\n\treturn formatToolCallInstruction({\n\t\ttoolName,\n\t\texperimentalMode,\n\t\tpurpose,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t});\n}\n\n//#endregion\nexport { formatAvailableToolCallInstruction, formatToolCall, formatToolCallInstruction, isToolAvailableInSession };\n//# sourceMappingURL=tool-call-formatting-ALc98KqF.js.map","import { isTopLevelToolName } from \"./surfaces-B1_F0pzt.js\";\nimport { formatToolCall, isToolAvailableInSession } from \"./tool-call-formatting-ALc98KqF.js\";\n\n//#region src/internal/tool-helpers/ai-conversation-actions.ts\nconst MAX_SUGGESTED_ACTIONS = 3;\nfunction formatInlineCode(value) {\n\tconst backtickRuns = value.match(/`+/g) ?? [];\n\tconst fenceLength = backtickRuns.reduce((max, run) => Math.max(max, run.length), 0) + 1;\n\tconst fence = \"`\".repeat(fenceLength);\n\tconst needsPadding = value.startsWith(\"`\") || value.endsWith(\"`\");\n\treturn needsPadding ? `${fence} ${value} ${fence}` : `${fence}${value}${fence}`;\n}\n/** Builds transcript actions that match the session's direct or catalog surface. */\nfunction getAIConversationSuggestedActions({ organizationSlug, aiConversations, experimentalMode, availableToolNames, directToolNames }) {\n\tif (aiConversations.length === 0 || !isToolAvailableInSession(\"get_agent_conversation_details\", availableToolNames)) return [];\n\tconst targetIsDirect = directToolNames ? directToolNames.has(\"get_agent_conversation_details\") : isTopLevelToolName(\"get_agent_conversation_details\", experimentalMode);\n\tconst executeToolIsDirect = directToolNames ? directToolNames.has(\"execute_sentry_tool\") : isTopLevelToolName(\"execute_sentry_tool\", experimentalMode);\n\tconst useCatalogGateway = !targetIsDirect && executeToolIsDirect && isToolAvailableInSession(\"execute_sentry_tool\", availableToolNames);\n\tif (!targetIsDirect && !useCatalogGateway) return [];\n\treturn aiConversations.slice(0, MAX_SUGGESTED_ACTIONS).map((conversation) => {\n\t\tconst targetArguments = {\n\t\t\torganizationSlug,\n\t\t\tconversationId: conversation.conversationId\n\t\t};\n\t\treturn targetIsDirect ? {\n\t\t\ttype: \"tool_call\",\n\t\t\ttoolName: \"get_agent_conversation_details\",\n\t\t\targuments: targetArguments,\n\t\t\treason: \"Fetch the full transcript for this agent conversation.\"\n\t\t} : {\n\t\t\ttype: \"tool_call\",\n\t\t\ttoolName: \"execute_sentry_tool\",\n\t\t\targuments: {\n\t\t\t\tname: \"get_agent_conversation_details\",\n\t\t\t\targuments: targetArguments\n\t\t\t},\n\t\t\treason: \"Fetch the full transcript for this agent conversation.\"\n\t\t};\n\t});\n}\n/** Returns markdown instructions that mirror the callable structured actions. */\nfunction formatAIConversationActionInstructions({ organizationSlug, aiConversations, experimentalMode, availableToolNames, directToolNames }) {\n\tconst actions = getAIConversationSuggestedActions({\n\t\torganizationSlug,\n\t\taiConversations,\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t});\n\tif (actions.length === 0) return [\"Agent conversation detail lookup is not available in this session.\"];\n\treturn actions.map((action) => `Use the Sentry tool ${formatInlineCode(formatToolCall({\n\t\ttoolName: action.toolName,\n\t\targuments: action.arguments\n\t}))} to fetch the full transcript.`);\n}\n/**\n* Adds concrete transcript follow-ups to otherwise markdown-first results.\n* The markdown remains the compatibility path for clients that do not read\n* structured content.\n*/\nfunction addAIConversationSuggestedActions({ markdown, organizationSlug, aiConversations, experimentalMode, availableToolNames, directToolNames }) {\n\tconst suggestedActions = getAIConversationSuggestedActions({\n\t\torganizationSlug,\n\t\taiConversations,\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t});\n\tif (suggestedActions.length === 0) return markdown;\n\treturn {\n\t\tcontent: [{\n\t\t\ttype: \"text\",\n\t\t\ttext: markdown\n\t\t}],\n\t\tstructuredContent: { suggestedActions }\n\t};\n}\n\n//#endregion\nexport { addAIConversationSuggestedActions, formatAIConversationActionInstructions, getAIConversationSuggestedActions };\n//# sourceMappingURL=ai-conversation-actions-rbKawWyG.js.map","import { ApiNotFoundError } from \"./errors-DG2FreDU.js\";\n\n//#region src/internal/tool-helpers/enhance-error.ts\n/**\n* Enhances a 404 error with parameter context to help users understand what went wrong.\n* This is optional - tools can use this when they want to provide extra context.\n*\n* @example\n* ```typescript\n* try {\n*   const issue = await apiService.getIssue({ organizationSlug, issueId });\n* } catch (error) {\n*   if (error instanceof ApiNotFoundError) {\n*     throw enhanceNotFoundError(error, { organizationSlug, issueId });\n*   }\n*   throw error;\n* }\n* ```\n*/\nfunction enhanceNotFoundError(error, params) {\n\tconst paramsList = [];\n\tfor (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== \"\") paramsList.push(`${key}: '${value}'`);\n\tif (paramsList.length > 0) {\n\t\tconst enhancedMessage = `${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => `  - ${p}`).join(\"\\n\")}`;\n\t\treturn new ApiNotFoundError(enhancedMessage, error.detail, error.responseBody);\n\t}\n\treturn error;\n}\n\n//#endregion\nexport { enhanceNotFoundError };\n//# sourceMappingURL=enhance-error-BDXGhe5E.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId } from \"./slug-validation-MJ3jU0Hd.js\";\n\n//#region src/internal/url-scope.ts\nfunction resolveScopedOrganizationSlug({ resourceLabel, scopedOrganizationSlug, urlOrganizationSlug }) {\n\tif (!scopedOrganizationSlug) return urlOrganizationSlug;\n\tif (scopedOrganizationSlug !== urlOrganizationSlug) throw new UserInputError(`${resourceLabel} URL is outside the active organization constraint. Expected organization \"${scopedOrganizationSlug}\" but got \"${urlOrganizationSlug}\".`);\n\treturn scopedOrganizationSlug;\n}\nfunction resolveScopedProjectSlug({ resourceLabel, scopedProjectSlug, urlProjectSlug }) {\n\tif (!scopedProjectSlug) return urlProjectSlug;\n\tif (scopedProjectSlug !== urlProjectSlug) throw new UserInputError(`${resourceLabel} URL is outside the active project constraint. Expected project \"${scopedProjectSlug}\" but got \"${urlProjectSlug}\".`);\n\treturn scopedProjectSlug;\n}\nfunction assertScopedProjectSlug({ resourceLabel, scopedProjectSlug, actualProjectSlug }) {\n\tif (!scopedProjectSlug) return actualProjectSlug;\n\tif (scopedProjectSlug !== actualProjectSlug) throw new UserInputError(`${resourceLabel} is outside the active project constraint. Expected project \"${scopedProjectSlug}\".`);\n\treturn actualProjectSlug;\n}\nfunction resolveScopedProjectSlugOrId({ resourceLabel, scopedProjectSlugOrId, urlProjectSlug }) {\n\tif (scopedProjectSlugOrId == null || typeof scopedProjectSlugOrId === \"string\" && scopedProjectSlugOrId.trim() === \"\") return urlProjectSlug;\n\tif (typeof scopedProjectSlugOrId === \"number\" || isNumericId(String(scopedProjectSlugOrId))) return urlProjectSlug;\n\tif (scopedProjectSlugOrId !== urlProjectSlug) throw new UserInputError(`${resourceLabel} URL is outside the active project constraint. Expected project \"${scopedProjectSlugOrId}\" but got \"${urlProjectSlug}\".`);\n\treturn scopedProjectSlugOrId;\n}\n\n//#endregion\nexport { assertScopedProjectSlug, resolveScopedOrganizationSlug, resolveScopedProjectSlug, resolveScopedProjectSlugOrId };\n//# sourceMappingURL=url-scope-CRM5sNo7.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { resolveScopedOrganizationSlug } from \"./url-scope-CRM5sNo7.js\";\n\n//#region src/internal/issue-helpers.ts\n/**\n* Extracts the Sentry issue ID and organization slug from a full URL\n*\n* @param url - A full Sentry issue URL\n* @returns Object containing the numeric issue ID and organization slug (if found)\n* @throws Error if the input is invalid\n*/\nfunction extractIssueId(url) {\n\tif (!url || typeof url !== \"string\") throw new UserInputError(\"Invalid Sentry issue URL. URL must be a non-empty string.\");\n\tif (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) throw new UserInputError(\"Invalid Sentry issue URL. Must start with http:// or https://\");\n\tlet parsedUrl;\n\ttry {\n\t\tparsedUrl = new URL(url);\n\t} catch (error) {\n\t\tthrow new UserInputError(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);\n\t}\n\tconst pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n\tif (pathParts.length < 2 || !pathParts.includes(\"issues\")) throw new UserInputError(\"Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'\");\n\tconst issueId = pathParts[pathParts.indexOf(\"issues\") + 1];\n\tif (!issueId) throw new UserInputError(\"Unable to determine issue ID from URL.\");\n\tlet organizationSlug;\n\tif (pathParts.includes(\"organizations\")) organizationSlug = pathParts[pathParts.indexOf(\"organizations\") + 1];\n\telse if (pathParts.length > 1 && pathParts[0] !== \"issues\") organizationSlug = pathParts[0];\n\telse {\n\t\tconst hostParts = parsedUrl.hostname.split(\".\");\n\t\tif (hostParts.length > 2 && hostParts[0] !== \"www\") organizationSlug = hostParts[0];\n\t}\n\tif (!organizationSlug) throw new UserInputError(\"Invalid Sentry issue URL. Could not determine organization.\");\n\treturn {\n\t\tissueId,\n\t\torganizationSlug\n\t};\n}\n/**\n* Sometimes the LLM will pass in a funky issue shortId. For example it might pass\n* in \"CLOUDFLARE-MCP-41.\" instead of \"CLOUDFLARE-MCP-41\". This function attempts to\n* fix common issues.\n*\n* @param issueId - The issue ID to parse\n* @returns The parsed issue ID\n*/\nfunction parseIssueId(issueId) {\n\tif (!issueId.trim()) throw new UserInputError(\"Issue ID cannot be empty\");\n\tlet finalIssueId = issueId;\n\tfinalIssueId = finalIssueId.replace(/[^\\w-]/g, \"\");\n\tif (!finalIssueId) throw new UserInputError(\"Issue ID cannot be empty after removing special characters\");\n\tconst validFormatRegex = /^(\\d+|[A-Za-z0-9][\\w-]*-[A-Za-z0-9]+)$/;\n\tif (!validFormatRegex.test(finalIssueId)) throw new UserInputError(`Invalid issue ID format: \"${finalIssueId}\". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., \"PROJECT-ABC123\").`);\n\treturn finalIssueId;\n}\n/**\n* Parses issue parameters from a variety of formats.\n*\n* @param params - Object containing issue URL, issue ID, and organization slug\n* @returns Object containing the parsed organization slug and issue ID\n* @throws Error if the input is invalid\n*/\nfunction parseIssueParams({ issueUrl, issueId, organizationSlug }) {\n\tif (issueUrl) {\n\t\tconst resolved = extractIssueId(issueUrl);\n\t\tif (!resolved) throw new Error(\"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\");\n\t\treturn {\n\t\t\torganizationSlug: resolveScopedOrganizationSlug({\n\t\t\t\tresourceLabel: \"Issue\",\n\t\t\t\tscopedOrganizationSlug: organizationSlug,\n\t\t\t\turlOrganizationSlug: resolved.organizationSlug\n\t\t\t}),\n\t\t\tissueId: parseIssueId(resolved.issueId)\n\t\t};\n\t}\n\tif (!organizationSlug) throw new UserInputError(\"Organization slug is required\");\n\tif (issueId) return {\n\t\torganizationSlug,\n\t\tissueId: parseIssueId(issueId)\n\t};\n\tthrow new UserInputError(\"Either issueId or issueUrl must be provided\");\n}\n\n//#endregion\nexport { extractIssueId, parseIssueId, parseIssueParams };\n//# sourceMappingURL=issue-helpers-0Dnme3Ym.js.map","//#region src/internal/code-location.ts\n/** Formats a verified source location for the issue-details response. */\nfunction formatCodeLocation(codeLocation) {\n\tconst output = [\"## Code Location\", \"\"];\n\tif (codeLocation.repository) output.push(`**Repository**: ${codeLocation.repository}`);\n\tif (codeLocation.path) output.push(`**Path**: ${codeLocation.path}`);\n\tif (codeLocation.line !== void 0) output.push(`**Line**: ${codeLocation.line}`);\n\toutput.push(`**Source**: ${codeLocation.url}`, \"\");\n\treturn `${output.join(\"\\n\")}\\n`;\n}\n/** Selects Sentry's most relevant application frame: the last in-app frame. */\nfunction findMostRelevantInAppFrame(frames) {\n\treturn frames.findLast((frame) => frame.inApp === true);\n}\n\n//#endregion\nexport { findMostRelevantInAppFrame, formatCodeLocation };\n//# sourceMappingURL=code-location-DW_YNpMG.js.map","import { z } from \"zod\";\n\n//#region src/internal/tool-helpers/seer.ts\nconst SEER_POLLING_INTERVAL = 5e3;\nconst SEER_TIMEOUT = 5 * 60 * 1e3;\nconst SEER_MAX_RETRIES = 3;\nconst SEER_INITIAL_RETRY_DELAY = 1e3;\n/**\n* Seer Autofix only supports error-style issues today. Metric alert issues\n* (issueCategory \"metric\" / issueType \"metric_issue\") are not supported.\n*/\nfunction isSeerSupportedIssue(issue) {\n\tif (issue.issueCategory === \"metric\") return false;\n\tif (issue.issueType === \"metric_issue\") return false;\n\treturn true;\n}\n/**\n* Format user-facing guidance when Seer cannot analyze the issue type.\n*/\nfunction getSeerUnsupportedIssueMessage(issue) {\n\tconst category = issue.issueCategory ?? \"metric\";\n\tconst typeLabel = issue.issueType ?? category;\n\treturn [\n\t\t`# Seer Analysis Not Available for Issue ${issue.shortId}`,\n\t\t\"\",\n\t\t`Seer Autofix does not support **${typeLabel}** issues (${category} category).`,\n\t\t\"\",\n\t\t\"**Suggested alternatives:**\",\n\t\t\"- Use `get_issue_details` or `get_sentry_resource` to inspect the metric alert rule and threshold details\",\n\t\t\"- Use `search_issues` to find related error issues that may explain the metric spike\",\n\t\t\"- Use `search_events` to query the underlying metric data\"\n\t].join(\"\\n\");\n}\nfunction getStatusDisplayName(status) {\n\tswitch (status) {\n\t\tcase \"completed\": return \"Complete\";\n\t\tcase \"error\": return \"Failed\";\n\t\tcase \"awaiting_user_input\": return \"Waiting for Response\";\n\t\tcase \"processing\": return \"Processing\";\n\t\tdefault: return status;\n\t}\n}\n/**\n* Check if an autofix status is terminal (no more updates expected)\n*/\nfunction isTerminalStatus(status) {\n\treturn [\n\t\t\"completed\",\n\t\t\"error\",\n\t\t\"awaiting_user_input\"\n\t].includes(status);\n}\n/**\n* Check if an autofix status requires human intervention\n*/\nfunction isHumanInterventionStatus(status) {\n\treturn status === \"awaiting_user_input\";\n}\n/**\n* Get guidance message for human intervention states\n*/\nfunction getHumanInterventionGuidance(status) {\n\tif (status === \"awaiting_user_input\") return \"\\nSeer is waiting for your response to proceed. Please review the analysis and provide feedback.\\n\";\n\treturn \"\";\n}\nfunction escapeXmlAttribute(value) {\n\treturn String(value).replace(/&/g, \"&amp;\").replace(/\"/g, \"&quot;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\");\n}\nfunction wrapSeerAnalysisOutput({ output, runId, step, includeProvenanceTags }) {\n\tif (!includeProvenanceTags) return `${output.trimEnd()}\\n`;\n\tconst attrs = [runId === void 0 ? null : `run_id=\"${escapeXmlAttribute(runId)}\"`, `step=\"${escapeXmlAttribute(step)}\"`].filter(Boolean);\n\treturn `<seer_analysis ${attrs.join(\" \")}>\\n${output.trimEnd()}\\n</seer_analysis>\\n`;\n}\nconst RootCauseArtifactDataSchema = z.object({\n\tone_line_description: z.string().optional(),\n\tfive_whys: z.array(z.string()).default([]),\n\treproduction_steps: z.array(z.string()).default([])\n});\nconst SolutionArtifactDataSchema = z.object({\n\tone_line_summary: z.string().optional(),\n\tsteps: z.array(z.object({\n\t\ttitle: z.string().default(\"\"),\n\t\tdescription: z.string().default(\"\")\n\t})).default([])\n});\n/**\n* Collect the latest artifact data for each key across the run's blocks,\n* mirroring `SeerRunState.get_artifacts()` in getsentry/sentry.\n*/\nfunction getAutofixArtifacts(autofix) {\n\tconst artifacts = {};\n\tfor (const block of autofix.blocks) for (const artifact of block.artifacts) if (artifact.data) artifacts[artifact.key] = artifact.data;\n\treturn artifacts;\n}\nfunction formatRootCauseArtifact(data) {\n\tconst parsed = RootCauseArtifactDataSchema.safeParse(data);\n\tif (!parsed.success) return null;\n\tconst { one_line_description, five_whys, reproduction_steps } = parsed.data;\n\tconst sections = [];\n\tif (one_line_description) sections.push(one_line_description);\n\tif (five_whys.length > 0) sections.push(five_whys.map((why, i) => `${i + 1}. ${why}`).join(\"\\n\"));\n\tif (reproduction_steps.length > 0) sections.push(reproduction_steps.map((step) => `- ${step}`).join(\"\\n\"));\n\treturn sections.length > 0 ? sections.join(\"\\n\\n\") : null;\n}\nfunction formatSolutionArtifact(data) {\n\tconst parsed = SolutionArtifactDataSchema.safeParse(data);\n\tif (!parsed.success) return null;\n\tconst { one_line_summary, steps } = parsed.data;\n\tconst sections = [];\n\tif (one_line_summary) sections.push(one_line_summary);\n\tif (steps.length > 0) sections.push(steps.map((step) => `- **${step.title}**: ${step.description}`).join(\"\\n\"));\n\treturn sections.length > 0 ? sections.join(\"\\n\\n\") : null;\n}\n/**\n* Render the analysis content of an agent-based autofix run: the root cause\n* and solution artifacts, plus links to any pull requests the run created.\n*/\nfunction getOutputForAutofixRun(autofix, options = {}) {\n\tconst includeProvenanceTags = options.includeProvenanceTags ?? true;\n\tconst artifacts = getAutofixArtifacts(autofix);\n\tlet output = \"\";\n\tconst rootCause = formatRootCauseArtifact(artifacts.root_cause);\n\tif (rootCause) {\n\t\toutput += wrapSeerAnalysisOutput({\n\t\t\toutput: `## Root Cause Analysis\\n\\n${rootCause}`,\n\t\t\trunId: autofix.run_id,\n\t\t\tstep: \"root_cause\",\n\t\t\tincludeProvenanceTags\n\t\t});\n\t\toutput += \"\\n\";\n\t}\n\tconst solution = formatSolutionArtifact(artifacts.solution);\n\tif (solution) {\n\t\toutput += wrapSeerAnalysisOutput({\n\t\t\toutput: `## Proposed Solution\\n\\n${solution}`,\n\t\t\trunId: autofix.run_id,\n\t\t\tstep: \"solution\",\n\t\t\tincludeProvenanceTags\n\t\t});\n\t\toutput += \"\\n\";\n\t}\n\tconst prLinks = Object.entries(autofix.repo_pr_states ?? {}).filter(([, prState]) => prState.pr_url).map(([repoName, prState]) => `- ${repoName}: ${prState.pr_url}`);\n\tif (prLinks.length > 0) output += `## Pull Requests\\n\\n${prLinks.join(\"\\n\")}\\n`;\n\treturn output;\n}\n/**\n* One-line root cause and solution summaries from the run's artifacts, for\n* compact displays like the issue-details Seer section.\n*/\nfunction getAutofixArtifactSummaries(autofix) {\n\tconst artifacts = getAutofixArtifacts(autofix);\n\tconst rootCause = RootCauseArtifactDataSchema.safeParse(artifacts.root_cause);\n\tconst solution = SolutionArtifactDataSchema.safeParse(artifacts.solution);\n\treturn {\n\t\trootCause: rootCause.success && rootCause.data.one_line_description || null,\n\t\tsolution: solution.success && solution.data.one_line_summary || null\n\t};\n}\n/**\n* The agent's currently in-progress todo, used as a progress indicator while\n* a run is processing.\n*/\nfunction getActiveAutofixTodo(autofix) {\n\tfor (let i = autofix.blocks.length - 1; i >= 0; i--) {\n\t\tconst todos = autofix.blocks[i].todos;\n\t\tif (!todos?.length) continue;\n\t\tconst active = todos.find((todo) => todo.status === \"in_progress\");\n\t\treturn active ? active.content : null;\n\t}\n\treturn null;\n}\n\n//#endregion\nexport { SEER_INITIAL_RETRY_DELAY, SEER_MAX_RETRIES, SEER_POLLING_INTERVAL, SEER_TIMEOUT, getActiveAutofixTodo, getAutofixArtifactSummaries, getHumanInterventionGuidance, getOutputForAutofixRun, getSeerUnsupportedIssueMessage, getStatusDisplayName, isHumanInterventionStatus, isSeerSupportedIssue, isTerminalStatus };\n//# sourceMappingURL=seer-BoTKAK7k.js.map","import { isPlainObject } from \"./type-guards-DHLAzjf2.js\";\n\n//#region src/internal/user-formatting.ts\nfunction formatUserGeoSummary(value) {\n\tif (!isPlainObject(value)) return null;\n\tconst parts = [\n\t\tvalue.country_code,\n\t\tvalue.city,\n\t\tvalue.region,\n\t\tvalue.country_name\n\t].filter((part) => typeof part === \"string\" && part.length > 0);\n\tif (parts.length === 0) return null;\n\treturn Array.from(new Set(parts)).join(\", \");\n}\n\n//#endregion\nexport { formatUserGeoSummary };\n//# sourceMappingURL=user-formatting-BrX0Xi05.js.map","import { logIssue } from \"./logging-B7X3yL0T.js\";\nimport { ThreadsEntrySchema } from \"./schema-BYZYkgA1.js\";\nimport { isPlainObject } from \"./type-guards-DHLAzjf2.js\";\nimport { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { formatAIConversationActionInstructions } from \"./ai-conversation-actions-rbKawWyG.js\";\nimport { findMostRelevantInAppFrame, formatCodeLocation } from \"./code-location-DW_YNpMG.js\";\nimport { getAutofixArtifactSummaries, getStatusDisplayName, isTerminalStatus } from \"./seer-BoTKAK7k.js\";\nimport { formatUserGeoSummary } from \"./user-formatting-BrX0Xi05.js\";\n\n//#region src/internal/formatting.ts\n/**\n* Convert Seer fixability score to actionability label.\n* Thresholds match Sentry core: src/sentry/seer/autofix/constants.py\n*/\nfunction getSeerActionabilityLabel(score) {\n\tif (score > .76) return \"super_high\";\n\tif (score > .66) return \"high\";\n\tif (score > .4) return \"medium\";\n\tif (score > .25) return \"low\";\n\treturn \"super_low\";\n}\nconst LANGUAGE_EXTENSIONS = {\n\t\".java\": \"java\",\n\t\".py\": \"python\",\n\t\".js\": \"javascript\",\n\t\".jsx\": \"javascript\",\n\t\".ts\": \"javascript\",\n\t\".tsx\": \"javascript\",\n\t\".rb\": \"ruby\",\n\t\".php\": \"php\"\n};\nconst LANGUAGE_MODULE_PATTERNS = [[/^(java\\.|com\\.|org\\.)/, \"java\"]];\n/**\n* Detects the programming language of a stack frame based on the file extension.\n* Falls back to the platform parameter if no filename is available or extension is unrecognized.\n*\n* @param frame - The stack frame containing file and location information\n* @param platform - Optional platform hint to use as fallback\n* @returns The detected language or platform fallback or \"unknown\"\n*/\nfunction detectLanguage(frame, platform) {\n\tif (frame.filename) {\n\t\tconst ext = frame.filename.toLowerCase().match(/\\.[^.]+$/)?.[0];\n\t\tif (ext && LANGUAGE_EXTENSIONS[ext]) return LANGUAGE_EXTENSIONS[ext];\n\t}\n\tif (frame.module) {\n\t\tfor (const [pattern, language] of LANGUAGE_MODULE_PATTERNS) if (pattern.test(frame.module)) return language;\n\t}\n\treturn platform || \"unknown\";\n}\n/**\n* Formats a stack frame into a language-specific string representation.\n* Different languages have different conventions for displaying stack traces.\n*\n* @param frame - The stack frame to format\n* @param frameIndex - Optional frame index for languages that display frame numbers\n* @param platform - Optional platform hint for language detection fallback\n* @returns Formatted stack frame string\n*/\nfunction formatFrameHeader(frame, frameIndex, platform) {\n\tconst language = detectLanguage(frame, platform);\n\tswitch (language) {\n\t\tcase \"java\": {\n\t\t\tconst className = frame.module || \"UnknownClass\";\n\t\t\tconst method = frame.function || \"<unknown>\";\n\t\t\tconst source = frame.filename || \"Unknown Source\";\n\t\t\tconst location = frame.lineNo ? `:${frame.lineNo}` : \"\";\n\t\t\treturn `at ${className}.${method}(${source}${location})`;\n\t\t}\n\t\tcase \"python\": {\n\t\t\tconst file = frame.filename || frame.absPath || frame.module || \"<unknown>\";\n\t\t\tconst func = frame.function || \"<module>\";\n\t\t\tconst line = frame.lineNo ? `, line ${frame.lineNo}` : \"\";\n\t\t\treturn `  File \"${file}\"${line}, in ${func}`;\n\t\t}\n\t\tcase \"javascript\": return `${[\n\t\t\tframe.filename,\n\t\t\tframe.lineNo,\n\t\t\tframe.colNo\n\t\t].filter((i) => !!i).join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n\t\tcase \"ruby\": {\n\t\t\tconst file = frame.filename || frame.module || \"<unknown>\";\n\t\t\tconst func = frame.function ? ` \\`${frame.function}\\`` : \"\";\n\t\t\tconst line = frame.lineNo ? `:${frame.lineNo}:in` : \"\";\n\t\t\treturn `    from ${file}${line}${func}`;\n\t\t}\n\t\tcase \"php\": {\n\t\t\tconst file = frame.filename || \"<unknown>\";\n\t\t\tconst line = frame.lineNo ? `(${frame.lineNo})` : \"\";\n\t\t\tconst func = frame.function || \"<unknown>\";\n\t\t\tconst prefix = frameIndex !== void 0 ? `#${frameIndex} ` : \"\";\n\t\t\treturn `${prefix}${file}${line}: ${func}()`;\n\t\t}\n\t\tdefault: {\n\t\t\tconst func = frame.function || \"<unknown>\";\n\t\t\tconst location = frame.filename || frame.module || \"<unknown>\";\n\t\t\tconst line = frame.lineNo ? `:${frame.lineNo}` : \"\";\n\t\t\tconst col = frame.colNo != null ? `:${frame.colNo}` : \"\";\n\t\t\treturn `    at ${func} (${location}${line}${col})`;\n\t\t}\n\t}\n}\n/**\n* Formats a Sentry event into a structured markdown output.\n* Includes error messages, stack traces, request info, and contextual data.\n*\n* @param event - The Sentry event to format\n* @param options - Additional formatting context\n* @returns Formatted markdown string\n*/\nfunction formatEventOutput(event, options) {\n\tlet output = \"\";\n\tconst eventUser = event.user;\n\tconst eventWithReplayMetadataStripped = options?.replaySummary ? stripReplayMetadata(event) : event;\n\tconst eventToRender = eventWithReplayMetadataStripped;\n\tif (options?.replaySummary) output += formatIssueReplayOutput({\n\t\tapiService: options.replaySummary.apiService,\n\t\torganizationSlug: options.replaySummary.organizationSlug,\n\t\tevent,\n\t\trelatedReplayIds: options.replaySummary.relatedReplayIds,\n\t\texperimentalMode: options.replaySummary.experimentalMode ?? false,\n\t\tavailableToolNames: options.replaySummary.availableToolNames,\n\t\tdirectToolNames: options.replaySummary.directToolNames\n\t});\n\tif (!eventToRender.entries || !Array.isArray(eventToRender.entries)) {\n\t\toutput += formatEventUser(eventUser);\n\t\toutput += formatTags(eventToRender.tags);\n\t\toutput += formatContext(eventToRender.context);\n\t\toutput += formatContexts(eventToRender.contexts);\n\t\treturn output;\n\t}\n\tconst messageEntry = eventToRender.entries.find((e) => e.type === \"message\");\n\tconst exceptionEntry = eventToRender.entries.find((e) => e.type === \"exception\");\n\tconst threadsEntry = eventToRender.entries.find((e) => e.type === \"threads\");\n\tconst threadsData = threadsEntry ? parseThreadsEntryData(threadsEntry.data) : void 0;\n\tconst requestEntry = eventToRender.entries.find((e) => e.type === \"request\");\n\tconst spansEntry = eventToRender.entries.find((e) => e.type === \"spans\");\n\tconst cspEntry = eventToRender.entries.find((e) => e.type === \"csp\");\n\tif (messageEntry) output += formatMessageInterfaceOutput(eventToRender, messageEntry.data);\n\tif (exceptionEntry) output += formatExceptionInterfaceOutput(eventToRender, exceptionEntry.data);\n\telse if (threadsData) output += formatThreadsInterfaceOutput(eventToRender, threadsData);\n\tif (threadsData?.values && threadsData.values.length > 1) {\n\t\toutput += formatThreadList(threadsData.values);\n\t\toutput += \"\\n\";\n\t}\n\tif (requestEntry) output += formatRequestInterfaceOutput(eventToRender, requestEntry.data);\n\tif (cspEntry) output += formatCspInterfaceOutput(eventToRender, cspEntry.data);\n\tif (eventToRender.type === \"transaction\") output += formatPerformanceIssueOutput(eventToRender, spansEntry?.data, options);\n\tif (eventToRender.type === \"generic\") output += formatGenericEventOutput(eventToRender);\n\toutput += formatEventUser(eventUser);\n\toutput += formatTags(eventToRender.tags);\n\toutput += formatContext(eventToRender.context);\n\toutput += formatContexts(eventToRender.contexts);\n\treturn output;\n}\n/**\n* Extracts the context line matching the frame's line number for inline display.\n* This is used in the full stacktrace view to show the actual line of code\n* that caused the error inline with the stack frame.\n*\n* @param frame - The stack frame containing context lines\n* @returns The line of code at the frame's line number, or empty string if not available\n*/\nfunction renderInlineContext(frame) {\n\tif (!frame.context?.length || !frame.lineNo) return \"\";\n\tconst contextLine = frame.context.find(([lineNo]) => lineNo === frame.lineNo);\n\treturn contextLine ? `\\n${contextLine[1]}` : \"\";\n}\n/**\n* Renders an enhanced view of a stack frame with context lines and variables.\n* Used for the \"Most Relevant Frame\" section to provide detailed information\n* about the most relevant application frame where the error occurred.\n*\n* @param frame - The stack frame to render with enhanced information\n* @param event - The Sentry event containing platform information for language detection\n* @returns Formatted string with frame header, context lines, and variables table\n*/\nfunction renderEnhancedFrame(frame, event) {\n\tconst parts = [];\n\tparts.push(\"**Most Relevant Frame:**\");\n\tparts.push(\"─────────────────────\");\n\tparts.push(formatFrameHeader(frame, void 0, event.platform));\n\tif (frame.context?.length) {\n\t\tconst contextLines = renderContextLines(frame);\n\t\tif (contextLines) {\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(contextLines);\n\t\t}\n\t}\n\tif (frame.vars && Object.keys(frame.vars).length > 0) {\n\t\tparts.push(\"\");\n\t\tparts.push(renderVariablesTable(frame.vars));\n\t}\n\treturn parts.join(\"\\n\");\n}\nfunction formatExceptionInterfaceOutput(event, data) {\n\tconst parts = [];\n\tconst exceptions = data.values || (data.value ? [data.value] : []);\n\tif (exceptions.length === 0) return \"\";\n\tconst isChained = exceptions.length > 1;\n\t[...exceptions].reverse().forEach((exception, index) => {\n\t\tif (!exception) return;\n\t\tif (isChained && index > 0) {\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(getExceptionChainMessage(event.platform || null, index, exceptions.length));\n\t\t\tparts.push(\"\");\n\t\t}\n\t\tconst exceptionTitle = `${exception.type}${exception.value ? `: ${exception.value}` : \"\"}`;\n\t\tparts.push(index === 0 ? \"### Error\" : `### ${exceptionTitle}`);\n\t\tparts.push(\"\");\n\t\tif (index === 0) {\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(exceptionTitle);\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(\"\");\n\t\t}\n\t\tif (!exception.stacktrace || !exception.stacktrace.frames) {\n\t\t\tparts.push(\"**Stacktrace:**\");\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(\"No stacktrace available\");\n\t\t\tparts.push(\"```\");\n\t\t\treturn;\n\t\t}\n\t\tconst frames = exception.stacktrace.frames;\n\t\tif (index === 0) {\n\t\t\tconst relevantFrame = findMostRelevantInAppFrame(frames);\n\t\t\tif (relevantFrame && (relevantFrame.context?.length || relevantFrame.vars)) {\n\t\t\t\tparts.push(renderEnhancedFrame(relevantFrame, event));\n\t\t\t\tparts.push(\"\");\n\t\t\t\tparts.push(\"**Full Stacktrace:**\");\n\t\t\t\tparts.push(\"────────────────\");\n\t\t\t} else parts.push(\"**Stacktrace:**\");\n\t\t} else parts.push(\"**Stacktrace:**\");\n\t\tparts.push(\"```\");\n\t\tparts.push(frames.map((frame) => {\n\t\t\tconst header = formatFrameHeader(frame, void 0, event.platform);\n\t\t\tconst context = renderInlineContext(frame);\n\t\t\treturn `${header}${context}`;\n\t\t}).join(\"\\n\"));\n\t\tparts.push(\"```\");\n\t});\n\tparts.push(\"\");\n\tparts.push(\"\");\n\treturn parts.join(\"\\n\");\n}\n/**\n* Get the appropriate exception chain message based on the platform\n*/\nfunction getExceptionChainMessage(platform, index, totalExceptions) {\n\tconst defaultMessage = \"**During handling of the above exception, another exception occurred:**\";\n\tif (!platform) return defaultMessage;\n\tswitch (platform.toLowerCase()) {\n\t\tcase \"python\": return \"**During handling of the above exception, another exception occurred:**\";\n\t\tcase \"java\": return \"**Caused by:**\";\n\t\tcase \"csharp\":\n\t\tcase \"dotnet\": return \"**---> Inner Exception:**\";\n\t\tcase \"ruby\": return \"**Caused by:**\";\n\t\tcase \"go\": return \"**Wrapped error:**\";\n\t\tcase \"rust\": return `**Caused by (${index}):**`;\n\t\tdefault: return defaultMessage;\n\t}\n}\nfunction formatCspInterfaceOutput(event, data) {\n\tif (!data) return \"\";\n\tconst parts = [];\n\tparts.push(\"### CSP Violation\");\n\tparts.push(\"\");\n\tif (data.blocked_uri) parts.push(`**Blocked URI**: ${data.blocked_uri}`);\n\tif (data.violated_directive) parts.push(`**Violated Directive**: ${data.violated_directive}`);\n\tif (data.effective_directive) parts.push(`**Effective Directive**: ${data.effective_directive}`);\n\tif (data.document_uri) parts.push(`**Document URI**: ${data.document_uri}`);\n\tif (data.source_file) {\n\t\tparts.push(`**Source File**: ${data.source_file}`);\n\t\tif (data.line_number) parts.push(`**Line Number**: ${data.line_number}`);\n\t}\n\tif (data.disposition) parts.push(`**Disposition**: ${data.disposition}`);\n\tif (data.original_policy) {\n\t\tparts.push(\"\");\n\t\tparts.push(\"**Original Policy:**\");\n\t\tparts.push(\"```\");\n\t\tparts.push(data.original_policy);\n\t\tparts.push(\"```\");\n\t}\n\tparts.push(\"\");\n\tparts.push(\"\");\n\treturn parts.join(\"\\n\");\n}\nfunction formatRequestInterfaceOutput(event, data) {\n\tif (!data.method || !data.url) return \"\";\n\treturn `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\nfunction formatMessageInterfaceOutput(event, data) {\n\tif (!data.formatted && !data.message) return \"\";\n\tconst message = data.formatted || data.message || \"\";\n\treturn `### Error\\n\\n\\`\\`\\`\\n${message}\\n\\`\\`\\`\\n\\n`;\n}\nfunction formatThreadsInterfaceOutput(event, data) {\n\tif (!data.values || data.values.length === 0) return \"\";\n\tconst crashedThread = data.values.find((t) => t.crashed);\n\tif (!crashedThread?.stacktrace?.frames) return \"\";\n\tconst parts = [];\n\tif (crashedThread.name) {\n\t\tparts.push(`**Thread** (${crashedThread.name})`);\n\t\tparts.push(\"\");\n\t}\n\tconst frames = crashedThread.stacktrace.frames;\n\tconst relevantFrame = findMostRelevantInAppFrame(frames);\n\tif (relevantFrame && (relevantFrame.context?.length || relevantFrame.vars)) {\n\t\tparts.push(renderEnhancedFrame(relevantFrame, event));\n\t\tparts.push(\"\");\n\t\tparts.push(\"**Full Stacktrace:**\");\n\t\tparts.push(\"────────────────\");\n\t} else parts.push(\"**Stacktrace:**\");\n\tparts.push(\"```\");\n\tparts.push(frames.map((frame) => {\n\t\tconst header = formatFrameHeader(frame, void 0, event.platform);\n\t\tconst context = renderInlineContext(frame);\n\t\treturn `${header}${context}`;\n\t}).join(\"\\n\"));\n\tparts.push(\"```\");\n\tparts.push(\"\");\n\treturn parts.join(\"\\n\");\n}\nfunction getThreadDisplayValue(value) {\n\tif (value === null || value === void 0 || value === \"\") return \"-\";\n\treturn String(value);\n}\nfunction getThreadFlags(thread) {\n\tconst flags = [];\n\tif (thread.crashed) flags.push(\"crashed\");\n\tif (thread.current) flags.push(\"current\");\n\treturn flags.length > 0 ? flags.join(\", \") : \"-\";\n}\nfunction formatThreadList(threads) {\n\treturn [\n\t\t\"### Threads\",\n\t\t\"\",\n\t\t`Found ${threads.length} thread${threads.length === 1 ? \"\" : \"s\"} in this event.`,\n\t\t\"\",\n\t\t...formatThreadTable(threads),\n\t\t\"\"\n\t].join(\"\\n\");\n}\nfunction formatThreadTable(threads) {\n\treturn [\n\t\t\"| Thread ID | Name | State | Flags | Frames |\",\n\t\t\"| --- | --- | --- | --- | ---: |\",\n\t\t...threads.map((thread) => {\n\t\t\tconst frameCount = thread.stacktrace?.frames?.length ?? 0;\n\t\t\treturn `| ${getThreadDisplayValue(thread.id)} | ${getThreadDisplayValue(thread.name)} | ${getThreadDisplayValue(thread.state)} | ${getThreadFlags(thread)} | ${frameCount} |`;\n\t\t})\n\t];\n}\nfunction formatAvailableThreadList(threads) {\n\treturn [\n\t\t\"## Available Threads\",\n\t\t\"\",\n\t\t...formatThreadTable(threads),\n\t\t\"\",\n\t\t\"Pass `thread` as a numeric Thread ID or exact thread Name.\"\n\t].join(\"\\n\");\n}\nfunction parseThreadsEntryData(data) {\n\tconst result = ThreadsEntrySchema.safeParse(data);\n\treturn result.success ? result.data : void 0;\n}\n/**\n* Formats the selected thread stacktrace using the same frame rendering\n* conventions as issue event details.\n*/\nfunction formatThreadStacktraceOutput({ event, thread, selectionReason }) {\n\tconst parts = [];\n\tparts.push(\"## Selected Thread\");\n\tparts.push(\"\");\n\tparts.push(`**Selection**: ${selectionReason}`);\n\tparts.push(`**Thread ID**: ${getThreadDisplayValue(thread.id)}`);\n\tparts.push(`**Name**: ${getThreadDisplayValue(thread.name)}`);\n\tparts.push(`**State**: ${getThreadDisplayValue(thread.state)}`);\n\tparts.push(`**Crashed**: ${getThreadDisplayValue(thread.crashed)}`);\n\tparts.push(`**Current**: ${getThreadDisplayValue(thread.current)}`);\n\tparts.push(\"\");\n\tconst frames = thread.stacktrace?.frames;\n\tif (!frames || frames.length === 0) {\n\t\tparts.push(\"No stacktrace is available for the selected thread.\");\n\t\tparts.push(\"\");\n\t\treturn parts.join(\"\\n\");\n\t}\n\tparts.push(\"## Stacktrace\");\n\tparts.push(\"\");\n\tconst framesOmitted = formatFramesOmitted(thread.stacktrace?.framesOmitted);\n\tif (framesOmitted) {\n\t\tparts.push(`**Frames Omitted**: ${framesOmitted}`);\n\t\tparts.push(\"\");\n\t}\n\tconst relevantFrame = findMostRelevantInAppFrame(frames);\n\tif (relevantFrame && (relevantFrame.context?.length || relevantFrame.vars)) {\n\t\tparts.push(renderEnhancedFrame(relevantFrame, event));\n\t\tparts.push(\"\");\n\t\tparts.push(\"**Full Stacktrace:**\");\n\t\tparts.push(\"────────────────\");\n\t} else parts.push(\"**Full Stacktrace:**\");\n\tparts.push(\"```\");\n\tparts.push(frames.map((frame) => {\n\t\tconst header = formatFrameHeader(frame, void 0, event.platform);\n\t\tconst context = renderInlineContext(frame);\n\t\treturn `${header}${context}`;\n\t}).join(\"\\n\"));\n\tparts.push(\"```\");\n\tparts.push(\"\");\n\treturn parts.join(\"\\n\");\n}\nfunction formatFramesOmitted(framesOmitted) {\n\tif (!framesOmitted?.length) return null;\n\tconst [firstOmitted, lastOmitted] = framesOmitted;\n\tif (typeof firstOmitted === \"number\" && typeof lastOmitted === \"number\" && Number.isFinite(firstOmitted) && Number.isFinite(lastOmitted)) return String(Math.max(0, lastOmitted - firstOmitted));\n\treturn null;\n}\n/**\n* Renders surrounding source code context for a stack frame.\n* Shows a window of code lines around the error line with visual indicators.\n*\n* @param frame - The stack frame containing context lines\n* @param contextSize - Number of lines to show before and after the error line (default: 3)\n* @returns Formatted context lines with line numbers and arrow indicator for the error line\n*/\nfunction renderContextLines(frame, contextSize = 3) {\n\tif (!frame.context || frame.context.length === 0 || !frame.lineNo) return \"\";\n\tconst lines = [];\n\tconst errorLine = frame.lineNo;\n\tconst maxLineNoWidth = Math.max(...frame.context.map(([lineNo]) => lineNo.toString().length));\n\tfor (const [lineNo, code] of frame.context) {\n\t\tconst isErrorLine = lineNo === errorLine;\n\t\tconst lineNoStr = lineNo.toString().padStart(maxLineNoWidth, \" \");\n\t\tif (Math.abs(lineNo - errorLine) <= contextSize) if (isErrorLine) lines.push(`  → ${lineNoStr} │ ${code}`);\n\t\telse lines.push(`    ${lineNoStr} │ ${code}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats a variable value for display in the variables table.\n* Handles different types appropriately and safely, converting complex objects\n* to readable representations and handling edge cases like circular references.\n*\n* @param value - The variable value to format (can be any type)\n* @param maxLength - Maximum length for stringified objects/arrays (default: 80)\n* @returns Human-readable string representation of the value\n*/\nfunction formatVariableValue(value, maxLength = 80) {\n\ttry {\n\t\tif (typeof value === \"string\") return `\"${value}\"`;\n\t\tif (value === null) return \"null\";\n\t\tif (value === void 0) return \"undefined\";\n\t\tif (typeof value === \"object\") {\n\t\t\tconst stringified = JSON.stringify(value);\n\t\t\tif (stringified.length > maxLength) {\n\t\t\t\tconst truncateAt = maxLength - 6;\n\t\t\t\tlet truncated = stringified.substring(0, truncateAt);\n\t\t\t\tconst lastComma = truncated.lastIndexOf(\",\");\n\t\t\t\tif (lastComma > 0) truncated = truncated.substring(0, lastComma);\n\t\t\t\tif (Array.isArray(value)) return `${truncated}, ...]`;\n\t\t\t\treturn `${truncated}, ...}`;\n\t\t\t}\n\t\t\treturn stringified;\n\t\t}\n\t\treturn String(value);\n\t} catch {\n\t\treturn `<${typeof value}>`;\n\t}\n}\n/**\n* Renders a table of local variables in a tree-like format.\n* Uses box-drawing characters to create a visual hierarchy of variables\n* and their values at the point where the error occurred.\n*\n* @param vars - Object containing variable names as keys and their values\n* @returns Formatted variables table with tree-style prefix characters\n*/\nfunction renderVariablesTable(vars) {\n\tconst entries = Object.entries(vars);\n\tif (entries.length === 0) return \"\";\n\tconst lines = [\"Local Variables:\"];\n\tconst lastIndex = entries.length - 1;\n\tentries.forEach(([key, value], index) => {\n\t\tconst prefix = index === lastIndex ? \"└─\" : \"├─\";\n\t\tconst valueStr = formatVariableValue(value);\n\t\tlines.push(`${prefix} ${key}: ${valueStr}`);\n\t});\n\treturn lines.join(\"\\n\");\n}\n/**\n* Constants for performance issue formatting\n*/\nconst MAX_SPANS_IN_TREE = 10;\n/**\n* Safely parse a number from a string, returning a default if invalid\n*/\nfunction safeParseInt(value, defaultValue) {\n\tif (typeof value === \"number\") return value;\n\tif (typeof value === \"string\") {\n\t\tconst parsed = Number.parseInt(value, 10);\n\t\treturn Number.isNaN(parsed) ? defaultValue : parsed;\n\t}\n\treturn defaultValue;\n}\nfunction normalizeSpanId(value) {\n\tif (typeof value === \"string\" && value) return value;\n\treturn void 0;\n}\nfunction getSpanIdentifier(span) {\n\tif (span.span_id !== void 0) return normalizeSpanId(span.span_id);\n\tif (span.id !== void 0) return normalizeSpanId(span.id);\n\treturn void 0;\n}\nfunction getSpanDurationMs(span) {\n\tif (typeof span.timestamp === \"number\" && typeof span.start_timestamp === \"number\") {\n\t\tconst deltaSeconds = span.timestamp - span.start_timestamp;\n\t\tif (Number.isFinite(deltaSeconds) && deltaSeconds >= 0) return deltaSeconds * 1e3;\n\t}\n\tif (typeof span.duration === \"number\" && Number.isFinite(span.duration)) return span.duration >= 0 ? span.duration : 0;\n\treturn 0;\n}\nfunction normalizeIdArray(values) {\n\tif (!Array.isArray(values)) return [];\n\treturn values.map((value) => normalizeSpanId(value)).filter((value) => value !== void 0);\n}\nfunction isValidSpanArray(value) {\n\treturn Array.isArray(value);\n}\n/**\n* Get the repeating span descriptions from evidence data.\n* Prefers repeatingSpansCompact (more concise) over repeatingSpans (verbose).\n*/\nfunction getRepeatingSpanLines(evidenceData) {\n\tif (Array.isArray(evidenceData.repeatingSpansCompact) && evidenceData.repeatingSpansCompact.length > 0) return evidenceData.repeatingSpansCompact.map((s) => typeof s === \"string\" ? s.trim() : \"\").filter((s) => s.length > 0);\n\tif (Array.isArray(evidenceData.repeatingSpans) && evidenceData.repeatingSpans.length > 0) return evidenceData.repeatingSpans.map((s) => typeof s === \"string\" ? s.trim() : \"\").filter((s) => s.length > 0);\n\treturn [];\n}\nfunction isTraceSpan(node) {\n\tif (node === null || typeof node !== \"object\") return false;\n\tconst candidate = node;\n\treturn candidate.event_type === \"span\" && typeof candidate.event_id === \"string\";\n}\nfunction buildTraceSpanTree(trace, parentSpanIds, offenderSpanIds, maxSpans) {\n\tconst offenderSet = new Set(offenderSpanIds);\n\tconst spanMap = /* @__PURE__ */ new Map();\n\tfunction indexSpan(span) {\n\t\tconst spanId = normalizeSpanId(span.additional_attributes?.span_id) || span.event_id;\n\t\tif (spanId && spanId.length > 0) spanMap.set(spanId, span);\n\t\tfor (const child of span.children ?? []) if (isTraceSpan(child)) indexSpan(child);\n\t}\n\tfor (const node of trace) if (isTraceSpan(node)) indexSpan(node);\n\tconst roots = [];\n\tconst budget = {\n\t\tcount: 0,\n\t\tlimit: maxSpans\n\t};\n\tfor (const parentId of parentSpanIds) {\n\t\tconst span = spanMap.get(parentId);\n\t\tif (!span) continue;\n\t\tconst perfSpan = convertTraceSpanToPerformanceSpan(span, offenderSet, budget, 0);\n\t\tif (perfSpan) roots.push(perfSpan);\n\t\tif (budget.count >= budget.limit) break;\n\t}\n\tif (roots.length === 0 && offenderSpanIds.length > 0) for (const offenderId of offenderSpanIds) {\n\t\tconst span = spanMap.get(offenderId);\n\t\tif (!span) continue;\n\t\tconst perfSpan = convertTraceSpanToPerformanceSpan(span, offenderSet, budget, 0);\n\t\tif (perfSpan) roots.push(perfSpan);\n\t\tif (budget.count >= budget.limit) break;\n\t}\n\tif (roots.length === 0) return [];\n\treturn renderPerformanceSpanTree(roots);\n}\nfunction convertTraceSpanToPerformanceSpan(span, offenderSet, budget, level) {\n\tif (budget.count >= budget.limit) return null;\n\tbudget.count += 1;\n\tconst spanId = normalizeSpanId(span.additional_attributes?.span_id) || span.event_id;\n\tconst performanceSpan = {\n\t\tspan_id: spanId,\n\t\top: span.op || \"unknown\",\n\t\tdescription: formatTraceSpanDescription(span),\n\t\tduration: getTraceSpanDurationMs(span),\n\t\tis_n1_query: offenderSet.has(spanId),\n\t\tchildren: [],\n\t\tlevel\n\t};\n\tfor (const child of span.children ?? []) {\n\t\tif (!isTraceSpan(child)) continue;\n\t\tif (budget.count >= budget.limit) break;\n\t\tconst childSpan = convertTraceSpanToPerformanceSpan(child, offenderSet, budget, level + 1);\n\t\tif (childSpan) performanceSpan.children.push(childSpan);\n\t\tif (budget.count >= budget.limit) break;\n\t}\n\treturn performanceSpan;\n}\nfunction formatTraceSpanDescription(span) {\n\tif (span.name && span.name.trim().length > 0) return span.name.trim();\n\tif (span.description && span.description.trim().length > 0) return span.description.trim();\n\tif (span.op && span.op.trim().length > 0) return span.op.trim();\n\treturn \"unnamed\";\n}\nfunction getTraceSpanDurationMs(span) {\n\tif (typeof span.duration === \"number\" && span.duration >= 0) return span.duration;\n\tif (typeof span.end_timestamp === \"number\" && typeof span.start_timestamp === \"number\") {\n\t\tconst deltaSeconds = span.end_timestamp - span.start_timestamp;\n\t\tif (Number.isFinite(deltaSeconds) && deltaSeconds >= 0) return deltaSeconds * 1e3;\n\t}\n\treturn 0;\n}\nfunction buildOffenderSummaries(spans, offenderSpanIds) {\n\tif (offenderSpanIds.length === 0) return [];\n\tconst spanMap = /* @__PURE__ */ new Map();\n\tfor (const span of spans) {\n\t\tconst identifier = getSpanIdentifier(span);\n\t\tif (identifier) spanMap.set(identifier, span);\n\t}\n\tconst summaries = [];\n\tfor (const offenderId of offenderSpanIds) {\n\t\tconst span = spanMap.get(offenderId);\n\t\tif (span) {\n\t\t\tconst description = span.description || span.op || `Span ${offenderId}`;\n\t\t\tconst duration = getSpanDurationMs(span);\n\t\t\tconst durationLabel = duration > 0 ? ` (${Math.round(duration)}ms)` : \"\";\n\t\t\tsummaries.push(`${description}${durationLabel} [${offenderId}] [N+1]`);\n\t\t} else summaries.push(`Span ${offenderId} [N+1]`);\n\t}\n\treturn summaries;\n}\n/**\n* Renders a hierarchical tree of performance spans using box-drawing characters.\n* Highlights N+1 queries with a special indicator.\n*\n* @param spans - Array of selected performance spans\n* @returns Array of formatted strings representing the tree\n*/\nfunction renderPerformanceSpanTree(spans) {\n\tconst lines = [];\n\tfunction renderSpan(span, prefix = \"\", isLast = true) {\n\t\tconst connector = prefix === \"\" ? \"\" : isLast ? \"└─ \" : \"├─ \";\n\t\tconst displayName = span.description?.trim() || span.op || \"unnamed\";\n\t\tconst spanId = span.span_id ?? \"unknown\";\n\t\tconst durationDisplay = span.duration > 0 ? `${Math.round(span.duration)}ms` : \"unknown\";\n\t\tconst metadataParts = [];\n\t\tif (span.op && span.op !== \"default\") metadataParts.push(span.op);\n\t\tmetadataParts.push(durationDisplay, spanId);\n\t\tconst line = `${prefix}${connector}${displayName} [${metadataParts.join(\" · \")}]${span.is_n1_query ? \" [N+1]\" : \"\"}`;\n\t\tlines.push(line);\n\t\tfor (let i = 0; i < span.children.length; i++) {\n\t\t\tconst child = span.children[i];\n\t\t\tconst isLastChild = i === span.children.length - 1;\n\t\t\tconst childPrefix = prefix + (isLast ? \"   \" : \"│  \");\n\t\t\trenderSpan(child, childPrefix, isLastChild);\n\t\t}\n\t}\n\tfor (let i = 0; i < spans.length; i++) {\n\t\tconst span = spans[i];\n\t\tconst isLastRoot = i === spans.length - 1;\n\t\trenderSpan(span, \"\", isLastRoot);\n\t}\n\treturn lines;\n}\nfunction selectN1QuerySpans(spans, evidence, maxSpans = MAX_SPANS_IN_TREE) {\n\tconst selected = [];\n\tlet spanCount = 0;\n\tconst offenderSpanIds = normalizeIdArray(evidence.offenderSpanIds);\n\tconst parentSpanIds = normalizeIdArray(evidence.parentSpanIds);\n\tlet parentSpan = null;\n\tif (parentSpanIds.length > 0) {\n\t\tconst parent = spans.find((span) => {\n\t\t\tconst identifier = getSpanIdentifier(span);\n\t\t\treturn identifier ? parentSpanIds.includes(identifier) : false;\n\t\t});\n\t\tif (parent) {\n\t\t\tparentSpan = {\n\t\t\t\tspan_id: getSpanIdentifier(parent) ?? \"unknown\",\n\t\t\t\top: parent.op || \"unknown\",\n\t\t\t\tdescription: parent.description || evidence.parentSpan || \"Parent Operation\",\n\t\t\t\tduration: getSpanDurationMs(parent),\n\t\t\t\tis_n1_query: false,\n\t\t\t\tchildren: [],\n\t\t\t\tlevel: 0\n\t\t\t};\n\t\t\tselected.push(parentSpan);\n\t\t\tspanCount += 1;\n\t\t}\n\t}\n\tif (offenderSpanIds.length > 0) {\n\t\tconst offenderSet = new Set(offenderSpanIds);\n\t\tconst offenderSpans = spans.filter((span) => {\n\t\t\tconst identifier = getSpanIdentifier(span);\n\t\t\treturn identifier ? offenderSet.has(identifier) : false;\n\t\t}).slice(0, Math.max(0, maxSpans - spanCount));\n\t\tfor (const span of offenderSpans) {\n\t\t\tconst perfSpan = {\n\t\t\t\tspan_id: getSpanIdentifier(span) ?? \"unknown\",\n\t\t\t\top: span.op || \"db.query\",\n\t\t\t\tdescription: span.description || \"Database Query\",\n\t\t\t\tduration: getSpanDurationMs(span),\n\t\t\t\tis_n1_query: true,\n\t\t\t\tchildren: [],\n\t\t\t\tlevel: parentSpan ? 1 : 0\n\t\t\t};\n\t\t\tif (parentSpan) parentSpan.children.push(perfSpan);\n\t\t\telse selected.push(perfSpan);\n\t\t\tspanCount += 1;\n\t\t\tif (spanCount >= maxSpans) break;\n\t\t}\n\t}\n\treturn selected;\n}\n/**\n* Known Sentry performance issue types that we handle.\n*\n* NOTE: We intentionally only implement formatters for high-value performance issues\n* that provide complex insights. Not all issue types need custom formatting - many\n* can rely on the generic evidenceDisplay fields that Sentry provides.\n*\n* Currently fully implemented:\n* - N+1 query detection (DB and API)\n*\n* Partially implemented:\n* - Slow DB queries (shows parent span only)\n*\n* Not implemented (lower priority):\n* - Asset-related issues (render blocking, uncompressed, large payloads)\n* - File I/O issues\n* - Consecutive queries\n*/\nconst KNOWN_PERFORMANCE_ISSUE_TYPES = {\n\tN_PLUS_ONE_DB_QUERIES: \"performance_n_plus_one_db_queries\",\n\tN_PLUS_ONE_API_CALLS: \"performance_n_plus_one_api_calls\",\n\tSLOW_DB_QUERY: \"performance_slow_db_query\",\n\tRENDER_BLOCKING_ASSET: \"performance_render_blocking_asset\",\n\tCONSECUTIVE_DB_QUERIES: \"performance_consecutive_db_queries\",\n\tFILE_IO_MAIN_THREAD: \"performance_file_io_main_thread\",\n\tM_N_PLUS_ONE_DB_QUERIES: \"performance_m_n_plus_one_db_queries\",\n\tUNCOMPRESSED_ASSET: \"performance_uncompressed_asset\",\n\tLARGE_HTTP_PAYLOAD: \"performance_large_http_payload\"\n};\n/**\n* Map numeric occurrence types to issue types (from Sentry's codebase).\n*\n* Sentry uses numeric type IDs internally in the occurrence data structure,\n* but string issue types in the UI and other APIs. This mapping converts\n* between them.\n*\n* Source: sentry/static/app/types/group.tsx in Sentry's codebase\n* Range: 1xxx = transaction-based performance issues\n*        2xxx = profile-based performance issues\n*/\nconst OCCURRENCE_TYPE_TO_ISSUE_TYPE = {\n\t1001: KNOWN_PERFORMANCE_ISSUE_TYPES.SLOW_DB_QUERY,\n\t1004: KNOWN_PERFORMANCE_ISSUE_TYPES.RENDER_BLOCKING_ASSET,\n\t1006: KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_DB_QUERIES,\n\t1906: KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_DB_QUERIES,\n\t1007: KNOWN_PERFORMANCE_ISSUE_TYPES.CONSECUTIVE_DB_QUERIES,\n\t1008: KNOWN_PERFORMANCE_ISSUE_TYPES.FILE_IO_MAIN_THREAD,\n\t1009: \"performance_consecutive_http\",\n\t1010: KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_API_CALLS,\n\t1910: KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_API_CALLS,\n\t1012: KNOWN_PERFORMANCE_ISSUE_TYPES.UNCOMPRESSED_ASSET,\n\t1013: \"performance_db_main_thread\",\n\t1015: KNOWN_PERFORMANCE_ISSUE_TYPES.LARGE_HTTP_PAYLOAD,\n\t1016: \"performance_http_overhead\"\n};\n/**\n* Formats N+1 query issue evidence data.\n*\n* N+1 queries are a common performance anti-pattern where code executes\n* 1 query to get a list of items, then N additional queries (one per item)\n* instead of using a single JOIN or batch query.\n*\n* Evidence fields we use:\n* - parentSpan: The operation that triggered the N+1 queries\n* - repeatingSpansCompact/repeatingSpans: The query pattern being repeated\n* - numberRepeatingSpans: How many times the query was executed\n* - offenderSpanIds: IDs of the actual span instances\n* - parentSpanIds: IDs of parent spans for tree visualization\n*/\nfunction formatN1QueryEvidence(evidenceData, spansData, performanceTrace) {\n\tconst parts = [];\n\tif (evidenceData.parentSpan) {\n\t\tparts.push(\"**Parent Operation:**\");\n\t\tparts.push(`${evidenceData.parentSpan}`);\n\t\tparts.push(\"\");\n\t}\n\tconst repeatingLines = getRepeatingSpanLines(evidenceData);\n\tif (repeatingLines.length > 0) {\n\t\tparts.push(\"### Repeated Database Queries\");\n\t\tparts.push(\"\");\n\t\tconst queryCount = evidenceData.numberRepeatingSpans ? safeParseInt(evidenceData.numberRepeatingSpans, 0) : evidenceData.numPatternRepetitions || evidenceData.offenderSpanIds?.length || 0;\n\t\tif (queryCount > 0) parts.push(`**Query executed ${queryCount} times:**`);\n\t\tif (repeatingLines.length === 1) {\n\t\t\tparts.push(\"```sql\");\n\t\t\tparts.push(repeatingLines[0]);\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(\"\");\n\t\t} else {\n\t\t\tparts.push(\"**Repeated operations:**\");\n\t\t\tfor (const line of repeatingLines) parts.push(`- ${line}`);\n\t\t\tparts.push(\"\");\n\t\t}\n\t}\n\tconst parentSpanIds = normalizeIdArray(evidenceData.parentSpanIds);\n\tconst offenderSpanIds = normalizeIdArray(evidenceData.offenderSpanIds);\n\tconst traceLines = performanceTrace ? buildTraceSpanTree(performanceTrace, parentSpanIds, offenderSpanIds, MAX_SPANS_IN_TREE) : [];\n\tif (traceLines.length > 0) {\n\t\tparts.push(`### Span Tree (Limited to ${MAX_SPANS_IN_TREE} spans)`);\n\t\tparts.push(\"\");\n\t\tparts.push(\"```\");\n\t\tparts.push(...traceLines);\n\t\tparts.push(\"```\");\n\t\tparts.push(\"\");\n\t} else {\n\t\tconst spanTree = isValidSpanArray(spansData) ? selectN1QuerySpans(spansData, evidenceData, MAX_SPANS_IN_TREE) : [];\n\t\tif (spanTree.length > 0) {\n\t\t\tparts.push(`### Span Tree (Limited to ${MAX_SPANS_IN_TREE} spans)`);\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(...renderPerformanceSpanTree(spanTree));\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(\"\");\n\t\t} else if (isValidSpanArray(spansData)) {\n\t\t\tconst offenderSummaries = buildOffenderSummaries(spansData, offenderSpanIds);\n\t\t\tif (offenderSummaries.length > 0) {\n\t\t\t\tparts.push(\"### Offending Spans\");\n\t\t\t\tparts.push(\"\");\n\t\t\t\tfor (const summary of offenderSummaries) parts.push(`- ${summary}`);\n\t\t\t}\n\t\t}\n\t}\n\treturn parts.join(\"\\n\");\n}\n/**\n* Formats slow DB query issue evidence data.\n*\n* Currently only partially implemented - shows parent span information.\n* Full implementation would show query duration, explain plan, etc.\n*\n* This is lower priority as the generic evidenceDisplay fields usually\n* provide sufficient information for slow query issues.\n*/\nfunction formatSlowDbQueryEvidence(evidenceData, spansData) {\n\tconst parts = [];\n\tif (evidenceData.parentSpan) {\n\t\tparts.push(\"**Parent Operation:**\");\n\t\tparts.push(`${evidenceData.parentSpan}`);\n\t\tparts.push(\"\");\n\t}\n\tconsole.warn(\"[formatSlowDbQueryEvidence] Evidence data rendering not yet fully implemented\");\n\treturn parts.join(\"\\n\");\n}\n/**\n* Formats performance issue details from transaction events based on the issue type.\n*\n* This is the main dispatcher for performance issue formatting. It:\n* 1. Detects the issue type from occurrence data (numeric or string)\n* 2. Calls the appropriate type-specific formatter if implemented\n* 3. Falls back to generic evidenceDisplay fields for unimplemented types\n* 4. Provides span analysis fallback for events without occurrence data\n*\n* The occurrence data structure comes from Sentry's performance issue detection\n* and contains evidence about what triggered the issue.\n*\n* @param event - The transaction event containing performance issue data\n* @param spansData - The spans data from the event entries\n* @returns Formatted markdown string with performance issue details\n*/\nfunction formatPerformanceIssueOutput(event, spansData, options) {\n\tconst parts = [];\n\tconst occurrence = event.occurrence;\n\tif (!occurrence) return \"\";\n\tlet issueType;\n\tif (typeof occurrence.type === \"number\") issueType = OCCURRENCE_TYPE_TO_ISSUE_TYPE[occurrence.type];\n\telse issueType = occurrence.issueType || occurrence.type;\n\tconst evidenceData = occurrence.evidenceData;\n\tif (evidenceData) switch (issueType) {\n\t\tcase KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_DB_QUERIES:\n\t\tcase KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_API_CALLS:\n\t\tcase KNOWN_PERFORMANCE_ISSUE_TYPES.M_N_PLUS_ONE_DB_QUERIES: {\n\t\t\tconst result = formatN1QueryEvidence(evidenceData, spansData, options?.performanceTrace);\n\t\t\tif (result) parts.push(result);\n\t\t\tbreak;\n\t\t}\n\t\tcase KNOWN_PERFORMANCE_ISSUE_TYPES.SLOW_DB_QUERY: {\n\t\t\tconst result = formatSlowDbQueryEvidence(evidenceData, spansData);\n\t\t\tif (result) parts.push(result);\n\t\t\tbreak;\n\t\t}\n\t\tdefault: if (issueType) console.warn(`[formatPerformanceIssueOutput] No custom formatter for issue type: ${issueType}`);\n\t}\n\tif (evidenceData?.transactionName) {\n\t\tparts.push(\"**Transaction:**\");\n\t\tparts.push(`${evidenceData.transactionName}`);\n\t\tparts.push(\"\");\n\t}\n\tif (occurrence.evidenceDisplay?.length > 0) {\n\t\tfor (const display of occurrence.evidenceDisplay) if (display.important) {\n\t\t\tparts.push(`**${display.name}:**`);\n\t\t\tparts.push(`${display.value}`);\n\t\t\tparts.push(\"\");\n\t\t}\n\t}\n\treturn parts.length > 0 ? `${parts.join(\"\\n\")}\\n` : \"\";\n}\nfunction isPrimitive(value) {\n\treturn typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction formatPrimitive(value) {\n\treturn isPrimitive(value) ? String(value) : void 0;\n}\n/**\n* Extracts the Snuba query from metric alert evidence data.\n*/\nfunction getMetricAlertSnubaQuery(evidenceData) {\n\tconst dataSources = evidenceData.data_sources;\n\tif (!Array.isArray(dataSources)) return void 0;\n\tfor (const dataSource of dataSources) {\n\t\tif (!isPlainObject(dataSource)) continue;\n\t\tconst queryObj = dataSource.query_obj;\n\t\tif (!isPlainObject(queryObj)) continue;\n\t\tconst snubaQuery = queryObj.snuba_query;\n\t\tif (isPlainObject(snubaQuery)) return snubaQuery;\n\t}\n\treturn void 0;\n}\nfunction formatMetricAlertCondition(condition) {\n\tconst comparison = condition.comparison;\n\tconst formattedComparison = formatPrimitive(comparison);\n\tif (formattedComparison == null) return void 0;\n\tconst type = condition.type;\n\tconst typeLabel = (() => {\n\t\tif (type === 0 || type === \"0\" || type === \"gt\" || type === \"gte\") return type === \"gte\" ? \"at or above\" : \"above\";\n\t\tif (type === 1 || type === \"1\" || type === \"lt\" || type === \"lte\") return type === \"lte\" ? \"at or below\" : \"below\";\n\t\tif (type != null) return String(type);\n\t\treturn void 0;\n\t})();\n\tif (typeLabel && !/^\\d+$/.test(typeLabel)) return `${typeLabel} ${formattedComparison}`;\n\treturn formattedComparison;\n}\nfunction formatMetricAlertValue(value) {\n\tconst formattedValue = formatPrimitive(value);\n\tif (formattedValue) return formattedValue;\n\tif (isPlainObject(value)) return formatPrimitive(value.value);\n\treturn void 0;\n}\nfunction formatMetricAlertDetails(evidenceData) {\n\tconst parts = [\"### Metric Alert Details\", \"\"];\n\tconst snubaQuery = getMetricAlertSnubaQuery(evidenceData);\n\tif (snubaQuery) {\n\t\tif (snubaQuery.dataset != null) parts.push(`**Dataset**: ${String(snubaQuery.dataset)}`);\n\t\tif (snubaQuery.aggregate != null) parts.push(`**Aggregate**: ${String(snubaQuery.aggregate)}`);\n\t\tif (snubaQuery.query != null && String(snubaQuery.query).length > 0) parts.push(`**Query**: \\`${String(snubaQuery.query)}\\``);\n\t\tif (snubaQuery.time_window != null) parts.push(`**Interval**: ${String(snubaQuery.time_window)} second(s)`);\n\t\tif (snubaQuery.environment != null) parts.push(`**Environment**: ${String(snubaQuery.environment)}`);\n\t\tparts.push(\"\");\n\t}\n\tconst formattedValue = formatMetricAlertValue(evidenceData.value);\n\tif (formattedValue) parts.push(`**Evaluated Value**: ${formattedValue}`);\n\tconst conditions = evidenceData.conditions;\n\tif (Array.isArray(conditions)) {\n\t\tconst formattedConditions = conditions.filter(isPlainObject).map(formatMetricAlertCondition).filter((condition) => condition != null);\n\t\tif (formattedConditions.length > 0) parts.push(`**Threshold**: ${formattedConditions.join(\", \")}`);\n\t}\n\tif (evidenceData.alert_id != null) parts.push(`**Alert Rule ID**: ${String(evidenceData.alert_id)}`);\n\tparts.push(\"\");\n\treturn `${parts.join(\"\\n\")}\\n`;\n}\n/**\n* Formats generic event output (performance regressions, metric-based issues).\n* Generic events don't have traditional error entries, but have occurrence data\n* with evidenceDisplay showing regression details, metric changes, etc.\n*/\nfunction formatGenericEventOutput(event) {\n\tconst parts = [];\n\tif (event.type !== \"generic\") return \"\";\n\tconst genericEvent = event;\n\tconst occurrence = genericEvent.occurrence;\n\tif (!occurrence) return \"\";\n\tconst evidenceData = occurrence.evidenceData;\n\tif (occurrence.type === 8001 && evidenceData) return formatMetricAlertDetails(evidenceData);\n\tif (evidenceData) {\n\t\tparts.push(\"### Performance Regression Details\");\n\t\tparts.push(\"\");\n\t}\n\tif (occurrence.evidenceDisplay && occurrence.evidenceDisplay.length > 0) {\n\t\tfor (const display of occurrence.evidenceDisplay) if (display.important) {\n\t\t\tparts.push(`**${display.name}:**`);\n\t\t\tparts.push(`${display.value}`);\n\t\t\tparts.push(\"\");\n\t\t}\n\t}\n\treturn parts.length > 0 ? `${parts.join(\"\\n\")}\\n` : \"\";\n}\nfunction formatTags(tags) {\n\tif (!tags || tags.length === 0) return \"\";\n\treturn `### Tags\\n\\n${tags.map((tag) => `**${tag.key}**: ${tag.value}`).join(\"\\n\")}\\n\\n`;\n}\nfunction formatEventUser(user) {\n\tif (!user || Object.keys(user).length === 0) return \"\";\n\tconst userFields = [\n\t\t[\"id\", user.id],\n\t\t[\"email\", user.email],\n\t\t[\"username\", user.username],\n\t\t[\"ip\", user.ip ?? user.ip_address],\n\t\t[\"display_name\", user.display_name ?? user.name]\n\t].filter(([, value]) => typeof value === \"string\" && value.length > 0);\n\tconst userSummary = userFields.map(([key, value]) => `${key}:${value}`).join(\", \");\n\tconst geoSummary = formatUserGeoSummary(user.geo);\n\tif (!userSummary && !geoSummary) return \"\";\n\tlet output = \"### User\\n\\n\";\n\tif (userSummary) output += `**user**: ${userSummary}\\n`;\n\tif (geoSummary) output += `**user.geo**: ${geoSummary}\\n`;\n\treturn `${output}\\n`;\n}\nfunction formatContext(context) {\n\tif (!context || Object.keys(context).length === 0) return \"\";\n\treturn `### Extra Data\\n\\nAdditional data attached to this event.\\n\\n${Object.entries(context).map(([key, value]) => {\n\t\treturn `**${key}**: ${JSON.stringify(value, void 0, 2)}`;\n\t}).join(\"\\n\")}\\n\\n`;\n}\nfunction formatContexts(contexts) {\n\tif (!contexts || Object.keys(contexts).length === 0) return \"\";\n\treturn `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(contexts).map(([name, data]) => `**${name}**\\n${Object.entries(data).filter(([key, _]) => key !== \"type\").map(([key, value]) => {\n\t\treturn `${key}: ${JSON.stringify(value, void 0, 2)}`;\n\t}).join(\"\\n\")}`).join(\"\\n\\n\")}\\n\\n`;\n}\n/**\n* Formats a brief Seer analysis summary for inclusion in issue details.\n* Shows current status and high-level insights, prompting to use analyze_issue_with_seer for full details.\n*\n* @param autofixState - The autofix state containing Seer analysis data\n* @returns Formatted markdown string with Seer summary, or empty string if no analysis exists\n*/\nfunction formatSeerSummary(autofixState) {\n\tif (!autofixState || !autofixState.autofix) return \"\";\n\tconst { autofix } = autofixState;\n\tconst parts = [];\n\tparts.push(\"## Seer Analysis\");\n\tparts.push(\"\");\n\tif (!isTerminalStatus(autofix.status)) {\n\t\tparts.push(`**Status:** ${getStatusDisplayName(autofix.status)}`);\n\t\tparts.push(\"\");\n\t}\n\tconst { rootCause, solution } = getAutofixArtifactSummaries(autofix);\n\tif (solution) {\n\t\tparts.push(\"**Summary:**\");\n\t\tparts.push(solution);\n\t} else if (rootCause) {\n\t\tparts.push(\"**Root Cause Identified:**\");\n\t\tparts.push(rootCause);\n\t} else if (!isTerminalStatus(autofix.status)) parts.push(\"Analysis has started but no results yet.\");\n\tif (autofix.status === \"error\") {\n\t\tparts.push(\"\");\n\t\tparts.push(\"**Status:** Analysis failed.\");\n\t} else if (autofix.status === \"awaiting_user_input\") {\n\t\tparts.push(\"\");\n\t\tparts.push(\"**Status:** Analysis paused - additional information needed.\");\n\t}\n\treturn `${parts.join(\"\\n\")}\\n\\n`;\n}\n/**\n* Formats a Sentry issue with its latest event into comprehensive markdown output.\n* Includes issue metadata, event details, and usage instructions.\n*\n* @param params - Object containing organization slug, issue, event, and API service\n* @returns Formatted markdown string with complete issue information\n*/\nfunction formatIssueOutput({ organizationSlug, issue, event, apiService, autofixState, performanceTrace, externalIssues, relatedReplayIds, aiConversations, codeLocation, experimentalMode, availableToolNames, directToolNames }) {\n\tlet output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n\tconst isPerformanceIssue = issue.issueType?.startsWith(\"performance_\") || issue.issueCategory === \"performance\";\n\tif (isPerformanceIssue && issue.metadata) {\n\t\tconst issueTitle = issue.metadata.title || issue.title;\n\t\toutput += `**Description**: ${issueTitle}\\n`;\n\t\tif (issue.metadata.location) output += `**Location**: ${issue.metadata.location}\\n`;\n\t\tif (issue.metadata.value) output += `**Query Pattern**: \\`${issue.metadata.value}\\`\\n`;\n\t} else {\n\t\toutput += `**Description**: ${issue.title}\\n`;\n\t\tif (issue.culprit) output += `**Culprit**: ${issue.culprit}\\n`;\n\t}\n\tif (issue.firstSeen) output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n\tif (issue.lastSeen) output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n\toutput += `**Occurrences**: ${issue.count}\\n`;\n\toutput += `**Users Impacted**: ${issue.userCount}\\n`;\n\toutput += `**Status**: ${issue.status}\\n`;\n\tif (issue.substatus) output += `**Substatus**: ${issue.substatus}\\n`;\n\tif (issue.assignedTo) if (typeof issue.assignedTo === \"string\") output += `**Assigned To**: ${issue.assignedTo}\\n`;\n\telse {\n\t\tconst assignee = issue.assignedTo;\n\t\tconst type = assignee.type === \"team\" ? \"Team\" : \"User\";\n\t\toutput += `**Assigned To**: ${assignee.name} (${type})\\n`;\n\t}\n\tif (issue.issueType) output += `**Issue Type**: ${issue.issueType}\\n`;\n\tif (issue.issueCategory) output += `**Issue Category**: ${issue.issueCategory}\\n`;\n\tif (issue.seerFixabilityScore != null) output += `**Seer Actionability**: ${getSeerActionabilityLabel(issue.seerFixabilityScore)}\\n`;\n\toutput += `**Platform**: ${issue.platform}\\n`;\n\toutput += `**Project**: ${issue.project.name}\\n`;\n\toutput += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n\toutput += \"\\n\";\n\tif (codeLocation) output += formatCodeLocation(codeLocation);\n\toutput += \"## Event Details\\n\\n\";\n\tconst eventType = event.type;\n\tconst isUnsupportedType = eventType !== \"error\" && eventType !== \"default\" && eventType !== \"transaction\" && eventType !== \"generic\" && eventType !== \"csp\";\n\tif (isUnsupportedType) {\n\t\tconst sentryEventId = logIssue(`Unsupported event type encountered: ${String(eventType)}`, { contexts: { event: {\n\t\t\tevent_id: event.id,\n\t\t\tevent_type: eventType,\n\t\t\tissue_id: issue.id,\n\t\t\tissue_short_id: issue.shortId,\n\t\t\torganization_slug: organizationSlug,\n\t\t\tproject_slug: issue.project.slug\n\t\t} } });\n\t\toutput += `⚠️  **Warning**: Unsupported event type \"${String(eventType)}\"\\n\\n`;\n\t\toutput += \"This event type is not yet fully supported by the MCP server. \";\n\t\toutput += \"Only basic issue information is shown above.\\n\\n\";\n\t\toutput += \"**Please report this**: Open a GitHub issue at https://github.com/getsentry/sentry-mcp/issues/new \";\n\t\toutput += `and include Event ID **${event.id}**`;\n\t\tif (sentryEventId) output += ` and Sentry Event ID **${sentryEventId}**`;\n\t\toutput += \" to help us add support for this event type.\\n\";\n\t\tif (aiConversations && aiConversations.length > 0) {\n\t\t\toutput += \"\\n## Response Notes\\n\\n\";\n\t\t\toutput += formatAIConversationResponseNote({\n\t\t\t\taiConversations,\n\t\t\t\torganizationSlug,\n\t\t\t\texperimentalMode: experimentalMode ?? false,\n\t\t\t\tavailableToolNames,\n\t\t\t\tdirectToolNames\n\t\t\t});\n\t\t}\n\t\treturn output;\n\t}\n\toutput += `**Event ID**: ${event.id}\\n`;\n\toutput += `**Type**: ${event.type}\\n`;\n\tif (event.type === \"error\" || event.type === \"default\" || event.type === \"generic\" || event.type === \"csp\") {\n\t\tconst typedEvent = event;\n\t\tif (typedEvent.dateCreated) output += `**Occurred At**: ${new Date(typedEvent.dateCreated).toISOString()}\\n`;\n\t}\n\tif (event.message) output += `**Message**:\\n${event.message}\\n`;\n\toutput += \"\\n\";\n\toutput += formatEventOutput(event, {\n\t\tperformanceTrace,\n\t\treplaySummary: {\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\trelatedReplayIds,\n\t\t\texperimentalMode: experimentalMode ?? false,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames\n\t\t}\n\t});\n\tif (autofixState) output += formatSeerSummary(autofixState);\n\tif (externalIssues && externalIssues.length > 0) {\n\t\toutput += \"## External Issue Links\\n\\n\";\n\t\tfor (const extIssue of externalIssues) output += `- **${extIssue.displayName}** (${extIssue.serviceType}): ${extIssue.webUrl}\\n`;\n\t\toutput += \"\\n\";\n\t}\n\tconst traceId = typeof event.contexts?.trace?.trace_id === \"string\" && event.contexts.trace.trace_id.length > 0 ? event.contexts.trace.trace_id : void 0;\n\toutput += \"## Response Notes\\n\\n\";\n\tconst commitIssueReference = /^\\d+$/.test(issue.shortId) ? apiService.getIssueUrl(organizationSlug, issue.shortId) : issue.shortId;\n\toutput += `- Commit message issue reference: \\`Fixes ${commitIssueReference}\\` automatically closes the issue when the commit is merged.\\n`;\n\toutput += \"- The stacktrace includes first-party application code and third-party code. First-party frames are usually the best starting point for triage.\\n\";\n\tif (aiConversations && aiConversations.length > 0) output += formatAIConversationResponseNote({\n\t\taiConversations,\n\t\torganizationSlug,\n\t\texperimentalMode: experimentalMode ?? false,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t});\n\tconst issueEventSearchInstruction = formatToolCallInstruction({\n\t\ttoolName: \"search_issue_events\",\n\t\targuments: {\n\t\t\torganizationSlug,\n\t\t\tissueId: issue.shortId,\n\t\t\tquery: \"your query\"\n\t\t},\n\t\texperimentalMode: experimentalMode ?? false,\n\t\tavailableToolNames,\n\t\tdirectToolNames,\n\t\tfallbackInstruction: \"Issue event search is not available in this session\"\n\t});\n\toutput += `- Issue event search: ${issueEventSearchInstruction}\\n`;\n\tconst hasMultipleThreads = event.entries?.some((entry) => {\n\t\tif (entry.type !== \"threads\") return false;\n\t\tconst threadsData = parseThreadsEntryData(entry.data);\n\t\treturn Boolean(threadsData?.values && threadsData.values.length > 1);\n\t});\n\tif (hasMultipleThreads) {\n\t\tconst stacktraceInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"get_event_stacktrace\",\n\t\t\targuments: {\n\t\t\t\torganizationSlug,\n\t\t\t\tissueId: issue.shortId,\n\t\t\t\teventId: event.id,\n\t\t\t\tthread: \"thread name or numeric thread ID\"\n\t\t\t},\n\t\t\texperimentalMode: experimentalMode ?? false,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames,\n\t\t\tfallbackInstruction: \"\",\n\t\t\tpurpose: \"to fetch a full thread stacktrace by numeric Thread ID or exact thread Name. Omit `thread` to use Sentry's default selected thread\"\n\t\t});\n\t\tif (stacktraceInstruction) output += `- Thread stacktrace lookup: ${stacktraceInstruction}\\n`;\n\t}\n\tif (traceId) {\n\t\tconst traceDetailsInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"get_sentry_resource\",\n\t\t\targuments: {\n\t\t\t\tresourceType: \"trace\",\n\t\t\t\torganizationSlug,\n\t\t\t\tresourceId: traceId\n\t\t\t},\n\t\t\texperimentalMode: experimentalMode ?? false,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames,\n\t\t\tfallbackInstruction: \"Full distributed trace lookup is not available in this session\"\n\t\t});\n\t\tconst spanSearchInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"search_events\",\n\t\t\targuments: {\n\t\t\t\torganizationSlug,\n\t\t\t\tdataset: \"spans\",\n\t\t\t\tquery: `trace:${traceId}`\n\t\t\t},\n\t\t\texperimentalMode: experimentalMode ?? false,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames,\n\t\t\tfallbackInstruction: \"Related span search is not available in this session\"\n\t\t});\n\t\tconst logSearchInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"search_events\",\n\t\t\targuments: {\n\t\t\t\torganizationSlug,\n\t\t\t\tdataset: \"logs\",\n\t\t\t\tquery: `trace:${traceId}`\n\t\t\t},\n\t\t\texperimentalMode: experimentalMode ?? false,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames,\n\t\t\tfallbackInstruction: \"Related log search is not available in this session\"\n\t\t});\n\t\toutput += `- Full distributed trace and span tree: ${traceDetailsInstruction}\\n`;\n\t\toutput += `- Related span search: ${spanSearchInstruction}\\n`;\n\t\toutput += `- Related log search: ${logSearchInstruction}\\n`;\n\t}\n\tif (experimentalMode) {\n\t\tconst breadcrumbsInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"get_issue_breadcrumbs\",\n\t\t\targuments: { issueUrl: apiService.getIssueUrl(organizationSlug, issue.shortId) },\n\t\t\texperimentalMode,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames,\n\t\t\tfallbackInstruction: \"Issue breadcrumbs are not available in this session\"\n\t\t});\n\t\toutput += `- Breadcrumb trail leading up to this error: ${breadcrumbsInstruction}\\n`;\n\t}\n\treturn output;\n}\nfunction formatAIConversationResponseNote({ aiConversations, organizationSlug, experimentalMode, availableToolNames, directToolNames }) {\n\tconst instructions = formatAIConversationActionInstructions({\n\t\torganizationSlug,\n\t\taiConversations,\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t});\n\tif (aiConversations.length === 1) {\n\t\tconst [conversation] = aiConversations;\n\t\tconst spanSuffix = conversation.spanId ? ` Matching span: \\`${conversation.spanId}\\`.` : \"\";\n\t\treturn `- Agent conversation found in this trace: \\`${conversation.conversationId}\\`.${spanSuffix}\\n${instructions.map((instruction) => `- ${instruction}`).join(\"\\n\")}\\n`;\n\t}\n\tconst conversationIds = aiConversations.map((conversation) => `\\`${conversation.conversationId}\\``).join(\", \");\n\treturn `- Multiple agent conversations were found in this trace: ${conversationIds}.\\n${instructions.map((instruction) => `- ${instruction}`).join(\"\\n\")}\\n`;\n}\nconst MAX_DISPLAY_REPLAYS = 5;\nfunction formatIssueReplayOutput({ apiService, organizationSlug, event, relatedReplayIds, experimentalMode, availableToolNames, directToolNames }) {\n\tconst attachedReplayId = getReplayIdFromEvent(event);\n\tconst normalizedRelatedReplayIds = dedupeReplayIds(relatedReplayIds ?? []);\n\tconst additionalRelatedReplayIds = normalizedRelatedReplayIds.filter((replayId) => replayId !== attachedReplayId);\n\tif (!attachedReplayId && normalizedRelatedReplayIds.length === 0) return \"\";\n\tconst lines = [\"## Session Replay\", \"\"];\n\tif (attachedReplayId) lines.push(`**Attached Replay**: ${apiService.getReplayUrl(organizationSlug, attachedReplayId)}`);\n\tif (normalizedRelatedReplayIds.length > 0) lines.push(`**Related Replay Count**: ${normalizedRelatedReplayIds.length}`);\n\tif (additionalRelatedReplayIds.length > 0) {\n\t\tconst displayedReplayIds = additionalRelatedReplayIds.slice(0, MAX_DISPLAY_REPLAYS);\n\t\tlines.push(\"\");\n\t\tlines.push(attachedReplayId ? \"### Other Related Replays\" : \"### Related Replays\");\n\t\tlines.push(\"\");\n\t\tfor (const replayId of displayedReplayIds) lines.push(`- ${apiService.getReplayUrl(organizationSlug, replayId)}`);\n\t\tconst remainingReplayCount = additionalRelatedReplayIds.length - displayedReplayIds.length;\n\t\tif (remainingReplayCount > 0) lines.push(`- ... and ${remainingReplayCount} more replay${remainingReplayCount === 1 ? \"\" : \"s\"}`);\n\t}\n\tconst exampleReplayId = attachedReplayId ?? normalizedRelatedReplayIds.at(0) ?? null;\n\tif (exampleReplayId) {\n\t\tconst replayDetailsInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"get_replay_details\",\n\t\t\targuments: {\n\t\t\t\torganizationSlug,\n\t\t\t\treplayId: exampleReplayId\n\t\t\t},\n\t\t\texperimentalMode,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames,\n\t\t\tfallbackInstruction: \"Replay detail lookup is not available in this session\",\n\t\t\tpurpose: \"to inspect a replay in detail\"\n\t\t});\n\t\tlines.push(\"\");\n\t\tlines.push(`${replayDetailsInstruction}.`);\n\t}\n\treturn `${lines.join(\"\\n\")}\\n\\n`;\n}\nfunction getReplayIdFromEvent(event) {\n\tconst replayContext = event.contexts?.replay;\n\tconst replayContextId = typeof replayContext?.replay_id === \"string\" ? replayContext.replay_id : null;\n\tconst replayTagId = event.tags?.find((tag) => tag.key === \"replayId\" || tag.key === \"replay.id\")?.value ?? null;\n\treturn normalizeReplayId(replayContextId ?? replayTagId);\n}\nfunction dedupeReplayIds(replayIds) {\n\tconst normalizedReplayIds = [];\n\tconst seenReplayIds = /* @__PURE__ */ new Set();\n\tfor (const replayId of replayIds) {\n\t\tconst normalizedReplayId = normalizeReplayId(replayId);\n\t\tif (!normalizedReplayId || seenReplayIds.has(normalizedReplayId)) continue;\n\t\tseenReplayIds.add(normalizedReplayId);\n\t\tnormalizedReplayIds.push(normalizedReplayId);\n\t}\n\treturn normalizedReplayIds;\n}\nfunction normalizeReplayId(replayId) {\n\tif (typeof replayId !== \"string\") return null;\n\tconst trimmedReplayId = replayId.trim();\n\tif (!trimmedReplayId) return null;\n\treturn trimmedReplayId.replace(/-/g, \"\");\n}\nfunction stripReplayMetadata(event) {\n\tconst tags = event.tags?.filter((tag) => tag.key !== \"replay.id\" && tag.key !== \"replayId\");\n\tconst replayContext = event.contexts?.replay;\n\tif (!replayContext) return {\n\t\t...event,\n\t\ttags\n\t};\n\tconst nextReplayContext = Object.fromEntries(Object.entries(replayContext).filter(([key]) => key !== \"replay_id\"));\n\tconst nonTypeReplayKeys = Object.keys(nextReplayContext).filter((key) => key !== \"type\");\n\tconst contexts = nonTypeReplayKeys.length === 0 ? Object.fromEntries(Object.entries(event.contexts ?? {}).filter(([key]) => key !== \"replay\")) : {\n\t\t...event.contexts,\n\t\treplay: {\n\t\t\t...nextReplayContext,\n\t\t\ttype: replayContext.type\n\t\t}\n\t};\n\treturn {\n\t\t...event,\n\t\ttags,\n\t\tcontexts\n\t};\n}\n\n//#endregion\nexport { formatAvailableThreadList, formatEventOutput, formatFrameHeader, formatIssueOutput, formatThreadStacktraceOutput, getSeerActionabilityLabel };\n//# sourceMappingURL=formatting-Cviy8-dX.js.map","import { assertScopedProjectSlug } from \"./url-scope-CRM5sNo7.js\";\n\n//#region src/internal/tool-helpers/issue.ts\nfunction assertIssueWithinProjectConstraint({ issue, projectSlug, resourceLabel = \"Issue\" }) {\n\tassertScopedProjectSlug({\n\t\tresourceLabel,\n\t\tscopedProjectSlug: projectSlug,\n\t\tactualProjectSlug: issue.project.slug\n\t});\n}\nasync function ensureIssueWithinProjectConstraint({ apiService, organizationSlug, issueId, projectSlug, resourceLabel = \"Issue\" }) {\n\tif (!projectSlug) return;\n\tconst issue = await apiService.getIssue({\n\t\torganizationSlug,\n\t\tissueId\n\t});\n\tassertIssueWithinProjectConstraint({\n\t\tissue,\n\t\tprojectSlug,\n\t\tresourceLabel\n\t});\n}\n\n//#endregion\nexport { assertIssueWithinProjectConstraint, ensureIssueWithinProjectConstraint };\n//# sourceMappingURL=issue-D65xI0F7.js.map","import { ConfigurationError } from \"./errors-CEDWDXew.js\";\nimport { logIssue } from \"./logging-B7X3yL0T.js\";\nimport { ApiClientError } from \"./errors-DG2FreDU.js\";\nimport { ErrorEntrySchema, ThreadsEntrySchema } from \"./schema-BYZYkgA1.js\";\nimport { findMostRelevantInAppFrame } from \"./code-location-DW_YNpMG.js\";\n\n//#region src/tools/support/code-location.ts\nconst CODE_LOCATION_TIMEOUT_MS = 3e3;\n/** Resolves a verified source location, omitting optional enrichment failures. */\nasync function resolveCodeLocation({ apiService, organizationSlug, projectSlug, event }) {\n\tconst frame = findRelevantFrame(event);\n\tif (!frame) return void 0;\n\tconst embeddedSourceUrl = getTrustedGitHubSourceUrl(frame.sourceLink);\n\tif (embeddedSourceUrl) return {\n\t\trepository: getGitHubRepository(embeddedSourceUrl),\n\t\tpath: getString(frame.filename) ?? getString(frame.absPath),\n\t\t...frame.lineNo !== null && frame.lineNo !== void 0 ? { line: frame.lineNo } : {},\n\t\turl: embeddedSourceUrl\n\t};\n\tconst file = getString(frame.filename) ?? getString(frame.absPath);\n\tif (!file) return void 0;\n\tconst controller = new AbortController();\n\tconst timeout = setTimeout(() => controller.abort(), CODE_LOCATION_TIMEOUT_MS);\n\ttry {\n\t\tconst result = await apiService.getStacktraceLink({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug,\n\t\t\tfile,\n\t\t\tplatform: getString(frame.platform) ?? getString(event.platform),\n\t\t\t...frame.lineNo !== null && frame.lineNo !== void 0 ? { lineNo: frame.lineNo } : {},\n\t\t\tabsPath: getString(frame.absPath),\n\t\t\tmodule: getString(frame.module),\n\t\t\tpackage: getString(frame.package),\n\t\t\tcommitId: getString(event.release?.lastCommit?.id),\n\t\t\tgroupId: getString(event.groupID),\n\t\t\tsdkName: getString(event.sdk?.name),\n\t\t\tsignal: controller.signal\n\t\t});\n\t\tconst sourceUrl = getHttpUrl(result.sourceUrl);\n\t\tconst repository = getString(result.config?.repoName);\n\t\tconst sourcePath = getString(result.sourcePath);\n\t\tif (!sourceUrl || !repository || !sourcePath) return void 0;\n\t\treturn {\n\t\t\trepository,\n\t\t\tpath: sourcePath,\n\t\t\t...frame.lineNo !== null && frame.lineNo !== void 0 ? { line: frame.lineNo } : {},\n\t\t\turl: sourceUrl\n\t\t};\n\t} catch (error) {\n\t\tif (!controller.signal.aborted && !(error instanceof ApiClientError) && !(error instanceof ConfigurationError)) logIssue(error, {\n\t\t\tloggerScope: [\n\t\t\t\t\"tools\",\n\t\t\t\t\"get-issue-details\",\n\t\t\t\t\"code-location\"\n\t\t\t],\n\t\t\tcontexts: { request: {\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlug,\n\t\t\t\tgroupId: event.groupID\n\t\t\t} }\n\t\t});\n\t\treturn void 0;\n\t} finally {\n\t\tclearTimeout(timeout);\n\t}\n}\nfunction findRelevantFrame(event) {\n\tfor (const entry of event.entries) {\n\t\tif (entry.type !== \"exception\") continue;\n\t\tconst parsed = ErrorEntrySchema.safeParse(entry.data);\n\t\tif (!parsed.success) continue;\n\t\tconst exceptions = parsed.data.values ?? (parsed.data.value ? [parsed.data.value] : []);\n\t\tconst rootException = [...exceptions].reverse().find((exception) => exception?.stacktrace?.frames?.length);\n\t\tif (rootException?.stacktrace?.frames) return findMostRelevantInAppFrame(rootException.stacktrace.frames);\n\t}\n\tfor (const entry of event.entries) {\n\t\tif (entry.type !== \"threads\") continue;\n\t\tconst parsed = ThreadsEntrySchema.safeParse(entry.data);\n\t\tif (!parsed.success) continue;\n\t\tconst crashedThread = parsed.data.values?.find((thread) => thread.crashed && thread.stacktrace?.frames?.length);\n\t\tif (crashedThread?.stacktrace?.frames) return findMostRelevantInAppFrame(crashedThread.stacktrace.frames);\n\t}\n\treturn void 0;\n}\nfunction getHttpUrl(value) {\n\tconst url = getString(value);\n\tif (!url) return void 0;\n\ttry {\n\t\tconst parsed = new URL(url);\n\t\treturn parsed.protocol === \"https:\" || parsed.protocol === \"http:\" ? url : void 0;\n\t} catch {\n\t\treturn void 0;\n\t}\n}\nfunction getTrustedGitHubSourceUrl(value) {\n\tconst url = getHttpUrl(value);\n\tif (!url) return void 0;\n\tconst parsed = new URL(url);\n\treturn parsed.protocol === \"https:\" && (parsed.hostname === \"github.com\" || parsed.hostname === \"www.github.com\") ? url : void 0;\n}\nfunction getGitHubRepository(sourceUrl) {\n\tconst [owner, repository] = new URL(sourceUrl).pathname.split(\"/\").filter(Boolean);\n\treturn owner && repository ? `${owner}/${repository}` : void 0;\n}\nfunction getString(value) {\n\treturn typeof value === \"string\" && value.length > 0 ? value : void 0;\n}\n\n//#endregion\nexport { resolveCodeLocation };\n//# sourceMappingURL=code-location-C0fIXD0V.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamEventId, ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { logError } from \"./logging-B7X3yL0T.js\";\nimport { ApiNotFoundError } from \"./errors-DG2FreDU.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { addAIConversationSuggestedActions } from \"./ai-conversation-actions-rbKawWyG.js\";\nimport { enhanceNotFoundError } from \"./enhance-error-BDXGhe5E.js\";\nimport { parseIssueParams } from \"./issue-helpers-0Dnme3Ym.js\";\nimport { formatIssueOutput } from \"./formatting-Cviy8-dX.js\";\nimport { assertIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { resolveCodeLocation } from \"./code-location-C0fIXD0V.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-issue-details.ts\nconst MAX_AI_CONVERSATION_MATCHES = 3;\nconst AI_CONVERSATION_LOOKUP_WINDOW_MS = 24 * 60 * 60 * 1e3;\nconst TRACE_ID_PATTERN = /^[0-9a-fA-F]{32}$/;\nvar get_issue_details_default = defineTool({\n\tname: \"get_issue_details\",\n\tskills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Get detailed information about a specific Sentry issue by ID.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS:\",\n\t\t\"- Provide a specific issue ID (e.g., 'CLOUDFLARE-MCP-41', 'PROJECT-123')\",\n\t\t\"- Ask to 'explain [ISSUE-ID]', 'tell me about [ISSUE-ID]'\",\n\t\t\"- Want details/stacktrace/analysis for a known issue\",\n\t\t\"- Provide a Sentry issue URL\",\n\t\t\"\",\n\t\t\"DO NOT USE for:\",\n\t\t\"- General searching or listing issues (use search_issues)\",\n\t\t\"\",\n\t\t\"TRIGGER PATTERNS:\",\n\t\t\"- 'Explain ISSUE-123' → use get_issue_details\",\n\t\t\"- 'Tell me about PROJECT-456' → use get_issue_details\",\n\t\t\"- 'What happened in [issue URL]' → use get_issue_details\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### With Sentry URL (recommended - simplest approach)\",\n\t\t\"```\",\n\t\t\"get_issue_details(issueUrl='https://sentry.sentry.io/issues/6916805731/?project=4509062593708032&query=is%3Aunresolved')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### With issue ID and organization\",\n\t\t\"```\",\n\t\t\"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### With event ID and organization\",\n\t\t\"```\",\n\t\t\"get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- **IMPORTANT**: If user provides a Sentry URL, pass the ENTIRE URL to issueUrl parameter unchanged\",\n\t\t\"- When using issueUrl, all other parameters are automatically extracted - don't provide them separately\",\n\t\t\"- If using issueId (not URL), then organizationSlug is required\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\teventId: ParamEventId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tif (params.eventId) {\n\t\t\tconst orgSlug$1 = params.organizationSlug;\n\t\t\tconst eventId = params.eventId;\n\t\t\tif (!orgSlug$1) throw new UserInputError(\"`organizationSlug` is required when providing `eventId`\");\n\t\t\tsetTag(\"organization.slug\", orgSlug$1);\n\t\t\tlet issue$1;\n\t\t\tif (params.issueId) issue$1 = await apiService.getIssue({\n\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\tissueId: params.issueId\n\t\t\t});\n\t\t\telse {\n\t\t\t\tconst [found] = await apiService.listIssues({\n\t\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\t\tquery: eventId\n\t\t\t\t});\n\t\t\t\tif (!found) return `# Event Not Found\\n\\nNo issue found for Event ID: ${eventId}`;\n\t\t\t\tissue$1 = found;\n\t\t\t}\n\t\t\tassertIssueWithinProjectConstraint({\n\t\t\t\tissue: issue$1,\n\t\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t\t});\n\t\t\tconst [{ event: event$1, performanceTrace: performanceTrace$1, aiConversations: aiConversations$1, codeLocation: codeLocation$1 }, { autofixState: autofixState$1, externalIssues: externalIssues$1, relatedReplayIds: relatedReplayIds$1 }] = await Promise.all([apiService.getEventForIssue({\n\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\tissueId: issue$1.shortId,\n\t\t\t\teventId\n\t\t\t}).catch((error) => {\n\t\t\t\tif (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {\n\t\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\t\tissueId: issue$1.shortId,\n\t\t\t\t\teventId\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t}).then(async (event$2) => ({\n\t\t\t\tevent: event$2,\n\t\t\t\t...await fetchEventEnrichment({\n\t\t\t\t\tapiService,\n\t\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\t\tevent: event$2,\n\t\t\t\t\tissue: issue$1\n\t\t\t\t})\n\t\t\t})), fetchIssueEnrichmentData({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\tissue: issue$1,\n\t\t\t\tseerEnabled: isSeerGranted(context)\n\t\t\t})]);\n\t\t\treturn addAIConversationSuggestedActions({\n\t\t\t\tmarkdown: formatIssueOutput({\n\t\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\t\tissue: issue$1,\n\t\t\t\t\tevent: event$1,\n\t\t\t\t\tapiService,\n\t\t\t\t\tautofixState: autofixState$1,\n\t\t\t\t\tperformanceTrace: performanceTrace$1,\n\t\t\t\t\texternalIssues: externalIssues$1,\n\t\t\t\t\trelatedReplayIds: relatedReplayIds$1,\n\t\t\t\t\taiConversations: aiConversations$1,\n\t\t\t\t\tcodeLocation: codeLocation$1,\n\t\t\t\t\texperimentalMode: context.experimentalMode,\n\t\t\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\t\t\tdirectToolNames: context.directToolNames\n\t\t\t\t}),\n\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\taiConversations: aiConversations$1,\n\t\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\t\tdirectToolNames: context.directToolNames\n\t\t\t});\n\t\t}\n\t\tif (!params.issueUrl && !params.issueId) throw new UserInputError(\"Either `issueId` or `issueUrl` must be provided\");\n\t\tif (!params.issueUrl && !params.organizationSlug) throw new UserInputError(\"`organizationSlug` is required when providing `issueId`\");\n\t\tconst { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tissueId: params.issueId,\n\t\t\tissueUrl: params.issueUrl\n\t\t});\n\t\tsetTag(\"organization.slug\", orgSlug);\n\t\tlet issue;\n\t\ttry {\n\t\t\tissue = await apiService.getIssue({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t\tassertIssueWithinProjectConstraint({\n\t\t\tissue,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tconst [{ event, performanceTrace, aiConversations, codeLocation }, { autofixState, externalIssues, relatedReplayIds }] = await Promise.all([apiService.getLatestEventForIssue({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: issue.shortId\n\t\t}).then(async (event$1) => ({\n\t\t\tevent: event$1,\n\t\t\t...await fetchEventEnrichment({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tevent: event$1,\n\t\t\t\tissue\n\t\t\t})\n\t\t})), fetchIssueEnrichmentData({\n\t\t\tapiService,\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissue,\n\t\t\tseerEnabled: isSeerGranted(context)\n\t\t})]);\n\t\treturn addAIConversationSuggestedActions({\n\t\t\tmarkdown: formatIssueOutput({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissue,\n\t\t\t\tevent,\n\t\t\t\tapiService,\n\t\t\t\tautofixState,\n\t\t\t\tperformanceTrace,\n\t\t\t\texternalIssues,\n\t\t\t\trelatedReplayIds,\n\t\t\t\taiConversations,\n\t\t\t\tcodeLocation,\n\t\t\t\texperimentalMode: context.experimentalMode,\n\t\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\t\tdirectToolNames: context.directToolNames\n\t\t\t}),\n\t\t\torganizationSlug: orgSlug,\n\t\t\taiConversations,\n\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames\n\t\t});\n\t}\n});\nasync function fetchEventEnrichment({ apiService, organizationSlug, event, issue }) {\n\tconst [performanceTrace, aiConversations, codeLocation] = await Promise.all([\n\t\tmaybeFetchPerformanceTrace({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tevent\n\t\t}),\n\t\tmaybeFindAIConversationsForIssueEvent({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tevent\n\t\t}),\n\t\tresolveCodeLocation({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: issue.project.slug,\n\t\t\tevent\n\t\t})\n\t]);\n\treturn {\n\t\tperformanceTrace,\n\t\taiConversations,\n\t\tcodeLocation\n\t};\n}\n/**\n* Fetches supplementary data for an issue in parallel: Seer analysis and external links.\n* All calls are non-blocking -- failures are silently caught so they never\n* prevent the primary issue details from being returned. Seer analysis is\n* skipped entirely when the `seer` skill is not granted.\n*/\nasync function fetchIssueEnrichmentData({ apiService, organizationSlug, issue, seerEnabled }) {\n\tconst issueId = String(issue.id);\n\tconst [autofixState, externalIssues, relatedReplayIds] = await Promise.all([\n\t\tmaybeFetchAutofixState({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tissue,\n\t\t\tseerEnabled\n\t\t}),\n\t\tapiService.getIssueExternalLinks({\n\t\t\torganizationSlug,\n\t\t\tissueId: issue.shortId\n\t\t}).catch(() => void 0),\n\t\tapiService.listReplayIdsForIssue({\n\t\t\torganizationSlug,\n\t\t\tissueId,\n\t\t\tdataSource: getReplayDataSource(issue)\n\t\t}).catch(() => void 0)\n\t]);\n\treturn {\n\t\tautofixState,\n\t\texternalIssues,\n\t\trelatedReplayIds\n\t};\n}\n/**\n* Whether Seer output can be used at all in this session.\n*\n* A session started with `--disable-skills=seer` (or `--skills` that omits it)\n* drops Seer output on the floor, so requesting it is pure overhead -- and on\n* deployments without Seer the autofix endpoint answers 500, making it a\n* guaranteed-failing request on every issue lookup. An unknown granted set\n* keeps the previous behaviour and fetches.\n*/\nfunction isSeerGranted(context) {\n\treturn context.grantedSkills ? context.grantedSkills.has(\"seer\") : true;\n}\nasync function maybeFetchAutofixState({ apiService, organizationSlug, issue, seerEnabled }) {\n\tif (!seerEnabled) return void 0;\n\treturn apiService.getAutofixState({\n\t\torganizationSlug,\n\t\tissueId: issue.shortId\n\t}).catch(() => void 0);\n}\nasync function maybeFetchPerformanceTrace({ apiService, organizationSlug, event }) {\n\tconst context = shouldFetchTraceForEvent(event);\n\tif (!context) return void 0;\n\ttry {\n\t\treturn await apiService.getTrace({\n\t\t\torganizationSlug,\n\t\t\ttraceId: context.traceId,\n\t\t\tlimit: 1e4\n\t\t});\n\t} catch (error) {\n\t\tlogError(error);\n\t\treturn void 0;\n\t}\n}\nasync function maybeFindAIConversationsForIssueEvent({ apiService, organizationSlug, event }) {\n\tconst traceId = getEventTraceId(event);\n\tif (!traceId || !TRACE_ID_PATTERN.test(traceId)) return [];\n\ttry {\n\t\treturn await findAIConversationsForTrace({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\ttraceId,\n\t\t\tevent\n\t\t});\n\t} catch (error) {\n\t\tlogError(error);\n\t\treturn [];\n\t}\n}\n/**\n* Conversation IDs live on spans, not issue events. Keep this as a bounded\n* opportunistic span match so issue details never fetch the full trace.\n*/\nasync function findAIConversationsForTrace({ apiService, organizationSlug, traceId, event }) {\n\tconst response = await apiService.searchEvents({\n\t\torganizationSlug,\n\t\tdataset: \"spans\",\n\t\tquery: `trace:${traceId} has:gen_ai.conversation.id`,\n\t\tfields: [\n\t\t\t\"gen_ai.conversation.id\",\n\t\t\t\"span_id\",\n\t\t\t\"timestamp\"\n\t\t],\n\t\tlimit: MAX_AI_CONVERSATION_MATCHES,\n\t\tsort: \"-timestamp\",\n\t\t...buildConversationLookupTimeParams(event)\n\t});\n\tif (!response || typeof response !== \"object\" || !Array.isArray(response.data)) return [];\n\tconst references = /* @__PURE__ */ new Map();\n\tfor (const row of response.data) {\n\t\tif (!row || typeof row !== \"object\") continue;\n\t\tconst record = row;\n\t\tconst conversationId = getString(record[\"gen_ai.conversation.id\"]);\n\t\tif (!conversationId || references.has(conversationId)) continue;\n\t\treferences.set(conversationId, {\n\t\t\tconversationId,\n\t\t\tspanId: getString(record.span_id)\n\t\t});\n\t\tif (references.size >= MAX_AI_CONVERSATION_MATCHES) break;\n\t}\n\treturn [...references.values()];\n}\nfunction buildConversationLookupTimeParams(event) {\n\tconst eventTimestamp = getEventTimestamp(event);\n\tif (!eventTimestamp) return { statsPeriod: \"14d\" };\n\treturn {\n\t\tstart: new Date(eventTimestamp.getTime() - AI_CONVERSATION_LOOKUP_WINDOW_MS).toISOString(),\n\t\tend: new Date(eventTimestamp.getTime() + AI_CONVERSATION_LOOKUP_WINDOW_MS).toISOString()\n\t};\n}\nfunction getEventTimestamp(event) {\n\tconst timestamp = getString(event.dateCreated) ?? getString(event.dateReceived);\n\tif (!timestamp) return null;\n\tconst date = new Date(timestamp);\n\treturn Number.isNaN(date.getTime()) ? null : date;\n}\nfunction getEventTraceId(event) {\n\tconst traceId = event.contexts?.trace?.trace_id;\n\treturn getString(traceId);\n}\nfunction getString(value) {\n\treturn typeof value === \"string\" && value.length > 0 ? value : void 0;\n}\nfunction isErrorEvent(event) {\n\treturn event.type === \"error\" || event.type === \"default\";\n}\nfunction shouldFetchTraceForEvent(event) {\n\tif (isErrorEvent(event)) return null;\n\tconst traceId = event.contexts?.trace?.trace_id;\n\tif (typeof traceId !== \"string\" || traceId.length === 0) return null;\n\treturn { traceId };\n}\nfunction getReplayDataSource(issue) {\n\treturn issue.issueCategory === \"error\" || issue.type === \"error\" ? \"discover\" : \"search_issues\";\n}\n\n//#endregion\nexport { get_issue_details_default };\n//# sourceMappingURL=get-issue-details-DHDUffp5.js.map","import { ThreadsEntrySchema } from \"./schema-BYZYkgA1.js\";\nimport { formatAvailableThreadList, formatThreadStacktraceOutput } from \"./formatting-Cviy8-dX.js\";\n\n//#region src/tools/support/event-stacktrace.ts\n/**\n* Fetches an issue event and formats the selected thread stacktrace.\n*/\nasync function fetchAndFormatEventStacktrace({ apiService, organizationSlug, issueId, eventId, thread }) {\n\tconst event = await apiService.getEventForIssue({\n\t\torganizationSlug,\n\t\tissueId,\n\t\teventId\n\t});\n\tconst threads = getThreads(event);\n\tlet output = `# Event Stacktrace in **${organizationSlug}**\\n\\n`;\n\toutput += `**Issue ID**: ${issueId}\\n`;\n\toutput += `**Event ID**: ${event.id}\\n\\n`;\n\tif (threads.length === 0) {\n\t\toutput += \"No thread stacktraces were found for this event.\\n\";\n\t\treturn output;\n\t}\n\tconst selected = selectThread(threads, thread);\n\tif (selected.kind !== \"selected\") {\n\t\toutput += `${selected.message}\\n\\n`;\n\t\toutput += formatAvailableThreadList(threads);\n\t\treturn output;\n\t}\n\toutput += formatThreadStacktraceOutput({\n\t\tevent,\n\t\tthread: selected.thread,\n\t\tselectionReason: selected.reason\n\t});\n\treturn output;\n}\nfunction getThreads(event) {\n\tconst threadsEntry = event.entries?.find((entry) => entry.type === \"threads\");\n\tconst result = ThreadsEntrySchema.safeParse(threadsEntry?.data);\n\treturn result.success ? result.data.values ?? [] : [];\n}\nfunction selectThread(threads, selector) {\n\tif (selector === void 0) {\n\t\tconst selected = selectSentryDefaultThread(threads);\n\t\treturn {\n\t\t\tkind: \"selected\",\n\t\t\tthread: selected,\n\t\t\treason: \"Sentry default selection: first crashed thread, then first thread with a stacktrace, then first thread.\"\n\t\t};\n\t}\n\tif (typeof selector === \"number\") return selectUnique(threads, (thread) => String(thread.id) === String(selector), `No thread found with ID ${selector}.`, `Multiple threads matched ID ${selector}.`);\n\tconst nameMatch = selectUnique(threads, (thread) => thread.name === selector, \"\", `Multiple threads matched name \"${selector}\".`);\n\tif (nameMatch.kind !== \"not_found\") return nameMatch;\n\tif (/^-?\\d+$/.test(selector)) return selectUnique(threads, (thread) => String(thread.id) === selector, `No thread found with name or ID \"${selector}\".`, `Multiple threads matched ID ${selector}.`);\n\treturn {\n\t\tkind: \"not_found\",\n\t\tmessage: `No thread found with name \"${selector}\".`\n\t};\n}\nfunction selectSentryDefaultThread(threads) {\n\tconst sortedThreads = [...threads].sort((a, b) => Number(Boolean(b.crashed)) - Number(Boolean(a.crashed)));\n\treturn sortedThreads.find((thread) => thread.crashed) ?? sortedThreads.find((thread) => hasFrames(thread)) ?? sortedThreads[0];\n}\nfunction hasFrames(thread) {\n\treturn Boolean(thread.stacktrace?.frames?.length);\n}\nfunction selectUnique(threads, predicate, notFoundMessage, ambiguousMessage) {\n\tconst matches = threads.filter(predicate);\n\tif (matches.length === 0) return {\n\t\tkind: \"not_found\",\n\t\tmessage: notFoundMessage\n\t};\n\tif (matches.length > 1) return {\n\t\tkind: \"ambiguous\",\n\t\tmessage: ambiguousMessage\n\t};\n\treturn {\n\t\tkind: \"selected\",\n\t\tthread: matches[0],\n\t\treason: \"Matched the provided thread selector.\"\n\t};\n}\n\n//#endregion\nexport { fetchAndFormatEventStacktrace };\n//# sourceMappingURL=event-stacktrace-DNVGqkZt.js.map","import { ParamEventIdOrLatest, ParamIssueShortId, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { ApiNotFoundError } from \"./errors-DG2FreDU.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { enhanceNotFoundError } from \"./enhance-error-BDXGhe5E.js\";\nimport { ensureIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { fetchAndFormatEventStacktrace } from \"./event-stacktrace-DNVGqkZt.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-event-stacktrace.ts\nvar get_event_stacktrace_default = defineTool({\n\tname: \"get_event_stacktrace\",\n\tskills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Get a full thread stacktrace from a specific Sentry event.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Fetch the full stacktrace for a thread listed in issue details\",\n\t\t\"- Inspect a non-crashed thread from an event with multiple threads\",\n\t\t\"- Get Sentry's default selected thread stacktrace when no thread is specified\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_event_stacktrace(organizationSlug='my-org', issueId='PROJECT-123')\",\n\t\t\"get_event_stacktrace(organizationSlug='my-org', issueId='PROJECT-123', eventId='c49541c747cb4d8aa3efb70ca5aba243', thread=259)\",\n\t\t\"get_event_stacktrace(organizationSlug='my-org', issueId='PROJECT-123', thread='main')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- `thread` is optional. If omitted, this returns the same default thread Sentry selects: first crashed thread, then first thread with a stacktrace, then first thread.\",\n\t\t\"- Pass `thread` as a numeric Thread ID or exact thread Name from the issue details thread list.\",\n\t\t\"- If the issue details show only one useful thread, omit `thread`.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId,\n\t\teventId: ParamEventIdOrLatest,\n\t\tthread: z.union([z.number().int(), z.string().trim().min(1)]).optional().describe(\"Optional thread selector. Pass a numeric thread ID, or an exact thread name string. If omitted, returns the same default thread Sentry selects: first crashed thread, then first thread with a stacktrace, then first thread.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tsetTag(\"issue.id\", params.issueId);\n\t\ttry {\n\t\t\tawait ensureIssueWithinProjectConstraint({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tissueId: params.issueId,\n\t\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t\t});\n\t\t\treturn await fetchAndFormatEventStacktrace({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tissueId: params.issueId,\n\t\t\t\teventId: params.eventId,\n\t\t\t\tthread: params.thread\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tissueId: params.issueId,\n\t\t\t\teventId: params.eventId\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n});\n\n//#endregion\nexport { get_event_stacktrace_default };\n//# sourceMappingURL=get-event-stacktrace-ODRk7GSR.js.map","import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { isPlainObject } from \"./type-guards-DHLAzjf2.js\";\nimport { formatActor, formatDate, formatId, formatUnknown, readString } from \"./api-formatting-nIGXUFdx.js\";\nimport { formatAvailableToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { parseIssueParams } from \"./issue-helpers-0Dnme3Ym.js\";\nimport { ensureIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-issue-activity.ts\nfunction getActivityText(activity) {\n\tconst data = activity.data;\n\tif (!data) return null;\n\treturn readString(data, \"text\") ?? readString(data, \"message\") ?? readString(data, \"reason\") ?? readString(data, \"description\");\n}\nfunction formatActivity(activity) {\n\tconst actor = activity.user ? formatActor(activity.user) : \"system\";\n\tconst date = formatDate(activity.dateCreated) ?? \"unknown time\";\n\tconst text = getActivityText(activity);\n\tconst details = !text && isPlainObject(activity.data) && Object.keys(activity.data).length > 0 ? `\\n  - Data: ${formatUnknown(activity.data)}` : \"\";\n\treturn `- ${date}: ${activity.type ?? \"activity\"} by ${actor} (${formatId(activity.id)})${text ? `\\n  - ${text}` : \"\"}${details}`;\n}\nvar get_issue_activity_default = defineTool({\n\tname: \"get_issue_activity\",\n\tskills: [\"inspect\", \"triage\"],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Get the activity feed and comments for a Sentry issue.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Review prior comments before triaging an issue\",\n\t\t\"- Understand who resolved, ignored, assigned, or commented on an issue\",\n\t\t\"- See recent issue activity that is not included in `get_issue_details`\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_issue_activity(organizationSlug='my-organization', issueId='PROJECT-123')\",\n\t\t\"get_issue_activity(issueUrl='https://my-organization.sentry.io/issues/PROJECT-123/')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\tincludeComments: z.boolean().default(true),\n\t\tlimit: z.number().int().positive().max(100).default(25)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst parsed = parseIssueParams({\n\t\t\tissueUrl: params.issueUrl,\n\t\t\tissueId: params.issueId,\n\t\t\torganizationSlug: params.organizationSlug ?? context.constraints.organizationSlug\n\t\t});\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? context.constraints.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", parsed.organizationSlug);\n\t\tsetTag(\"issue.id\", parsed.issueId);\n\t\tawait ensureIssueWithinProjectConstraint({\n\t\t\tapiService,\n\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\tissueId: parsed.issueId,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tconst [activity, comments] = await Promise.all([apiService.getIssueActivity({\n\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\tissueId: parsed.issueId\n\t\t}), params.includeComments ? apiService.listIssueComments({\n\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\tissueId: parsed.issueId,\n\t\t\tlimit: params.limit\n\t\t}) : Promise.resolve([])]);\n\t\tconst output = [\n\t\t\t`# Activity for Issue ${parsed.issueId} in **${parsed.organizationSlug}**`,\n\t\t\t\"\",\n\t\t\t\"## Activity\",\n\t\t\t\"\",\n\t\t\tactivity.length === 0 ? \"No activity found.\" : activity.slice(0, params.limit).map(formatActivity).join(\"\\n\")\n\t\t];\n\t\tif (params.includeComments) {\n\t\t\toutput.push(\"\", \"## Comments\", \"\");\n\t\t\toutput.push(comments.length === 0 ? \"No comments found.\" : comments.slice(0, params.limit).map(formatActivity).join(\"\\n\"));\n\t\t}\n\t\tconst addNoteInstruction = formatAvailableToolCallInstruction({\n\t\t\ttoolName: \"add_issue_note\",\n\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames,\n\t\t\tpurpose: \"to add a new human-visible issue comment\"\n\t\t});\n\t\tif (addNoteInstruction) {\n\t\t\toutput.push(\"\", \"## Response Notes\", \"\");\n\t\t\toutput.push(`- ${addNoteInstruction}.`);\n\t\t}\n\t\treturn `${output.join(\"\\n\")}\\n`;\n\t}\n});\n\n//#endregion\nexport { get_issue_activity_default };\n//# sourceMappingURL=get-issue-activity-CKhQWy99.js.map","//#region src/internal/tool-helpers/breadcrumbs.ts\n/**\n* Fetches breadcrumbs from an issue event and formats them.\n* Defaults to the latest event when eventId is omitted.\n*/\nasync function fetchAndFormatBreadcrumbs(apiService, organizationSlug, issueId, eventId = \"latest\") {\n\tconst event = await apiService.getEventForIssue({\n\t\torganizationSlug,\n\t\tissueId,\n\t\teventId\n\t});\n\tconst breadcrumbEntry = event.entries.find((e) => e.type === \"breadcrumbs\");\n\tconst entryData = breadcrumbEntry?.data;\n\tconst breadcrumbs = entryData?.values ?? [];\n\treturn formatBreadcrumbs(breadcrumbs, issueId, event.id);\n}\nfunction formatBreadcrumbs(breadcrumbs, issueId, eventId) {\n\tif (breadcrumbs.length === 0) return [\n\t\t`# Breadcrumbs for ${issueId}`,\n\t\t\"\",\n\t\t`**Event ID**: ${eventId}`,\n\t\t\"\",\n\t\t\"No breadcrumbs found in this event for the issue.\"\n\t].join(\"\\n\");\n\tconst output = [\n\t\t`# Breadcrumbs for ${issueId}`,\n\t\t\"\",\n\t\t`**Event ID**: ${eventId}`,\n\t\t`**Total Breadcrumbs**: ${breadcrumbs.length}`,\n\t\t\"\",\n\t\t\"```\"\n\t];\n\tfor (const crumb of breadcrumbs) {\n\t\tconst timestamp = crumb.timestamp ? new Date(crumb.timestamp).toISOString() : \" \".repeat(24);\n\t\tconst level = (crumb.level ?? \"info\").padEnd(7);\n\t\tconst category = crumb.category ?? crumb.type ?? \"-\";\n\t\tconst message = cleanAndTruncate(crumb.message ?? \"\", 120);\n\t\tconst data = formatBreadcrumbData(crumb.data);\n\t\tconst parts = [`${timestamp} ${level} [${category}]`];\n\t\tif (message) parts.push(message);\n\t\tif (data) parts.push(data);\n\t\toutput.push(parts.join(\" \"));\n\t}\n\toutput.push(\"```\");\n\toutput.push(\"\", \"Breadcrumbs show the trail of events leading up to the error, in chronological order.\", `Use \\`get_sentry_resource(resourceType='issue', organizationSlug='...', resourceId='${issueId}')\\` for full issue details.`);\n\treturn output.join(\"\\n\");\n}\n/**\n* Formats breadcrumb data as a compact inline JSON string.\n*/\nfunction formatBreadcrumbData(data) {\n\tif (!data || Object.keys(data).length === 0) return \"\";\n\treturn cleanAndTruncate(JSON.stringify(data), 200);\n}\n/**\n* Strips newlines and truncates a string to maxLen characters.\n*/\nfunction cleanAndTruncate(str, maxLen) {\n\tconst clean = str.replace(/[\\r\\n]+/g, \" \");\n\tif (clean.length <= maxLen) return clean;\n\treturn `${clean.slice(0, maxLen)}...`;\n}\n\n//#endregion\nexport { cleanAndTruncate, fetchAndFormatBreadcrumbs, formatBreadcrumbData, formatBreadcrumbs };\n//# sourceMappingURL=breadcrumbs-BltIlpas.js.map","import { ParamEventIdOrLatest, ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { ApiNotFoundError } from \"./errors-DG2FreDU.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { enhanceNotFoundError } from \"./enhance-error-BDXGhe5E.js\";\nimport { parseIssueParams } from \"./issue-helpers-0Dnme3Ym.js\";\nimport { ensureIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { fetchAndFormatBreadcrumbs } from \"./breadcrumbs-BltIlpas.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-issue-breadcrumbs.ts\nvar get_issue_breadcrumbs_default = defineTool({\n\tname: \"get_issue_breadcrumbs\",\n\tskills: [\"inspect\", \"triage\"],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Get the breadcrumb trail from a Sentry issue event.\",\n\t\t\"Defaults to the latest event when eventId is omitted.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- See the user and application actions leading up to an error\",\n\t\t\"- Inspect navigation, console, HTTP, and other breadcrumb events\",\n\t\t\"- Reconstruct the immediate context before an issue occurred\",\n\t\t\"- Compare breadcrumb trails across multiple events in the same issue\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_issue_breadcrumbs(organizationSlug='my-org', issueId='PROJECT-123')\",\n\t\t\"get_issue_breadcrumbs(organizationSlug='my-org', issueId='PROJECT-123', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n\t\t\"get_issue_breadcrumbs(issueUrl='https://my-org.sentry.io/issues/PROJECT-123/')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\teventId: ParamEventIdOrLatest\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst parsed = parseIssueParams({\n\t\t\tissueUrl: params.issueUrl,\n\t\t\tissueId: params.issueId,\n\t\t\torganizationSlug: params.organizationSlug ?? context.constraints.organizationSlug\n\t\t});\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? context.constraints.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", parsed.organizationSlug);\n\t\tsetTag(\"issue.id\", parsed.issueId);\n\t\ttry {\n\t\t\tawait ensureIssueWithinProjectConstraint({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\t\tissueId: parsed.issueId,\n\t\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t\t});\n\t\t\treturn await fetchAndFormatBreadcrumbs(apiService, parsed.organizationSlug, parsed.issueId, params.eventId);\n\t\t} catch (error) {\n\t\t\tif (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {\n\t\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\t\tissueId: parsed.issueId,\n\t\t\t\teventId: params.eventId\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n});\n\n//#endregion\nexport { get_issue_breadcrumbs_default };\n//# sourceMappingURL=get-issue-breadcrumbs-D5AeF8Vm.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { ApiNotFoundError } from \"./errors-DG2FreDU.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { enhanceNotFoundError } from \"./enhance-error-BDXGhe5E.js\";\nimport { parseIssueParams } from \"./issue-helpers-0Dnme3Ym.js\";\nimport { ensureIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-issue-tag-values.ts\nconst getIssueTagValuesOutputSchema = z.object({ tag: z.object({\n\tkey: z.string(),\n\tname: z.string(),\n\ttotalValues: z.number(),\n\ttopValues: z.array(z.object({\n\t\tvalue: z.string().nullable(),\n\t\tcount: z.number(),\n\t\tfirstSeen: z.string().nullable(),\n\t\tlastSeen: z.string().nullable()\n\t}))\n}) });\nvar get_issue_tag_values_default = defineTool({\n\tname: \"get_issue_tag_values\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Get tag value distribution for a specific Sentry issue.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Understand how an issue is distributed across different tag values\",\n\t\t\"- Get aggregate counts of unique tag values (e.g., 'how many unique URLs are affected')\",\n\t\t\"- Analyze which browsers, environments, or URLs are most impacted by an issue\",\n\t\t\"- View the tag distributions page data programmatically\",\n\t\t\"\",\n\t\t\"Common tag keys:\",\n\t\t\"- `url`: Request URLs affected by the issue\",\n\t\t\"- `browser`: Browser types and versions\",\n\t\t\"- `browser.name`: Browser names only\",\n\t\t\"- `os`: Operating systems\",\n\t\t\"- `environment`: Deployment environments (production, staging, etc.)\",\n\t\t\"- `release`: Software releases\",\n\t\t\"- `device`: Device types\",\n\t\t\"- `user`: Affected users\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Get URL distribution for an issue\",\n\t\t\"```\",\n\t\t\"get_issue_tag_values(organizationSlug='my-organization', issueId='PROJECT-123', tagKey='url')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Get browser distribution using issue URL\",\n\t\t\"```\",\n\t\t\"get_issue_tag_values(issueUrl='https://sentry.io/issues/PROJECT-123/', tagKey='browser')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Get environment distribution\",\n\t\t\"```\",\n\t\t\"get_issue_tag_values(organizationSlug='my-organization', issueId='PROJECT-123', tagKey='environment')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If user provides a Sentry URL, pass the ENTIRE URL to issueUrl parameter unchanged\",\n\t\t\"- Common tag keys: url, browser, browser.name, os, environment, release, device, user\",\n\t\t\"- Tag keys are case-sensitive\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\ttagKey: z.string().trim().regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/, \"Tag key must contain only alphanumeric characters, dots, hyphens, and underscores, and must start with an alphanumeric character\").describe(\"The tag key to get values for (e.g., 'url', 'browser', 'environment', 'release').\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: getIssueTagValuesOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tif (!params.issueUrl && !params.issueId) throw new UserInputError(\"Either `issueId` or `issueUrl` must be provided\");\n\t\tif (!params.issueUrl && !params.organizationSlug) throw new UserInputError(\"`organizationSlug` is required when providing `issueId`\");\n\t\tif (!params.tagKey) throw new UserInputError(\"`tagKey` is required. Common values: url, browser, environment, release, os, device, user\");\n\t\tconst { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tissueId: params.issueId,\n\t\t\tissueUrl: params.issueUrl\n\t\t});\n\t\tsetTag(\"organization.slug\", orgSlug);\n\t\tawait ensureIssueWithinProjectConstraint({\n\t\t\tapiService,\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: parsedIssueId,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tlet tagValues;\n\t\ttry {\n\t\t\ttagValues = await apiService.getIssueTagValues({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId,\n\t\t\t\ttagKey: params.tagKey\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId,\n\t\t\t\ttagKey: params.tagKey\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t\treturn structuredResult({ tag: {\n\t\t\tkey: tagValues.key,\n\t\t\tname: tagValues.name,\n\t\t\ttotalValues: tagValues.totalValues,\n\t\t\ttopValues: tagValues.topValues.map((tagValue) => ({\n\t\t\t\tvalue: tagValue.value,\n\t\t\t\tcount: tagValue.count,\n\t\t\t\tfirstSeen: tagValue.firstSeen ?? null,\n\t\t\t\tlastSeen: tagValue.lastSeen ?? null\n\t\t\t}))\n\t\t} });\n\t}\n});\n\n//#endregion\nexport { getIssueTagValuesOutputSchema, get_issue_tag_values_default };\n//# sourceMappingURL=get-issue-tag-values-DtJZnl37.js.map","import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { formatDate } from \"./api-formatting-nIGXUFdx.js\";\nimport { parseIssueParams } from \"./issue-helpers-0Dnme3Ym.js\";\nimport { ensureIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-issue-user-reports.ts\nfunction getReporter(report) {\n\tconst userId = report.user?.id?.trim();\n\tconst userIdReporter = userId && ![\"none\", \"null\"].includes(userId.toLowerCase()) ? `user:${userId}` : null;\n\treturn report.name?.trim() || report.email?.trim() || report.user?.name?.trim() || report.user?.email?.trim() || report.user?.username?.trim() || userIdReporter || \"anonymous\";\n}\nfunction formatUserReport(report) {\n\tconst date = formatDate(report.dateCreated) ?? \"unknown time\";\n\tconst reporter = getReporter(report);\n\treturn `- ${date} by ${reporter}:\\n  - \"${report.comments}\"`;\n}\nvar get_issue_user_reports_default = defineTool({\n\tname: \"get_issue_user_reports\",\n\tskills: [\"inspect\", \"triage\"],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Get legacy User Reports or crash-report feedback attached to a Sentry issue.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- See what a user said happened when an error occurred\",\n\t\t\"- Check if any legacy bug reports or crash-report feedback were submitted for this issue\",\n\t\t\"- Get the human-provided context behind a crash, beyond the stack trace\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_issue_user_reports(organizationSlug='my-organization', issueId='PROJECT-123')\",\n\t\t\"get_issue_user_reports(issueUrl='https://my-organization.sentry.io/issues/PROJECT-123/')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- For standalone User Feedback Widget submissions, use `search_issues(query='issue.category:feedback')`.\",\n\t\t\"- Reuse pagination cursors only with the same issue scope.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\tcursor: z.string().trim().describe(\"Optional pagination cursor from a previous response.\").nullable().default(null),\n\t\tlimit: z.number().int().positive().max(100).describe(\"Maximum number of user reports to return.\").default(25)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst parsed = parseIssueParams({\n\t\t\tissueUrl: params.issueUrl,\n\t\t\tissueId: params.issueId,\n\t\t\torganizationSlug: params.organizationSlug ?? context.constraints.organizationSlug\n\t\t});\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? context.constraints.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", parsed.organizationSlug);\n\t\tsetTag(\"issue.id\", parsed.issueId);\n\t\tawait ensureIssueWithinProjectConstraint({\n\t\t\tapiService,\n\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\tissueId: parsed.issueId,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tconst { reports, nextCursor } = await apiService.getIssueUserReports({\n\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\tissueId: parsed.issueId,\n\t\t\tcursor: params.cursor,\n\t\t\tlimit: params.limit\n\t\t});\n\t\tconst output = [\n\t\t\t`# Issue User Reports for Issue ${parsed.issueId} in **${parsed.organizationSlug}**`,\n\t\t\t\"\",\n\t\t\treports.length === 0 ? \"No issue user reports found for this issue.\" : reports.map(formatUserReport).join(\"\\n\")\n\t\t];\n\t\tif (nextCursor) output.push(\"\", \"## Response Notes\", \"\", `- More user reports are available. Pass \\`cursor: \"${nextCursor}\"\\` with the same issue scope to fetch the next page.`);\n\t\treturn `${output.join(\"\\n\")}\\n`;\n\t}\n});\n\n//#endregion\nexport { get_issue_user_reports_default };\n//# sourceMappingURL=get-issue-user-reports-D73TLuX2.js.map","// src/anthropic-provider.ts\nimport {\n  InvalidArgumentError,\n  NoSuchModelError\n} from \"@ai-sdk/provider\";\nimport {\n  generateId as generateId2,\n  loadApiKey,\n  loadOptionalSetting,\n  withoutTrailingSlash,\n  withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/version.ts\nvar VERSION = true ? \"3.0.33\" : \"0.0.0-test\";\n\n// src/anthropic-messages-language-model.ts\nimport {\n  APICallError\n} from \"@ai-sdk/provider\";\nimport {\n  combineHeaders,\n  createEventSourceResponseHandler,\n  createJsonResponseHandler,\n  createToolNameMapping,\n  generateId,\n  parseProviderOptions as parseProviderOptions2,\n  postJsonToApi,\n  resolve\n} from \"@ai-sdk/provider-utils\";\n\n// src/anthropic-error.ts\nimport {\n  createJsonErrorResponseHandler,\n  lazySchema,\n  zodSchema\n} from \"@ai-sdk/provider-utils\";\nimport { z } from \"zod/v4\";\nvar anthropicErrorDataSchema = lazySchema(\n  () => zodSchema(\n    z.object({\n      type: z.literal(\"error\"),\n      error: z.object({\n        type: z.string(),\n        message: z.string()\n      })\n    })\n  )\n);\nvar anthropicFailedResponseHandler = createJsonErrorResponseHandler({\n  errorSchema: anthropicErrorDataSchema,\n  errorToMessage: (data) => data.error.message\n});\n\n// src/anthropic-messages-api.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar anthropicMessagesResponseSchema = lazySchema2(\n  () => zodSchema2(\n    z2.object({\n      type: z2.literal(\"message\"),\n      id: z2.string().nullish(),\n      model: z2.string().nullish(),\n      content: z2.array(\n        z2.discriminatedUnion(\"type\", [\n          z2.object({\n            type: z2.literal(\"text\"),\n            text: z2.string(),\n            citations: z2.array(\n              z2.discriminatedUnion(\"type\", [\n                z2.object({\n                  type: z2.literal(\"web_search_result_location\"),\n                  cited_text: z2.string(),\n                  url: z2.string(),\n                  title: z2.string(),\n                  encrypted_index: z2.string()\n                }),\n                z2.object({\n                  type: z2.literal(\"page_location\"),\n                  cited_text: z2.string(),\n                  document_index: z2.number(),\n                  document_title: z2.string().nullable(),\n                  start_page_number: z2.number(),\n                  end_page_number: z2.number()\n                }),\n                z2.object({\n                  type: z2.literal(\"char_location\"),\n                  cited_text: z2.string(),\n                  document_index: z2.number(),\n                  document_title: z2.string().nullable(),\n                  start_char_index: z2.number(),\n                  end_char_index: z2.number()\n                })\n              ])\n            ).optional()\n          }),\n          z2.object({\n            type: z2.literal(\"thinking\"),\n            thinking: z2.string(),\n            signature: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"redacted_thinking\"),\n            data: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"tool_use\"),\n            id: z2.string(),\n            name: z2.string(),\n            input: z2.unknown(),\n            // Programmatic tool calling: caller info when triggered from code execution\n            caller: z2.union([\n              z2.object({\n                type: z2.literal(\"code_execution_20250825\"),\n                tool_id: z2.string()\n              }),\n              z2.object({\n                type: z2.literal(\"direct\")\n              })\n            ]).optional()\n          }),\n          z2.object({\n            type: z2.literal(\"server_tool_use\"),\n            id: z2.string(),\n            name: z2.string(),\n            input: z2.record(z2.string(), z2.unknown()).nullish()\n          }),\n          z2.object({\n            type: z2.literal(\"mcp_tool_use\"),\n            id: z2.string(),\n            name: z2.string(),\n            input: z2.unknown(),\n            server_name: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"mcp_tool_result\"),\n            tool_use_id: z2.string(),\n            is_error: z2.boolean(),\n            content: z2.array(\n              z2.union([\n                z2.string(),\n                z2.object({ type: z2.literal(\"text\"), text: z2.string() })\n              ])\n            )\n          }),\n          z2.object({\n            type: z2.literal(\"web_fetch_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.union([\n              z2.object({\n                type: z2.literal(\"web_fetch_result\"),\n                url: z2.string(),\n                retrieved_at: z2.string(),\n                content: z2.object({\n                  type: z2.literal(\"document\"),\n                  title: z2.string().nullable(),\n                  citations: z2.object({ enabled: z2.boolean() }).optional(),\n                  source: z2.union([\n                    z2.object({\n                      type: z2.literal(\"base64\"),\n                      media_type: z2.literal(\"application/pdf\"),\n                      data: z2.string()\n                    }),\n                    z2.object({\n                      type: z2.literal(\"text\"),\n                      media_type: z2.literal(\"text/plain\"),\n                      data: z2.string()\n                    })\n                  ])\n                })\n              }),\n              z2.object({\n                type: z2.literal(\"web_fetch_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          }),\n          z2.object({\n            type: z2.literal(\"web_search_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.union([\n              z2.array(\n                z2.object({\n                  type: z2.literal(\"web_search_result\"),\n                  url: z2.string(),\n                  title: z2.string(),\n                  encrypted_content: z2.string(),\n                  page_age: z2.string().nullish()\n                })\n              ),\n              z2.object({\n                type: z2.literal(\"web_search_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          }),\n          // code execution results for code_execution_20250522 tool:\n          z2.object({\n            type: z2.literal(\"code_execution_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.union([\n              z2.object({\n                type: z2.literal(\"code_execution_result\"),\n                stdout: z2.string(),\n                stderr: z2.string(),\n                return_code: z2.number(),\n                content: z2.array(\n                  z2.object({\n                    type: z2.literal(\"code_execution_output\"),\n                    file_id: z2.string()\n                  })\n                ).optional().default([])\n              }),\n              z2.object({\n                type: z2.literal(\"code_execution_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          }),\n          // bash code execution results for code_execution_20250825 tool:\n          z2.object({\n            type: z2.literal(\"bash_code_execution_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.discriminatedUnion(\"type\", [\n              z2.object({\n                type: z2.literal(\"bash_code_execution_result\"),\n                content: z2.array(\n                  z2.object({\n                    type: z2.literal(\"bash_code_execution_output\"),\n                    file_id: z2.string()\n                  })\n                ),\n                stdout: z2.string(),\n                stderr: z2.string(),\n                return_code: z2.number()\n              }),\n              z2.object({\n                type: z2.literal(\"bash_code_execution_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          }),\n          // text editor code execution results for code_execution_20250825 tool:\n          z2.object({\n            type: z2.literal(\"text_editor_code_execution_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.discriminatedUnion(\"type\", [\n              z2.object({\n                type: z2.literal(\"text_editor_code_execution_tool_result_error\"),\n                error_code: z2.string()\n              }),\n              z2.object({\n                type: z2.literal(\"text_editor_code_execution_view_result\"),\n                content: z2.string(),\n                file_type: z2.string(),\n                num_lines: z2.number().nullable(),\n                start_line: z2.number().nullable(),\n                total_lines: z2.number().nullable()\n              }),\n              z2.object({\n                type: z2.literal(\"text_editor_code_execution_create_result\"),\n                is_file_update: z2.boolean()\n              }),\n              z2.object({\n                type: z2.literal(\n                  \"text_editor_code_execution_str_replace_result\"\n                ),\n                lines: z2.array(z2.string()).nullable(),\n                new_lines: z2.number().nullable(),\n                new_start: z2.number().nullable(),\n                old_lines: z2.number().nullable(),\n                old_start: z2.number().nullable()\n              })\n            ])\n          }),\n          // tool search tool results for tool_search_tool_regex_20251119 and tool_search_tool_bm25_20251119:\n          z2.object({\n            type: z2.literal(\"tool_search_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.union([\n              z2.object({\n                type: z2.literal(\"tool_search_tool_search_result\"),\n                tool_references: z2.array(\n                  z2.object({\n                    type: z2.literal(\"tool_reference\"),\n                    tool_name: z2.string()\n                  })\n                )\n              }),\n              z2.object({\n                type: z2.literal(\"tool_search_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          })\n        ])\n      ),\n      stop_reason: z2.string().nullish(),\n      stop_sequence: z2.string().nullish(),\n      usage: z2.looseObject({\n        input_tokens: z2.number(),\n        output_tokens: z2.number(),\n        cache_creation_input_tokens: z2.number().nullish(),\n        cache_read_input_tokens: z2.number().nullish()\n      }),\n      container: z2.object({\n        expires_at: z2.string(),\n        id: z2.string(),\n        skills: z2.array(\n          z2.object({\n            type: z2.union([z2.literal(\"anthropic\"), z2.literal(\"custom\")]),\n            skill_id: z2.string(),\n            version: z2.string()\n          })\n        ).nullish()\n      }).nullish(),\n      context_management: z2.object({\n        applied_edits: z2.array(\n          z2.union([\n            z2.object({\n              type: z2.literal(\"clear_tool_uses_20250919\"),\n              cleared_tool_uses: z2.number(),\n              cleared_input_tokens: z2.number()\n            }),\n            z2.object({\n              type: z2.literal(\"clear_thinking_20251015\"),\n              cleared_thinking_turns: z2.number(),\n              cleared_input_tokens: z2.number()\n            })\n          ])\n        )\n      }).nullish()\n    })\n  )\n);\nvar anthropicMessagesChunkSchema = lazySchema2(\n  () => zodSchema2(\n    z2.discriminatedUnion(\"type\", [\n      z2.object({\n        type: z2.literal(\"message_start\"),\n        message: z2.object({\n          id: z2.string().nullish(),\n          model: z2.string().nullish(),\n          role: z2.string().nullish(),\n          usage: z2.looseObject({\n            input_tokens: z2.number(),\n            cache_creation_input_tokens: z2.number().nullish(),\n            cache_read_input_tokens: z2.number().nullish()\n          }),\n          // Programmatic tool calling: content may be pre-populated for deferred tool calls\n          content: z2.array(\n            z2.discriminatedUnion(\"type\", [\n              z2.object({\n                type: z2.literal(\"tool_use\"),\n                id: z2.string(),\n                name: z2.string(),\n                input: z2.unknown(),\n                caller: z2.union([\n                  z2.object({\n                    type: z2.literal(\"code_execution_20250825\"),\n                    tool_id: z2.string()\n                  }),\n                  z2.object({\n                    type: z2.literal(\"direct\")\n                  })\n                ]).optional()\n              })\n            ])\n          ).nullish(),\n          stop_reason: z2.string().nullish(),\n          container: z2.object({\n            expires_at: z2.string(),\n            id: z2.string()\n          }).nullish()\n        })\n      }),\n      z2.object({\n        type: z2.literal(\"content_block_start\"),\n        index: z2.number(),\n        content_block: z2.discriminatedUnion(\"type\", [\n          z2.object({\n            type: z2.literal(\"text\"),\n            text: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"thinking\"),\n            thinking: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"tool_use\"),\n            id: z2.string(),\n            name: z2.string(),\n            // Programmatic tool calling: input may be present directly for deferred tool calls\n            input: z2.record(z2.string(), z2.unknown()).optional(),\n            // Programmatic tool calling: caller info when triggered from code execution\n            caller: z2.union([\n              z2.object({\n                type: z2.literal(\"code_execution_20250825\"),\n                tool_id: z2.string()\n              }),\n              z2.object({\n                type: z2.literal(\"direct\")\n              })\n            ]).optional()\n          }),\n          z2.object({\n            type: z2.literal(\"redacted_thinking\"),\n            data: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"server_tool_use\"),\n            id: z2.string(),\n            name: z2.string(),\n            input: z2.record(z2.string(), z2.unknown()).nullish()\n          }),\n          z2.object({\n            type: z2.literal(\"mcp_tool_use\"),\n            id: z2.string(),\n            name: z2.string(),\n            input: z2.unknown(),\n            server_name: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"mcp_tool_result\"),\n            tool_use_id: z2.string(),\n            is_error: z2.boolean(),\n            content: z2.array(\n              z2.union([\n                z2.string(),\n                z2.object({ type: z2.literal(\"text\"), text: z2.string() })\n              ])\n            )\n          }),\n          z2.object({\n            type: z2.literal(\"web_fetch_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.union([\n              z2.object({\n                type: z2.literal(\"web_fetch_result\"),\n                url: z2.string(),\n                retrieved_at: z2.string(),\n                content: z2.object({\n                  type: z2.literal(\"document\"),\n                  title: z2.string().nullable(),\n                  citations: z2.object({ enabled: z2.boolean() }).optional(),\n                  source: z2.union([\n                    z2.object({\n                      type: z2.literal(\"base64\"),\n                      media_type: z2.literal(\"application/pdf\"),\n                      data: z2.string()\n                    }),\n                    z2.object({\n                      type: z2.literal(\"text\"),\n                      media_type: z2.literal(\"text/plain\"),\n                      data: z2.string()\n                    })\n                  ])\n                })\n              }),\n              z2.object({\n                type: z2.literal(\"web_fetch_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          }),\n          z2.object({\n            type: z2.literal(\"web_search_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.union([\n              z2.array(\n                z2.object({\n                  type: z2.literal(\"web_search_result\"),\n                  url: z2.string(),\n                  title: z2.string(),\n                  encrypted_content: z2.string(),\n                  page_age: z2.string().nullish()\n                })\n              ),\n              z2.object({\n                type: z2.literal(\"web_search_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          }),\n          // code execution results for code_execution_20250522 tool:\n          z2.object({\n            type: z2.literal(\"code_execution_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.union([\n              z2.object({\n                type: z2.literal(\"code_execution_result\"),\n                stdout: z2.string(),\n                stderr: z2.string(),\n                return_code: z2.number(),\n                content: z2.array(\n                  z2.object({\n                    type: z2.literal(\"code_execution_output\"),\n                    file_id: z2.string()\n                  })\n                ).optional().default([])\n              }),\n              z2.object({\n                type: z2.literal(\"code_execution_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          }),\n          // bash code execution results for code_execution_20250825 tool:\n          z2.object({\n            type: z2.literal(\"bash_code_execution_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.discriminatedUnion(\"type\", [\n              z2.object({\n                type: z2.literal(\"bash_code_execution_result\"),\n                content: z2.array(\n                  z2.object({\n                    type: z2.literal(\"bash_code_execution_output\"),\n                    file_id: z2.string()\n                  })\n                ),\n                stdout: z2.string(),\n                stderr: z2.string(),\n                return_code: z2.number()\n              }),\n              z2.object({\n                type: z2.literal(\"bash_code_execution_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          }),\n          // text editor code execution results for code_execution_20250825 tool:\n          z2.object({\n            type: z2.literal(\"text_editor_code_execution_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.discriminatedUnion(\"type\", [\n              z2.object({\n                type: z2.literal(\"text_editor_code_execution_tool_result_error\"),\n                error_code: z2.string()\n              }),\n              z2.object({\n                type: z2.literal(\"text_editor_code_execution_view_result\"),\n                content: z2.string(),\n                file_type: z2.string(),\n                num_lines: z2.number().nullable(),\n                start_line: z2.number().nullable(),\n                total_lines: z2.number().nullable()\n              }),\n              z2.object({\n                type: z2.literal(\"text_editor_code_execution_create_result\"),\n                is_file_update: z2.boolean()\n              }),\n              z2.object({\n                type: z2.literal(\n                  \"text_editor_code_execution_str_replace_result\"\n                ),\n                lines: z2.array(z2.string()).nullable(),\n                new_lines: z2.number().nullable(),\n                new_start: z2.number().nullable(),\n                old_lines: z2.number().nullable(),\n                old_start: z2.number().nullable()\n              })\n            ])\n          }),\n          // tool search tool results for tool_search_tool_regex_20251119 and tool_search_tool_bm25_20251119:\n          z2.object({\n            type: z2.literal(\"tool_search_tool_result\"),\n            tool_use_id: z2.string(),\n            content: z2.union([\n              z2.object({\n                type: z2.literal(\"tool_search_tool_search_result\"),\n                tool_references: z2.array(\n                  z2.object({\n                    type: z2.literal(\"tool_reference\"),\n                    tool_name: z2.string()\n                  })\n                )\n              }),\n              z2.object({\n                type: z2.literal(\"tool_search_tool_result_error\"),\n                error_code: z2.string()\n              })\n            ])\n          })\n        ])\n      }),\n      z2.object({\n        type: z2.literal(\"content_block_delta\"),\n        index: z2.number(),\n        delta: z2.discriminatedUnion(\"type\", [\n          z2.object({\n            type: z2.literal(\"input_json_delta\"),\n            partial_json: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"text_delta\"),\n            text: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"thinking_delta\"),\n            thinking: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"signature_delta\"),\n            signature: z2.string()\n          }),\n          z2.object({\n            type: z2.literal(\"citations_delta\"),\n            citation: z2.discriminatedUnion(\"type\", [\n              z2.object({\n                type: z2.literal(\"web_search_result_location\"),\n                cited_text: z2.string(),\n                url: z2.string(),\n                title: z2.string(),\n                encrypted_index: z2.string()\n              }),\n              z2.object({\n                type: z2.literal(\"page_location\"),\n                cited_text: z2.string(),\n                document_index: z2.number(),\n                document_title: z2.string().nullable(),\n                start_page_number: z2.number(),\n                end_page_number: z2.number()\n              }),\n              z2.object({\n                type: z2.literal(\"char_location\"),\n                cited_text: z2.string(),\n                document_index: z2.number(),\n                document_title: z2.string().nullable(),\n                start_char_index: z2.number(),\n                end_char_index: z2.number()\n              })\n            ])\n          })\n        ])\n      }),\n      z2.object({\n        type: z2.literal(\"content_block_stop\"),\n        index: z2.number()\n      }),\n      z2.object({\n        type: z2.literal(\"error\"),\n        error: z2.object({\n          type: z2.string(),\n          message: z2.string()\n        })\n      }),\n      z2.object({\n        type: z2.literal(\"message_delta\"),\n        delta: z2.object({\n          stop_reason: z2.string().nullish(),\n          stop_sequence: z2.string().nullish(),\n          container: z2.object({\n            expires_at: z2.string(),\n            id: z2.string(),\n            skills: z2.array(\n              z2.object({\n                type: z2.union([\n                  z2.literal(\"anthropic\"),\n                  z2.literal(\"custom\")\n                ]),\n                skill_id: z2.string(),\n                version: z2.string()\n              })\n            ).nullish()\n          }).nullish()\n        }),\n        usage: z2.looseObject({\n          input_tokens: z2.number().nullish(),\n          output_tokens: z2.number(),\n          cache_creation_input_tokens: z2.number().nullish(),\n          cache_read_input_tokens: z2.number().nullish()\n        }),\n        context_management: z2.object({\n          applied_edits: z2.array(\n            z2.union([\n              z2.object({\n                type: z2.literal(\"clear_tool_uses_20250919\"),\n                cleared_tool_uses: z2.number(),\n                cleared_input_tokens: z2.number()\n              }),\n              z2.object({\n                type: z2.literal(\"clear_thinking_20251015\"),\n                cleared_thinking_turns: z2.number(),\n                cleared_input_tokens: z2.number()\n              })\n            ])\n          )\n        }).nullish()\n      }),\n      z2.object({\n        type: z2.literal(\"message_stop\")\n      }),\n      z2.object({\n        type: z2.literal(\"ping\")\n      })\n    ])\n  )\n);\nvar anthropicReasoningMetadataSchema = lazySchema2(\n  () => zodSchema2(\n    z2.object({\n      signature: z2.string().optional(),\n      redactedData: z2.string().optional()\n    })\n  )\n);\n\n// src/anthropic-messages-options.ts\nimport { z as z3 } from \"zod/v4\";\nvar anthropicFilePartProviderOptions = z3.object({\n  /**\n   * Citation configuration for this document.\n   * When enabled, this document will generate citations in the response.\n   */\n  citations: z3.object({\n    /**\n     * Enable citations for this document\n     */\n    enabled: z3.boolean()\n  }).optional(),\n  /**\n   * Custom title for the document.\n   * If not provided, the filename will be used.\n   */\n  title: z3.string().optional(),\n  /**\n   * Context about the document that will be passed to the model\n   * but not used towards cited content.\n   * Useful for storing document metadata as text or stringified JSON.\n   */\n  context: z3.string().optional()\n});\nvar anthropicProviderOptions = z3.object({\n  /**\n   * Whether to send reasoning to the model.\n   *\n   * This allows you to deactivate reasoning inputs for models that do not support them.\n   */\n  sendReasoning: z3.boolean().optional(),\n  /**\n   * Determines how structured outputs are generated.\n   *\n   * - `outputFormat`: Use the `output_format` parameter to specify the structured output format.\n   * - `jsonTool`: Use a special 'json' tool to specify the structured output format.\n   * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default).\n   */\n  structuredOutputMode: z3.enum([\"outputFormat\", \"jsonTool\", \"auto\"]).optional(),\n  /**\n   * Configuration for enabling Claude's extended thinking.\n   *\n   * When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer.\n   * Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.\n   */\n  thinking: z3.object({\n    type: z3.union([z3.literal(\"enabled\"), z3.literal(\"disabled\")]),\n    budgetTokens: z3.number().optional()\n  }).optional(),\n  /**\n   * Whether to disable parallel function calling during tool use. Default is false.\n   * When set to true, Claude will use at most one tool per response.\n   */\n  disableParallelToolUse: z3.boolean().optional(),\n  /**\n   * Cache control settings for this message.\n   * See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching\n   */\n  cacheControl: z3.object({\n    type: z3.literal(\"ephemeral\"),\n    ttl: z3.union([z3.literal(\"5m\"), z3.literal(\"1h\")]).optional()\n  }).optional(),\n  /**\n   * MCP servers to be utilized in this request.\n   */\n  mcpServers: z3.array(\n    z3.object({\n      type: z3.literal(\"url\"),\n      name: z3.string(),\n      url: z3.string(),\n      authorizationToken: z3.string().nullish(),\n      toolConfiguration: z3.object({\n        enabled: z3.boolean().nullish(),\n        allowedTools: z3.array(z3.string()).nullish()\n      }).nullish()\n    })\n  ).optional(),\n  /**\n   * Agent Skills configuration. Skills enable Claude to perform specialized tasks\n   * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.\n   * Requires code execution tool to be enabled.\n   */\n  container: z3.object({\n    id: z3.string().optional(),\n    skills: z3.array(\n      z3.object({\n        type: z3.union([z3.literal(\"anthropic\"), z3.literal(\"custom\")]),\n        skillId: z3.string(),\n        version: z3.string().optional()\n      })\n    ).optional()\n  }).optional(),\n  /**\n   * Whether to enable tool streaming (and structured output streaming).\n   *\n   * When set to false, the model will return all tool calls and results\n   * at once after a delay.\n   *\n   * @default true\n   */\n  toolStreaming: z3.boolean().optional(),\n  /**\n   * @default 'high'\n   */\n  effort: z3.enum([\"low\", \"medium\", \"high\"]).optional(),\n  contextManagement: z3.object({\n    edits: z3.array(\n      z3.discriminatedUnion(\"type\", [\n        z3.object({\n          type: z3.literal(\"clear_tool_uses_20250919\"),\n          trigger: z3.discriminatedUnion(\"type\", [\n            z3.object({\n              type: z3.literal(\"input_tokens\"),\n              value: z3.number()\n            }),\n            z3.object({\n              type: z3.literal(\"tool_uses\"),\n              value: z3.number()\n            })\n          ]).optional(),\n          keep: z3.object({\n            type: z3.literal(\"tool_uses\"),\n            value: z3.number()\n          }).optional(),\n          clearAtLeast: z3.object({\n            type: z3.literal(\"input_tokens\"),\n            value: z3.number()\n          }).optional(),\n          clearToolInputs: z3.boolean().optional(),\n          excludeTools: z3.array(z3.string()).optional()\n        }),\n        z3.object({\n          type: z3.literal(\"clear_thinking_20251015\"),\n          keep: z3.union([\n            z3.literal(\"all\"),\n            z3.object({\n              type: z3.literal(\"thinking_turns\"),\n              value: z3.number()\n            })\n          ]).optional()\n        })\n      ])\n    )\n  }).optional()\n});\n\n// src/anthropic-prepare-tools.ts\nimport {\n  UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\n\n// src/get-cache-control.ts\nvar MAX_CACHE_BREAKPOINTS = 4;\nfunction getCacheControl(providerMetadata) {\n  var _a;\n  const anthropic2 = providerMetadata == null ? void 0 : providerMetadata.anthropic;\n  const cacheControlValue = (_a = anthropic2 == null ? void 0 : anthropic2.cacheControl) != null ? _a : anthropic2 == null ? void 0 : anthropic2.cache_control;\n  return cacheControlValue;\n}\nvar CacheControlValidator = class {\n  constructor() {\n    this.breakpointCount = 0;\n    this.warnings = [];\n  }\n  getCacheControl(providerMetadata, context) {\n    const cacheControlValue = getCacheControl(providerMetadata);\n    if (!cacheControlValue) {\n      return void 0;\n    }\n    if (!context.canCache) {\n      this.warnings.push({\n        type: \"unsupported\",\n        feature: \"cache_control on non-cacheable context\",\n        details: `cache_control cannot be set on ${context.type}. It will be ignored.`\n      });\n      return void 0;\n    }\n    this.breakpointCount++;\n    if (this.breakpointCount > MAX_CACHE_BREAKPOINTS) {\n      this.warnings.push({\n        type: \"unsupported\",\n        feature: \"cacheControl breakpoint limit\",\n        details: `Maximum ${MAX_CACHE_BREAKPOINTS} cache breakpoints exceeded (found ${this.breakpointCount}). This breakpoint will be ignored.`\n      });\n      return void 0;\n    }\n    return cacheControlValue;\n  }\n  getWarnings() {\n    return this.warnings;\n  }\n};\n\n// src/tool/text-editor_20250728.ts\nimport { createProviderToolFactory } from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod/v4\";\nimport { lazySchema as lazySchema3, zodSchema as zodSchema3 } from \"@ai-sdk/provider-utils\";\nvar textEditor_20250728ArgsSchema = lazySchema3(\n  () => zodSchema3(\n    z4.object({\n      maxCharacters: z4.number().optional()\n    })\n  )\n);\nvar textEditor_20250728InputSchema = lazySchema3(\n  () => zodSchema3(\n    z4.object({\n      command: z4.enum([\"view\", \"create\", \"str_replace\", \"insert\"]),\n      path: z4.string(),\n      file_text: z4.string().optional(),\n      insert_line: z4.number().int().optional(),\n      new_str: z4.string().optional(),\n      insert_text: z4.string().optional(),\n      old_str: z4.string().optional(),\n      view_range: z4.array(z4.number().int()).optional()\n    })\n  )\n);\nvar factory = createProviderToolFactory({\n  id: \"anthropic.text_editor_20250728\",\n  inputSchema: textEditor_20250728InputSchema\n});\nvar textEditor_20250728 = (args = {}) => {\n  return factory(args);\n};\n\n// src/tool/web-search_20250305.ts\nimport {\n  createProviderToolFactoryWithOutputSchema,\n  lazySchema as lazySchema4,\n  zodSchema as zodSchema4\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\nvar webSearch_20250305ArgsSchema = lazySchema4(\n  () => zodSchema4(\n    z5.object({\n      maxUses: z5.number().optional(),\n      allowedDomains: z5.array(z5.string()).optional(),\n      blockedDomains: z5.array(z5.string()).optional(),\n      userLocation: z5.object({\n        type: z5.literal(\"approximate\"),\n        city: z5.string().optional(),\n        region: z5.string().optional(),\n        country: z5.string().optional(),\n        timezone: z5.string().optional()\n      }).optional()\n    })\n  )\n);\nvar webSearch_20250305OutputSchema = lazySchema4(\n  () => zodSchema4(\n    z5.array(\n      z5.object({\n        url: z5.string(),\n        title: z5.string().nullable(),\n        pageAge: z5.string().nullable(),\n        encryptedContent: z5.string(),\n        type: z5.literal(\"web_search_result\")\n      })\n    )\n  )\n);\nvar webSearch_20250305InputSchema = lazySchema4(\n  () => zodSchema4(\n    z5.object({\n      query: z5.string()\n    })\n  )\n);\nvar factory2 = createProviderToolFactoryWithOutputSchema({\n  id: \"anthropic.web_search_20250305\",\n  inputSchema: webSearch_20250305InputSchema,\n  outputSchema: webSearch_20250305OutputSchema,\n  supportsDeferredResults: true\n});\nvar webSearch_20250305 = (args = {}) => {\n  return factory2(args);\n};\n\n// src/tool/web-fetch-20250910.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,\n  lazySchema as lazySchema5,\n  zodSchema as zodSchema5\n} from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar webFetch_20250910ArgsSchema = lazySchema5(\n  () => zodSchema5(\n    z6.object({\n      maxUses: z6.number().optional(),\n      allowedDomains: z6.array(z6.string()).optional(),\n      blockedDomains: z6.array(z6.string()).optional(),\n      citations: z6.object({ enabled: z6.boolean() }).optional(),\n      maxContentTokens: z6.number().optional()\n    })\n  )\n);\nvar webFetch_20250910OutputSchema = lazySchema5(\n  () => zodSchema5(\n    z6.object({\n      type: z6.literal(\"web_fetch_result\"),\n      url: z6.string(),\n      content: z6.object({\n        type: z6.literal(\"document\"),\n        title: z6.string().nullable(),\n        citations: z6.object({ enabled: z6.boolean() }).optional(),\n        source: z6.union([\n          z6.object({\n            type: z6.literal(\"base64\"),\n            mediaType: z6.literal(\"application/pdf\"),\n            data: z6.string()\n          }),\n          z6.object({\n            type: z6.literal(\"text\"),\n            mediaType: z6.literal(\"text/plain\"),\n            data: z6.string()\n          })\n        ])\n      }),\n      retrievedAt: z6.string().nullable()\n    })\n  )\n);\nvar webFetch_20250910InputSchema = lazySchema5(\n  () => zodSchema5(\n    z6.object({\n      url: z6.string()\n    })\n  )\n);\nvar factory3 = createProviderToolFactoryWithOutputSchema2({\n  id: \"anthropic.web_fetch_20250910\",\n  inputSchema: webFetch_20250910InputSchema,\n  outputSchema: webFetch_20250910OutputSchema,\n  supportsDeferredResults: true\n});\nvar webFetch_20250910 = (args = {}) => {\n  return factory3(args);\n};\n\n// src/anthropic-prepare-tools.ts\nimport { validateTypes } from \"@ai-sdk/provider-utils\";\nasync function prepareTools({\n  tools,\n  toolChoice,\n  disableParallelToolUse,\n  cacheControlValidator,\n  supportsStructuredOutput\n}) {\n  var _a;\n  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n  const toolWarnings = [];\n  const betas = /* @__PURE__ */ new Set();\n  const validator = cacheControlValidator || new CacheControlValidator();\n  if (tools == null) {\n    return { tools: void 0, toolChoice: void 0, toolWarnings, betas };\n  }\n  const anthropicTools2 = [];\n  for (const tool of tools) {\n    switch (tool.type) {\n      case \"function\": {\n        const cacheControl = validator.getCacheControl(tool.providerOptions, {\n          type: \"tool definition\",\n          canCache: true\n        });\n        const anthropicOptions = (_a = tool.providerOptions) == null ? void 0 : _a.anthropic;\n        const deferLoading = anthropicOptions == null ? void 0 : anthropicOptions.deferLoading;\n        const allowedCallers = anthropicOptions == null ? void 0 : anthropicOptions.allowedCallers;\n        anthropicTools2.push({\n          name: tool.name,\n          description: tool.description,\n          input_schema: tool.inputSchema,\n          cache_control: cacheControl,\n          ...supportsStructuredOutput === true && tool.strict != null ? { strict: tool.strict } : {},\n          ...deferLoading != null ? { defer_loading: deferLoading } : {},\n          ...allowedCallers != null ? { allowed_callers: allowedCallers } : {},\n          ...tool.inputExamples != null ? {\n            input_examples: tool.inputExamples.map(\n              (example) => example.input\n            )\n          } : {}\n        });\n        if (supportsStructuredOutput === true) {\n          betas.add(\"structured-outputs-2025-11-13\");\n        }\n        if (tool.inputExamples != null || allowedCallers != null) {\n          betas.add(\"advanced-tool-use-2025-11-20\");\n        }\n        break;\n      }\n      case \"provider\": {\n        switch (tool.id) {\n          case \"anthropic.code_execution_20250522\": {\n            betas.add(\"code-execution-2025-05-22\");\n            anthropicTools2.push({\n              type: \"code_execution_20250522\",\n              name: \"code_execution\",\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.code_execution_20250825\": {\n            betas.add(\"code-execution-2025-08-25\");\n            anthropicTools2.push({\n              type: \"code_execution_20250825\",\n              name: \"code_execution\"\n            });\n            break;\n          }\n          case \"anthropic.computer_20250124\": {\n            betas.add(\"computer-use-2025-01-24\");\n            anthropicTools2.push({\n              name: \"computer\",\n              type: \"computer_20250124\",\n              display_width_px: tool.args.displayWidthPx,\n              display_height_px: tool.args.displayHeightPx,\n              display_number: tool.args.displayNumber,\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.computer_20251124\": {\n            betas.add(\"computer-use-2025-11-24\");\n            anthropicTools2.push({\n              name: \"computer\",\n              type: \"computer_20251124\",\n              display_width_px: tool.args.displayWidthPx,\n              display_height_px: tool.args.displayHeightPx,\n              display_number: tool.args.displayNumber,\n              enable_zoom: tool.args.enableZoom,\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.computer_20241022\": {\n            betas.add(\"computer-use-2024-10-22\");\n            anthropicTools2.push({\n              name: \"computer\",\n              type: \"computer_20241022\",\n              display_width_px: tool.args.displayWidthPx,\n              display_height_px: tool.args.displayHeightPx,\n              display_number: tool.args.displayNumber,\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.text_editor_20250124\": {\n            betas.add(\"computer-use-2025-01-24\");\n            anthropicTools2.push({\n              name: \"str_replace_editor\",\n              type: \"text_editor_20250124\",\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.text_editor_20241022\": {\n            betas.add(\"computer-use-2024-10-22\");\n            anthropicTools2.push({\n              name: \"str_replace_editor\",\n              type: \"text_editor_20241022\",\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.text_editor_20250429\": {\n            betas.add(\"computer-use-2025-01-24\");\n            anthropicTools2.push({\n              name: \"str_replace_based_edit_tool\",\n              type: \"text_editor_20250429\",\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.text_editor_20250728\": {\n            const args = await validateTypes({\n              value: tool.args,\n              schema: textEditor_20250728ArgsSchema\n            });\n            anthropicTools2.push({\n              name: \"str_replace_based_edit_tool\",\n              type: \"text_editor_20250728\",\n              max_characters: args.maxCharacters,\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.bash_20250124\": {\n            betas.add(\"computer-use-2025-01-24\");\n            anthropicTools2.push({\n              name: \"bash\",\n              type: \"bash_20250124\",\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.bash_20241022\": {\n            betas.add(\"computer-use-2024-10-22\");\n            anthropicTools2.push({\n              name: \"bash\",\n              type: \"bash_20241022\",\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.memory_20250818\": {\n            betas.add(\"context-management-2025-06-27\");\n            anthropicTools2.push({\n              name: \"memory\",\n              type: \"memory_20250818\"\n            });\n            break;\n          }\n          case \"anthropic.web_fetch_20250910\": {\n            betas.add(\"web-fetch-2025-09-10\");\n            const args = await validateTypes({\n              value: tool.args,\n              schema: webFetch_20250910ArgsSchema\n            });\n            anthropicTools2.push({\n              type: \"web_fetch_20250910\",\n              name: \"web_fetch\",\n              max_uses: args.maxUses,\n              allowed_domains: args.allowedDomains,\n              blocked_domains: args.blockedDomains,\n              citations: args.citations,\n              max_content_tokens: args.maxContentTokens,\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.web_search_20250305\": {\n            const args = await validateTypes({\n              value: tool.args,\n              schema: webSearch_20250305ArgsSchema\n            });\n            anthropicTools2.push({\n              type: \"web_search_20250305\",\n              name: \"web_search\",\n              max_uses: args.maxUses,\n              allowed_domains: args.allowedDomains,\n              blocked_domains: args.blockedDomains,\n              user_location: args.userLocation,\n              cache_control: void 0\n            });\n            break;\n          }\n          case \"anthropic.tool_search_regex_20251119\": {\n            betas.add(\"advanced-tool-use-2025-11-20\");\n            anthropicTools2.push({\n              type: \"tool_search_tool_regex_20251119\",\n              name: \"tool_search_tool_regex\"\n            });\n            break;\n          }\n          case \"anthropic.tool_search_bm25_20251119\": {\n            betas.add(\"advanced-tool-use-2025-11-20\");\n            anthropicTools2.push({\n              type: \"tool_search_tool_bm25_20251119\",\n              name: \"tool_search_tool_bm25\"\n            });\n            break;\n          }\n          default: {\n            toolWarnings.push({\n              type: \"unsupported\",\n              feature: `provider-defined tool ${tool.id}`\n            });\n            break;\n          }\n        }\n        break;\n      }\n      default: {\n        toolWarnings.push({\n          type: \"unsupported\",\n          feature: `tool ${tool}`\n        });\n        break;\n      }\n    }\n  }\n  if (toolChoice == null) {\n    return {\n      tools: anthropicTools2,\n      toolChoice: disableParallelToolUse ? { type: \"auto\", disable_parallel_tool_use: disableParallelToolUse } : void 0,\n      toolWarnings,\n      betas\n    };\n  }\n  const type = toolChoice.type;\n  switch (type) {\n    case \"auto\":\n      return {\n        tools: anthropicTools2,\n        toolChoice: {\n          type: \"auto\",\n          disable_parallel_tool_use: disableParallelToolUse\n        },\n        toolWarnings,\n        betas\n      };\n    case \"required\":\n      return {\n        tools: anthropicTools2,\n        toolChoice: {\n          type: \"any\",\n          disable_parallel_tool_use: disableParallelToolUse\n        },\n        toolWarnings,\n        betas\n      };\n    case \"none\":\n      return { tools: void 0, toolChoice: void 0, toolWarnings, betas };\n    case \"tool\":\n      return {\n        tools: anthropicTools2,\n        toolChoice: {\n          type: \"tool\",\n          name: toolChoice.toolName,\n          disable_parallel_tool_use: disableParallelToolUse\n        },\n        toolWarnings,\n        betas\n      };\n    default: {\n      const _exhaustiveCheck = type;\n      throw new UnsupportedFunctionalityError({\n        functionality: `tool choice type: ${_exhaustiveCheck}`\n      });\n    }\n  }\n}\n\n// src/convert-anthropic-messages-usage.ts\nfunction convertAnthropicMessagesUsage(usage) {\n  var _a, _b;\n  const inputTokens = usage.input_tokens;\n  const outputTokens = usage.output_tokens;\n  const cacheCreationTokens = (_a = usage.cache_creation_input_tokens) != null ? _a : 0;\n  const cacheReadTokens = (_b = usage.cache_read_input_tokens) != null ? _b : 0;\n  return {\n    inputTokens: {\n      total: inputTokens + cacheCreationTokens + cacheReadTokens,\n      noCache: inputTokens,\n      cacheRead: cacheReadTokens,\n      cacheWrite: cacheCreationTokens\n    },\n    outputTokens: {\n      total: outputTokens,\n      text: void 0,\n      reasoning: void 0\n    },\n    raw: usage\n  };\n}\n\n// src/convert-to-anthropic-messages-prompt.ts\nimport {\n  UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nimport {\n  convertToBase64,\n  parseProviderOptions,\n  validateTypes as validateTypes2,\n  isNonNullable\n} from \"@ai-sdk/provider-utils\";\n\n// src/tool/code-execution_20250522.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema3,\n  lazySchema as lazySchema6,\n  zodSchema as zodSchema6\n} from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod/v4\";\nvar codeExecution_20250522OutputSchema = lazySchema6(\n  () => zodSchema6(\n    z7.object({\n      type: z7.literal(\"code_execution_result\"),\n      stdout: z7.string(),\n      stderr: z7.string(),\n      return_code: z7.number(),\n      content: z7.array(\n        z7.object({\n          type: z7.literal(\"code_execution_output\"),\n          file_id: z7.string()\n        })\n      ).optional().default([])\n    })\n  )\n);\nvar codeExecution_20250522InputSchema = lazySchema6(\n  () => zodSchema6(\n    z7.object({\n      code: z7.string()\n    })\n  )\n);\nvar factory4 = createProviderToolFactoryWithOutputSchema3({\n  id: \"anthropic.code_execution_20250522\",\n  inputSchema: codeExecution_20250522InputSchema,\n  outputSchema: codeExecution_20250522OutputSchema\n});\nvar codeExecution_20250522 = (args = {}) => {\n  return factory4(args);\n};\n\n// src/tool/code-execution_20250825.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema4,\n  lazySchema as lazySchema7,\n  zodSchema as zodSchema7\n} from \"@ai-sdk/provider-utils\";\nimport { z as z8 } from \"zod/v4\";\nvar codeExecution_20250825OutputSchema = lazySchema7(\n  () => zodSchema7(\n    z8.discriminatedUnion(\"type\", [\n      z8.object({\n        type: z8.literal(\"code_execution_result\"),\n        stdout: z8.string(),\n        stderr: z8.string(),\n        return_code: z8.number(),\n        content: z8.array(\n          z8.object({\n            type: z8.literal(\"code_execution_output\"),\n            file_id: z8.string()\n          })\n        ).optional().default([])\n      }),\n      z8.object({\n        type: z8.literal(\"bash_code_execution_result\"),\n        content: z8.array(\n          z8.object({\n            type: z8.literal(\"bash_code_execution_output\"),\n            file_id: z8.string()\n          })\n        ),\n        stdout: z8.string(),\n        stderr: z8.string(),\n        return_code: z8.number()\n      }),\n      z8.object({\n        type: z8.literal(\"bash_code_execution_tool_result_error\"),\n        error_code: z8.string()\n      }),\n      z8.object({\n        type: z8.literal(\"text_editor_code_execution_tool_result_error\"),\n        error_code: z8.string()\n      }),\n      z8.object({\n        type: z8.literal(\"text_editor_code_execution_view_result\"),\n        content: z8.string(),\n        file_type: z8.string(),\n        num_lines: z8.number().nullable(),\n        start_line: z8.number().nullable(),\n        total_lines: z8.number().nullable()\n      }),\n      z8.object({\n        type: z8.literal(\"text_editor_code_execution_create_result\"),\n        is_file_update: z8.boolean()\n      }),\n      z8.object({\n        type: z8.literal(\"text_editor_code_execution_str_replace_result\"),\n        lines: z8.array(z8.string()).nullable(),\n        new_lines: z8.number().nullable(),\n        new_start: z8.number().nullable(),\n        old_lines: z8.number().nullable(),\n        old_start: z8.number().nullable()\n      })\n    ])\n  )\n);\nvar codeExecution_20250825InputSchema = lazySchema7(\n  () => zodSchema7(\n    z8.discriminatedUnion(\"type\", [\n      // Programmatic tool calling format (mapped from { code } by AI SDK)\n      z8.object({\n        type: z8.literal(\"programmatic-tool-call\"),\n        code: z8.string()\n      }),\n      z8.object({\n        type: z8.literal(\"bash_code_execution\"),\n        command: z8.string()\n      }),\n      z8.discriminatedUnion(\"command\", [\n        z8.object({\n          type: z8.literal(\"text_editor_code_execution\"),\n          command: z8.literal(\"view\"),\n          path: z8.string()\n        }),\n        z8.object({\n          type: z8.literal(\"text_editor_code_execution\"),\n          command: z8.literal(\"create\"),\n          path: z8.string(),\n          file_text: z8.string().nullish()\n        }),\n        z8.object({\n          type: z8.literal(\"text_editor_code_execution\"),\n          command: z8.literal(\"str_replace\"),\n          path: z8.string(),\n          old_str: z8.string(),\n          new_str: z8.string()\n        })\n      ])\n    ])\n  )\n);\nvar factory5 = createProviderToolFactoryWithOutputSchema4({\n  id: \"anthropic.code_execution_20250825\",\n  inputSchema: codeExecution_20250825InputSchema,\n  outputSchema: codeExecution_20250825OutputSchema,\n  // Programmatic tool calling: tool results may be deferred to a later turn\n  // when code execution triggers a client-executed tool that needs to be\n  // resolved before the code execution result can be returned.\n  supportsDeferredResults: true\n});\nvar codeExecution_20250825 = (args = {}) => {\n  return factory5(args);\n};\n\n// src/tool/tool-search-regex_20251119.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema5,\n  lazySchema as lazySchema8,\n  zodSchema as zodSchema8\n} from \"@ai-sdk/provider-utils\";\nimport { z as z9 } from \"zod/v4\";\nvar toolSearchRegex_20251119OutputSchema = lazySchema8(\n  () => zodSchema8(\n    z9.array(\n      z9.object({\n        type: z9.literal(\"tool_reference\"),\n        toolName: z9.string()\n      })\n    )\n  )\n);\nvar toolSearchRegex_20251119InputSchema = lazySchema8(\n  () => zodSchema8(\n    z9.object({\n      /**\n       * A regex pattern to search for tools.\n       * Uses Python re.search() syntax. Maximum 200 characters.\n       *\n       * Examples:\n       * - \"weather\" - matches tool names/descriptions containing \"weather\"\n       * - \"get_.*_data\" - matches tools like get_user_data, get_weather_data\n       * - \"database.*query|query.*database\" - OR patterns for flexibility\n       * - \"(?i)slack\" - case-insensitive search\n       */\n      pattern: z9.string(),\n      /**\n       * Maximum number of tools to return. Optional.\n       */\n      limit: z9.number().optional()\n    })\n  )\n);\nvar factory6 = createProviderToolFactoryWithOutputSchema5({\n  id: \"anthropic.tool_search_regex_20251119\",\n  inputSchema: toolSearchRegex_20251119InputSchema,\n  outputSchema: toolSearchRegex_20251119OutputSchema,\n  supportsDeferredResults: true\n});\nvar toolSearchRegex_20251119 = (args = {}) => {\n  return factory6(args);\n};\n\n// src/convert-to-anthropic-messages-prompt.ts\nfunction convertToString(data) {\n  if (typeof data === \"string\") {\n    return Buffer.from(data, \"base64\").toString(\"utf-8\");\n  }\n  if (data instanceof Uint8Array) {\n    return new TextDecoder().decode(data);\n  }\n  if (data instanceof URL) {\n    throw new UnsupportedFunctionalityError2({\n      functionality: \"URL-based text documents are not supported for citations\"\n    });\n  }\n  throw new UnsupportedFunctionalityError2({\n    functionality: `unsupported data type for text documents: ${typeof data}`\n  });\n}\nfunction isUrlData(data) {\n  return data instanceof URL || isUrlString(data);\n}\nfunction isUrlString(data) {\n  return typeof data === \"string\" && /^https?:\\/\\//i.test(data);\n}\nfunction getUrlString(data) {\n  return data instanceof URL ? data.toString() : data;\n}\nasync function convertToAnthropicMessagesPrompt({\n  prompt,\n  sendReasoning,\n  warnings,\n  cacheControlValidator,\n  toolNameMapping\n}) {\n  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;\n  const betas = /* @__PURE__ */ new Set();\n  const blocks = groupIntoBlocks(prompt);\n  const validator = cacheControlValidator || new CacheControlValidator();\n  let system = void 0;\n  const messages = [];\n  async function shouldEnableCitations(providerMetadata) {\n    var _a2, _b2;\n    const anthropicOptions = await parseProviderOptions({\n      provider: \"anthropic\",\n      providerOptions: providerMetadata,\n      schema: anthropicFilePartProviderOptions\n    });\n    return (_b2 = (_a2 = anthropicOptions == null ? void 0 : anthropicOptions.citations) == null ? void 0 : _a2.enabled) != null ? _b2 : false;\n  }\n  async function getDocumentMetadata(providerMetadata) {\n    const anthropicOptions = await parseProviderOptions({\n      provider: \"anthropic\",\n      providerOptions: providerMetadata,\n      schema: anthropicFilePartProviderOptions\n    });\n    return {\n      title: anthropicOptions == null ? void 0 : anthropicOptions.title,\n      context: anthropicOptions == null ? void 0 : anthropicOptions.context\n    };\n  }\n  for (let i = 0; i < blocks.length; i++) {\n    const block = blocks[i];\n    const isLastBlock = i === blocks.length - 1;\n    const type = block.type;\n    switch (type) {\n      case \"system\": {\n        if (system != null) {\n          throw new UnsupportedFunctionalityError2({\n            functionality: \"Multiple system messages that are separated by user/assistant messages\"\n          });\n        }\n        system = block.messages.map(({ content, providerOptions }) => ({\n          type: \"text\",\n          text: content,\n          cache_control: validator.getCacheControl(providerOptions, {\n            type: \"system message\",\n            canCache: true\n          })\n        }));\n        break;\n      }\n      case \"user\": {\n        const anthropicContent = [];\n        for (const message of block.messages) {\n          const { role, content } = message;\n          switch (role) {\n            case \"user\": {\n              for (let j = 0; j < content.length; j++) {\n                const part = content[j];\n                const isLastPart = j === content.length - 1;\n                const cacheControl = (_a = validator.getCacheControl(part.providerOptions, {\n                  type: \"user message part\",\n                  canCache: true\n                })) != null ? _a : isLastPart ? validator.getCacheControl(message.providerOptions, {\n                  type: \"user message\",\n                  canCache: true\n                }) : void 0;\n                switch (part.type) {\n                  case \"text\": {\n                    anthropicContent.push({\n                      type: \"text\",\n                      text: part.text,\n                      cache_control: cacheControl\n                    });\n                    break;\n                  }\n                  case \"file\": {\n                    if (part.mediaType.startsWith(\"image/\")) {\n                      anthropicContent.push({\n                        type: \"image\",\n                        source: isUrlData(part.data) ? {\n                          type: \"url\",\n                          url: getUrlString(part.data)\n                        } : {\n                          type: \"base64\",\n                          media_type: part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType,\n                          data: convertToBase64(part.data)\n                        },\n                        cache_control: cacheControl\n                      });\n                    } else if (part.mediaType === \"application/pdf\") {\n                      betas.add(\"pdfs-2024-09-25\");\n                      const enableCitations = await shouldEnableCitations(\n                        part.providerOptions\n                      );\n                      const metadata = await getDocumentMetadata(\n                        part.providerOptions\n                      );\n                      anthropicContent.push({\n                        type: \"document\",\n                        source: isUrlData(part.data) ? {\n                          type: \"url\",\n                          url: getUrlString(part.data)\n                        } : {\n                          type: \"base64\",\n                          media_type: \"application/pdf\",\n                          data: convertToBase64(part.data)\n                        },\n                        title: (_b = metadata.title) != null ? _b : part.filename,\n                        ...metadata.context && { context: metadata.context },\n                        ...enableCitations && {\n                          citations: { enabled: true }\n                        },\n                        cache_control: cacheControl\n                      });\n                    } else if (part.mediaType === \"text/plain\") {\n                      const enableCitations = await shouldEnableCitations(\n                        part.providerOptions\n                      );\n                      const metadata = await getDocumentMetadata(\n                        part.providerOptions\n                      );\n                      anthropicContent.push({\n                        type: \"document\",\n                        source: isUrlData(part.data) ? {\n                          type: \"url\",\n                          url: getUrlString(part.data)\n                        } : {\n                          type: \"text\",\n                          media_type: \"text/plain\",\n                          data: convertToString(part.data)\n                        },\n                        title: (_c = metadata.title) != null ? _c : part.filename,\n                        ...metadata.context && { context: metadata.context },\n                        ...enableCitations && {\n                          citations: { enabled: true }\n                        },\n                        cache_control: cacheControl\n                      });\n                    } else {\n                      throw new UnsupportedFunctionalityError2({\n                        functionality: `media type: ${part.mediaType}`\n                      });\n                    }\n                    break;\n                  }\n                }\n              }\n              break;\n            }\n            case \"tool\": {\n              for (let i2 = 0; i2 < content.length; i2++) {\n                const part = content[i2];\n                if (part.type === \"tool-approval-response\") {\n                  continue;\n                }\n                const isLastPart = i2 === content.length - 1;\n                const cacheControl = (_d = validator.getCacheControl(part.providerOptions, {\n                  type: \"tool result part\",\n                  canCache: true\n                })) != null ? _d : isLastPart ? validator.getCacheControl(message.providerOptions, {\n                  type: \"tool result message\",\n                  canCache: true\n                }) : void 0;\n                const output = part.output;\n                let contentValue;\n                switch (output.type) {\n                  case \"content\":\n                    contentValue = output.value.map((contentPart) => {\n                      switch (contentPart.type) {\n                        case \"text\":\n                          return {\n                            type: \"text\",\n                            text: contentPart.text\n                          };\n                        case \"image-data\": {\n                          return {\n                            type: \"image\",\n                            source: {\n                              type: \"base64\",\n                              media_type: contentPart.mediaType,\n                              data: contentPart.data\n                            }\n                          };\n                        }\n                        case \"image-url\": {\n                          return {\n                            type: \"image\",\n                            source: {\n                              type: \"url\",\n                              url: contentPart.url\n                            }\n                          };\n                        }\n                        case \"file-url\": {\n                          return {\n                            type: \"document\",\n                            source: {\n                              type: \"url\",\n                              url: contentPart.url\n                            }\n                          };\n                        }\n                        case \"file-data\": {\n                          if (contentPart.mediaType === \"application/pdf\") {\n                            betas.add(\"pdfs-2024-09-25\");\n                            return {\n                              type: \"document\",\n                              source: {\n                                type: \"base64\",\n                                media_type: contentPart.mediaType,\n                                data: contentPart.data\n                              }\n                            };\n                          }\n                          warnings.push({\n                            type: \"other\",\n                            message: `unsupported tool content part type: ${contentPart.type} with media type: ${contentPart.mediaType}`\n                          });\n                          return void 0;\n                        }\n                        default: {\n                          warnings.push({\n                            type: \"other\",\n                            message: `unsupported tool content part type: ${contentPart.type}`\n                          });\n                          return void 0;\n                        }\n                      }\n                    }).filter(isNonNullable);\n                    break;\n                  case \"text\":\n                  case \"error-text\":\n                    contentValue = output.value;\n                    break;\n                  case \"execution-denied\":\n                    contentValue = (_e = output.reason) != null ? _e : \"Tool execution denied.\";\n                    break;\n                  case \"json\":\n                  case \"error-json\":\n                  default:\n                    contentValue = JSON.stringify(output.value);\n                    break;\n                }\n                anthropicContent.push({\n                  type: \"tool_result\",\n                  tool_use_id: part.toolCallId,\n                  content: contentValue,\n                  is_error: output.type === \"error-text\" || output.type === \"error-json\" ? true : void 0,\n                  cache_control: cacheControl\n                });\n              }\n              break;\n            }\n            default: {\n              const _exhaustiveCheck = role;\n              throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n            }\n          }\n        }\n        messages.push({ role: \"user\", content: anthropicContent });\n        break;\n      }\n      case \"assistant\": {\n        const anthropicContent = [];\n        const mcpToolUseIds = /* @__PURE__ */ new Set();\n        for (let j = 0; j < block.messages.length; j++) {\n          const message = block.messages[j];\n          const isLastMessage = j === block.messages.length - 1;\n          const { content } = message;\n          for (let k = 0; k < content.length; k++) {\n            const part = content[k];\n            const isLastContentPart = k === content.length - 1;\n            const cacheControl = (_f = validator.getCacheControl(part.providerOptions, {\n              type: \"assistant message part\",\n              canCache: true\n            })) != null ? _f : isLastContentPart ? validator.getCacheControl(message.providerOptions, {\n              type: \"assistant message\",\n              canCache: true\n            }) : void 0;\n            switch (part.type) {\n              case \"text\": {\n                anthropicContent.push({\n                  type: \"text\",\n                  text: (\n                    // trim the last text part if it's the last message in the block\n                    // because Anthropic does not allow trailing whitespace\n                    // in pre-filled assistant responses\n                    isLastBlock && isLastMessage && isLastContentPart ? part.text.trim() : part.text\n                  ),\n                  cache_control: cacheControl\n                });\n                break;\n              }\n              case \"reasoning\": {\n                if (sendReasoning) {\n                  const reasoningMetadata = await parseProviderOptions({\n                    provider: \"anthropic\",\n                    providerOptions: part.providerOptions,\n                    schema: anthropicReasoningMetadataSchema\n                  });\n                  if (reasoningMetadata != null) {\n                    if (reasoningMetadata.signature != null) {\n                      validator.getCacheControl(part.providerOptions, {\n                        type: \"thinking block\",\n                        canCache: false\n                      });\n                      anthropicContent.push({\n                        type: \"thinking\",\n                        thinking: part.text,\n                        signature: reasoningMetadata.signature\n                      });\n                    } else if (reasoningMetadata.redactedData != null) {\n                      validator.getCacheControl(part.providerOptions, {\n                        type: \"redacted thinking block\",\n                        canCache: false\n                      });\n                      anthropicContent.push({\n                        type: \"redacted_thinking\",\n                        data: reasoningMetadata.redactedData\n                      });\n                    } else {\n                      warnings.push({\n                        type: \"other\",\n                        message: \"unsupported reasoning metadata\"\n                      });\n                    }\n                  } else {\n                    warnings.push({\n                      type: \"other\",\n                      message: \"unsupported reasoning metadata\"\n                    });\n                  }\n                } else {\n                  warnings.push({\n                    type: \"other\",\n                    message: \"sending reasoning content is disabled for this model\"\n                  });\n                }\n                break;\n              }\n              case \"tool-call\": {\n                if (part.providerExecuted) {\n                  const providerToolName = toolNameMapping.toProviderToolName(\n                    part.toolName\n                  );\n                  const isMcpToolUse = ((_h = (_g = part.providerOptions) == null ? void 0 : _g.anthropic) == null ? void 0 : _h.type) === \"mcp-tool-use\";\n                  if (isMcpToolUse) {\n                    mcpToolUseIds.add(part.toolCallId);\n                    const serverName = (_j = (_i = part.providerOptions) == null ? void 0 : _i.anthropic) == null ? void 0 : _j.serverName;\n                    if (serverName == null || typeof serverName !== \"string\") {\n                      warnings.push({\n                        type: \"other\",\n                        message: \"mcp tool use server name is required and must be a string\"\n                      });\n                      break;\n                    }\n                    anthropicContent.push({\n                      type: \"mcp_tool_use\",\n                      id: part.toolCallId,\n                      name: part.toolName,\n                      input: part.input,\n                      server_name: serverName,\n                      cache_control: cacheControl\n                    });\n                  } else if (\n                    // code execution 20250825:\n                    providerToolName === \"code_execution\" && part.input != null && typeof part.input === \"object\" && \"type\" in part.input && typeof part.input.type === \"string\" && (part.input.type === \"bash_code_execution\" || part.input.type === \"text_editor_code_execution\")\n                  ) {\n                    anthropicContent.push({\n                      type: \"server_tool_use\",\n                      id: part.toolCallId,\n                      name: part.input.type,\n                      // map back to subtool name\n                      input: part.input,\n                      cache_control: cacheControl\n                    });\n                  } else if (\n                    // code execution 20250825 programmatic tool calling:\n                    // Strip the fake 'programmatic-tool-call' type before sending to Anthropic\n                    providerToolName === \"code_execution\" && part.input != null && typeof part.input === \"object\" && \"type\" in part.input && part.input.type === \"programmatic-tool-call\"\n                  ) {\n                    const { type: _, ...inputWithoutType } = part.input;\n                    anthropicContent.push({\n                      type: \"server_tool_use\",\n                      id: part.toolCallId,\n                      name: \"code_execution\",\n                      input: inputWithoutType,\n                      cache_control: cacheControl\n                    });\n                  } else {\n                    if (providerToolName === \"code_execution\" || // code execution 20250522\n                    providerToolName === \"web_fetch\" || providerToolName === \"web_search\") {\n                      anthropicContent.push({\n                        type: \"server_tool_use\",\n                        id: part.toolCallId,\n                        name: providerToolName,\n                        input: part.input,\n                        cache_control: cacheControl\n                      });\n                    } else if (providerToolName === \"tool_search_tool_regex\" || providerToolName === \"tool_search_tool_bm25\") {\n                      anthropicContent.push({\n                        type: \"server_tool_use\",\n                        id: part.toolCallId,\n                        name: providerToolName,\n                        input: part.input,\n                        cache_control: cacheControl\n                      });\n                    } else {\n                      warnings.push({\n                        type: \"other\",\n                        message: `provider executed tool call for tool ${part.toolName} is not supported`\n                      });\n                    }\n                  }\n                  break;\n                }\n                const callerOptions = (_k = part.providerOptions) == null ? void 0 : _k.anthropic;\n                const caller = (callerOptions == null ? void 0 : callerOptions.caller) ? callerOptions.caller.type === \"code_execution_20250825\" && callerOptions.caller.toolId ? {\n                  type: \"code_execution_20250825\",\n                  tool_id: callerOptions.caller.toolId\n                } : callerOptions.caller.type === \"direct\" ? { type: \"direct\" } : void 0 : void 0;\n                anthropicContent.push({\n                  type: \"tool_use\",\n                  id: part.toolCallId,\n                  name: part.toolName,\n                  input: part.input,\n                  ...caller && { caller },\n                  cache_control: cacheControl\n                });\n                break;\n              }\n              case \"tool-result\": {\n                const providerToolName = toolNameMapping.toProviderToolName(\n                  part.toolName\n                );\n                if (mcpToolUseIds.has(part.toolCallId)) {\n                  const output = part.output;\n                  if (output.type !== \"json\" && output.type !== \"error-json\") {\n                    warnings.push({\n                      type: \"other\",\n                      message: `provider executed tool result output type ${output.type} for tool ${part.toolName} is not supported`\n                    });\n                    break;\n                  }\n                  anthropicContent.push({\n                    type: \"mcp_tool_result\",\n                    tool_use_id: part.toolCallId,\n                    is_error: output.type === \"error-json\",\n                    content: output.value,\n                    cache_control: cacheControl\n                  });\n                } else if (providerToolName === \"code_execution\") {\n                  const output = part.output;\n                  if (output.type === \"error-text\" || output.type === \"error-json\") {\n                    let errorInfo = {};\n                    try {\n                      if (typeof output.value === \"string\") {\n                        errorInfo = JSON.parse(output.value);\n                      } else if (typeof output.value === \"object\" && output.value !== null) {\n                        errorInfo = output.value;\n                      }\n                    } catch (e) {\n                    }\n                    if (errorInfo.type === \"code_execution_tool_result_error\") {\n                      anthropicContent.push({\n                        type: \"code_execution_tool_result\",\n                        tool_use_id: part.toolCallId,\n                        content: {\n                          type: \"code_execution_tool_result_error\",\n                          error_code: (_l = errorInfo.errorCode) != null ? _l : \"unknown\"\n                        },\n                        cache_control: cacheControl\n                      });\n                    } else {\n                      anthropicContent.push({\n                        type: \"bash_code_execution_tool_result\",\n                        tool_use_id: part.toolCallId,\n                        cache_control: cacheControl,\n                        content: {\n                          type: \"bash_code_execution_tool_result_error\",\n                          error_code: (_m = errorInfo.errorCode) != null ? _m : \"unknown\"\n                        }\n                      });\n                    }\n                    break;\n                  }\n                  if (output.type !== \"json\") {\n                    warnings.push({\n                      type: \"other\",\n                      message: `provider executed tool result output type ${output.type} for tool ${part.toolName} is not supported`\n                    });\n                    break;\n                  }\n                  if (output.value == null || typeof output.value !== \"object\" || !(\"type\" in output.value) || typeof output.value.type !== \"string\") {\n                    warnings.push({\n                      type: \"other\",\n                      message: `provider executed tool result output value is not a valid code execution result for tool ${part.toolName}`\n                    });\n                    break;\n                  }\n                  if (output.value.type === \"code_execution_result\") {\n                    const codeExecutionOutput = await validateTypes2({\n                      value: output.value,\n                      schema: codeExecution_20250522OutputSchema\n                    });\n                    anthropicContent.push({\n                      type: \"code_execution_tool_result\",\n                      tool_use_id: part.toolCallId,\n                      content: {\n                        type: codeExecutionOutput.type,\n                        stdout: codeExecutionOutput.stdout,\n                        stderr: codeExecutionOutput.stderr,\n                        return_code: codeExecutionOutput.return_code,\n                        content: (_n = codeExecutionOutput.content) != null ? _n : []\n                      },\n                      cache_control: cacheControl\n                    });\n                  } else {\n                    const codeExecutionOutput = await validateTypes2({\n                      value: output.value,\n                      schema: codeExecution_20250825OutputSchema\n                    });\n                    if (codeExecutionOutput.type === \"code_execution_result\") {\n                      anthropicContent.push({\n                        type: \"code_execution_tool_result\",\n                        tool_use_id: part.toolCallId,\n                        content: {\n                          type: codeExecutionOutput.type,\n                          stdout: codeExecutionOutput.stdout,\n                          stderr: codeExecutionOutput.stderr,\n                          return_code: codeExecutionOutput.return_code,\n                          content: (_o = codeExecutionOutput.content) != null ? _o : []\n                        },\n                        cache_control: cacheControl\n                      });\n                    } else if (codeExecutionOutput.type === \"bash_code_execution_result\" || codeExecutionOutput.type === \"bash_code_execution_tool_result_error\") {\n                      anthropicContent.push({\n                        type: \"bash_code_execution_tool_result\",\n                        tool_use_id: part.toolCallId,\n                        cache_control: cacheControl,\n                        content: codeExecutionOutput\n                      });\n                    } else {\n                      anthropicContent.push({\n                        type: \"text_editor_code_execution_tool_result\",\n                        tool_use_id: part.toolCallId,\n                        cache_control: cacheControl,\n                        content: codeExecutionOutput\n                      });\n                    }\n                  }\n                  break;\n                }\n                if (providerToolName === \"web_fetch\") {\n                  const output = part.output;\n                  if (output.type === \"error-json\") {\n                    let errorValue = {};\n                    try {\n                      if (typeof output.value === \"string\") {\n                        errorValue = JSON.parse(output.value);\n                      } else if (typeof output.value === \"object\" && output.value !== null) {\n                        errorValue = output.value;\n                      }\n                    } catch (e) {\n                      const extractedErrorCode = (_p = output.value) == null ? void 0 : _p.errorCode;\n                      errorValue = {\n                        errorCode: typeof extractedErrorCode === \"string\" ? extractedErrorCode : \"unknown\"\n                      };\n                    }\n                    anthropicContent.push({\n                      type: \"web_fetch_tool_result\",\n                      tool_use_id: part.toolCallId,\n                      content: {\n                        type: \"web_fetch_tool_result_error\",\n                        error_code: (_q = errorValue.errorCode) != null ? _q : \"unknown\"\n                      },\n                      cache_control: cacheControl\n                    });\n                    break;\n                  }\n                  if (output.type !== \"json\") {\n                    warnings.push({\n                      type: \"other\",\n                      message: `provider executed tool result output type ${output.type} for tool ${part.toolName} is not supported`\n                    });\n                    break;\n                  }\n                  const webFetchOutput = await validateTypes2({\n                    value: output.value,\n                    schema: webFetch_20250910OutputSchema\n                  });\n                  anthropicContent.push({\n                    type: \"web_fetch_tool_result\",\n                    tool_use_id: part.toolCallId,\n                    content: {\n                      type: \"web_fetch_result\",\n                      url: webFetchOutput.url,\n                      retrieved_at: webFetchOutput.retrievedAt,\n                      content: {\n                        type: \"document\",\n                        title: webFetchOutput.content.title,\n                        citations: webFetchOutput.content.citations,\n                        source: {\n                          type: webFetchOutput.content.source.type,\n                          media_type: webFetchOutput.content.source.mediaType,\n                          data: webFetchOutput.content.source.data\n                        }\n                      }\n                    },\n                    cache_control: cacheControl\n                  });\n                  break;\n                }\n                if (providerToolName === \"web_search\") {\n                  const output = part.output;\n                  if (output.type !== \"json\") {\n                    warnings.push({\n                      type: \"other\",\n                      message: `provider executed tool result output type ${output.type} for tool ${part.toolName} is not supported`\n                    });\n                    break;\n                  }\n                  const webSearchOutput = await validateTypes2({\n                    value: output.value,\n                    schema: webSearch_20250305OutputSchema\n                  });\n                  anthropicContent.push({\n                    type: \"web_search_tool_result\",\n                    tool_use_id: part.toolCallId,\n                    content: webSearchOutput.map((result) => ({\n                      url: result.url,\n                      title: result.title,\n                      page_age: result.pageAge,\n                      encrypted_content: result.encryptedContent,\n                      type: result.type\n                    })),\n                    cache_control: cacheControl\n                  });\n                  break;\n                }\n                if (providerToolName === \"tool_search_tool_regex\" || providerToolName === \"tool_search_tool_bm25\") {\n                  const output = part.output;\n                  if (output.type !== \"json\") {\n                    warnings.push({\n                      type: \"other\",\n                      message: `provider executed tool result output type ${output.type} for tool ${part.toolName} is not supported`\n                    });\n                    break;\n                  }\n                  const toolSearchOutput = await validateTypes2({\n                    value: output.value,\n                    schema: toolSearchRegex_20251119OutputSchema\n                  });\n                  const toolReferences = toolSearchOutput.map((ref) => ({\n                    type: \"tool_reference\",\n                    tool_name: ref.toolName\n                  }));\n                  anthropicContent.push({\n                    type: \"tool_search_tool_result\",\n                    tool_use_id: part.toolCallId,\n                    content: {\n                      type: \"tool_search_tool_search_result\",\n                      tool_references: toolReferences\n                    },\n                    cache_control: cacheControl\n                  });\n                  break;\n                }\n                warnings.push({\n                  type: \"other\",\n                  message: `provider executed tool result for tool ${part.toolName} is not supported`\n                });\n                break;\n              }\n            }\n          }\n        }\n        messages.push({ role: \"assistant\", content: anthropicContent });\n        break;\n      }\n      default: {\n        const _exhaustiveCheck = type;\n        throw new Error(`content type: ${_exhaustiveCheck}`);\n      }\n    }\n  }\n  return {\n    prompt: { system, messages },\n    betas\n  };\n}\nfunction groupIntoBlocks(prompt) {\n  const blocks = [];\n  let currentBlock = void 0;\n  for (const message of prompt) {\n    const { role } = message;\n    switch (role) {\n      case \"system\": {\n        if ((currentBlock == null ? void 0 : currentBlock.type) !== \"system\") {\n          currentBlock = { type: \"system\", messages: [] };\n          blocks.push(currentBlock);\n        }\n        currentBlock.messages.push(message);\n        break;\n      }\n      case \"assistant\": {\n        if ((currentBlock == null ? void 0 : currentBlock.type) !== \"assistant\") {\n          currentBlock = { type: \"assistant\", messages: [] };\n          blocks.push(currentBlock);\n        }\n        currentBlock.messages.push(message);\n        break;\n      }\n      case \"user\": {\n        if ((currentBlock == null ? void 0 : currentBlock.type) !== \"user\") {\n          currentBlock = { type: \"user\", messages: [] };\n          blocks.push(currentBlock);\n        }\n        currentBlock.messages.push(message);\n        break;\n      }\n      case \"tool\": {\n        if ((currentBlock == null ? void 0 : currentBlock.type) !== \"user\") {\n          currentBlock = { type: \"user\", messages: [] };\n          blocks.push(currentBlock);\n        }\n        currentBlock.messages.push(message);\n        break;\n      }\n      default: {\n        const _exhaustiveCheck = role;\n        throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n      }\n    }\n  }\n  return blocks;\n}\n\n// src/map-anthropic-stop-reason.ts\nfunction mapAnthropicStopReason({\n  finishReason,\n  isJsonResponseFromTool\n}) {\n  switch (finishReason) {\n    case \"pause_turn\":\n    case \"end_turn\":\n    case \"stop_sequence\":\n      return \"stop\";\n    case \"refusal\":\n      return \"content-filter\";\n    case \"tool_use\":\n      return isJsonResponseFromTool ? \"stop\" : \"tool-calls\";\n    case \"max_tokens\":\n    case \"model_context_window_exceeded\":\n      return \"length\";\n    default:\n      return \"other\";\n  }\n}\n\n// src/anthropic-messages-language-model.ts\nfunction createCitationSource(citation, citationDocuments, generateId3) {\n  var _a;\n  if (citation.type === \"web_search_result_location\") {\n    return {\n      type: \"source\",\n      sourceType: \"url\",\n      id: generateId3(),\n      url: citation.url,\n      title: citation.title,\n      providerMetadata: {\n        anthropic: {\n          citedText: citation.cited_text,\n          encryptedIndex: citation.encrypted_index\n        }\n      }\n    };\n  }\n  if (citation.type !== \"page_location\" && citation.type !== \"char_location\") {\n    return;\n  }\n  const documentInfo = citationDocuments[citation.document_index];\n  if (!documentInfo) {\n    return;\n  }\n  return {\n    type: \"source\",\n    sourceType: \"document\",\n    id: generateId3(),\n    mediaType: documentInfo.mediaType,\n    title: (_a = citation.document_title) != null ? _a : documentInfo.title,\n    filename: documentInfo.filename,\n    providerMetadata: {\n      anthropic: citation.type === \"page_location\" ? {\n        citedText: citation.cited_text,\n        startPageNumber: citation.start_page_number,\n        endPageNumber: citation.end_page_number\n      } : {\n        citedText: citation.cited_text,\n        startCharIndex: citation.start_char_index,\n        endCharIndex: citation.end_char_index\n      }\n    }\n  };\n}\nvar AnthropicMessagesLanguageModel = class {\n  constructor(modelId, config) {\n    this.specificationVersion = \"v3\";\n    var _a;\n    this.modelId = modelId;\n    this.config = config;\n    this.generateId = (_a = config.generateId) != null ? _a : generateId;\n  }\n  supportsUrl(url) {\n    return url.protocol === \"https:\";\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  /**\n   * Extracts the dynamic provider name from the config.provider string.\n   * e.g., 'my-custom-anthropic.messages' -> 'my-custom-anthropic'\n   */\n  get providerOptionsName() {\n    const provider = this.config.provider;\n    const dotIndex = provider.indexOf(\".\");\n    return dotIndex === -1 ? provider : provider.substring(0, dotIndex);\n  }\n  get supportedUrls() {\n    var _a, _b, _c;\n    return (_c = (_b = (_a = this.config).supportedUrls) == null ? void 0 : _b.call(_a)) != null ? _c : {};\n  }\n  async getArgs({\n    userSuppliedBetas,\n    prompt,\n    maxOutputTokens,\n    temperature,\n    topP,\n    topK,\n    frequencyPenalty,\n    presencePenalty,\n    stopSequences,\n    responseFormat,\n    seed,\n    tools,\n    toolChoice,\n    providerOptions,\n    stream\n  }) {\n    var _a, _b, _c, _d, _e, _f;\n    const warnings = [];\n    if (frequencyPenalty != null) {\n      warnings.push({ type: \"unsupported\", feature: \"frequencyPenalty\" });\n    }\n    if (presencePenalty != null) {\n      warnings.push({ type: \"unsupported\", feature: \"presencePenalty\" });\n    }\n    if (seed != null) {\n      warnings.push({ type: \"unsupported\", feature: \"seed\" });\n    }\n    if (temperature != null && temperature > 1) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"temperature\",\n        details: `${temperature} exceeds anthropic maximum of 1.0. clamped to 1.0`\n      });\n      temperature = 1;\n    } else if (temperature != null && temperature < 0) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"temperature\",\n        details: `${temperature} is below anthropic minimum of 0. clamped to 0`\n      });\n      temperature = 0;\n    }\n    if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\") {\n      if (responseFormat.schema == null) {\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"responseFormat\",\n          details: \"JSON response format requires a schema. The response format is ignored.\"\n        });\n      }\n    }\n    const providerOptionsName = this.providerOptionsName;\n    const canonicalOptions = await parseProviderOptions2({\n      provider: \"anthropic\",\n      providerOptions,\n      schema: anthropicProviderOptions\n    });\n    const customProviderOptions = providerOptionsName !== \"anthropic\" ? await parseProviderOptions2({\n      provider: providerOptionsName,\n      providerOptions,\n      schema: anthropicProviderOptions\n    }) : null;\n    const usedCustomProviderKey = customProviderOptions != null;\n    const anthropicOptions = Object.assign(\n      {},\n      canonicalOptions != null ? canonicalOptions : {},\n      customProviderOptions != null ? customProviderOptions : {}\n    );\n    const {\n      maxOutputTokens: maxOutputTokensForModel,\n      supportsStructuredOutput: modelSupportsStructuredOutput,\n      isKnownModel\n    } = getModelCapabilities(this.modelId);\n    const supportsStructuredOutput = ((_a = this.config.supportsNativeStructuredOutput) != null ? _a : true) && modelSupportsStructuredOutput;\n    const structureOutputMode = (_b = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _b : \"auto\";\n    const useStructuredOutput = structureOutputMode === \"outputFormat\" || structureOutputMode === \"auto\" && supportsStructuredOutput;\n    const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === \"json\" && responseFormat.schema != null && !useStructuredOutput ? {\n      type: \"function\",\n      name: \"json\",\n      description: \"Respond with a JSON object.\",\n      inputSchema: responseFormat.schema\n    } : void 0;\n    const contextManagement = anthropicOptions == null ? void 0 : anthropicOptions.contextManagement;\n    const cacheControlValidator = new CacheControlValidator();\n    const toolNameMapping = createToolNameMapping({\n      tools,\n      providerToolNames: {\n        \"anthropic.code_execution_20250522\": \"code_execution\",\n        \"anthropic.code_execution_20250825\": \"code_execution\",\n        \"anthropic.computer_20241022\": \"computer\",\n        \"anthropic.computer_20250124\": \"computer\",\n        \"anthropic.text_editor_20241022\": \"str_replace_editor\",\n        \"anthropic.text_editor_20250124\": \"str_replace_editor\",\n        \"anthropic.text_editor_20250429\": \"str_replace_based_edit_tool\",\n        \"anthropic.text_editor_20250728\": \"str_replace_based_edit_tool\",\n        \"anthropic.bash_20241022\": \"bash\",\n        \"anthropic.bash_20250124\": \"bash\",\n        \"anthropic.memory_20250818\": \"memory\",\n        \"anthropic.web_search_20250305\": \"web_search\",\n        \"anthropic.web_fetch_20250910\": \"web_fetch\",\n        \"anthropic.tool_search_regex_20251119\": \"tool_search_tool_regex\",\n        \"anthropic.tool_search_bm25_20251119\": \"tool_search_tool_bm25\"\n      }\n    });\n    const { prompt: messagesPrompt, betas } = await convertToAnthropicMessagesPrompt({\n      prompt,\n      sendReasoning: (_c = anthropicOptions == null ? void 0 : anthropicOptions.sendReasoning) != null ? _c : true,\n      warnings,\n      cacheControlValidator,\n      toolNameMapping\n    });\n    const isThinking = ((_d = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _d.type) === \"enabled\";\n    let thinkingBudget = (_e = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _e.budgetTokens;\n    const maxTokens = maxOutputTokens != null ? maxOutputTokens : maxOutputTokensForModel;\n    const baseArgs = {\n      // model id:\n      model: this.modelId,\n      // standardized settings:\n      max_tokens: maxTokens,\n      temperature,\n      top_k: topK,\n      top_p: topP,\n      stop_sequences: stopSequences,\n      // provider specific settings:\n      ...isThinking && {\n        thinking: { type: \"enabled\", budget_tokens: thinkingBudget }\n      },\n      ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {\n        output_config: { effort: anthropicOptions.effort }\n      },\n      // structured output:\n      ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === \"json\" && responseFormat.schema != null && {\n        output_format: {\n          type: \"json_schema\",\n          schema: responseFormat.schema\n        }\n      },\n      // mcp servers:\n      ...(anthropicOptions == null ? void 0 : anthropicOptions.mcpServers) && anthropicOptions.mcpServers.length > 0 && {\n        mcp_servers: anthropicOptions.mcpServers.map((server) => ({\n          type: server.type,\n          name: server.name,\n          url: server.url,\n          authorization_token: server.authorizationToken,\n          tool_configuration: server.toolConfiguration ? {\n            allowed_tools: server.toolConfiguration.allowedTools,\n            enabled: server.toolConfiguration.enabled\n          } : void 0\n        }))\n      },\n      // container: For programmatic tool calling (just an ID string) or agent skills (object with id and skills)\n      ...(anthropicOptions == null ? void 0 : anthropicOptions.container) && {\n        container: anthropicOptions.container.skills && anthropicOptions.container.skills.length > 0 ? (\n          // Object format when skills are provided (agent skills feature)\n          {\n            id: anthropicOptions.container.id,\n            skills: anthropicOptions.container.skills.map((skill) => ({\n              type: skill.type,\n              skill_id: skill.skillId,\n              version: skill.version\n            }))\n          }\n        ) : (\n          // String format for container ID only (programmatic tool calling)\n          anthropicOptions.container.id\n        )\n      },\n      // prompt:\n      system: messagesPrompt.system,\n      messages: messagesPrompt.messages,\n      ...contextManagement && {\n        context_management: {\n          edits: contextManagement.edits.map((edit) => {\n            const strategy = edit.type;\n            switch (strategy) {\n              case \"clear_tool_uses_20250919\":\n                return {\n                  type: edit.type,\n                  ...edit.trigger !== void 0 && {\n                    trigger: edit.trigger\n                  },\n                  ...edit.keep !== void 0 && { keep: edit.keep },\n                  ...edit.clearAtLeast !== void 0 && {\n                    clear_at_least: edit.clearAtLeast\n                  },\n                  ...edit.clearToolInputs !== void 0 && {\n                    clear_tool_inputs: edit.clearToolInputs\n                  },\n                  ...edit.excludeTools !== void 0 && {\n                    exclude_tools: edit.excludeTools\n                  }\n                };\n              case \"clear_thinking_20251015\":\n                return {\n                  type: edit.type,\n                  ...edit.keep !== void 0 && { keep: edit.keep }\n                };\n              default:\n                warnings.push({\n                  type: \"other\",\n                  message: `Unknown context management strategy: ${strategy}`\n                });\n                return void 0;\n            }\n          }).filter((edit) => edit !== void 0)\n        }\n      }\n    };\n    if (isThinking) {\n      if (thinkingBudget == null) {\n        warnings.push({\n          type: \"compatibility\",\n          feature: \"extended thinking\",\n          details: \"thinking budget is required when thinking is enabled. using default budget of 1024 tokens.\"\n        });\n        baseArgs.thinking = {\n          type: \"enabled\",\n          budget_tokens: 1024\n        };\n        thinkingBudget = 1024;\n      }\n      if (baseArgs.temperature != null) {\n        baseArgs.temperature = void 0;\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"temperature\",\n          details: \"temperature is not supported when thinking is enabled\"\n        });\n      }\n      if (topK != null) {\n        baseArgs.top_k = void 0;\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"topK\",\n          details: \"topK is not supported when thinking is enabled\"\n        });\n      }\n      if (topP != null) {\n        baseArgs.top_p = void 0;\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"topP\",\n          details: \"topP is not supported when thinking is enabled\"\n        });\n      }\n      baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);\n    } else {\n      if (topP != null && temperature != null) {\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"topP\",\n          details: `topP is not supported when temperature is set. topP is ignored.`\n        });\n        baseArgs.top_p = void 0;\n      }\n    }\n    if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {\n      if (maxOutputTokens != null) {\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"maxOutputTokens\",\n          details: `${baseArgs.max_tokens} (maxOutputTokens + thinkingBudget) is greater than ${this.modelId} ${maxOutputTokensForModel} max output tokens. The max output tokens have been limited to ${maxOutputTokensForModel}.`\n        });\n      }\n      baseArgs.max_tokens = maxOutputTokensForModel;\n    }\n    if ((anthropicOptions == null ? void 0 : anthropicOptions.mcpServers) && anthropicOptions.mcpServers.length > 0) {\n      betas.add(\"mcp-client-2025-04-04\");\n    }\n    if (contextManagement) {\n      betas.add(\"context-management-2025-06-27\");\n    }\n    if ((anthropicOptions == null ? void 0 : anthropicOptions.container) && anthropicOptions.container.skills && anthropicOptions.container.skills.length > 0) {\n      betas.add(\"code-execution-2025-08-25\");\n      betas.add(\"skills-2025-10-02\");\n      betas.add(\"files-api-2025-04-14\");\n      if (!(tools == null ? void 0 : tools.some(\n        (tool) => tool.type === \"provider\" && tool.id === \"anthropic.code_execution_20250825\"\n      ))) {\n        warnings.push({\n          type: \"other\",\n          message: \"code execution tool is required when using skills\"\n        });\n      }\n    }\n    if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {\n      betas.add(\"effort-2025-11-24\");\n    }\n    if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {\n      betas.add(\"fine-grained-tool-streaming-2025-05-14\");\n    }\n    const usingNativeOutputFormat = useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === \"json\" && responseFormat.schema != null;\n    if (usingNativeOutputFormat) {\n      betas.add(\"structured-outputs-2025-11-13\");\n    }\n    const {\n      tools: anthropicTools2,\n      toolChoice: anthropicToolChoice,\n      toolWarnings,\n      betas: toolsBetas\n    } = await prepareTools(\n      jsonResponseTool != null ? {\n        tools: [...tools != null ? tools : [], jsonResponseTool],\n        toolChoice: { type: \"required\" },\n        disableParallelToolUse: true,\n        cacheControlValidator,\n        supportsStructuredOutput: false\n      } : {\n        tools: tools != null ? tools : [],\n        toolChoice,\n        disableParallelToolUse: anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse,\n        cacheControlValidator,\n        supportsStructuredOutput\n      }\n    );\n    const cacheWarnings = cacheControlValidator.getWarnings();\n    return {\n      args: {\n        ...baseArgs,\n        tools: anthropicTools2,\n        tool_choice: anthropicToolChoice,\n        stream: stream === true ? true : void 0\n        // do not send when not streaming\n      },\n      warnings: [...warnings, ...toolWarnings, ...cacheWarnings],\n      betas: /* @__PURE__ */ new Set([...betas, ...toolsBetas, ...userSuppliedBetas]),\n      usesJsonResponseTool: jsonResponseTool != null,\n      toolNameMapping,\n      providerOptionsName,\n      usedCustomProviderKey\n    };\n  }\n  async getHeaders({\n    betas,\n    headers\n  }) {\n    return combineHeaders(\n      await resolve(this.config.headers),\n      headers,\n      betas.size > 0 ? { \"anthropic-beta\": Array.from(betas).join(\",\") } : {}\n    );\n  }\n  async getBetasFromHeaders(requestHeaders) {\n    var _a, _b;\n    const configHeaders = await resolve(this.config.headers);\n    const configBetaHeader = (_a = configHeaders[\"anthropic-beta\"]) != null ? _a : \"\";\n    const requestBetaHeader = (_b = requestHeaders == null ? void 0 : requestHeaders[\"anthropic-beta\"]) != null ? _b : \"\";\n    return new Set(\n      [\n        ...configBetaHeader.toLowerCase().split(\",\"),\n        ...requestBetaHeader.toLowerCase().split(\",\")\n      ].map((beta) => beta.trim()).filter((beta) => beta !== \"\")\n    );\n  }\n  buildRequestUrl(isStreaming) {\n    var _a, _b, _c;\n    return (_c = (_b = (_a = this.config).buildRequestUrl) == null ? void 0 : _b.call(_a, this.config.baseURL, isStreaming)) != null ? _c : `${this.config.baseURL}/messages`;\n  }\n  transformRequestBody(args) {\n    var _a, _b, _c;\n    return (_c = (_b = (_a = this.config).transformRequestBody) == null ? void 0 : _b.call(_a, args)) != null ? _c : args;\n  }\n  extractCitationDocuments(prompt) {\n    const isCitationPart = (part) => {\n      var _a, _b;\n      if (part.type !== \"file\") {\n        return false;\n      }\n      if (part.mediaType !== \"application/pdf\" && part.mediaType !== \"text/plain\") {\n        return false;\n      }\n      const anthropic2 = (_a = part.providerOptions) == null ? void 0 : _a.anthropic;\n      const citationsConfig = anthropic2 == null ? void 0 : anthropic2.citations;\n      return (_b = citationsConfig == null ? void 0 : citationsConfig.enabled) != null ? _b : false;\n    };\n    return prompt.filter((message) => message.role === \"user\").flatMap((message) => message.content).filter(isCitationPart).map((part) => {\n      var _a;\n      const filePart = part;\n      return {\n        title: (_a = filePart.filename) != null ? _a : \"Untitled Document\",\n        filename: filePart.filename,\n        mediaType: filePart.mediaType\n      };\n    });\n  }\n  async doGenerate(options) {\n    var _a, _b, _c, _d, _e, _f;\n    const {\n      args,\n      warnings,\n      betas,\n      usesJsonResponseTool,\n      toolNameMapping,\n      providerOptionsName,\n      usedCustomProviderKey\n    } = await this.getArgs({\n      ...options,\n      stream: false,\n      userSuppliedBetas: await this.getBetasFromHeaders(options.headers)\n    });\n    const citationDocuments = [\n      ...this.extractCitationDocuments(options.prompt)\n    ];\n    const {\n      responseHeaders,\n      value: response,\n      rawValue: rawResponse\n    } = await postJsonToApi({\n      url: this.buildRequestUrl(false),\n      headers: await this.getHeaders({ betas, headers: options.headers }),\n      body: this.transformRequestBody(args),\n      failedResponseHandler: anthropicFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler(\n        anthropicMessagesResponseSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    const content = [];\n    const mcpToolCalls = {};\n    const serverToolCalls = {};\n    let isJsonResponseFromTool = false;\n    for (const part of response.content) {\n      switch (part.type) {\n        case \"text\": {\n          if (!usesJsonResponseTool) {\n            content.push({ type: \"text\", text: part.text });\n            if (part.citations) {\n              for (const citation of part.citations) {\n                const source = createCitationSource(\n                  citation,\n                  citationDocuments,\n                  this.generateId\n                );\n                if (source) {\n                  content.push(source);\n                }\n              }\n            }\n          }\n          break;\n        }\n        case \"thinking\": {\n          content.push({\n            type: \"reasoning\",\n            text: part.thinking,\n            providerMetadata: {\n              anthropic: {\n                signature: part.signature\n              }\n            }\n          });\n          break;\n        }\n        case \"redacted_thinking\": {\n          content.push({\n            type: \"reasoning\",\n            text: \"\",\n            providerMetadata: {\n              anthropic: {\n                redactedData: part.data\n              }\n            }\n          });\n          break;\n        }\n        case \"tool_use\": {\n          const isJsonResponseTool = usesJsonResponseTool && part.name === \"json\";\n          if (isJsonResponseTool) {\n            isJsonResponseFromTool = true;\n            content.push({\n              type: \"text\",\n              text: JSON.stringify(part.input)\n            });\n          } else {\n            const caller = part.caller;\n            const callerInfo = caller ? {\n              type: caller.type,\n              toolId: \"tool_id\" in caller ? caller.tool_id : void 0\n            } : void 0;\n            content.push({\n              type: \"tool-call\",\n              toolCallId: part.id,\n              toolName: part.name,\n              input: JSON.stringify(part.input),\n              ...callerInfo && {\n                providerMetadata: {\n                  anthropic: {\n                    caller: callerInfo\n                  }\n                }\n              }\n            });\n          }\n          break;\n        }\n        case \"server_tool_use\": {\n          if (part.name === \"text_editor_code_execution\" || part.name === \"bash_code_execution\") {\n            content.push({\n              type: \"tool-call\",\n              toolCallId: part.id,\n              toolName: toolNameMapping.toCustomToolName(\"code_execution\"),\n              input: JSON.stringify({ type: part.name, ...part.input }),\n              providerExecuted: true\n            });\n          } else if (part.name === \"web_search\" || part.name === \"code_execution\" || part.name === \"web_fetch\") {\n            const inputToSerialize = part.name === \"code_execution\" && part.input != null && typeof part.input === \"object\" && \"code\" in part.input && !(\"type\" in part.input) ? { type: \"programmatic-tool-call\", ...part.input } : part.input;\n            content.push({\n              type: \"tool-call\",\n              toolCallId: part.id,\n              toolName: toolNameMapping.toCustomToolName(part.name),\n              input: JSON.stringify(inputToSerialize),\n              providerExecuted: true\n            });\n          } else if (part.name === \"tool_search_tool_regex\" || part.name === \"tool_search_tool_bm25\") {\n            serverToolCalls[part.id] = part.name;\n            content.push({\n              type: \"tool-call\",\n              toolCallId: part.id,\n              toolName: toolNameMapping.toCustomToolName(part.name),\n              input: JSON.stringify(part.input),\n              providerExecuted: true\n            });\n          }\n          break;\n        }\n        case \"mcp_tool_use\": {\n          mcpToolCalls[part.id] = {\n            type: \"tool-call\",\n            toolCallId: part.id,\n            toolName: part.name,\n            input: JSON.stringify(part.input),\n            providerExecuted: true,\n            dynamic: true,\n            providerMetadata: {\n              anthropic: {\n                type: \"mcp-tool-use\",\n                serverName: part.server_name\n              }\n            }\n          };\n          content.push(mcpToolCalls[part.id]);\n          break;\n        }\n        case \"mcp_tool_result\": {\n          content.push({\n            type: \"tool-result\",\n            toolCallId: part.tool_use_id,\n            toolName: mcpToolCalls[part.tool_use_id].toolName,\n            isError: part.is_error,\n            result: part.content,\n            dynamic: true,\n            providerMetadata: mcpToolCalls[part.tool_use_id].providerMetadata\n          });\n          break;\n        }\n        case \"web_fetch_tool_result\": {\n          if (part.content.type === \"web_fetch_result\") {\n            citationDocuments.push({\n              title: (_a = part.content.content.title) != null ? _a : part.content.url,\n              mediaType: part.content.content.source.media_type\n            });\n            content.push({\n              type: \"tool-result\",\n              toolCallId: part.tool_use_id,\n              toolName: toolNameMapping.toCustomToolName(\"web_fetch\"),\n              result: {\n                type: \"web_fetch_result\",\n                url: part.content.url,\n                retrievedAt: part.content.retrieved_at,\n                content: {\n                  type: part.content.content.type,\n                  title: part.content.content.title,\n                  citations: part.content.content.citations,\n                  source: {\n                    type: part.content.content.source.type,\n                    mediaType: part.content.content.source.media_type,\n                    data: part.content.content.source.data\n                  }\n                }\n              }\n            });\n          } else if (part.content.type === \"web_fetch_tool_result_error\") {\n            content.push({\n              type: \"tool-result\",\n              toolCallId: part.tool_use_id,\n              toolName: toolNameMapping.toCustomToolName(\"web_fetch\"),\n              isError: true,\n              result: {\n                type: \"web_fetch_tool_result_error\",\n                errorCode: part.content.error_code\n              }\n            });\n          }\n          break;\n        }\n        case \"web_search_tool_result\": {\n          if (Array.isArray(part.content)) {\n            content.push({\n              type: \"tool-result\",\n              toolCallId: part.tool_use_id,\n              toolName: toolNameMapping.toCustomToolName(\"web_search\"),\n              result: part.content.map((result) => {\n                var _a2;\n                return {\n                  url: result.url,\n                  title: result.title,\n                  pageAge: (_a2 = result.page_age) != null ? _a2 : null,\n                  encryptedContent: result.encrypted_content,\n                  type: result.type\n                };\n              })\n            });\n            for (const result of part.content) {\n              content.push({\n                type: \"source\",\n                sourceType: \"url\",\n                id: this.generateId(),\n                url: result.url,\n                title: result.title,\n                providerMetadata: {\n                  anthropic: {\n                    pageAge: (_b = result.page_age) != null ? _b : null\n                  }\n                }\n              });\n            }\n          } else {\n            content.push({\n              type: \"tool-result\",\n              toolCallId: part.tool_use_id,\n              toolName: toolNameMapping.toCustomToolName(\"web_search\"),\n              isError: true,\n              result: {\n                type: \"web_search_tool_result_error\",\n                errorCode: part.content.error_code\n              }\n            });\n          }\n          break;\n        }\n        // code execution 20250522:\n        case \"code_execution_tool_result\": {\n          if (part.content.type === \"code_execution_result\") {\n            content.push({\n              type: \"tool-result\",\n              toolCallId: part.tool_use_id,\n              toolName: toolNameMapping.toCustomToolName(\"code_execution\"),\n              result: {\n                type: part.content.type,\n                stdout: part.content.stdout,\n                stderr: part.content.stderr,\n                return_code: part.content.return_code,\n                content: (_c = part.content.content) != null ? _c : []\n              }\n            });\n          } else if (part.content.type === \"code_execution_tool_result_error\") {\n            content.push({\n              type: \"tool-result\",\n              toolCallId: part.tool_use_id,\n              toolName: toolNameMapping.toCustomToolName(\"code_execution\"),\n              isError: true,\n              result: {\n                type: \"code_execution_tool_result_error\",\n                errorCode: part.content.error_code\n              }\n            });\n          }\n          break;\n        }\n        // code execution 20250825:\n        case \"bash_code_execution_tool_result\":\n        case \"text_editor_code_execution_tool_result\": {\n          content.push({\n            type: \"tool-result\",\n            toolCallId: part.tool_use_id,\n            toolName: toolNameMapping.toCustomToolName(\"code_execution\"),\n            result: part.content\n          });\n          break;\n        }\n        // tool search tool results:\n        case \"tool_search_tool_result\": {\n          let providerToolName = serverToolCalls[part.tool_use_id];\n          if (providerToolName == null) {\n            const bm25CustomName = toolNameMapping.toCustomToolName(\n              \"tool_search_tool_bm25\"\n            );\n            const regexCustomName = toolNameMapping.toCustomToolName(\n              \"tool_search_tool_regex\"\n            );\n            if (bm25CustomName !== \"tool_search_tool_bm25\") {\n              providerToolName = \"tool_search_tool_bm25\";\n            } else if (regexCustomName !== \"tool_search_tool_regex\") {\n              providerToolName = \"tool_search_tool_regex\";\n            } else {\n              providerToolName = \"tool_search_tool_regex\";\n            }\n          }\n          if (part.content.type === \"tool_search_tool_search_result\") {\n            content.push({\n              type: \"tool-result\",\n              toolCallId: part.tool_use_id,\n              toolName: toolNameMapping.toCustomToolName(providerToolName),\n              result: part.content.tool_references.map((ref) => ({\n                type: ref.type,\n                toolName: ref.tool_name\n              }))\n            });\n          } else {\n            content.push({\n              type: \"tool-result\",\n              toolCallId: part.tool_use_id,\n              toolName: toolNameMapping.toCustomToolName(providerToolName),\n              isError: true,\n              result: {\n                type: \"tool_search_tool_result_error\",\n                errorCode: part.content.error_code\n              }\n            });\n          }\n          break;\n        }\n      }\n    }\n    return {\n      content,\n      finishReason: {\n        unified: mapAnthropicStopReason({\n          finishReason: response.stop_reason,\n          isJsonResponseFromTool\n        }),\n        raw: (_d = response.stop_reason) != null ? _d : void 0\n      },\n      usage: convertAnthropicMessagesUsage(response.usage),\n      request: { body: args },\n      response: {\n        id: (_e = response.id) != null ? _e : void 0,\n        modelId: (_f = response.model) != null ? _f : void 0,\n        headers: responseHeaders,\n        body: rawResponse\n      },\n      warnings,\n      providerMetadata: (() => {\n        var _a2, _b2, _c2, _d2, _e2;\n        const anthropicMetadata = {\n          usage: response.usage,\n          cacheCreationInputTokens: (_a2 = response.usage.cache_creation_input_tokens) != null ? _a2 : null,\n          stopSequence: (_b2 = response.stop_sequence) != null ? _b2 : null,\n          container: response.container ? {\n            expiresAt: response.container.expires_at,\n            id: response.container.id,\n            skills: (_d2 = (_c2 = response.container.skills) == null ? void 0 : _c2.map((skill) => ({\n              type: skill.type,\n              skillId: skill.skill_id,\n              version: skill.version\n            }))) != null ? _d2 : null\n          } : null,\n          contextManagement: (_e2 = mapAnthropicResponseContextManagement(\n            response.context_management\n          )) != null ? _e2 : null\n        };\n        const providerMetadata = {\n          anthropic: anthropicMetadata\n        };\n        if (usedCustomProviderKey && providerOptionsName !== \"anthropic\") {\n          providerMetadata[providerOptionsName] = anthropicMetadata;\n        }\n        return providerMetadata;\n      })()\n    };\n  }\n  async doStream(options) {\n    var _a, _b;\n    const {\n      args: body,\n      warnings,\n      betas,\n      usesJsonResponseTool,\n      toolNameMapping,\n      providerOptionsName,\n      usedCustomProviderKey\n    } = await this.getArgs({\n      ...options,\n      stream: true,\n      userSuppliedBetas: await this.getBetasFromHeaders(options.headers)\n    });\n    const citationDocuments = [\n      ...this.extractCitationDocuments(options.prompt)\n    ];\n    const url = this.buildRequestUrl(true);\n    const { responseHeaders, value: response } = await postJsonToApi({\n      url,\n      headers: await this.getHeaders({ betas, headers: options.headers }),\n      body: this.transformRequestBody(body),\n      failedResponseHandler: anthropicFailedResponseHandler,\n      successfulResponseHandler: createEventSourceResponseHandler(\n        anthropicMessagesChunkSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    let finishReason = {\n      unified: \"other\",\n      raw: void 0\n    };\n    const usage = {\n      input_tokens: 0,\n      output_tokens: 0,\n      cache_creation_input_tokens: 0,\n      cache_read_input_tokens: 0\n    };\n    const contentBlocks = {};\n    const mcpToolCalls = {};\n    const serverToolCalls = {};\n    let contextManagement = null;\n    let rawUsage = void 0;\n    let cacheCreationInputTokens = null;\n    let stopSequence = null;\n    let container = null;\n    let isJsonResponseFromTool = false;\n    let blockType = void 0;\n    const generateId3 = this.generateId;\n    const transformedStream = response.pipeThrough(\n      new TransformStream({\n        start(controller) {\n          controller.enqueue({ type: \"stream-start\", warnings });\n        },\n        transform(chunk, controller) {\n          var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;\n          if (options.includeRawChunks) {\n            controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n          }\n          if (!chunk.success) {\n            controller.enqueue({ type: \"error\", error: chunk.error });\n            return;\n          }\n          const value = chunk.value;\n          switch (value.type) {\n            case \"ping\": {\n              return;\n            }\n            case \"content_block_start\": {\n              const part = value.content_block;\n              const contentBlockType = part.type;\n              blockType = contentBlockType;\n              switch (contentBlockType) {\n                case \"text\": {\n                  if (usesJsonResponseTool) {\n                    return;\n                  }\n                  contentBlocks[value.index] = { type: \"text\" };\n                  controller.enqueue({\n                    type: \"text-start\",\n                    id: String(value.index)\n                  });\n                  return;\n                }\n                case \"thinking\": {\n                  contentBlocks[value.index] = { type: \"reasoning\" };\n                  controller.enqueue({\n                    type: \"reasoning-start\",\n                    id: String(value.index)\n                  });\n                  return;\n                }\n                case \"redacted_thinking\": {\n                  contentBlocks[value.index] = { type: \"reasoning\" };\n                  controller.enqueue({\n                    type: \"reasoning-start\",\n                    id: String(value.index),\n                    providerMetadata: {\n                      anthropic: {\n                        redactedData: part.data\n                      }\n                    }\n                  });\n                  return;\n                }\n                case \"tool_use\": {\n                  const isJsonResponseTool = usesJsonResponseTool && part.name === \"json\";\n                  if (isJsonResponseTool) {\n                    isJsonResponseFromTool = true;\n                    contentBlocks[value.index] = { type: \"text\" };\n                    controller.enqueue({\n                      type: \"text-start\",\n                      id: String(value.index)\n                    });\n                  } else {\n                    const caller = part.caller;\n                    const callerInfo = caller ? {\n                      type: caller.type,\n                      toolId: \"tool_id\" in caller ? caller.tool_id : void 0\n                    } : void 0;\n                    const hasNonEmptyInput = part.input && Object.keys(part.input).length > 0;\n                    const initialInput = hasNonEmptyInput ? JSON.stringify(part.input) : \"\";\n                    contentBlocks[value.index] = {\n                      type: \"tool-call\",\n                      toolCallId: part.id,\n                      toolName: part.name,\n                      input: initialInput,\n                      firstDelta: initialInput.length === 0,\n                      ...callerInfo && { caller: callerInfo }\n                    };\n                    controller.enqueue({\n                      type: \"tool-input-start\",\n                      id: part.id,\n                      toolName: part.name\n                    });\n                  }\n                  return;\n                }\n                case \"server_tool_use\": {\n                  if ([\n                    \"web_fetch\",\n                    \"web_search\",\n                    // code execution 20250825:\n                    \"code_execution\",\n                    // code execution 20250825 text editor:\n                    \"text_editor_code_execution\",\n                    // code execution 20250825 bash:\n                    \"bash_code_execution\"\n                  ].includes(part.name)) {\n                    const providerToolName = part.name === \"text_editor_code_execution\" || part.name === \"bash_code_execution\" ? \"code_execution\" : part.name;\n                    const customToolName = toolNameMapping.toCustomToolName(providerToolName);\n                    contentBlocks[value.index] = {\n                      type: \"tool-call\",\n                      toolCallId: part.id,\n                      toolName: customToolName,\n                      input: \"\",\n                      providerExecuted: true,\n                      firstDelta: true,\n                      providerToolName: part.name\n                    };\n                    controller.enqueue({\n                      type: \"tool-input-start\",\n                      id: part.id,\n                      toolName: customToolName,\n                      providerExecuted: true\n                    });\n                  } else if (part.name === \"tool_search_tool_regex\" || part.name === \"tool_search_tool_bm25\") {\n                    serverToolCalls[part.id] = part.name;\n                    const customToolName = toolNameMapping.toCustomToolName(\n                      part.name\n                    );\n                    contentBlocks[value.index] = {\n                      type: \"tool-call\",\n                      toolCallId: part.id,\n                      toolName: customToolName,\n                      input: \"\",\n                      providerExecuted: true,\n                      firstDelta: true,\n                      providerToolName: part.name\n                    };\n                    controller.enqueue({\n                      type: \"tool-input-start\",\n                      id: part.id,\n                      toolName: customToolName,\n                      providerExecuted: true\n                    });\n                  }\n                  return;\n                }\n                case \"web_fetch_tool_result\": {\n                  if (part.content.type === \"web_fetch_result\") {\n                    citationDocuments.push({\n                      title: (_a2 = part.content.content.title) != null ? _a2 : part.content.url,\n                      mediaType: part.content.content.source.media_type\n                    });\n                    controller.enqueue({\n                      type: \"tool-result\",\n                      toolCallId: part.tool_use_id,\n                      toolName: toolNameMapping.toCustomToolName(\"web_fetch\"),\n                      result: {\n                        type: \"web_fetch_result\",\n                        url: part.content.url,\n                        retrievedAt: part.content.retrieved_at,\n                        content: {\n                          type: part.content.content.type,\n                          title: part.content.content.title,\n                          citations: part.content.content.citations,\n                          source: {\n                            type: part.content.content.source.type,\n                            mediaType: part.content.content.source.media_type,\n                            data: part.content.content.source.data\n                          }\n                        }\n                      }\n                    });\n                  } else if (part.content.type === \"web_fetch_tool_result_error\") {\n                    controller.enqueue({\n                      type: \"tool-result\",\n                      toolCallId: part.tool_use_id,\n                      toolName: toolNameMapping.toCustomToolName(\"web_fetch\"),\n                      isError: true,\n                      result: {\n                        type: \"web_fetch_tool_result_error\",\n                        errorCode: part.content.error_code\n                      }\n                    });\n                  }\n                  return;\n                }\n                case \"web_search_tool_result\": {\n                  if (Array.isArray(part.content)) {\n                    controller.enqueue({\n                      type: \"tool-result\",\n                      toolCallId: part.tool_use_id,\n                      toolName: toolNameMapping.toCustomToolName(\"web_search\"),\n                      result: part.content.map((result) => {\n                        var _a3;\n                        return {\n                          url: result.url,\n                          title: result.title,\n                          pageAge: (_a3 = result.page_age) != null ? _a3 : null,\n                          encryptedContent: result.encrypted_content,\n                          type: result.type\n                        };\n                      })\n                    });\n                    for (const result of part.content) {\n                      controller.enqueue({\n                        type: \"source\",\n                        sourceType: \"url\",\n                        id: generateId3(),\n                        url: result.url,\n                        title: result.title,\n                        providerMetadata: {\n                          anthropic: {\n                            pageAge: (_b2 = result.page_age) != null ? _b2 : null\n                          }\n                        }\n                      });\n                    }\n                  } else {\n                    controller.enqueue({\n                      type: \"tool-result\",\n                      toolCallId: part.tool_use_id,\n                      toolName: toolNameMapping.toCustomToolName(\"web_search\"),\n                      isError: true,\n                      result: {\n                        type: \"web_search_tool_result_error\",\n                        errorCode: part.content.error_code\n                      }\n                    });\n                  }\n                  return;\n                }\n                // code execution 20250522:\n                case \"code_execution_tool_result\": {\n                  if (part.content.type === \"code_execution_result\") {\n                    controller.enqueue({\n                      type: \"tool-result\",\n                      toolCallId: part.tool_use_id,\n                      toolName: toolNameMapping.toCustomToolName(\"code_execution\"),\n                      result: {\n                        type: part.content.type,\n                        stdout: part.content.stdout,\n                        stderr: part.content.stderr,\n                        return_code: part.content.return_code,\n                        content: (_c = part.content.content) != null ? _c : []\n                      }\n                    });\n                  } else if (part.content.type === \"code_execution_tool_result_error\") {\n                    controller.enqueue({\n                      type: \"tool-result\",\n                      toolCallId: part.tool_use_id,\n                      toolName: toolNameMapping.toCustomToolName(\"code_execution\"),\n                      isError: true,\n                      result: {\n                        type: \"code_execution_tool_result_error\",\n                        errorCode: part.content.error_code\n                      }\n                    });\n                  }\n                  return;\n                }\n                // code execution 20250825:\n                case \"bash_code_execution_tool_result\":\n                case \"text_editor_code_execution_tool_result\": {\n                  controller.enqueue({\n                    type: \"tool-result\",\n                    toolCallId: part.tool_use_id,\n                    toolName: toolNameMapping.toCustomToolName(\"code_execution\"),\n                    result: part.content\n                  });\n                  return;\n                }\n                // tool search tool results:\n                case \"tool_search_tool_result\": {\n                  let providerToolName = serverToolCalls[part.tool_use_id];\n                  if (providerToolName == null) {\n                    const bm25CustomName = toolNameMapping.toCustomToolName(\n                      \"tool_search_tool_bm25\"\n                    );\n                    const regexCustomName = toolNameMapping.toCustomToolName(\n                      \"tool_search_tool_regex\"\n                    );\n                    if (bm25CustomName !== \"tool_search_tool_bm25\") {\n                      providerToolName = \"tool_search_tool_bm25\";\n                    } else if (regexCustomName !== \"tool_search_tool_regex\") {\n                      providerToolName = \"tool_search_tool_regex\";\n                    } else {\n                      providerToolName = \"tool_search_tool_regex\";\n                    }\n                  }\n                  if (part.content.type === \"tool_search_tool_search_result\") {\n                    controller.enqueue({\n                      type: \"tool-result\",\n                      toolCallId: part.tool_use_id,\n                      toolName: toolNameMapping.toCustomToolName(providerToolName),\n                      result: part.content.tool_references.map((ref) => ({\n                        type: ref.type,\n                        toolName: ref.tool_name\n                      }))\n                    });\n                  } else {\n                    controller.enqueue({\n                      type: \"tool-result\",\n                      toolCallId: part.tool_use_id,\n                      toolName: toolNameMapping.toCustomToolName(providerToolName),\n                      isError: true,\n                      result: {\n                        type: \"tool_search_tool_result_error\",\n                        errorCode: part.content.error_code\n                      }\n                    });\n                  }\n                  return;\n                }\n                case \"mcp_tool_use\": {\n                  mcpToolCalls[part.id] = {\n                    type: \"tool-call\",\n                    toolCallId: part.id,\n                    toolName: part.name,\n                    input: JSON.stringify(part.input),\n                    providerExecuted: true,\n                    dynamic: true,\n                    providerMetadata: {\n                      anthropic: {\n                        type: \"mcp-tool-use\",\n                        serverName: part.server_name\n                      }\n                    }\n                  };\n                  controller.enqueue(mcpToolCalls[part.id]);\n                  return;\n                }\n                case \"mcp_tool_result\": {\n                  controller.enqueue({\n                    type: \"tool-result\",\n                    toolCallId: part.tool_use_id,\n                    toolName: mcpToolCalls[part.tool_use_id].toolName,\n                    isError: part.is_error,\n                    result: part.content,\n                    dynamic: true,\n                    providerMetadata: mcpToolCalls[part.tool_use_id].providerMetadata\n                  });\n                  return;\n                }\n                default: {\n                  const _exhaustiveCheck = contentBlockType;\n                  throw new Error(\n                    `Unsupported content block type: ${_exhaustiveCheck}`\n                  );\n                }\n              }\n            }\n            case \"content_block_stop\": {\n              if (contentBlocks[value.index] != null) {\n                const contentBlock = contentBlocks[value.index];\n                switch (contentBlock.type) {\n                  case \"text\": {\n                    controller.enqueue({\n                      type: \"text-end\",\n                      id: String(value.index)\n                    });\n                    break;\n                  }\n                  case \"reasoning\": {\n                    controller.enqueue({\n                      type: \"reasoning-end\",\n                      id: String(value.index)\n                    });\n                    break;\n                  }\n                  case \"tool-call\":\n                    const isJsonResponseTool = usesJsonResponseTool && contentBlock.toolName === \"json\";\n                    if (!isJsonResponseTool) {\n                      controller.enqueue({\n                        type: \"tool-input-end\",\n                        id: contentBlock.toolCallId\n                      });\n                      let finalInput = contentBlock.input === \"\" ? \"{}\" : contentBlock.input;\n                      if (contentBlock.providerToolName === \"code_execution\") {\n                        try {\n                          const parsed = JSON.parse(finalInput);\n                          if (parsed != null && typeof parsed === \"object\" && \"code\" in parsed && !(\"type\" in parsed)) {\n                            finalInput = JSON.stringify({\n                              type: \"programmatic-tool-call\",\n                              ...parsed\n                            });\n                          }\n                        } catch (e) {\n                        }\n                      }\n                      controller.enqueue({\n                        type: \"tool-call\",\n                        toolCallId: contentBlock.toolCallId,\n                        toolName: contentBlock.toolName,\n                        input: finalInput,\n                        providerExecuted: contentBlock.providerExecuted,\n                        ...contentBlock.caller && {\n                          providerMetadata: {\n                            anthropic: {\n                              caller: contentBlock.caller\n                            }\n                          }\n                        }\n                      });\n                    }\n                    break;\n                }\n                delete contentBlocks[value.index];\n              }\n              blockType = void 0;\n              return;\n            }\n            case \"content_block_delta\": {\n              const deltaType = value.delta.type;\n              switch (deltaType) {\n                case \"text_delta\": {\n                  if (usesJsonResponseTool) {\n                    return;\n                  }\n                  controller.enqueue({\n                    type: \"text-delta\",\n                    id: String(value.index),\n                    delta: value.delta.text\n                  });\n                  return;\n                }\n                case \"thinking_delta\": {\n                  controller.enqueue({\n                    type: \"reasoning-delta\",\n                    id: String(value.index),\n                    delta: value.delta.thinking\n                  });\n                  return;\n                }\n                case \"signature_delta\": {\n                  if (blockType === \"thinking\") {\n                    controller.enqueue({\n                      type: \"reasoning-delta\",\n                      id: String(value.index),\n                      delta: \"\",\n                      providerMetadata: {\n                        anthropic: {\n                          signature: value.delta.signature\n                        }\n                      }\n                    });\n                  }\n                  return;\n                }\n                case \"input_json_delta\": {\n                  const contentBlock = contentBlocks[value.index];\n                  let delta = value.delta.partial_json;\n                  if (delta.length === 0) {\n                    return;\n                  }\n                  if (isJsonResponseFromTool) {\n                    if ((contentBlock == null ? void 0 : contentBlock.type) !== \"text\") {\n                      return;\n                    }\n                    controller.enqueue({\n                      type: \"text-delta\",\n                      id: String(value.index),\n                      delta\n                    });\n                  } else {\n                    if ((contentBlock == null ? void 0 : contentBlock.type) !== \"tool-call\") {\n                      return;\n                    }\n                    if (contentBlock.firstDelta && (contentBlock.providerToolName === \"bash_code_execution\" || contentBlock.providerToolName === \"text_editor_code_execution\")) {\n                      delta = `{\"type\": \"${contentBlock.providerToolName}\",${delta.substring(1)}`;\n                    }\n                    controller.enqueue({\n                      type: \"tool-input-delta\",\n                      id: contentBlock.toolCallId,\n                      delta\n                    });\n                    contentBlock.input += delta;\n                    contentBlock.firstDelta = false;\n                  }\n                  return;\n                }\n                case \"citations_delta\": {\n                  const citation = value.delta.citation;\n                  const source = createCitationSource(\n                    citation,\n                    citationDocuments,\n                    generateId3\n                  );\n                  if (source) {\n                    controller.enqueue(source);\n                  }\n                  return;\n                }\n                default: {\n                  const _exhaustiveCheck = deltaType;\n                  throw new Error(\n                    `Unsupported delta type: ${_exhaustiveCheck}`\n                  );\n                }\n              }\n            }\n            case \"message_start\": {\n              usage.input_tokens = value.message.usage.input_tokens;\n              usage.cache_read_input_tokens = (_d = value.message.usage.cache_read_input_tokens) != null ? _d : 0;\n              usage.cache_creation_input_tokens = (_e = value.message.usage.cache_creation_input_tokens) != null ? _e : 0;\n              rawUsage = {\n                ...value.message.usage\n              };\n              cacheCreationInputTokens = (_f = value.message.usage.cache_creation_input_tokens) != null ? _f : null;\n              if (value.message.container != null) {\n                container = {\n                  expiresAt: value.message.container.expires_at,\n                  id: value.message.container.id,\n                  skills: null\n                };\n              }\n              if (value.message.stop_reason != null) {\n                finishReason = {\n                  unified: mapAnthropicStopReason({\n                    finishReason: value.message.stop_reason,\n                    isJsonResponseFromTool\n                  }),\n                  raw: value.message.stop_reason\n                };\n              }\n              controller.enqueue({\n                type: \"response-metadata\",\n                id: (_g = value.message.id) != null ? _g : void 0,\n                modelId: (_h = value.message.model) != null ? _h : void 0\n              });\n              if (value.message.content != null) {\n                for (let contentIndex = 0; contentIndex < value.message.content.length; contentIndex++) {\n                  const part = value.message.content[contentIndex];\n                  if (part.type === \"tool_use\") {\n                    const caller = part.caller;\n                    const callerInfo = caller ? {\n                      type: caller.type,\n                      toolId: \"tool_id\" in caller ? caller.tool_id : void 0\n                    } : void 0;\n                    controller.enqueue({\n                      type: \"tool-input-start\",\n                      id: part.id,\n                      toolName: part.name\n                    });\n                    const inputStr = JSON.stringify((_i = part.input) != null ? _i : {});\n                    controller.enqueue({\n                      type: \"tool-input-delta\",\n                      id: part.id,\n                      delta: inputStr\n                    });\n                    controller.enqueue({\n                      type: \"tool-input-end\",\n                      id: part.id\n                    });\n                    controller.enqueue({\n                      type: \"tool-call\",\n                      toolCallId: part.id,\n                      toolName: part.name,\n                      input: inputStr,\n                      ...callerInfo && {\n                        providerMetadata: {\n                          anthropic: {\n                            caller: callerInfo\n                          }\n                        }\n                      }\n                    });\n                  }\n                }\n              }\n              return;\n            }\n            case \"message_delta\": {\n              if (value.usage.input_tokens != null && usage.input_tokens !== value.usage.input_tokens) {\n                usage.input_tokens = value.usage.input_tokens;\n              }\n              usage.output_tokens = value.usage.output_tokens;\n              if (value.usage.cache_read_input_tokens != null) {\n                usage.cache_read_input_tokens = value.usage.cache_read_input_tokens;\n              }\n              if (value.usage.cache_creation_input_tokens != null) {\n                usage.cache_creation_input_tokens = value.usage.cache_creation_input_tokens;\n                cacheCreationInputTokens = value.usage.cache_creation_input_tokens;\n              }\n              finishReason = {\n                unified: mapAnthropicStopReason({\n                  finishReason: value.delta.stop_reason,\n                  isJsonResponseFromTool\n                }),\n                raw: (_j = value.delta.stop_reason) != null ? _j : void 0\n              };\n              stopSequence = (_k = value.delta.stop_sequence) != null ? _k : null;\n              container = value.delta.container != null ? {\n                expiresAt: value.delta.container.expires_at,\n                id: value.delta.container.id,\n                skills: (_m = (_l = value.delta.container.skills) == null ? void 0 : _l.map((skill) => ({\n                  type: skill.type,\n                  skillId: skill.skill_id,\n                  version: skill.version\n                }))) != null ? _m : null\n              } : null;\n              if (value.context_management) {\n                contextManagement = mapAnthropicResponseContextManagement(\n                  value.context_management\n                );\n              }\n              rawUsage = {\n                ...rawUsage,\n                ...value.usage\n              };\n              return;\n            }\n            case \"message_stop\": {\n              const anthropicMetadata = {\n                usage: rawUsage != null ? rawUsage : null,\n                cacheCreationInputTokens,\n                stopSequence,\n                container,\n                contextManagement\n              };\n              const providerMetadata = {\n                anthropic: anthropicMetadata\n              };\n              if (usedCustomProviderKey && providerOptionsName !== \"anthropic\") {\n                providerMetadata[providerOptionsName] = anthropicMetadata;\n              }\n              controller.enqueue({\n                type: \"finish\",\n                finishReason,\n                usage: convertAnthropicMessagesUsage(usage),\n                providerMetadata\n              });\n              return;\n            }\n            case \"error\": {\n              controller.enqueue({ type: \"error\", error: value.error });\n              return;\n            }\n            default: {\n              const _exhaustiveCheck = value;\n              throw new Error(`Unsupported chunk type: ${_exhaustiveCheck}`);\n            }\n          }\n        }\n      })\n    );\n    const [streamForFirstChunk, streamForConsumer] = transformedStream.tee();\n    const firstChunkReader = streamForFirstChunk.getReader();\n    try {\n      await firstChunkReader.read();\n      let result = await firstChunkReader.read();\n      if (((_a = result.value) == null ? void 0 : _a.type) === \"raw\") {\n        result = await firstChunkReader.read();\n      }\n      if (((_b = result.value) == null ? void 0 : _b.type) === \"error\") {\n        const error = result.value.error;\n        throw new APICallError({\n          message: error.message,\n          url,\n          requestBodyValues: body,\n          statusCode: error.type === \"overloaded_error\" ? 529 : 500,\n          responseHeaders,\n          responseBody: JSON.stringify(error),\n          isRetryable: error.type === \"overloaded_error\"\n        });\n      }\n    } finally {\n      firstChunkReader.cancel().catch(() => {\n      });\n      firstChunkReader.releaseLock();\n    }\n    return {\n      stream: streamForConsumer,\n      request: { body },\n      response: { headers: responseHeaders }\n    };\n  }\n};\nfunction getModelCapabilities(modelId) {\n  if (modelId.includes(\"claude-sonnet-4-5\") || modelId.includes(\"claude-opus-4-5\") || modelId.includes(\"claude-haiku-4-5\")) {\n    return {\n      maxOutputTokens: 64e3,\n      supportsStructuredOutput: true,\n      isKnownModel: true\n    };\n  } else if (modelId.includes(\"claude-opus-4-1\")) {\n    return {\n      maxOutputTokens: 32e3,\n      supportsStructuredOutput: true,\n      isKnownModel: true\n    };\n  } else if (modelId.includes(\"claude-sonnet-4-\") || modelId.includes(\"claude-3-7-sonnet\")) {\n    return {\n      maxOutputTokens: 64e3,\n      supportsStructuredOutput: false,\n      isKnownModel: true\n    };\n  } else if (modelId.includes(\"claude-opus-4-\")) {\n    return {\n      maxOutputTokens: 32e3,\n      supportsStructuredOutput: false,\n      isKnownModel: true\n    };\n  } else if (modelId.includes(\"claude-3-5-haiku\")) {\n    return {\n      maxOutputTokens: 8192,\n      supportsStructuredOutput: false,\n      isKnownModel: true\n    };\n  } else if (modelId.includes(\"claude-3-haiku\")) {\n    return {\n      maxOutputTokens: 4096,\n      supportsStructuredOutput: false,\n      isKnownModel: true\n    };\n  } else {\n    return {\n      maxOutputTokens: 4096,\n      supportsStructuredOutput: false,\n      isKnownModel: false\n    };\n  }\n}\nfunction mapAnthropicResponseContextManagement(contextManagement) {\n  return contextManagement ? {\n    appliedEdits: contextManagement.applied_edits.map((edit) => {\n      const strategy = edit.type;\n      switch (strategy) {\n        case \"clear_tool_uses_20250919\":\n          return {\n            type: edit.type,\n            clearedToolUses: edit.cleared_tool_uses,\n            clearedInputTokens: edit.cleared_input_tokens\n          };\n        case \"clear_thinking_20251015\":\n          return {\n            type: edit.type,\n            clearedThinkingTurns: edit.cleared_thinking_turns,\n            clearedInputTokens: edit.cleared_input_tokens\n          };\n      }\n    }).filter((edit) => edit !== void 0)\n  } : null;\n}\n\n// src/tool/bash_20241022.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory2,\n  lazySchema as lazySchema9,\n  zodSchema as zodSchema9\n} from \"@ai-sdk/provider-utils\";\nimport { z as z10 } from \"zod/v4\";\nvar bash_20241022InputSchema = lazySchema9(\n  () => zodSchema9(\n    z10.object({\n      command: z10.string(),\n      restart: z10.boolean().optional()\n    })\n  )\n);\nvar bash_20241022 = createProviderToolFactory2({\n  id: \"anthropic.bash_20241022\",\n  inputSchema: bash_20241022InputSchema\n});\n\n// src/tool/bash_20250124.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory3,\n  lazySchema as lazySchema10,\n  zodSchema as zodSchema10\n} from \"@ai-sdk/provider-utils\";\nimport { z as z11 } from \"zod/v4\";\nvar bash_20250124InputSchema = lazySchema10(\n  () => zodSchema10(\n    z11.object({\n      command: z11.string(),\n      restart: z11.boolean().optional()\n    })\n  )\n);\nvar bash_20250124 = createProviderToolFactory3({\n  id: \"anthropic.bash_20250124\",\n  inputSchema: bash_20250124InputSchema\n});\n\n// src/tool/computer_20241022.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory4,\n  lazySchema as lazySchema11,\n  zodSchema as zodSchema11\n} from \"@ai-sdk/provider-utils\";\nimport { z as z12 } from \"zod/v4\";\nvar computer_20241022InputSchema = lazySchema11(\n  () => zodSchema11(\n    z12.object({\n      action: z12.enum([\n        \"key\",\n        \"type\",\n        \"mouse_move\",\n        \"left_click\",\n        \"left_click_drag\",\n        \"right_click\",\n        \"middle_click\",\n        \"double_click\",\n        \"screenshot\",\n        \"cursor_position\"\n      ]),\n      coordinate: z12.array(z12.number().int()).optional(),\n      text: z12.string().optional()\n    })\n  )\n);\nvar computer_20241022 = createProviderToolFactory4({\n  id: \"anthropic.computer_20241022\",\n  inputSchema: computer_20241022InputSchema\n});\n\n// src/tool/computer_20250124.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory5,\n  lazySchema as lazySchema12,\n  zodSchema as zodSchema12\n} from \"@ai-sdk/provider-utils\";\nimport { z as z13 } from \"zod/v4\";\nvar computer_20250124InputSchema = lazySchema12(\n  () => zodSchema12(\n    z13.object({\n      action: z13.enum([\n        \"key\",\n        \"hold_key\",\n        \"type\",\n        \"cursor_position\",\n        \"mouse_move\",\n        \"left_mouse_down\",\n        \"left_mouse_up\",\n        \"left_click\",\n        \"left_click_drag\",\n        \"right_click\",\n        \"middle_click\",\n        \"double_click\",\n        \"triple_click\",\n        \"scroll\",\n        \"wait\",\n        \"screenshot\"\n      ]),\n      coordinate: z13.tuple([z13.number().int(), z13.number().int()]).optional(),\n      duration: z13.number().optional(),\n      scroll_amount: z13.number().optional(),\n      scroll_direction: z13.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n      start_coordinate: z13.tuple([z13.number().int(), z13.number().int()]).optional(),\n      text: z13.string().optional()\n    })\n  )\n);\nvar computer_20250124 = createProviderToolFactory5({\n  id: \"anthropic.computer_20250124\",\n  inputSchema: computer_20250124InputSchema\n});\n\n// src/tool/computer_20251124.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory6,\n  lazySchema as lazySchema13,\n  zodSchema as zodSchema13\n} from \"@ai-sdk/provider-utils\";\nimport { z as z14 } from \"zod/v4\";\nvar computer_20251124InputSchema = lazySchema13(\n  () => zodSchema13(\n    z14.object({\n      action: z14.enum([\n        \"key\",\n        \"hold_key\",\n        \"type\",\n        \"cursor_position\",\n        \"mouse_move\",\n        \"left_mouse_down\",\n        \"left_mouse_up\",\n        \"left_click\",\n        \"left_click_drag\",\n        \"right_click\",\n        \"middle_click\",\n        \"double_click\",\n        \"triple_click\",\n        \"scroll\",\n        \"wait\",\n        \"screenshot\",\n        \"zoom\"\n      ]),\n      coordinate: z14.tuple([z14.number().int(), z14.number().int()]).optional(),\n      duration: z14.number().optional(),\n      region: z14.tuple([\n        z14.number().int(),\n        z14.number().int(),\n        z14.number().int(),\n        z14.number().int()\n      ]).optional(),\n      scroll_amount: z14.number().optional(),\n      scroll_direction: z14.enum([\"up\", \"down\", \"left\", \"right\"]).optional(),\n      start_coordinate: z14.tuple([z14.number().int(), z14.number().int()]).optional(),\n      text: z14.string().optional()\n    })\n  )\n);\nvar computer_20251124 = createProviderToolFactory6({\n  id: \"anthropic.computer_20251124\",\n  inputSchema: computer_20251124InputSchema\n});\n\n// src/tool/memory_20250818.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory7,\n  lazySchema as lazySchema14,\n  zodSchema as zodSchema14\n} from \"@ai-sdk/provider-utils\";\nimport { z as z15 } from \"zod/v4\";\nvar memory_20250818InputSchema = lazySchema14(\n  () => zodSchema14(\n    z15.discriminatedUnion(\"command\", [\n      z15.object({\n        command: z15.literal(\"view\"),\n        path: z15.string(),\n        view_range: z15.tuple([z15.number(), z15.number()]).optional()\n      }),\n      z15.object({\n        command: z15.literal(\"create\"),\n        path: z15.string(),\n        file_text: z15.string()\n      }),\n      z15.object({\n        command: z15.literal(\"str_replace\"),\n        path: z15.string(),\n        old_str: z15.string(),\n        new_str: z15.string()\n      }),\n      z15.object({\n        command: z15.literal(\"insert\"),\n        path: z15.string(),\n        insert_line: z15.number(),\n        insert_text: z15.string()\n      }),\n      z15.object({\n        command: z15.literal(\"delete\"),\n        path: z15.string()\n      }),\n      z15.object({\n        command: z15.literal(\"rename\"),\n        old_path: z15.string(),\n        new_path: z15.string()\n      })\n    ])\n  )\n);\nvar memory_20250818 = createProviderToolFactory7({\n  id: \"anthropic.memory_20250818\",\n  inputSchema: memory_20250818InputSchema\n});\n\n// src/tool/text-editor_20241022.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory8,\n  lazySchema as lazySchema15,\n  zodSchema as zodSchema15\n} from \"@ai-sdk/provider-utils\";\nimport { z as z16 } from \"zod/v4\";\nvar textEditor_20241022InputSchema = lazySchema15(\n  () => zodSchema15(\n    z16.object({\n      command: z16.enum([\"view\", \"create\", \"str_replace\", \"insert\", \"undo_edit\"]),\n      path: z16.string(),\n      file_text: z16.string().optional(),\n      insert_line: z16.number().int().optional(),\n      new_str: z16.string().optional(),\n      insert_text: z16.string().optional(),\n      old_str: z16.string().optional(),\n      view_range: z16.array(z16.number().int()).optional()\n    })\n  )\n);\nvar textEditor_20241022 = createProviderToolFactory8({\n  id: \"anthropic.text_editor_20241022\",\n  inputSchema: textEditor_20241022InputSchema\n});\n\n// src/tool/text-editor_20250124.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory9,\n  lazySchema as lazySchema16,\n  zodSchema as zodSchema16\n} from \"@ai-sdk/provider-utils\";\nimport { z as z17 } from \"zod/v4\";\nvar textEditor_20250124InputSchema = lazySchema16(\n  () => zodSchema16(\n    z17.object({\n      command: z17.enum([\"view\", \"create\", \"str_replace\", \"insert\", \"undo_edit\"]),\n      path: z17.string(),\n      file_text: z17.string().optional(),\n      insert_line: z17.number().int().optional(),\n      new_str: z17.string().optional(),\n      insert_text: z17.string().optional(),\n      old_str: z17.string().optional(),\n      view_range: z17.array(z17.number().int()).optional()\n    })\n  )\n);\nvar textEditor_20250124 = createProviderToolFactory9({\n  id: \"anthropic.text_editor_20250124\",\n  inputSchema: textEditor_20250124InputSchema\n});\n\n// src/tool/text-editor_20250429.ts\nimport {\n  createProviderToolFactory as createProviderToolFactory10,\n  lazySchema as lazySchema17,\n  zodSchema as zodSchema17\n} from \"@ai-sdk/provider-utils\";\nimport { z as z18 } from \"zod/v4\";\nvar textEditor_20250429InputSchema = lazySchema17(\n  () => zodSchema17(\n    z18.object({\n      command: z18.enum([\"view\", \"create\", \"str_replace\", \"insert\"]),\n      path: z18.string(),\n      file_text: z18.string().optional(),\n      insert_line: z18.number().int().optional(),\n      new_str: z18.string().optional(),\n      insert_text: z18.string().optional(),\n      old_str: z18.string().optional(),\n      view_range: z18.array(z18.number().int()).optional()\n    })\n  )\n);\nvar textEditor_20250429 = createProviderToolFactory10({\n  id: \"anthropic.text_editor_20250429\",\n  inputSchema: textEditor_20250429InputSchema\n});\n\n// src/tool/tool-search-bm25_20251119.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,\n  lazySchema as lazySchema18,\n  zodSchema as zodSchema18\n} from \"@ai-sdk/provider-utils\";\nimport { z as z19 } from \"zod/v4\";\nvar toolSearchBm25_20251119OutputSchema = lazySchema18(\n  () => zodSchema18(\n    z19.array(\n      z19.object({\n        type: z19.literal(\"tool_reference\"),\n        toolName: z19.string()\n      })\n    )\n  )\n);\nvar toolSearchBm25_20251119InputSchema = lazySchema18(\n  () => zodSchema18(\n    z19.object({\n      /**\n       * A natural language query to search for tools.\n       * Claude will use BM25 text search to find relevant tools.\n       */\n      query: z19.string(),\n      /**\n       * Maximum number of tools to return. Optional.\n       */\n      limit: z19.number().optional()\n    })\n  )\n);\nvar factory7 = createProviderToolFactoryWithOutputSchema6({\n  id: \"anthropic.tool_search_bm25_20251119\",\n  inputSchema: toolSearchBm25_20251119InputSchema,\n  outputSchema: toolSearchBm25_20251119OutputSchema,\n  supportsDeferredResults: true\n});\nvar toolSearchBm25_20251119 = (args = {}) => {\n  return factory7(args);\n};\n\n// src/anthropic-tools.ts\nvar anthropicTools = {\n  /**\n   * The bash tool enables Claude to execute shell commands in a persistent bash session,\n   * allowing system operations, script execution, and command-line automation.\n   *\n   * Image results are supported.\n   */\n  bash_20241022,\n  /**\n   * The bash tool enables Claude to execute shell commands in a persistent bash session,\n   * allowing system operations, script execution, and command-line automation.\n   *\n   * Image results are supported.\n   */\n  bash_20250124,\n  /**\n   * Claude can analyze data, create visualizations, perform complex calculations,\n   * run system commands, create and edit files, and process uploaded files directly within\n   * the API conversation.\n   *\n   * The code execution tool allows Claude to run Bash commands and manipulate files,\n   * including writing code, in a secure, sandboxed environment.\n   */\n  codeExecution_20250522,\n  /**\n   * Claude can analyze data, create visualizations, perform complex calculations,\n   * run system commands, create and edit files, and process uploaded files directly within\n   * the API conversation.\n   *\n   * The code execution tool allows Claude to run both Python and Bash commands and manipulate files,\n   * including writing code, in a secure, sandboxed environment.\n   *\n   * This is the latest version with enhanced Bash support and file operations.\n   */\n  codeExecution_20250825,\n  /**\n   * Claude can interact with computer environments through the computer use tool, which\n   * provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.\n   *\n   * Image results are supported.\n   *\n   * @param displayWidthPx - The width of the display being controlled by the model in pixels.\n   * @param displayHeightPx - The height of the display being controlled by the model in pixels.\n   * @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.\n   */\n  computer_20241022,\n  /**\n   * Claude can interact with computer environments through the computer use tool, which\n   * provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.\n   *\n   * Image results are supported.\n   *\n   * @param displayWidthPx - The width of the display being controlled by the model in pixels.\n   * @param displayHeightPx - The height of the display being controlled by the model in pixels.\n   * @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.\n   */\n  computer_20250124,\n  /**\n   * Claude can interact with computer environments through the computer use tool, which\n   * provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.\n   *\n   * This version adds the zoom action for detailed screen region inspection.\n   *\n   * Image results are supported.\n   *\n   * Supported models: Claude Opus 4.5\n   *\n   * @param displayWidthPx - The width of the display being controlled by the model in pixels.\n   * @param displayHeightPx - The height of the display being controlled by the model in pixels.\n   * @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.\n   * @param enableZoom - Enable zoom action. Set to true to allow Claude to zoom into specific screen regions. Default: false.\n   */\n  computer_20251124,\n  /**\n   * The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.\n   * Claude can create, read, update, and delete files that persist between sessions,\n   * allowing it to build knowledge over time without keeping everything in the context window.\n   * The memory tool operates client-side—you control where and how the data is stored through your own infrastructure.\n   *\n   * Supported models: Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4.1, Claude Opus 4.\n   */\n  memory_20250818,\n  /**\n   * Claude can use an Anthropic-defined text editor tool to view and modify text files,\n   * helping you debug, fix, and improve your code or other text documents. This allows Claude\n   * to directly interact with your files, providing hands-on assistance rather than just suggesting changes.\n   *\n   * Supported models: Claude Sonnet 3.5\n   */\n  textEditor_20241022,\n  /**\n   * Claude can use an Anthropic-defined text editor tool to view and modify text files,\n   * helping you debug, fix, and improve your code or other text documents. This allows Claude\n   * to directly interact with your files, providing hands-on assistance rather than just suggesting changes.\n   *\n   * Supported models: Claude Sonnet 3.7\n   */\n  textEditor_20250124,\n  /**\n   * Claude can use an Anthropic-defined text editor tool to view and modify text files,\n   * helping you debug, fix, and improve your code or other text documents. This allows Claude\n   * to directly interact with your files, providing hands-on assistance rather than just suggesting changes.\n   *\n   * Note: This version does not support the \"undo_edit\" command.\n   *\n   * @deprecated Use textEditor_20250728 instead\n   */\n  textEditor_20250429,\n  /**\n   * Claude can use an Anthropic-defined text editor tool to view and modify text files,\n   * helping you debug, fix, and improve your code or other text documents. This allows Claude\n   * to directly interact with your files, providing hands-on assistance rather than just suggesting changes.\n   *\n   * Note: This version does not support the \"undo_edit\" command and adds optional max_characters parameter.\n   *\n   * Supported models: Claude Sonnet 4, Opus 4, and Opus 4.1\n   *\n   * @param maxCharacters - Optional maximum number of characters to view in the file\n   */\n  textEditor_20250728,\n  /**\n   * Creates a web fetch tool that gives Claude direct access to real-time web content.\n   *\n   * @param maxUses - The max_uses parameter limits the number of web fetches performed\n   * @param allowedDomains - Only fetch from these domains\n   * @param blockedDomains - Never fetch from these domains\n   * @param citations - Unlike web search where citations are always enabled, citations are optional for web fetch. Set \"citations\": {\"enabled\": true} to enable Claude to cite specific passages from fetched documents.\n   * @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.\n   */\n  webFetch_20250910,\n  /**\n   * Creates a web search tool that gives Claude direct access to real-time web content.\n   *\n   * @param maxUses - Maximum number of web searches Claude can perform during the conversation.\n   * @param allowedDomains - Optional list of domains that Claude is allowed to search.\n   * @param blockedDomains - Optional list of domains that Claude should avoid when searching.\n   * @param userLocation - Optional user location information to provide geographically relevant search results.\n   */\n  webSearch_20250305,\n  /**\n   * Creates a tool search tool that uses regex patterns to find tools.\n   *\n   * The tool search tool enables Claude to work with hundreds or thousands of tools\n   * by dynamically discovering and loading them on-demand. Instead of loading all\n   * tool definitions into the context window upfront, Claude searches your tool\n   * catalog and loads only the tools it needs.\n   *\n   * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools\n   * to mark them for deferred loading.\n   *\n   * Supported models: Claude Opus 4.5, Claude Sonnet 4.5\n   */\n  toolSearchRegex_20251119,\n  /**\n   * Creates a tool search tool that uses BM25 (natural language) to find tools.\n   *\n   * The tool search tool enables Claude to work with hundreds or thousands of tools\n   * by dynamically discovering and loading them on-demand. Instead of loading all\n   * tool definitions into the context window upfront, Claude searches your tool\n   * catalog and loads only the tools it needs.\n   *\n   * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools\n   * to mark them for deferred loading.\n   *\n   * Supported models: Claude Opus 4.5, Claude Sonnet 4.5\n   */\n  toolSearchBm25_20251119\n};\n\n// src/anthropic-provider.ts\nfunction createAnthropic(options = {}) {\n  var _a, _b;\n  const baseURL = (_a = withoutTrailingSlash(\n    loadOptionalSetting({\n      settingValue: options.baseURL,\n      environmentVariableName: \"ANTHROPIC_BASE_URL\"\n    })\n  )) != null ? _a : \"https://api.anthropic.com/v1\";\n  const providerName = (_b = options.name) != null ? _b : \"anthropic.messages\";\n  if (options.apiKey && options.authToken) {\n    throw new InvalidArgumentError({\n      argument: \"apiKey/authToken\",\n      message: \"Both apiKey and authToken were provided. Please use only one authentication method.\"\n    });\n  }\n  const getHeaders = () => {\n    const authHeaders = options.authToken ? { Authorization: `Bearer ${options.authToken}` } : {\n      \"x-api-key\": loadApiKey({\n        apiKey: options.apiKey,\n        environmentVariableName: \"ANTHROPIC_API_KEY\",\n        description: \"Anthropic\"\n      })\n    };\n    return withUserAgentSuffix(\n      {\n        \"anthropic-version\": \"2023-06-01\",\n        ...authHeaders,\n        ...options.headers\n      },\n      `ai-sdk/anthropic/${VERSION}`\n    );\n  };\n  const createChatModel = (modelId) => {\n    var _a2;\n    return new AnthropicMessagesLanguageModel(modelId, {\n      provider: providerName,\n      baseURL,\n      headers: getHeaders,\n      fetch: options.fetch,\n      generateId: (_a2 = options.generateId) != null ? _a2 : generateId2,\n      supportedUrls: () => ({\n        \"image/*\": [/^https?:\\/\\/.*$/],\n        \"application/pdf\": [/^https?:\\/\\/.*$/]\n      })\n    });\n  };\n  const provider = function(modelId) {\n    if (new.target) {\n      throw new Error(\n        \"The Anthropic model function cannot be called with the new keyword.\"\n      );\n    }\n    return createChatModel(modelId);\n  };\n  provider.specificationVersion = \"v3\";\n  provider.languageModel = createChatModel;\n  provider.chat = createChatModel;\n  provider.messages = createChatModel;\n  provider.embeddingModel = (modelId) => {\n    throw new NoSuchModelError({ modelId, modelType: \"embeddingModel\" });\n  };\n  provider.textEmbeddingModel = provider.embeddingModel;\n  provider.imageModel = (modelId) => {\n    throw new NoSuchModelError({ modelId, modelType: \"imageModel\" });\n  };\n  provider.tools = anthropicTools;\n  return provider;\n}\nvar anthropic = createAnthropic();\n\n// src/forward-anthropic-container-id-from-last-step.ts\nfunction forwardAnthropicContainerIdFromLastStep({\n  steps\n}) {\n  var _a, _b, _c;\n  for (let i = steps.length - 1; i >= 0; i--) {\n    const containerId = (_c = (_b = (_a = steps[i].providerMetadata) == null ? void 0 : _a.anthropic) == null ? void 0 : _b.container) == null ? void 0 : _c.id;\n    if (containerId) {\n      return {\n        providerOptions: {\n          anthropic: {\n            container: { id: containerId }\n          }\n        }\n      };\n    }\n  }\n  return void 0;\n}\nexport {\n  VERSION,\n  anthropic,\n  createAnthropic,\n  forwardAnthropicContainerIdFromLastStep\n};\n//# sourceMappingURL=index.mjs.map","import { USER_AGENT } from \"./version-Dl3bNTAd.js\";\nimport { createAnthropic } from \"@ai-sdk/anthropic\";\n\n//#region src/internal/agents/anthropic-provider.ts\nconst DEFAULT_ANTHROPIC_MODEL = \"claude-sonnet-4-5\";\nlet configuredBaseUrl;\n/**\n* Configure the Anthropic base URL (CLI flag only, not environment variable).\n* This must be called explicitly - it cannot be set via environment variables for security.\n*/\nfunction setAnthropicBaseUrl(baseUrl) {\n\tconfiguredBaseUrl = baseUrl;\n}\n/**\n* Retrieve an Anthropic language model configured from environment variables and explicit config.\n*\n* Configuration:\n* - ANTHROPIC_API_KEY: API key for authentication (required)\n* - ANTHROPIC_MODEL: Model to use (default: \"claude-sonnet-4-5\") - env var OK\n* - Base URL: Must be set via setAnthropicBaseUrl() - NOT from env vars (security risk)\n*/\nfunction getAnthropicModel(model) {\n\tconst defaultModel = process.env.ANTHROPIC_MODEL || DEFAULT_ANTHROPIC_MODEL;\n\tconst factory = createAnthropic({\n\t\t...configuredBaseUrl && { baseURL: configuredBaseUrl },\n\t\theaders: { \"User-Agent\": USER_AGENT }\n\t});\n\treturn factory(model ?? defaultModel);\n}\n\n//#endregion\nexport { getAnthropicModel, setAnthropicBaseUrl };\n//# sourceMappingURL=anthropic-provider-CRd6GA4E.js.map","// src/openai-provider.ts\nimport {\n  loadApiKey,\n  loadOptionalSetting,\n  withoutTrailingSlash,\n  withUserAgentSuffix\n} from \"@ai-sdk/provider-utils\";\n\n// src/chat/openai-chat-language-model.ts\nimport {\n  InvalidResponseDataError\n} from \"@ai-sdk/provider\";\nimport {\n  combineHeaders,\n  createEventSourceResponseHandler,\n  createJsonResponseHandler,\n  generateId,\n  isParsableJson,\n  parseProviderOptions,\n  postJsonToApi\n} from \"@ai-sdk/provider-utils\";\n\n// src/openai-error.ts\nimport { z } from \"zod/v4\";\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nvar openaiErrorDataSchema = z.object({\n  error: z.object({\n    message: z.string(),\n    // The additional information below is handled loosely to support\n    // OpenAI-compatible providers that have slightly different error\n    // responses:\n    type: z.string().nullish(),\n    param: z.any().nullish(),\n    code: z.union([z.string(), z.number()]).nullish()\n  })\n});\nvar openaiFailedResponseHandler = createJsonErrorResponseHandler({\n  errorSchema: openaiErrorDataSchema,\n  errorToMessage: (data) => data.error.message\n});\n\n// src/openai-language-model-capabilities.ts\nfunction getOpenAILanguageModelCapabilities(modelId) {\n  const supportsFlexProcessing = modelId.startsWith(\"o3\") || modelId.startsWith(\"o4-mini\") || modelId.startsWith(\"gpt-5\") && !modelId.startsWith(\"gpt-5-chat\");\n  const supportsPriorityProcessing = modelId.startsWith(\"gpt-4\") || modelId.startsWith(\"gpt-5-mini\") || modelId.startsWith(\"gpt-5\") && !modelId.startsWith(\"gpt-5-nano\") && !modelId.startsWith(\"gpt-5-chat\") || modelId.startsWith(\"o3\") || modelId.startsWith(\"o4-mini\");\n  const isReasoningModel = modelId.startsWith(\"o1\") || modelId.startsWith(\"o3\") || modelId.startsWith(\"o4-mini\") || modelId.startsWith(\"codex-mini\") || modelId.startsWith(\"computer-use-preview\") || modelId.startsWith(\"gpt-5\") && !modelId.startsWith(\"gpt-5-chat\");\n  const supportsNonReasoningParameters = modelId.startsWith(\"gpt-5.1\") || modelId.startsWith(\"gpt-5.2\");\n  const systemMessageMode = isReasoningModel ? \"developer\" : \"system\";\n  return {\n    supportsFlexProcessing,\n    supportsPriorityProcessing,\n    isReasoningModel,\n    systemMessageMode,\n    supportsNonReasoningParameters\n  };\n}\n\n// src/chat/convert-openai-chat-usage.ts\nfunction convertOpenAIChatUsage(usage) {\n  var _a, _b, _c, _d, _e, _f;\n  if (usage == null) {\n    return {\n      inputTokens: {\n        total: void 0,\n        noCache: void 0,\n        cacheRead: void 0,\n        cacheWrite: void 0\n      },\n      outputTokens: {\n        total: void 0,\n        text: void 0,\n        reasoning: void 0\n      },\n      raw: void 0\n    };\n  }\n  const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n  const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n  const cachedTokens = (_d = (_c = usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0;\n  const reasoningTokens = (_f = (_e = usage.completion_tokens_details) == null ? void 0 : _e.reasoning_tokens) != null ? _f : 0;\n  return {\n    inputTokens: {\n      total: promptTokens,\n      noCache: promptTokens - cachedTokens,\n      cacheRead: cachedTokens,\n      cacheWrite: void 0\n    },\n    outputTokens: {\n      total: completionTokens,\n      text: completionTokens - reasoningTokens,\n      reasoning: reasoningTokens\n    },\n    raw: usage\n  };\n}\n\n// src/chat/convert-to-openai-chat-messages.ts\nimport {\n  UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToOpenAIChatMessages({\n  prompt,\n  systemMessageMode = \"system\"\n}) {\n  var _a;\n  const messages = [];\n  const warnings = [];\n  for (const { role, content } of prompt) {\n    switch (role) {\n      case \"system\": {\n        switch (systemMessageMode) {\n          case \"system\": {\n            messages.push({ role: \"system\", content });\n            break;\n          }\n          case \"developer\": {\n            messages.push({ role: \"developer\", content });\n            break;\n          }\n          case \"remove\": {\n            warnings.push({\n              type: \"other\",\n              message: \"system messages are removed for this model\"\n            });\n            break;\n          }\n          default: {\n            const _exhaustiveCheck = systemMessageMode;\n            throw new Error(\n              `Unsupported system message mode: ${_exhaustiveCheck}`\n            );\n          }\n        }\n        break;\n      }\n      case \"user\": {\n        if (content.length === 1 && content[0].type === \"text\") {\n          messages.push({ role: \"user\", content: content[0].text });\n          break;\n        }\n        messages.push({\n          role: \"user\",\n          content: content.map((part, index) => {\n            var _a2, _b, _c;\n            switch (part.type) {\n              case \"text\": {\n                return { type: \"text\", text: part.text };\n              }\n              case \"file\": {\n                if (part.mediaType.startsWith(\"image/\")) {\n                  const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n                  return {\n                    type: \"image_url\",\n                    image_url: {\n                      url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`,\n                      // OpenAI specific extension: image detail\n                      detail: (_b = (_a2 = part.providerOptions) == null ? void 0 : _a2.openai) == null ? void 0 : _b.imageDetail\n                    }\n                  };\n                } else if (part.mediaType.startsWith(\"audio/\")) {\n                  if (part.data instanceof URL) {\n                    throw new UnsupportedFunctionalityError({\n                      functionality: \"audio file parts with URLs\"\n                    });\n                  }\n                  switch (part.mediaType) {\n                    case \"audio/wav\": {\n                      return {\n                        type: \"input_audio\",\n                        input_audio: {\n                          data: convertToBase64(part.data),\n                          format: \"wav\"\n                        }\n                      };\n                    }\n                    case \"audio/mp3\":\n                    case \"audio/mpeg\": {\n                      return {\n                        type: \"input_audio\",\n                        input_audio: {\n                          data: convertToBase64(part.data),\n                          format: \"mp3\"\n                        }\n                      };\n                    }\n                    default: {\n                      throw new UnsupportedFunctionalityError({\n                        functionality: `audio content parts with media type ${part.mediaType}`\n                      });\n                    }\n                  }\n                } else if (part.mediaType === \"application/pdf\") {\n                  if (part.data instanceof URL) {\n                    throw new UnsupportedFunctionalityError({\n                      functionality: \"PDF file parts with URLs\"\n                    });\n                  }\n                  return {\n                    type: \"file\",\n                    file: typeof part.data === \"string\" && part.data.startsWith(\"file-\") ? { file_id: part.data } : {\n                      filename: (_c = part.filename) != null ? _c : `part-${index}.pdf`,\n                      file_data: `data:application/pdf;base64,${convertToBase64(part.data)}`\n                    }\n                  };\n                } else {\n                  throw new UnsupportedFunctionalityError({\n                    functionality: `file part media type ${part.mediaType}`\n                  });\n                }\n              }\n            }\n          })\n        });\n        break;\n      }\n      case \"assistant\": {\n        let text = \"\";\n        const toolCalls = [];\n        for (const part of content) {\n          switch (part.type) {\n            case \"text\": {\n              text += part.text;\n              break;\n            }\n            case \"tool-call\": {\n              toolCalls.push({\n                id: part.toolCallId,\n                type: \"function\",\n                function: {\n                  name: part.toolName,\n                  arguments: JSON.stringify(part.input)\n                }\n              });\n              break;\n            }\n          }\n        }\n        messages.push({\n          role: \"assistant\",\n          content: text,\n          tool_calls: toolCalls.length > 0 ? toolCalls : void 0\n        });\n        break;\n      }\n      case \"tool\": {\n        for (const toolResponse of content) {\n          if (toolResponse.type === \"tool-approval-response\") {\n            continue;\n          }\n          const output = toolResponse.output;\n          let contentValue;\n          switch (output.type) {\n            case \"text\":\n            case \"error-text\":\n              contentValue = output.value;\n              break;\n            case \"execution-denied\":\n              contentValue = (_a = output.reason) != null ? _a : \"Tool execution denied.\";\n              break;\n            case \"content\":\n            case \"json\":\n            case \"error-json\":\n              contentValue = JSON.stringify(output.value);\n              break;\n          }\n          messages.push({\n            role: \"tool\",\n            tool_call_id: toolResponse.toolCallId,\n            content: contentValue\n          });\n        }\n        break;\n      }\n      default: {\n        const _exhaustiveCheck = role;\n        throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n      }\n    }\n  }\n  return { messages, warnings };\n}\n\n// src/chat/get-response-metadata.ts\nfunction getResponseMetadata({\n  id,\n  model,\n  created\n}) {\n  return {\n    id: id != null ? id : void 0,\n    modelId: model != null ? model : void 0,\n    timestamp: created ? new Date(created * 1e3) : void 0\n  };\n}\n\n// src/chat/map-openai-finish-reason.ts\nfunction mapOpenAIFinishReason(finishReason) {\n  switch (finishReason) {\n    case \"stop\":\n      return \"stop\";\n    case \"length\":\n      return \"length\";\n    case \"content_filter\":\n      return \"content-filter\";\n    case \"function_call\":\n    case \"tool_calls\":\n      return \"tool-calls\";\n    default:\n      return \"other\";\n  }\n}\n\n// src/chat/openai-chat-api.ts\nimport { lazySchema, zodSchema } from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod/v4\";\nvar openaiChatResponseSchema = lazySchema(\n  () => zodSchema(\n    z2.object({\n      id: z2.string().nullish(),\n      created: z2.number().nullish(),\n      model: z2.string().nullish(),\n      choices: z2.array(\n        z2.object({\n          message: z2.object({\n            role: z2.literal(\"assistant\").nullish(),\n            content: z2.string().nullish(),\n            tool_calls: z2.array(\n              z2.object({\n                id: z2.string().nullish(),\n                type: z2.literal(\"function\"),\n                function: z2.object({\n                  name: z2.string(),\n                  arguments: z2.string()\n                })\n              })\n            ).nullish(),\n            annotations: z2.array(\n              z2.object({\n                type: z2.literal(\"url_citation\"),\n                url_citation: z2.object({\n                  start_index: z2.number(),\n                  end_index: z2.number(),\n                  url: z2.string(),\n                  title: z2.string()\n                })\n              })\n            ).nullish()\n          }),\n          index: z2.number(),\n          logprobs: z2.object({\n            content: z2.array(\n              z2.object({\n                token: z2.string(),\n                logprob: z2.number(),\n                top_logprobs: z2.array(\n                  z2.object({\n                    token: z2.string(),\n                    logprob: z2.number()\n                  })\n                )\n              })\n            ).nullish()\n          }).nullish(),\n          finish_reason: z2.string().nullish()\n        })\n      ),\n      usage: z2.object({\n        prompt_tokens: z2.number().nullish(),\n        completion_tokens: z2.number().nullish(),\n        total_tokens: z2.number().nullish(),\n        prompt_tokens_details: z2.object({\n          cached_tokens: z2.number().nullish()\n        }).nullish(),\n        completion_tokens_details: z2.object({\n          reasoning_tokens: z2.number().nullish(),\n          accepted_prediction_tokens: z2.number().nullish(),\n          rejected_prediction_tokens: z2.number().nullish()\n        }).nullish()\n      }).nullish()\n    })\n  )\n);\nvar openaiChatChunkSchema = lazySchema(\n  () => zodSchema(\n    z2.union([\n      z2.object({\n        id: z2.string().nullish(),\n        created: z2.number().nullish(),\n        model: z2.string().nullish(),\n        choices: z2.array(\n          z2.object({\n            delta: z2.object({\n              role: z2.enum([\"assistant\"]).nullish(),\n              content: z2.string().nullish(),\n              tool_calls: z2.array(\n                z2.object({\n                  index: z2.number(),\n                  id: z2.string().nullish(),\n                  type: z2.literal(\"function\").nullish(),\n                  function: z2.object({\n                    name: z2.string().nullish(),\n                    arguments: z2.string().nullish()\n                  })\n                })\n              ).nullish(),\n              annotations: z2.array(\n                z2.object({\n                  type: z2.literal(\"url_citation\"),\n                  url_citation: z2.object({\n                    start_index: z2.number(),\n                    end_index: z2.number(),\n                    url: z2.string(),\n                    title: z2.string()\n                  })\n                })\n              ).nullish()\n            }).nullish(),\n            logprobs: z2.object({\n              content: z2.array(\n                z2.object({\n                  token: z2.string(),\n                  logprob: z2.number(),\n                  top_logprobs: z2.array(\n                    z2.object({\n                      token: z2.string(),\n                      logprob: z2.number()\n                    })\n                  )\n                })\n              ).nullish()\n            }).nullish(),\n            finish_reason: z2.string().nullish(),\n            index: z2.number()\n          })\n        ),\n        usage: z2.object({\n          prompt_tokens: z2.number().nullish(),\n          completion_tokens: z2.number().nullish(),\n          total_tokens: z2.number().nullish(),\n          prompt_tokens_details: z2.object({\n            cached_tokens: z2.number().nullish()\n          }).nullish(),\n          completion_tokens_details: z2.object({\n            reasoning_tokens: z2.number().nullish(),\n            accepted_prediction_tokens: z2.number().nullish(),\n            rejected_prediction_tokens: z2.number().nullish()\n          }).nullish()\n        }).nullish()\n      }),\n      openaiErrorDataSchema\n    ])\n  )\n);\n\n// src/chat/openai-chat-options.ts\nimport { lazySchema as lazySchema2, zodSchema as zodSchema2 } from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod/v4\";\nvar openaiChatLanguageModelOptions = lazySchema2(\n  () => zodSchema2(\n    z3.object({\n      /**\n       * Modify the likelihood of specified tokens appearing in the completion.\n       *\n       * Accepts a JSON object that maps tokens (specified by their token ID in\n       * the GPT tokenizer) to an associated bias value from -100 to 100.\n       */\n      logitBias: z3.record(z3.coerce.number(), z3.number()).optional(),\n      /**\n       * Return the log probabilities of the tokens.\n       *\n       * Setting to true will return the log probabilities of the tokens that\n       * were generated.\n       *\n       * Setting to a number will return the log probabilities of the top n\n       * tokens that were generated.\n       */\n      logprobs: z3.union([z3.boolean(), z3.number()]).optional(),\n      /**\n       * Whether to enable parallel function calling during tool use. Default to true.\n       */\n      parallelToolCalls: z3.boolean().optional(),\n      /**\n       * A unique identifier representing your end-user, which can help OpenAI to\n       * monitor and detect abuse.\n       */\n      user: z3.string().optional(),\n      /**\n       * Reasoning effort for reasoning models. Defaults to `medium`.\n       */\n      reasoningEffort: z3.enum([\"none\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\"]).optional(),\n      /**\n       * Maximum number of completion tokens to generate. Useful for reasoning models.\n       */\n      maxCompletionTokens: z3.number().optional(),\n      /**\n       * Whether to enable persistence in responses API.\n       */\n      store: z3.boolean().optional(),\n      /**\n       * Metadata to associate with the request.\n       */\n      metadata: z3.record(z3.string().max(64), z3.string().max(512)).optional(),\n      /**\n       * Parameters for prediction mode.\n       */\n      prediction: z3.record(z3.string(), z3.any()).optional(),\n      /**\n       * Service tier for the request.\n       * - 'auto': Default service tier. The request will be processed with the service tier configured in the\n       *           Project settings. Unless otherwise configured, the Project will use 'default'.\n       * - 'flex': 50% cheaper processing at the cost of increased latency. Only available for o3 and o4-mini models.\n       * - 'priority': Higher-speed processing with predictably low latency at premium cost. Available for Enterprise customers.\n       * - 'default': The request will be processed with the standard pricing and performance for the selected model.\n       *\n       * @default 'auto'\n       */\n      serviceTier: z3.enum([\"auto\", \"flex\", \"priority\", \"default\"]).optional(),\n      /**\n       * Whether to use strict JSON schema validation.\n       *\n       * @default true\n       */\n      strictJsonSchema: z3.boolean().optional(),\n      /**\n       * Controls the verbosity of the model's responses.\n       * Lower values will result in more concise responses, while higher values will result in more verbose responses.\n       */\n      textVerbosity: z3.enum([\"low\", \"medium\", \"high\"]).optional(),\n      /**\n       * A cache key for prompt caching. Allows manual control over prompt caching behavior.\n       * Useful for improving cache hit rates and working around automatic caching issues.\n       */\n      promptCacheKey: z3.string().optional(),\n      /**\n       * The retention policy for the prompt cache.\n       * - 'in_memory': Default. Standard prompt caching behavior.\n       * - '24h': Extended prompt caching that keeps cached prefixes active for up to 24 hours.\n       *          Currently only available for 5.1 series models.\n       *\n       * @default 'in_memory'\n       */\n      promptCacheRetention: z3.enum([\"in_memory\", \"24h\"]).optional(),\n      /**\n       * A stable identifier used to help detect users of your application\n       * that may be violating OpenAI's usage policies. The IDs should be a\n       * string that uniquely identifies each user. We recommend hashing their\n       * username or email address, in order to avoid sending us any identifying\n       * information.\n       */\n      safetyIdentifier: z3.string().optional(),\n      /**\n       * Override the system message mode for this model.\n       * - 'system': Use the 'system' role for system messages (default for most models)\n       * - 'developer': Use the 'developer' role for system messages (used by reasoning models)\n       * - 'remove': Remove system messages entirely\n       *\n       * If not specified, the mode is automatically determined based on the model.\n       */\n      systemMessageMode: z3.enum([\"system\", \"developer\", \"remove\"]).optional(),\n      /**\n       * Force treating this model as a reasoning model.\n       *\n       * This is useful for \"stealth\" reasoning models (e.g. via a custom baseURL)\n       * where the model ID is not recognized by the SDK's allowlist.\n       *\n       * When enabled, the SDK applies reasoning-model parameter compatibility rules\n       * and defaults `systemMessageMode` to `developer` unless overridden.\n       */\n      forceReasoning: z3.boolean().optional()\n    })\n  )\n);\n\n// src/chat/openai-chat-prepare-tools.ts\nimport {\n  UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction prepareChatTools({\n  tools,\n  toolChoice\n}) {\n  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n  const toolWarnings = [];\n  if (tools == null) {\n    return { tools: void 0, toolChoice: void 0, toolWarnings };\n  }\n  const openaiTools2 = [];\n  for (const tool of tools) {\n    switch (tool.type) {\n      case \"function\":\n        openaiTools2.push({\n          type: \"function\",\n          function: {\n            name: tool.name,\n            description: tool.description,\n            parameters: tool.inputSchema,\n            ...tool.strict != null ? { strict: tool.strict } : {}\n          }\n        });\n        break;\n      default:\n        toolWarnings.push({\n          type: \"unsupported\",\n          feature: `tool type: ${tool.type}`\n        });\n        break;\n    }\n  }\n  if (toolChoice == null) {\n    return { tools: openaiTools2, toolChoice: void 0, toolWarnings };\n  }\n  const type = toolChoice.type;\n  switch (type) {\n    case \"auto\":\n    case \"none\":\n    case \"required\":\n      return { tools: openaiTools2, toolChoice: type, toolWarnings };\n    case \"tool\":\n      return {\n        tools: openaiTools2,\n        toolChoice: {\n          type: \"function\",\n          function: {\n            name: toolChoice.toolName\n          }\n        },\n        toolWarnings\n      };\n    default: {\n      const _exhaustiveCheck = type;\n      throw new UnsupportedFunctionalityError2({\n        functionality: `tool choice type: ${_exhaustiveCheck}`\n      });\n    }\n  }\n}\n\n// src/chat/openai-chat-language-model.ts\nvar OpenAIChatLanguageModel = class {\n  constructor(modelId, config) {\n    this.specificationVersion = \"v3\";\n    this.supportedUrls = {\n      \"image/*\": [/^https?:\\/\\/.*$/]\n    };\n    this.modelId = modelId;\n    this.config = config;\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async getArgs({\n    prompt,\n    maxOutputTokens,\n    temperature,\n    topP,\n    topK,\n    frequencyPenalty,\n    presencePenalty,\n    stopSequences,\n    responseFormat,\n    seed,\n    tools,\n    toolChoice,\n    providerOptions\n  }) {\n    var _a, _b, _c, _d, _e;\n    const warnings = [];\n    const openaiOptions = (_a = await parseProviderOptions({\n      provider: \"openai\",\n      providerOptions,\n      schema: openaiChatLanguageModelOptions\n    })) != null ? _a : {};\n    const modelCapabilities = getOpenAILanguageModelCapabilities(this.modelId);\n    const isReasoningModel = (_b = openaiOptions.forceReasoning) != null ? _b : modelCapabilities.isReasoningModel;\n    if (topK != null) {\n      warnings.push({ type: \"unsupported\", feature: \"topK\" });\n    }\n    const { messages, warnings: messageWarnings } = convertToOpenAIChatMessages(\n      {\n        prompt,\n        systemMessageMode: (_c = openaiOptions.systemMessageMode) != null ? _c : isReasoningModel ? \"developer\" : modelCapabilities.systemMessageMode\n      }\n    );\n    warnings.push(...messageWarnings);\n    const strictJsonSchema = (_d = openaiOptions.strictJsonSchema) != null ? _d : true;\n    const baseArgs = {\n      // model id:\n      model: this.modelId,\n      // model specific settings:\n      logit_bias: openaiOptions.logitBias,\n      logprobs: openaiOptions.logprobs === true || typeof openaiOptions.logprobs === \"number\" ? true : void 0,\n      top_logprobs: typeof openaiOptions.logprobs === \"number\" ? openaiOptions.logprobs : typeof openaiOptions.logprobs === \"boolean\" ? openaiOptions.logprobs ? 0 : void 0 : void 0,\n      user: openaiOptions.user,\n      parallel_tool_calls: openaiOptions.parallelToolCalls,\n      // standardized settings:\n      max_tokens: maxOutputTokens,\n      temperature,\n      top_p: topP,\n      frequency_penalty: frequencyPenalty,\n      presence_penalty: presencePenalty,\n      response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? responseFormat.schema != null ? {\n        type: \"json_schema\",\n        json_schema: {\n          schema: responseFormat.schema,\n          strict: strictJsonSchema,\n          name: (_e = responseFormat.name) != null ? _e : \"response\",\n          description: responseFormat.description\n        }\n      } : { type: \"json_object\" } : void 0,\n      stop: stopSequences,\n      seed,\n      verbosity: openaiOptions.textVerbosity,\n      // openai specific settings:\n      // TODO AI SDK 6: remove, we auto-map maxOutputTokens now\n      max_completion_tokens: openaiOptions.maxCompletionTokens,\n      store: openaiOptions.store,\n      metadata: openaiOptions.metadata,\n      prediction: openaiOptions.prediction,\n      reasoning_effort: openaiOptions.reasoningEffort,\n      service_tier: openaiOptions.serviceTier,\n      prompt_cache_key: openaiOptions.promptCacheKey,\n      prompt_cache_retention: openaiOptions.promptCacheRetention,\n      safety_identifier: openaiOptions.safetyIdentifier,\n      // messages:\n      messages\n    };\n    if (isReasoningModel) {\n      if (openaiOptions.reasoningEffort !== \"none\" || !modelCapabilities.supportsNonReasoningParameters) {\n        if (baseArgs.temperature != null) {\n          baseArgs.temperature = void 0;\n          warnings.push({\n            type: \"unsupported\",\n            feature: \"temperature\",\n            details: \"temperature is not supported for reasoning models\"\n          });\n        }\n        if (baseArgs.top_p != null) {\n          baseArgs.top_p = void 0;\n          warnings.push({\n            type: \"unsupported\",\n            feature: \"topP\",\n            details: \"topP is not supported for reasoning models\"\n          });\n        }\n        if (baseArgs.logprobs != null) {\n          baseArgs.logprobs = void 0;\n          warnings.push({\n            type: \"other\",\n            message: \"logprobs is not supported for reasoning models\"\n          });\n        }\n      }\n      if (baseArgs.frequency_penalty != null) {\n        baseArgs.frequency_penalty = void 0;\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"frequencyPenalty\",\n          details: \"frequencyPenalty is not supported for reasoning models\"\n        });\n      }\n      if (baseArgs.presence_penalty != null) {\n        baseArgs.presence_penalty = void 0;\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"presencePenalty\",\n          details: \"presencePenalty is not supported for reasoning models\"\n        });\n      }\n      if (baseArgs.logit_bias != null) {\n        baseArgs.logit_bias = void 0;\n        warnings.push({\n          type: \"other\",\n          message: \"logitBias is not supported for reasoning models\"\n        });\n      }\n      if (baseArgs.top_logprobs != null) {\n        baseArgs.top_logprobs = void 0;\n        warnings.push({\n          type: \"other\",\n          message: \"topLogprobs is not supported for reasoning models\"\n        });\n      }\n      if (baseArgs.max_tokens != null) {\n        if (baseArgs.max_completion_tokens == null) {\n          baseArgs.max_completion_tokens = baseArgs.max_tokens;\n        }\n        baseArgs.max_tokens = void 0;\n      }\n    } else if (this.modelId.startsWith(\"gpt-4o-search-preview\") || this.modelId.startsWith(\"gpt-4o-mini-search-preview\")) {\n      if (baseArgs.temperature != null) {\n        baseArgs.temperature = void 0;\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"temperature\",\n          details: \"temperature is not supported for the search preview models and has been removed.\"\n        });\n      }\n    }\n    if (openaiOptions.serviceTier === \"flex\" && !modelCapabilities.supportsFlexProcessing) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"serviceTier\",\n        details: \"flex processing is only available for o3, o4-mini, and gpt-5 models\"\n      });\n      baseArgs.service_tier = void 0;\n    }\n    if (openaiOptions.serviceTier === \"priority\" && !modelCapabilities.supportsPriorityProcessing) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"serviceTier\",\n        details: \"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported\"\n      });\n      baseArgs.service_tier = void 0;\n    }\n    const {\n      tools: openaiTools2,\n      toolChoice: openaiToolChoice,\n      toolWarnings\n    } = prepareChatTools({\n      tools,\n      toolChoice\n    });\n    return {\n      args: {\n        ...baseArgs,\n        tools: openaiTools2,\n        tool_choice: openaiToolChoice\n      },\n      warnings: [...warnings, ...toolWarnings]\n    };\n  }\n  async doGenerate(options) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    const { args: body, warnings } = await this.getArgs(options);\n    const {\n      responseHeaders,\n      value: response,\n      rawValue: rawResponse\n    } = await postJsonToApi({\n      url: this.config.url({\n        path: \"/chat/completions\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders(this.config.headers(), options.headers),\n      body,\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler(\n        openaiChatResponseSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    const choice = response.choices[0];\n    const content = [];\n    const text = choice.message.content;\n    if (text != null && text.length > 0) {\n      content.push({ type: \"text\", text });\n    }\n    for (const toolCall of (_a = choice.message.tool_calls) != null ? _a : []) {\n      content.push({\n        type: \"tool-call\",\n        toolCallId: (_b = toolCall.id) != null ? _b : generateId(),\n        toolName: toolCall.function.name,\n        input: toolCall.function.arguments\n      });\n    }\n    for (const annotation of (_c = choice.message.annotations) != null ? _c : []) {\n      content.push({\n        type: \"source\",\n        sourceType: \"url\",\n        id: generateId(),\n        url: annotation.url_citation.url,\n        title: annotation.url_citation.title\n      });\n    }\n    const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;\n    const promptTokenDetails = (_e = response.usage) == null ? void 0 : _e.prompt_tokens_details;\n    const providerMetadata = { openai: {} };\n    if ((completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens) != null) {\n      providerMetadata.openai.acceptedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens;\n    }\n    if ((completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens) != null) {\n      providerMetadata.openai.rejectedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens;\n    }\n    if (((_f = choice.logprobs) == null ? void 0 : _f.content) != null) {\n      providerMetadata.openai.logprobs = choice.logprobs.content;\n    }\n    return {\n      content,\n      finishReason: {\n        unified: mapOpenAIFinishReason(choice.finish_reason),\n        raw: (_g = choice.finish_reason) != null ? _g : void 0\n      },\n      usage: convertOpenAIChatUsage(response.usage),\n      request: { body },\n      response: {\n        ...getResponseMetadata(response),\n        headers: responseHeaders,\n        body: rawResponse\n      },\n      warnings,\n      providerMetadata\n    };\n  }\n  async doStream(options) {\n    const { args, warnings } = await this.getArgs(options);\n    const body = {\n      ...args,\n      stream: true,\n      stream_options: {\n        include_usage: true\n      }\n    };\n    const { responseHeaders, value: response } = await postJsonToApi({\n      url: this.config.url({\n        path: \"/chat/completions\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders(this.config.headers(), options.headers),\n      body,\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createEventSourceResponseHandler(\n        openaiChatChunkSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    const toolCalls = [];\n    let finishReason = {\n      unified: \"other\",\n      raw: void 0\n    };\n    let usage = void 0;\n    let metadataExtracted = false;\n    let isActiveText = false;\n    const providerMetadata = { openai: {} };\n    return {\n      stream: response.pipeThrough(\n        new TransformStream({\n          start(controller) {\n            controller.enqueue({ type: \"stream-start\", warnings });\n          },\n          transform(chunk, controller) {\n            var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;\n            if (options.includeRawChunks) {\n              controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n            }\n            if (!chunk.success) {\n              finishReason = { unified: \"error\", raw: void 0 };\n              controller.enqueue({ type: \"error\", error: chunk.error });\n              return;\n            }\n            const value = chunk.value;\n            if (\"error\" in value) {\n              finishReason = { unified: \"error\", raw: void 0 };\n              controller.enqueue({ type: \"error\", error: value.error });\n              return;\n            }\n            if (!metadataExtracted) {\n              const metadata = getResponseMetadata(value);\n              if (Object.values(metadata).some(Boolean)) {\n                metadataExtracted = true;\n                controller.enqueue({\n                  type: \"response-metadata\",\n                  ...getResponseMetadata(value)\n                });\n              }\n            }\n            if (value.usage != null) {\n              usage = value.usage;\n              if (((_a = value.usage.completion_tokens_details) == null ? void 0 : _a.accepted_prediction_tokens) != null) {\n                providerMetadata.openai.acceptedPredictionTokens = (_b = value.usage.completion_tokens_details) == null ? void 0 : _b.accepted_prediction_tokens;\n              }\n              if (((_c = value.usage.completion_tokens_details) == null ? void 0 : _c.rejected_prediction_tokens) != null) {\n                providerMetadata.openai.rejectedPredictionTokens = (_d = value.usage.completion_tokens_details) == null ? void 0 : _d.rejected_prediction_tokens;\n              }\n            }\n            const choice = value.choices[0];\n            if ((choice == null ? void 0 : choice.finish_reason) != null) {\n              finishReason = {\n                unified: mapOpenAIFinishReason(choice.finish_reason),\n                raw: choice.finish_reason\n              };\n            }\n            if (((_e = choice == null ? void 0 : choice.logprobs) == null ? void 0 : _e.content) != null) {\n              providerMetadata.openai.logprobs = choice.logprobs.content;\n            }\n            if ((choice == null ? void 0 : choice.delta) == null) {\n              return;\n            }\n            const delta = choice.delta;\n            if (delta.content != null) {\n              if (!isActiveText) {\n                controller.enqueue({ type: \"text-start\", id: \"0\" });\n                isActiveText = true;\n              }\n              controller.enqueue({\n                type: \"text-delta\",\n                id: \"0\",\n                delta: delta.content\n              });\n            }\n            if (delta.tool_calls != null) {\n              for (const toolCallDelta of delta.tool_calls) {\n                const index = toolCallDelta.index;\n                if (toolCalls[index] == null) {\n                  if (toolCallDelta.type !== \"function\") {\n                    throw new InvalidResponseDataError({\n                      data: toolCallDelta,\n                      message: `Expected 'function' type.`\n                    });\n                  }\n                  if (toolCallDelta.id == null) {\n                    throw new InvalidResponseDataError({\n                      data: toolCallDelta,\n                      message: `Expected 'id' to be a string.`\n                    });\n                  }\n                  if (((_f = toolCallDelta.function) == null ? void 0 : _f.name) == null) {\n                    throw new InvalidResponseDataError({\n                      data: toolCallDelta,\n                      message: `Expected 'function.name' to be a string.`\n                    });\n                  }\n                  controller.enqueue({\n                    type: \"tool-input-start\",\n                    id: toolCallDelta.id,\n                    toolName: toolCallDelta.function.name\n                  });\n                  toolCalls[index] = {\n                    id: toolCallDelta.id,\n                    type: \"function\",\n                    function: {\n                      name: toolCallDelta.function.name,\n                      arguments: (_g = toolCallDelta.function.arguments) != null ? _g : \"\"\n                    },\n                    hasFinished: false\n                  };\n                  const toolCall2 = toolCalls[index];\n                  if (((_h = toolCall2.function) == null ? void 0 : _h.name) != null && ((_i = toolCall2.function) == null ? void 0 : _i.arguments) != null) {\n                    if (toolCall2.function.arguments.length > 0) {\n                      controller.enqueue({\n                        type: \"tool-input-delta\",\n                        id: toolCall2.id,\n                        delta: toolCall2.function.arguments\n                      });\n                    }\n                    if (isParsableJson(toolCall2.function.arguments)) {\n                      controller.enqueue({\n                        type: \"tool-input-end\",\n                        id: toolCall2.id\n                      });\n                      controller.enqueue({\n                        type: \"tool-call\",\n                        toolCallId: (_j = toolCall2.id) != null ? _j : generateId(),\n                        toolName: toolCall2.function.name,\n                        input: toolCall2.function.arguments\n                      });\n                      toolCall2.hasFinished = true;\n                    }\n                  }\n                  continue;\n                }\n                const toolCall = toolCalls[index];\n                if (toolCall.hasFinished) {\n                  continue;\n                }\n                if (((_k = toolCallDelta.function) == null ? void 0 : _k.arguments) != null) {\n                  toolCall.function.arguments += (_m = (_l = toolCallDelta.function) == null ? void 0 : _l.arguments) != null ? _m : \"\";\n                }\n                controller.enqueue({\n                  type: \"tool-input-delta\",\n                  id: toolCall.id,\n                  delta: (_n = toolCallDelta.function.arguments) != null ? _n : \"\"\n                });\n                if (((_o = toolCall.function) == null ? void 0 : _o.name) != null && ((_p = toolCall.function) == null ? void 0 : _p.arguments) != null && isParsableJson(toolCall.function.arguments)) {\n                  controller.enqueue({\n                    type: \"tool-input-end\",\n                    id: toolCall.id\n                  });\n                  controller.enqueue({\n                    type: \"tool-call\",\n                    toolCallId: (_q = toolCall.id) != null ? _q : generateId(),\n                    toolName: toolCall.function.name,\n                    input: toolCall.function.arguments\n                  });\n                  toolCall.hasFinished = true;\n                }\n              }\n            }\n            if (delta.annotations != null) {\n              for (const annotation of delta.annotations) {\n                controller.enqueue({\n                  type: \"source\",\n                  sourceType: \"url\",\n                  id: generateId(),\n                  url: annotation.url_citation.url,\n                  title: annotation.url_citation.title\n                });\n              }\n            }\n          },\n          flush(controller) {\n            if (isActiveText) {\n              controller.enqueue({ type: \"text-end\", id: \"0\" });\n            }\n            controller.enqueue({\n              type: \"finish\",\n              finishReason,\n              usage: convertOpenAIChatUsage(usage),\n              ...providerMetadata != null ? { providerMetadata } : {}\n            });\n          }\n        })\n      ),\n      request: { body },\n      response: { headers: responseHeaders }\n    };\n  }\n};\n\n// src/completion/openai-completion-language-model.ts\nimport {\n  combineHeaders as combineHeaders2,\n  createEventSourceResponseHandler as createEventSourceResponseHandler2,\n  createJsonResponseHandler as createJsonResponseHandler2,\n  parseProviderOptions as parseProviderOptions2,\n  postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\n\n// src/completion/convert-openai-completion-usage.ts\nfunction convertOpenAICompletionUsage(usage) {\n  var _a, _b, _c, _d;\n  if (usage == null) {\n    return {\n      inputTokens: {\n        total: void 0,\n        noCache: void 0,\n        cacheRead: void 0,\n        cacheWrite: void 0\n      },\n      outputTokens: {\n        total: void 0,\n        text: void 0,\n        reasoning: void 0\n      },\n      raw: void 0\n    };\n  }\n  const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;\n  const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;\n  return {\n    inputTokens: {\n      total: (_c = usage.prompt_tokens) != null ? _c : void 0,\n      noCache: promptTokens,\n      cacheRead: void 0,\n      cacheWrite: void 0\n    },\n    outputTokens: {\n      total: (_d = usage.completion_tokens) != null ? _d : void 0,\n      text: completionTokens,\n      reasoning: void 0\n    },\n    raw: usage\n  };\n}\n\n// src/completion/convert-to-openai-completion-prompt.ts\nimport {\n  InvalidPromptError,\n  UnsupportedFunctionalityError as UnsupportedFunctionalityError3\n} from \"@ai-sdk/provider\";\nfunction convertToOpenAICompletionPrompt({\n  prompt,\n  user = \"user\",\n  assistant = \"assistant\"\n}) {\n  let text = \"\";\n  if (prompt[0].role === \"system\") {\n    text += `${prompt[0].content}\n\n`;\n    prompt = prompt.slice(1);\n  }\n  for (const { role, content } of prompt) {\n    switch (role) {\n      case \"system\": {\n        throw new InvalidPromptError({\n          message: \"Unexpected system message in prompt: ${content}\",\n          prompt\n        });\n      }\n      case \"user\": {\n        const userMessage = content.map((part) => {\n          switch (part.type) {\n            case \"text\": {\n              return part.text;\n            }\n          }\n        }).filter(Boolean).join(\"\");\n        text += `${user}:\n${userMessage}\n\n`;\n        break;\n      }\n      case \"assistant\": {\n        const assistantMessage = content.map((part) => {\n          switch (part.type) {\n            case \"text\": {\n              return part.text;\n            }\n            case \"tool-call\": {\n              throw new UnsupportedFunctionalityError3({\n                functionality: \"tool-call messages\"\n              });\n            }\n          }\n        }).join(\"\");\n        text += `${assistant}:\n${assistantMessage}\n\n`;\n        break;\n      }\n      case \"tool\": {\n        throw new UnsupportedFunctionalityError3({\n          functionality: \"tool messages\"\n        });\n      }\n      default: {\n        const _exhaustiveCheck = role;\n        throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n      }\n    }\n  }\n  text += `${assistant}:\n`;\n  return {\n    prompt: text,\n    stopSequences: [`\n${user}:`]\n  };\n}\n\n// src/completion/get-response-metadata.ts\nfunction getResponseMetadata2({\n  id,\n  model,\n  created\n}) {\n  return {\n    id: id != null ? id : void 0,\n    modelId: model != null ? model : void 0,\n    timestamp: created != null ? new Date(created * 1e3) : void 0\n  };\n}\n\n// src/completion/map-openai-finish-reason.ts\nfunction mapOpenAIFinishReason2(finishReason) {\n  switch (finishReason) {\n    case \"stop\":\n      return \"stop\";\n    case \"length\":\n      return \"length\";\n    case \"content_filter\":\n      return \"content-filter\";\n    case \"function_call\":\n    case \"tool_calls\":\n      return \"tool-calls\";\n    default:\n      return \"other\";\n  }\n}\n\n// src/completion/openai-completion-api.ts\nimport { z as z4 } from \"zod/v4\";\nimport { lazySchema as lazySchema3, zodSchema as zodSchema3 } from \"@ai-sdk/provider-utils\";\nvar openaiCompletionResponseSchema = lazySchema3(\n  () => zodSchema3(\n    z4.object({\n      id: z4.string().nullish(),\n      created: z4.number().nullish(),\n      model: z4.string().nullish(),\n      choices: z4.array(\n        z4.object({\n          text: z4.string(),\n          finish_reason: z4.string(),\n          logprobs: z4.object({\n            tokens: z4.array(z4.string()),\n            token_logprobs: z4.array(z4.number()),\n            top_logprobs: z4.array(z4.record(z4.string(), z4.number())).nullish()\n          }).nullish()\n        })\n      ),\n      usage: z4.object({\n        prompt_tokens: z4.number(),\n        completion_tokens: z4.number(),\n        total_tokens: z4.number()\n      }).nullish()\n    })\n  )\n);\nvar openaiCompletionChunkSchema = lazySchema3(\n  () => zodSchema3(\n    z4.union([\n      z4.object({\n        id: z4.string().nullish(),\n        created: z4.number().nullish(),\n        model: z4.string().nullish(),\n        choices: z4.array(\n          z4.object({\n            text: z4.string(),\n            finish_reason: z4.string().nullish(),\n            index: z4.number(),\n            logprobs: z4.object({\n              tokens: z4.array(z4.string()),\n              token_logprobs: z4.array(z4.number()),\n              top_logprobs: z4.array(z4.record(z4.string(), z4.number())).nullish()\n            }).nullish()\n          })\n        ),\n        usage: z4.object({\n          prompt_tokens: z4.number(),\n          completion_tokens: z4.number(),\n          total_tokens: z4.number()\n        }).nullish()\n      }),\n      openaiErrorDataSchema\n    ])\n  )\n);\n\n// src/completion/openai-completion-options.ts\nimport { lazySchema as lazySchema4, zodSchema as zodSchema4 } from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod/v4\";\nvar openaiCompletionProviderOptions = lazySchema4(\n  () => zodSchema4(\n    z5.object({\n      /**\n       * Echo back the prompt in addition to the completion.\n       */\n      echo: z5.boolean().optional(),\n      /**\n       * Modify the likelihood of specified tokens appearing in the completion.\n       *\n       * Accepts a JSON object that maps tokens (specified by their token ID in\n       * the GPT tokenizer) to an associated bias value from -100 to 100. You\n       * can use this tokenizer tool to convert text to token IDs. Mathematically,\n       * the bias is added to the logits generated by the model prior to sampling.\n       * The exact effect will vary per model, but values between -1 and 1 should\n       * decrease or increase likelihood of selection; values like -100 or 100\n       * should result in a ban or exclusive selection of the relevant token.\n       *\n       * As an example, you can pass {\"50256\": -100} to prevent the <|endoftext|>\n       * token from being generated.\n       */\n      logitBias: z5.record(z5.string(), z5.number()).optional(),\n      /**\n       * The suffix that comes after a completion of inserted text.\n       */\n      suffix: z5.string().optional(),\n      /**\n       * A unique identifier representing your end-user, which can help OpenAI to\n       * monitor and detect abuse. Learn more.\n       */\n      user: z5.string().optional(),\n      /**\n       * Return the log probabilities of the tokens. Including logprobs will increase\n       * the response size and can slow down response times. However, it can\n       * be useful to better understand how the model is behaving.\n       * Setting to true will return the log probabilities of the tokens that\n       * were generated.\n       * Setting to a number will return the log probabilities of the top n\n       * tokens that were generated.\n       */\n      logprobs: z5.union([z5.boolean(), z5.number()]).optional()\n    })\n  )\n);\n\n// src/completion/openai-completion-language-model.ts\nvar OpenAICompletionLanguageModel = class {\n  constructor(modelId, config) {\n    this.specificationVersion = \"v3\";\n    this.supportedUrls = {\n      // No URLs are supported for completion models.\n    };\n    this.modelId = modelId;\n    this.config = config;\n  }\n  get providerOptionsName() {\n    return this.config.provider.split(\".\")[0].trim();\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async getArgs({\n    prompt,\n    maxOutputTokens,\n    temperature,\n    topP,\n    topK,\n    frequencyPenalty,\n    presencePenalty,\n    stopSequences: userStopSequences,\n    responseFormat,\n    tools,\n    toolChoice,\n    seed,\n    providerOptions\n  }) {\n    const warnings = [];\n    const openaiOptions = {\n      ...await parseProviderOptions2({\n        provider: \"openai\",\n        providerOptions,\n        schema: openaiCompletionProviderOptions\n      }),\n      ...await parseProviderOptions2({\n        provider: this.providerOptionsName,\n        providerOptions,\n        schema: openaiCompletionProviderOptions\n      })\n    };\n    if (topK != null) {\n      warnings.push({ type: \"unsupported\", feature: \"topK\" });\n    }\n    if (tools == null ? void 0 : tools.length) {\n      warnings.push({ type: \"unsupported\", feature: \"tools\" });\n    }\n    if (toolChoice != null) {\n      warnings.push({ type: \"unsupported\", feature: \"toolChoice\" });\n    }\n    if (responseFormat != null && responseFormat.type !== \"text\") {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"responseFormat\",\n        details: \"JSON response format is not supported.\"\n      });\n    }\n    const { prompt: completionPrompt, stopSequences } = convertToOpenAICompletionPrompt({ prompt });\n    const stop = [...stopSequences != null ? stopSequences : [], ...userStopSequences != null ? userStopSequences : []];\n    return {\n      args: {\n        // model id:\n        model: this.modelId,\n        // model specific settings:\n        echo: openaiOptions.echo,\n        logit_bias: openaiOptions.logitBias,\n        logprobs: (openaiOptions == null ? void 0 : openaiOptions.logprobs) === true ? 0 : (openaiOptions == null ? void 0 : openaiOptions.logprobs) === false ? void 0 : openaiOptions == null ? void 0 : openaiOptions.logprobs,\n        suffix: openaiOptions.suffix,\n        user: openaiOptions.user,\n        // standardized settings:\n        max_tokens: maxOutputTokens,\n        temperature,\n        top_p: topP,\n        frequency_penalty: frequencyPenalty,\n        presence_penalty: presencePenalty,\n        seed,\n        // prompt:\n        prompt: completionPrompt,\n        // stop sequences:\n        stop: stop.length > 0 ? stop : void 0\n      },\n      warnings\n    };\n  }\n  async doGenerate(options) {\n    var _a;\n    const { args, warnings } = await this.getArgs(options);\n    const {\n      responseHeaders,\n      value: response,\n      rawValue: rawResponse\n    } = await postJsonToApi2({\n      url: this.config.url({\n        path: \"/completions\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders2(this.config.headers(), options.headers),\n      body: args,\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler2(\n        openaiCompletionResponseSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    const choice = response.choices[0];\n    const providerMetadata = { openai: {} };\n    if (choice.logprobs != null) {\n      providerMetadata.openai.logprobs = choice.logprobs;\n    }\n    return {\n      content: [{ type: \"text\", text: choice.text }],\n      usage: convertOpenAICompletionUsage(response.usage),\n      finishReason: {\n        unified: mapOpenAIFinishReason2(choice.finish_reason),\n        raw: (_a = choice.finish_reason) != null ? _a : void 0\n      },\n      request: { body: args },\n      response: {\n        ...getResponseMetadata2(response),\n        headers: responseHeaders,\n        body: rawResponse\n      },\n      providerMetadata,\n      warnings\n    };\n  }\n  async doStream(options) {\n    const { args, warnings } = await this.getArgs(options);\n    const body = {\n      ...args,\n      stream: true,\n      stream_options: {\n        include_usage: true\n      }\n    };\n    const { responseHeaders, value: response } = await postJsonToApi2({\n      url: this.config.url({\n        path: \"/completions\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders2(this.config.headers(), options.headers),\n      body,\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createEventSourceResponseHandler2(\n        openaiCompletionChunkSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    let finishReason = {\n      unified: \"other\",\n      raw: void 0\n    };\n    const providerMetadata = { openai: {} };\n    let usage = void 0;\n    let isFirstChunk = true;\n    return {\n      stream: response.pipeThrough(\n        new TransformStream({\n          start(controller) {\n            controller.enqueue({ type: \"stream-start\", warnings });\n          },\n          transform(chunk, controller) {\n            if (options.includeRawChunks) {\n              controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n            }\n            if (!chunk.success) {\n              finishReason = { unified: \"error\", raw: void 0 };\n              controller.enqueue({ type: \"error\", error: chunk.error });\n              return;\n            }\n            const value = chunk.value;\n            if (\"error\" in value) {\n              finishReason = { unified: \"error\", raw: void 0 };\n              controller.enqueue({ type: \"error\", error: value.error });\n              return;\n            }\n            if (isFirstChunk) {\n              isFirstChunk = false;\n              controller.enqueue({\n                type: \"response-metadata\",\n                ...getResponseMetadata2(value)\n              });\n              controller.enqueue({ type: \"text-start\", id: \"0\" });\n            }\n            if (value.usage != null) {\n              usage = value.usage;\n            }\n            const choice = value.choices[0];\n            if ((choice == null ? void 0 : choice.finish_reason) != null) {\n              finishReason = {\n                unified: mapOpenAIFinishReason2(choice.finish_reason),\n                raw: choice.finish_reason\n              };\n            }\n            if ((choice == null ? void 0 : choice.logprobs) != null) {\n              providerMetadata.openai.logprobs = choice.logprobs;\n            }\n            if ((choice == null ? void 0 : choice.text) != null && choice.text.length > 0) {\n              controller.enqueue({\n                type: \"text-delta\",\n                id: \"0\",\n                delta: choice.text\n              });\n            }\n          },\n          flush(controller) {\n            if (!isFirstChunk) {\n              controller.enqueue({ type: \"text-end\", id: \"0\" });\n            }\n            controller.enqueue({\n              type: \"finish\",\n              finishReason,\n              providerMetadata,\n              usage: convertOpenAICompletionUsage(usage)\n            });\n          }\n        })\n      ),\n      request: { body },\n      response: { headers: responseHeaders }\n    };\n  }\n};\n\n// src/embedding/openai-embedding-model.ts\nimport {\n  TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n  combineHeaders as combineHeaders3,\n  createJsonResponseHandler as createJsonResponseHandler3,\n  parseProviderOptions as parseProviderOptions3,\n  postJsonToApi as postJsonToApi3\n} from \"@ai-sdk/provider-utils\";\n\n// src/embedding/openai-embedding-options.ts\nimport { lazySchema as lazySchema5, zodSchema as zodSchema5 } from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod/v4\";\nvar openaiEmbeddingProviderOptions = lazySchema5(\n  () => zodSchema5(\n    z6.object({\n      /**\n       * The number of dimensions the resulting output embeddings should have.\n       * Only supported in text-embedding-3 and later models.\n       */\n      dimensions: z6.number().optional(),\n      /**\n       * A unique identifier representing your end-user, which can help OpenAI to\n       * monitor and detect abuse. Learn more.\n       */\n      user: z6.string().optional()\n    })\n  )\n);\n\n// src/embedding/openai-embedding-api.ts\nimport { lazySchema as lazySchema6, zodSchema as zodSchema6 } from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod/v4\";\nvar openaiTextEmbeddingResponseSchema = lazySchema6(\n  () => zodSchema6(\n    z7.object({\n      data: z7.array(z7.object({ embedding: z7.array(z7.number()) })),\n      usage: z7.object({ prompt_tokens: z7.number() }).nullish()\n    })\n  )\n);\n\n// src/embedding/openai-embedding-model.ts\nvar OpenAIEmbeddingModel = class {\n  constructor(modelId, config) {\n    this.specificationVersion = \"v3\";\n    this.maxEmbeddingsPerCall = 2048;\n    this.supportsParallelCalls = true;\n    this.modelId = modelId;\n    this.config = config;\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async doEmbed({\n    values,\n    headers,\n    abortSignal,\n    providerOptions\n  }) {\n    var _a;\n    if (values.length > this.maxEmbeddingsPerCall) {\n      throw new TooManyEmbeddingValuesForCallError({\n        provider: this.provider,\n        modelId: this.modelId,\n        maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n        values\n      });\n    }\n    const openaiOptions = (_a = await parseProviderOptions3({\n      provider: \"openai\",\n      providerOptions,\n      schema: openaiEmbeddingProviderOptions\n    })) != null ? _a : {};\n    const {\n      responseHeaders,\n      value: response,\n      rawValue\n    } = await postJsonToApi3({\n      url: this.config.url({\n        path: \"/embeddings\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders3(this.config.headers(), headers),\n      body: {\n        model: this.modelId,\n        input: values,\n        encoding_format: \"float\",\n        dimensions: openaiOptions.dimensions,\n        user: openaiOptions.user\n      },\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler3(\n        openaiTextEmbeddingResponseSchema\n      ),\n      abortSignal,\n      fetch: this.config.fetch\n    });\n    return {\n      warnings: [],\n      embeddings: response.data.map((item) => item.embedding),\n      usage: response.usage ? { tokens: response.usage.prompt_tokens } : void 0,\n      response: { headers: responseHeaders, body: rawValue }\n    };\n  }\n};\n\n// src/image/openai-image-model.ts\nimport {\n  combineHeaders as combineHeaders4,\n  convertBase64ToUint8Array,\n  convertToFormData,\n  createJsonResponseHandler as createJsonResponseHandler4,\n  downloadBlob,\n  postFormDataToApi,\n  postJsonToApi as postJsonToApi4\n} from \"@ai-sdk/provider-utils\";\n\n// src/image/openai-image-api.ts\nimport { lazySchema as lazySchema7, zodSchema as zodSchema7 } from \"@ai-sdk/provider-utils\";\nimport { z as z8 } from \"zod/v4\";\nvar openaiImageResponseSchema = lazySchema7(\n  () => zodSchema7(\n    z8.object({\n      created: z8.number().nullish(),\n      data: z8.array(\n        z8.object({\n          b64_json: z8.string(),\n          revised_prompt: z8.string().nullish()\n        })\n      ),\n      background: z8.string().nullish(),\n      output_format: z8.string().nullish(),\n      size: z8.string().nullish(),\n      quality: z8.string().nullish(),\n      usage: z8.object({\n        input_tokens: z8.number().nullish(),\n        output_tokens: z8.number().nullish(),\n        total_tokens: z8.number().nullish(),\n        input_tokens_details: z8.object({\n          image_tokens: z8.number().nullish(),\n          text_tokens: z8.number().nullish()\n        }).nullish()\n      }).nullish()\n    })\n  )\n);\n\n// src/image/openai-image-options.ts\nvar modelMaxImagesPerCall = {\n  \"dall-e-3\": 1,\n  \"dall-e-2\": 10,\n  \"gpt-image-1\": 10,\n  \"gpt-image-1-mini\": 10,\n  \"gpt-image-1.5\": 10\n};\nvar defaultResponseFormatPrefixes = [\n  \"gpt-image-1-mini\",\n  \"gpt-image-1.5\",\n  \"gpt-image-1\"\n];\nfunction hasDefaultResponseFormat(modelId) {\n  return defaultResponseFormatPrefixes.some(\n    (prefix) => modelId.startsWith(prefix)\n  );\n}\n\n// src/image/openai-image-model.ts\nvar OpenAIImageModel = class {\n  constructor(modelId, config) {\n    this.modelId = modelId;\n    this.config = config;\n    this.specificationVersion = \"v3\";\n  }\n  get maxImagesPerCall() {\n    var _a;\n    return (_a = modelMaxImagesPerCall[this.modelId]) != null ? _a : 1;\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async doGenerate({\n    prompt,\n    files,\n    mask,\n    n,\n    size,\n    aspectRatio,\n    seed,\n    providerOptions,\n    headers,\n    abortSignal\n  }) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;\n    const warnings = [];\n    if (aspectRatio != null) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"aspectRatio\",\n        details: \"This model does not support aspect ratio. Use `size` instead.\"\n      });\n    }\n    if (seed != null) {\n      warnings.push({ type: \"unsupported\", feature: \"seed\" });\n    }\n    const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n    if (files != null) {\n      const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({\n        url: this.config.url({\n          path: \"/images/edits\",\n          modelId: this.modelId\n        }),\n        headers: combineHeaders4(this.config.headers(), headers),\n        formData: convertToFormData({\n          model: this.modelId,\n          prompt,\n          image: await Promise.all(\n            files.map(\n              (file) => file.type === \"file\" ? new Blob(\n                [\n                  file.data instanceof Uint8Array ? new Blob([file.data], {\n                    type: file.mediaType\n                  }) : new Blob([convertBase64ToUint8Array(file.data)], {\n                    type: file.mediaType\n                  })\n                ],\n                { type: file.mediaType }\n              ) : downloadBlob(file.url)\n            )\n          ),\n          mask: mask != null ? await fileToBlob(mask) : void 0,\n          n,\n          size,\n          ...(_d = providerOptions.openai) != null ? _d : {}\n        }),\n        failedResponseHandler: openaiFailedResponseHandler,\n        successfulResponseHandler: createJsonResponseHandler4(\n          openaiImageResponseSchema\n        ),\n        abortSignal,\n        fetch: this.config.fetch\n      });\n      return {\n        images: response2.data.map((item) => item.b64_json),\n        warnings,\n        usage: response2.usage != null ? {\n          inputTokens: (_e = response2.usage.input_tokens) != null ? _e : void 0,\n          outputTokens: (_f = response2.usage.output_tokens) != null ? _f : void 0,\n          totalTokens: (_g = response2.usage.total_tokens) != null ? _g : void 0\n        } : void 0,\n        response: {\n          timestamp: currentDate,\n          modelId: this.modelId,\n          headers: responseHeaders2\n        },\n        providerMetadata: {\n          openai: {\n            images: response2.data.map((item) => {\n              var _a2, _b2, _c2, _d2, _e2;\n              return {\n                ...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},\n                created: (_a2 = response2.created) != null ? _a2 : void 0,\n                size: (_b2 = response2.size) != null ? _b2 : void 0,\n                quality: (_c2 = response2.quality) != null ? _c2 : void 0,\n                background: (_d2 = response2.background) != null ? _d2 : void 0,\n                outputFormat: (_e2 = response2.output_format) != null ? _e2 : void 0\n              };\n            })\n          }\n        }\n      };\n    }\n    const { value: response, responseHeaders } = await postJsonToApi4({\n      url: this.config.url({\n        path: \"/images/generations\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders4(this.config.headers(), headers),\n      body: {\n        model: this.modelId,\n        prompt,\n        n,\n        size,\n        ...(_h = providerOptions.openai) != null ? _h : {},\n        ...!hasDefaultResponseFormat(this.modelId) ? { response_format: \"b64_json\" } : {}\n      },\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler4(\n        openaiImageResponseSchema\n      ),\n      abortSignal,\n      fetch: this.config.fetch\n    });\n    return {\n      images: response.data.map((item) => item.b64_json),\n      warnings,\n      usage: response.usage != null ? {\n        inputTokens: (_i = response.usage.input_tokens) != null ? _i : void 0,\n        outputTokens: (_j = response.usage.output_tokens) != null ? _j : void 0,\n        totalTokens: (_k = response.usage.total_tokens) != null ? _k : void 0\n      } : void 0,\n      response: {\n        timestamp: currentDate,\n        modelId: this.modelId,\n        headers: responseHeaders\n      },\n      providerMetadata: {\n        openai: {\n          images: response.data.map((item) => {\n            var _a2, _b2, _c2, _d2, _e2;\n            return {\n              ...item.revised_prompt ? { revisedPrompt: item.revised_prompt } : {},\n              created: (_a2 = response.created) != null ? _a2 : void 0,\n              size: (_b2 = response.size) != null ? _b2 : void 0,\n              quality: (_c2 = response.quality) != null ? _c2 : void 0,\n              background: (_d2 = response.background) != null ? _d2 : void 0,\n              outputFormat: (_e2 = response.output_format) != null ? _e2 : void 0\n            };\n          })\n        }\n      }\n    };\n  }\n};\nasync function fileToBlob(file) {\n  if (!file) return void 0;\n  if (file.type === \"url\") {\n    return downloadBlob(file.url);\n  }\n  const data = file.data instanceof Uint8Array ? file.data : convertBase64ToUint8Array(file.data);\n  return new Blob([data], { type: file.mediaType });\n}\n\n// src/tool/apply-patch.ts\nimport {\n  createProviderToolFactoryWithOutputSchema,\n  lazySchema as lazySchema8,\n  zodSchema as zodSchema8\n} from \"@ai-sdk/provider-utils\";\nimport { z as z9 } from \"zod/v4\";\nvar applyPatchInputSchema = lazySchema8(\n  () => zodSchema8(\n    z9.object({\n      callId: z9.string(),\n      operation: z9.discriminatedUnion(\"type\", [\n        z9.object({\n          type: z9.literal(\"create_file\"),\n          path: z9.string(),\n          diff: z9.string()\n        }),\n        z9.object({\n          type: z9.literal(\"delete_file\"),\n          path: z9.string()\n        }),\n        z9.object({\n          type: z9.literal(\"update_file\"),\n          path: z9.string(),\n          diff: z9.string()\n        })\n      ])\n    })\n  )\n);\nvar applyPatchOutputSchema = lazySchema8(\n  () => zodSchema8(\n    z9.object({\n      status: z9.enum([\"completed\", \"failed\"]),\n      output: z9.string().optional()\n    })\n  )\n);\nvar applyPatchArgsSchema = lazySchema8(() => zodSchema8(z9.object({})));\nvar applyPatchToolFactory = createProviderToolFactoryWithOutputSchema({\n  id: \"openai.apply_patch\",\n  inputSchema: applyPatchInputSchema,\n  outputSchema: applyPatchOutputSchema\n});\nvar applyPatch = applyPatchToolFactory;\n\n// src/tool/code-interpreter.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,\n  lazySchema as lazySchema9,\n  zodSchema as zodSchema9\n} from \"@ai-sdk/provider-utils\";\nimport { z as z10 } from \"zod/v4\";\nvar codeInterpreterInputSchema = lazySchema9(\n  () => zodSchema9(\n    z10.object({\n      code: z10.string().nullish(),\n      containerId: z10.string()\n    })\n  )\n);\nvar codeInterpreterOutputSchema = lazySchema9(\n  () => zodSchema9(\n    z10.object({\n      outputs: z10.array(\n        z10.discriminatedUnion(\"type\", [\n          z10.object({ type: z10.literal(\"logs\"), logs: z10.string() }),\n          z10.object({ type: z10.literal(\"image\"), url: z10.string() })\n        ])\n      ).nullish()\n    })\n  )\n);\nvar codeInterpreterArgsSchema = lazySchema9(\n  () => zodSchema9(\n    z10.object({\n      container: z10.union([\n        z10.string(),\n        z10.object({\n          fileIds: z10.array(z10.string()).optional()\n        })\n      ]).optional()\n    })\n  )\n);\nvar codeInterpreterToolFactory = createProviderToolFactoryWithOutputSchema2({\n  id: \"openai.code_interpreter\",\n  inputSchema: codeInterpreterInputSchema,\n  outputSchema: codeInterpreterOutputSchema\n});\nvar codeInterpreter = (args = {}) => {\n  return codeInterpreterToolFactory(args);\n};\n\n// src/tool/file-search.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema3,\n  lazySchema as lazySchema10,\n  zodSchema as zodSchema10\n} from \"@ai-sdk/provider-utils\";\nimport { z as z11 } from \"zod/v4\";\nvar comparisonFilterSchema = z11.object({\n  key: z11.string(),\n  type: z11.enum([\"eq\", \"ne\", \"gt\", \"gte\", \"lt\", \"lte\", \"in\", \"nin\"]),\n  value: z11.union([z11.string(), z11.number(), z11.boolean(), z11.array(z11.string())])\n});\nvar compoundFilterSchema = z11.object({\n  type: z11.enum([\"and\", \"or\"]),\n  filters: z11.array(\n    z11.union([comparisonFilterSchema, z11.lazy(() => compoundFilterSchema)])\n  )\n});\nvar fileSearchArgsSchema = lazySchema10(\n  () => zodSchema10(\n    z11.object({\n      vectorStoreIds: z11.array(z11.string()),\n      maxNumResults: z11.number().optional(),\n      ranking: z11.object({\n        ranker: z11.string().optional(),\n        scoreThreshold: z11.number().optional()\n      }).optional(),\n      filters: z11.union([comparisonFilterSchema, compoundFilterSchema]).optional()\n    })\n  )\n);\nvar fileSearchOutputSchema = lazySchema10(\n  () => zodSchema10(\n    z11.object({\n      queries: z11.array(z11.string()),\n      results: z11.array(\n        z11.object({\n          attributes: z11.record(z11.string(), z11.unknown()),\n          fileId: z11.string(),\n          filename: z11.string(),\n          score: z11.number(),\n          text: z11.string()\n        })\n      ).nullable()\n    })\n  )\n);\nvar fileSearch = createProviderToolFactoryWithOutputSchema3({\n  id: \"openai.file_search\",\n  inputSchema: z11.object({}),\n  outputSchema: fileSearchOutputSchema\n});\n\n// src/tool/image-generation.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema4,\n  lazySchema as lazySchema11,\n  zodSchema as zodSchema11\n} from \"@ai-sdk/provider-utils\";\nimport { z as z12 } from \"zod/v4\";\nvar imageGenerationArgsSchema = lazySchema11(\n  () => zodSchema11(\n    z12.object({\n      background: z12.enum([\"auto\", \"opaque\", \"transparent\"]).optional(),\n      inputFidelity: z12.enum([\"low\", \"high\"]).optional(),\n      inputImageMask: z12.object({\n        fileId: z12.string().optional(),\n        imageUrl: z12.string().optional()\n      }).optional(),\n      model: z12.string().optional(),\n      moderation: z12.enum([\"auto\"]).optional(),\n      outputCompression: z12.number().int().min(0).max(100).optional(),\n      outputFormat: z12.enum([\"png\", \"jpeg\", \"webp\"]).optional(),\n      partialImages: z12.number().int().min(0).max(3).optional(),\n      quality: z12.enum([\"auto\", \"low\", \"medium\", \"high\"]).optional(),\n      size: z12.enum([\"1024x1024\", \"1024x1536\", \"1536x1024\", \"auto\"]).optional()\n    }).strict()\n  )\n);\nvar imageGenerationInputSchema = lazySchema11(() => zodSchema11(z12.object({})));\nvar imageGenerationOutputSchema = lazySchema11(\n  () => zodSchema11(z12.object({ result: z12.string() }))\n);\nvar imageGenerationToolFactory = createProviderToolFactoryWithOutputSchema4({\n  id: \"openai.image_generation\",\n  inputSchema: imageGenerationInputSchema,\n  outputSchema: imageGenerationOutputSchema\n});\nvar imageGeneration = (args = {}) => {\n  return imageGenerationToolFactory(args);\n};\n\n// src/tool/local-shell.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema5,\n  lazySchema as lazySchema12,\n  zodSchema as zodSchema12\n} from \"@ai-sdk/provider-utils\";\nimport { z as z13 } from \"zod/v4\";\nvar localShellInputSchema = lazySchema12(\n  () => zodSchema12(\n    z13.object({\n      action: z13.object({\n        type: z13.literal(\"exec\"),\n        command: z13.array(z13.string()),\n        timeoutMs: z13.number().optional(),\n        user: z13.string().optional(),\n        workingDirectory: z13.string().optional(),\n        env: z13.record(z13.string(), z13.string()).optional()\n      })\n    })\n  )\n);\nvar localShellOutputSchema = lazySchema12(\n  () => zodSchema12(z13.object({ output: z13.string() }))\n);\nvar localShell = createProviderToolFactoryWithOutputSchema5({\n  id: \"openai.local_shell\",\n  inputSchema: localShellInputSchema,\n  outputSchema: localShellOutputSchema\n});\n\n// src/tool/shell.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,\n  lazySchema as lazySchema13,\n  zodSchema as zodSchema13\n} from \"@ai-sdk/provider-utils\";\nimport { z as z14 } from \"zod/v4\";\nvar shellInputSchema = lazySchema13(\n  () => zodSchema13(\n    z14.object({\n      action: z14.object({\n        commands: z14.array(z14.string()),\n        timeoutMs: z14.number().optional(),\n        maxOutputLength: z14.number().optional()\n      })\n    })\n  )\n);\nvar shellOutputSchema = lazySchema13(\n  () => zodSchema13(\n    z14.object({\n      output: z14.array(\n        z14.object({\n          stdout: z14.string(),\n          stderr: z14.string(),\n          outcome: z14.discriminatedUnion(\"type\", [\n            z14.object({ type: z14.literal(\"timeout\") }),\n            z14.object({ type: z14.literal(\"exit\"), exitCode: z14.number() })\n          ])\n        })\n      )\n    })\n  )\n);\nvar shell = createProviderToolFactoryWithOutputSchema6({\n  id: \"openai.shell\",\n  inputSchema: shellInputSchema,\n  outputSchema: shellOutputSchema\n});\n\n// src/tool/web-search.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema7,\n  lazySchema as lazySchema14,\n  zodSchema as zodSchema14\n} from \"@ai-sdk/provider-utils\";\nimport { z as z15 } from \"zod/v4\";\nvar webSearchArgsSchema = lazySchema14(\n  () => zodSchema14(\n    z15.object({\n      externalWebAccess: z15.boolean().optional(),\n      filters: z15.object({ allowedDomains: z15.array(z15.string()).optional() }).optional(),\n      searchContextSize: z15.enum([\"low\", \"medium\", \"high\"]).optional(),\n      userLocation: z15.object({\n        type: z15.literal(\"approximate\"),\n        country: z15.string().optional(),\n        city: z15.string().optional(),\n        region: z15.string().optional(),\n        timezone: z15.string().optional()\n      }).optional()\n    })\n  )\n);\nvar webSearchInputSchema = lazySchema14(() => zodSchema14(z15.object({})));\nvar webSearchOutputSchema = lazySchema14(\n  () => zodSchema14(\n    z15.object({\n      action: z15.discriminatedUnion(\"type\", [\n        z15.object({\n          type: z15.literal(\"search\"),\n          query: z15.string().optional()\n        }),\n        z15.object({\n          type: z15.literal(\"openPage\"),\n          url: z15.string().nullish()\n        }),\n        z15.object({\n          type: z15.literal(\"findInPage\"),\n          url: z15.string().nullish(),\n          pattern: z15.string().nullish()\n        })\n      ]),\n      sources: z15.array(\n        z15.discriminatedUnion(\"type\", [\n          z15.object({ type: z15.literal(\"url\"), url: z15.string() }),\n          z15.object({ type: z15.literal(\"api\"), name: z15.string() })\n        ])\n      ).optional()\n    })\n  )\n);\nvar webSearchToolFactory = createProviderToolFactoryWithOutputSchema7({\n  id: \"openai.web_search\",\n  inputSchema: webSearchInputSchema,\n  outputSchema: webSearchOutputSchema\n});\nvar webSearch = (args = {}) => webSearchToolFactory(args);\n\n// src/tool/web-search-preview.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema8,\n  lazySchema as lazySchema15,\n  zodSchema as zodSchema15\n} from \"@ai-sdk/provider-utils\";\nimport { z as z16 } from \"zod/v4\";\nvar webSearchPreviewArgsSchema = lazySchema15(\n  () => zodSchema15(\n    z16.object({\n      searchContextSize: z16.enum([\"low\", \"medium\", \"high\"]).optional(),\n      userLocation: z16.object({\n        type: z16.literal(\"approximate\"),\n        country: z16.string().optional(),\n        city: z16.string().optional(),\n        region: z16.string().optional(),\n        timezone: z16.string().optional()\n      }).optional()\n    })\n  )\n);\nvar webSearchPreviewInputSchema = lazySchema15(\n  () => zodSchema15(z16.object({}))\n);\nvar webSearchPreviewOutputSchema = lazySchema15(\n  () => zodSchema15(\n    z16.object({\n      action: z16.discriminatedUnion(\"type\", [\n        z16.object({\n          type: z16.literal(\"search\"),\n          query: z16.string().optional()\n        }),\n        z16.object({\n          type: z16.literal(\"openPage\"),\n          url: z16.string().nullish()\n        }),\n        z16.object({\n          type: z16.literal(\"findInPage\"),\n          url: z16.string().nullish(),\n          pattern: z16.string().nullish()\n        })\n      ])\n    })\n  )\n);\nvar webSearchPreview = createProviderToolFactoryWithOutputSchema8({\n  id: \"openai.web_search_preview\",\n  inputSchema: webSearchPreviewInputSchema,\n  outputSchema: webSearchPreviewOutputSchema\n});\n\n// src/tool/mcp.ts\nimport {\n  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema9,\n  lazySchema as lazySchema16,\n  zodSchema as zodSchema16\n} from \"@ai-sdk/provider-utils\";\nimport { z as z17 } from \"zod/v4\";\nvar jsonValueSchema = z17.lazy(\n  () => z17.union([\n    z17.string(),\n    z17.number(),\n    z17.boolean(),\n    z17.null(),\n    z17.array(jsonValueSchema),\n    z17.record(z17.string(), jsonValueSchema)\n  ])\n);\nvar mcpArgsSchema = lazySchema16(\n  () => zodSchema16(\n    z17.object({\n      serverLabel: z17.string(),\n      allowedTools: z17.union([\n        z17.array(z17.string()),\n        z17.object({\n          readOnly: z17.boolean().optional(),\n          toolNames: z17.array(z17.string()).optional()\n        })\n      ]).optional(),\n      authorization: z17.string().optional(),\n      connectorId: z17.string().optional(),\n      headers: z17.record(z17.string(), z17.string()).optional(),\n      requireApproval: z17.union([\n        z17.enum([\"always\", \"never\"]),\n        z17.object({\n          never: z17.object({\n            toolNames: z17.array(z17.string()).optional()\n          }).optional()\n        })\n      ]).optional(),\n      serverDescription: z17.string().optional(),\n      serverUrl: z17.string().optional()\n    }).refine(\n      (v) => v.serverUrl != null || v.connectorId != null,\n      \"One of serverUrl or connectorId must be provided.\"\n    )\n  )\n);\nvar mcpInputSchema = lazySchema16(() => zodSchema16(z17.object({})));\nvar mcpOutputSchema = lazySchema16(\n  () => zodSchema16(\n    z17.object({\n      type: z17.literal(\"call\"),\n      serverLabel: z17.string(),\n      name: z17.string(),\n      arguments: z17.string(),\n      output: z17.string().nullish(),\n      error: z17.union([z17.string(), jsonValueSchema]).optional()\n    })\n  )\n);\nvar mcpToolFactory = createProviderToolFactoryWithOutputSchema9({\n  id: \"openai.mcp\",\n  inputSchema: mcpInputSchema,\n  outputSchema: mcpOutputSchema\n});\nvar mcp = (args) => mcpToolFactory(args);\n\n// src/openai-tools.ts\nvar openaiTools = {\n  /**\n   * The apply_patch tool lets GPT-5.1 create, update, and delete files in your\n   * codebase using structured diffs. Instead of just suggesting edits, the model\n   * emits patch operations that your application applies and then reports back on,\n   * enabling iterative, multi-step code editing workflows.\n   *\n   */\n  applyPatch,\n  /**\n   * The Code Interpreter tool allows models to write and run Python code in a\n   * sandboxed environment to solve complex problems in domains like data analysis,\n   * coding, and math.\n   *\n   * @param container - The container to use for the code interpreter.\n   */\n  codeInterpreter,\n  /**\n   * File search is a tool available in the Responses API. It enables models to\n   * retrieve information in a knowledge base of previously uploaded files through\n   * semantic and keyword search.\n   *\n   * @param vectorStoreIds - The vector store IDs to use for the file search.\n   * @param maxNumResults - The maximum number of results to return.\n   * @param ranking - The ranking options to use for the file search.\n   * @param filters - The filters to use for the file search.\n   */\n  fileSearch,\n  /**\n   * The image generation tool allows you to generate images using a text prompt,\n   * and optionally image inputs. It leverages the GPT Image model,\n   * and automatically optimizes text inputs for improved performance.\n   *\n   * @param background - Background type for the generated image. One of 'auto', 'opaque', or 'transparent'.\n   * @param inputFidelity - Input fidelity for the generated image. One of 'low' or 'high'.\n   * @param inputImageMask - Optional mask for inpainting. Contains fileId and/or imageUrl.\n   * @param model - The image generation model to use. Default: gpt-image-1.\n   * @param moderation - Moderation level for the generated image. Default: 'auto'.\n   * @param outputCompression - Compression level for the output image (0-100).\n   * @param outputFormat - The output format of the generated image. One of 'png', 'jpeg', or 'webp'.\n   * @param partialImages - Number of partial images to generate in streaming mode (0-3).\n   * @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', or 'high'.\n   * @param size - The size of the generated image. One of 'auto', '1024x1024', '1024x1536', or '1536x1024'.\n   */\n  imageGeneration,\n  /**\n   * Local shell is a tool that allows agents to run shell commands locally\n   * on a machine you or the user provides.\n   *\n   * Supported models: `gpt-5-codex` and `codex-mini-latest`\n   */\n  localShell,\n  /**\n   * The shell tool allows the model to interact with your local computer through\n   * a controlled command-line interface. The model proposes shell commands; your\n   * integration executes them and returns the outputs.\n   *\n   * Available through the Responses API for use with GPT-5.1.\n   *\n   * WARNING: Running arbitrary shell commands can be dangerous. Always sandbox\n   * execution or add strict allow-/deny-lists before forwarding a command to\n   * the system shell.\n   */\n  shell,\n  /**\n   * Web search allows models to access up-to-date information from the internet\n   * and provide answers with sourced citations.\n   *\n   * @param searchContextSize - The search context size to use for the web search.\n   * @param userLocation - The user location to use for the web search.\n   */\n  webSearchPreview,\n  /**\n   * Web search allows models to access up-to-date information from the internet\n   * and provide answers with sourced citations.\n   *\n   * @param filters - The filters to use for the web search.\n   * @param searchContextSize - The search context size to use for the web search.\n   * @param userLocation - The user location to use for the web search.\n   */\n  webSearch,\n  /**\n   * MCP (Model Context Protocol) allows models to call tools exposed by\n   * remote MCP servers or service connectors.\n   *\n   * @param serverLabel - Label to identify the MCP server.\n   * @param allowedTools - Allowed tool names or filter object.\n   * @param authorization - OAuth access token for the MCP server/connector.\n   * @param connectorId - Identifier for a service connector.\n   * @param headers - Optional headers to include in MCP requests.\n   * // param requireApproval - Approval policy ('always'|'never'|filter object). (Removed - always 'never')\n   * @param serverDescription - Optional description of the server.\n   * @param serverUrl - URL for the MCP server.\n   */\n  mcp\n};\n\n// src/responses/openai-responses-language-model.ts\nimport {\n  APICallError\n} from \"@ai-sdk/provider\";\nimport {\n  combineHeaders as combineHeaders5,\n  createEventSourceResponseHandler as createEventSourceResponseHandler3,\n  createJsonResponseHandler as createJsonResponseHandler5,\n  createToolNameMapping,\n  generateId as generateId2,\n  parseProviderOptions as parseProviderOptions5,\n  postJsonToApi as postJsonToApi5\n} from \"@ai-sdk/provider-utils\";\n\n// src/responses/convert-openai-responses-usage.ts\nfunction convertOpenAIResponsesUsage(usage) {\n  var _a, _b, _c, _d;\n  if (usage == null) {\n    return {\n      inputTokens: {\n        total: void 0,\n        noCache: void 0,\n        cacheRead: void 0,\n        cacheWrite: void 0\n      },\n      outputTokens: {\n        total: void 0,\n        text: void 0,\n        reasoning: void 0\n      },\n      raw: void 0\n    };\n  }\n  const inputTokens = usage.input_tokens;\n  const outputTokens = usage.output_tokens;\n  const cachedTokens = (_b = (_a = usage.input_tokens_details) == null ? void 0 : _a.cached_tokens) != null ? _b : 0;\n  const reasoningTokens = (_d = (_c = usage.output_tokens_details) == null ? void 0 : _c.reasoning_tokens) != null ? _d : 0;\n  return {\n    inputTokens: {\n      total: inputTokens,\n      noCache: inputTokens - cachedTokens,\n      cacheRead: cachedTokens,\n      cacheWrite: void 0\n    },\n    outputTokens: {\n      total: outputTokens,\n      text: outputTokens - reasoningTokens,\n      reasoning: reasoningTokens\n    },\n    raw: usage\n  };\n}\n\n// src/responses/convert-to-openai-responses-input.ts\nimport {\n  UnsupportedFunctionalityError as UnsupportedFunctionalityError4\n} from \"@ai-sdk/provider\";\nimport {\n  convertToBase64 as convertToBase642,\n  isNonNullable,\n  parseProviderOptions as parseProviderOptions4,\n  validateTypes\n} from \"@ai-sdk/provider-utils\";\nimport { z as z18 } from \"zod/v4\";\nfunction isFileId(data, prefixes) {\n  if (!prefixes) return false;\n  return prefixes.some((prefix) => data.startsWith(prefix));\n}\nasync function convertToOpenAIResponsesInput({\n  prompt,\n  toolNameMapping,\n  systemMessageMode,\n  providerOptionsName,\n  fileIdPrefixes,\n  store,\n  hasConversation = false,\n  hasLocalShellTool = false,\n  hasShellTool = false,\n  hasApplyPatchTool = false\n}) {\n  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;\n  const input = [];\n  const warnings = [];\n  const processedApprovalIds = /* @__PURE__ */ new Set();\n  for (const { role, content } of prompt) {\n    switch (role) {\n      case \"system\": {\n        switch (systemMessageMode) {\n          case \"system\": {\n            input.push({ role: \"system\", content });\n            break;\n          }\n          case \"developer\": {\n            input.push({ role: \"developer\", content });\n            break;\n          }\n          case \"remove\": {\n            warnings.push({\n              type: \"other\",\n              message: \"system messages are removed for this model\"\n            });\n            break;\n          }\n          default: {\n            const _exhaustiveCheck = systemMessageMode;\n            throw new Error(\n              `Unsupported system message mode: ${_exhaustiveCheck}`\n            );\n          }\n        }\n        break;\n      }\n      case \"user\": {\n        input.push({\n          role: \"user\",\n          content: content.map((part, index) => {\n            var _a2, _b2, _c2;\n            switch (part.type) {\n              case \"text\": {\n                return { type: \"input_text\", text: part.text };\n              }\n              case \"file\": {\n                if (part.mediaType.startsWith(\"image/\")) {\n                  const mediaType = part.mediaType === \"image/*\" ? \"image/jpeg\" : part.mediaType;\n                  return {\n                    type: \"input_image\",\n                    ...part.data instanceof URL ? { image_url: part.data.toString() } : typeof part.data === \"string\" && isFileId(part.data, fileIdPrefixes) ? { file_id: part.data } : {\n                      image_url: `data:${mediaType};base64,${convertToBase642(part.data)}`\n                    },\n                    detail: (_b2 = (_a2 = part.providerOptions) == null ? void 0 : _a2[providerOptionsName]) == null ? void 0 : _b2.imageDetail\n                  };\n                } else if (part.mediaType === \"application/pdf\") {\n                  if (part.data instanceof URL) {\n                    return {\n                      type: \"input_file\",\n                      file_url: part.data.toString()\n                    };\n                  }\n                  return {\n                    type: \"input_file\",\n                    ...typeof part.data === \"string\" && isFileId(part.data, fileIdPrefixes) ? { file_id: part.data } : {\n                      filename: (_c2 = part.filename) != null ? _c2 : `part-${index}.pdf`,\n                      file_data: `data:application/pdf;base64,${convertToBase642(part.data)}`\n                    }\n                  };\n                } else {\n                  throw new UnsupportedFunctionalityError4({\n                    functionality: `file part media type ${part.mediaType}`\n                  });\n                }\n              }\n            }\n          })\n        });\n        break;\n      }\n      case \"assistant\": {\n        const reasoningMessages = {};\n        for (const part of content) {\n          switch (part.type) {\n            case \"text\": {\n              const id = (_b = (_a = part.providerOptions) == null ? void 0 : _a[providerOptionsName]) == null ? void 0 : _b.itemId;\n              if (hasConversation && id != null) {\n                break;\n              }\n              if (store && id != null) {\n                input.push({ type: \"item_reference\", id });\n                break;\n              }\n              input.push({\n                role: \"assistant\",\n                content: [{ type: \"output_text\", text: part.text }],\n                id\n              });\n              break;\n            }\n            case \"tool-call\": {\n              const id = (_g = (_d = (_c = part.providerOptions) == null ? void 0 : _c[providerOptionsName]) == null ? void 0 : _d.itemId) != null ? _g : (_f = (_e = part.providerMetadata) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.itemId;\n              if (hasConversation && id != null) {\n                break;\n              }\n              if (part.providerExecuted) {\n                if (store && id != null) {\n                  input.push({ type: \"item_reference\", id });\n                }\n                break;\n              }\n              if (store && id != null) {\n                input.push({ type: \"item_reference\", id });\n                break;\n              }\n              const resolvedToolName = toolNameMapping.toProviderToolName(\n                part.toolName\n              );\n              if (hasLocalShellTool && resolvedToolName === \"local_shell\") {\n                const parsedInput = await validateTypes({\n                  value: part.input,\n                  schema: localShellInputSchema\n                });\n                input.push({\n                  type: \"local_shell_call\",\n                  call_id: part.toolCallId,\n                  id,\n                  action: {\n                    type: \"exec\",\n                    command: parsedInput.action.command,\n                    timeout_ms: parsedInput.action.timeoutMs,\n                    user: parsedInput.action.user,\n                    working_directory: parsedInput.action.workingDirectory,\n                    env: parsedInput.action.env\n                  }\n                });\n                break;\n              }\n              if (hasShellTool && resolvedToolName === \"shell\") {\n                const parsedInput = await validateTypes({\n                  value: part.input,\n                  schema: shellInputSchema\n                });\n                input.push({\n                  type: \"shell_call\",\n                  call_id: part.toolCallId,\n                  id,\n                  status: \"completed\",\n                  action: {\n                    commands: parsedInput.action.commands,\n                    timeout_ms: parsedInput.action.timeoutMs,\n                    max_output_length: parsedInput.action.maxOutputLength\n                  }\n                });\n                break;\n              }\n              if (hasApplyPatchTool && resolvedToolName === \"apply_patch\") {\n                const parsedInput = await validateTypes({\n                  value: part.input,\n                  schema: applyPatchInputSchema\n                });\n                input.push({\n                  type: \"apply_patch_call\",\n                  call_id: parsedInput.callId,\n                  id,\n                  status: \"completed\",\n                  operation: parsedInput.operation\n                });\n                break;\n              }\n              input.push({\n                type: \"function_call\",\n                call_id: part.toolCallId,\n                name: resolvedToolName,\n                arguments: JSON.stringify(part.input),\n                id\n              });\n              break;\n            }\n            // assistant tool result parts are from provider-executed tools:\n            case \"tool-result\": {\n              if (part.output.type === \"execution-denied\" || part.output.type === \"json\" && typeof part.output.value === \"object\" && part.output.value != null && \"type\" in part.output.value && part.output.value.type === \"execution-denied\") {\n                break;\n              }\n              if (hasConversation) {\n                break;\n              }\n              if (store) {\n                const itemId = (_j = (_i = (_h = part.providerMetadata) == null ? void 0 : _h[providerOptionsName]) == null ? void 0 : _i.itemId) != null ? _j : part.toolCallId;\n                input.push({ type: \"item_reference\", id: itemId });\n              } else {\n                warnings.push({\n                  type: \"other\",\n                  message: `Results for OpenAI tool ${part.toolName} are not sent to the API when store is false`\n                });\n              }\n              break;\n            }\n            case \"reasoning\": {\n              const providerOptions = await parseProviderOptions4({\n                provider: providerOptionsName,\n                providerOptions: part.providerOptions,\n                schema: openaiResponsesReasoningProviderOptionsSchema\n              });\n              const reasoningId = providerOptions == null ? void 0 : providerOptions.itemId;\n              if (hasConversation && reasoningId != null) {\n                break;\n              }\n              if (reasoningId != null) {\n                const reasoningMessage = reasoningMessages[reasoningId];\n                if (store) {\n                  if (reasoningMessage === void 0) {\n                    input.push({ type: \"item_reference\", id: reasoningId });\n                    reasoningMessages[reasoningId] = {\n                      type: \"reasoning\",\n                      id: reasoningId,\n                      summary: []\n                    };\n                  }\n                } else {\n                  const summaryParts = [];\n                  if (part.text.length > 0) {\n                    summaryParts.push({\n                      type: \"summary_text\",\n                      text: part.text\n                    });\n                  } else if (reasoningMessage !== void 0) {\n                    warnings.push({\n                      type: \"other\",\n                      message: `Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(part)}.`\n                    });\n                  }\n                  if (reasoningMessage === void 0) {\n                    reasoningMessages[reasoningId] = {\n                      type: \"reasoning\",\n                      id: reasoningId,\n                      encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,\n                      summary: summaryParts\n                    };\n                    input.push(reasoningMessages[reasoningId]);\n                  } else {\n                    reasoningMessage.summary.push(...summaryParts);\n                    if ((providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent) != null) {\n                      reasoningMessage.encrypted_content = providerOptions.reasoningEncryptedContent;\n                    }\n                  }\n                }\n              } else {\n                warnings.push({\n                  type: \"other\",\n                  message: `Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(part)}.`\n                });\n              }\n              break;\n            }\n          }\n        }\n        break;\n      }\n      case \"tool\": {\n        for (const part of content) {\n          if (part.type === \"tool-approval-response\") {\n            const approvalResponse = part;\n            if (processedApprovalIds.has(approvalResponse.approvalId)) {\n              continue;\n            }\n            processedApprovalIds.add(approvalResponse.approvalId);\n            if (store) {\n              input.push({\n                type: \"item_reference\",\n                id: approvalResponse.approvalId\n              });\n            }\n            input.push({\n              type: \"mcp_approval_response\",\n              approval_request_id: approvalResponse.approvalId,\n              approve: approvalResponse.approved\n            });\n            continue;\n          }\n          const output = part.output;\n          if (output.type === \"execution-denied\") {\n            const approvalId = (_l = (_k = output.providerOptions) == null ? void 0 : _k.openai) == null ? void 0 : _l.approvalId;\n            if (approvalId) {\n              continue;\n            }\n          }\n          const resolvedToolName = toolNameMapping.toProviderToolName(\n            part.toolName\n          );\n          if (hasLocalShellTool && resolvedToolName === \"local_shell\" && output.type === \"json\") {\n            const parsedOutput = await validateTypes({\n              value: output.value,\n              schema: localShellOutputSchema\n            });\n            input.push({\n              type: \"local_shell_call_output\",\n              call_id: part.toolCallId,\n              output: parsedOutput.output\n            });\n            continue;\n          }\n          if (hasShellTool && resolvedToolName === \"shell\" && output.type === \"json\") {\n            const parsedOutput = await validateTypes({\n              value: output.value,\n              schema: shellOutputSchema\n            });\n            input.push({\n              type: \"shell_call_output\",\n              call_id: part.toolCallId,\n              output: parsedOutput.output.map((item) => ({\n                stdout: item.stdout,\n                stderr: item.stderr,\n                outcome: item.outcome.type === \"timeout\" ? { type: \"timeout\" } : {\n                  type: \"exit\",\n                  exit_code: item.outcome.exitCode\n                }\n              }))\n            });\n            continue;\n          }\n          if (hasApplyPatchTool && part.toolName === \"apply_patch\" && output.type === \"json\") {\n            const parsedOutput = await validateTypes({\n              value: output.value,\n              schema: applyPatchOutputSchema\n            });\n            input.push({\n              type: \"apply_patch_call_output\",\n              call_id: part.toolCallId,\n              status: parsedOutput.status,\n              output: parsedOutput.output\n            });\n            continue;\n          }\n          let contentValue;\n          switch (output.type) {\n            case \"text\":\n            case \"error-text\":\n              contentValue = output.value;\n              break;\n            case \"execution-denied\":\n              contentValue = (_m = output.reason) != null ? _m : \"Tool execution denied.\";\n              break;\n            case \"json\":\n            case \"error-json\":\n              contentValue = JSON.stringify(output.value);\n              break;\n            case \"content\":\n              contentValue = output.value.map((item) => {\n                var _a2;\n                switch (item.type) {\n                  case \"text\": {\n                    return { type: \"input_text\", text: item.text };\n                  }\n                  case \"image-data\": {\n                    return {\n                      type: \"input_image\",\n                      image_url: `data:${item.mediaType};base64,${item.data}`\n                    };\n                  }\n                  case \"image-url\": {\n                    return {\n                      type: \"input_image\",\n                      image_url: item.url\n                    };\n                  }\n                  case \"file-data\": {\n                    return {\n                      type: \"input_file\",\n                      filename: (_a2 = item.filename) != null ? _a2 : \"data\",\n                      file_data: `data:${item.mediaType};base64,${item.data}`\n                    };\n                  }\n                  default: {\n                    warnings.push({\n                      type: \"other\",\n                      message: `unsupported tool content part type: ${item.type}`\n                    });\n                    return void 0;\n                  }\n                }\n              }).filter(isNonNullable);\n              break;\n          }\n          input.push({\n            type: \"function_call_output\",\n            call_id: part.toolCallId,\n            output: contentValue\n          });\n        }\n        break;\n      }\n      default: {\n        const _exhaustiveCheck = role;\n        throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n      }\n    }\n  }\n  return { input, warnings };\n}\nvar openaiResponsesReasoningProviderOptionsSchema = z18.object({\n  itemId: z18.string().nullish(),\n  reasoningEncryptedContent: z18.string().nullish()\n});\n\n// src/responses/map-openai-responses-finish-reason.ts\nfunction mapOpenAIResponseFinishReason({\n  finishReason,\n  hasFunctionCall\n}) {\n  switch (finishReason) {\n    case void 0:\n    case null:\n      return hasFunctionCall ? \"tool-calls\" : \"stop\";\n    case \"max_output_tokens\":\n      return \"length\";\n    case \"content_filter\":\n      return \"content-filter\";\n    default:\n      return hasFunctionCall ? \"tool-calls\" : \"other\";\n  }\n}\n\n// src/responses/openai-responses-api.ts\nimport { lazySchema as lazySchema17, zodSchema as zodSchema17 } from \"@ai-sdk/provider-utils\";\nimport { z as z19 } from \"zod/v4\";\nvar openaiResponsesChunkSchema = lazySchema17(\n  () => zodSchema17(\n    z19.union([\n      z19.object({\n        type: z19.literal(\"response.output_text.delta\"),\n        item_id: z19.string(),\n        delta: z19.string(),\n        logprobs: z19.array(\n          z19.object({\n            token: z19.string(),\n            logprob: z19.number(),\n            top_logprobs: z19.array(\n              z19.object({\n                token: z19.string(),\n                logprob: z19.number()\n              })\n            )\n          })\n        ).nullish()\n      }),\n      z19.object({\n        type: z19.enum([\"response.completed\", \"response.incomplete\"]),\n        response: z19.object({\n          incomplete_details: z19.object({ reason: z19.string() }).nullish(),\n          usage: z19.object({\n            input_tokens: z19.number(),\n            input_tokens_details: z19.object({ cached_tokens: z19.number().nullish() }).nullish(),\n            output_tokens: z19.number(),\n            output_tokens_details: z19.object({ reasoning_tokens: z19.number().nullish() }).nullish()\n          }),\n          service_tier: z19.string().nullish()\n        })\n      }),\n      z19.object({\n        type: z19.literal(\"response.created\"),\n        response: z19.object({\n          id: z19.string(),\n          created_at: z19.number(),\n          model: z19.string(),\n          service_tier: z19.string().nullish()\n        })\n      }),\n      z19.object({\n        type: z19.literal(\"response.output_item.added\"),\n        output_index: z19.number(),\n        item: z19.discriminatedUnion(\"type\", [\n          z19.object({\n            type: z19.literal(\"message\"),\n            id: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"reasoning\"),\n            id: z19.string(),\n            encrypted_content: z19.string().nullish()\n          }),\n          z19.object({\n            type: z19.literal(\"function_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            name: z19.string(),\n            arguments: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"web_search_call\"),\n            id: z19.string(),\n            status: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"computer_call\"),\n            id: z19.string(),\n            status: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"file_search_call\"),\n            id: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"image_generation_call\"),\n            id: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"code_interpreter_call\"),\n            id: z19.string(),\n            container_id: z19.string(),\n            code: z19.string().nullable(),\n            outputs: z19.array(\n              z19.discriminatedUnion(\"type\", [\n                z19.object({ type: z19.literal(\"logs\"), logs: z19.string() }),\n                z19.object({ type: z19.literal(\"image\"), url: z19.string() })\n              ])\n            ).nullable(),\n            status: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_call\"),\n            id: z19.string(),\n            status: z19.string(),\n            approval_request_id: z19.string().nullish()\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_list_tools\"),\n            id: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_approval_request\"),\n            id: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"apply_patch_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            status: z19.enum([\"in_progress\", \"completed\"]),\n            operation: z19.discriminatedUnion(\"type\", [\n              z19.object({\n                type: z19.literal(\"create_file\"),\n                path: z19.string(),\n                diff: z19.string()\n              }),\n              z19.object({\n                type: z19.literal(\"delete_file\"),\n                path: z19.string()\n              }),\n              z19.object({\n                type: z19.literal(\"update_file\"),\n                path: z19.string(),\n                diff: z19.string()\n              })\n            ])\n          }),\n          z19.object({\n            type: z19.literal(\"shell_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            status: z19.enum([\"in_progress\", \"completed\", \"incomplete\"]),\n            action: z19.object({\n              commands: z19.array(z19.string())\n            })\n          })\n        ])\n      }),\n      z19.object({\n        type: z19.literal(\"response.output_item.done\"),\n        output_index: z19.number(),\n        item: z19.discriminatedUnion(\"type\", [\n          z19.object({\n            type: z19.literal(\"message\"),\n            id: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"reasoning\"),\n            id: z19.string(),\n            encrypted_content: z19.string().nullish()\n          }),\n          z19.object({\n            type: z19.literal(\"function_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            name: z19.string(),\n            arguments: z19.string(),\n            status: z19.literal(\"completed\")\n          }),\n          z19.object({\n            type: z19.literal(\"code_interpreter_call\"),\n            id: z19.string(),\n            code: z19.string().nullable(),\n            container_id: z19.string(),\n            outputs: z19.array(\n              z19.discriminatedUnion(\"type\", [\n                z19.object({ type: z19.literal(\"logs\"), logs: z19.string() }),\n                z19.object({ type: z19.literal(\"image\"), url: z19.string() })\n              ])\n            ).nullable()\n          }),\n          z19.object({\n            type: z19.literal(\"image_generation_call\"),\n            id: z19.string(),\n            result: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"web_search_call\"),\n            id: z19.string(),\n            status: z19.string(),\n            action: z19.discriminatedUnion(\"type\", [\n              z19.object({\n                type: z19.literal(\"search\"),\n                query: z19.string().nullish(),\n                sources: z19.array(\n                  z19.discriminatedUnion(\"type\", [\n                    z19.object({ type: z19.literal(\"url\"), url: z19.string() }),\n                    z19.object({ type: z19.literal(\"api\"), name: z19.string() })\n                  ])\n                ).nullish()\n              }),\n              z19.object({\n                type: z19.literal(\"open_page\"),\n                url: z19.string().nullish()\n              }),\n              z19.object({\n                type: z19.literal(\"find_in_page\"),\n                url: z19.string().nullish(),\n                pattern: z19.string().nullish()\n              })\n            ])\n          }),\n          z19.object({\n            type: z19.literal(\"file_search_call\"),\n            id: z19.string(),\n            queries: z19.array(z19.string()),\n            results: z19.array(\n              z19.object({\n                attributes: z19.record(\n                  z19.string(),\n                  z19.union([z19.string(), z19.number(), z19.boolean()])\n                ),\n                file_id: z19.string(),\n                filename: z19.string(),\n                score: z19.number(),\n                text: z19.string()\n              })\n            ).nullish()\n          }),\n          z19.object({\n            type: z19.literal(\"local_shell_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            action: z19.object({\n              type: z19.literal(\"exec\"),\n              command: z19.array(z19.string()),\n              timeout_ms: z19.number().optional(),\n              user: z19.string().optional(),\n              working_directory: z19.string().optional(),\n              env: z19.record(z19.string(), z19.string()).optional()\n            })\n          }),\n          z19.object({\n            type: z19.literal(\"computer_call\"),\n            id: z19.string(),\n            status: z19.literal(\"completed\")\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_call\"),\n            id: z19.string(),\n            status: z19.string(),\n            arguments: z19.string(),\n            name: z19.string(),\n            server_label: z19.string(),\n            output: z19.string().nullish(),\n            error: z19.union([\n              z19.string(),\n              z19.object({\n                type: z19.string().optional(),\n                code: z19.union([z19.number(), z19.string()]).optional(),\n                message: z19.string().optional()\n              }).loose()\n            ]).nullish(),\n            approval_request_id: z19.string().nullish()\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_list_tools\"),\n            id: z19.string(),\n            server_label: z19.string(),\n            tools: z19.array(\n              z19.object({\n                name: z19.string(),\n                description: z19.string().optional(),\n                input_schema: z19.any(),\n                annotations: z19.record(z19.string(), z19.unknown()).optional()\n              })\n            ),\n            error: z19.union([\n              z19.string(),\n              z19.object({\n                type: z19.string().optional(),\n                code: z19.union([z19.number(), z19.string()]).optional(),\n                message: z19.string().optional()\n              }).loose()\n            ]).optional()\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_approval_request\"),\n            id: z19.string(),\n            server_label: z19.string(),\n            name: z19.string(),\n            arguments: z19.string(),\n            approval_request_id: z19.string().optional()\n          }),\n          z19.object({\n            type: z19.literal(\"apply_patch_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            status: z19.enum([\"in_progress\", \"completed\"]),\n            operation: z19.discriminatedUnion(\"type\", [\n              z19.object({\n                type: z19.literal(\"create_file\"),\n                path: z19.string(),\n                diff: z19.string()\n              }),\n              z19.object({\n                type: z19.literal(\"delete_file\"),\n                path: z19.string()\n              }),\n              z19.object({\n                type: z19.literal(\"update_file\"),\n                path: z19.string(),\n                diff: z19.string()\n              })\n            ])\n          }),\n          z19.object({\n            type: z19.literal(\"shell_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            status: z19.enum([\"in_progress\", \"completed\", \"incomplete\"]),\n            action: z19.object({\n              commands: z19.array(z19.string())\n            })\n          })\n        ])\n      }),\n      z19.object({\n        type: z19.literal(\"response.function_call_arguments.delta\"),\n        item_id: z19.string(),\n        output_index: z19.number(),\n        delta: z19.string()\n      }),\n      z19.object({\n        type: z19.literal(\"response.image_generation_call.partial_image\"),\n        item_id: z19.string(),\n        output_index: z19.number(),\n        partial_image_b64: z19.string()\n      }),\n      z19.object({\n        type: z19.literal(\"response.code_interpreter_call_code.delta\"),\n        item_id: z19.string(),\n        output_index: z19.number(),\n        delta: z19.string()\n      }),\n      z19.object({\n        type: z19.literal(\"response.code_interpreter_call_code.done\"),\n        item_id: z19.string(),\n        output_index: z19.number(),\n        code: z19.string()\n      }),\n      z19.object({\n        type: z19.literal(\"response.output_text.annotation.added\"),\n        annotation: z19.discriminatedUnion(\"type\", [\n          z19.object({\n            type: z19.literal(\"url_citation\"),\n            start_index: z19.number(),\n            end_index: z19.number(),\n            url: z19.string(),\n            title: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"file_citation\"),\n            file_id: z19.string(),\n            filename: z19.string(),\n            index: z19.number()\n          }),\n          z19.object({\n            type: z19.literal(\"container_file_citation\"),\n            container_id: z19.string(),\n            file_id: z19.string(),\n            filename: z19.string(),\n            start_index: z19.number(),\n            end_index: z19.number()\n          }),\n          z19.object({\n            type: z19.literal(\"file_path\"),\n            file_id: z19.string(),\n            index: z19.number()\n          })\n        ])\n      }),\n      z19.object({\n        type: z19.literal(\"response.reasoning_summary_part.added\"),\n        item_id: z19.string(),\n        summary_index: z19.number()\n      }),\n      z19.object({\n        type: z19.literal(\"response.reasoning_summary_text.delta\"),\n        item_id: z19.string(),\n        summary_index: z19.number(),\n        delta: z19.string()\n      }),\n      z19.object({\n        type: z19.literal(\"response.reasoning_summary_part.done\"),\n        item_id: z19.string(),\n        summary_index: z19.number()\n      }),\n      z19.object({\n        type: z19.literal(\"response.apply_patch_call_operation_diff.delta\"),\n        item_id: z19.string(),\n        output_index: z19.number(),\n        delta: z19.string(),\n        obfuscation: z19.string().nullish()\n      }),\n      z19.object({\n        type: z19.literal(\"response.apply_patch_call_operation_diff.done\"),\n        item_id: z19.string(),\n        output_index: z19.number(),\n        diff: z19.string()\n      }),\n      z19.object({\n        type: z19.literal(\"error\"),\n        sequence_number: z19.number(),\n        error: z19.object({\n          type: z19.string(),\n          code: z19.string(),\n          message: z19.string(),\n          param: z19.string().nullish()\n        })\n      }),\n      z19.object({ type: z19.string() }).loose().transform((value) => ({\n        type: \"unknown_chunk\",\n        message: value.type\n      }))\n      // fallback for unknown chunks\n    ])\n  )\n);\nvar openaiResponsesResponseSchema = lazySchema17(\n  () => zodSchema17(\n    z19.object({\n      id: z19.string().optional(),\n      created_at: z19.number().optional(),\n      error: z19.object({\n        message: z19.string(),\n        type: z19.string(),\n        param: z19.string().nullish(),\n        code: z19.string()\n      }).nullish(),\n      model: z19.string().optional(),\n      output: z19.array(\n        z19.discriminatedUnion(\"type\", [\n          z19.object({\n            type: z19.literal(\"message\"),\n            role: z19.literal(\"assistant\"),\n            id: z19.string(),\n            content: z19.array(\n              z19.object({\n                type: z19.literal(\"output_text\"),\n                text: z19.string(),\n                logprobs: z19.array(\n                  z19.object({\n                    token: z19.string(),\n                    logprob: z19.number(),\n                    top_logprobs: z19.array(\n                      z19.object({\n                        token: z19.string(),\n                        logprob: z19.number()\n                      })\n                    )\n                  })\n                ).nullish(),\n                annotations: z19.array(\n                  z19.discriminatedUnion(\"type\", [\n                    z19.object({\n                      type: z19.literal(\"url_citation\"),\n                      start_index: z19.number(),\n                      end_index: z19.number(),\n                      url: z19.string(),\n                      title: z19.string()\n                    }),\n                    z19.object({\n                      type: z19.literal(\"file_citation\"),\n                      file_id: z19.string(),\n                      filename: z19.string(),\n                      index: z19.number()\n                    }),\n                    z19.object({\n                      type: z19.literal(\"container_file_citation\"),\n                      container_id: z19.string(),\n                      file_id: z19.string(),\n                      filename: z19.string(),\n                      start_index: z19.number(),\n                      end_index: z19.number()\n                    }),\n                    z19.object({\n                      type: z19.literal(\"file_path\"),\n                      file_id: z19.string(),\n                      index: z19.number()\n                    })\n                  ])\n                )\n              })\n            )\n          }),\n          z19.object({\n            type: z19.literal(\"web_search_call\"),\n            id: z19.string(),\n            status: z19.string(),\n            action: z19.discriminatedUnion(\"type\", [\n              z19.object({\n                type: z19.literal(\"search\"),\n                query: z19.string().nullish(),\n                sources: z19.array(\n                  z19.discriminatedUnion(\"type\", [\n                    z19.object({ type: z19.literal(\"url\"), url: z19.string() }),\n                    z19.object({ type: z19.literal(\"api\"), name: z19.string() })\n                  ])\n                ).nullish()\n              }),\n              z19.object({\n                type: z19.literal(\"open_page\"),\n                url: z19.string().nullish()\n              }),\n              z19.object({\n                type: z19.literal(\"find_in_page\"),\n                url: z19.string().nullish(),\n                pattern: z19.string().nullish()\n              })\n            ])\n          }),\n          z19.object({\n            type: z19.literal(\"file_search_call\"),\n            id: z19.string(),\n            queries: z19.array(z19.string()),\n            results: z19.array(\n              z19.object({\n                attributes: z19.record(\n                  z19.string(),\n                  z19.union([z19.string(), z19.number(), z19.boolean()])\n                ),\n                file_id: z19.string(),\n                filename: z19.string(),\n                score: z19.number(),\n                text: z19.string()\n              })\n            ).nullish()\n          }),\n          z19.object({\n            type: z19.literal(\"code_interpreter_call\"),\n            id: z19.string(),\n            code: z19.string().nullable(),\n            container_id: z19.string(),\n            outputs: z19.array(\n              z19.discriminatedUnion(\"type\", [\n                z19.object({ type: z19.literal(\"logs\"), logs: z19.string() }),\n                z19.object({ type: z19.literal(\"image\"), url: z19.string() })\n              ])\n            ).nullable()\n          }),\n          z19.object({\n            type: z19.literal(\"image_generation_call\"),\n            id: z19.string(),\n            result: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"local_shell_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            action: z19.object({\n              type: z19.literal(\"exec\"),\n              command: z19.array(z19.string()),\n              timeout_ms: z19.number().optional(),\n              user: z19.string().optional(),\n              working_directory: z19.string().optional(),\n              env: z19.record(z19.string(), z19.string()).optional()\n            })\n          }),\n          z19.object({\n            type: z19.literal(\"function_call\"),\n            call_id: z19.string(),\n            name: z19.string(),\n            arguments: z19.string(),\n            id: z19.string()\n          }),\n          z19.object({\n            type: z19.literal(\"computer_call\"),\n            id: z19.string(),\n            status: z19.string().optional()\n          }),\n          z19.object({\n            type: z19.literal(\"reasoning\"),\n            id: z19.string(),\n            encrypted_content: z19.string().nullish(),\n            summary: z19.array(\n              z19.object({\n                type: z19.literal(\"summary_text\"),\n                text: z19.string()\n              })\n            )\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_call\"),\n            id: z19.string(),\n            status: z19.string(),\n            arguments: z19.string(),\n            name: z19.string(),\n            server_label: z19.string(),\n            output: z19.string().nullish(),\n            error: z19.union([\n              z19.string(),\n              z19.object({\n                type: z19.string().optional(),\n                code: z19.union([z19.number(), z19.string()]).optional(),\n                message: z19.string().optional()\n              }).loose()\n            ]).nullish(),\n            approval_request_id: z19.string().nullish()\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_list_tools\"),\n            id: z19.string(),\n            server_label: z19.string(),\n            tools: z19.array(\n              z19.object({\n                name: z19.string(),\n                description: z19.string().optional(),\n                input_schema: z19.any(),\n                annotations: z19.record(z19.string(), z19.unknown()).optional()\n              })\n            ),\n            error: z19.union([\n              z19.string(),\n              z19.object({\n                type: z19.string().optional(),\n                code: z19.union([z19.number(), z19.string()]).optional(),\n                message: z19.string().optional()\n              }).loose()\n            ]).optional()\n          }),\n          z19.object({\n            type: z19.literal(\"mcp_approval_request\"),\n            id: z19.string(),\n            server_label: z19.string(),\n            name: z19.string(),\n            arguments: z19.string(),\n            approval_request_id: z19.string().optional()\n          }),\n          z19.object({\n            type: z19.literal(\"apply_patch_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            status: z19.enum([\"in_progress\", \"completed\"]),\n            operation: z19.discriminatedUnion(\"type\", [\n              z19.object({\n                type: z19.literal(\"create_file\"),\n                path: z19.string(),\n                diff: z19.string()\n              }),\n              z19.object({\n                type: z19.literal(\"delete_file\"),\n                path: z19.string()\n              }),\n              z19.object({\n                type: z19.literal(\"update_file\"),\n                path: z19.string(),\n                diff: z19.string()\n              })\n            ])\n          }),\n          z19.object({\n            type: z19.literal(\"shell_call\"),\n            id: z19.string(),\n            call_id: z19.string(),\n            status: z19.enum([\"in_progress\", \"completed\", \"incomplete\"]),\n            action: z19.object({\n              commands: z19.array(z19.string())\n            })\n          })\n        ])\n      ).optional(),\n      service_tier: z19.string().nullish(),\n      incomplete_details: z19.object({ reason: z19.string() }).nullish(),\n      usage: z19.object({\n        input_tokens: z19.number(),\n        input_tokens_details: z19.object({ cached_tokens: z19.number().nullish() }).nullish(),\n        output_tokens: z19.number(),\n        output_tokens_details: z19.object({ reasoning_tokens: z19.number().nullish() }).nullish()\n      }).optional()\n    })\n  )\n);\n\n// src/responses/openai-responses-options.ts\nimport { lazySchema as lazySchema18, zodSchema as zodSchema18 } from \"@ai-sdk/provider-utils\";\nimport { z as z20 } from \"zod/v4\";\nvar TOP_LOGPROBS_MAX = 20;\nvar openaiResponsesReasoningModelIds = [\n  \"o1\",\n  \"o1-2024-12-17\",\n  \"o3\",\n  \"o3-2025-04-16\",\n  \"o3-deep-research\",\n  \"o3-deep-research-2025-06-26\",\n  \"o3-mini\",\n  \"o3-mini-2025-01-31\",\n  \"o4-mini\",\n  \"o4-mini-2025-04-16\",\n  \"o4-mini-deep-research\",\n  \"o4-mini-deep-research-2025-06-26\",\n  \"codex-mini-latest\",\n  \"computer-use-preview\",\n  \"gpt-5\",\n  \"gpt-5-2025-08-07\",\n  \"gpt-5-codex\",\n  \"gpt-5-mini\",\n  \"gpt-5-mini-2025-08-07\",\n  \"gpt-5-nano\",\n  \"gpt-5-nano-2025-08-07\",\n  \"gpt-5-pro\",\n  \"gpt-5-pro-2025-10-06\",\n  \"gpt-5.1\",\n  \"gpt-5.1-chat-latest\",\n  \"gpt-5.1-codex-mini\",\n  \"gpt-5.1-codex\",\n  \"gpt-5.1-codex-max\",\n  \"gpt-5.2\",\n  \"gpt-5.2-chat-latest\",\n  \"gpt-5.2-pro\"\n];\nvar openaiResponsesModelIds = [\n  \"gpt-4.1\",\n  \"gpt-4.1-2025-04-14\",\n  \"gpt-4.1-mini\",\n  \"gpt-4.1-mini-2025-04-14\",\n  \"gpt-4.1-nano\",\n  \"gpt-4.1-nano-2025-04-14\",\n  \"gpt-4o\",\n  \"gpt-4o-2024-05-13\",\n  \"gpt-4o-2024-08-06\",\n  \"gpt-4o-2024-11-20\",\n  \"gpt-4o-audio-preview\",\n  \"gpt-4o-audio-preview-2024-10-01\",\n  \"gpt-4o-audio-preview-2024-12-17\",\n  \"gpt-4o-search-preview\",\n  \"gpt-4o-search-preview-2025-03-11\",\n  \"gpt-4o-mini-search-preview\",\n  \"gpt-4o-mini-search-preview-2025-03-11\",\n  \"gpt-4o-mini\",\n  \"gpt-4o-mini-2024-07-18\",\n  \"gpt-4-turbo\",\n  \"gpt-4-turbo-2024-04-09\",\n  \"gpt-4-turbo-preview\",\n  \"gpt-4-0125-preview\",\n  \"gpt-4-1106-preview\",\n  \"gpt-4\",\n  \"gpt-4-0613\",\n  \"gpt-4.5-preview\",\n  \"gpt-4.5-preview-2025-02-27\",\n  \"gpt-3.5-turbo-0125\",\n  \"gpt-3.5-turbo\",\n  \"gpt-3.5-turbo-1106\",\n  \"chatgpt-4o-latest\",\n  \"gpt-5-chat-latest\",\n  ...openaiResponsesReasoningModelIds\n];\nvar openaiResponsesProviderOptionsSchema = lazySchema18(\n  () => zodSchema18(\n    z20.object({\n      /**\n       * The ID of the OpenAI Conversation to continue.\n       * You must create a conversation first via the OpenAI API.\n       * Cannot be used in conjunction with `previousResponseId`.\n       * Defaults to `undefined`.\n       * @see https://platform.openai.com/docs/api-reference/conversations/create\n       */\n      conversation: z20.string().nullish(),\n      /**\n       * The set of extra fields to include in the response (advanced, usually not needed).\n       * Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.\n       */\n      include: z20.array(\n        z20.enum([\n          \"reasoning.encrypted_content\",\n          // handled internally by default, only needed for unknown reasoning models\n          \"file_search_call.results\",\n          \"message.output_text.logprobs\"\n        ])\n      ).nullish(),\n      /**\n       * Instructions for the model.\n       * They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.\n       * Defaults to `undefined`.\n       */\n      instructions: z20.string().nullish(),\n      /**\n       * Return the log probabilities of the tokens. Including logprobs will increase\n       * the response size and can slow down response times. However, it can\n       * be useful to better understand how the model is behaving.\n       *\n       * Setting to true will return the log probabilities of the tokens that\n       * were generated.\n       *\n       * Setting to a number will return the log probabilities of the top n\n       * tokens that were generated.\n       *\n       * @see https://platform.openai.com/docs/api-reference/responses/create\n       * @see https://cookbook.openai.com/examples/using_logprobs\n       */\n      logprobs: z20.union([z20.boolean(), z20.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),\n      /**\n       * The maximum number of total calls to built-in tools that can be processed in a response.\n       * This maximum number applies across all built-in tool calls, not per individual tool.\n       * Any further attempts to call a tool by the model will be ignored.\n       */\n      maxToolCalls: z20.number().nullish(),\n      /**\n       * Additional metadata to store with the generation.\n       */\n      metadata: z20.any().nullish(),\n      /**\n       * Whether to use parallel tool calls. Defaults to `true`.\n       */\n      parallelToolCalls: z20.boolean().nullish(),\n      /**\n       * The ID of the previous response. You can use it to continue a conversation.\n       * Defaults to `undefined`.\n       */\n      previousResponseId: z20.string().nullish(),\n      /**\n       * Sets a cache key to tie this prompt to cached prefixes for better caching performance.\n       */\n      promptCacheKey: z20.string().nullish(),\n      /**\n       * The retention policy for the prompt cache.\n       * - 'in_memory': Default. Standard prompt caching behavior.\n       * - '24h': Extended prompt caching that keeps cached prefixes active for up to 24 hours.\n       *          Currently only available for 5.1 series models.\n       *\n       * @default 'in_memory'\n       */\n      promptCacheRetention: z20.enum([\"in_memory\", \"24h\"]).nullish(),\n      /**\n       * Reasoning effort for reasoning models. Defaults to `medium`. If you use\n       * `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.\n       * Valid values: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'\n       *\n       * The 'none' type for `reasoningEffort` is only available for OpenAI's GPT-5.1\n       * models. Also, the 'xhigh' type for `reasoningEffort` is only available for\n       * OpenAI's GPT-5.1-Codex-Max model. Setting `reasoningEffort` to 'none' or 'xhigh' with unsupported models will result in\n       * an error.\n       */\n      reasoningEffort: z20.string().nullish(),\n      /**\n       * Controls reasoning summary output from the model.\n       * Set to \"auto\" to automatically receive the richest level available,\n       * or \"detailed\" for comprehensive summaries.\n       */\n      reasoningSummary: z20.string().nullish(),\n      /**\n       * The identifier for safety monitoring and tracking.\n       */\n      safetyIdentifier: z20.string().nullish(),\n      /**\n       * Service tier for the request.\n       * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).\n       * Set to 'priority' for faster processing with Enterprise access (available for gpt-4, gpt-5, gpt-5-mini, o3, o4-mini; gpt-5-nano is not supported).\n       *\n       * Defaults to 'auto'.\n       */\n      serviceTier: z20.enum([\"auto\", \"flex\", \"priority\", \"default\"]).nullish(),\n      /**\n       * Whether to store the generation. Defaults to `true`.\n       */\n      store: z20.boolean().nullish(),\n      /**\n       * Whether to use strict JSON schema validation.\n       * Defaults to `true`.\n       */\n      strictJsonSchema: z20.boolean().nullish(),\n      /**\n       * Controls the verbosity of the model's responses. Lower values ('low') will result\n       * in more concise responses, while higher values ('high') will result in more verbose responses.\n       * Valid values: 'low', 'medium', 'high'.\n       */\n      textVerbosity: z20.enum([\"low\", \"medium\", \"high\"]).nullish(),\n      /**\n       * Controls output truncation. 'auto' (default) performs truncation automatically;\n       * 'disabled' turns truncation off.\n       */\n      truncation: z20.enum([\"auto\", \"disabled\"]).nullish(),\n      /**\n       * A unique identifier representing your end-user, which can help OpenAI to\n       * monitor and detect abuse.\n       * Defaults to `undefined`.\n       * @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids\n       */\n      user: z20.string().nullish(),\n      /**\n       * Override the system message mode for this model.\n       * - 'system': Use the 'system' role for system messages (default for most models)\n       * - 'developer': Use the 'developer' role for system messages (used by reasoning models)\n       * - 'remove': Remove system messages entirely\n       *\n       * If not specified, the mode is automatically determined based on the model.\n       */\n      systemMessageMode: z20.enum([\"system\", \"developer\", \"remove\"]).optional(),\n      /**\n       * Force treating this model as a reasoning model.\n       *\n       * This is useful for \"stealth\" reasoning models (e.g. via a custom baseURL)\n       * where the model ID is not recognized by the SDK's allowlist.\n       *\n       * When enabled, the SDK applies reasoning-model parameter compatibility rules\n       * and defaults `systemMessageMode` to `developer` unless overridden.\n       */\n      forceReasoning: z20.boolean().optional()\n    })\n  )\n);\n\n// src/responses/openai-responses-prepare-tools.ts\nimport {\n  UnsupportedFunctionalityError as UnsupportedFunctionalityError5\n} from \"@ai-sdk/provider\";\nimport { validateTypes as validateTypes2 } from \"@ai-sdk/provider-utils\";\nasync function prepareResponsesTools({\n  tools,\n  toolChoice\n}) {\n  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;\n  const toolWarnings = [];\n  if (tools == null) {\n    return { tools: void 0, toolChoice: void 0, toolWarnings };\n  }\n  const openaiTools2 = [];\n  for (const tool of tools) {\n    switch (tool.type) {\n      case \"function\":\n        openaiTools2.push({\n          type: \"function\",\n          name: tool.name,\n          description: tool.description,\n          parameters: tool.inputSchema,\n          ...tool.strict != null ? { strict: tool.strict } : {}\n        });\n        break;\n      case \"provider\": {\n        switch (tool.id) {\n          case \"openai.file_search\": {\n            const args = await validateTypes2({\n              value: tool.args,\n              schema: fileSearchArgsSchema\n            });\n            openaiTools2.push({\n              type: \"file_search\",\n              vector_store_ids: args.vectorStoreIds,\n              max_num_results: args.maxNumResults,\n              ranking_options: args.ranking ? {\n                ranker: args.ranking.ranker,\n                score_threshold: args.ranking.scoreThreshold\n              } : void 0,\n              filters: args.filters\n            });\n            break;\n          }\n          case \"openai.local_shell\": {\n            openaiTools2.push({\n              type: \"local_shell\"\n            });\n            break;\n          }\n          case \"openai.shell\": {\n            openaiTools2.push({\n              type: \"shell\"\n            });\n            break;\n          }\n          case \"openai.apply_patch\": {\n            openaiTools2.push({\n              type: \"apply_patch\"\n            });\n            break;\n          }\n          case \"openai.web_search_preview\": {\n            const args = await validateTypes2({\n              value: tool.args,\n              schema: webSearchPreviewArgsSchema\n            });\n            openaiTools2.push({\n              type: \"web_search_preview\",\n              search_context_size: args.searchContextSize,\n              user_location: args.userLocation\n            });\n            break;\n          }\n          case \"openai.web_search\": {\n            const args = await validateTypes2({\n              value: tool.args,\n              schema: webSearchArgsSchema\n            });\n            openaiTools2.push({\n              type: \"web_search\",\n              filters: args.filters != null ? { allowed_domains: args.filters.allowedDomains } : void 0,\n              external_web_access: args.externalWebAccess,\n              search_context_size: args.searchContextSize,\n              user_location: args.userLocation\n            });\n            break;\n          }\n          case \"openai.code_interpreter\": {\n            const args = await validateTypes2({\n              value: tool.args,\n              schema: codeInterpreterArgsSchema\n            });\n            openaiTools2.push({\n              type: \"code_interpreter\",\n              container: args.container == null ? { type: \"auto\", file_ids: void 0 } : typeof args.container === \"string\" ? args.container : { type: \"auto\", file_ids: args.container.fileIds }\n            });\n            break;\n          }\n          case \"openai.image_generation\": {\n            const args = await validateTypes2({\n              value: tool.args,\n              schema: imageGenerationArgsSchema\n            });\n            openaiTools2.push({\n              type: \"image_generation\",\n              background: args.background,\n              input_fidelity: args.inputFidelity,\n              input_image_mask: args.inputImageMask ? {\n                file_id: args.inputImageMask.fileId,\n                image_url: args.inputImageMask.imageUrl\n              } : void 0,\n              model: args.model,\n              moderation: args.moderation,\n              partial_images: args.partialImages,\n              quality: args.quality,\n              output_compression: args.outputCompression,\n              output_format: args.outputFormat,\n              size: args.size\n            });\n            break;\n          }\n          case \"openai.mcp\": {\n            const args = await validateTypes2({\n              value: tool.args,\n              schema: mcpArgsSchema\n            });\n            const mapApprovalFilter = (filter) => ({\n              tool_names: filter.toolNames\n            });\n            const requireApproval = args.requireApproval;\n            const requireApprovalParam = requireApproval == null ? void 0 : typeof requireApproval === \"string\" ? requireApproval : requireApproval.never != null ? { never: mapApprovalFilter(requireApproval.never) } : void 0;\n            openaiTools2.push({\n              type: \"mcp\",\n              server_label: args.serverLabel,\n              allowed_tools: Array.isArray(args.allowedTools) ? args.allowedTools : args.allowedTools ? {\n                read_only: args.allowedTools.readOnly,\n                tool_names: args.allowedTools.toolNames\n              } : void 0,\n              authorization: args.authorization,\n              connector_id: args.connectorId,\n              headers: args.headers,\n              require_approval: requireApprovalParam != null ? requireApprovalParam : \"never\",\n              server_description: args.serverDescription,\n              server_url: args.serverUrl\n            });\n            break;\n          }\n        }\n        break;\n      }\n      default:\n        toolWarnings.push({\n          type: \"unsupported\",\n          feature: `function tool ${tool}`\n        });\n        break;\n    }\n  }\n  if (toolChoice == null) {\n    return { tools: openaiTools2, toolChoice: void 0, toolWarnings };\n  }\n  const type = toolChoice.type;\n  switch (type) {\n    case \"auto\":\n    case \"none\":\n    case \"required\":\n      return { tools: openaiTools2, toolChoice: type, toolWarnings };\n    case \"tool\":\n      return {\n        tools: openaiTools2,\n        toolChoice: toolChoice.toolName === \"code_interpreter\" || toolChoice.toolName === \"file_search\" || toolChoice.toolName === \"image_generation\" || toolChoice.toolName === \"web_search_preview\" || toolChoice.toolName === \"web_search\" || toolChoice.toolName === \"mcp\" || toolChoice.toolName === \"apply_patch\" ? { type: toolChoice.toolName } : { type: \"function\", name: toolChoice.toolName },\n        toolWarnings\n      };\n    default: {\n      const _exhaustiveCheck = type;\n      throw new UnsupportedFunctionalityError5({\n        functionality: `tool choice type: ${_exhaustiveCheck}`\n      });\n    }\n  }\n}\n\n// src/responses/openai-responses-language-model.ts\nfunction extractApprovalRequestIdToToolCallIdMapping(prompt) {\n  var _a, _b;\n  const mapping = {};\n  for (const message of prompt) {\n    if (message.role !== \"assistant\") continue;\n    for (const part of message.content) {\n      if (part.type !== \"tool-call\") continue;\n      const approvalRequestId = (_b = (_a = part.providerOptions) == null ? void 0 : _a.openai) == null ? void 0 : _b.approvalRequestId;\n      if (approvalRequestId != null) {\n        mapping[approvalRequestId] = part.toolCallId;\n      }\n    }\n  }\n  return mapping;\n}\nvar OpenAIResponsesLanguageModel = class {\n  constructor(modelId, config) {\n    this.specificationVersion = \"v3\";\n    this.supportedUrls = {\n      \"image/*\": [/^https?:\\/\\/.*$/],\n      \"application/pdf\": [/^https?:\\/\\/.*$/]\n    };\n    this.modelId = modelId;\n    this.config = config;\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async getArgs({\n    maxOutputTokens,\n    temperature,\n    stopSequences,\n    topP,\n    topK,\n    presencePenalty,\n    frequencyPenalty,\n    seed,\n    prompt,\n    providerOptions,\n    tools,\n    toolChoice,\n    responseFormat\n  }) {\n    var _a, _b, _c, _d, _e, _f;\n    const warnings = [];\n    const modelCapabilities = getOpenAILanguageModelCapabilities(this.modelId);\n    if (topK != null) {\n      warnings.push({ type: \"unsupported\", feature: \"topK\" });\n    }\n    if (seed != null) {\n      warnings.push({ type: \"unsupported\", feature: \"seed\" });\n    }\n    if (presencePenalty != null) {\n      warnings.push({ type: \"unsupported\", feature: \"presencePenalty\" });\n    }\n    if (frequencyPenalty != null) {\n      warnings.push({ type: \"unsupported\", feature: \"frequencyPenalty\" });\n    }\n    if (stopSequences != null) {\n      warnings.push({ type: \"unsupported\", feature: \"stopSequences\" });\n    }\n    const providerOptionsName = this.config.provider.includes(\"azure\") ? \"azure\" : \"openai\";\n    let openaiOptions = await parseProviderOptions5({\n      provider: providerOptionsName,\n      providerOptions,\n      schema: openaiResponsesProviderOptionsSchema\n    });\n    if (openaiOptions == null && providerOptionsName !== \"openai\") {\n      openaiOptions = await parseProviderOptions5({\n        provider: \"openai\",\n        providerOptions,\n        schema: openaiResponsesProviderOptionsSchema\n      });\n    }\n    const isReasoningModel = (_a = openaiOptions == null ? void 0 : openaiOptions.forceReasoning) != null ? _a : modelCapabilities.isReasoningModel;\n    if ((openaiOptions == null ? void 0 : openaiOptions.conversation) && (openaiOptions == null ? void 0 : openaiOptions.previousResponseId)) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"conversation\",\n        details: \"conversation and previousResponseId cannot be used together\"\n      });\n    }\n    const toolNameMapping = createToolNameMapping({\n      tools,\n      providerToolNames: {\n        \"openai.code_interpreter\": \"code_interpreter\",\n        \"openai.file_search\": \"file_search\",\n        \"openai.image_generation\": \"image_generation\",\n        \"openai.local_shell\": \"local_shell\",\n        \"openai.shell\": \"shell\",\n        \"openai.web_search\": \"web_search\",\n        \"openai.web_search_preview\": \"web_search_preview\",\n        \"openai.mcp\": \"mcp\",\n        \"openai.apply_patch\": \"apply_patch\"\n      }\n    });\n    const { input, warnings: inputWarnings } = await convertToOpenAIResponsesInput({\n      prompt,\n      toolNameMapping,\n      systemMessageMode: (_b = openaiOptions == null ? void 0 : openaiOptions.systemMessageMode) != null ? _b : isReasoningModel ? \"developer\" : modelCapabilities.systemMessageMode,\n      providerOptionsName,\n      fileIdPrefixes: this.config.fileIdPrefixes,\n      store: (_c = openaiOptions == null ? void 0 : openaiOptions.store) != null ? _c : true,\n      hasConversation: (openaiOptions == null ? void 0 : openaiOptions.conversation) != null,\n      hasLocalShellTool: hasOpenAITool(\"openai.local_shell\"),\n      hasShellTool: hasOpenAITool(\"openai.shell\"),\n      hasApplyPatchTool: hasOpenAITool(\"openai.apply_patch\")\n    });\n    warnings.push(...inputWarnings);\n    const strictJsonSchema = (_d = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _d : true;\n    let include = openaiOptions == null ? void 0 : openaiOptions.include;\n    function addInclude(key) {\n      if (include == null) {\n        include = [key];\n      } else if (!include.includes(key)) {\n        include = [...include, key];\n      }\n    }\n    function hasOpenAITool(id) {\n      return (tools == null ? void 0 : tools.find((tool) => tool.type === \"provider\" && tool.id === id)) != null;\n    }\n    const topLogprobs = typeof (openaiOptions == null ? void 0 : openaiOptions.logprobs) === \"number\" ? openaiOptions == null ? void 0 : openaiOptions.logprobs : (openaiOptions == null ? void 0 : openaiOptions.logprobs) === true ? TOP_LOGPROBS_MAX : void 0;\n    if (topLogprobs) {\n      addInclude(\"message.output_text.logprobs\");\n    }\n    const webSearchToolName = (_e = tools == null ? void 0 : tools.find(\n      (tool) => tool.type === \"provider\" && (tool.id === \"openai.web_search\" || tool.id === \"openai.web_search_preview\")\n    )) == null ? void 0 : _e.name;\n    if (webSearchToolName) {\n      addInclude(\"web_search_call.action.sources\");\n    }\n    if (hasOpenAITool(\"openai.code_interpreter\")) {\n      addInclude(\"code_interpreter_call.outputs\");\n    }\n    const store = openaiOptions == null ? void 0 : openaiOptions.store;\n    if (store === false && isReasoningModel) {\n      addInclude(\"reasoning.encrypted_content\");\n    }\n    const baseArgs = {\n      model: this.modelId,\n      input,\n      temperature,\n      top_p: topP,\n      max_output_tokens: maxOutputTokens,\n      ...((responseFormat == null ? void 0 : responseFormat.type) === \"json\" || (openaiOptions == null ? void 0 : openaiOptions.textVerbosity)) && {\n        text: {\n          ...(responseFormat == null ? void 0 : responseFormat.type) === \"json\" && {\n            format: responseFormat.schema != null ? {\n              type: \"json_schema\",\n              strict: strictJsonSchema,\n              name: (_f = responseFormat.name) != null ? _f : \"response\",\n              description: responseFormat.description,\n              schema: responseFormat.schema\n            } : { type: \"json_object\" }\n          },\n          ...(openaiOptions == null ? void 0 : openaiOptions.textVerbosity) && {\n            verbosity: openaiOptions.textVerbosity\n          }\n        }\n      },\n      // provider options:\n      conversation: openaiOptions == null ? void 0 : openaiOptions.conversation,\n      max_tool_calls: openaiOptions == null ? void 0 : openaiOptions.maxToolCalls,\n      metadata: openaiOptions == null ? void 0 : openaiOptions.metadata,\n      parallel_tool_calls: openaiOptions == null ? void 0 : openaiOptions.parallelToolCalls,\n      previous_response_id: openaiOptions == null ? void 0 : openaiOptions.previousResponseId,\n      store,\n      user: openaiOptions == null ? void 0 : openaiOptions.user,\n      instructions: openaiOptions == null ? void 0 : openaiOptions.instructions,\n      service_tier: openaiOptions == null ? void 0 : openaiOptions.serviceTier,\n      include,\n      prompt_cache_key: openaiOptions == null ? void 0 : openaiOptions.promptCacheKey,\n      prompt_cache_retention: openaiOptions == null ? void 0 : openaiOptions.promptCacheRetention,\n      safety_identifier: openaiOptions == null ? void 0 : openaiOptions.safetyIdentifier,\n      top_logprobs: topLogprobs,\n      truncation: openaiOptions == null ? void 0 : openaiOptions.truncation,\n      // model-specific settings:\n      ...isReasoningModel && ((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null) && {\n        reasoning: {\n          ...(openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null && {\n            effort: openaiOptions.reasoningEffort\n          },\n          ...(openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null && {\n            summary: openaiOptions.reasoningSummary\n          }\n        }\n      }\n    };\n    if (isReasoningModel) {\n      if (!((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) === \"none\" && modelCapabilities.supportsNonReasoningParameters)) {\n        if (baseArgs.temperature != null) {\n          baseArgs.temperature = void 0;\n          warnings.push({\n            type: \"unsupported\",\n            feature: \"temperature\",\n            details: \"temperature is not supported for reasoning models\"\n          });\n        }\n        if (baseArgs.top_p != null) {\n          baseArgs.top_p = void 0;\n          warnings.push({\n            type: \"unsupported\",\n            feature: \"topP\",\n            details: \"topP is not supported for reasoning models\"\n          });\n        }\n      }\n    } else {\n      if ((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null) {\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"reasoningEffort\",\n          details: \"reasoningEffort is not supported for non-reasoning models\"\n        });\n      }\n      if ((openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null) {\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"reasoningSummary\",\n          details: \"reasoningSummary is not supported for non-reasoning models\"\n        });\n      }\n    }\n    if ((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === \"flex\" && !modelCapabilities.supportsFlexProcessing) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"serviceTier\",\n        details: \"flex processing is only available for o3, o4-mini, and gpt-5 models\"\n      });\n      delete baseArgs.service_tier;\n    }\n    if ((openaiOptions == null ? void 0 : openaiOptions.serviceTier) === \"priority\" && !modelCapabilities.supportsPriorityProcessing) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"serviceTier\",\n        details: \"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported\"\n      });\n      delete baseArgs.service_tier;\n    }\n    const {\n      tools: openaiTools2,\n      toolChoice: openaiToolChoice,\n      toolWarnings\n    } = await prepareResponsesTools({\n      tools,\n      toolChoice\n    });\n    return {\n      webSearchToolName,\n      args: {\n        ...baseArgs,\n        tools: openaiTools2,\n        tool_choice: openaiToolChoice\n      },\n      warnings: [...warnings, ...toolWarnings],\n      store,\n      toolNameMapping,\n      providerOptionsName\n    };\n  }\n  async doGenerate(options) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;\n    const {\n      args: body,\n      warnings,\n      webSearchToolName,\n      toolNameMapping,\n      providerOptionsName\n    } = await this.getArgs(options);\n    const url = this.config.url({\n      path: \"/responses\",\n      modelId: this.modelId\n    });\n    const approvalRequestIdToDummyToolCallIdFromPrompt = extractApprovalRequestIdToToolCallIdMapping(options.prompt);\n    const {\n      responseHeaders,\n      value: response,\n      rawValue: rawResponse\n    } = await postJsonToApi5({\n      url,\n      headers: combineHeaders5(this.config.headers(), options.headers),\n      body,\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler5(\n        openaiResponsesResponseSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    if (response.error) {\n      throw new APICallError({\n        message: response.error.message,\n        url,\n        requestBodyValues: body,\n        statusCode: 400,\n        responseHeaders,\n        responseBody: rawResponse,\n        isRetryable: false\n      });\n    }\n    const content = [];\n    const logprobs = [];\n    let hasFunctionCall = false;\n    for (const part of response.output) {\n      switch (part.type) {\n        case \"reasoning\": {\n          if (part.summary.length === 0) {\n            part.summary.push({ type: \"summary_text\", text: \"\" });\n          }\n          for (const summary of part.summary) {\n            content.push({\n              type: \"reasoning\",\n              text: summary.text,\n              providerMetadata: {\n                [providerOptionsName]: {\n                  itemId: part.id,\n                  reasoningEncryptedContent: (_a = part.encrypted_content) != null ? _a : null\n                }\n              }\n            });\n          }\n          break;\n        }\n        case \"image_generation_call\": {\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\"image_generation\"),\n            input: \"{}\",\n            providerExecuted: true\n          });\n          content.push({\n            type: \"tool-result\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\"image_generation\"),\n            result: {\n              result: part.result\n            }\n          });\n          break;\n        }\n        case \"local_shell_call\": {\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.call_id,\n            toolName: toolNameMapping.toCustomToolName(\"local_shell\"),\n            input: JSON.stringify({\n              action: part.action\n            }),\n            providerMetadata: {\n              [providerOptionsName]: {\n                itemId: part.id\n              }\n            }\n          });\n          break;\n        }\n        case \"shell_call\": {\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.call_id,\n            toolName: toolNameMapping.toCustomToolName(\"shell\"),\n            input: JSON.stringify({\n              action: {\n                commands: part.action.commands\n              }\n            }),\n            providerMetadata: {\n              [providerOptionsName]: {\n                itemId: part.id\n              }\n            }\n          });\n          break;\n        }\n        case \"message\": {\n          for (const contentPart of part.content) {\n            if (((_c = (_b = options.providerOptions) == null ? void 0 : _b[providerOptionsName]) == null ? void 0 : _c.logprobs) && contentPart.logprobs) {\n              logprobs.push(contentPart.logprobs);\n            }\n            const providerMetadata2 = {\n              itemId: part.id,\n              ...contentPart.annotations.length > 0 && {\n                annotations: contentPart.annotations\n              }\n            };\n            content.push({\n              type: \"text\",\n              text: contentPart.text,\n              providerMetadata: {\n                [providerOptionsName]: providerMetadata2\n              }\n            });\n            for (const annotation of contentPart.annotations) {\n              if (annotation.type === \"url_citation\") {\n                content.push({\n                  type: \"source\",\n                  sourceType: \"url\",\n                  id: (_f = (_e = (_d = this.config).generateId) == null ? void 0 : _e.call(_d)) != null ? _f : generateId2(),\n                  url: annotation.url,\n                  title: annotation.title\n                });\n              } else if (annotation.type === \"file_citation\") {\n                content.push({\n                  type: \"source\",\n                  sourceType: \"document\",\n                  id: (_i = (_h = (_g = this.config).generateId) == null ? void 0 : _h.call(_g)) != null ? _i : generateId2(),\n                  mediaType: \"text/plain\",\n                  title: annotation.filename,\n                  filename: annotation.filename,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      type: annotation.type,\n                      fileId: annotation.file_id,\n                      index: annotation.index\n                    }\n                  }\n                });\n              } else if (annotation.type === \"container_file_citation\") {\n                content.push({\n                  type: \"source\",\n                  sourceType: \"document\",\n                  id: (_l = (_k = (_j = this.config).generateId) == null ? void 0 : _k.call(_j)) != null ? _l : generateId2(),\n                  mediaType: \"text/plain\",\n                  title: annotation.filename,\n                  filename: annotation.filename,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      type: annotation.type,\n                      fileId: annotation.file_id,\n                      containerId: annotation.container_id\n                    }\n                  }\n                });\n              } else if (annotation.type === \"file_path\") {\n                content.push({\n                  type: \"source\",\n                  sourceType: \"document\",\n                  id: (_o = (_n = (_m = this.config).generateId) == null ? void 0 : _n.call(_m)) != null ? _o : generateId2(),\n                  mediaType: \"application/octet-stream\",\n                  title: annotation.file_id,\n                  filename: annotation.file_id,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      type: annotation.type,\n                      fileId: annotation.file_id,\n                      index: annotation.index\n                    }\n                  }\n                });\n              }\n            }\n          }\n          break;\n        }\n        case \"function_call\": {\n          hasFunctionCall = true;\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.call_id,\n            toolName: part.name,\n            input: part.arguments,\n            providerMetadata: {\n              [providerOptionsName]: {\n                itemId: part.id\n              }\n            }\n          });\n          break;\n        }\n        case \"web_search_call\": {\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\n              webSearchToolName != null ? webSearchToolName : \"web_search\"\n            ),\n            input: JSON.stringify({}),\n            providerExecuted: true\n          });\n          content.push({\n            type: \"tool-result\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\n              webSearchToolName != null ? webSearchToolName : \"web_search\"\n            ),\n            result: mapWebSearchOutput(part.action)\n          });\n          break;\n        }\n        case \"mcp_call\": {\n          const toolCallId = part.approval_request_id != null ? (_p = approvalRequestIdToDummyToolCallIdFromPrompt[part.approval_request_id]) != null ? _p : part.id : part.id;\n          const toolName = `mcp.${part.name}`;\n          content.push({\n            type: \"tool-call\",\n            toolCallId,\n            toolName,\n            input: part.arguments,\n            providerExecuted: true,\n            dynamic: true\n          });\n          content.push({\n            type: \"tool-result\",\n            toolCallId,\n            toolName,\n            result: {\n              type: \"call\",\n              serverLabel: part.server_label,\n              name: part.name,\n              arguments: part.arguments,\n              ...part.output != null ? { output: part.output } : {},\n              ...part.error != null ? { error: part.error } : {}\n            },\n            providerMetadata: {\n              [providerOptionsName]: {\n                itemId: part.id\n              }\n            }\n          });\n          break;\n        }\n        case \"mcp_list_tools\": {\n          break;\n        }\n        case \"mcp_approval_request\": {\n          const approvalRequestId = (_q = part.approval_request_id) != null ? _q : part.id;\n          const dummyToolCallId = (_t = (_s = (_r = this.config).generateId) == null ? void 0 : _s.call(_r)) != null ? _t : generateId2();\n          const toolName = `mcp.${part.name}`;\n          content.push({\n            type: \"tool-call\",\n            toolCallId: dummyToolCallId,\n            toolName,\n            input: part.arguments,\n            providerExecuted: true,\n            dynamic: true\n          });\n          content.push({\n            type: \"tool-approval-request\",\n            approvalId: approvalRequestId,\n            toolCallId: dummyToolCallId\n          });\n          break;\n        }\n        case \"computer_call\": {\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\"computer_use\"),\n            input: \"\",\n            providerExecuted: true\n          });\n          content.push({\n            type: \"tool-result\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\"computer_use\"),\n            result: {\n              type: \"computer_use_tool_result\",\n              status: part.status || \"completed\"\n            }\n          });\n          break;\n        }\n        case \"file_search_call\": {\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\"file_search\"),\n            input: \"{}\",\n            providerExecuted: true\n          });\n          content.push({\n            type: \"tool-result\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\"file_search\"),\n            result: {\n              queries: part.queries,\n              results: (_v = (_u = part.results) == null ? void 0 : _u.map((result) => ({\n                attributes: result.attributes,\n                fileId: result.file_id,\n                filename: result.filename,\n                score: result.score,\n                text: result.text\n              }))) != null ? _v : null\n            }\n          });\n          break;\n        }\n        case \"code_interpreter_call\": {\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\"code_interpreter\"),\n            input: JSON.stringify({\n              code: part.code,\n              containerId: part.container_id\n            }),\n            providerExecuted: true\n          });\n          content.push({\n            type: \"tool-result\",\n            toolCallId: part.id,\n            toolName: toolNameMapping.toCustomToolName(\"code_interpreter\"),\n            result: {\n              outputs: part.outputs\n            }\n          });\n          break;\n        }\n        case \"apply_patch_call\": {\n          content.push({\n            type: \"tool-call\",\n            toolCallId: part.call_id,\n            toolName: toolNameMapping.toCustomToolName(\"apply_patch\"),\n            input: JSON.stringify({\n              callId: part.call_id,\n              operation: part.operation\n            }),\n            providerMetadata: {\n              [providerOptionsName]: {\n                itemId: part.id\n              }\n            }\n          });\n          break;\n        }\n      }\n    }\n    const providerMetadata = {\n      [providerOptionsName]: {\n        responseId: response.id,\n        ...logprobs.length > 0 ? { logprobs } : {},\n        ...typeof response.service_tier === \"string\" ? { serviceTier: response.service_tier } : {}\n      }\n    };\n    const usage = response.usage;\n    return {\n      content,\n      finishReason: {\n        unified: mapOpenAIResponseFinishReason({\n          finishReason: (_w = response.incomplete_details) == null ? void 0 : _w.reason,\n          hasFunctionCall\n        }),\n        raw: (_y = (_x = response.incomplete_details) == null ? void 0 : _x.reason) != null ? _y : void 0\n      },\n      usage: convertOpenAIResponsesUsage(usage),\n      request: { body },\n      response: {\n        id: response.id,\n        timestamp: new Date(response.created_at * 1e3),\n        modelId: response.model,\n        headers: responseHeaders,\n        body: rawResponse\n      },\n      providerMetadata,\n      warnings\n    };\n  }\n  async doStream(options) {\n    const {\n      args: body,\n      warnings,\n      webSearchToolName,\n      toolNameMapping,\n      store,\n      providerOptionsName\n    } = await this.getArgs(options);\n    const { responseHeaders, value: response } = await postJsonToApi5({\n      url: this.config.url({\n        path: \"/responses\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders5(this.config.headers(), options.headers),\n      body: {\n        ...body,\n        stream: true\n      },\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createEventSourceResponseHandler3(\n        openaiResponsesChunkSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    const self = this;\n    const approvalRequestIdToDummyToolCallIdFromPrompt = extractApprovalRequestIdToToolCallIdMapping(options.prompt);\n    const approvalRequestIdToDummyToolCallIdFromStream = /* @__PURE__ */ new Map();\n    let finishReason = {\n      unified: \"other\",\n      raw: void 0\n    };\n    let usage = void 0;\n    const logprobs = [];\n    let responseId = null;\n    const ongoingToolCalls = {};\n    const ongoingAnnotations = [];\n    let hasFunctionCall = false;\n    const activeReasoning = {};\n    let serviceTier;\n    return {\n      stream: response.pipeThrough(\n        new TransformStream({\n          start(controller) {\n            controller.enqueue({ type: \"stream-start\", warnings });\n          },\n          transform(chunk, controller) {\n            var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;\n            if (options.includeRawChunks) {\n              controller.enqueue({ type: \"raw\", rawValue: chunk.rawValue });\n            }\n            if (!chunk.success) {\n              finishReason = { unified: \"error\", raw: void 0 };\n              controller.enqueue({ type: \"error\", error: chunk.error });\n              return;\n            }\n            const value = chunk.value;\n            if (isResponseOutputItemAddedChunk(value)) {\n              if (value.item.type === \"function_call\") {\n                ongoingToolCalls[value.output_index] = {\n                  toolName: value.item.name,\n                  toolCallId: value.item.call_id\n                };\n                controller.enqueue({\n                  type: \"tool-input-start\",\n                  id: value.item.call_id,\n                  toolName: value.item.name\n                });\n              } else if (value.item.type === \"web_search_call\") {\n                ongoingToolCalls[value.output_index] = {\n                  toolName: toolNameMapping.toCustomToolName(\n                    webSearchToolName != null ? webSearchToolName : \"web_search\"\n                  ),\n                  toolCallId: value.item.id\n                };\n                controller.enqueue({\n                  type: \"tool-input-start\",\n                  id: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\n                    webSearchToolName != null ? webSearchToolName : \"web_search\"\n                  ),\n                  providerExecuted: true\n                });\n                controller.enqueue({\n                  type: \"tool-input-end\",\n                  id: value.item.id\n                });\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\n                    webSearchToolName != null ? webSearchToolName : \"web_search\"\n                  ),\n                  input: JSON.stringify({}),\n                  providerExecuted: true\n                });\n              } else if (value.item.type === \"computer_call\") {\n                ongoingToolCalls[value.output_index] = {\n                  toolName: toolNameMapping.toCustomToolName(\"computer_use\"),\n                  toolCallId: value.item.id\n                };\n                controller.enqueue({\n                  type: \"tool-input-start\",\n                  id: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"computer_use\"),\n                  providerExecuted: true\n                });\n              } else if (value.item.type === \"code_interpreter_call\") {\n                ongoingToolCalls[value.output_index] = {\n                  toolName: toolNameMapping.toCustomToolName(\"code_interpreter\"),\n                  toolCallId: value.item.id,\n                  codeInterpreter: {\n                    containerId: value.item.container_id\n                  }\n                };\n                controller.enqueue({\n                  type: \"tool-input-start\",\n                  id: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"code_interpreter\"),\n                  providerExecuted: true\n                });\n                controller.enqueue({\n                  type: \"tool-input-delta\",\n                  id: value.item.id,\n                  delta: `{\"containerId\":\"${value.item.container_id}\",\"code\":\"`\n                });\n              } else if (value.item.type === \"file_search_call\") {\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"file_search\"),\n                  input: \"{}\",\n                  providerExecuted: true\n                });\n              } else if (value.item.type === \"image_generation_call\") {\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"image_generation\"),\n                  input: \"{}\",\n                  providerExecuted: true\n                });\n              } else if (value.item.type === \"mcp_call\" || value.item.type === \"mcp_list_tools\" || value.item.type === \"mcp_approval_request\") {\n              } else if (value.item.type === \"apply_patch_call\") {\n                const { call_id: callId, operation } = value.item;\n                ongoingToolCalls[value.output_index] = {\n                  toolName: toolNameMapping.toCustomToolName(\"apply_patch\"),\n                  toolCallId: callId,\n                  applyPatch: {\n                    // delete_file doesn't have diff\n                    hasDiff: operation.type === \"delete_file\",\n                    endEmitted: operation.type === \"delete_file\"\n                  }\n                };\n                controller.enqueue({\n                  type: \"tool-input-start\",\n                  id: callId,\n                  toolName: toolNameMapping.toCustomToolName(\"apply_patch\")\n                });\n                if (operation.type === \"delete_file\") {\n                  const inputString = JSON.stringify({\n                    callId,\n                    operation\n                  });\n                  controller.enqueue({\n                    type: \"tool-input-delta\",\n                    id: callId,\n                    delta: inputString\n                  });\n                  controller.enqueue({\n                    type: \"tool-input-end\",\n                    id: callId\n                  });\n                } else {\n                  controller.enqueue({\n                    type: \"tool-input-delta\",\n                    id: callId,\n                    delta: `{\"callId\":\"${escapeJSONDelta(callId)}\",\"operation\":{\"type\":\"${escapeJSONDelta(operation.type)}\",\"path\":\"${escapeJSONDelta(operation.path)}\",\"diff\":\"`\n                  });\n                }\n              } else if (value.item.type === \"shell_call\") {\n                ongoingToolCalls[value.output_index] = {\n                  toolName: toolNameMapping.toCustomToolName(\"shell\"),\n                  toolCallId: value.item.call_id\n                };\n              } else if (value.item.type === \"message\") {\n                ongoingAnnotations.splice(0, ongoingAnnotations.length);\n                controller.enqueue({\n                  type: \"text-start\",\n                  id: value.item.id,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      itemId: value.item.id\n                    }\n                  }\n                });\n              } else if (isResponseOutputItemAddedChunk(value) && value.item.type === \"reasoning\") {\n                activeReasoning[value.item.id] = {\n                  encryptedContent: value.item.encrypted_content,\n                  summaryParts: { 0: \"active\" }\n                };\n                controller.enqueue({\n                  type: \"reasoning-start\",\n                  id: `${value.item.id}:0`,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      itemId: value.item.id,\n                      reasoningEncryptedContent: (_a = value.item.encrypted_content) != null ? _a : null\n                    }\n                  }\n                });\n              }\n            } else if (isResponseOutputItemDoneChunk(value)) {\n              if (value.item.type === \"message\") {\n                controller.enqueue({\n                  type: \"text-end\",\n                  id: value.item.id,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      itemId: value.item.id,\n                      ...ongoingAnnotations.length > 0 && {\n                        annotations: ongoingAnnotations\n                      }\n                    }\n                  }\n                });\n              } else if (value.item.type === \"function_call\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                hasFunctionCall = true;\n                controller.enqueue({\n                  type: \"tool-input-end\",\n                  id: value.item.call_id\n                });\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: value.item.call_id,\n                  toolName: value.item.name,\n                  input: value.item.arguments,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      itemId: value.item.id\n                    }\n                  }\n                });\n              } else if (value.item.type === \"web_search_call\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                controller.enqueue({\n                  type: \"tool-result\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\n                    webSearchToolName != null ? webSearchToolName : \"web_search\"\n                  ),\n                  result: mapWebSearchOutput(value.item.action)\n                });\n              } else if (value.item.type === \"computer_call\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                controller.enqueue({\n                  type: \"tool-input-end\",\n                  id: value.item.id\n                });\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"computer_use\"),\n                  input: \"\",\n                  providerExecuted: true\n                });\n                controller.enqueue({\n                  type: \"tool-result\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"computer_use\"),\n                  result: {\n                    type: \"computer_use_tool_result\",\n                    status: value.item.status || \"completed\"\n                  }\n                });\n              } else if (value.item.type === \"file_search_call\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                controller.enqueue({\n                  type: \"tool-result\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"file_search\"),\n                  result: {\n                    queries: value.item.queries,\n                    results: (_c = (_b = value.item.results) == null ? void 0 : _b.map((result) => ({\n                      attributes: result.attributes,\n                      fileId: result.file_id,\n                      filename: result.filename,\n                      score: result.score,\n                      text: result.text\n                    }))) != null ? _c : null\n                  }\n                });\n              } else if (value.item.type === \"code_interpreter_call\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                controller.enqueue({\n                  type: \"tool-result\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"code_interpreter\"),\n                  result: {\n                    outputs: value.item.outputs\n                  }\n                });\n              } else if (value.item.type === \"image_generation_call\") {\n                controller.enqueue({\n                  type: \"tool-result\",\n                  toolCallId: value.item.id,\n                  toolName: toolNameMapping.toCustomToolName(\"image_generation\"),\n                  result: {\n                    result: value.item.result\n                  }\n                });\n              } else if (value.item.type === \"mcp_call\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                const approvalRequestId = (_d = value.item.approval_request_id) != null ? _d : void 0;\n                const aliasedToolCallId = approvalRequestId != null ? (_f = (_e = approvalRequestIdToDummyToolCallIdFromStream.get(\n                  approvalRequestId\n                )) != null ? _e : approvalRequestIdToDummyToolCallIdFromPrompt[approvalRequestId]) != null ? _f : value.item.id : value.item.id;\n                const toolName = `mcp.${value.item.name}`;\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: aliasedToolCallId,\n                  toolName,\n                  input: value.item.arguments,\n                  providerExecuted: true,\n                  dynamic: true\n                });\n                controller.enqueue({\n                  type: \"tool-result\",\n                  toolCallId: aliasedToolCallId,\n                  toolName,\n                  result: {\n                    type: \"call\",\n                    serverLabel: value.item.server_label,\n                    name: value.item.name,\n                    arguments: value.item.arguments,\n                    ...value.item.output != null ? { output: value.item.output } : {},\n                    ...value.item.error != null ? { error: value.item.error } : {}\n                  },\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      itemId: value.item.id\n                    }\n                  }\n                });\n              } else if (value.item.type === \"mcp_list_tools\") {\n                ongoingToolCalls[value.output_index] = void 0;\n              } else if (value.item.type === \"apply_patch_call\") {\n                const toolCall = ongoingToolCalls[value.output_index];\n                if ((toolCall == null ? void 0 : toolCall.applyPatch) && !toolCall.applyPatch.endEmitted && value.item.operation.type !== \"delete_file\") {\n                  if (!toolCall.applyPatch.hasDiff) {\n                    controller.enqueue({\n                      type: \"tool-input-delta\",\n                      id: toolCall.toolCallId,\n                      delta: escapeJSONDelta(value.item.operation.diff)\n                    });\n                  }\n                  controller.enqueue({\n                    type: \"tool-input-delta\",\n                    id: toolCall.toolCallId,\n                    delta: '\"}}'\n                  });\n                  controller.enqueue({\n                    type: \"tool-input-end\",\n                    id: toolCall.toolCallId\n                  });\n                  toolCall.applyPatch.endEmitted = true;\n                }\n                if (toolCall && value.item.status === \"completed\") {\n                  controller.enqueue({\n                    type: \"tool-call\",\n                    toolCallId: toolCall.toolCallId,\n                    toolName: toolNameMapping.toCustomToolName(\"apply_patch\"),\n                    input: JSON.stringify({\n                      callId: value.item.call_id,\n                      operation: value.item.operation\n                    }),\n                    providerMetadata: {\n                      [providerOptionsName]: {\n                        itemId: value.item.id\n                      }\n                    }\n                  });\n                }\n                ongoingToolCalls[value.output_index] = void 0;\n              } else if (value.item.type === \"mcp_approval_request\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                const dummyToolCallId = (_i = (_h = (_g = self.config).generateId) == null ? void 0 : _h.call(_g)) != null ? _i : generateId2();\n                const approvalRequestId = (_j = value.item.approval_request_id) != null ? _j : value.item.id;\n                approvalRequestIdToDummyToolCallIdFromStream.set(\n                  approvalRequestId,\n                  dummyToolCallId\n                );\n                const toolName = `mcp.${value.item.name}`;\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: dummyToolCallId,\n                  toolName,\n                  input: value.item.arguments,\n                  providerExecuted: true,\n                  dynamic: true\n                });\n                controller.enqueue({\n                  type: \"tool-approval-request\",\n                  approvalId: approvalRequestId,\n                  toolCallId: dummyToolCallId\n                });\n              } else if (value.item.type === \"local_shell_call\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: value.item.call_id,\n                  toolName: toolNameMapping.toCustomToolName(\"local_shell\"),\n                  input: JSON.stringify({\n                    action: {\n                      type: \"exec\",\n                      command: value.item.action.command,\n                      timeoutMs: value.item.action.timeout_ms,\n                      user: value.item.action.user,\n                      workingDirectory: value.item.action.working_directory,\n                      env: value.item.action.env\n                    }\n                  }),\n                  providerMetadata: {\n                    [providerOptionsName]: { itemId: value.item.id }\n                  }\n                });\n              } else if (value.item.type === \"shell_call\") {\n                ongoingToolCalls[value.output_index] = void 0;\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: value.item.call_id,\n                  toolName: toolNameMapping.toCustomToolName(\"shell\"),\n                  input: JSON.stringify({\n                    action: {\n                      commands: value.item.action.commands\n                    }\n                  }),\n                  providerMetadata: {\n                    [providerOptionsName]: { itemId: value.item.id }\n                  }\n                });\n              } else if (value.item.type === \"reasoning\") {\n                const activeReasoningPart = activeReasoning[value.item.id];\n                const summaryPartIndices = Object.entries(\n                  activeReasoningPart.summaryParts\n                ).filter(\n                  ([_, status]) => status === \"active\" || status === \"can-conclude\"\n                ).map(([summaryIndex]) => summaryIndex);\n                for (const summaryIndex of summaryPartIndices) {\n                  controller.enqueue({\n                    type: \"reasoning-end\",\n                    id: `${value.item.id}:${summaryIndex}`,\n                    providerMetadata: {\n                      [providerOptionsName]: {\n                        itemId: value.item.id,\n                        reasoningEncryptedContent: (_k = value.item.encrypted_content) != null ? _k : null\n                      }\n                    }\n                  });\n                }\n                delete activeReasoning[value.item.id];\n              }\n            } else if (isResponseFunctionCallArgumentsDeltaChunk(value)) {\n              const toolCall = ongoingToolCalls[value.output_index];\n              if (toolCall != null) {\n                controller.enqueue({\n                  type: \"tool-input-delta\",\n                  id: toolCall.toolCallId,\n                  delta: value.delta\n                });\n              }\n            } else if (isResponseApplyPatchCallOperationDiffDeltaChunk(value)) {\n              const toolCall = ongoingToolCalls[value.output_index];\n              if (toolCall == null ? void 0 : toolCall.applyPatch) {\n                controller.enqueue({\n                  type: \"tool-input-delta\",\n                  id: toolCall.toolCallId,\n                  delta: escapeJSONDelta(value.delta)\n                });\n                toolCall.applyPatch.hasDiff = true;\n              }\n            } else if (isResponseApplyPatchCallOperationDiffDoneChunk(value)) {\n              const toolCall = ongoingToolCalls[value.output_index];\n              if ((toolCall == null ? void 0 : toolCall.applyPatch) && !toolCall.applyPatch.endEmitted) {\n                if (!toolCall.applyPatch.hasDiff) {\n                  controller.enqueue({\n                    type: \"tool-input-delta\",\n                    id: toolCall.toolCallId,\n                    delta: escapeJSONDelta(value.diff)\n                  });\n                  toolCall.applyPatch.hasDiff = true;\n                }\n                controller.enqueue({\n                  type: \"tool-input-delta\",\n                  id: toolCall.toolCallId,\n                  delta: '\"}}'\n                });\n                controller.enqueue({\n                  type: \"tool-input-end\",\n                  id: toolCall.toolCallId\n                });\n                toolCall.applyPatch.endEmitted = true;\n              }\n            } else if (isResponseImageGenerationCallPartialImageChunk(value)) {\n              controller.enqueue({\n                type: \"tool-result\",\n                toolCallId: value.item_id,\n                toolName: toolNameMapping.toCustomToolName(\"image_generation\"),\n                result: {\n                  result: value.partial_image_b64\n                },\n                preliminary: true\n              });\n            } else if (isResponseCodeInterpreterCallCodeDeltaChunk(value)) {\n              const toolCall = ongoingToolCalls[value.output_index];\n              if (toolCall != null) {\n                controller.enqueue({\n                  type: \"tool-input-delta\",\n                  id: toolCall.toolCallId,\n                  delta: escapeJSONDelta(value.delta)\n                });\n              }\n            } else if (isResponseCodeInterpreterCallCodeDoneChunk(value)) {\n              const toolCall = ongoingToolCalls[value.output_index];\n              if (toolCall != null) {\n                controller.enqueue({\n                  type: \"tool-input-delta\",\n                  id: toolCall.toolCallId,\n                  delta: '\"}'\n                });\n                controller.enqueue({\n                  type: \"tool-input-end\",\n                  id: toolCall.toolCallId\n                });\n                controller.enqueue({\n                  type: \"tool-call\",\n                  toolCallId: toolCall.toolCallId,\n                  toolName: toolNameMapping.toCustomToolName(\"code_interpreter\"),\n                  input: JSON.stringify({\n                    code: value.code,\n                    containerId: toolCall.codeInterpreter.containerId\n                  }),\n                  providerExecuted: true\n                });\n              }\n            } else if (isResponseCreatedChunk(value)) {\n              responseId = value.response.id;\n              controller.enqueue({\n                type: \"response-metadata\",\n                id: value.response.id,\n                timestamp: new Date(value.response.created_at * 1e3),\n                modelId: value.response.model\n              });\n            } else if (isTextDeltaChunk(value)) {\n              controller.enqueue({\n                type: \"text-delta\",\n                id: value.item_id,\n                delta: value.delta\n              });\n              if (((_m = (_l = options.providerOptions) == null ? void 0 : _l[providerOptionsName]) == null ? void 0 : _m.logprobs) && value.logprobs) {\n                logprobs.push(value.logprobs);\n              }\n            } else if (value.type === \"response.reasoning_summary_part.added\") {\n              if (value.summary_index > 0) {\n                const activeReasoningPart = activeReasoning[value.item_id];\n                activeReasoningPart.summaryParts[value.summary_index] = \"active\";\n                for (const summaryIndex of Object.keys(\n                  activeReasoningPart.summaryParts\n                )) {\n                  if (activeReasoningPart.summaryParts[summaryIndex] === \"can-conclude\") {\n                    controller.enqueue({\n                      type: \"reasoning-end\",\n                      id: `${value.item_id}:${summaryIndex}`,\n                      providerMetadata: {\n                        [providerOptionsName]: {\n                          itemId: value.item_id\n                        }\n                      }\n                    });\n                    activeReasoningPart.summaryParts[summaryIndex] = \"concluded\";\n                  }\n                }\n                controller.enqueue({\n                  type: \"reasoning-start\",\n                  id: `${value.item_id}:${value.summary_index}`,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      itemId: value.item_id,\n                      reasoningEncryptedContent: (_o = (_n = activeReasoning[value.item_id]) == null ? void 0 : _n.encryptedContent) != null ? _o : null\n                    }\n                  }\n                });\n              }\n            } else if (value.type === \"response.reasoning_summary_text.delta\") {\n              controller.enqueue({\n                type: \"reasoning-delta\",\n                id: `${value.item_id}:${value.summary_index}`,\n                delta: value.delta,\n                providerMetadata: {\n                  [providerOptionsName]: {\n                    itemId: value.item_id\n                  }\n                }\n              });\n            } else if (value.type === \"response.reasoning_summary_part.done\") {\n              if (store) {\n                controller.enqueue({\n                  type: \"reasoning-end\",\n                  id: `${value.item_id}:${value.summary_index}`,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      itemId: value.item_id\n                    }\n                  }\n                });\n                activeReasoning[value.item_id].summaryParts[value.summary_index] = \"concluded\";\n              } else {\n                activeReasoning[value.item_id].summaryParts[value.summary_index] = \"can-conclude\";\n              }\n            } else if (isResponseFinishedChunk(value)) {\n              finishReason = {\n                unified: mapOpenAIResponseFinishReason({\n                  finishReason: (_p = value.response.incomplete_details) == null ? void 0 : _p.reason,\n                  hasFunctionCall\n                }),\n                raw: (_r = (_q = value.response.incomplete_details) == null ? void 0 : _q.reason) != null ? _r : void 0\n              };\n              usage = value.response.usage;\n              if (typeof value.response.service_tier === \"string\") {\n                serviceTier = value.response.service_tier;\n              }\n            } else if (isResponseAnnotationAddedChunk(value)) {\n              ongoingAnnotations.push(value.annotation);\n              if (value.annotation.type === \"url_citation\") {\n                controller.enqueue({\n                  type: \"source\",\n                  sourceType: \"url\",\n                  id: (_u = (_t = (_s = self.config).generateId) == null ? void 0 : _t.call(_s)) != null ? _u : generateId2(),\n                  url: value.annotation.url,\n                  title: value.annotation.title\n                });\n              } else if (value.annotation.type === \"file_citation\") {\n                controller.enqueue({\n                  type: \"source\",\n                  sourceType: \"document\",\n                  id: (_x = (_w = (_v = self.config).generateId) == null ? void 0 : _w.call(_v)) != null ? _x : generateId2(),\n                  mediaType: \"text/plain\",\n                  title: value.annotation.filename,\n                  filename: value.annotation.filename,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      type: value.annotation.type,\n                      fileId: value.annotation.file_id,\n                      index: value.annotation.index\n                    }\n                  }\n                });\n              } else if (value.annotation.type === \"container_file_citation\") {\n                controller.enqueue({\n                  type: \"source\",\n                  sourceType: \"document\",\n                  id: (_A = (_z = (_y = self.config).generateId) == null ? void 0 : _z.call(_y)) != null ? _A : generateId2(),\n                  mediaType: \"text/plain\",\n                  title: value.annotation.filename,\n                  filename: value.annotation.filename,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      type: value.annotation.type,\n                      fileId: value.annotation.file_id,\n                      containerId: value.annotation.container_id\n                    }\n                  }\n                });\n              } else if (value.annotation.type === \"file_path\") {\n                controller.enqueue({\n                  type: \"source\",\n                  sourceType: \"document\",\n                  id: (_D = (_C = (_B = self.config).generateId) == null ? void 0 : _C.call(_B)) != null ? _D : generateId2(),\n                  mediaType: \"application/octet-stream\",\n                  title: value.annotation.file_id,\n                  filename: value.annotation.file_id,\n                  providerMetadata: {\n                    [providerOptionsName]: {\n                      type: value.annotation.type,\n                      fileId: value.annotation.file_id,\n                      index: value.annotation.index\n                    }\n                  }\n                });\n              }\n            } else if (isErrorChunk(value)) {\n              controller.enqueue({ type: \"error\", error: value });\n            }\n          },\n          flush(controller) {\n            const providerMetadata = {\n              [providerOptionsName]: {\n                responseId,\n                ...logprobs.length > 0 ? { logprobs } : {},\n                ...serviceTier !== void 0 ? { serviceTier } : {}\n              }\n            };\n            controller.enqueue({\n              type: \"finish\",\n              finishReason,\n              usage: convertOpenAIResponsesUsage(usage),\n              providerMetadata\n            });\n          }\n        })\n      ),\n      request: { body },\n      response: { headers: responseHeaders }\n    };\n  }\n};\nfunction isTextDeltaChunk(chunk) {\n  return chunk.type === \"response.output_text.delta\";\n}\nfunction isResponseOutputItemDoneChunk(chunk) {\n  return chunk.type === \"response.output_item.done\";\n}\nfunction isResponseFinishedChunk(chunk) {\n  return chunk.type === \"response.completed\" || chunk.type === \"response.incomplete\";\n}\nfunction isResponseCreatedChunk(chunk) {\n  return chunk.type === \"response.created\";\n}\nfunction isResponseFunctionCallArgumentsDeltaChunk(chunk) {\n  return chunk.type === \"response.function_call_arguments.delta\";\n}\nfunction isResponseImageGenerationCallPartialImageChunk(chunk) {\n  return chunk.type === \"response.image_generation_call.partial_image\";\n}\nfunction isResponseCodeInterpreterCallCodeDeltaChunk(chunk) {\n  return chunk.type === \"response.code_interpreter_call_code.delta\";\n}\nfunction isResponseCodeInterpreterCallCodeDoneChunk(chunk) {\n  return chunk.type === \"response.code_interpreter_call_code.done\";\n}\nfunction isResponseApplyPatchCallOperationDiffDeltaChunk(chunk) {\n  return chunk.type === \"response.apply_patch_call_operation_diff.delta\";\n}\nfunction isResponseApplyPatchCallOperationDiffDoneChunk(chunk) {\n  return chunk.type === \"response.apply_patch_call_operation_diff.done\";\n}\nfunction isResponseOutputItemAddedChunk(chunk) {\n  return chunk.type === \"response.output_item.added\";\n}\nfunction isResponseAnnotationAddedChunk(chunk) {\n  return chunk.type === \"response.output_text.annotation.added\";\n}\nfunction isErrorChunk(chunk) {\n  return chunk.type === \"error\";\n}\nfunction mapWebSearchOutput(action) {\n  var _a;\n  switch (action.type) {\n    case \"search\":\n      return {\n        action: { type: \"search\", query: (_a = action.query) != null ? _a : void 0 },\n        // include sources when provided by the Responses API (behind include flag)\n        ...action.sources != null && { sources: action.sources }\n      };\n    case \"open_page\":\n      return { action: { type: \"openPage\", url: action.url } };\n    case \"find_in_page\":\n      return {\n        action: {\n          type: \"findInPage\",\n          url: action.url,\n          pattern: action.pattern\n        }\n      };\n  }\n}\nfunction escapeJSONDelta(delta) {\n  return JSON.stringify(delta).slice(1, -1);\n}\n\n// src/speech/openai-speech-model.ts\nimport {\n  combineHeaders as combineHeaders6,\n  createBinaryResponseHandler,\n  parseProviderOptions as parseProviderOptions6,\n  postJsonToApi as postJsonToApi6\n} from \"@ai-sdk/provider-utils\";\n\n// src/speech/openai-speech-options.ts\nimport { lazySchema as lazySchema19, zodSchema as zodSchema19 } from \"@ai-sdk/provider-utils\";\nimport { z as z21 } from \"zod/v4\";\nvar openaiSpeechProviderOptionsSchema = lazySchema19(\n  () => zodSchema19(\n    z21.object({\n      instructions: z21.string().nullish(),\n      speed: z21.number().min(0.25).max(4).default(1).nullish()\n    })\n  )\n);\n\n// src/speech/openai-speech-model.ts\nvar OpenAISpeechModel = class {\n  constructor(modelId, config) {\n    this.modelId = modelId;\n    this.config = config;\n    this.specificationVersion = \"v3\";\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async getArgs({\n    text,\n    voice = \"alloy\",\n    outputFormat = \"mp3\",\n    speed,\n    instructions,\n    language,\n    providerOptions\n  }) {\n    const warnings = [];\n    const openAIOptions = await parseProviderOptions6({\n      provider: \"openai\",\n      providerOptions,\n      schema: openaiSpeechProviderOptionsSchema\n    });\n    const requestBody = {\n      model: this.modelId,\n      input: text,\n      voice,\n      response_format: \"mp3\",\n      speed,\n      instructions\n    };\n    if (outputFormat) {\n      if ([\"mp3\", \"opus\", \"aac\", \"flac\", \"wav\", \"pcm\"].includes(outputFormat)) {\n        requestBody.response_format = outputFormat;\n      } else {\n        warnings.push({\n          type: \"unsupported\",\n          feature: \"outputFormat\",\n          details: `Unsupported output format: ${outputFormat}. Using mp3 instead.`\n        });\n      }\n    }\n    if (openAIOptions) {\n      const speechModelOptions = {};\n      for (const key in speechModelOptions) {\n        const value = speechModelOptions[key];\n        if (value !== void 0) {\n          requestBody[key] = value;\n        }\n      }\n    }\n    if (language) {\n      warnings.push({\n        type: \"unsupported\",\n        feature: \"language\",\n        details: `OpenAI speech models do not support language selection. Language parameter \"${language}\" was ignored.`\n      });\n    }\n    return {\n      requestBody,\n      warnings\n    };\n  }\n  async doGenerate(options) {\n    var _a, _b, _c;\n    const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n    const { requestBody, warnings } = await this.getArgs(options);\n    const {\n      value: audio,\n      responseHeaders,\n      rawValue: rawResponse\n    } = await postJsonToApi6({\n      url: this.config.url({\n        path: \"/audio/speech\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders6(this.config.headers(), options.headers),\n      body: requestBody,\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createBinaryResponseHandler(),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    return {\n      audio,\n      warnings,\n      request: {\n        body: JSON.stringify(requestBody)\n      },\n      response: {\n        timestamp: currentDate,\n        modelId: this.modelId,\n        headers: responseHeaders,\n        body: rawResponse\n      }\n    };\n  }\n};\n\n// src/transcription/openai-transcription-model.ts\nimport {\n  combineHeaders as combineHeaders7,\n  convertBase64ToUint8Array as convertBase64ToUint8Array2,\n  createJsonResponseHandler as createJsonResponseHandler6,\n  mediaTypeToExtension,\n  parseProviderOptions as parseProviderOptions7,\n  postFormDataToApi as postFormDataToApi2\n} from \"@ai-sdk/provider-utils\";\n\n// src/transcription/openai-transcription-api.ts\nimport { lazySchema as lazySchema20, zodSchema as zodSchema20 } from \"@ai-sdk/provider-utils\";\nimport { z as z22 } from \"zod/v4\";\nvar openaiTranscriptionResponseSchema = lazySchema20(\n  () => zodSchema20(\n    z22.object({\n      text: z22.string(),\n      language: z22.string().nullish(),\n      duration: z22.number().nullish(),\n      words: z22.array(\n        z22.object({\n          word: z22.string(),\n          start: z22.number(),\n          end: z22.number()\n        })\n      ).nullish(),\n      segments: z22.array(\n        z22.object({\n          id: z22.number(),\n          seek: z22.number(),\n          start: z22.number(),\n          end: z22.number(),\n          text: z22.string(),\n          tokens: z22.array(z22.number()),\n          temperature: z22.number(),\n          avg_logprob: z22.number(),\n          compression_ratio: z22.number(),\n          no_speech_prob: z22.number()\n        })\n      ).nullish()\n    })\n  )\n);\n\n// src/transcription/openai-transcription-options.ts\nimport { lazySchema as lazySchema21, zodSchema as zodSchema21 } from \"@ai-sdk/provider-utils\";\nimport { z as z23 } from \"zod/v4\";\nvar openAITranscriptionProviderOptions = lazySchema21(\n  () => zodSchema21(\n    z23.object({\n      /**\n       * Additional information to include in the transcription response.\n       */\n      include: z23.array(z23.string()).optional(),\n      /**\n       * The language of the input audio in ISO-639-1 format.\n       */\n      language: z23.string().optional(),\n      /**\n       * An optional text to guide the model's style or continue a previous audio segment.\n       */\n      prompt: z23.string().optional(),\n      /**\n       * The sampling temperature, between 0 and 1.\n       * @default 0\n       */\n      temperature: z23.number().min(0).max(1).default(0).optional(),\n      /**\n       * The timestamp granularities to populate for this transcription.\n       * @default ['segment']\n       */\n      timestampGranularities: z23.array(z23.enum([\"word\", \"segment\"])).default([\"segment\"]).optional()\n    })\n  )\n);\n\n// src/transcription/openai-transcription-model.ts\nvar languageMap = {\n  afrikaans: \"af\",\n  arabic: \"ar\",\n  armenian: \"hy\",\n  azerbaijani: \"az\",\n  belarusian: \"be\",\n  bosnian: \"bs\",\n  bulgarian: \"bg\",\n  catalan: \"ca\",\n  chinese: \"zh\",\n  croatian: \"hr\",\n  czech: \"cs\",\n  danish: \"da\",\n  dutch: \"nl\",\n  english: \"en\",\n  estonian: \"et\",\n  finnish: \"fi\",\n  french: \"fr\",\n  galician: \"gl\",\n  german: \"de\",\n  greek: \"el\",\n  hebrew: \"he\",\n  hindi: \"hi\",\n  hungarian: \"hu\",\n  icelandic: \"is\",\n  indonesian: \"id\",\n  italian: \"it\",\n  japanese: \"ja\",\n  kannada: \"kn\",\n  kazakh: \"kk\",\n  korean: \"ko\",\n  latvian: \"lv\",\n  lithuanian: \"lt\",\n  macedonian: \"mk\",\n  malay: \"ms\",\n  marathi: \"mr\",\n  maori: \"mi\",\n  nepali: \"ne\",\n  norwegian: \"no\",\n  persian: \"fa\",\n  polish: \"pl\",\n  portuguese: \"pt\",\n  romanian: \"ro\",\n  russian: \"ru\",\n  serbian: \"sr\",\n  slovak: \"sk\",\n  slovenian: \"sl\",\n  spanish: \"es\",\n  swahili: \"sw\",\n  swedish: \"sv\",\n  tagalog: \"tl\",\n  tamil: \"ta\",\n  thai: \"th\",\n  turkish: \"tr\",\n  ukrainian: \"uk\",\n  urdu: \"ur\",\n  vietnamese: \"vi\",\n  welsh: \"cy\"\n};\nvar OpenAITranscriptionModel = class {\n  constructor(modelId, config) {\n    this.modelId = modelId;\n    this.config = config;\n    this.specificationVersion = \"v3\";\n  }\n  get provider() {\n    return this.config.provider;\n  }\n  async getArgs({\n    audio,\n    mediaType,\n    providerOptions\n  }) {\n    const warnings = [];\n    const openAIOptions = await parseProviderOptions7({\n      provider: \"openai\",\n      providerOptions,\n      schema: openAITranscriptionProviderOptions\n    });\n    const formData = new FormData();\n    const blob = audio instanceof Uint8Array ? new Blob([audio]) : new Blob([convertBase64ToUint8Array2(audio)]);\n    formData.append(\"model\", this.modelId);\n    const fileExtension = mediaTypeToExtension(mediaType);\n    formData.append(\n      \"file\",\n      new File([blob], \"audio\", { type: mediaType }),\n      `audio.${fileExtension}`\n    );\n    if (openAIOptions) {\n      const transcriptionModelOptions = {\n        include: openAIOptions.include,\n        language: openAIOptions.language,\n        prompt: openAIOptions.prompt,\n        // https://platform.openai.com/docs/api-reference/audio/createTranscription#audio_createtranscription-response_format\n        // prefer verbose_json to get segments for models that support it\n        response_format: [\n          \"gpt-4o-transcribe\",\n          \"gpt-4o-mini-transcribe\"\n        ].includes(this.modelId) ? \"json\" : \"verbose_json\",\n        temperature: openAIOptions.temperature,\n        timestamp_granularities: openAIOptions.timestampGranularities\n      };\n      for (const [key, value] of Object.entries(transcriptionModelOptions)) {\n        if (value != null) {\n          if (Array.isArray(value)) {\n            for (const item of value) {\n              formData.append(`${key}[]`, String(item));\n            }\n          } else {\n            formData.append(key, String(value));\n          }\n        }\n      }\n    }\n    return {\n      formData,\n      warnings\n    };\n  }\n  async doGenerate(options) {\n    var _a, _b, _c, _d, _e, _f, _g, _h;\n    const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n    const { formData, warnings } = await this.getArgs(options);\n    const {\n      value: response,\n      responseHeaders,\n      rawValue: rawResponse\n    } = await postFormDataToApi2({\n      url: this.config.url({\n        path: \"/audio/transcriptions\",\n        modelId: this.modelId\n      }),\n      headers: combineHeaders7(this.config.headers(), options.headers),\n      formData,\n      failedResponseHandler: openaiFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler6(\n        openaiTranscriptionResponseSchema\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch\n    });\n    const language = response.language != null && response.language in languageMap ? languageMap[response.language] : void 0;\n    return {\n      text: response.text,\n      segments: (_g = (_f = (_d = response.segments) == null ? void 0 : _d.map((segment) => ({\n        text: segment.text,\n        startSecond: segment.start,\n        endSecond: segment.end\n      }))) != null ? _f : (_e = response.words) == null ? void 0 : _e.map((word) => ({\n        text: word.word,\n        startSecond: word.start,\n        endSecond: word.end\n      }))) != null ? _g : [],\n      language,\n      durationInSeconds: (_h = response.duration) != null ? _h : void 0,\n      warnings,\n      response: {\n        timestamp: currentDate,\n        modelId: this.modelId,\n        headers: responseHeaders,\n        body: rawResponse\n      }\n    };\n  }\n};\n\n// src/version.ts\nvar VERSION = true ? \"3.0.23\" : \"0.0.0-test\";\n\n// src/openai-provider.ts\nfunction createOpenAI(options = {}) {\n  var _a, _b;\n  const baseURL = (_a = withoutTrailingSlash(\n    loadOptionalSetting({\n      settingValue: options.baseURL,\n      environmentVariableName: \"OPENAI_BASE_URL\"\n    })\n  )) != null ? _a : \"https://api.openai.com/v1\";\n  const providerName = (_b = options.name) != null ? _b : \"openai\";\n  const getHeaders = () => withUserAgentSuffix(\n    {\n      Authorization: `Bearer ${loadApiKey({\n        apiKey: options.apiKey,\n        environmentVariableName: \"OPENAI_API_KEY\",\n        description: \"OpenAI\"\n      })}`,\n      \"OpenAI-Organization\": options.organization,\n      \"OpenAI-Project\": options.project,\n      ...options.headers\n    },\n    `ai-sdk/openai/${VERSION}`\n  );\n  const createChatModel = (modelId) => new OpenAIChatLanguageModel(modelId, {\n    provider: `${providerName}.chat`,\n    url: ({ path }) => `${baseURL}${path}`,\n    headers: getHeaders,\n    fetch: options.fetch\n  });\n  const createCompletionModel = (modelId) => new OpenAICompletionLanguageModel(modelId, {\n    provider: `${providerName}.completion`,\n    url: ({ path }) => `${baseURL}${path}`,\n    headers: getHeaders,\n    fetch: options.fetch\n  });\n  const createEmbeddingModel = (modelId) => new OpenAIEmbeddingModel(modelId, {\n    provider: `${providerName}.embedding`,\n    url: ({ path }) => `${baseURL}${path}`,\n    headers: getHeaders,\n    fetch: options.fetch\n  });\n  const createImageModel = (modelId) => new OpenAIImageModel(modelId, {\n    provider: `${providerName}.image`,\n    url: ({ path }) => `${baseURL}${path}`,\n    headers: getHeaders,\n    fetch: options.fetch\n  });\n  const createTranscriptionModel = (modelId) => new OpenAITranscriptionModel(modelId, {\n    provider: `${providerName}.transcription`,\n    url: ({ path }) => `${baseURL}${path}`,\n    headers: getHeaders,\n    fetch: options.fetch\n  });\n  const createSpeechModel = (modelId) => new OpenAISpeechModel(modelId, {\n    provider: `${providerName}.speech`,\n    url: ({ path }) => `${baseURL}${path}`,\n    headers: getHeaders,\n    fetch: options.fetch\n  });\n  const createLanguageModel = (modelId) => {\n    if (new.target) {\n      throw new Error(\n        \"The OpenAI model function cannot be called with the new keyword.\"\n      );\n    }\n    return createResponsesModel(modelId);\n  };\n  const createResponsesModel = (modelId) => {\n    return new OpenAIResponsesLanguageModel(modelId, {\n      provider: `${providerName}.responses`,\n      url: ({ path }) => `${baseURL}${path}`,\n      headers: getHeaders,\n      fetch: options.fetch,\n      fileIdPrefixes: [\"file-\"]\n    });\n  };\n  const provider = function(modelId) {\n    return createLanguageModel(modelId);\n  };\n  provider.specificationVersion = \"v3\";\n  provider.languageModel = createLanguageModel;\n  provider.chat = createChatModel;\n  provider.completion = createCompletionModel;\n  provider.responses = createResponsesModel;\n  provider.embedding = createEmbeddingModel;\n  provider.embeddingModel = createEmbeddingModel;\n  provider.textEmbedding = createEmbeddingModel;\n  provider.textEmbeddingModel = createEmbeddingModel;\n  provider.image = createImageModel;\n  provider.imageModel = createImageModel;\n  provider.transcription = createTranscriptionModel;\n  provider.transcriptionModel = createTranscriptionModel;\n  provider.speech = createSpeechModel;\n  provider.speechModel = createSpeechModel;\n  provider.tools = openaiTools;\n  return provider;\n}\nvar openai = createOpenAI();\nexport {\n  VERSION,\n  createOpenAI,\n  openai\n};\n//# sourceMappingURL=index.mjs.map","import { ConfigurationError } from \"./errors-CEDWDXew.js\";\nimport { USER_AGENT } from \"./version-Dl3bNTAd.js\";\nimport { createOpenAI } from \"@ai-sdk/openai\";\n\n//#region src/internal/agents/azure-openai-provider.ts\nconst DEFAULT_OPENAI_MODEL = \"gpt-5\";\nlet configuredBaseUrl;\nfunction setAzureOpenAIBaseUrl(baseUrl) {\n\tconfiguredBaseUrl = baseUrl;\n}\nfunction hasAzureDeploymentPath(baseUrl) {\n\tconst pathname = new URL(baseUrl).pathname.replace(/\\/+$/, \"\");\n\treturn /\\/openai\\/deployments\\/[^/]+$/i.test(pathname);\n}\nfunction hasAzureV1Path(baseUrl) {\n\tconst pathname = new URL(baseUrl).pathname.replace(/\\/+$/, \"\");\n\treturn /\\/openai\\/v1$/i.test(pathname);\n}\nfunction getAzureOpenAIApiSurface() {\n\tif (!configuredBaseUrl) throw new ConfigurationError(\"Provider \\\"azure-openai\\\" requires --openai-base-url to target an Azure OpenAI endpoint.\");\n\tif (hasAzureV1Path(configuredBaseUrl)) return \"responses\";\n\tif (hasAzureDeploymentPath(configuredBaseUrl)) return \"chat-completions\";\n\tthrow new ConfigurationError(\"Provider \\\"azure-openai\\\" requires an Azure v1 base URL ending in /openai/v1 or a deployment URL ending in /openai/deployments/<deployment>.\");\n}\nfunction getAzureOpenAIApiVersion() {\n\tconst apiVersion = process.env.OPENAI_API_VERSION?.trim();\n\treturn apiVersion && apiVersion.length > 0 ? apiVersion : void 0;\n}\nfunction createAzureOpenAIFetch(baseUrl) {\n\tconst apiVersion = getAzureOpenAIApiVersion();\n\tconst shouldAppendApiVersion = apiVersion !== void 0 && hasAzureDeploymentPath(baseUrl);\n\treturn async (input, init) => {\n\t\tconst requestUrl = input instanceof Request ? new URL(input.url) : new URL(input instanceof URL ? input.href : input.toString());\n\t\tif (shouldAppendApiVersion) requestUrl.searchParams.set(\"api-version\", apiVersion);\n\t\tconst headers = new Headers(input instanceof Request ? input.headers : void 0);\n\t\tif (init?.headers) for (const [key, value] of new Headers(init.headers).entries()) headers.set(key, value);\n\t\tif (process.env.OPENAI_API_KEY) headers.set(\"api-key\", process.env.OPENAI_API_KEY);\n\t\tif (input instanceof Request) return fetch(new Request(requestUrl.toString(), input), {\n\t\t\t...init,\n\t\t\theaders\n\t\t});\n\t\treturn fetch(requestUrl.toString(), {\n\t\t\t...init,\n\t\t\theaders\n\t\t});\n\t};\n}\nfunction getAzureOpenAIModel(model) {\n\tif (!configuredBaseUrl) throw new ConfigurationError(\"Provider \\\"azure-openai\\\" requires --openai-base-url to target an Azure OpenAI endpoint.\");\n\tconst apiSurface = getAzureOpenAIApiSurface();\n\tconst modelId = model ?? (process.env.OPENAI_MODEL || DEFAULT_OPENAI_MODEL);\n\tconst factory = createOpenAI({\n\t\tbaseURL: configuredBaseUrl,\n\t\theaders: { \"User-Agent\": USER_AGENT },\n\t\tname: \"azure-openai\",\n\t\tfetch: createAzureOpenAIFetch(configuredBaseUrl)\n\t});\n\tif (apiSurface === \"chat-completions\") return factory.chat(modelId);\n\treturn factory(modelId);\n}\n\n//#endregion\nexport { getAzureOpenAIApiSurface, getAzureOpenAIModel, setAzureOpenAIBaseUrl };\n//# sourceMappingURL=azure-openai-provider-BNAjkBmg.js.map","import { USER_AGENT } from \"./version-Dl3bNTAd.js\";\nimport { createOpenAI } from \"@ai-sdk/openai\";\n\n//#region src/internal/agents/openai-provider.ts\nconst DEFAULT_OPENAI_MODEL = \"gpt-5\";\nlet configuredBaseUrl;\n/**\n* Configure the OpenAI base URL (CLI flag only, not environment variable).\n* This must be called explicitly - it cannot be set via environment variables for security.\n*/\nfunction setOpenAIBaseUrl(baseUrl) {\n\tconfiguredBaseUrl = baseUrl;\n}\n/**\n* Retrieve an OpenAI language model configured from environment variables and explicit config.\n*\n* Works with:\n* - OpenAI API directly (default)\n* - Generic OpenAI-compatible APIs via custom base URL (Vercel AI Gateway, proxies, etc.)\n*\n* Configuration:\n* - OPENAI_API_KEY: API key for authentication (required)\n* - OPENAI_MODEL: Model to use (default: \"gpt-5\") - env var OK\n* - Base URL: Must be set via setOpenAIBaseUrl() - NOT from env vars (security risk)\n*\n* Note: Model name format depends on your provider:\n* - Direct OpenAI: \"gpt-4o\", \"gpt-4-turbo\", etc.\n* - Vercel AI Gateway: \"openai/gpt-4o\", \"anthropic/claude-sonnet-4.5\", etc.\n* - Other providers: Check their documentation\n*\n* Azure-specific endpoint routing lives in the dedicated `azure-openai`\n* provider so generic OpenAI-compatible endpoints keep predictable behavior.\n*/\nfunction getOpenAIModel(model) {\n\tconst defaultModel = process.env.OPENAI_MODEL || DEFAULT_OPENAI_MODEL;\n\tconst factory = createOpenAI({\n\t\t...configuredBaseUrl && { baseURL: configuredBaseUrl },\n\t\theaders: { \"User-Agent\": USER_AGENT }\n\t});\n\treturn factory(model ?? defaultModel);\n}\n\n//#endregion\nexport { getOpenAIModel, setOpenAIBaseUrl };\n//# sourceMappingURL=openai-provider-DK3FdwQ_.js.map","import { ConfigurationError } from \"./errors-CEDWDXew.js\";\nimport { USER_AGENT } from \"./version-Dl3bNTAd.js\";\nimport { createOpenAI } from \"@ai-sdk/openai\";\n\n//#region src/internal/agents/openrouter-provider.ts\nconst DEFAULT_OPENROUTER_MODEL = \"openai/gpt-5.6-luna\";\nconst DEFAULT_OPENROUTER_REASONING_EFFORT = \"high\";\nconst OPENROUTER_BASE_URL = \"https://openrouter.ai/api/v1\";\nconst OPENROUTER_REASONING_EFFORTS = [\n\t\"none\",\n\t\"minimal\",\n\t\"low\",\n\t\"medium\",\n\t\"high\",\n\t\"xhigh\"\n];\nconst OPENROUTER_REASONING_EFFORT_ALIASES = Object.assign(Object.create(null), { max: \"xhigh\" });\nfunction resolveOpenRouterReasoningEffort(value) {\n\tif (value === void 0) return DEFAULT_OPENROUTER_REASONING_EFFORT;\n\tif (value === \"\") return void 0;\n\tconst normalized = value.trim().toLowerCase();\n\tif (Object.hasOwn(OPENROUTER_REASONING_EFFORT_ALIASES, normalized)) return OPENROUTER_REASONING_EFFORT_ALIASES[normalized];\n\tif (OPENROUTER_REASONING_EFFORTS.includes(normalized)) return normalized;\n\tthrow new ConfigurationError(`Invalid OPENROUTER_REASONING_EFFORT \"${value}\". Expected one of: ${OPENROUTER_REASONING_EFFORTS.join(\", \")}, max (alias for xhigh), or \"\" to omit.`);\n}\n/**\n* Builds an OpenRouter chat-completions model for embedded agent calls.\n*/\nfunction getOpenRouterModel(model) {\n\tconst factory = createOpenAI({\n\t\tapiKey: process.env.OPENROUTER_API_KEY,\n\t\tbaseURL: OPENROUTER_BASE_URL,\n\t\theaders: {\n\t\t\t\"User-Agent\": USER_AGENT,\n\t\t\t\"HTTP-Referer\": \"https://github.com/getsentry/sentry-mcp\",\n\t\t\t\"X-OpenRouter-Title\": \"Sentry MCP\"\n\t\t}\n\t});\n\treturn factory.chat(model ?? process.env.OPENROUTER_MODEL ?? DEFAULT_OPENROUTER_MODEL);\n}\n/**\n* Provider options for OpenRouter chat-completions calls.\n*\n* Uses the OpenAI chat provider options shape because OpenRouter is accessed\n* through `@ai-sdk/openai` with an OpenRouter base URL.\n*/\nfunction getOpenRouterProviderOptions() {\n\tconst reasoningEffort = resolveOpenRouterReasoningEffort(process.env.OPENROUTER_REASONING_EFFORT);\n\treturn { openai: {\n\t\tstructuredOutputs: false,\n\t\tstrictJsonSchema: false,\n\t\t...reasoningEffort ? { reasoningEffort } : {}\n\t} };\n}\n\n//#endregion\nexport { getOpenRouterModel, getOpenRouterProviderOptions };\n//# sourceMappingURL=openrouter-provider-JT8w8qQ6.js.map","import { ConfigurationError } from \"./errors-CEDWDXew.js\";\nimport { getAnthropicModel, setAnthropicBaseUrl } from \"./anthropic-provider-CRd6GA4E.js\";\nimport { getAzureOpenAIApiSurface, getAzureOpenAIModel, setAzureOpenAIBaseUrl } from \"./azure-openai-provider-BNAjkBmg.js\";\nimport { getOpenAIModel, setOpenAIBaseUrl } from \"./openai-provider-DK3FdwQ_.js\";\nimport { getOpenRouterModel, getOpenRouterProviderOptions } from \"./openrouter-provider-JT8w8qQ6.js\";\n\n//#region src/internal/agents/provider-factory.ts\nlet configuredProvider;\n/**\n* Configure the embedded agent provider explicitly.\n* Call this from CLI to override auto-detection.\n*/\nfunction setAgentProvider(provider) {\n\tconfiguredProvider = provider;\n}\n/**\n* Configure base URLs for providers (called from CLI).\n*/\nfunction setProviderBaseUrls(config) {\n\tsetOpenAIBaseUrl(config.openaiBaseUrl);\n\tsetAzureOpenAIBaseUrl(config.openaiBaseUrl);\n\tsetAnthropicBaseUrl(config.anthropicBaseUrl);\n}\n/**\n* Check if both API keys are present, indicating a conflict.\n*/\nfunction detectProviderConflict() {\n\treturn [\n\t\tprocess.env.ANTHROPIC_API_KEY,\n\t\tprocess.env.OPENAI_API_KEY,\n\t\tprocess.env.OPENROUTER_API_KEY\n\t].filter(Boolean).length > 1;\n}\n/**\n* Check if the API key exists for a given provider type.\n*/\nfunction hasApiKeyForProvider(type) {\n\tswitch (type) {\n\t\tcase \"anthropic\": return Boolean(process.env.ANTHROPIC_API_KEY);\n\t\tcase \"openai\":\n\t\tcase \"azure-openai\": return Boolean(process.env.OPENAI_API_KEY);\n\t\tcase \"openrouter\": return Boolean(process.env.OPENROUTER_API_KEY);\n\t}\n}\n/**\n* Get the expected API key name for a provider type.\n*/\nfunction getApiKeyName(type) {\n\tswitch (type) {\n\t\tcase \"anthropic\": return \"ANTHROPIC_API_KEY\";\n\t\tcase \"openai\":\n\t\tcase \"azure-openai\": return \"OPENAI_API_KEY\";\n\t\tcase \"openrouter\": return \"OPENROUTER_API_KEY\";\n\t}\n}\n/**\n* Build a provider instance for the given type.\n*/\nfunction buildProvider(type) {\n\tswitch (type) {\n\t\tcase \"anthropic\": return {\n\t\t\ttype: \"anthropic\",\n\t\t\tlabel: \"anthropic\",\n\t\t\tgetModel: getAnthropicModel,\n\t\t\tgetProviderOptions: () => ({})\n\t\t};\n\t\tcase \"openai\": return {\n\t\t\ttype: \"openai\",\n\t\t\tlabel: \"openai responses API\",\n\t\t\tgetModel: getOpenAIModel,\n\t\t\tgetProviderOptions: () => ({ openai: {\n\t\t\t\tstructuredOutputs: false,\n\t\t\t\tstrictJsonSchema: false\n\t\t\t} })\n\t\t};\n\t\tcase \"azure-openai\": {\n\t\t\tconst apiSurface = getAzureOpenAIApiSurface();\n\t\t\treturn {\n\t\t\t\ttype: \"azure-openai\",\n\t\t\t\tlabel: `azure-openai ${apiSurface === \"chat-completions\" ? \"chat completions\" : \"responses\"} API`,\n\t\t\t\tgetModel: getAzureOpenAIModel,\n\t\t\t\tgetProviderOptions: () => ({ openai: {\n\t\t\t\t\tstructuredOutputs: false,\n\t\t\t\t\tstrictJsonSchema: false\n\t\t\t\t} })\n\t\t\t};\n\t\t}\n\t\tcase \"openrouter\": return {\n\t\t\ttype: \"openrouter\",\n\t\t\tlabel: \"openrouter\",\n\t\t\tgetModel: getOpenRouterModel,\n\t\t\tgetProviderOptions: getOpenRouterProviderOptions\n\t\t};\n\t}\n}\n/**\n* Resolve provider type from configuration and environment.\n* Returns undefined if no provider can be resolved or if there's a conflict.\n*/\nfunction resolveProviderType() {\n\tif (configuredProvider) return configuredProvider;\n\tconst envProvider = process.env.EMBEDDED_AGENT_PROVIDER?.toLowerCase();\n\tif (envProvider === \"openai\" || envProvider === \"azure-openai\" || envProvider === \"anthropic\" || envProvider === \"openrouter\") return envProvider;\n\tif (detectProviderConflict()) return void 0;\n\tif (process.env.ANTHROPIC_API_KEY) return \"anthropic\";\n\tif (process.env.OPENAI_API_KEY) return \"openai\";\n\tif (process.env.OPENROUTER_API_KEY) return \"openrouter\";\n\treturn void 0;\n}\n/**\n* Get the current agent provider based on configuration.\n*\n* Resolution order:\n* 1. Explicit configuration via setAgentProvider()\n* 2. EMBEDDED_AGENT_PROVIDER environment variable\n* 3. Detect conflicts when both API keys are present\n* 4. Auto-detect: check ANTHROPIC_API_KEY, then OPENAI_API_KEY\n* 5. Throw ConfigurationError if no provider available\n*/\nfunction getAgentProvider() {\n\tconst providerType = resolveProviderType();\n\tif (providerType && !hasApiKeyForProvider(providerType)) throw new ConfigurationError(`Provider \"${providerType}\" is configured but ${getApiKeyName(providerType)} is not set. Please set the API key environment variable.`);\n\tif (!providerType && detectProviderConflict()) throw new ConfigurationError(\"Multiple LLM API keys are set. Please specify which provider to use by setting the EMBEDDED_AGENT_PROVIDER environment variable to 'openai', 'azure-openai', 'anthropic', or 'openrouter'.\");\n\tif (!providerType) throw new ConfigurationError(\"No embedded agent provider configured. Set OPENAI_API_KEY, ANTHROPIC_API_KEY, or OPENROUTER_API_KEY environment variable, or use --agent-provider flag to specify a provider.\");\n\treturn buildProvider(providerType);\n}\n/**\n* Check if an embedded agent provider is available.\n* Returns true if getAgentProvider() would succeed.\n*/\nfunction hasAgentProvider() {\n\ttry {\n\t\tgetAgentProvider();\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n/**\n* Get the resolved provider type without throwing.\n* Returns undefined if no provider is available, API key is missing, or both API keys are present without explicit selection.\n*/\nfunction getResolvedProviderType() {\n\ttry {\n\t\treturn getAgentProvider().type;\n\t} catch {\n\t\treturn void 0;\n\t}\n}\n\n//#endregion\nexport { getAgentProvider, getResolvedProviderType, hasAgentProvider, setAgentProvider, setProviderBaseUrls };\n//# sourceMappingURL=provider-factory-Cs_2DBhe.js.map","import { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\n\n//#region src/internal/tool-helpers/resolve-region-url.ts\nconst regionUrlCache = /* @__PURE__ */ new WeakMap();\nfunction getRegionUrlCache(context) {\n\tlet cache = regionUrlCache.get(context);\n\tif (!cache) {\n\t\tcache = /* @__PURE__ */ new Map();\n\t\tregionUrlCache.set(context, cache);\n\t}\n\treturn cache;\n}\n/**\n* Resolves which regional Sentry API host to use for organization-scoped calls.\n* Uses the explicit `regionUrl` argument when set; otherwise prefers the\n* scoped value already present on `context.constraints`, then lazily fetches\n* and caches the org metadata for repeated lookups within the same context.\n*/\nasync function resolveRegionUrlForOrganization({ context, organizationSlug, regionUrl }) {\n\tif (typeof regionUrl === \"string\") {\n\t\tconst trimmed = regionUrl.trim();\n\t\treturn trimmed || null;\n\t}\n\tif (context.constraints.organizationSlug === organizationSlug) {\n\t\tconst scopedRegionUrl = context.constraints.regionUrl?.trim();\n\t\tif (scopedRegionUrl) return scopedRegionUrl;\n\t}\n\tconst normalizedOrganizationSlug = organizationSlug.trim();\n\tconst cache = getRegionUrlCache(context);\n\tif (cache.has(normalizedOrganizationSlug)) return cache.get(normalizedOrganizationSlug) ?? null;\n\ttry {\n\t\tconst organization = await apiServiceFromContext(context).getOrganization(normalizedOrganizationSlug);\n\t\tconst resolvedRegionUrl = organization.links?.regionUrl?.trim() || null;\n\t\tcache.set(normalizedOrganizationSlug, resolvedRegionUrl);\n\t\treturn resolvedRegionUrl;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n//#endregion\nexport { resolveRegionUrlForOrganization };\n//# sourceMappingURL=resolve-region-url-DutLwiPb.js.map","//#region src/tools/support/traces/semantic-display.ts\nconst SPAN_LABEL_MAX_LENGTH = 160;\nconst SPAN_METADATA_MAX_LENGTH = 64;\nconst SPAN_ATTRIBUTE_MAX_LENGTH = 2048;\nconst SEMANTIC_SPAN_FORMATTERS = [\n\tformatMcpSpanDisplay,\n\tformatHttpSpanDisplay,\n\tformatGenAiSpanDisplay,\n\tformatDatabaseSpanDisplay,\n\tformatGraphqlSpanDisplay,\n\tformatObjectStoreSpanDisplay,\n\tformatRpcSpanDisplay,\n\tformatMessagingSpanDisplay,\n\tformatCloudEventsSpanDisplay,\n\tformatFaasSpanDisplay,\n\tformatCicdSpanDisplay,\n\tformatFeatureFlagSpanDisplay,\n\tformatProcessSpanDisplay,\n\tformatExceptionSpanDisplay,\n\tformatErrorSpanDisplay\n];\nfunction formatSemanticSpanDisplay(span) {\n\tconst fallbackLabel = formatFallbackSpanLabel(span);\n\tlet display = {\n\t\tlabel: fallbackLabel,\n\t\tmetadata: []\n\t};\n\tfor (const formatter of SEMANTIC_SPAN_FORMATTERS) {\n\t\tconst semanticDisplay = formatter(span, fallbackLabel);\n\t\tif (semanticDisplay) {\n\t\t\tdisplay = semanticDisplay;\n\t\t\tbreak;\n\t\t}\n\t}\n\tconst label = formatDisplayPart(display.label, SPAN_LABEL_MAX_LENGTH);\n\treturn {\n\t\tlabel: label || \"unnamed\",\n\t\tmetadata: formatSemanticMetadata(display.metadata)\n\t};\n}\nfunction formatHttpSpanDisplay(span, fallbackLabel) {\n\tconst method = getSpanAttributeString(span, [\"http.request.method\"])?.toUpperCase();\n\tconst statusCode = getSpanAttributeString(span, [\"http.response.status_code\"]);\n\tconst target = getHttpTarget(span, { includeServerTarget: Boolean(method || statusCode) });\n\tconst errorType = getErrorType(span);\n\tif (!method && !target && !statusCode) return null;\n\tconst label = formatHttpLabel({\n\t\tmethod,\n\t\ttarget,\n\t\tfallbackLabel\n\t});\n\treturn {\n\t\tlabel: label || fallbackLabel,\n\t\tmetadata: compactStrings([statusCode, errorType])\n\t};\n}\nfunction formatGenAiSpanDisplay(span, fallbackLabel) {\n\tconst operation = getSpanAttributeString(span, [\"gen_ai.operation.name\"]);\n\tconst toolName = getSpanAttributeString(span, [\"gen_ai.tool.name\"]);\n\tconst agentName = getSpanAttributeString(span, [\"gen_ai.agent.name\"]);\n\tconst model = getGenAiModelIdentifier(span);\n\tconst dataSourceId = getSpanAttributeString(span, [\"gen_ai.data_source.id\"]);\n\tconst errorType = getErrorType(span);\n\tif (!operation && !toolName && !agentName && !model && !dataSourceId) return null;\n\tconst subject = toolName ?? agentName ?? model ?? dataSourceId;\n\tconst label = operation ? formatOperationLabel(operation, subject) : subject || fallbackLabel;\n\treturn {\n\t\tlabel,\n\t\tmetadata: compactStrings([subject === model ? void 0 : model, errorType])\n\t};\n}\nfunction formatMcpSpanDisplay(span, fallbackLabel) {\n\tconst method = getSpanAttributeString(span, [\"mcp.method.name\"]);\n\tconst resourceUri = getSpanAttributeString(span, [\"mcp.resource.uri\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tconst target = getSpanAttributeString(span, [\"gen_ai.tool.name\", \"gen_ai.prompt.name\"]) ?? formatResourceTarget(resourceUri);\n\tconst statusCode = getSpanAttributeString(span, [\"rpc.response.status_code\"]);\n\tconst errorType = getErrorType(span);\n\tif (!method && !resourceUri) return null;\n\treturn {\n\t\tlabel: joinDisplayParts([method, target]) || fallbackLabel,\n\t\tmetadata: compactStrings([statusCode, errorType])\n\t};\n}\nfunction formatDatabaseSpanDisplay(span, fallbackLabel) {\n\tconst dbSystem = getSpanAttributeString(span, [\"db.system.name\"]);\n\tconst querySummary = getSpanAttributeString(span, [\"db.query.summary\"]);\n\tconst operationName = getSpanAttributeString(span, [\"db.operation.name\"]);\n\tconst target = getSpanAttributeString(span, [\"db.collection.name\", \"db.namespace\"]) ?? getServerTarget(span);\n\tconst storedProcedure = getSpanAttributeString(span, [\"db.stored_procedure.name\"]);\n\tconst queryText = getSpanAttributeString(span, [\"db.query.text\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tif (!dbSystem && !querySummary && !operationName && !target && !storedProcedure && !queryText) return null;\n\tconst label = querySummary ?? (storedProcedure ? `CALL ${storedProcedure}` : void 0) ?? (joinDisplayParts([operationName, target]) || void 0) ?? formatDbQueryText(queryText) ?? fallbackLabel;\n\tconst statusCode = getSpanAttributeString(span, [\"db.response.status_code\"]);\n\tconst errorType = getErrorType(span);\n\treturn {\n\t\tlabel,\n\t\tmetadata: compactStrings([\n\t\t\tdbSystem,\n\t\t\tstatusCode,\n\t\t\terrorType\n\t\t])\n\t};\n}\nfunction formatGraphqlSpanDisplay(span, fallbackLabel) {\n\tconst operationType = getSpanAttributeString(span, [\"graphql.operation.type\"]);\n\tconst operationName = getSpanAttributeString(span, [\"graphql.operation.name\"]);\n\tconst document = getSpanAttributeString(span, [\"graphql.document\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tif (!operationType && !operationName && !document) return null;\n\treturn {\n\t\tlabel: joinDisplayParts([operationType, operationName]) || formatDisplayPart(document, SPAN_LABEL_MAX_LENGTH) || fallbackLabel,\n\t\tmetadata: []\n\t};\n}\nfunction formatRpcSpanDisplay(span, fallbackLabel) {\n\tconst rpcSystem = getSpanAttributeString(span, [\"rpc.system.name\"]);\n\tconst service = getSpanAttributeString(span, [\"rpc.service\"]);\n\tconst method = getSpanAttributeString(span, [\"rpc.method\"]);\n\tconst statusCode = getSpanAttributeString(span, [\"rpc.response.status_code\"]);\n\tconst region = getSpanAttributeString(span, [\"cloud.region\"]);\n\tconst errorType = getErrorType(span);\n\tif (!rpcSystem && !service && !method && !statusCode) return null;\n\tconst methodLabel = service && method ? `${service}/${method}` : method || service;\n\treturn {\n\t\tlabel: methodLabel || fallbackLabel,\n\t\tmetadata: compactStrings([\n\t\t\trpcSystem,\n\t\t\tstatusCode,\n\t\t\tregion,\n\t\t\terrorType\n\t\t])\n\t};\n}\nfunction formatMessagingSpanDisplay(span, fallbackLabel) {\n\tconst messagingSystem = getSpanAttributeString(span, [\"messaging.system\"]);\n\tconst operation = getSpanAttributeString(span, [\"messaging.operation.name\", \"messaging.operation.type\"]);\n\tconst destination = getSpanAttributeString(span, [\n\t\t\"messaging.destination.template\",\n\t\t\"messaging.destination.name\",\n\t\t\"messaging.destination.subscription.name\"\n\t]);\n\tconst consumerGroup = getSpanAttributeString(span, [\"messaging.consumer.group.name\"]);\n\tconst messageCount = getSpanAttributeString(span, [\"messaging.batch.message_count\"]);\n\tconst errorType = getErrorType(span);\n\tif (!messagingSystem && !operation && !destination) return null;\n\treturn {\n\t\tlabel: joinDisplayParts([operation, destination]) || fallbackLabel,\n\t\tmetadata: compactStrings([\n\t\t\tmessagingSystem,\n\t\t\tconsumerGroup,\n\t\t\tmessageCount ? `messages:${messageCount}` : void 0,\n\t\t\terrorType\n\t\t])\n\t};\n}\nfunction formatFaasSpanDisplay(span, fallbackLabel) {\n\tconst trigger = getSpanAttributeString(span, [\"faas.trigger\"]);\n\tconst name = getSpanAttributeString(span, [\"faas.invoked_name\", \"faas.name\"]);\n\tconst provider = getSpanAttributeString(span, [\"faas.invoked_provider\"]);\n\tconst region = getSpanAttributeString(span, [\"faas.invoked_region\"]);\n\tconst coldStart = getSpanAttributeString(span, [\"faas.coldstart\"]);\n\tconst documentOperation = getSpanAttributeString(span, [\"faas.document.operation\"]);\n\tconst documentTarget = getSpanAttributeString(span, [\"faas.document.collection\", \"faas.document.name\"]);\n\tconst cron = getSpanAttributeString(span, [\"faas.cron\"]);\n\tconst errorType = getErrorType(span);\n\tconst isColdStart = coldStart === \"true\";\n\tif (!trigger && !name && !provider && !region && !isColdStart && !documentOperation && !documentTarget && !cron) return null;\n\treturn {\n\t\tlabel: joinDisplayParts([\n\t\t\ttrigger,\n\t\t\tname,\n\t\t\tjoinDisplayParts([documentOperation, documentTarget]) || cron\n\t\t]) || fallbackLabel,\n\t\tmetadata: compactStrings([\n\t\t\tprovider,\n\t\t\tregion,\n\t\t\tisColdStart ? \"coldstart\" : void 0,\n\t\t\terrorType\n\t\t])\n\t};\n}\nfunction formatProcessSpanDisplay(span, fallbackLabel) {\n\tconst command = getSpanAttributeString(span, [\"process.executable.name\", \"process.command\"]);\n\tconst exitCode = getSpanAttributeString(span, [\"process.exit.code\"]);\n\tconst errorType = getErrorType(span);\n\tif (!command && !exitCode) return null;\n\treturn {\n\t\tlabel: command || fallbackLabel,\n\t\tmetadata: compactStrings([exitCode ? `exit:${exitCode}` : void 0, errorType])\n\t};\n}\nfunction formatObjectStoreSpanDisplay(span, fallbackLabel) {\n\tconst bucket = getSpanAttributeString(span, [\"aws.s3.bucket\"]);\n\tconst key = getSpanAttributeString(span, [\"aws.s3.key\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tconst copySource = getSpanAttributeString(span, [\"aws.s3.copy_source\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tconst operation = getSpanAttributeString(span, [\"rpc.method\"]);\n\tconst region = getSpanAttributeString(span, [\"cloud.region\"]);\n\tconst errorType = getErrorType(span);\n\tconst target = formatObjectStoreTarget(bucket, key) ?? formatDisplayPart(copySource, SPAN_LABEL_MAX_LENGTH);\n\tif (!bucket && !key && !copySource) return null;\n\treturn {\n\t\tlabel: joinDisplayParts([operation, target]) || fallbackLabel,\n\t\tmetadata: compactStrings([region, errorType])\n\t};\n}\nfunction formatCloudEventsSpanDisplay(span, fallbackLabel) {\n\tconst eventType = getSpanAttributeString(span, [\"cloudevents.event_type\"]);\n\tconst eventSubject = getSpanAttributeString(span, [\"cloudevents.event_subject\"]);\n\tconst eventSource = getSpanAttributeString(span, [\"cloudevents.event_source\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tconst specVersion = getSpanAttributeString(span, [\"cloudevents.event_spec_version\"]);\n\tif (!eventType && !eventSubject && !eventSource && !specVersion) return null;\n\treturn {\n\t\tlabel: joinDisplayParts([eventType, eventSubject ?? formatResourceTarget(eventSource)]) || fallbackLabel,\n\t\tmetadata: specVersion ? [`cloudevents:${specVersion}`] : []\n\t};\n}\nfunction formatCicdSpanDisplay(span, fallbackLabel) {\n\tconst action = getSpanAttributeString(span, [\"cicd.pipeline.action.name\"]);\n\tconst pipeline = getSpanAttributeString(span, [\"cicd.pipeline.name\"]);\n\tconst pipelineResult = getSpanAttributeString(span, [\"cicd.pipeline.result\"]);\n\tconst taskName = getSpanAttributeString(span, [\"cicd.pipeline.task.name\"]);\n\tconst taskResult = getSpanAttributeString(span, [\"cicd.pipeline.task.run.result\"]);\n\tconst errorType = getErrorType(span);\n\tif (!action && !pipeline && !pipelineResult && !taskName && !taskResult) return null;\n\treturn {\n\t\tlabel: joinDisplayParts([action, pipeline]) || taskName || fallbackLabel,\n\t\tmetadata: compactStrings([\n\t\t\tpipelineResult,\n\t\t\ttaskResult,\n\t\t\terrorType\n\t\t])\n\t};\n}\nfunction formatFeatureFlagSpanDisplay(span, fallbackLabel) {\n\tconst flagKey = getSpanAttributeString(span, [\"feature_flag.key\"]);\n\tconst variant = getSpanAttributeString(span, [\"feature_flag.result.variant\"]);\n\tconst value = getSpanAttributeString(span, [\"feature_flag.result.value\"]);\n\tconst provider = getSpanAttributeString(span, [\"feature_flag.provider.name\"]);\n\tconst reason = getSpanAttributeString(span, [\"feature_flag.result.reason\"]);\n\tconst errorType = getErrorType(span);\n\tif (!flagKey && !variant && !value && !provider && !reason) return null;\n\treturn {\n\t\tlabel: joinDisplayParts([flagKey, variant ?? value]) || fallbackLabel,\n\t\tmetadata: compactStrings([\n\t\t\tprovider,\n\t\t\treason,\n\t\t\terrorType\n\t\t])\n\t};\n}\nfunction formatExceptionSpanDisplay(span, fallbackLabel) {\n\tconst exceptionType = getSpanAttributeString(span, [\"exception.type\"]);\n\tconst exceptionMessage = getSpanAttributeString(span, [\"exception.message\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tif (!exceptionType && !exceptionMessage) return null;\n\tconst label = fallbackLabel === \"unnamed\" ? exceptionType || exceptionMessage || fallbackLabel : fallbackLabel;\n\tconst metadata = fallbackLabel === \"unnamed\" ? [] : compactStrings([exceptionType, exceptionType ? void 0 : exceptionMessage]);\n\treturn {\n\t\tlabel,\n\t\tmetadata\n\t};\n}\nfunction formatErrorSpanDisplay(span, fallbackLabel) {\n\tconst errorType = getErrorType(span);\n\tif (!errorType) return null;\n\treturn {\n\t\tlabel: fallbackLabel,\n\t\tmetadata: [errorType]\n\t};\n}\nfunction getGenAiModelIdentifier(span) {\n\tconst provider = getSpanAttributeString(span, [\"gen_ai.provider.name\"]);\n\tconst model = getSpanAttributeString(span, [\"gen_ai.response.model\", \"gen_ai.request.model\"]);\n\tif (!model) return provider;\n\tif (!provider || model.includes(\"/\")) return model;\n\treturn `${provider}/${model}`;\n}\nfunction getHttpTarget(span, { includeServerTarget = false } = {}) {\n\tconst route = getSpanAttributeString(span, [\"http.route\", \"url.template\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tconst fullUrl = getSpanAttributeString(span, [\"url.full\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tconst path = getSpanAttributeString(span, [\"url.path\"], SPAN_ATTRIBUTE_MAX_LENGTH);\n\tconst serverTarget = getServerTarget(span);\n\tif (route) return formatHttpTarget(route);\n\tif (fullUrl) return formatHttpTarget(fullUrl);\n\tif (path) return formatHttpTarget(path);\n\tif (includeServerTarget && serverTarget) return formatHttpTarget(serverTarget);\n\treturn void 0;\n}\nfunction getServerTarget(span) {\n\tconst serverAddress = getSpanAttributeString(span, [\"server.address\"]);\n\tconst serverPort = getSpanAttributeString(span, [\"server.port\"]);\n\tif (!serverAddress) return void 0;\n\treturn formatServerAddress(serverAddress, serverPort);\n}\nfunction formatHttpLabel({ method, target, fallbackLabel }) {\n\tif (method && target) return joinDisplayParts([method, target]);\n\tif (target) return target;\n\tconst normalizedFallbackLabel = fallbackLabel.toUpperCase();\n\tif (method && normalizedFallbackLabel !== method && fallbackLabel !== \"unnamed\") return normalizedFallbackLabel.startsWith(`${method} `) ? fallbackLabel : joinDisplayParts([method, fallbackLabel]);\n\treturn method || fallbackLabel;\n}\nfunction formatServerAddress(address, port) {\n\tif (!port || address.includes(\":\")) return address;\n\treturn `${address}:${port}`;\n}\nfunction formatObjectStoreTarget(bucket, key) {\n\tif (bucket && key) return formatDisplayPart(`${bucket}/${key}`, SPAN_LABEL_MAX_LENGTH);\n\treturn bucket ?? formatDisplayPart(key, SPAN_LABEL_MAX_LENGTH);\n}\nfunction formatHttpTarget(value) {\n\tconst trimmed = value.trim();\n\tif (!/^[a-z][a-z0-9+.-]*:\\/\\//i.test(trimmed)) {\n\t\tconst withoutFragment = trimmed.split(\"#\", 1)[0];\n\t\treturn withoutFragment.split(\"?\", 1)[0];\n\t}\n\ttry {\n\t\tconst url = new URL(trimmed);\n\t\tconst path = url.pathname === \"/\" ? \"\" : url.pathname;\n\t\treturn `${url.host}${path}`;\n\t} catch {\n\t\tconst withoutFragment = trimmed.split(\"#\", 1)[0];\n\t\treturn withoutFragment.split(\"?\", 1)[0];\n\t}\n}\nfunction formatOperationLabel(operation, subject) {\n\tif (subject) return `${operation} ${subject}`;\n\treturn operation;\n}\nfunction joinDisplayParts(values) {\n\treturn compactStrings(values).join(\" \");\n}\nfunction compactStrings(values) {\n\treturn values.filter((value) => Boolean(value));\n}\nfunction formatDbQueryText(value) {\n\tif (!value) return void 0;\n\treturn formatDisplayPart(value.replace(/'([^']|'')*'/g, \"?\").replace(/\\b\\d+(\\.\\d+)?\\b/g, \"?\"), SPAN_LABEL_MAX_LENGTH);\n}\nfunction formatResourceTarget(value) {\n\tif (!value) return void 0;\n\treturn formatDisplayPart(value.split(\"?\", 1)[0], SPAN_LABEL_MAX_LENGTH);\n}\nfunction formatFallbackSpanLabel(span) {\n\treturn formatDisplayPart(span.name, SPAN_LABEL_MAX_LENGTH) || formatDisplayPart(span.description, SPAN_LABEL_MAX_LENGTH) || formatDisplayPart(span.transaction, SPAN_LABEL_MAX_LENGTH) || \"unnamed\";\n}\nfunction getSpanAttributeString(span, keys, maxLength = SPAN_METADATA_MAX_LENGTH) {\n\tfor (const key of keys) for (const source of getSpanAttributeSources(span)) if (Object.prototype.hasOwnProperty.call(source, key)) {\n\t\tconst value = formatDisplayPart(source[key], maxLength);\n\t\tif (value) return value;\n\t}\n\treturn void 0;\n}\nfunction getSpanAttributeSources(span) {\n\treturn [\n\t\ttoRecord(span.additional_attributes),\n\t\ttoRecord(span.data),\n\t\ttoRecord(span.tags)\n\t].filter((source) => source !== void 0);\n}\nfunction toRecord(value) {\n\tif (value === null || typeof value !== \"object\" || Array.isArray(value)) return void 0;\n\treturn value;\n}\nfunction getErrorType(span) {\n\treturn getSpanAttributeString(span, [\"error.type\"]);\n}\nfunction formatSemanticMetadata(values) {\n\tconst metadata = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const value of values) {\n\t\tconst displayValue = formatDisplayPart(value, SPAN_METADATA_MAX_LENGTH);\n\t\tif (!displayValue) continue;\n\t\tconst key = displayValue.toLowerCase();\n\t\tif (seen.has(key)) continue;\n\t\tseen.add(key);\n\t\tmetadata.push(displayValue);\n\t}\n\treturn metadata;\n}\nfunction formatDisplayPart(value, maxLength) {\n\tlet text;\n\tif (typeof value === \"string\") text = value;\n\telse if (typeof value === \"number\" || typeof value === \"boolean\") text = String(value);\n\tconst normalized = text?.replace(/\\s+/g, \" \").trim();\n\tif (!normalized) return void 0;\n\tif (normalized.length <= maxLength) return normalized;\n\treturn `${normalized.slice(0, maxLength - 3)}...`;\n}\n\n//#endregion\nexport { formatSemanticSpanDisplay };\n//# sourceMappingURL=semantic-display-Zyyjp_BY.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl, ParamSpanId, ParamTraceId } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { addAIConversationSuggestedActions, formatAIConversationActionInstructions } from \"./ai-conversation-actions-rbKawWyG.js\";\nimport { hasAgentProvider } from \"./provider-factory-Cs_2DBhe.js\";\nimport { resolveRegionUrlForOrganization } from \"./resolve-region-url-DutLwiPb.js\";\nimport { formatSemanticSpanDisplay } from \"./semantic-display-Zyyjp_BY.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-trace-details.ts\nconst MAX_TRACE_FETCH_LIMIT = 1e3;\nconst MAX_FOCUSED_TRACE_FETCH_LIMIT = 1e4;\nconst MIN_TRACE_FETCH_LIMIT = 50;\nconst MAX_DEPTH = 8;\nconst MAX_ROOT_SPANS = 12;\nconst MAX_OVERVIEW_SPANS = 96;\nconst MAX_FOCUSED_CHILD_SPANS = 40;\nconst MAX_QUEUED_CHILDREN_PER_PARENT = 24;\nconst MINIMUM_DURATION_THRESHOLD_MS = 10;\nconst MIN_AVG_DURATION_MS = 5;\nconst MAX_AI_CONVERSATION_REFERENCES = 3;\nvar get_trace_details_default = defineTool({\n\tname: \"get_trace_details\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"event:read\"],\n\trequiredCapabilities: [\"traces\"],\n\tdescription: [\n\t\t\"Get detailed information about a specific Sentry trace by ID.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS:\",\n\t\t\"- Provide a specific trace ID (e.g., 'a4d1aae7216b47ff8117cf4e09ce9d0a')\",\n\t\t\"- Ask to 'show me trace [TRACE-ID]', 'explain trace [TRACE-ID]'\",\n\t\t\"- Want high-level overview and link to view trace details in Sentry\",\n\t\t\"- Need trace statistics and span breakdown\",\n\t\t\"- Want an overview first, then a guided pivot into additional spans or events\",\n\t\t\"\",\n\t\t\"DO NOT USE for:\",\n\t\t\"- General searching for traces (use search_events with trace queries)\",\n\t\t\"- Complete span enumeration or branch-by-branch reconstruction (use search_events scoped to the trace)\",\n\t\t\"\",\n\t\t\"TRIGGER PATTERNS:\",\n\t\t\"- 'Show me trace abc123' → use get_trace_details\",\n\t\t\"- 'Explain trace a4d1aae7216b47ff8117cf4e09ce9d0a' → use get_trace_details\",\n\t\t\"- 'What is trace [trace-id]' → use get_trace_details\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Get trace overview\",\n\t\t\"```\",\n\t\t\"get_trace_details(organizationSlug='my-organization', traceId='a4d1aae7216b47ff8117cf4e09ce9d0a')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Focus a single span\",\n\t\t\"```\",\n\t\t\"get_trace_details(organizationSlug='my-organization', traceId='a4d1aae7216b47ff8117cf4e09ce9d0a', spanId='aa8e7f3384ef4ff5')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Trace IDs are 32-character hexadecimal strings\",\n\t\t\"- This returns a condensed trace overview, not a full span dump\",\n\t\t\"- Provide `spanId` to focus on a single span within the trace\",\n\t\t\"- If the response says it shows a subset of spans, use search_events to inspect the rest of the trace\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\ttraceId: ParamTraceId,\n\t\tspanId: ParamSpanId.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tif (!/^[0-9a-fA-F]{32}$/.test(params.traceId)) throw new UserInputError(\"Trace ID must be a 32-character hexadecimal string\");\n\t\tconst regionUrl = await resolveRegionUrlForOrganization({\n\t\t\tcontext,\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tregionUrl: params.regionUrl\n\t\t});\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tsetTag(\"trace.id\", params.traceId);\n\t\tif (params.spanId) setTag(\"trace.span_id\", params.spanId);\n\t\tif (context.constraints.projectSlug) setTag(\"project.slug\", context.constraints.projectSlug);\n\t\tconst traceMeta = await apiService.getTraceMeta({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\ttraceId: params.traceId,\n\t\t\tstatsPeriod: \"14d\"\n\t\t});\n\t\tconst traceFetchLimit = getTraceFetchLimit(traceMeta.span_count, traceMeta.errors, params.spanId ? MAX_FOCUSED_TRACE_FETCH_LIMIT : MAX_TRACE_FETCH_LIMIT);\n\t\tconst trace = await apiService.getTrace({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\ttraceId: params.traceId,\n\t\t\tlimit: traceFetchLimit,\n\t\t\tstatsPeriod: \"14d\"\n\t\t});\n\t\tconst summary = {\n\t\t\tspanCount: traceMeta.span_count,\n\t\t\terrors: traceMeta.errors,\n\t\t\tperformanceIssues: traceMeta.performance_issues,\n\t\t\tlogs: traceMeta.logs\n\t\t};\n\t\tconst traceFetchState = buildTraceFetchState({\n\t\t\ttrace,\n\t\t\ttotalSpanCount: traceMeta.span_count\n\t\t});\n\t\tconst aiConversations = collectAIConversationReferencesFromTrace(trace);\n\t\tconst markdown = formatTraceOutput({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\ttraceId: params.traceId,\n\t\t\tspanId: params.spanId,\n\t\t\tsummary,\n\t\t\ttrace,\n\t\t\ttraceFetchState,\n\t\t\tapiService,\n\t\t\texperimentalMode: context.experimentalMode,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames,\n\t\t\taiConversations\n\t\t});\n\t\treturn addAIConversationSuggestedActions({\n\t\t\tmarkdown,\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\taiConversations,\n\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames\n\t\t});\n\t}\n});\nfunction isTraceSpanNode(node) {\n\tif (node === null || typeof node !== \"object\") return false;\n\tconst candidate = node;\n\treturn typeof candidate.event_id === \"string\" && typeof candidate.duration === \"number\" && Array.isArray(candidate.children);\n}\nfunction getTraceSpans(trace) {\n\treturn trace.filter(isTraceSpanNode);\n}\nfunction getTraceSpanChildren(span) {\n\treturn span.children.filter(isTraceSpanNode);\n}\nfunction getTraceFetchLimit(totalSpanCount, errorCount = 0, maxFetchLimit = MAX_TRACE_FETCH_LIMIT) {\n\treturn Math.min(Math.max(totalSpanCount + errorCount, MIN_TRACE_FETCH_LIMIT), maxFetchLimit);\n}\n/**\n* Selects a subset of \"interesting\" spans from a trace for display in the overview.\n*\n* Creates a fake root span representing the entire trace, with selected interesting\n* spans as children. This provides a unified tree view of the trace.\n*\n* The goal is to provide a meaningful sample of the trace that highlights the most\n* important operations while staying within display limits. Selection prioritizes:\n*\n* 1. **Transactions** - Top-level operations that represent complete user requests\n* 2. **Error spans** - Any spans that contain errors (critical for debugging)\n* 3. **Long-running spans** - Operations >= 10ms duration (performance bottlenecks)\n* 4. **Hierarchical context** - Maintains parent-child relationships for understanding\n*\n* Span inclusion rules:\n* - Root spans are ranked by branch score, not just root duration\n* - Spans with errors or long descendants stay in consideration\n* - The tree expands best-first across the whole trace, not one branch at a time\n* - Children are recursively added up to MAX_DEPTH levels deep\n* - Total output is capped at maxSpans to prevent overwhelming display\n*\n* @param trace - Complete array of trace spans with nested children\n* @param traceId - Trace ID to display in the fake root span\n* @param maxSpans - Maximum number of spans to include in output\n* @returns Single-element array containing fake root span with selected spans as children\n*/\nfunction selectInterestingSpans(trace, traceId, maxSpans = MAX_OVERVIEW_SPANS) {\n\tconst getBranchStats = createBranchStatsGetter();\n\tconst sortedRoots = getTraceSpans(trace).map((root) => ({\n\t\troot,\n\t\tstats: getBranchStats(root)\n\t})).sort((a, b) => b.stats.score - a.stats.score).slice(0, MAX_ROOT_SPANS);\n\tconst fakeRoot = fakeRootTemplate(traceId);\n\tconst expansionQueue = [];\n\tlet spanCount = 0;\n\tfor (const { root } of sortedRoots) {\n\t\tif (spanCount >= maxSpans) break;\n\t\tfakeRoot.children.push(createSelectedSpan(root, 0));\n\t\tconst selectedRoot = fakeRoot.children[fakeRoot.children.length - 1];\n\t\tspanCount += 1;\n\t\tenqueueSelectedChildren(root, selectedRoot, 1, expansionQueue, getBranchStats);\n\t}\n\twhile (expansionQueue.length > 0 && spanCount < maxSpans) {\n\t\texpansionQueue.sort((a, b) => b.score - a.score);\n\t\tconst candidate = expansionQueue.shift();\n\t\tif (!candidate || candidate.level > MAX_DEPTH) continue;\n\t\tconst selectedChild = createSelectedSpan(candidate.span, candidate.level);\n\t\tcandidate.parent.children.push(selectedChild);\n\t\tspanCount += 1;\n\t\tenqueueSelectedChildren(candidate.span, selectedChild, candidate.level + 1, expansionQueue, getBranchStats);\n\t}\n\treturn [fakeRoot];\n}\nfunction selectInterestingSpanSubtree(span, maxDescendantSpans = MAX_FOCUSED_CHILD_SPANS) {\n\tconst getBranchStats = createBranchStatsGetter();\n\tconst selectedRoot = createSelectedSpan(span, 0);\n\tconst expansionQueue = [];\n\tlet descendantCount = 0;\n\tenqueueSelectedChildren(span, selectedRoot, 1, expansionQueue, getBranchStats);\n\twhile (expansionQueue.length > 0 && descendantCount < maxDescendantSpans) {\n\t\texpansionQueue.sort((a, b) => b.score - a.score);\n\t\tconst candidate = expansionQueue.shift();\n\t\tif (!candidate || candidate.level > MAX_DEPTH) continue;\n\t\tconst selectedChild = createSelectedSpan(candidate.span, candidate.level);\n\t\tcandidate.parent.children.push(selectedChild);\n\t\tdescendantCount += 1;\n\t\tenqueueSelectedChildren(candidate.span, selectedChild, candidate.level + 1, expansionQueue, getBranchStats);\n\t}\n\treturn selectedRoot;\n}\nfunction normalizeSpanId(value) {\n\tif (typeof value === \"string\" && value.length > 0) return value;\n\treturn void 0;\n}\nfunction getTraceSpanId(span) {\n\treturn normalizeSpanId(span.span_id) || normalizeSpanId(span.additional_attributes?.span_id) || span.event_id;\n}\nfunction createBranchStatsGetter() {\n\tconst branchStatsBySpan = /* @__PURE__ */ new Map();\n\tfunction getBranchStats(span) {\n\t\tconst spanId = getTraceSpanId(span);\n\t\tconst cached = branchStatsBySpan.get(spanId);\n\t\tif (cached) return cached;\n\t\tconst duration = span.duration || 0;\n\t\tconst hasErrors = Array.isArray(span.errors) && span.errors.length > 0;\n\t\tlet maxDuration = duration;\n\t\tlet descendantCount = 1;\n\t\tlet childScore = 0;\n\t\tlet hasInterestingDescendant = false;\n\t\tfor (const child of getTraceSpanChildren(span)) {\n\t\t\tconst childStats = getBranchStats(child);\n\t\t\tmaxDuration = Math.max(maxDuration, childStats.maxDuration);\n\t\t\tdescendantCount += childStats.descendantCount;\n\t\t\tchildScore = Math.max(childScore, childStats.score);\n\t\t\thasInterestingDescendant ||= childStats.interesting;\n\t\t}\n\t\tconst interesting = Boolean(span.is_transaction) || hasErrors || duration >= MINIMUM_DURATION_THRESHOLD_MS || hasInterestingDescendant;\n\t\tconst score = duration + maxDuration * .75 + descendantCount * 4 + (span.is_transaction ? 250 : 0) + (hasErrors ? 1e3 : 0) + childScore * .25;\n\t\tconst stats = {\n\t\t\tinteresting,\n\t\t\tscore,\n\t\t\tmaxDuration,\n\t\t\tdescendantCount\n\t\t};\n\t\tbranchStatsBySpan.set(spanId, stats);\n\t\treturn stats;\n\t}\n\treturn getBranchStats;\n}\nfunction createSelectedSpan(span, level) {\n\tconst display = formatSemanticSpanDisplay(span);\n\treturn {\n\t\tid: getTraceSpanId(span),\n\t\top: span.op || \"unknown\",\n\t\tdisplayName: display.label,\n\t\tmetadata: display.metadata,\n\t\tduration: span.duration || 0,\n\t\tis_transaction: Boolean(span.is_transaction),\n\t\tchildren: [],\n\t\tlevel\n\t};\n}\nfunction enqueueSelectedChildren(span, parent, level, queue, getBranchStats) {\n\tif (level > MAX_DEPTH) return;\n\tconst childCandidates = getTraceSpanChildren(span).map((child) => ({\n\t\tchild,\n\t\tstats: getBranchStats(child)\n\t})).sort((a, b) => b.stats.score - a.stats.score).slice(0, MAX_QUEUED_CHILDREN_PER_PARENT);\n\tfor (const { child, stats } of childCandidates) queue.push({\n\t\tspan: child,\n\t\tparent,\n\t\tlevel,\n\t\tscore: stats.score\n\t});\n}\nconst fakeRootTemplate = (traceId) => ({\n\tid: traceId,\n\top: \"trace\",\n\tdisplayName: \"trace\",\n\tmetadata: [],\n\tduration: 0,\n\tis_transaction: false,\n\tchildren: [],\n\tlevel: -1\n});\n/**\n* Formats a span display name for the tree view.\n*\n* Uses span.name if available (OTEL-native), otherwise falls back to span.description.\n*\n* @param span - The span to format\n* @returns A formatted display name for the span\n*/\nfunction formatSpanDisplayName(span) {\n\treturn span.displayName;\n}\n/**\n* Renders a hierarchical tree structure of spans using Unicode box-drawing characters.\n*\n* Creates a visual tree representation showing parent-child relationships between spans,\n* with proper indentation and connecting lines. Each span shows its operation, short ID,\n* description, duration, and type (transaction vs span).\n*\n* Tree format:\n* - Root spans have no prefix\n* - Child spans use ├─ for intermediate children, └─ for last child\n* - Continuation lines use │ for vertical connections\n* - Proper spacing maintains visual alignment\n*\n* @param spans - Array of selected spans with their nested children structure\n* @returns Array of formatted markdown strings representing the tree structure\n*/\nfunction renderSpanTree(spans) {\n\tconst lines = [];\n\tfunction renderSpan(span, prefix = \"\", isLast = true) {\n\t\tconst connector = prefix === \"\" ? \"\" : isLast ? \"└─ \" : \"├─ \";\n\t\tconst displayName = formatSpanDisplayName(span);\n\t\tif (span.op === \"trace\") lines.push(`${prefix}${connector}${displayName}`);\n\t\telse {\n\t\t\tconst duration = span.duration ? `${Math.round(span.duration)}ms` : \"unknown\";\n\t\t\tconst metadataParts = [\n\t\t\t\t...span.op === \"default\" ? [] : [span.op],\n\t\t\t\t...span.metadata,\n\t\t\t\tduration,\n\t\t\t\tspan.id\n\t\t\t];\n\t\t\tlines.push(`${prefix}${connector}${displayName} [${metadataParts.join(\" · \")}]`);\n\t\t}\n\t\tfor (let i = 0; i < span.children.length; i++) {\n\t\t\tconst child = span.children[i];\n\t\t\tconst isLastChild = i === span.children.length - 1;\n\t\t\tconst childPrefix = prefix + (isLast ? \"   \" : \"│  \");\n\t\t\trenderSpan(child, childPrefix, isLastChild);\n\t\t}\n\t}\n\tfor (let i = 0; i < spans.length; i++) {\n\t\tconst span = spans[i];\n\t\tconst isLastRoot = i === spans.length - 1;\n\t\trenderSpan(span, \"\", isLastRoot);\n\t}\n\treturn lines;\n}\nfunction findTraceSpan(trace, spanId) {\n\tfor (const span of getTraceSpans(trace)) {\n\t\tconst found = findTraceSpanInSubtree(span, spanId);\n\t\tif (found) return found;\n\t}\n\treturn null;\n}\nfunction findTraceSpanInSubtree(span, targetSpanId) {\n\tif (getTraceSpanId(span) === targetSpanId) return span;\n\tfor (const child of getTraceSpanChildren(span)) {\n\t\tconst found = findTraceSpanInSubtree(child, targetSpanId);\n\t\tif (found) return found;\n\t}\n\treturn null;\n}\nfunction calculateOperationStats(trace) {\n\tconst allSpans = getAllSpansFlattened(trace);\n\tconst operationSpans = {};\n\tfor (const span of allSpans) if (!span.children || span.children.length === 0) {\n\t\tconst op = span.op || (span.name ? span.name.split(\" \")[0] : \"unknown\");\n\t\tif (!operationSpans[op]) operationSpans[op] = [];\n\t\toperationSpans[op].push(span);\n\t}\n\tconst stats = {};\n\tfor (const [op, opSpans] of Object.entries(operationSpans)) {\n\t\tconst durations = opSpans.map((span) => span.duration || 0).filter((duration) => duration > 0).sort((a, b) => a - b);\n\t\tconst count = opSpans.length;\n\t\tconst avgDuration = durations.length > 0 ? durations.reduce((sum, duration) => sum + duration, 0) / durations.length : 0;\n\t\tconst p95Index = Math.floor(durations.length * .95);\n\t\tconst p95Duration = durations.length > 0 ? durations[p95Index] || 0 : 0;\n\t\tstats[op] = {\n\t\t\tcount,\n\t\t\tavgDuration,\n\t\t\tp95Duration\n\t\t};\n\t}\n\treturn stats;\n}\nfunction getAllSpansFlattened(trace) {\n\tconst result = [];\n\tfunction collectSpans(spanList) {\n\t\tfor (const span of spanList) {\n\t\t\tresult.push(span);\n\t\t\tconst children = getTraceSpanChildren(span);\n\t\t\tif (children.length > 0) collectSpans(children);\n\t\t}\n\t}\n\tcollectSpans(getTraceSpans(trace));\n\treturn result;\n}\nfunction buildTraceFetchState({ trace, totalSpanCount }) {\n\tconst fetchedSpanCount = getAllSpansFlattened(trace).length;\n\treturn {\n\t\tfetchedSpanCount,\n\t\tisComplete: fetchedSpanCount >= totalSpanCount\n\t};\n}\nfunction formatTraceOutput({ organizationSlug, traceId, spanId, summary, trace, traceFetchState, apiService, experimentalMode, availableToolNames, directToolNames, aiConversations }) {\n\tif (spanId) return formatFocusedSpanOutput({\n\t\torganizationSlug,\n\t\ttraceId,\n\t\tspanId,\n\t\tsummary,\n\t\ttrace,\n\t\ttraceFetchState,\n\t\tapiService,\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames,\n\t\taiConversations\n\t});\n\treturn formatTraceOverviewOutput({\n\t\torganizationSlug,\n\t\ttraceId,\n\t\tsummary,\n\t\ttrace,\n\t\tapiService,\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames,\n\t\taiConversations\n\t});\n}\nfunction formatTraceOverviewOutput({ organizationSlug, traceId, summary, trace, apiService, experimentalMode, availableToolNames, directToolNames, aiConversations }) {\n\tconst sections = [];\n\tsections.push(`# Trace \\`${traceId}\\` in **${organizationSlug}**`);\n\tsections.push(\"\");\n\tsections.push(\"## Summary\");\n\tsections.push(\"\");\n\tsections.push(`**Total Spans**: ${summary.spanCount}`);\n\tsections.push(`**Errors**: ${summary.errors}`);\n\tsections.push(`**Performance Issues**: ${summary.performanceIssues ?? 0}`);\n\tsections.push(`**Logs**: ${summary.logs ?? 0}`);\n\tif (trace.length > 0) {\n\t\tconst operationStats = calculateOperationStats(trace);\n\t\tconst sortedOps = Object.entries(operationStats).filter(([, stats]) => stats.avgDuration >= MIN_AVG_DURATION_MS).sort(([, a], [, b]) => b.count - a.count).slice(0, 10);\n\t\tif (sortedOps.length > 0) {\n\t\t\tsections.push(\"\");\n\t\t\tsections.push(\"## Operation Breakdown\");\n\t\t\tsections.push(\"\");\n\t\t\tfor (const [op, stats] of sortedOps) {\n\t\t\t\tconst avgDuration = Math.round(stats.avgDuration);\n\t\t\t\tconst p95Duration = Math.round(stats.p95Duration);\n\t\t\t\tsections.push(`- **${op}**: ${stats.count} spans (avg: ${avgDuration}ms, p95: ${p95Duration}ms)`);\n\t\t\t}\n\t\t\tsections.push(\"\");\n\t\t}\n\t}\n\tif (trace.length > 0) {\n\t\tconst selectedSpans = selectInterestingSpans(trace, traceId);\n\t\tconst overviewSpanCount = countSelectedSpans(selectedSpans);\n\t\tif (overviewSpanCount > 0) {\n\t\t\tsections.push(\"## Overview\");\n\t\t\tsections.push(\"\");\n\t\t\tconst treeLines = renderSpanTree(selectedSpans);\n\t\t\tsections.push(...treeLines);\n\t\t\tsections.push(\"\");\n\t\t\tsections.push(`*Overview shows ${overviewSpanCount} of ${summary.spanCount} spans.*`);\n\t\t\tsections.push(\"\");\n\t\t}\n\t}\n\tconst traceUrl = apiService.getTraceUrl(organizationSlug, traceId);\n\tsections.push(\"## View Full Trace\");\n\tsections.push(\"\");\n\tsections.push(`**Sentry URL**: ${traceUrl}`);\n\tsections.push(\"\");\n\tsections.push(...formatAIConversationSection({\n\t\taiConversations,\n\t\torganizationSlug,\n\t\texperimentalMode: experimentalMode ?? false,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t}));\n\tsections.push(\"## Next Steps\");\n\tsections.push(\"\");\n\tsections.push(...buildTraceNextSteps({\n\t\torganizationSlug,\n\t\ttraceId,\n\t\texperimentalMode: experimentalMode ?? false,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t}));\n\treturn sections.join(\"\\n\");\n}\nfunction formatFocusedSpanOutput({ organizationSlug, traceId, spanId, summary, trace, traceFetchState, apiService, experimentalMode, availableToolNames, directToolNames, aiConversations }) {\n\tconst focusedSpan = findTraceSpan(trace, spanId);\n\tif (!focusedSpan) {\n\t\tif (!traceFetchState.isComplete) throw new UserInputError(`Span \\`${spanId}\\` was not found in the fetched portion of trace \\`${traceId}\\`. ${formatIncompleteTraceFetchMessage(summary, traceFetchState)}`);\n\t\tthrow new UserInputError(`Span \\`${spanId}\\` was not found in trace \\`${traceId}\\`.`);\n\t}\n\tconst focusedSpanId = getTraceSpanId(focusedSpan);\n\tconst traceUrl = apiService.getTraceUrl(organizationSlug, traceId);\n\tconst focusedSpanUrl = buildSpanUrl(traceUrl, focusedSpanId);\n\tconst totalDescendantCount = countDescendantSpans(focusedSpan);\n\tconst selectedTree = selectInterestingSpanSubtree(focusedSpan);\n\tconst shownDescendantCount = countSelectedDescendants(selectedTree);\n\tconst sections = [];\n\tsections.push(`# Span \\`${focusedSpanId}\\` in Trace \\`${traceId}\\` in **${organizationSlug}**`);\n\tsections.push(\"\");\n\tsections.push(\"## Summary\");\n\tsections.push(\"\");\n\tsections.push(`**Project**: ${focusedSpan.project_slug ?? \"unknown\"}`);\n\tsections.push(`**Operation**: ${focusedSpan.op ?? \"unknown\"}`);\n\tsections.push(`**Description**: ${formatTraceSpanDescription(focusedSpan)}`);\n\tsections.push(`**Duration**: ${formatDuration(focusedSpan.duration)}`);\n\tif (typeof focusedSpan.exclusive_time === \"number\") sections.push(`**Exclusive Time**: ${formatDuration(focusedSpan.exclusive_time)}`);\n\tsections.push(`**Status**: ${focusedSpan.status ?? (focusedSpan.is_transaction ? \"transaction\" : \"unknown\")}`);\n\tsections.push(`**Parent Span ID**: ${focusedSpan.parent_span_id ?? \"None (root span)\"}`);\n\tsections.push(`**Child Spans**: ${getTraceSpanChildren(focusedSpan).length}`);\n\tsections.push(`**Descendant Spans**: ${totalDescendantCount}`);\n\tsections.push(`**Errors**: ${Array.isArray(focusedSpan.errors) ? focusedSpan.errors.length : 0}`);\n\tsections.push(`**Event Type**: ${focusedSpan.event_type ?? \"span\"}`);\n\tsections.push(`**SDK**: ${focusedSpan.sdk_name ?? \"unknown\"}`);\n\tsections.push(`**Trace Total Spans**: ${summary.spanCount}`);\n\tsections.push(\"\");\n\tsections.push(\"## Child Snapshot\");\n\tsections.push(\"\");\n\tsections.push(...renderSpanTree([selectedTree]));\n\tsections.push(\"\");\n\tsections.push(`*Child snapshot shows ${shownDescendantCount} of ${totalDescendantCount} descendant spans.*`);\n\tsections.push(\"\");\n\tsections.push(\"## View Full Span\");\n\tsections.push(\"\");\n\tsections.push(`**Sentry URL**: ${focusedSpanUrl}`);\n\tsections.push(\"\");\n\tsections.push(\"## Attributes\");\n\tsections.push(\"\");\n\tsections.push(...formatSpanAttributeSections(focusedSpan, traceId));\n\tsections.push(...formatAIConversationSection({\n\t\taiConversations,\n\t\torganizationSlug,\n\t\texperimentalMode: experimentalMode ?? false,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t}));\n\tsections.push(\"## Next Steps\");\n\tsections.push(\"\");\n\tsections.push(...buildTraceNextSteps({\n\t\torganizationSlug,\n\t\ttraceId,\n\t\tspanFocused: true,\n\t\texperimentalMode: experimentalMode ?? false,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t}));\n\treturn sections.join(\"\\n\");\n}\nfunction formatIncompleteTraceFetchMessage(summary, traceFetchState) {\n\treturn `Fetched ${traceFetchState.fetchedSpanCount} of ${summary.spanCount} spans.`;\n}\nfunction countSelectedSpans(spans) {\n\tlet count = 0;\n\tfunction visit(span) {\n\t\tif (span.op !== \"trace\") count += 1;\n\t\tfor (const child of span.children) visit(child);\n\t}\n\tfor (const span of spans) visit(span);\n\treturn count;\n}\nfunction countDescendantSpans(span) {\n\tlet count = 0;\n\tfor (const child of getTraceSpanChildren(span)) {\n\t\tcount += 1;\n\t\tcount += countDescendantSpans(child);\n\t}\n\treturn count;\n}\nfunction countSelectedDescendants(span) {\n\tlet count = 0;\n\tfor (const child of span.children) {\n\t\tcount += 1;\n\t\tcount += countSelectedDescendants(child);\n\t}\n\treturn count;\n}\nfunction formatDuration(durationMs) {\n\tif (typeof durationMs !== \"number\") return \"unknown\";\n\treturn `${Math.round(durationMs)}ms`;\n}\nfunction formatTraceSpanDescription(span) {\n\treturn formatSemanticSpanDisplay(span).label;\n}\nfunction buildSpanUrl(traceUrl, spanId) {\n\tconst url = new URL(traceUrl);\n\turl.searchParams.set(\"node\", `span-${spanId}`);\n\treturn url.toString();\n}\nfunction formatSpanAttributeSections(span, traceId) {\n\tconst sections = [];\n\tconst coreFields = stripUndefined({\n\t\tspan_id: getTraceSpanId(span),\n\t\tevent_id: span.event_id,\n\t\ttrace: span.trace ?? traceId,\n\t\ttransaction_id: span.transaction_id,\n\t\tparent_span_id: span.parent_span_id ?? null,\n\t\tproject_id: span.project_id,\n\t\tproject_slug: span.project_slug,\n\t\tprofile_id: span.profile_id,\n\t\tprofiler_id: span.profiler_id,\n\t\tstart_timestamp: span.start_timestamp,\n\t\tend_timestamp: span.end_timestamp,\n\t\ttimestamp: span.timestamp,\n\t\tduration: span.duration,\n\t\texclusive_time: span.exclusive_time,\n\t\ttransaction: span.transaction,\n\t\tis_transaction: span.is_transaction,\n\t\tdescription: span.description,\n\t\tsdk_name: span.sdk_name,\n\t\top: span.op,\n\t\tname: span.name,\n\t\tevent_type: span.event_type,\n\t\tstatus: span.status,\n\t\tis_segment: span.is_segment,\n\t\tsame_process_as_parent: span.same_process_as_parent,\n\t\thash: span.hash,\n\t\torganization: span.organization ?? null\n\t});\n\tsections.push(...formatJsonSection(\"### Core Fields\", coreFields));\n\tsections.push(...formatJsonSection(\"### Measurements\", span.measurements ?? {}));\n\tsections.push(...formatJsonSection(\"### Tags\", span.tags ?? {}));\n\tsections.push(...formatJsonSection(\"### Data\", span.data ?? {}));\n\tsections.push(...formatJsonSection(\"### Additional Attributes\", span.additional_attributes ?? {}));\n\tsections.push(...formatJsonSection(\"### Errors\", span.errors ?? []));\n\tsections.push(...formatJsonSection(\"### Occurrences\", span.occurrences ?? []));\n\treturn sections;\n}\nfunction formatJsonSection(title, value) {\n\treturn [\n\t\ttitle,\n\t\t\"\",\n\t\t\"```json\",\n\t\tJSON.stringify(sortJsonValue(value), null, 2) ?? \"null\",\n\t\t\"```\",\n\t\t\"\"\n\t];\n}\nfunction sortJsonValue(value) {\n\tif (Array.isArray(value)) return value.map((item) => sortJsonValue(item));\n\tif (value === null || typeof value !== \"object\") return value;\n\treturn Object.fromEntries(Object.entries(value).filter(([, nestedValue]) => nestedValue !== void 0).sort(([left], [right]) => left.localeCompare(right)).map(([key, nestedValue]) => [key, sortJsonValue(nestedValue)]));\n}\nfunction stripUndefined(value) {\n\treturn Object.fromEntries(Object.entries(value).filter(([, entryValue]) => entryValue !== void 0));\n}\nfunction collectAIConversationReferencesFromTrace(trace) {\n\tconst references = /* @__PURE__ */ new Map();\n\tfor (const span of getTraceSpans(trace)) {\n\t\tcollectAIConversationReferences(span, references);\n\t\tif (references.size >= MAX_AI_CONVERSATION_REFERENCES) break;\n\t}\n\treturn [...references.values()];\n}\nfunction collectAIConversationReferences(span, references) {\n\tconst conversationId = getAIConversationIdFromSpan(span);\n\tif (conversationId && !references.has(conversationId)) references.set(conversationId, {\n\t\tconversationId,\n\t\tspanId: getTraceSpanId(span)\n\t});\n\tif (references.size >= MAX_AI_CONVERSATION_REFERENCES) return;\n\tfor (const child of getTraceSpanChildren(span)) {\n\t\tcollectAIConversationReferences(child, references);\n\t\tif (references.size >= MAX_AI_CONVERSATION_REFERENCES) return;\n\t}\n}\nfunction getAIConversationIdFromSpan(span) {\n\treturn getStringRecordValue(span.additional_attributes, \"gen_ai.conversation.id\") ?? getStringRecordValue(span.data, \"gen_ai.conversation.id\") ?? getStringRecordValue(span.tags, \"gen_ai.conversation.id\");\n}\nfunction getStringRecordValue(record, key) {\n\tconst value = record?.[key];\n\treturn typeof value === \"string\" && value.length > 0 ? value : void 0;\n}\nfunction formatAIConversationSection({ aiConversations, organizationSlug, experimentalMode, availableToolNames, directToolNames }) {\n\tif (aiConversations.length === 0) return [];\n\tconst instructions = formatAIConversationActionInstructions({\n\t\torganizationSlug,\n\t\taiConversations,\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames\n\t});\n\tconst lines = [\"## Agent Conversations\", \"\"];\n\tif (aiConversations.length === 1) {\n\t\tconst [conversation] = aiConversations;\n\t\tlines.push(`**Conversation ID**: \\`${conversation.conversationId}\\``);\n\t\tif (conversation.spanId) lines.push(`**Matching Span**: \\`${conversation.spanId}\\``);\n\t\tlines.push(\"\");\n\t\tlines.push(...instructions);\n\t\tlines.push(\"\");\n\t\treturn lines;\n\t}\n\tfor (const conversation of aiConversations) {\n\t\tconst spanSuffix = conversation.spanId ? ` (matching span: \\`${conversation.spanId}\\`)` : \"\";\n\t\tlines.push(`- \\`${conversation.conversationId}\\`${spanSuffix}`);\n\t}\n\tlines.push(\"\");\n\tlines.push(...instructions.map((instruction) => `- ${instruction}`));\n\tlines.push(\"\");\n\treturn lines;\n}\nfunction buildTraceNextSteps({ organizationSlug, traceId, spanFocused = false, experimentalMode, availableToolNames, directToolNames }) {\n\tconst formatSearchStep = ({ label, arguments: args, fallbackInstruction }) => `- **${label}**: ${formatToolCallInstruction({\n\t\ttoolName: \"search_events\",\n\t\targuments: {\n\t\t\torganizationSlug,\n\t\t\t...args\n\t\t},\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames,\n\t\tfallbackInstruction\n\t})}`;\n\tif (hasAgentProvider()) {\n\t\tconst spanQuery = spanFocused ? `show sibling spans or the rest of trace ${traceId}` : `show more spans from trace ${traceId}`;\n\t\treturn [\n\t\t\tformatSearchStep({\n\t\t\t\tlabel: \"Search spans\",\n\t\t\t\targuments: { query: spanQuery },\n\t\t\t\tfallbackInstruction: \"Span search is not available in this session\"\n\t\t\t}),\n\t\t\tformatSearchStep({\n\t\t\t\tlabel: \"Search errors\",\n\t\t\t\targuments: { query: `show error events from trace ${traceId}` },\n\t\t\t\tfallbackInstruction: \"Error search is not available in this session\"\n\t\t\t}),\n\t\t\tformatSearchStep({\n\t\t\t\tlabel: \"Search logs\",\n\t\t\t\targuments: { query: `show logs from trace ${traceId}` },\n\t\t\t\tfallbackInstruction: \"Log search is not available in this session\"\n\t\t\t})\n\t\t];\n\t}\n\treturn [\n\t\tformatSearchStep({\n\t\t\tlabel: \"Search spans\",\n\t\t\targuments: {\n\t\t\t\tdataset: \"spans\",\n\t\t\t\tquery: `trace:${traceId}`\n\t\t\t},\n\t\t\tfallbackInstruction: \"Span search is not available in this session\"\n\t\t}),\n\t\tformatSearchStep({\n\t\t\tlabel: \"Search errors\",\n\t\t\targuments: {\n\t\t\t\tdataset: \"errors\",\n\t\t\t\tquery: `trace:${traceId}`\n\t\t\t},\n\t\t\tfallbackInstruction: \"Error search is not available in this session\"\n\t\t}),\n\t\tformatSearchStep({\n\t\t\tlabel: \"Search logs\",\n\t\t\targuments: {\n\t\t\t\tdataset: \"logs\",\n\t\t\t\tquery: `trace:${traceId}`\n\t\t\t},\n\t\t\tfallbackInstruction: \"Log search is not available in this session\"\n\t\t})\n\t];\n}\n\n//#endregion\nexport { get_trace_details_default };\n//# sourceMappingURL=get-trace-details-D7U8b5_V.js.map","import { ParamOrganizationSlug, ParamRegionUrl, ParamSpanId, ParamTraceId } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { get_trace_details_default } from \"./get-trace-details-D7U8b5_V.js\";\n\n//#region src/tools/catalog/get-span-details.ts\nvar get_span_details_default = defineTool({\n\tname: \"get_span_details\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"event:read\"],\n\trequiredCapabilities: [\"traces\"],\n\tdescription: [\n\t\t\"Get detailed information about a specific span within a Sentry trace.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Inspect a span when you already know its trace ID and span ID\",\n\t\t\"- Focus a trace investigation on one operation\",\n\t\t\"- Review a span's attributes, timing, errors, and child spans\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"get_span_details(organizationSlug='my-organization', traceId='a4d1aae7216b47ff8117cf4e09ce9d0a', spanId='aa8e7f3384ef4ff5')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Pass traceId and spanId as separate parameters.\",\n\t\t\"- Use get_trace_details for a trace overview when no span is selected.\",\n\t\t\"- Use get_sentry_resource when starting from a Sentry trace or span URL.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\ttraceId: ParamTraceId,\n\t\tspanId: ParamSpanId\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\treturn get_trace_details_default.handler(params, context);\n\t}\n});\n\n//#endregion\nexport { get_span_details_default };\n//# sourceMappingURL=get-span-details-DfXIT1v_.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\n\n//#region src/internal/url-helpers.ts\n/**\n* Parses a Sentry URL and extracts resource type and identifiers.\n*\n* Supported URL patterns:\n* - Issue: `/issues/{issueId}` or `/organizations/{org}/issues/{issueId}`\n* - Event: `/issues/{issueId}/events/{eventId}`\n* - Trace: `/explore/traces/trace/{traceId}` or `/performance/trace/{traceId}`\n* - Profile: `/explore/profiling/profile/{project}/{profileId}/flamegraph/`\n* - Continuous profile: `/explore/profiling/profile/{project}/flamegraph/` with query params\n* - AI conversation: `/explore/conversations/{conversationId}/`\n* - Replay: `/explore/replays/{replayId}/` or `/replays/{replayId}/`\n* - Monitor: `/crons/{monitorSlug}/` or `/monitors/{monitorSlug}/`\n* - Release: `/releases/{version}/`\n*\n* Organization slug is extracted from:\n* 1. Subdomain (e.g., `my-org.sentry.io`)\n* 2. Path (e.g., `/organizations/my-org/...` or `/my-org/issues/...`)\n*\n* @param url - A Sentry URL to parse\n* @returns Parsed URL with resource type and identifiers\n* @throws UserInputError if the URL is invalid or cannot be parsed\n*\n* @example\n* // Issue URL\n* parseSentryUrl(\"https://my-org.sentry.io/issues/PROJECT-123\")\n* // { type: \"issue\", organizationSlug: \"my-org\", issueId: \"PROJECT-123\" }\n*\n* @example\n* // Replay URL\n* parseSentryUrl(\"https://my-org.sentry.io/explore/replays/abc123def456/\")\n* // { type: \"replay\", organizationSlug: \"my-org\", replayId: \"abc123def456\" }\n*\n* @example\n* // Monitor URL\n* parseSentryUrl(\"https://my-org.sentry.io/crons/my-cron-job/\")\n* // { type: \"monitor\", organizationSlug: \"my-org\", monitorSlug: \"my-cron-job\" }\n*/\nfunction parseSentryUrl(url) {\n\tif (!url || typeof url !== \"string\") throw new UserInputError(\"Invalid Sentry URL. URL must be a non-empty string.\");\n\tif (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) throw new UserInputError(\"Invalid Sentry URL. Must start with http:// or https://\");\n\tlet parsedUrl;\n\ttry {\n\t\tparsedUrl = new URL(url);\n\t} catch {\n\t\tthrow new UserInputError(`Invalid Sentry URL. Unable to parse URL: ${url}`);\n\t}\n\tconst pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n\tconst organizationSlug = extractOrganizationSlug(parsedUrl, pathParts);\n\treturn identifyResource(parsedUrl, pathParts, organizationSlug);\n}\n/**\n* Extracts organization slug from URL.\n*\n* Checks in order:\n* 1. `/organizations/{org}/...` path format\n* 2. `/{org}/issues/...` path format (org before known segments)\n* 3. Subdomain (e.g., `my-org.sentry.io`) - excluding region prefixes\n*/\nfunction extractOrganizationSlug(parsedUrl, pathParts) {\n\tif (pathParts.includes(\"organizations\")) {\n\t\tconst orgIndex = pathParts.indexOf(\"organizations\");\n\t\tconst slug = pathParts[orgIndex + 1];\n\t\tif (slug) return slug;\n\t}\n\tconst knownSegments = [\n\t\t\"issues\",\n\t\t\"explore\",\n\t\t\"performance\",\n\t\t\"projects\",\n\t\t\"settings\",\n\t\t\"replays\",\n\t\t\"releases\",\n\t\t\"crons\",\n\t\t\"monitors\",\n\t\t\"alerts\",\n\t\t\"feedback\",\n\t\t\"dashboards\",\n\t\t\"discover\",\n\t\t\"insights\",\n\t\t\"preprod\"\n\t];\n\tif (pathParts.length > 1 && !knownSegments.includes(pathParts[0]) && knownSegments.includes(pathParts[1])) return pathParts[0];\n\tconst hostParts = parsedUrl.hostname.split(\".\");\n\tconst regionPrefixes = [\n\t\t\"us\",\n\t\t\"eu\",\n\t\t\"de\",\n\t\t\"www\"\n\t];\n\tif (hostParts.length >= 2 && !regionPrefixes.includes(hostParts[0])) return hostParts[0];\n\tthrow new UserInputError(\"Invalid Sentry URL. Could not determine organization from URL.\");\n}\nfunction escapeRegex(value) {\n\treturn value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nfunction extractPathGroup(pathParts, patterns, groupName) {\n\tconst path = pathParts.join(\"/\");\n\tfor (const pattern of patterns) {\n\t\tconst match = pattern.exec(path);\n\t\tconst value = match?.groups?.[groupName];\n\t\tif (value) return value;\n\t}\n\treturn void 0;\n}\n/**\n* Identifies the resource type and extracts relevant identifiers.\n*/\nfunction identifyResource(parsedUrl, pathParts, organizationSlug) {\n\tconst profilingIndex = pathParts.indexOf(\"profiling\");\n\tif (profilingIndex !== -1 && pathParts[profilingIndex + 1] === \"profile\") {\n\t\tconst projectSlug = pathParts[profilingIndex + 2];\n\t\tconst nextPart = pathParts[profilingIndex + 3];\n\t\tconst profileId = nextPart && nextPart !== \"flamegraph\" ? nextPart : void 0;\n\t\tconst profilerId = parsedUrl.searchParams.get(\"profilerId\") || void 0;\n\t\tconst start = parsedUrl.searchParams.get(\"start\") || void 0;\n\t\tconst end = parsedUrl.searchParams.get(\"end\") || void 0;\n\t\treturn {\n\t\t\ttype: \"profile\",\n\t\t\torganizationSlug,\n\t\t\tprojectSlugOrId: projectSlug,\n\t\t\tprofileId,\n\t\t\tprofilerId,\n\t\t\tstart,\n\t\t\tend\n\t\t};\n\t}\n\tconst conversationId = extractPathGroup(pathParts, [\n\t\t/^explore\\/conversations\\/(?<conversationId>[^/]+)$/,\n\t\t/^organizations\\/[^/]+\\/explore\\/conversations\\/(?<conversationId>[^/]+)$/,\n\t\t/* @__PURE__ */ new RegExp(`^${escapeRegex(organizationSlug)}\\\\/explore\\\\/conversations\\\\/(?<conversationId>[^/]+)$`)\n\t], \"conversationId\");\n\tif (conversationId) {\n\t\tconst project = parsedUrl.searchParams.get(\"project\") || void 0;\n\t\tconst spanId = parsedUrl.searchParams.get(\"spanId\") || void 0;\n\t\tconst start = parsedUrl.searchParams.get(\"start\") || void 0;\n\t\tconst end = parsedUrl.searchParams.get(\"end\") || void 0;\n\t\treturn {\n\t\t\ttype: \"ai_conversation\",\n\t\t\torganizationSlug,\n\t\t\tconversationId: decodeURIComponent(conversationId),\n\t\t\tprojectSlugOrId: project,\n\t\t\tspanId,\n\t\t\tstart,\n\t\t\tend\n\t\t};\n\t}\n\tconst replaysIndex = pathParts.indexOf(\"replays\");\n\tif (replaysIndex !== -1) {\n\t\tconst replayId = pathParts[replaysIndex + 1];\n\t\tif (replayId && replayId !== \"selectors\") return {\n\t\t\ttype: \"replay\",\n\t\t\torganizationSlug,\n\t\t\treplayId\n\t\t};\n\t}\n\tconst cronsIndex = pathParts.indexOf(\"crons\");\n\tconst monitorsIndex = pathParts.indexOf(\"monitors\");\n\tconst monitorPathIndex = cronsIndex !== -1 ? cronsIndex : monitorsIndex;\n\tif (monitorPathIndex !== -1) {\n\t\tconst nextPart = pathParts[monitorPathIndex + 1];\n\t\tif (nextPart && nextPart !== \"new\") {\n\t\t\tconst afterNext = pathParts[monitorPathIndex + 2];\n\t\t\tif (afterNext && afterNext !== \"details\") return {\n\t\t\t\ttype: \"monitor\",\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: nextPart,\n\t\t\t\tmonitorSlug: afterNext\n\t\t\t};\n\t\t\treturn {\n\t\t\t\ttype: \"monitor\",\n\t\t\t\torganizationSlug,\n\t\t\t\tmonitorSlug: nextPart\n\t\t\t};\n\t\t}\n\t}\n\tconst releasesIndex = pathParts.indexOf(\"releases\");\n\tif (releasesIndex !== -1) {\n\t\tconst releaseVersion = pathParts[releasesIndex + 1];\n\t\tif (releaseVersion && releaseVersion !== \"new-events\" && releaseVersion !== \"all-events\") return {\n\t\t\ttype: \"release\",\n\t\t\torganizationSlug,\n\t\t\treleaseVersion\n\t\t};\n\t}\n\tconst traceIndex = pathParts.indexOf(\"trace\");\n\tif (traceIndex !== -1) {\n\t\tconst traceId = pathParts[traceIndex + 1];\n\t\tif (traceId) {\n\t\t\tconst nodeParam = parsedUrl.searchParams.get(\"node\");\n\t\t\tlet spanId;\n\t\t\tif (nodeParam?.startsWith(\"span-\")) spanId = nodeParam.slice(5);\n\t\t\treturn {\n\t\t\t\ttype: \"trace\",\n\t\t\t\torganizationSlug,\n\t\t\t\ttraceId,\n\t\t\t\tspanId\n\t\t\t};\n\t\t}\n\t}\n\tif (pathParts.includes(\"performance\") && pathParts.includes(\"summary\")) {\n\t\tconst transaction = parsedUrl.searchParams.get(\"transaction\") || void 0;\n\t\tif (transaction) return {\n\t\t\ttype: \"unknown\",\n\t\t\torganizationSlug,\n\t\t\ttransaction\n\t\t};\n\t}\n\tconst issuesIndex = pathParts.indexOf(\"issues\");\n\tif (issuesIndex !== -1) {\n\t\tconst issueId = pathParts[issuesIndex + 1];\n\t\tif (issueId) {\n\t\t\tconst eventsIndex = pathParts.indexOf(\"events\", issuesIndex);\n\t\t\tif (eventsIndex !== -1) {\n\t\t\t\tconst eventId = pathParts[eventsIndex + 1];\n\t\t\t\tif (eventId) return {\n\t\t\t\t\ttype: \"event\",\n\t\t\t\t\torganizationSlug,\n\t\t\t\t\tissueId,\n\t\t\t\t\teventId\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\ttype: \"issue\",\n\t\t\t\torganizationSlug,\n\t\t\t\tissueId\n\t\t\t};\n\t\t}\n\t}\n\tconst preprodIndex = pathParts.indexOf(\"preprod\");\n\tif (preprodIndex !== -1 && pathParts[preprodIndex + 1] === \"snapshots\") {\n\t\tconst snapshotId = pathParts[preprodIndex + 2];\n\t\tif (snapshotId) {\n\t\t\tconst selectedSnapshot = parsedUrl.searchParams.get(\"selectedSnapshot\") || void 0;\n\t\t\treturn {\n\t\t\t\ttype: \"snapshot\",\n\t\t\t\torganizationSlug,\n\t\t\t\tsnapshotId,\n\t\t\t\tselectedSnapshot\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\ttype: \"unknown\",\n\t\torganizationSlug\n\t};\n}\n/**\n* Checks if a URL appears to be a Sentry profile URL.\n*\n* @param url - URL to check\n* @returns True if the URL looks like a profile URL\n*/\nfunction isProfileUrl(url) {\n\ttry {\n\t\tconst parsed = parseSentryUrl(url);\n\t\treturn parsed.type === \"profile\";\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n//#endregion\nexport { isProfileUrl, parseSentryUrl };\n//# sourceMappingURL=url-helpers-CcAcmPuu.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl, ParamReplayId, ParamReplayUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { resolveScopedOrganizationSlug } from \"./url-scope-CRM5sNo7.js\";\nimport { resolveRegionUrlForOrganization } from \"./resolve-region-url-DutLwiPb.js\";\nimport { parseSentryUrl } from \"./url-helpers-CcAcmPuu.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-replay-details.ts\nconst MAX_ACTIVITY_EVENTS = 6;\nconst MAX_RELATED_ERRORS = 3;\nconst MAX_RELATED_TRACES = 2;\nvar get_replay_details_default = defineTool({\n\tname: \"get_replay_details\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\n\t\t\"org:read\",\n\t\t\"project:read\",\n\t\t\"event:read\"\n\t],\n\trequiredCapabilities: [\"replays\"],\n\tdescription: [\n\t\t\"Get high-level information about a specific Sentry replay by URL or replay ID.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS:\",\n\t\t\"- Share a replay URL\",\n\t\t\"- Ask what happened in a specific replay\",\n\t\t\"- Want a concise replay summary plus the next issue or trace lookups to run\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### With replay URL\",\n\t\t\"```\",\n\t\t\"get_replay_details(replayUrl='https://my-organization.sentry.io/explore/replays/7e07485f-12f9-416b-8b14-26260799b51f/')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### With organization and replay ID\",\n\t\t\"```\",\n\t\t\"get_replay_details(organizationSlug='my-organization', replayId='7e07485f-12f9-416b-8b14-26260799b51f')\",\n\t\t\"```\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\treplayUrl: ParamReplayUrl.optional(),\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\treplayId: ParamReplayId.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst resolved = resolveReplayParams(params);\n\t\tconst regionUrl = await resolveRegionUrlForOrganization({\n\t\t\tcontext,\n\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\tregionUrl: params.regionUrl\n\t\t});\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", resolved.organizationSlug);\n\t\tsetTag(\"replay.id\", resolved.replayId);\n\t\tconst replay = await apiService.getReplayDetails({\n\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\treplayId: resolved.replayId\n\t\t});\n\t\tawait assertReplayWithinProjectConstraint({\n\t\t\tapiService,\n\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\treplay,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tconst isArchived = replay.is_archived === true;\n\t\tconst projectId = replay.project_id != null ? String(replay.project_id) : null;\n\t\tconst hasSegments = (replay.count_segments ?? 0) > 0;\n\t\tconst [{ segments }, relatedIssues, relatedTraces] = await Promise.all([\n\t\t\tfetchReplaySegments({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\treplayId: resolved.replayId,\n\t\t\t\tprojectId,\n\t\t\t\tisArchived,\n\t\t\t\thasSegments\n\t\t\t}),\n\t\t\tfetchReplayIssues({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\terrorIds: replay.error_ids\n\t\t\t}),\n\t\t\tfetchReplayTraces({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\ttraceIds: replay.trace_ids\n\t\t\t})\n\t\t]);\n\t\treturn formatReplayOutput({\n\t\t\treplay,\n\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\treplayUrl: params.replayUrl ?? apiService.getReplayUrl(resolved.organizationSlug, replay.id),\n\t\t\tsegments,\n\t\t\tisArchived,\n\t\t\trelatedIssues,\n\t\t\trelatedTraces\n\t\t});\n\t}\n});\nfunction resolveReplayParams(params) {\n\tif (params.replayUrl) {\n\t\tconst parsed = parseSentryUrl(params.replayUrl);\n\t\tif (parsed.type !== \"replay\" || !parsed.replayId) throw new UserInputError(\"Invalid replay URL. URL must point to a Sentry replay resource.\");\n\t\treturn {\n\t\t\torganizationSlug: resolveScopedOrganizationSlug({\n\t\t\t\tresourceLabel: \"Replay\",\n\t\t\t\tscopedOrganizationSlug: params.organizationSlug,\n\t\t\t\turlOrganizationSlug: parsed.organizationSlug\n\t\t\t}),\n\t\t\treplayId: parsed.replayId\n\t\t};\n\t}\n\tif (!params.organizationSlug || !params.replayId) throw new UserInputError(\"Provide either `replayUrl` or both `organizationSlug` and `replayId`.\");\n\treturn {\n\t\torganizationSlug: params.organizationSlug,\n\t\treplayId: params.replayId\n\t};\n}\nasync function assertReplayWithinProjectConstraint({ apiService, organizationSlug, replay, projectSlug }) {\n\tif (!projectSlug) return;\n\tif (replay.project_id == null) throw new UserInputError(`Replay is outside the active project constraint. Expected project \"${projectSlug}\".`);\n\tconst project = await apiService.getProject({\n\t\torganizationSlug,\n\t\tprojectSlugOrId: projectSlug\n\t});\n\tif (String(project.id) !== String(replay.project_id)) throw new UserInputError(`Replay is outside the active project constraint. Expected project \"${projectSlug}\".`);\n}\nfunction formatReplayOutput({ replay, organizationSlug, replayUrl, segments, isArchived, relatedIssues, relatedTraces }) {\n\tconst lines = [];\n\tconst user = replay.user?.display_name ?? replay.user?.email ?? replay.user?.username ?? replay.user?.id ?? \"Anonymous User\";\n\tconst device = replay.device?.name ?? replay.device?.model ?? replay.device?.family ?? null;\n\tconst activityEvents = extractReplayActivityEvents(segments);\n\tlines.push(`# Replay ${replay.id} in **${organizationSlug}**`);\n\tlines.push(\"\");\n\tlines.push(\"## Summary\");\n\tlines.push(\"\");\n\tlines.push(`- **Replay URL**: ${replayUrl}`);\n\tlines.push(`- **Duration**: ${replay.duration != null ? formatDurationSeconds(replay.duration) : \"Unknown\"}`);\n\tlines.push(`- **Environment**: ${replay.environment ?? \"Unknown\"}`);\n\tlines.push(`- **Browser**: ${formatNameVersion(replay.browser?.name, replay.browser?.version)}`);\n\tlines.push(`- **OS**: ${formatNameVersion(replay.os?.name, replay.os?.version)}`);\n\tlines.push(`- **User**: ${user}`);\n\tif (replay.urls.length > 0) lines.push(`- **URLs**: ${replay.urls.slice(0, 3).join(\", \")}`);\n\tif (device) lines.push(`- **Device**: ${device}`);\n\tif (replay.releases && replay.releases.length > 0) lines.push(`- **Release**: ${replay.releases[0]}`);\n\tif (replay.replay_type) lines.push(`- **Replay Type**: ${replay.replay_type}`);\n\tlines.push(`- **Errors**: ${replay.count_errors ?? 0}`);\n\tlines.push(`- **Rage Clicks**: ${replay.count_rage_clicks ?? 0}`);\n\tlines.push(`- **Dead Clicks**: ${replay.count_dead_clicks ?? 0}`);\n\tlines.push(`- **Warnings**: ${replay.count_warnings ?? 0}`);\n\tlines.push(`- **Infos**: ${replay.count_infos ?? 0}`);\n\tif (replay.count_segments != null) lines.push(`- **Recording Segments**: ${replay.count_segments}`);\n\tlines.push(`- **Archived**: ${isArchived ? \"Yes\" : \"No\"}`);\n\tif (replay.has_viewed != null) lines.push(`- **Viewed**: ${replay.has_viewed ? \"Yes\" : \"No\"}`);\n\tlines.push(\"\");\n\tlines.push(\"## Activity\");\n\tlines.push(\"\");\n\tif (isArchived) lines.push(\"Recording is archived and not available for playback.\");\n\telse if (activityEvents.length > 0) {\n\t\tconst startTime = activityEvents[0]?.timestampMs ?? null;\n\t\tfor (const event of activityEvents) {\n\t\t\tconst prefix = event.timestampMs !== null && startTime !== null ? `${formatRelativeTime(event.timestampMs - startTime)} · ` : \"\";\n\t\t\tconst details = event.details.length > 0 ? ` · ${event.details.join(\" · \")}` : \"\";\n\t\t\tlines.push(`- ${prefix}\\`${event.label}\\`${details}`);\n\t\t}\n\t} else lines.push(\"No activity events recorded.\");\n\tconst hasRelated = relatedIssues.length > 0 || relatedTraces.length > 0;\n\tif (hasRelated) {\n\t\tlines.push(\"\");\n\t\tlines.push(\"## Related\");\n\t\tlines.push(\"\");\n\t\tfor (const ri of relatedIssues) if (ri.issue) lines.push(`- **${ri.issue.shortId}**: ${ri.issue.title}`);\n\t\telse lines.push(`- Event \\`${ri.eventId}\\``);\n\t\tfor (const rt of relatedTraces) {\n\t\t\tconst spanInfo = rt.traceMeta ? ` (${rt.traceMeta.span_count} spans)` : \"\";\n\t\t\tlines.push(`- Trace \\`${rt.traceId}\\`${spanInfo}`);\n\t\t}\n\t\tlines.push(\"\");\n\t\tlines.push(\"Use `get_sentry_resource` to inspect any issue or trace listed above.\");\n\t}\n\treturn lines.join(\"\\n\");\n}\nfunction formatDurationSeconds(durationSeconds) {\n\tif (durationSeconds < 60) return `${durationSeconds}s`;\n\tconst minutes = Math.floor(durationSeconds / 60);\n\tconst seconds = durationSeconds % 60;\n\treturn seconds > 0 ? `${minutes}m ${seconds}s` : `${minutes}m`;\n}\nasync function fetchReplaySegments({ apiService, organizationSlug, replayId, projectId, isArchived, hasSegments }) {\n\tif (isArchived || !projectId || !hasSegments) return { segments: null };\n\ttry {\n\t\tconst segments = await apiService.getReplayRecordingSegments({\n\t\t\torganizationSlug,\n\t\t\tprojectSlugOrId: projectId,\n\t\t\treplayId\n\t\t});\n\t\treturn { segments };\n\t} catch {\n\t\treturn { segments: null };\n\t}\n}\nasync function fetchReplayIssues({ apiService, organizationSlug, errorIds }) {\n\tconst ids = errorIds.slice(0, MAX_RELATED_ERRORS);\n\treturn Promise.all(ids.map(async (eventId) => {\n\t\ttry {\n\t\t\tconst [issue] = await apiService.listIssues({\n\t\t\t\torganizationSlug,\n\t\t\t\tquery: eventId,\n\t\t\t\tlimit: 1\n\t\t\t});\n\t\t\treturn {\n\t\t\t\teventId,\n\t\t\t\tissue: issue ?? null\n\t\t\t};\n\t\t} catch {\n\t\t\treturn {\n\t\t\t\teventId,\n\t\t\t\tissue: null\n\t\t\t};\n\t\t}\n\t}));\n}\nasync function fetchReplayTraces({ apiService, organizationSlug, traceIds }) {\n\tconst ids = traceIds.slice(0, MAX_RELATED_TRACES);\n\treturn Promise.all(ids.map(async (traceId) => {\n\t\ttry {\n\t\t\tconst traceMeta = await apiService.getTraceMeta({\n\t\t\t\torganizationSlug,\n\t\t\t\ttraceId\n\t\t\t});\n\t\t\treturn {\n\t\t\t\ttraceId,\n\t\t\t\ttraceMeta\n\t\t\t};\n\t\t} catch {\n\t\t\treturn {\n\t\t\t\ttraceId,\n\t\t\t\ttraceMeta: null\n\t\t\t};\n\t\t}\n\t}));\n}\nfunction formatNameVersion(name, version) {\n\tif (name && version) return `${name} ${version}`;\n\treturn name ?? version ?? \"Unknown\";\n}\nfunction extractReplayActivityEvents(segments) {\n\tif (!segments) return [];\n\tconst events = [];\n\tfor (const segment of segments) for (const event of segment) {\n\t\tconst replayEvent = summarizeReplayEvent(event);\n\t\tif (replayEvent) events.push(replayEvent);\n\t\tif (events.length >= MAX_ACTIVITY_EVENTS) return events;\n\t}\n\treturn events;\n}\nfunction summarizeReplayEvent(event) {\n\tconst timestampMs = getEventTimestampMillis(event.timestamp);\n\tconst data = event.data;\n\tconst tag = data?.tag ?? \"\";\n\tconst payload = data?.payload ?? null;\n\tif (tag) {\n\t\tconst replayEvent = summarizeTaggedReplayEvent(tag, payload);\n\t\tif (replayEvent) return {\n\t\t\ttimestampMs,\n\t\t\t...replayEvent\n\t\t};\n\t}\n\tif (event.type !== void 0 && data) {\n\t\tconst href = data.href ?? null;\n\t\tif (href) return {\n\t\t\ttimestampMs,\n\t\t\tlabel: \"page.view\",\n\t\t\tdetails: [`href=${href}`]\n\t\t};\n\t}\n\treturn null;\n}\nfunction summarizeTaggedReplayEvent(tag, payload) {\n\tif (tag === \"performanceSpan\") {\n\t\tconst op = firstString(payload?.op);\n\t\tconst description = firstString(payload?.description);\n\t\tconst durationMs = payload?.data?.duration ?? null;\n\t\tif (description || op) return {\n\t\t\tlabel: op ?? \"performanceSpan\",\n\t\t\tdetails: [description ? `description=${description}` : null, durationMs !== null ? `duration_ms=${durationMs}` : null].filter((value) => value !== null)\n\t\t};\n\t}\n\tif (tag === \"ui.click\") {\n\t\tconst message = firstString(payload?.message, payload?.description);\n\t\tif (message) return {\n\t\t\tlabel: tag,\n\t\t\tdetails: [`message=${quoteDetail(message)}`]\n\t\t};\n\t}\n\tconst knownKeys = [\n\t\t\"message\",\n\t\t\"description\",\n\t\t\"category\",\n\t\t\"type\"\n\t];\n\tconst details = [];\n\tfor (const key of knownKeys) {\n\t\tconst value = firstString(payload?.[key]);\n\t\tif (value) details.push(`${key}=${quoteDetail(value)}`);\n\t}\n\tconst extra = summarizeObject(payload, new Set(knownKeys));\n\tif (extra) details.push(extra);\n\treturn details.length > 0 ? {\n\t\tlabel: tag,\n\t\tdetails\n\t} : null;\n}\nfunction getEventTimestampMillis(value) {\n\tif (typeof value !== \"number\") return null;\n\treturn value > 1e12 ? value : value * 1e3;\n}\nfunction formatRelativeTime(offsetMs) {\n\tconst offsetSeconds = Math.max(0, Math.round(offsetMs / 1e3));\n\tif (offsetSeconds < 60) return `T+${offsetSeconds}s`;\n\tconst minutes = Math.floor(offsetSeconds / 60);\n\tconst seconds = offsetSeconds % 60;\n\treturn seconds > 0 ? `T+${minutes}m ${seconds}s` : `T+${minutes}m`;\n}\nfunction summarizeObject(value, excludedKeys = /* @__PURE__ */ new Set()) {\n\tif (!value) return null;\n\tconst entries = Object.entries(value).filter(([key, nested]) => !excludedKeys.has(key) && (typeof nested === \"string\" || typeof nested === \"number\")).slice(0, 3).map(([key, nested]) => `${key}=${nested}`);\n\treturn entries.length > 0 ? `payload=${quoteDetail(entries.join(\", \"))}` : null;\n}\nfunction firstString(...values) {\n\tfor (const value of values) if (typeof value === \"string\" && value.trim()) return value.trim();\n\treturn null;\n}\nfunction quoteDetail(value) {\n\treturn JSON.stringify(value.trim());\n}\n\n//#endregion\nexport { get_replay_details_default, resolveReplayParams };\n//# sourceMappingURL=get-replay-details-BWeEKq_j.js.map","import { ParamAttachmentId, ParamEventId, ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { blobToBase64 } from \"./blob-utils-CdbE_jsd.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-event-attachment.ts\nvar get_event_attachment_default = defineTool({\n\tname: \"get_event_attachment\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Download attachments from a Sentry event.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Download files attached to a specific event\",\n\t\t\"- Access screenshots, log files, or other attachments uploaded with an error report\",\n\t\t\"- Retrieve attachment metadata and download URLs\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Download a specific attachment by ID\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### List all attachments for an event\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource\",\n\t\t\"- If `attachmentId` is omitted, all attachments for the event will be listed with download information\",\n\t\t\"- The `projectSlug` is required to identify which project the event belongs to\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tprojectSlug: ParamProjectSlug,\n\t\teventId: ParamEventId,\n\t\tattachmentId: ParamAttachmentId.nullable().default(null),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tif (params.attachmentId) {\n\t\t\tconst attachment = await apiService.getEventAttachment({\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tprojectSlug: params.projectSlug,\n\t\t\t\teventId: params.eventId,\n\t\t\t\tattachmentId: params.attachmentId\n\t\t\t});\n\t\t\tconst contentParts = [];\n\t\t\tconst effectiveMimeType = attachment.contentType;\n\t\t\tconst isBinary = !effectiveMimeType.startsWith(\"text/\");\n\t\t\tif (isBinary) {\n\t\t\t\tconst isImage = effectiveMimeType.startsWith(\"image/\");\n\t\t\t\tconst base64 = await blobToBase64(attachment.blob);\n\t\t\t\tif (isImage) {\n\t\t\t\t\tconst image = {\n\t\t\t\t\t\ttype: \"image\",\n\t\t\t\t\t\tmimeType: effectiveMimeType,\n\t\t\t\t\t\tdata: base64\n\t\t\t\t\t};\n\t\t\t\t\tcontentParts.push(image);\n\t\t\t\t} else {\n\t\t\t\t\tconst resource = {\n\t\t\t\t\t\ttype: \"resource\",\n\t\t\t\t\t\tresource: {\n\t\t\t\t\t\t\turi: `file://${attachment.filename}`,\n\t\t\t\t\t\t\tmimeType: effectiveMimeType,\n\t\t\t\t\t\t\tblob: base64\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tcontentParts.push(resource);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet output$1 = `# Event Attachment Download\\n\\n`;\n\t\t\toutput$1 += `**Event ID:** ${params.eventId}\\n`;\n\t\t\toutput$1 += `**Attachment ID:** ${params.attachmentId}\\n`;\n\t\t\toutput$1 += `**Filename:** ${attachment.filename}\\n`;\n\t\t\toutput$1 += `**Type:** ${attachment.attachment.type}\\n`;\n\t\t\toutput$1 += `**Size:** ${attachment.attachment.size} bytes\\n`;\n\t\t\toutput$1 += `**MIME Type:** ${effectiveMimeType}\\n`;\n\t\t\toutput$1 += `**Created:** ${attachment.attachment.dateCreated}\\n\\n`;\n\t\t\toutput$1 += `**Download URL:** ${attachment.downloadUrl}\\n\\n`;\n\t\t\tif (isBinary) {\n\t\t\t\toutput$1 += `## Binary Content\\n\\n`;\n\t\t\t\toutput$1 += `The attachment is included as a resource and accessible through your client.\\n`;\n\t\t\t} else {\n\t\t\t\tconst textContent = await attachment.blob.text();\n\t\t\t\toutput$1 += `## File Content\\n\\n`;\n\t\t\t\toutput$1 += `\\`\\`\\`\\n${textContent}\\n\\`\\`\\`\\n\\n`;\n\t\t\t}\n\t\t\tconst text = {\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: output$1\n\t\t\t};\n\t\t\tcontentParts.push(text);\n\t\t\treturn contentParts;\n\t\t}\n\t\tconst attachments = await apiService.listEventAttachments({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\teventId: params.eventId\n\t\t});\n\t\tlet output = `# Event Attachments\\n\\n`;\n\t\toutput += `**Event ID:** ${params.eventId}\\n`;\n\t\toutput += `**Project:** ${params.projectSlug}\\n\\n`;\n\t\tif (attachments.length === 0) {\n\t\t\toutput += \"No attachments found for this event.\\n\";\n\t\t\treturn output;\n\t\t}\n\t\toutput += `Found ${attachments.length} attachment(s):\\n\\n`;\n\t\tattachments.forEach((attachment, index) => {\n\t\t\toutput += `## Attachment ${index + 1}\\n\\n`;\n\t\t\toutput += `**ID:** ${attachment.id}\\n`;\n\t\t\toutput += `**Name:** ${attachment.name}\\n`;\n\t\t\toutput += `**Type:** ${attachment.type}\\n`;\n\t\t\toutput += `**Size:** ${attachment.size} bytes\\n`;\n\t\t\toutput += `**MIME Type:** ${attachment.mimetype}\\n`;\n\t\t\toutput += `**Created:** ${attachment.dateCreated}\\n\\n`;\n\t\t\toutput += \"To download this attachment with the attachmentId provided:\\n\";\n\t\t\toutput += `${formatToolCallInstruction({\n\t\t\t\ttoolName: \"get_event_attachment\",\n\t\t\t\targuments: {\n\t\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\t\tprojectSlug: params.projectSlug,\n\t\t\t\t\teventId: params.eventId,\n\t\t\t\t\tattachmentId: attachment.id\n\t\t\t\t},\n\t\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\t\tdirectToolNames: context.directToolNames\n\t\t\t})}\\n\\n`;\n\t\t});\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { get_event_attachment_default };\n//# sourceMappingURL=get-event-attachment-h8oTTPZt.js.map","//#region src/internal/tool-helpers/formatting.ts\n/**\n* Helper function to format assignedTo field for display\n*/\nfunction formatAssignedTo(assignedTo) {\n\tif (!assignedTo) return \"Unassigned\";\n\tif (typeof assignedTo === \"string\") return assignedTo;\n\tif (typeof assignedTo === \"object\" && assignedTo.name) return assignedTo.name;\n\treturn \"Unknown\";\n}\n\n//#endregion\nexport { formatAssignedTo };\n//# sourceMappingURL=formatting-Dh3LlFmw.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamAssignedTo, ParamIgnoreCount, ParamIgnoreDurationMinutes, ParamIgnoreUserCount, ParamIgnoreUserWindowMinutes, ParamIgnoreWindowMinutes, ParamIssueIgnoreMode, ParamIssueShortId, ParamIssueStatus, ParamIssueUrl, ParamOrganizationSlug, ParamReason, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { logIssue } from \"./logging-B7X3yL0T.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { parseIssueParams } from \"./issue-helpers-0Dnme3Ym.js\";\nimport { assertIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { formatAssignedTo } from \"./formatting-Dh3LlFmw.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/update-issue.ts\nfunction pluralize(value, noun) {\n\treturn `${value} ${noun}${value === 1 ? \"\" : \"s\"}`;\n}\nfunction hasExplicitIgnoreChange(params) {\n\treturn params.ignoreMode !== void 0 || params.ignoreDurationMinutes !== void 0 || params.ignoreCount !== void 0 || params.ignoreWindowMinutes !== void 0 || params.ignoreUserCount !== void 0 || params.ignoreUserWindowMinutes !== void 0;\n}\nfunction inferIgnoreMode(params) {\n\tif (params.ignoreMode) return params.ignoreMode;\n\tif (params.ignoreDurationMinutes !== void 0) return \"forDuration\";\n\tif (params.ignoreCount !== void 0 || params.ignoreWindowMinutes !== void 0) return \"untilOccurrenceCount\";\n\tif (params.ignoreUserCount !== void 0 || params.ignoreUserWindowMinutes !== void 0) return \"untilUserCount\";\n\treturn \"untilEscalating\";\n}\nfunction getIssueStatusDetails(issue) {\n\tconst statusDetails = issue.statusDetails;\n\tif (statusDetails && typeof statusDetails === \"object\" && !Array.isArray(statusDetails)) return statusDetails;\n\treturn {};\n}\nfunction getStatusDetailNumber(statusDetails, key) {\n\tconst value = statusDetails[key];\n\tif (typeof value === \"number\") return value;\n\treturn void 0;\n}\nfunction getStatusDetailString(statusDetails, key) {\n\tconst value = statusDetails[key];\n\tif (typeof value === \"string\" && value.length > 0) return value;\n\treturn void 0;\n}\nfunction formatIgnoreUntil(ignoreUntil) {\n\tconst date = new Date(ignoreUntil);\n\tif (Number.isNaN(date.getTime())) return ignoreUntil;\n\treturn `${date.toISOString().slice(0, 19).replace(\"T\", \" \")} UTC`;\n}\nfunction getIssueStatusDisplay(issue) {\n\tconst statusDetails = getIssueStatusDetails(issue);\n\tif (issue.status === \"resolved\" && statusDetails.inNextRelease === true) return \"resolvedInNextRelease\";\n\treturn issue.status;\n}\nfunction getIgnoreStateFromUpdate(ignoreUpdate) {\n\tif (!ignoreUpdate) return null;\n\tswitch (ignoreUpdate.substatus) {\n\t\tcase \"archived_until_escalating\": return {\n\t\t\tfamily: \"untilEscalating\",\n\t\t\tbehavior: ignoreUpdate.behavior,\n\t\t\tmessage: ignoreUpdate.message\n\t\t};\n\t\tcase \"archived_forever\": return {\n\t\t\tfamily: \"forever\",\n\t\t\tbehavior: ignoreUpdate.behavior,\n\t\t\tmessage: ignoreUpdate.message\n\t\t};\n\t\tcase \"archived_until_condition_met\": return {\n\t\t\tfamily: \"condition\",\n\t\t\tbehavior: ignoreUpdate.behavior,\n\t\t\tmessage: ignoreUpdate.message\n\t\t};\n\t}\n}\nfunction getIgnoreState(issue, fallbackIgnoreUpdate) {\n\tif (issue.status !== \"ignored\") return null;\n\tconst statusDetails = getIssueStatusDetails(issue);\n\tconst ignoreUntil = getStatusDetailString(statusDetails, \"ignoreUntil\");\n\tconst ignoreDuration = getStatusDetailNumber(statusDetails, \"ignoreDuration\");\n\tconst ignoreCount = getStatusDetailNumber(statusDetails, \"ignoreCount\");\n\tconst ignoreWindow = getStatusDetailNumber(statusDetails, \"ignoreWindow\");\n\tconst ignoreUserCount = getStatusDetailNumber(statusDetails, \"ignoreUserCount\");\n\tconst ignoreUserWindow = getStatusDetailNumber(statusDetails, \"ignoreUserWindow\");\n\tif (issue.substatus === \"archived_until_escalating\" || statusDetails.ignoreUntilEscalating === true) return {\n\t\tfamily: \"untilEscalating\",\n\t\tbehavior: \"Until escalating\",\n\t\tmessage: \"The issue is now ignored until it escalates\"\n\t};\n\tif (issue.substatus === \"archived_forever\") return {\n\t\tfamily: \"forever\",\n\t\tbehavior: \"Forever\",\n\t\tmessage: \"The issue is now ignored indefinitely\"\n\t};\n\tif (ignoreUntil) {\n\t\tconst formattedIgnoreUntil = formatIgnoreUntil(ignoreUntil);\n\t\treturn {\n\t\t\tfamily: \"condition\",\n\t\t\tbehavior: `Until ${formattedIgnoreUntil}`,\n\t\t\tmessage: `The issue is now ignored until ${formattedIgnoreUntil}`\n\t\t};\n\t}\n\tif (ignoreDuration !== void 0) return {\n\t\tfamily: \"condition\",\n\t\tbehavior: `For ${pluralize(ignoreDuration, \"minute\")}`,\n\t\tmessage: `The issue is now ignored for ${pluralize(ignoreDuration, \"minute\")}`\n\t};\n\tif (ignoreCount !== void 0 && ignoreWindow !== void 0) return {\n\t\tfamily: \"condition\",\n\t\tbehavior: `Until it occurs ${pluralize(ignoreCount, \"time\")} in ${pluralize(ignoreWindow, \"minute\")}`,\n\t\tmessage: `The issue is now ignored until it occurs ${pluralize(ignoreCount, \"time\")} in ${pluralize(ignoreWindow, \"minute\")}`\n\t};\n\tif (ignoreCount !== void 0) return {\n\t\tfamily: \"condition\",\n\t\tbehavior: `Until it occurs ${pluralize(ignoreCount, \"more time\")}`,\n\t\tmessage: `The issue is now ignored until it occurs ${pluralize(ignoreCount, \"more time\")}`\n\t};\n\tif (ignoreUserCount !== void 0 && ignoreUserWindow !== void 0) return {\n\t\tfamily: \"condition\",\n\t\tbehavior: `Until it affects ${pluralize(ignoreUserCount, \"user\")} in ${pluralize(ignoreUserWindow, \"minute\")}`,\n\t\tmessage: `The issue is now ignored until it affects ${pluralize(ignoreUserCount, \"user\")} in ${pluralize(ignoreUserWindow, \"minute\")}`\n\t};\n\tif (ignoreUserCount !== void 0) return {\n\t\tfamily: \"condition\",\n\t\tbehavior: `Until it affects ${pluralize(ignoreUserCount, \"more user\")}`,\n\t\tmessage: `The issue is now ignored until it affects ${pluralize(ignoreUserCount, \"more user\")}`\n\t};\n\tif (issue.substatus === \"archived_until_condition_met\") return getIgnoreStateFromUpdate(fallbackIgnoreUpdate) ?? {\n\t\tfamily: \"condition\",\n\t\tbehavior: \"Until the ignore condition is met\",\n\t\tmessage: \"The issue is now ignored until the configured condition is met\"\n\t};\n\treturn {\n\t\tfamily: \"forever\",\n\t\tbehavior: \"Forever\",\n\t\tmessage: \"The issue is now ignored indefinitely\"\n\t};\n}\nfunction buildNoChangesOutput(params) {\n\tconst { issue, organizationSlug, ignoreState, issueUrl } = params;\n\tlet output = `# Issue ${issue.shortId} Already Matches Requested State in **${organizationSlug}**\\n\\n`;\n\toutput += `**Issue**: ${issue.title}\\n`;\n\toutput += `**URL**: ${issueUrl}\\n\\n`;\n\toutput += \"## Changes Made\\n\\n\";\n\toutput += \"No changes were needed.\\n\";\n\toutput += \"\\n## Current Status\\n\\n\";\n\toutput += `**Status**: ${getIssueStatusDisplay(issue)}\\n`;\n\tif (ignoreState) output += `**Ignore Behavior**: ${ignoreState.behavior}\\n`;\n\toutput += `**Assigned To**: ${formatAssignedTo(issue.assignedTo ?? null)}\\n`;\n\toutput += \"\\n## Response Notes\\n\\n\";\n\toutput += \"- The issue already matched the requested state.\\n\";\n\toutput += `- Full issue details: \\`get_sentry_resource(resourceType=\"issue\", organizationSlug=\"${organizationSlug}\", resourceId=\"${issue.shortId}\")\\`\\n`;\n\treturn output;\n}\nfunction isAssigneeAlreadySet(issue, requestedAssignee, currentUserId) {\n\tif (!requestedAssignee || !issue.assignedTo) return false;\n\tif (typeof issue.assignedTo === \"string\") return issue.assignedTo === requestedAssignee;\n\tif (requestedAssignee === \"me\") return issue.assignedTo.type === \"user\" && currentUserId !== void 0 && String(issue.assignedTo.id) === currentUserId;\n\tif (requestedAssignee.startsWith(\"user:\")) return issue.assignedTo.type === \"user\" && String(issue.assignedTo.id) === requestedAssignee.slice(5);\n\tif (requestedAssignee.startsWith(\"team:\")) {\n\t\tconst requestedTeam = requestedAssignee.slice(5);\n\t\treturn issue.assignedTo.type === \"team\" && (String(issue.assignedTo.id) === requestedTeam || issue.assignedTo.name === requestedTeam);\n\t}\n\treturn false;\n}\nfunction getIgnoreFamily(ignoreUpdate) {\n\tswitch (ignoreUpdate?.substatus) {\n\t\tcase \"archived_until_escalating\": return \"untilEscalating\";\n\t\tcase \"archived_forever\": return \"forever\";\n\t\tcase \"archived_until_condition_met\": return \"condition\";\n\t\tdefault: return void 0;\n\t}\n}\nfunction isIgnoreBehaviorAlreadySet(currentIgnoreState, ignoreUpdate) {\n\tconst requestedIgnoreState = getIgnoreStateFromUpdate(ignoreUpdate);\n\treturn currentIgnoreState !== null && requestedIgnoreState !== null && currentIgnoreState.family === requestedIgnoreState.family && currentIgnoreState.behavior === requestedIgnoreState.behavior;\n}\nfunction buildIgnoreUpdate(params, options) {\n\tconst hasIgnoreOptions = hasExplicitIgnoreChange(params);\n\tif (!hasIgnoreOptions) {\n\t\tif (params.status === \"ignored\" && options.applyDefaultIgnoredMode) return {\n\t\t\tsubstatus: \"archived_until_escalating\",\n\t\t\tbehavior: \"Until escalating\",\n\t\t\tmessage: \"The issue is now ignored until it escalates\"\n\t\t};\n\t\treturn void 0;\n\t}\n\tif (params.status !== \"ignored\") throw new UserInputError(\"Ignore options can only be used when `status` is `ignored`\");\n\tif (params.ignoreWindowMinutes !== void 0 && params.ignoreCount === void 0) throw new UserInputError(\"`ignoreWindowMinutes` requires `ignoreCount`\");\n\tif (params.ignoreUserWindowMinutes !== void 0 && params.ignoreUserCount === void 0) throw new UserInputError(\"`ignoreUserWindowMinutes` requires `ignoreUserCount`\");\n\tconst usesDuration = params.ignoreDurationMinutes !== void 0;\n\tconst usesOccurrence = params.ignoreCount !== void 0 || params.ignoreWindowMinutes !== void 0;\n\tconst usesUserCount = params.ignoreUserCount !== void 0 || params.ignoreUserWindowMinutes !== void 0;\n\tconst configuredIgnoreFamilies = [\n\t\tusesDuration,\n\t\tusesOccurrence,\n\t\tusesUserCount\n\t].filter(Boolean).length;\n\tif (configuredIgnoreFamilies > 1) throw new UserInputError(\"Choose only one ignore condition: duration, occurrence count, or user count\");\n\tconst ignoreMode = inferIgnoreMode(params);\n\tswitch (ignoreMode) {\n\t\tcase \"untilEscalating\":\n\t\t\tif (configuredIgnoreFamilies > 0) throw new UserInputError(\"`ignoreMode='untilEscalating'` cannot be combined with ignore duration, occurrence, or user-count conditions\");\n\t\t\treturn {\n\t\t\t\tsubstatus: \"archived_until_escalating\",\n\t\t\t\tbehavior: \"Until escalating\",\n\t\t\t\tmessage: \"The issue is now ignored until it escalates\"\n\t\t\t};\n\t\tcase \"forever\":\n\t\t\tif (configuredIgnoreFamilies > 0) throw new UserInputError(\"`ignoreMode='forever'` cannot be combined with ignore duration, occurrence, or user-count conditions\");\n\t\t\treturn {\n\t\t\t\tsubstatus: \"archived_forever\",\n\t\t\t\tbehavior: \"Forever\",\n\t\t\t\tmessage: \"The issue is now ignored indefinitely\"\n\t\t\t};\n\t\tcase \"forDuration\":\n\t\t\tif (params.ignoreDurationMinutes === void 0) throw new UserInputError(\"`ignoreMode='forDuration'` requires `ignoreDurationMinutes`\");\n\t\t\tif (usesOccurrence || usesUserCount) throw new UserInputError(\"`ignoreMode='forDuration'` cannot be combined with ignore occurrence or user-count conditions\");\n\t\t\treturn {\n\t\t\t\tsubstatus: \"archived_until_condition_met\",\n\t\t\t\tignoreDuration: params.ignoreDurationMinutes,\n\t\t\t\tbehavior: `For ${pluralize(params.ignoreDurationMinutes, \"minute\")}`,\n\t\t\t\tmessage: `The issue is now ignored for ${pluralize(params.ignoreDurationMinutes, \"minute\")}`\n\t\t\t};\n\t\tcase \"untilOccurrenceCount\":\n\t\t\tif (params.ignoreCount === void 0) throw new UserInputError(\"`ignoreMode='untilOccurrenceCount'` requires `ignoreCount`\");\n\t\t\tif (usesDuration || usesUserCount) throw new UserInputError(\"`ignoreMode='untilOccurrenceCount'` cannot be combined with ignore duration or user-count conditions\");\n\t\t\treturn {\n\t\t\t\tsubstatus: \"archived_until_condition_met\",\n\t\t\t\tignoreCount: params.ignoreCount,\n\t\t\t\tignoreWindow: params.ignoreWindowMinutes,\n\t\t\t\tbehavior: params.ignoreWindowMinutes === void 0 ? `Until it occurs ${pluralize(params.ignoreCount, \"more time\")}` : `Until it occurs ${pluralize(params.ignoreCount, \"time\")} in ${pluralize(params.ignoreWindowMinutes, \"minute\")}`,\n\t\t\t\tmessage: params.ignoreWindowMinutes === void 0 ? `The issue is now ignored until it occurs ${pluralize(params.ignoreCount, \"more time\")}` : `The issue is now ignored until it occurs ${pluralize(params.ignoreCount, \"time\")} in ${pluralize(params.ignoreWindowMinutes, \"minute\")}`\n\t\t\t};\n\t\tcase \"untilUserCount\":\n\t\t\tif (params.ignoreUserCount === void 0) throw new UserInputError(\"`ignoreMode='untilUserCount'` requires `ignoreUserCount`\");\n\t\t\tif (usesDuration || usesOccurrence) throw new UserInputError(\"`ignoreMode='untilUserCount'` cannot be combined with ignore duration or occurrence conditions\");\n\t\t\treturn {\n\t\t\t\tsubstatus: \"archived_until_condition_met\",\n\t\t\t\tignoreUserCount: params.ignoreUserCount,\n\t\t\t\tignoreUserWindow: params.ignoreUserWindowMinutes,\n\t\t\t\tbehavior: params.ignoreUserWindowMinutes === void 0 ? `Until it affects ${pluralize(params.ignoreUserCount, \"more user\")}` : `Until it affects ${pluralize(params.ignoreUserCount, \"user\")} in ${pluralize(params.ignoreUserWindowMinutes, \"minute\")}`,\n\t\t\t\tmessage: params.ignoreUserWindowMinutes === void 0 ? `The issue is now ignored until it affects ${pluralize(params.ignoreUserCount, \"more user\")}` : `The issue is now ignored until it affects ${pluralize(params.ignoreUserCount, \"user\")} in ${pluralize(params.ignoreUserWindowMinutes, \"minute\")}`\n\t\t\t};\n\t}\n\tthrow new UserInputError(\"Unsupported ignore mode\");\n}\nasync function tryPostReasonComment(apiService, organizationSlug, issueId, reason) {\n\tif (!reason) return {\n\t\tposted: false,\n\t\tskipped: true\n\t};\n\ttry {\n\t\tawait apiService.createIssueComment({\n\t\t\torganizationSlug,\n\t\t\tissueId,\n\t\t\ttext: reason\n\t\t});\n\t\treturn { posted: true };\n\t} catch (error) {\n\t\tlogIssue(error);\n\t\treturn {\n\t\t\tposted: false,\n\t\t\terror: error instanceof Error ? error.message : String(error)\n\t\t};\n\t}\n}\nfunction formatReasonCommentLine(reason, result) {\n\tif (!reason || \"skipped\" in result && result.skipped) return \"\";\n\tif (result.posted) return `- **Comment posted**: \"${reason}\"\\n`;\n\tif (\"error\" in result) return `- **Comment not posted**: ${result.error}\\n`;\n\treturn \"\";\n}\nvar update_issue_default = defineTool({\n\tname: \"update_issue\",\n\tskills: [\"triage\"],\n\trequiredScopes: [\"event:write\"],\n\tdescription: [\n\t\t\"Update a Sentry issue's status or assignment.\",\n\t\t\"\",\n\t\t\"Use this to resolve, reopen, assign, or ignore an issue.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"```\",\n\t\t\"update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='resolved')\",\n\t\t\"update_issue(organizationSlug='my-org', issueId='PROJECT-123', assignedTo='user:123456')\",\n\t\t\"update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='ignored')\",\n\t\t\"update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='ignored', ignoreMode='forever')\",\n\t\t\"update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='ignored', ignoreMode='untilOccurrenceCount', ignoreCount=100, ignoreWindowMinutes=60)\",\n\t\t\"update_issue(organizationSlug='my-org', issueId='PROJECT-123', status='ignored', reason='Ignoring because this is expected noise from the staging deploy')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Provide `issueUrl` or `organizationSlug` + `issueId`.\",\n\t\t\"- At least one of `status` or `assignedTo` is required.\",\n\t\t\"- `assignedTo` format: `user:ID` or `team:ID_OR_SLUG`.\",\n\t\t\"- Use `execute_sentry_tool(name='whoami', arguments={})` to find your user ID for self-assignment.\",\n\t\t\"- Status values: `resolved`, `resolvedInNextRelease`, `unresolved`, `ignored`.\",\n\t\t\"- `status='ignored'` defaults to `ignoreMode='untilEscalating'`.\",\n\t\t\"- Ignore modes: `untilEscalating`, `forever`, `forDuration`, `untilOccurrenceCount`, `untilUserCount`.\",\n\t\t\"- Matching ignore inputs are `ignoreDurationMinutes`, `ignoreCount` + optional `ignoreWindowMinutes`, or `ignoreUserCount` + optional `ignoreUserWindowMinutes`.\",\n\t\t\"- To switch an already ignored issue between `untilEscalating`, `forever`, and condition-based ignore modes, first set `status='unresolved'`, then ignore it again with the new rule.\",\n\t\t\"- `reason` is optional. When provided, it will be posted as a comment on the issue's activity feed explaining why the action was taken.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\tstatus: ParamIssueStatus.optional(),\n\t\tassignedTo: ParamAssignedTo.optional(),\n\t\tignoreMode: ParamIssueIgnoreMode.optional(),\n\t\tignoreDurationMinutes: ParamIgnoreDurationMinutes.optional(),\n\t\tignoreCount: ParamIgnoreCount.optional(),\n\t\tignoreWindowMinutes: ParamIgnoreWindowMinutes.optional(),\n\t\tignoreUserCount: ParamIgnoreUserCount.optional(),\n\t\tignoreUserWindowMinutes: ParamIgnoreUserWindowMinutes.optional(),\n\t\treason: ParamReason.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tif (!params.issueUrl && !params.issueId) throw new UserInputError(\"Either `issueId` or `issueUrl` must be provided\");\n\t\tif (!params.issueUrl && !params.organizationSlug) throw new UserInputError(\"`organizationSlug` is required when providing `issueId`\");\n\t\tif (!params.status && !params.assignedTo) throw new UserInputError(\"At least one of `status` or `assignedTo` must be provided to update the issue\");\n\t\tconst { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tissueId: params.issueId,\n\t\t\tissueUrl: params.issueUrl\n\t\t});\n\t\tsetTag(\"organization.slug\", orgSlug);\n\t\tconst currentIssue = await apiService.getIssue({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: parsedIssueId\n\t\t});\n\t\tassertIssueWithinProjectConstraint({\n\t\t\tissue: currentIssue,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tconst currentIgnoreState = getIgnoreState(currentIssue);\n\t\tconst assignmentAlreadySet = isAssigneeAlreadySet(currentIssue, params.assignedTo, context.userId);\n\t\tconst ignoreUpdate = buildIgnoreUpdate(params, { applyDefaultIgnoredMode: params.status === \"ignored\" && currentIssue.status !== \"ignored\" });\n\t\tconst requestedIgnoreFamily = getIgnoreFamily(ignoreUpdate);\n\t\tconst ignoreBehaviorAlreadySet = isIgnoreBehaviorAlreadySet(currentIgnoreState, ignoreUpdate);\n\t\tconst statusAlreadySet = params.status !== void 0 && params.status !== \"ignored\" && getIssueStatusDisplay(currentIssue) === params.status;\n\t\tlet updateStatus = statusAlreadySet ? void 0 : params.status;\n\t\tconst updateAssignedTo = assignmentAlreadySet ? void 0 : params.assignedTo;\n\t\tlet updateIgnore = ignoreUpdate;\n\t\tif (currentIssue.status === \"ignored\" && params.status === \"ignored\") {\n\t\t\tif (!hasExplicitIgnoreChange(params)) {\n\t\t\t\tupdateStatus = void 0;\n\t\t\t\tupdateIgnore = void 0;\n\t\t\t} else if (ignoreBehaviorAlreadySet) {\n\t\t\t\tupdateStatus = void 0;\n\t\t\t\tupdateIgnore = void 0;\n\t\t\t} else if (currentIgnoreState && requestedIgnoreFamily && currentIgnoreState.family !== requestedIgnoreFamily) throw new UserInputError(\"Changing ignore behavior on an already ignored issue between `untilEscalating`, `forever`, and condition-based modes is not supported. First set `status` to `unresolved`, then ignore it again with the new rule.\");\n\t\t}\n\t\tconst requestedIssueUrl = apiService.getIssueUrl(orgSlug, currentIssue.shortId);\n\t\tif (!updateStatus && !updateAssignedTo && !updateIgnore) {\n\t\t\tconst commentResult$1 = await tryPostReasonComment(apiService, orgSlug, parsedIssueId, params.reason);\n\t\t\treturn buildNoChangesOutput({\n\t\t\t\tissue: currentIssue,\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tignoreState: currentIgnoreState,\n\t\t\t\tissueUrl: requestedIssueUrl\n\t\t\t}) + formatReasonCommentLine(params.reason, commentResult$1);\n\t\t}\n\t\tconst updatedIssue = await apiService.updateIssue({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: parsedIssueId,\n\t\t\tstatus: updateStatus,\n\t\t\tassignedTo: updateAssignedTo,\n\t\t\tsubstatus: updateIgnore?.substatus,\n\t\t\tignoreDuration: updateIgnore?.ignoreDuration,\n\t\t\tignoreCount: updateIgnore?.ignoreCount,\n\t\t\tignoreWindow: updateIgnore?.ignoreWindow,\n\t\t\tignoreUserCount: updateIgnore?.ignoreUserCount,\n\t\t\tignoreUserWindow: updateIgnore?.ignoreUserWindow\n\t\t});\n\t\tconst commentResult = await tryPostReasonComment(apiService, orgSlug, parsedIssueId, params.reason);\n\t\tconst updatedIgnoreState = getIgnoreState(updatedIssue, ignoreUpdate);\n\t\tconst currentStatusDisplay = getIssueStatusDisplay(currentIssue);\n\t\tconst updatedStatusDisplay = getIssueStatusDisplay(updatedIssue);\n\t\tconst statusChanged = currentStatusDisplay !== updatedStatusDisplay;\n\t\tconst assignmentChanged = formatAssignedTo(currentIssue.assignedTo ?? null) !== formatAssignedTo(updatedIssue.assignedTo ?? null);\n\t\tconst ignoreBehaviorChanged = currentIgnoreState?.behavior !== updatedIgnoreState?.behavior;\n\t\tlet output = `# Issue ${updatedIssue.shortId} Updated in **${orgSlug}**\\n\\n`;\n\t\toutput += `**Issue**: ${updatedIssue.title}\\n`;\n\t\toutput += `**URL**: ${apiService.getIssueUrl(orgSlug, updatedIssue.shortId)}\\n\\n`;\n\t\toutput += \"## Changes Made\\n\\n\";\n\t\tif (statusChanged) output += `**Status**: ${currentStatusDisplay} → **${updatedStatusDisplay}**\\n`;\n\t\tif (updatedIgnoreState && (statusChanged || ignoreBehaviorChanged) && (ignoreBehaviorChanged || params.status === \"ignored\")) if (currentIgnoreState && ignoreBehaviorChanged) output += `**Ignore Behavior**: ${currentIgnoreState.behavior} → **${updatedIgnoreState.behavior}**\\n`;\n\t\telse output += `**Ignore Behavior**: **${updatedIgnoreState.behavior}**\\n`;\n\t\tif (updateAssignedTo && assignmentChanged) {\n\t\t\tconst oldAssignee = formatAssignedTo(currentIssue.assignedTo ?? null);\n\t\t\tconst newAssignee = params.assignedTo === \"me\" ? \"You\" : formatAssignedTo(updatedIssue.assignedTo ?? null);\n\t\t\toutput += `**Assigned To**: ${oldAssignee} → **${newAssignee}**\\n`;\n\t\t}\n\t\toutput += \"\\n## Current Status\\n\\n\";\n\t\toutput += `**Status**: ${updatedStatusDisplay}\\n`;\n\t\tif (updatedIgnoreState) output += `**Ignore Behavior**: ${updatedIgnoreState.behavior}\\n`;\n\t\tconst currentAssignee = formatAssignedTo(updatedIssue.assignedTo ?? null);\n\t\toutput += `**Assigned To**: ${currentAssignee}\\n`;\n\t\toutput += \"\\n## Response Notes\\n\\n\";\n\t\toutput += `- The issue has been updated in Sentry.\\n`;\n\t\toutput += `- Full issue details: \\`get_sentry_resource(resourceType=\"issue\", organizationSlug=\"${orgSlug}\", resourceId=\"${updatedIssue.shortId}\")\\`\\n`;\n\t\tif (statusChanged && updatedStatusDisplay === \"resolved\") output += `- The issue is now marked as resolved and will no longer generate alerts\\n`;\n\t\telse if (statusChanged && updatedStatusDisplay === \"resolvedInNextRelease\") output += `- The issue is now marked as resolved in the upcoming release\\n`;\n\t\telse if (updatedIgnoreState && params.status === \"ignored\" && (statusChanged || ignoreBehaviorChanged)) output += `- ${updatedIgnoreState.message}\\n`;\n\t\toutput += formatReasonCommentLine(params.reason, commentResult);\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { update_issue_default };\n//# sourceMappingURL=update-issue-q9a5YNJb.js.map","import { AgentExecutionError, LLMProviderError } from \"./errors-CEDWDXew.js\";\nimport { logWarn } from \"./logging-B7X3yL0T.js\";\n\n//#region src/internal/agents/provider-fallback.ts\n/**\n* Run an optional embedded-agent rewrite and fall back to the caller's direct\n* behavior when the agent cannot complete the rewrite.\n*\n* - `LLMProviderError`: expected provider outage/quota/config. Log a warning\n*   and continue with the caller's direct behavior.\n* - `AgentExecutionError`: unexpected agent failure that already created a\n*   Sentry issue at the agent boundary. Fall back without filing another issue.\n* - Other errors still bubble (for example programming errors outside the agent).\n*/\nasync function withProviderFallback({ operation, fallback, onFallback, run }) {\n\ttry {\n\t\treturn await run();\n\t} catch (error) {\n\t\tif (error instanceof LLMProviderError) {\n\t\t\tlogWarn(error, {\n\t\t\t\tloggerScope: [\"agents\", \"provider-fallback\"],\n\t\t\t\tcontexts: { aiProviderFallback: { operation } }\n\t\t\t});\n\t\t\tonFallback?.();\n\t\t\treturn fallback();\n\t\t}\n\t\tif (error instanceof AgentExecutionError) {\n\t\t\tlogWarn(error, {\n\t\t\t\tloggerScope: [\"agents\", \"provider-fallback\"],\n\t\t\t\tcontexts: { aiProviderFallback: {\n\t\t\t\t\toperation,\n\t\t\t\t\tunexpectedAgentFailure: true,\n\t\t\t\t\teventId: error.eventId ?? null\n\t\t\t\t} }\n\t\t\t});\n\t\t\tonFallback?.();\n\t\t\treturn fallback();\n\t\t}\n\t\tthrow error;\n\t}\n}\n\n//#endregion\nexport { withProviderFallback };\n//# sourceMappingURL=provider-fallback-L61Pbfxx.js.map","import { AgentExecutionError, ConfigurationError, LLMProviderError, UserInputError } from \"./errors-CEDWDXew.js\";\nimport { logIssue, logWarn } from \"./logging-B7X3yL0T.js\";\nimport { getAgentProvider } from \"./provider-factory-Cs_2DBhe.js\";\nimport { APICallError, NoObjectGeneratedError, NoOutputGeneratedError, Output, RetryError, generateText, stepCountIs } from \"ai\";\n\n//#region src/internal/agents/callEmbeddedAgent.ts\n/**\n* Resolve the underlying provider failure from an AI SDK error.\n*\n* After retries, the SDK wraps retryable 5xx/network failures in RetryError.\n* Prefer the last error, then walk earlier errors for the first APICallError.\n*/\nfunction resolveProviderApiCallError(error) {\n\tif (APICallError.isInstance(error)) return error;\n\tif (!RetryError.isInstance(error)) return null;\n\tif (APICallError.isInstance(error.lastError)) return error.lastError;\n\tfor (let i = error.errors.length - 1; i >= 0; i--) {\n\t\tconst candidate = error.errors[i];\n\t\tif (APICallError.isInstance(candidate)) return candidate;\n\t}\n\treturn null;\n}\nfunction toLLMProviderError(error, originalError = error) {\n\tif (error.message.includes(\"Country, region, or territory not supported\")) return new LLMProviderError(\"The AI provider (OpenAI) does not support requests from your region. This is a restriction imposed by OpenAI on certain countries and territories. Please contact support if you believe this is an error.\", { cause: originalError });\n\tconst statusCode = error.statusCode;\n\tif (statusCode && statusCode >= 400 && statusCode < 500) return new LLMProviderError(`The AI provider returned an error: ${error.message}. This may be a configuration, quota, or account issue with the upstream AI provider.`, { cause: originalError });\n\tif (!statusCode || statusCode >= 500) return new LLMProviderError(`The AI provider is currently unavailable${statusCode ? ` (HTTP ${statusCode})` : \"\"}: ${error.message}. Please try again later.`, { cause: originalError });\n\treturn new LLMProviderError(`The AI provider returned an error: ${error.message}. This may be a configuration, quota, or account issue with the upstream AI provider.`, { cause: originalError });\n}\n/**\n* Call an embedded agent with tool call capture\n* This is the standard way to call embedded AI agents within MCP tools\n*\n* Error handling:\n* - Errors are re-thrown for the calling agent to handle\n* - Each agent can implement its own error handling strategy\n*/\nasync function callEmbeddedAgent({ system, prompt, tools, schema }) {\n\tconst capturedToolCalls = [];\n\tconst provider = getAgentProvider();\n\ttry {\n\t\tconst result = await generateText({\n\t\t\tmodel: provider.getModel(),\n\t\t\tsystem,\n\t\t\tprompt,\n\t\t\ttools,\n\t\t\tstopWhen: stepCountIs(5),\n\t\t\texperimental_output: Output.object({ schema }),\n\t\t\texperimental_telemetry: {\n\t\t\t\tisEnabled: true,\n\t\t\t\tfunctionId: \"callEmbeddedAgent\"\n\t\t\t},\n\t\t\tproviderOptions: provider.getProviderOptions(),\n\t\t\tonStepFinish: (event) => {\n\t\t\t\tif (event.toolCalls && event.toolCalls.length > 0) for (const toolCall of event.toolCalls) capturedToolCalls.push({\n\t\t\t\t\ttoolName: toolCall.toolName,\n\t\t\t\t\targs: toolCall.input\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tif (!result.experimental_output) throw new NoOutputGeneratedError({ message: \"No output generated.\" });\n\t\tconst rawOutput = result.experimental_output;\n\t\tif (typeof rawOutput === \"object\" && rawOutput !== null && \"error\" in rawOutput && typeof rawOutput.error === \"string\") throw new UserInputError(rawOutput.error);\n\t\tconst parsedResult = schema.safeParse(rawOutput);\n\t\tif (!parsedResult.success) throw new UserInputError(`Invalid agent response: ${parsedResult.error.message}`);\n\t\treturn {\n\t\t\tresult: parsedResult.data,\n\t\t\ttoolCalls: capturedToolCalls\n\t\t};\n\t} catch (error) {\n\t\tif (NoObjectGeneratedError.isInstance(error)) {\n\t\t\tif (error.text) {\n\t\t\t\tconst rescued = rescueFromText(error.text, schema);\n\t\t\t\tif (rescued) {\n\t\t\t\t\tlogWarn(\"NoObjectGeneratedError rescued via schema defaults\", {\n\t\t\t\t\t\tloggerScope: [\"agents\", \"embedded\"],\n\t\t\t\t\t\textra: {\n\t\t\t\t\t\t\terrorMessage: error.message,\n\t\t\t\t\t\t\tfinishReason: error.finishReason\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\treturn {\n\t\t\t\t\t\tresult: rescued,\n\t\t\t\t\t\ttoolCalls: capturedToolCalls\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tlogWarn(\"NoObjectGeneratedError could not be rescued\", {\n\t\t\t\tloggerScope: [\"agents\", \"embedded\"],\n\t\t\t\textra: {\n\t\t\t\t\terrorMessage: error.message,\n\t\t\t\t\thasText: !!error.text,\n\t\t\t\t\tfinishReason: error.finishReason\n\t\t\t\t}\n\t\t\t});\n\t\t\tthrow new UserInputError(\"The AI was unable to process your query. Please try rephrasing.\");\n\t\t}\n\t\tconst providerError = resolveProviderApiCallError(error);\n\t\tif (providerError) throw toLLMProviderError(providerError, error);\n\t\tif (RetryError.isInstance(error)) throw new LLMProviderError(`The AI provider is currently unavailable: ${error.message}. Please try again later.`, { cause: error });\n\t\tif (error instanceof UserInputError || error instanceof ConfigurationError || error instanceof LLMProviderError || error instanceof AgentExecutionError) throw error;\n\t\tthrow toAgentExecutionError(error);\n\t}\n}\nfunction toAgentExecutionError(error) {\n\tconst eventId = logIssue(error, {\n\t\tloggerScope: [\"agents\", \"embedded\"],\n\t\tcontexts: { embeddedAgent: {\n\t\t\terrorName: error instanceof Error ? error.name : typeof error,\n\t\t\terrorMessage: error instanceof Error ? error.message : String(error),\n\t\t\tisNoOutputGenerated: NoOutputGeneratedError.isInstance(error)\n\t\t} }\n\t});\n\tconst detail = error instanceof Error && error.message ? error.message : \"An unexpected error occurred while running the AI agent.\";\n\treturn new AgentExecutionError(`The AI agent failed to complete this request: ${detail}`, {\n\t\tcause: error,\n\t\teventId\n\t});\n}\nfunction extractBalancedJsonObjects(text) {\n\tconst objects = [];\n\tlet start = -1;\n\tlet depth = 0;\n\tlet inString = false;\n\tlet escaped = false;\n\tfor (let i = 0; i < text.length; i++) {\n\t\tconst ch = text[i];\n\t\tif (depth === 0) {\n\t\t\tif (ch === \"{\") {\n\t\t\t\tstart = i;\n\t\t\t\tdepth = 1;\n\t\t\t\tinString = false;\n\t\t\t\tescaped = false;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (escaped) {\n\t\t\tescaped = false;\n\t\t\tcontinue;\n\t\t}\n\t\tif (ch === \"\\\\\" && inString) {\n\t\t\tescaped = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (ch === \"\\\"\") {\n\t\t\tinString = !inString;\n\t\t\tcontinue;\n\t\t}\n\t\tif (inString) continue;\n\t\tif (ch === \"{\") {\n\t\t\tdepth++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (ch === \"}\") {\n\t\t\tdepth--;\n\t\t\tif (depth === 0 && start !== -1) {\n\t\t\t\tobjects.push(text.slice(start, i + 1));\n\t\t\t\tstart = -1;\n\t\t\t\tinString = false;\n\t\t\t\tescaped = false;\n\t\t\t}\n\t\t}\n\t}\n\treturn objects;\n}\n/**\n* Extract candidate JSON strings from text using multiple strategies.\n* Handles plain JSON, markdown code blocks, and embedded JSON objects.\n*/\nfunction extractJsonCandidates(text) {\n\tconst candidates = new Set([text]);\n\tconst codeBlockRegex = /```(?:json)?\\s*\\n?([\\s\\S]*?)\\n?```/g;\n\tconst allMatches = Array.from(text.matchAll(codeBlockRegex));\n\tfor (const match of allMatches) candidates.add(match[1].trim());\n\tfor (const jsonObject of extractBalancedJsonObjects(text)) candidates.add(jsonObject);\n\treturn Array.from(candidates);\n}\n/**\n* Attempt to rescue a failed structured output by parsing raw LLM text through the schema.\n* Schema defaults (e.g., `.default(\"\")`) fill missing optional fields.\n* Handles plain JSON, markdown code blocks, and JSON embedded in prose (e.g., Anthropic responses).\n* Returns null if no candidate can be parsed or matched against the schema.\n*/\nfunction rescueFromText(text, schema) {\n\tfor (const candidate of extractJsonCandidates(text)) try {\n\t\tconst parsed = JSON.parse(candidate);\n\t\tconst result = schema.safeParse(parsed);\n\t\tif (result.success) return result.data;\n\t} catch {}\n\treturn null;\n}\n\n//#endregion\nexport { callEmbeddedAgent };\n//# sourceMappingURL=callEmbeddedAgent-ffwEeqdP.js.map","import { AgentExecutionError, LLMProviderError, UserInputError } from \"./errors-CEDWDXew.js\";\nimport { logIssue, logWarn } from \"./logging-B7X3yL0T.js\";\nimport { ApiClientError, ApiServerError } from \"./errors-DG2FreDU.js\";\nimport { z } from \"zod\";\nimport { getActiveSpan } from \"@sentry/core\";\nimport { APICallError, RetryError, tool } from \"ai\";\n\n//#region src/internal/agents/tools/utils.ts\n/**\n* Standard response schema for all embedded agent tools.\n* Tools return either an error message or the result data, never both.\n*/\nconst AgentToolResponseSchema = z.object({\n\terror: z.string().optional().describe(\"Error message if the operation failed\"),\n\tresult: z.unknown().optional().describe(\"The successful result data\")\n});\nfunction recordAgentToolResultCount(count) {\n\tif (typeof count !== \"number\" || !Number.isFinite(count)) return;\n\ttry {\n\t\tgetActiveSpan()?.setAttribute(\"gen_ai.tool.call.result.count\", count);\n\t} catch {}\n}\nfunction recordExtractedAgentToolResultCount(result, getResultCount) {\n\tif (!getResultCount) return;\n\ttry {\n\t\trecordAgentToolResultCount(getResultCount(result));\n\t} catch {}\n}\n/**\n* Handles errors from agent tool execution and returns appropriate error messages.\n*\n* SECURITY: Only returns trusted error messages to prevent prompt injection.\n* We trust: Sentry API errors, our own UserInputError messages, and system templates.\n*/\nfunction handleAgentToolError(error) {\n\tif (error instanceof UserInputError) {\n\t\tlogWarn(error, {\n\t\t\tloggerScope: [\"agent-tools\", \"user-input\"],\n\t\t\tcontexts: { agentTool: { errorType: \"UserInputError\" } }\n\t\t});\n\t\treturn { error: `Input Error: ${error.message}. You may be able to resolve this by addressing the concern and trying again.` };\n\t}\n\tif (error instanceof LLMProviderError) {\n\t\tlogWarn(error, {\n\t\t\tloggerScope: [\"agent-tools\", \"llm-provider\"],\n\t\t\tcontexts: { agentTool: { errorType: \"LLMProviderError\" } }\n\t\t});\n\t\treturn { error: `AI Provider Error: ${error.message}. This is a service availability issue that cannot be resolved by retrying.` };\n\t}\n\tif (error instanceof AgentExecutionError) {\n\t\tconst eventIdPart$1 = error.eventId ? ` Event ID: ${error.eventId}.` : \"\";\n\t\treturn { error: `AI Processing Error: the embedded agent failed unexpectedly.${eventIdPart$1} This is a system error that cannot be resolved by retrying the same agent step.` };\n\t}\n\tif (APICallError.isInstance(error) || RetryError.isInstance(error)) {\n\t\tconst statusCode = APICallError.isInstance(error) ? error.statusCode : void 0;\n\t\tlogWarn(error, {\n\t\t\tloggerScope: [\"agent-tools\", \"api-call\"],\n\t\t\tcontexts: { agentTool: {\n\t\t\t\terrorType: APICallError.isInstance(error) ? \"APICallError\" : \"RetryError\",\n\t\t\t\tstatusCode: statusCode ?? null\n\t\t\t} }\n\t\t});\n\t\treturn { error: `AI Provider Error: ${error.message}. This is a service availability issue with the upstream AI provider. Other non-AI tools should still work.` };\n\t}\n\tif (error instanceof ApiClientError) {\n\t\tconst message = error.toUserMessage();\n\t\tlogWarn(message, {\n\t\t\tloggerScope: [\"agent-tools\", \"api-client\"],\n\t\t\tcontexts: { agentTool: {\n\t\t\t\terrorType: error.name,\n\t\t\t\tstatus: error.status ?? null\n\t\t\t} }\n\t\t});\n\t\treturn { error: `Input Error: ${message}. You may be able to resolve this by addressing the concern and trying again.` };\n\t}\n\tif (error instanceof ApiServerError) {\n\t\tconst eventId$1 = logIssue(error);\n\t\tconst statusText = error.status ? ` (${error.status})` : \"\";\n\t\tconst eventIdPart$1 = eventId$1 ? ` Event ID: ${eventId$1}.` : \"\";\n\t\treturn { error: `Server Error${statusText}: ${error.message}.${eventIdPart$1} This is a system error that cannot be resolved by retrying.` };\n\t}\n\tconst eventId = logIssue(error);\n\tconst eventIdPart = eventId ? ` Event ID: ${eventId}.` : \"\";\n\treturn { error: `System Error: An unexpected error occurred.${eventIdPart} This is a system error that cannot be resolved by retrying.` };\n}\n/**\n* Creates an embedded agent tool with automatic error handling and schema wrapping.\n*\n* This wrapper:\n* - Maintains the same API as the AI SDK's tool() function\n* - Automatically wraps the result schema with error/result structure\n* - Handles all error types and returns them as structured responses\n* - Preserves type inference from the original tool implementation\n*\n* @example\n* ```typescript\n* export function createMyTool(apiService: SentryApiService) {\n*   return agentTool({\n*     description: \"My tool description\",\n*     parameters: z.object({ param: z.string() }),\n*     execute: async (params) => {\n*       // Tool implementation that might throw errors\n*       const result = await apiService.someMethod(params);\n*       return result; // Original return type preserved\n*     }\n*   });\n* }\n* ```\n*/\nfunction agentTool(config) {\n\treturn tool({\n\t\tdescription: config.description,\n\t\tinputSchema: config.parameters,\n\t\texecute: async (input) => {\n\t\t\ttry {\n\t\t\t\tconst result = await config.execute(input);\n\t\t\t\trecordExtractedAgentToolResultCount(result, config.getResultCount);\n\t\t\t\treturn { result };\n\t\t\t} catch (error) {\n\t\t\t\treturn handleAgentToolError(error);\n\t\t\t}\n\t\t}\n\t});\n}\n\n//#endregion\nexport { agentTool, recordAgentToolResultCount };\n//# sourceMappingURL=utils-DHwF0RI3.js.map","import { agentTool } from \"./utils-DHwF0RI3.js\";\nimport { z } from \"zod\";\n\n//#region src/internal/agents/tools/dataset-fields.ts\nconst REPLAY_EXCLUDED_TAGS = new Set([\n\t\"browser\",\n\t\"device\",\n\t\"os\",\n\t\"user\"\n]);\nconst REPLAY_FIELDS = [\n\t\"activity\",\n\t\"browser.name\",\n\t\"browser.version\",\n\t\"count_dead_clicks\",\n\t\"count_errors\",\n\t\"count_infos\",\n\t\"count_rage_clicks\",\n\t\"count_screens\",\n\t\"count_segments\",\n\t\"count_traces\",\n\t\"count_urls\",\n\t\"count_warnings\",\n\t\"device.brand\",\n\t\"device.family\",\n\t\"device.model_id\",\n\t\"device.name\",\n\t\"dist\",\n\t\"duration\",\n\t\"error_ids\",\n\t\"id\",\n\t\"is_archived\",\n\t\"os.name\",\n\t\"os.version\",\n\t\"platform\",\n\t\"release\",\n\t\"replay_type\",\n\t\"screen\",\n\t\"screens\",\n\t\"sdk.name\",\n\t\"sdk.version\",\n\t\"seen_by_me\",\n\t\"trace\",\n\t\"url\",\n\t\"urls\",\n\t\"user.email\",\n\t\"user.id\",\n\t\"user.ip\",\n\t\"user.username\",\n\t\"user.geo.city\",\n\t\"user.geo.country_code\",\n\t\"user.geo.region\",\n\t\"user.geo.subdivision\",\n\t\"viewed_by_me\",\n\t\"ota_updates.channel\",\n\t\"ota_updates.runtime_version\",\n\t\"ota_updates.update_id\"\n];\nconst REPLAY_CLICK_FIELDS = [\n\t\"click.alt\",\n\t\"click.class\",\n\t\"click.id\",\n\t\"click.label\",\n\t\"click.role\",\n\t\"click.selector\",\n\t\"dead.selector\",\n\t\"rage.selector\",\n\t\"click.tag\",\n\t\"click.textContent\",\n\t\"click.title\",\n\t\"click.testid\",\n\t\"click.component_name\"\n];\nconst REPLAY_TAP_FIELDS = [\n\t\"tap.message\",\n\t\"tap.view_id\",\n\t\"tap.view_class\"\n];\nconst REPLAY_BUILT_IN_FIELDS = [\n\t...REPLAY_FIELDS,\n\t...REPLAY_CLICK_FIELDS,\n\t...REPLAY_TAP_FIELDS\n];\n/**\n* Discover available fields for a dataset by querying Sentry's tags API.\n* Replay search mirrors Sentry's UI by merging built-in replay fields, click/tap fields, and custom tags.\n*/\nasync function discoverDatasetFields(apiService, organizationSlug, dataset, options = {}) {\n\tconst { projectId } = options;\n\tconst tags = await apiService.listTags({\n\t\torganizationSlug,\n\t\tdataset,\n\t\tproject: projectId,\n\t\tstatsPeriod: \"14d\"\n\t});\n\tif (dataset === \"replays\") {\n\t\tconst fields$1 = buildReplayFields(tags);\n\t\treturn {\n\t\t\tdataset,\n\t\t\tfields: fields$1,\n\t\t\tcommonPatterns: getReplayCommonPatterns(new Set(fields$1.map((field) => field.key)))\n\t\t};\n\t}\n\tconst fields = tags.filter((tag) => !tag.key.startsWith(\"sentry:\")).map((tag) => ({\n\t\tkey: tag.key,\n\t\tname: tag.name,\n\t\ttotalValues: tag.totalValues,\n\t\texamples: getFieldExamples(tag.key, dataset)\n\t}));\n\treturn {\n\t\tdataset,\n\t\tfields,\n\t\tcommonPatterns: getCommonPatterns(dataset)\n\t};\n}\n/**\n* Create a tool for discovering available fields in a dataset\n* The tool is pre-bound with the API service and organization configured for the appropriate region\n*/\nfunction createDatasetFieldsTool(options) {\n\tconst { apiService, organizationSlug, dataset, projectId } = options;\n\treturn agentTool({\n\t\tdescription: `Discover available fields for ${dataset} searches in Sentry (includes example values)`,\n\t\tparameters: z.object({}),\n\t\texecute: async () => {\n\t\t\treturn discoverDatasetFields(apiService, organizationSlug, dataset, { projectId });\n\t\t},\n\t\tgetResultCount: (result) => result.fields.length\n\t});\n}\n/**\n* Get example values for common fields\n*/\nfunction getFieldExamples(key, dataset) {\n\tconst commonExamples = {\n\t\tlevel: [\n\t\t\t\"error\",\n\t\t\t\"warning\",\n\t\t\t\"info\",\n\t\t\t\"debug\",\n\t\t\t\"fatal\"\n\t\t],\n\t\tenvironment: [\n\t\t\t\"production\",\n\t\t\t\"staging\",\n\t\t\t\"development\"\n\t\t],\n\t\trelease: [\n\t\t\t\"v1.0.0\",\n\t\t\t\"latest\",\n\t\t\t\"backend@1.2.3\"\n\t\t],\n\t\tuser: [\"user123\", \"email@example.com\"]\n\t};\n\tconst issueExamples = {\n\t\t...commonExamples,\n\t\tassigned_or_suggested: [\n\t\t\t\"email@example.com\",\n\t\t\t\"team-slug\",\n\t\t\t\"me\"\n\t\t],\n\t\tis: [\n\t\t\t\"unresolved\",\n\t\t\t\"resolved\",\n\t\t\t\"ignored\",\n\t\t\t\"for_review\",\n\t\t\t\"new\",\n\t\t\t\"regressed\",\n\t\t\t\"escalating\"\n\t\t],\n\t\t\"issue.category\": [\n\t\t\t\"error\",\n\t\t\t\"feedback\",\n\t\t\t\"outage\"\n\t\t],\n\t\t\"issue.priority\": [\n\t\t\t\"high\",\n\t\t\t\"medium\",\n\t\t\t\"low\"\n\t\t]\n\t};\n\tconst eventExamples = {\n\t\t...commonExamples,\n\t\t\"http.method\": [\n\t\t\t\"GET\",\n\t\t\t\"POST\",\n\t\t\t\"PUT\",\n\t\t\t\"DELETE\"\n\t\t],\n\t\t\"http.status_code\": [\n\t\t\t\"200\",\n\t\t\t\"404\",\n\t\t\t\"500\"\n\t\t],\n\t\t\"db.system\": [\n\t\t\t\"postgresql\",\n\t\t\t\"mysql\",\n\t\t\t\"redis\"\n\t\t]\n\t};\n\tconst replayExamples = {\n\t\t...commonExamples,\n\t\tactivity: [\n\t\t\t\"1\",\n\t\t\t\"5\",\n\t\t\t\"10\"\n\t\t],\n\t\t\"browser.name\": [\n\t\t\t\"Chrome\",\n\t\t\t\"Safari\",\n\t\t\t\"Mobile Safari\"\n\t\t],\n\t\t\"browser.version\": [\n\t\t\t\"131.0.0\",\n\t\t\t\"18.3\",\n\t\t\t\"136.0.7103.93\"\n\t\t],\n\t\tduration: [\n\t\t\t\"30s\",\n\t\t\t\"2m\",\n\t\t\t\"10m\"\n\t\t],\n\t\tcount_errors: [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"5\"\n\t\t],\n\t\tcount_infos: [\n\t\t\t\"0\",\n\t\t\t\"2\",\n\t\t\t\"8\"\n\t\t],\n\t\tcount_dead_clicks: [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"3\"\n\t\t],\n\t\tcount_rage_clicks: [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"3\"\n\t\t],\n\t\tcount_screens: [\n\t\t\t\"1\",\n\t\t\t\"3\",\n\t\t\t\"8\"\n\t\t],\n\t\tcount_segments: [\n\t\t\t\"1\",\n\t\t\t\"2\",\n\t\t\t\"4\"\n\t\t],\n\t\tcount_traces: [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"2\"\n\t\t],\n\t\tcount_urls: [\n\t\t\t\"1\",\n\t\t\t\"3\",\n\t\t\t\"6\"\n\t\t],\n\t\tcount_warnings: [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"4\"\n\t\t],\n\t\t\"device.brand\": [\n\t\t\t\"Apple\",\n\t\t\t\"Google\",\n\t\t\t\"Samsung\"\n\t\t],\n\t\t\"device.family\": [\n\t\t\t\"iPhone\",\n\t\t\t\"Pixel\",\n\t\t\t\"Desktop\"\n\t\t],\n\t\t\"device.model_id\": [\"iPhone16,2\", \"Pixel 8\"],\n\t\t\"device.name\": [\n\t\t\t\"MacBook Pro\",\n\t\t\t\"iPhone\",\n\t\t\t\"Pixel 8\"\n\t\t],\n\t\tdist: [\"42\", \"frontend-2025.01.15\"],\n\t\terror_ids: [\"0194c40cc83f4bc2b73f8dd72fbd3a8e\"],\n\t\tid: [\"7e07485f-12f9-416b-8b14-26260799b51f\"],\n\t\tis_archived: [\"true\", \"false\"],\n\t\t\"os.name\": [\n\t\t\t\"macOS\",\n\t\t\t\"iOS\",\n\t\t\t\"Android\",\n\t\t\t\"Windows\"\n\t\t],\n\t\t\"os.version\": [\n\t\t\t\"14.4\",\n\t\t\t\"18.3\",\n\t\t\t\"15\"\n\t\t],\n\t\tplatform: [\n\t\t\t\"javascript\",\n\t\t\t\"cocoa\",\n\t\t\t\"android\"\n\t\t],\n\t\treplay_type: [\"session\", \"buffer\"],\n\t\tviewed_by_me: [\"true\", \"false\"],\n\t\tseen_by_me: [\"true\", \"false\"],\n\t\turl: [\n\t\t\t\"/checkout\",\n\t\t\t\"/settings\",\n\t\t\t\"/billing\"\n\t\t],\n\t\turls: [\n\t\t\t\"/checkout\",\n\t\t\t\"/checkout/payment\",\n\t\t\t\"/settings/profile\"\n\t\t],\n\t\tscreen: [\n\t\t\t\"Checkout\",\n\t\t\t\"Billing\",\n\t\t\t\"Settings\"\n\t\t],\n\t\tscreens: [\n\t\t\t\"Checkout\",\n\t\t\t\"Billing\",\n\t\t\t\"Settings\"\n\t\t],\n\t\t\"sdk.name\": [\n\t\t\t\"sentry.javascript.react\",\n\t\t\t\"sentry.javascript.nextjs\",\n\t\t\t\"sentry.cocoa\"\n\t\t],\n\t\t\"sdk.version\": [\n\t\t\t\"8.40.0\",\n\t\t\t\"8.43.0\",\n\t\t\t\"8.20.1\"\n\t\t],\n\t\ttrace: [\"a4d1aae7216b47ff8117cf4e09ce9d0a\"],\n\t\t\"user.email\": [\"user@example.com\", \"alice@example.com\"],\n\t\t\"user.id\": [\"user-123\", \"42\"],\n\t\t\"user.ip\": [\"203.0.113.42\", \"198.51.100.7\"],\n\t\t\"user.username\": [\"alice\", \"checkout-user\"],\n\t\t\"user.geo.city\": [\"San Francisco\", \"Toronto\"],\n\t\t\"user.geo.country_code\": [\"US\", \"CA\"],\n\t\t\"user.geo.region\": [\"California\", \"Ontario\"],\n\t\t\"user.geo.subdivision\": [\"US-CA\", \"CA-ON\"],\n\t\t\"ota_updates.channel\": [\"production\", \"preview\"],\n\t\t\"ota_updates.runtime_version\": [\"1.0.0\", \"1.1.0\"],\n\t\t\"ota_updates.update_id\": [\"9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d\", \"12f9d5bf-4545-4d4a-aeca-878d3a841f1a\"],\n\t\t\"click.alt\": [\"Checkout\", \"Save settings\"],\n\t\t\"click.class\": [\"btn-primary\", \"nav-link\"],\n\t\t\"click.id\": [\"checkout-submit\", \"save-settings\"],\n\t\t\"click.label\": [\"Save\", \"Continue\"],\n\t\t\"click.role\": [\"button\", \"link\"],\n\t\t\"click.selector\": [\"button[data-test-id=\\\"save\\\"]\", \"#checkout-submit\"],\n\t\t\"dead.selector\": [\"button.disabled\", \".pricing-card\"],\n\t\t\"rage.selector\": [\"button.checkout\", \".menu-item\"],\n\t\t\"click.tag\": [\"button\", \"a\"],\n\t\t\"click.textContent\": [\"Save\", \"Complete Purchase\"],\n\t\t\"click.title\": [\"Save changes\", \"Go to billing\"],\n\t\t\"click.testid\": [\"save-button\", \"checkout-submit\"],\n\t\t\"click.component_name\": [\"CheckoutButton\", \"NavItem\"],\n\t\t\"tap.message\": [\"CheckoutScreen\", \"CartScreen\"],\n\t\t\"tap.view_id\": [\"checkout-root\", \"cart-root\"],\n\t\t\"tap.view_class\": [\"CheckoutViewController\", \"CartActivity\"]\n\t};\n\tif (dataset === \"search_issues\") return issueExamples[key];\n\tif (dataset === \"replays\") return replayExamples[key];\n\tif (dataset === \"events\" || dataset === \"errors\") return eventExamples[key];\n\treturn commonExamples[key];\n}\n/**\n* Get common search patterns for a dataset\n*/\nfunction getCommonPatterns(dataset) {\n\tif (dataset === \"search_issues\") return [\n\t\t{\n\t\t\tpattern: \"is:unresolved\",\n\t\t\tdescription: \"Open issues\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"is:resolved\",\n\t\t\tdescription: \"Closed issues\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"is:for_review\",\n\t\t\tdescription: \"Issues in the review queue\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"level:error\",\n\t\t\tdescription: \"Error level issues\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"assigned_or_suggested:me\",\n\t\t\tdescription: \"Issues assigned or suggested to the current user\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"issue.category:feedback\",\n\t\t\tdescription: \"User feedback issues\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"firstSeen:-24h\",\n\t\t\tdescription: \"New issues from last 24 hours\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"userCount:>100\",\n\t\t\tdescription: \"Affecting more than 100 users\"\n\t\t}\n\t];\n\tif (dataset === \"events\" || dataset === \"errors\") return [\n\t\t{\n\t\t\tpattern: \"level:error\",\n\t\t\tdescription: \"Error events\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"environment:production\",\n\t\t\tdescription: \"Production events\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"timestamp:-1h\",\n\t\t\tdescription: \"Events from last hour\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"has:http.method\",\n\t\t\tdescription: \"HTTP requests\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"has:db.statement\",\n\t\t\tdescription: \"Database queries\"\n\t\t}\n\t];\n\tif (dataset === \"replays\") return REPLAY_COMMON_PATTERNS.map(({ pattern, description }) => ({\n\t\tpattern,\n\t\tdescription\n\t}));\n\treturn [];\n}\nfunction buildReplayFields(tags) {\n\tconst tagMap = new Map(tags.filter((tag) => !tag.key.startsWith(\"sentry:\") && !REPLAY_EXCLUDED_TAGS.has(tag.key)).map((tag) => [tag.key, tag]));\n\tconst builtInKeys = new Set(REPLAY_BUILT_IN_FIELDS);\n\tconst builtInFields = REPLAY_BUILT_IN_FIELDS.filter((key) => tagMap.has(key)).map((key) => createDatasetField(key, \"replays\", tagMap.get(key)));\n\tconst customTagFields = [...tagMap.values()].filter((tag) => !builtInKeys.has(tag.key)).sort((left, right) => {\n\t\tif (right.totalValues !== left.totalValues) return right.totalValues - left.totalValues;\n\t\treturn left.key.localeCompare(right.key);\n\t}).map((tag) => createDatasetField(tag.key, \"replays\", tag));\n\treturn [...builtInFields, ...customTagFields];\n}\nfunction createDatasetField(key, dataset, tag) {\n\treturn {\n\t\tkey,\n\t\tname: tag?.name ?? humanizeFieldName(key),\n\t\ttotalValues: tag?.totalValues ?? 0,\n\t\texamples: getFieldExamples(key, dataset)\n\t};\n}\nfunction humanizeFieldName(key) {\n\treturn key.replaceAll(\".\", \" \").replaceAll(\"_\", \" \").replace(/\\b\\w/g, (match) => match.toUpperCase());\n}\nconst REPLAY_COMMON_PATTERNS = [\n\t{\n\t\tpattern: \"count_errors:>0\",\n\t\tdescription: \"Replays with associated errors\",\n\t\trequiredFields: [\"count_errors\"]\n\t},\n\t{\n\t\tpattern: \"count_rage_clicks:>0\",\n\t\tdescription: \"Replays with rage clicks\",\n\t\trequiredFields: [\"count_rage_clicks\"]\n\t},\n\t{\n\t\tpattern: \"count_dead_clicks:>0\",\n\t\tdescription: \"Replays with dead clicks\",\n\t\trequiredFields: [\"count_dead_clicks\"]\n\t},\n\t{\n\t\tpattern: \"url:*checkout*\",\n\t\tdescription: \"Replays that visited a checkout page\",\n\t\trequiredFields: [\"url\"]\n\t},\n\t{\n\t\tpattern: \"click.textContent:\\\"Save\\\"\",\n\t\tdescription: \"Replays where a Save button was clicked\",\n\t\trequiredFields: [\"click.textContent\"]\n\t},\n\t{\n\t\tpattern: \"tap.message:*Checkout*\",\n\t\tdescription: \"Mobile replay screens related to checkout\",\n\t\trequiredFields: [\"tap.message\"]\n\t},\n\t{\n\t\tpattern: \"viewed_by_me:true\",\n\t\tdescription: \"Replays you have already viewed\",\n\t\trequiredFields: [\"viewed_by_me\"]\n\t}\n];\nfunction getReplayCommonPatterns(availableFields) {\n\treturn REPLAY_COMMON_PATTERNS.filter((pattern) => !pattern.requiredFields || pattern.requiredFields.every((field) => availableFields.has(field))).map(({ pattern, description }) => ({\n\t\tpattern,\n\t\tdescription\n\t}));\n}\n\n//#endregion\nexport { createDatasetFieldsTool, discoverDatasetFields, getCommonPatterns, getFieldExamples };\n//# sourceMappingURL=dataset-fields-CBauoBBr.js.map","import { PUBLIC_EVENTS_DATASETS } from \"./events-datasets-Cu37u43g.js\";\nimport { agentTool, recordAgentToolResultCount } from \"./utils-DHwF0RI3.js\";\nimport { z } from \"zod\";\n\n//#region src/internal/agents/tools/data/android.json\nvar namespace$72 = \"android\";\nvar description$72 = \"The Android platform on which the Android application is running.\\n\";\nvar attributes$72 = {\n\t\"android.os.api_level\": {\n\t\t\"description\": \"Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"33\", \"32\"]\n\t},\n\t\"android.app.state\": {\n\t\t\"description\": \"This attribute represents the state of the application.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"created\",\n\t\t\t\"background\",\n\t\t\t\"foreground\"\n\t\t]\n\t}\n};\nvar android_default = {\n\tnamespace: namespace$72,\n\tdescription: description$72,\n\tattributes: attributes$72\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/app.json\nvar namespace$71 = \"app\";\nvar custom = true;\nvar description$71 = \"Describes attributes related to client-side applications (e.g. web apps or mobile apps), plus Sentry MCP application-owned telemetry attributes.\\n\";\nvar attributes$71 = {\n\t\"app.access.error.code\": {\n\t\t\"description\": \"Scrubber-safe OAuth error code returned by Sentry MCP or the OAuth provider.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Emitted under app.access.* so default Sentry data scrubbing does not redact values via sensitive substrings (auth/oauth, token, bearer, credentials). invalid_token responses are bucketed as invalid_access.\",\n\t\t\"examples\": [\n\t\t\t\"invalid_access\",\n\t\t\t\"invalid_grant\",\n\t\t\t\"invalid_client\",\n\t\t\t\"other\"\n\t\t]\n\t},\n\t\"app.access.error.reason\": {\n\t\t\"description\": \"Low-cardinality scrubber-safe bucket for an OAuth error description.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Values deliberately avoid sensitive substrings (token, bearer, auth/oauth, credentials).\",\n\t\t\"examples\": [\n\t\t\t\"missing_or_invalid_access\",\n\t\t\t\"invalid_access\",\n\t\t\t\"grant_not_found\",\n\t\t\t\"other\"\n\t\t]\n\t},\n\t\"app.access.grant.age_bucket\": {\n\t\t\"description\": \"Bounded MCP grant age at refresh or revocation.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"lt_1h\",\n\t\t\t\"1d_7d\",\n\t\t\t\"gte_30d\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"app.access.grant.id_hash\": {\n\t\t\"description\": \"Deterministic non-secret fingerprint of a Sentry MCP OAuth grant ID used to correlate grant lifecycle logs.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"a1b2c3d4\"]\n\t},\n\t\"app.access.grant.revoked_reason\": {\n\t\t\"description\": \"Reason a Sentry MCP OAuth wrapper grant was revoked.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"stale_props_no_refresh\",\n\t\t\t\"upstream_rejected\",\n\t\t\t\"upstream_rejected_in_use\"\n\t\t]\n\t},\n\t\"app.access.grant.shape\": {\n\t\t\"description\": \"Shape of the Sentry MCP OAuth grant used during refresh.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"refreshable\"]\n\t},\n\t\"app.access.method\": {\n\t\t\"description\": \"How the MCP request obtained upstream Sentry access.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"mcp_grant\", \"sentry_access\"]\n\t},\n\t\"app.access.probe.reason\": {\n\t\t\"description\": \"Sentry MCP bucket for an indeterminate upstream OAuth access probe.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"rate_limit\",\n\t\t\t\"server_error\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"app.access.probe.status_code\": {\n\t\t\"description\": \"HTTP status returned by the upstream Sentry access-validity probe.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"200\",\n\t\t\t\"401\",\n\t\t\t\"429\",\n\t\t\t\"500\"\n\t\t]\n\t},\n\t\"app.access.refresh.outcome\": {\n\t\t\"description\": \"Outcome bucket for a Sentry MCP OAuth refresh/token-exchange path.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Attached to metric app.oauth.token_exchange. Attribute key avoids sensitive substrings for scrubber safety.\",\n\t\t\"examples\": [\n\t\t\t\"cached_valid_local\",\n\t\t\t\"cached_valid_probed\",\n\t\t\t\"upstream_rejected\",\n\t\t\t\"verification_indeterminate\"\n\t\t]\n\t},\n\t\"app.access.request.header_shape\": {\n\t\t\"description\": \"Low-cardinality shape of the Authorization header supplied to an access-protected request.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"missing\",\n\t\t\t\"wrapper\",\n\t\t\t\"malformed\",\n\t\t\t\"non_scheme\",\n\t\t\t\"empty_scheme\"\n\t\t]\n\t},\n\t\"app.access.upstream.expires_in_bucket\": {\n\t\t\"description\": \"Bounded remaining time before the original upstream Sentry expiry at refresh or revocation.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"expired\",\n\t\t\t\"lt_1h\",\n\t\t\t\"1d_7d\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"app.client.family\": {\n\t\t\"description\": \"Sentry MCP low-cardinality bucket for the MCP client family.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Resolved from the MCP client's User-Agent on direct MCP requests, or from the registered client name on browser-mediated OAuth endpoints.\",\n\t\t\"examples\": [\n\t\t\t\"claude-code\",\n\t\t\t\"cursor\",\n\t\t\t\"codex\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"app.consent.skill\": {\n\t\t\"description\": \"Sentry MCP skill granted during OAuth approval.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"inspect\",\n\t\t\t\"docs\",\n\t\t\t\"project-management\"\n\t\t]\n\t},\n\t\"app.consent.skill.<skill>.granted\": {\n\t\t\"description\": \"Whether a normalized Sentry MCP skill was granted for a specific MCP request.\",\n\t\t\"type\": \"boolean\",\n\t\t\"note\": \"The dynamic <skill> segment uses the skill id with hyphens replaced by underscores.\",\n\t\t\"examples\": [\"app.consent.skill.project_management.granted\"]\n\t},\n\t\"app.constraint.organization_slug\": {\n\t\t\"description\": \"Sentry MCP organization slug constraint applied to the MCP session.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"my-org\"]\n\t},\n\t\"app.constraint.project_slug\": {\n\t\t\"description\": \"Sentry MCP project slug constraint applied to the MCP session.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"backend\"]\n\t},\n\t\"app.installation.id\": {\n\t\t\"description\": \"A unique identifier representing the installation of an application on a specific device\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Its value SHOULD persist across launches of the same application installation, including through application upgrades.\\nIt SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled.\\nAdditionally, users might be able to reset this value (e.g. by clearing application data).\\nIf an app is installed multiple times on the same device (e.g. in different accounts on Android), each `app.installation.id` SHOULD have a different value.\\nIf multiple OpenTelemetry SDKs are used within the same application, they SHOULD use the same value for `app.installation.id`.\\nHardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the `app.installation.id`.\\n\\nFor iOS, this value SHOULD be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor).\\n\\nFor Android, examples of `app.installation.id` implementations include:\\n\\n- [Firebase Installation ID](https://firebase.google.com/docs/projects/manage-installations).\\n- A globally unique UUID which is persisted across sessions in your application.\\n- [App set ID](https://developer.android.com/identity/app-set-id).\\n- [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID).\\n\\nMore information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2ab2916d-a51f-4ac8-80ee-45ac31a28092\"]\n\t},\n\t\"app.rate_limit.scope\": {\n\t\t\"description\": \"Scope of a Sentry MCP local rate-limit response.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"ip\",\n\t\t\t\"user\",\n\t\t\t\"sentry_access\"\n\t\t],\n\t\t\"note\": \"sentry_access is the scrubber-safe bucket for direct Sentry access-header rate limits.\"\n\t},\n\t\"app.referrer.family\": {\n\t\t\"description\": \"Sentry MCP low-cardinality bucket for the external referrer host.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"sentry-docs\",\n\t\t\t\"github\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"app.request.duration_ms\": {\n\t\t\"description\": \"Sentry MCP request duration in milliseconds.\",\n\t\t\"type\": \"number\",\n\t\t\"examples\": [\"42\", \"1250\"]\n\t},\n\t\"app.resource.type\": {\n\t\t\"description\": \"Sentry MCP resource type resolved by get_sentry_resource.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"issue\",\n\t\t\t\"event\",\n\t\t\t\"trace\",\n\t\t\t\"replay\"\n\t\t]\n\t},\n\t\"app.response.reason\": {\n\t\t\"description\": \"Sentry MCP local response reason bucket.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"local_rate_limit\"]\n\t},\n\t\"app.response.status_class\": {\n\t\t\"description\": \"HTTP response status family for Sentry MCP response metrics.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"2xx\",\n\t\t\t\"4xx\",\n\t\t\t\"5xx\"\n\t\t]\n\t},\n\t\"app.route.group\": {\n\t\t\"description\": \"Sentry MCP coarse route family.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"mcp\",\n\t\t\t\"oauth\",\n\t\t\t\"chat\",\n\t\t\t\"search\"\n\t\t]\n\t},\n\t\"app.screen.coordinate.x\": {\n\t\t\"description\": \"The x (horizontal) coordinate of a screen coordinate, in screen pixels.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"131\"]\n\t},\n\t\"app.screen.coordinate.y\": {\n\t\t\"description\": \"The y (vertical) component of a screen coordinate, in screen pixels.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"12\", \"99\"]\n\t},\n\t\"app.server.mode.experimental\": {\n\t\t\"description\": \"Whether Sentry MCP experimental mode is enabled for the request or stdio session.\",\n\t\t\"type\": \"boolean\",\n\t\t\"note\": \"Metrics and tags record this as the low-cardinality string values `true` or `false`; spans record it as a boolean.\",\n\t\t\"examples\": [true, false]\n\t},\n\t\"app.server.version\": {\n\t\t\"description\": \"Sentry MCP server package version.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"0.35.0\"]\n\t},\n\t\"app.transport\": {\n\t\t\"description\": \"Sentry MCP product transport label.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"http\", \"stdio\"]\n\t},\n\t\"app.upstream.host\": {\n\t\t\"description\": \"Configured upstream Sentry host for Sentry MCP.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"sentry.io\"]\n\t},\n\t\"app.url.full\": {\n\t\t\"description\": \"Configured Sentry MCP URL for stdio telemetry.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Do not include credentials or access tokens in this URL.\",\n\t\t\"examples\": [\"https://mcp.sentry.dev/mcp\"]\n\t},\n\t\"app.utm_source\": {\n\t\t\"description\": \"Sanitized in-product utm_source query parameter for Sentry MCP attribution.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"docs\", \"product\"]\n\t},\n\t\"app.widget.id\": {\n\t\t\"description\": \"An identifier that uniquely differentiates this widget from other widgets in the same application.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"A widget is an application component, typically an on-screen visual GUI element.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"f9bc787d-ff05-48ad-90e1-fca1d46130b3\", \"submit_order_1829\"]\n\t},\n\t\"app.widget.name\": {\n\t\t\"description\": \"The name of an application widget.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"A widget is an application component, typically an on-screen visual GUI element.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"submit\",\n\t\t\t\"attack\",\n\t\t\t\"Clear Cart\"\n\t\t]\n\t}\n};\nvar app_default = {\n\tnamespace: namespace$71,\n\tcustom,\n\tdescription: description$71,\n\tattributes: attributes$71\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/artifact.json\nvar namespace$70 = \"artifact\";\nvar description$70 = \"This group describes attributes specific to artifacts. Artifacts are files or other immutable objects that are intended for distribution. This definition aligns directly with the [SLSA](https://slsa.dev/spec/v1.0/terminology#package-model) package model.\\n\";\nvar attributes$70 = {\n\t\"artifact.filename\": {\n\t\t\"description\": \"The human readable file name of the artifact, typically generated during build and release processes. Often includes the package name and version in the file name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This file name can also act as the [Package Name](https://slsa.dev/spec/v1.0/terminology#package-model)\\nin cases where the package ecosystem maps accordingly.\\nAdditionally, the artifact [can be published](https://slsa.dev/spec/v1.0/terminology#software-supply-chain)\\nfor others, but that is not a guarantee.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"golang-binary-amd64-v0.1.0\",\n\t\t\t\"docker-image-amd64-v0.1.0\",\n\t\t\t\"release-1.tar.gz\",\n\t\t\t\"file-name-package.tar.gz\"\n\t\t]\n\t},\n\t\"artifact.version\": {\n\t\t\"description\": \"The version of the artifact.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"v0.1.0\",\n\t\t\t\"1.2.1\",\n\t\t\t\"122691-build\"\n\t\t]\n\t},\n\t\"artifact.purl\": {\n\t\t\"description\": \"The [Package URL](https://github.com/package-url/purl-spec) of the [package artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides a standard way to identify and locate the packaged artifact.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"pkg:github/package-url/purl-spec@1209109710924\", \"pkg:npm/foo@12.12.3\"]\n\t},\n\t\"artifact.hash\": {\n\t\t\"description\": \"The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), often found in checksum.txt on a release of the artifact and used to verify package integrity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The specific algorithm used to create the cryptographic hash value is\\nnot defined. In situations where an artifact has multiple\\ncryptographic hashes, it is up to the implementer to choose which\\nhash value to set here; this should be the most secure hash algorithm\\nthat is suitable for the situation and consistent with the\\ncorresponding attestation. The implementer can then provide the other\\nhash values through an additional set of attribute extensions as they\\ndeem necessary.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9\"]\n\t},\n\t\"artifact.attestation.id\": {\n\t\t\"description\": \"The id of the build [software attestation](https://slsa.dev/attestation-model).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"123\"]\n\t},\n\t\"artifact.attestation.filename\": {\n\t\t\"description\": \"The provenance filename of the built attestation which directly relates to the build artifact filename. This filename SHOULD accompany the artifact at publish time. See the [SLSA Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) specification for more information.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"golang-binary-amd64-v0.1.0.attestation\",\n\t\t\t\"docker-image-amd64-v0.1.0.intoto.json1\",\n\t\t\t\"release-1.tar.gz.attestation\",\n\t\t\t\"file-name-package.tar.gz.intoto.json1\"\n\t\t]\n\t},\n\t\"artifact.attestation.hash\": {\n\t\t\"description\": \"The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the [software attestation space](https://github.com/in-toto/attestation/tree/main/spec) also refer to this as the **digest**.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408\"]\n\t}\n};\nvar artifact_default = {\n\tnamespace: namespace$70,\n\tdescription: description$70,\n\tattributes: attributes$70\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/aspnetcore.json\nvar namespace$69 = \"aspnetcore\";\nvar description$69 = \"ASP.NET Core attributes\";\nvar attributes$69 = {\n\t\"aspnetcore.rate_limiting.policy\": {\n\t\t\"description\": \"Rate limiting policy name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"fixed\",\n\t\t\t\"sliding\",\n\t\t\t\"token\"\n\t\t]\n\t},\n\t\"aspnetcore.rate_limiting.result\": {\n\t\t\"description\": \"Rate-limiting result, shows whether the lease was acquired or contains a rejection reason\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"acquired\",\n\t\t\t\"endpoint_limiter\",\n\t\t\t\"global_limiter\",\n\t\t\t\"request_canceled\"\n\t\t]\n\t},\n\t\"aspnetcore.routing.is_fallback\": {\n\t\t\"description\": \"A value that indicates whether the matched route is a fallback route.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"true\"]\n\t},\n\t\"aspnetcore.diagnostics.handler.type\": {\n\t\t\"description\": \"Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"Contoso.MyHandler\"]\n\t},\n\t\"aspnetcore.request.is_unhandled\": {\n\t\t\"description\": \"Flag indicating if request was handled by the application pipeline.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"true\"]\n\t},\n\t\"aspnetcore.routing.match_status\": {\n\t\t\"description\": \"Match result - success or failure\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"success\", \"failure\"]\n\t},\n\t\"aspnetcore.diagnostics.exception.result\": {\n\t\t\"description\": \"ASP.NET Core exception middleware handling result\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"handled\",\n\t\t\t\"unhandled\",\n\t\t\t\"skipped\",\n\t\t\t\"aborted\"\n\t\t]\n\t}\n};\nvar aspnetcore_default = {\n\tnamespace: namespace$69,\n\tdescription: description$69,\n\tattributes: attributes$69\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/aws.json\nvar namespace$68 = \"aws\";\nvar description$68 = \"This section defines generic attributes for AWS services.\\n\";\nvar attributes$68 = {\n\t\"aws.request_id\": {\n\t\t\"description\": \"The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"79b9da39-b7ae-508a-a6bc-864b2829c622\", \"C9ER4AJX75574TDJ\"]\n\t},\n\t\"aws.extended_request_id\": {\n\t\t\"description\": \"The AWS extended request ID as returned in the response header `x-amz-id-2`.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\"]\n\t}\n};\nvar aws_default = {\n\tnamespace: namespace$68,\n\tdescription: description$68,\n\tattributes: attributes$68\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/azure.json\nvar namespace$67 = \"azure\";\nvar description$67 = \"This section defines generic attributes used by Azure Client Libraries.\\n\";\nvar attributes$67 = {\n\t\"azure.service.request.id\": {\n\t\t\"description\": \"The unique identifier of the service request. It's generated by the Azure service and returned with the response.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"00000000-0000-0000-0000-000000000000\"]\n\t},\n\t\"azure.resource_provider.namespace\": {\n\t\t\"description\": \"[Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Microsoft.Storage\",\n\t\t\t\"Microsoft.KeyVault\",\n\t\t\t\"Microsoft.ServiceBus\"\n\t\t]\n\t},\n\t\"azure.client.id\": {\n\t\t\"description\": \"The unique identifier of the client instance.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3ba4827d-4422-483f-b59f-85b74211c11d\", \"storage-client-1\"]\n\t}\n};\nvar azure_default = {\n\tnamespace: namespace$67,\n\tdescription: description$67,\n\tattributes: attributes$67\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/browser.json\nvar namespace$66 = \"browser\";\nvar description$66 = \"The web browser attributes\\n\";\nvar attributes$66 = {\n\t\"browser.brands\": {\n\t\t\"description\": \"Array of brand name and version separated by a space\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\" Not A;Brand 99\\\",\\\"Chromium 99\\\",\\\"Chrome 99\\\"]\"]\n\t},\n\t\"browser.platform\": {\n\t\t\"description\": \"The platform on which the browser is running\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent.\\nThe list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Windows\",\n\t\t\t\"macOS\",\n\t\t\t\"Android\"\n\t\t]\n\t},\n\t\"browser.mobile\": {\n\t\t\"description\": \"A boolean that is true if the browser is running on a mobile device\",\n\t\t\"type\": \"boolean\",\n\t\t\"note\": \"This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset.\\n\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"browser.language\": {\n\t\t\"description\": \"Preferred language of the user using the browser\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value is intended to be taken from the Navigator API `navigator.language`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"en\",\n\t\t\t\"en-US\",\n\t\t\t\"fr\",\n\t\t\t\"fr-FR\"\n\t\t]\n\t}\n};\nvar browser_default = {\n\tnamespace: namespace$66,\n\tdescription: description$66,\n\tattributes: attributes$66\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cassandra.json\nvar namespace$65 = \"cassandra\";\nvar description$65 = \"This section defines attributes for Cassandra.\\n\";\nvar attributes$65 = {\n\t\"cassandra.coordinator.dc\": {\n\t\t\"description\": \"The data center of the coordinating node for a query.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"us-west-2\"]\n\t},\n\t\"cassandra.coordinator.id\": {\n\t\t\"description\": \"The ID of the coordinating node for a query.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"be13faa2-8574-4d71-926d-27f16cf8a7af\"]\n\t},\n\t\"cassandra.consistency.level\": {\n\t\t\"description\": \"The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"all\",\n\t\t\t\"each_quorum\",\n\t\t\t\"quorum\",\n\t\t\t\"local_quorum\",\n\t\t\t\"one\",\n\t\t\t\"two\",\n\t\t\t\"three\",\n\t\t\t\"local_one\",\n\t\t\t\"any\",\n\t\t\t\"serial\",\n\t\t\t\"local_serial\"\n\t\t]\n\t},\n\t\"cassandra.query.idempotent\": {\n\t\t\"description\": \"Whether or not the query is idempotent.\\n\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"cassandra.page.size\": {\n\t\t\"description\": \"The fetch size used for paging, i.e. how many rows will be returned at once.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"5000\"]\n\t},\n\t\"cassandra.speculative_execution.count\": {\n\t\t\"description\": \"The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"2\"]\n\t}\n};\nvar cassandra_default = {\n\tnamespace: namespace$65,\n\tdescription: description$65,\n\tattributes: attributes$65\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cicd.json\nvar namespace$64 = \"cicd\";\nvar description$64 = \"This group describes attributes specific to pipelines within a Continuous Integration and Continuous Deployment (CI/CD) system. A [pipeline](https://wikipedia.org/wiki/Pipeline_(computing)) in this case is a series of steps that are performed in order to deliver a new version of software. This aligns with the [Britannica](https://www.britannica.com/dictionary/pipeline) definition of a pipeline where a **pipeline** is the system for developing and producing something. In the context of CI/CD, a pipeline produces or delivers software.\\n\";\nvar attributes$64 = {\n\t\"cicd.pipeline.name\": {\n\t\t\"description\": \"The human readable name of the pipeline within a CI/CD system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Build and Test\",\n\t\t\t\"Lint\",\n\t\t\t\"Deploy Go Project\",\n\t\t\t\"deploy_to_environment\"\n\t\t]\n\t},\n\t\"cicd.pipeline.run.id\": {\n\t\t\"description\": \"The unique identifier of a pipeline run within a CI/CD system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"120912\"]\n\t},\n\t\"cicd.pipeline.run.url.full\": {\n\t\t\"description\": \"The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075\"]\n\t},\n\t\"cicd.pipeline.run.state\": {\n\t\t\"description\": \"The pipeline run goes through these states during its lifecycle.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"pending\",\n\t\t\t\"executing\",\n\t\t\t\"finalizing\"\n\t\t]\n\t},\n\t\"cicd.pipeline.task.name\": {\n\t\t\"description\": \"The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Run GoLang Linter\",\n\t\t\t\"Go Build\",\n\t\t\t\"go-test\",\n\t\t\t\"deploy_binary\"\n\t\t]\n\t},\n\t\"cicd.pipeline.task.run.id\": {\n\t\t\"description\": \"The unique identifier of a task run within a pipeline.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"12097\"]\n\t},\n\t\"cicd.pipeline.task.run.url.full\": {\n\t\t\"description\": \"The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075\"]\n\t},\n\t\"cicd.pipeline.task.run.result\": {\n\t\t\"description\": \"The result of a task run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"success\",\n\t\t\t\"failure\",\n\t\t\t\"error\",\n\t\t\t\"timeout\",\n\t\t\t\"cancellation\",\n\t\t\t\"skip\"\n\t\t]\n\t},\n\t\"cicd.pipeline.task.type\": {\n\t\t\"description\": \"The type of the task within a pipeline.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"build\",\n\t\t\t\"test\",\n\t\t\t\"deploy\"\n\t\t]\n\t},\n\t\"cicd.pipeline.result\": {\n\t\t\"description\": \"The result of a pipeline run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"success\",\n\t\t\t\"failure\",\n\t\t\t\"error\",\n\t\t\t\"timeout\",\n\t\t\t\"cancellation\",\n\t\t\t\"skip\"\n\t\t]\n\t},\n\t\"cicd.pipeline.action.name\": {\n\t\t\"description\": \"The kind of action a pipeline run is performing.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"BUILD\",\n\t\t\t\"RUN\",\n\t\t\t\"SYNC\"\n\t\t]\n\t},\n\t\"cicd.worker.id\": {\n\t\t\"description\": \"The unique identifier of a worker within a CICD system.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"abc123\",\n\t\t\t\"10.0.1.2\",\n\t\t\t\"controller\"\n\t\t]\n\t},\n\t\"cicd.worker.name\": {\n\t\t\"description\": \"The name of a worker within a CICD system.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"agent-abc\",\n\t\t\t\"controller\",\n\t\t\t\"Ubuntu LTS\"\n\t\t]\n\t},\n\t\"cicd.worker.url.full\": {\n\t\t\"description\": \"The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://cicd.example.org/worker/abc123\"]\n\t},\n\t\"cicd.worker.state\": {\n\t\t\"description\": \"The state of a CICD worker / agent.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"available\",\n\t\t\t\"busy\",\n\t\t\t\"offline\"\n\t\t]\n\t},\n\t\"cicd.system.component\": {\n\t\t\"description\": \"The name of a component of the CICD system.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"controller\",\n\t\t\t\"scheduler\",\n\t\t\t\"agent\"\n\t\t]\n\t}\n};\nvar cicd_default = {\n\tnamespace: namespace$64,\n\tdescription: description$64,\n\tattributes: attributes$64\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/client.json\nvar namespace$63 = \"client\";\nvar description$63 = \"These attributes may be used to describe the client in a connection-based network interaction where there is one side that initiates the connection (the client is the side that initiates the connection). This covers all TCP network interactions since TCP is connection-based and one side initiates the connection (an exception is made for peer-to-peer communication over TCP where the \\\"user-facing\\\" surface of the protocol / API doesn't expose a clear notion of client and server). This also covers UDP network interactions where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.\\n\";\nvar attributes$63 = {\n\t\"client.address\": {\n\t\t\"description\": \"Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries,  for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"client.example.com\",\n\t\t\t\"10.1.2.80\",\n\t\t\t\"/tmp/my.sock\"\n\t\t]\n\t},\n\t\"client.port\": {\n\t\t\"description\": \"Client port number.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries,  for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"65123\"]\n\t}\n};\nvar client_default = {\n\tnamespace: namespace$63,\n\tdescription: description$63,\n\tattributes: attributes$63\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cloud.json\nvar namespace$62 = \"cloud\";\nvar description$62 = \"A cloud environment (e.g. GCP, Azure, AWS).\\n\";\nvar attributes$62 = {\n\t\"cloud.provider\": {\n\t\t\"description\": \"Name of the cloud provider.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"alibaba_cloud\",\n\t\t\t\"aws\",\n\t\t\t\"azure\",\n\t\t\t\"gcp\",\n\t\t\t\"heroku\",\n\t\t\t\"ibm_cloud\",\n\t\t\t\"oracle_cloud\",\n\t\t\t\"tencent_cloud\"\n\t\t]\n\t},\n\t\"cloud.account.id\": {\n\t\t\"description\": \"The cloud account ID the resource is assigned to.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"111111111111\", \"opentelemetry\"]\n\t},\n\t\"cloud.region\": {\n\t\t\"description\": \"The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"us-central1\", \"us-east-1\"]\n\t},\n\t\"cloud.resource_id\": {\n\t\t\"description\": \"Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"On some cloud providers, it may not be possible to determine the full ID at startup,\\nso it may be necessary to set `cloud.resource_id` as a span attribute instead.\\n\\nThe exact value to use for `cloud.resource_id` depends on the cloud provider.\\nThe following well-known definitions MUST be used if you set this attribute and they apply:\\n\\n- **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\\n  Take care not to use the \\\"invoked ARN\\\" directly but replace any\\n  [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)\\n  with the resolved function version, as the same runtime instance may be invocable with\\n  multiple different aliases.\\n- **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\\n- **Azure:** The [Fully Qualified Resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function,\\n  *not* the function app, having the form\\n  `/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.\\n  This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share\\n  a TracerProvider.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\",\n\t\t\t\"//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID\",\n\t\t\t\"/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>\"\n\t\t]\n\t},\n\t\"cloud.availability_zone\": {\n\t\t\"description\": \"Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Availability zones are called \\\"zones\\\" on Alibaba Cloud and Google Cloud.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"us-east-1c\"]\n\t},\n\t\"cloud.platform\": {\n\t\t\"description\": \"The cloud platform in use.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The prefix of the service SHOULD match the one specified in `cloud.provider`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"alibaba_cloud_ecs\",\n\t\t\t\"alibaba_cloud_fc\",\n\t\t\t\"alibaba_cloud_openshift\",\n\t\t\t\"aws_ec2\",\n\t\t\t\"aws_ecs\",\n\t\t\t\"aws_eks\",\n\t\t\t\"aws_lambda\",\n\t\t\t\"aws_elastic_beanstalk\",\n\t\t\t\"aws_app_runner\",\n\t\t\t\"aws_openshift\",\n\t\t\t\"azure.vm\",\n\t\t\t\"azure.container_apps\",\n\t\t\t\"azure.container_instances\",\n\t\t\t\"azure.aks\",\n\t\t\t\"azure.functions\",\n\t\t\t\"azure.app_service\",\n\t\t\t\"azure.openshift\",\n\t\t\t\"azure_vm\",\n\t\t\t\"azure_container_apps\",\n\t\t\t\"azure_container_instances\",\n\t\t\t\"azure_aks\",\n\t\t\t\"azure_functions\",\n\t\t\t\"azure_app_service\",\n\t\t\t\"azure_openshift\",\n\t\t\t\"gcp_bare_metal_solution\",\n\t\t\t\"gcp_compute_engine\",\n\t\t\t\"gcp_cloud_run\",\n\t\t\t\"gcp_kubernetes_engine\",\n\t\t\t\"gcp_cloud_functions\",\n\t\t\t\"gcp_app_engine\",\n\t\t\t\"gcp_openshift\",\n\t\t\t\"ibm_cloud_openshift\",\n\t\t\t\"oracle_cloud_compute\",\n\t\t\t\"oracle_cloud_oke\",\n\t\t\t\"tencent_cloud_cvm\",\n\t\t\t\"tencent_cloud_eks\",\n\t\t\t\"tencent_cloud_scf\"\n\t\t]\n\t}\n};\nvar cloud_default = {\n\tnamespace: namespace$62,\n\tdescription: description$62,\n\tattributes: attributes$62\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cloudevents.json\nvar namespace$61 = \"cloudevents\";\nvar description$61 = \"This document defines attributes for CloudEvents.\\n\";\nvar attributes$61 = {\n\t\"cloudevents.event_id\": {\n\t\t\"description\": \"The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"123e4567-e89b-12d3-a456-426614174000\", \"0001\"]\n\t},\n\t\"cloudevents.event_source\": {\n\t\t\"description\": \"The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"https://github.com/cloudevents\",\n\t\t\t\"/cloudevents/spec/pull/123\",\n\t\t\t\"my-service\"\n\t\t]\n\t},\n\t\"cloudevents.event_spec_version\": {\n\t\t\"description\": \"The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1.0\"]\n\t},\n\t\"cloudevents.event_type\": {\n\t\t\"description\": \"The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"com.github.pull_request.opened\", \"com.example.object.deleted.v2\"]\n\t},\n\t\"cloudevents.event_subject\": {\n\t\t\"description\": \"The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"mynewfile.jpg\"]\n\t}\n};\nvar cloudevents_default = {\n\tnamespace: namespace$61,\n\tdescription: description$61,\n\tattributes: attributes$61\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cloudfoundry.json\nvar namespace$60 = \"cloudfoundry\";\nvar description$60 = \"CloudFoundry resource attributes.\\n\";\nvar attributes$60 = {\n\t\"cloudfoundry.system.id\": {\n\t\t\"description\": \"A guid or another name describing the event source.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"CloudFoundry defines the `source_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).\\nIt is used for logs and metrics emitted by CloudFoundry. It is\\nsupposed to contain the component name, e.g. \\\"gorouter\\\", for\\nCloudFoundry components.\\n\\nWhen system components are instrumented, values from the\\n[Bosh spec](https://bosh.io/docs/jobs/#properties-spec)\\nshould be used. The `system.id` should be set to\\n`spec.deployment/spec.name`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"cf/gorouter\"]\n\t},\n\t\"cloudfoundry.system.instance.id\": {\n\t\t\"description\": \"A guid describing the concrete instance of the event source.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).\\nIt is used for logs and metrics emitted by CloudFoundry. It is\\nsupposed to contain the vm id for CloudFoundry components.\\n\\nWhen system components are instrumented, values from the\\n[Bosh spec](https://bosh.io/docs/jobs/#properties-spec)\\nshould be used. The `system.instance.id` should be set to `spec.id`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.app.name\": {\n\t\t\"description\": \"The name of the application.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.application_name`. This is the same value\\nas reported by `cf apps`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-app-name\"]\n\t},\n\t\"cloudfoundry.app.id\": {\n\t\t\"description\": \"The guid of the application.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.application_id`. This is the same value as\\nreported by `cf app <app-name> --guid`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.app.instance.id\": {\n\t\t\"description\": \"The index of the application instance. 0 when just one instance is active.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).\\nIt is used for logs and metrics emitted by CloudFoundry. It is\\nsupposed to contain the application instance index for applications\\ndeployed on the runtime.\\n\\nApplication instrumentation should use the value from environment\\nvariable `CF_INSTANCE_INDEX`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"1\"]\n\t},\n\t\"cloudfoundry.space.name\": {\n\t\t\"description\": \"The name of the CloudFoundry space the application is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.space_name`. This is the same value as\\nreported by `cf spaces`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-space-name\"]\n\t},\n\t\"cloudfoundry.space.id\": {\n\t\t\"description\": \"The guid of the CloudFoundry space the application is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.space_id`. This is the same value as\\nreported by `cf space <space-name> --guid`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.org.name\": {\n\t\t\"description\": \"The name of the CloudFoundry organization the app is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.org_name`. This is the same value as\\nreported by `cf orgs`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-org-name\"]\n\t},\n\t\"cloudfoundry.org.id\": {\n\t\t\"description\": \"The guid of the CloudFoundry org the application is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.org_id`. This is the same value as\\nreported by `cf org <org-name> --guid`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.process.id\": {\n\t\t\"description\": \"The UID identifying the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.process_id`. It is supposed to be equal to\\n`VCAP_APPLICATION.app_id` for applications deployed to the runtime.\\nFor system components, this could be the actual PID.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.process.type\": {\n\t\t\"description\": \"The type of process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"CloudFoundry applications can consist of multiple jobs. Usually the\\nmain process will be of type `web`. There can be additional background\\ntasks or side-cars with different process types.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"web\"]\n\t}\n};\nvar cloudfoundry_default = {\n\tnamespace: namespace$60,\n\tdescription: description$60,\n\tattributes: attributes$60\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/code.json\nvar namespace$59 = \"code\";\nvar description$59 = \"These attributes provide context about source code\\n\";\nvar attributes$59 = {\n\t\"code.function.name\": {\n\t\t\"description\": \"The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.\\nThe values are usually the same (or prefixes of) the ones found in native stack trace representation stored in\\n`code.stacktrace` without information on arguments.\\n\\nExamples:\\n\\n* Java method: `com.example.MyHttpService.serveRequest`\\n* Java anonymous class method: `com.mycompany.Main$1.myMethod`\\n* Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`\\n* PHP function: `GuzzleHttp\\\\Client::transfer`\\n* Go function: `github.com/my/repo/pkg.foo.func5`\\n* Elixir: `OpenTelemetry.Ctx.new`\\n* Erlang: `opentelemetry_ctx:new`\\n* Rust: `playground::my_module::my_cool_func`\\n* C function: `fopen`\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"com.example.MyHttpService.serveRequest\",\n\t\t\t\"GuzzleHttp\\\\Client::transfer\",\n\t\t\t\"fopen\"\n\t\t]\n\t},\n\t\"code.file.path\": {\n\t\t\"description\": \"The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"/usr/local/MyApplication/content_root/app/index.php\"]\n\t},\n\t\"code.line.number\": {\n\t\t\"description\": \"The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"42\"]\n\t},\n\t\"code.column.number\": {\n\t\t\"description\": \"The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"16\"]\n\t},\n\t\"code.stacktrace\": {\n\t\t\"description\": \"A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\\n\"]\n\t}\n};\nvar code_default = {\n\tnamespace: namespace$59,\n\tdescription: description$59,\n\tattributes: attributes$59\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/container.json\nvar namespace$58 = \"container\";\nvar description$58 = \"A container instance.\\n\";\nvar attributes$58 = {\n\t\"container.name\": {\n\t\t\"description\": \"Container name used by container runtime.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry-autoconf\"]\n\t},\n\t\"container.id\": {\n\t\t\"description\": \"Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"a3bf90e006b2\"]\n\t},\n\t\"container.runtime\": {\n\t\t\"description\": \"The container runtime managing this container.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"docker\",\n\t\t\t\"containerd\",\n\t\t\t\"rkt\"\n\t\t]\n\t},\n\t\"container.image.name\": {\n\t\t\"description\": \"Name of the image the container was built on.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"gcr.io/opentelemetry/operator\"]\n\t},\n\t\"container.image.tags\": {\n\t\t\"description\": \"Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"v1.27.1\\\",\\\"3.5.7-0\\\"]\"]\n\t},\n\t\"container.image.id\": {\n\t\t\"description\": \"Runtime specific image identifier. Usually a hash algorithm followed by a UUID.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint.\\nK8s defines a link to the container registry repository with digest `\\\"imageID\\\": \\\"registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625\\\"`.\\nThe ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f\"]\n\t},\n\t\"container.image.repo_digests\": {\n\t\t\"description\": \"Repo digests of the container image as provided by the container runtime.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"[Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb\\\",\\\"internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578\\\"]\"]\n\t},\n\t\"container.command\": {\n\t\t\"description\": \"The command used to run the container (i.e. the command name).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"otelcontribcol\"]\n\t},\n\t\"container.command_line\": {\n\t\t\"description\": \"The full command run by the container as a single string representing the full command.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"otelcontribcol --config config.yaml\"]\n\t},\n\t\"container.command_args\": {\n\t\t\"description\": \"All the command arguments (including the command/executable itself) run by the container.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"otelcontribcol\\\",\\\"--config\\\",\\\"config.yaml\\\"]\"]\n\t},\n\t\"container.label\": {\n\t\t\"description\": \"Container labels, `<key>` being the label name, the value being the label value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"For example, a docker container label `app` with value `nginx` SHOULD be recorded as the `container.label.app` attribute with value `\\\"nginx\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"nginx\"]\n\t},\n\t\"container.csi.plugin.name\": {\n\t\t\"description\": \"The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This can sometimes be referred to as a \\\"driver\\\" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"pd.csi.storage.gke.io\"]\n\t},\n\t\"container.csi.volume.id\": {\n\t\t\"description\": \"The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This can sometimes be referred to as a \\\"volume handle\\\" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk\"]\n\t}\n};\nvar container_default = {\n\tnamespace: namespace$58,\n\tdescription: description$58,\n\tattributes: attributes$58\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cpu.json\nvar namespace$57 = \"cpu\";\nvar description$57 = \"Attributes specific to a cpu instance.\";\nvar attributes$57 = {\n\t\"cpu.mode\": {\n\t\t\"description\": \"The mode of the CPU\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"user\",\n\t\t\t\"system\",\n\t\t\t\"nice\",\n\t\t\t\"idle\",\n\t\t\t\"iowait\",\n\t\t\t\"interrupt\",\n\t\t\t\"steal\",\n\t\t\t\"kernel\"\n\t\t]\n\t},\n\t\"cpu.logical_number\": {\n\t\t\"description\": \"The logical CPU number [0..n-1]\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\"]\n\t}\n};\nvar cpu_default = {\n\tnamespace: namespace$57,\n\tdescription: description$57,\n\tattributes: attributes$57\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cpython.json\nvar namespace$56 = \"cpython\";\nvar description$56 = \"This document defines CPython related attributes.\\n\";\nvar attributes$56 = { \"cpython.gc.generation\": {\n\t\"description\": \"Value of the garbage collector collection generation.\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\n\t\t\"0\",\n\t\t\"1\",\n\t\t\"2\"\n\t]\n} };\nvar cpython_default = {\n\tnamespace: namespace$56,\n\tdescription: description$56,\n\tattributes: attributes$56\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/database.json\nvar namespace$55 = \"database\";\nvar description$55 = \"This group defines the attributes used to describe telemetry in the context of databases.\\n\";\nvar attributes$55 = {\n\t\"db.collection.name\": {\n\t\t\"description\": \"The name of a collection (table, container) within the database.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It is RECOMMENDED to capture the value as provided by the application\\nwithout attempting to do any case normalization.\\n\\nThe collection name SHOULD NOT be extracted from `db.query.text`,\\nwhen the database system supports query text with multiple collections\\nin non-batch operations.\\n\\nFor batch operations, if the individual operations are known to have the same\\ncollection name then that collection name SHOULD be used.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"public.users\", \"customers\"]\n\t},\n\t\"db.namespace\": {\n\t\t\"description\": \"The name of the database, fully qualified within the server address and port.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted.\\nSemantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.\\nIt is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"customers\", \"test.users\"]\n\t},\n\t\"db.operation.name\": {\n\t\t\"description\": \"The name of the operation or command being executed.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It is RECOMMENDED to capture the value as provided by the application\\nwithout attempting to do any case normalization.\\n\\nThe operation name SHOULD NOT be extracted from `db.query.text`,\\nwhen the database system supports query text with multiple operations\\nin non-batch operations.\\n\\nIf spaces can occur in the operation name, multiple consecutive spaces\\nSHOULD be normalized to a single space.\\n\\nFor batch operations, if the individual operations are known to have the same operation name\\nthen that operation name SHOULD be used prepended by `BATCH `,\\notherwise `db.operation.name` SHOULD be `BATCH` or some other database\\nsystem specific term if more applicable.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"findAndModify\",\n\t\t\t\"HMSET\",\n\t\t\t\"SELECT\"\n\t\t]\n\t},\n\t\"db.query.text\": {\n\t\t\"description\": \"The database query being executed.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).\\nFor batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.\\nParameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"SELECT * FROM wuser_table where username = ?\", \"SET mykey ?\"]\n\t},\n\t\"db.query.parameter\": {\n\t\t\"description\": \"A database query parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If a query parameter has no name and instead is referenced only by index,\\nthen `<key>` SHOULD be the 0-based index.\\n\\n`db.query.parameter.<key>` SHOULD match\\nup with the parameterized placeholders present in `db.query.text`.\\n\\n`db.query.parameter.<key>` SHOULD NOT be captured on batch operations.\\n\\nExamples:\\n\\n- For a query `SELECT * FROM users where username =  %s` with the parameter `\\\"jdoe\\\"`,\\n  the attribute `db.query.parameter.0` SHOULD be set to `\\\"jdoe\\\"`.\\n\\n- For a query `\\\"SELECT * FROM users WHERE username = %(username)s;` with parameter\\n  `username = \\\"jdoe\\\"`, the attribute `db.query.parameter.username` SHOULD be set to `\\\"jdoe\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"someval\", \"55\"]\n\t},\n\t\"db.query.summary\": {\n\t\t\"description\": \"Low cardinality summary of a database query.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The query summary describes a class of database queries and is useful\\nas a grouping key, especially when analyzing telemetry for database\\ncalls involving complex queries.\\n\\nSummary may be available to the instrumentation through\\ninstrumentation hooks or other means. If it is not available, instrumentations\\nthat support query parsing SHOULD generate a summary following\\n[Generating query summary](/docs/database/database-spans.md#generating-a-summary-of-the-query)\\nsection.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"SELECT wuser_table\",\n\t\t\t\"INSERT shipping_details SELECT orders\",\n\t\t\t\"get user by id\"\n\t\t]\n\t},\n\t\"db.stored_procedure.name\": {\n\t\t\"description\": \"The name of a stored procedure within the database.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It is RECOMMENDED to capture the value as provided by the application\\nwithout attempting to do any case normalization.\\n\\nFor batch operations, if the individual operations are known to have the same\\nstored procedure name then that stored procedure name SHOULD be used.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"GetCustomer\"]\n\t},\n\t\"db.operation.parameter\": {\n\t\t\"description\": \"A database operation parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"For example, a client-side maximum number of rows to read from the database\\nMAY be recorded as the `db.operation.parameter.max_rows` attribute.\\n\\n`db.query.text` parameters SHOULD be captured using `db.query.parameter.<key>`\\ninstead of `db.operation.parameter.<key>`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"someval\", \"55\"]\n\t},\n\t\"db.operation.batch.size\": {\n\t\t\"description\": \"The number of queries included in a batch operation.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"2\",\n\t\t\t\"3\",\n\t\t\t\"4\"\n\t\t]\n\t},\n\t\"db.response.status_code\": {\n\t\t\"description\": \"Database response status code.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.\\nSemantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"102\",\n\t\t\t\"ORA-17002\",\n\t\t\t\"08P01\",\n\t\t\t\"404\"\n\t\t]\n\t},\n\t\"db.response.returned_rows\": {\n\t\t\"description\": \"Number of rows returned by the operation.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"10\",\n\t\t\t\"30\",\n\t\t\t\"1000\"\n\t\t]\n\t},\n\t\"db.system.name\": {\n\t\t\"description\": \"The database management system (DBMS) product as identified by the client instrumentation.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system.name` is set to `postgresql` based on the instrumentation's best knowledge.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"other_sql\",\n\t\t\t\"softwareag.adabas\",\n\t\t\t\"actian.ingres\",\n\t\t\t\"aws.dynamodb\",\n\t\t\t\"aws.redshift\",\n\t\t\t\"azure.cosmosdb\",\n\t\t\t\"intersystems.cache\",\n\t\t\t\"cassandra\",\n\t\t\t\"clickhouse\",\n\t\t\t\"cockroachdb\",\n\t\t\t\"couchbase\",\n\t\t\t\"couchdb\",\n\t\t\t\"derby\",\n\t\t\t\"elasticsearch\",\n\t\t\t\"firebirdsql\",\n\t\t\t\"gcp.spanner\",\n\t\t\t\"geode\",\n\t\t\t\"h2database\",\n\t\t\t\"hbase\",\n\t\t\t\"hive\",\n\t\t\t\"hsqldb\",\n\t\t\t\"ibm.db2\",\n\t\t\t\"ibm.informix\",\n\t\t\t\"ibm.netezza\",\n\t\t\t\"influxdb\",\n\t\t\t\"instantdb\",\n\t\t\t\"mariadb\",\n\t\t\t\"memcached\",\n\t\t\t\"mongodb\",\n\t\t\t\"microsoft.sql_server\",\n\t\t\t\"mysql\",\n\t\t\t\"neo4j\",\n\t\t\t\"opensearch\",\n\t\t\t\"oracle.db\",\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"sap.hana\",\n\t\t\t\"sap.maxdb\",\n\t\t\t\"sqlite\",\n\t\t\t\"teradata\",\n\t\t\t\"trino\"\n\t\t]\n\t},\n\t\"db.client.connection.state\": {\n\t\t\"description\": \"The state of a connection in the pool\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"idle\", \"used\"]\n\t},\n\t\"db.client.connection.pool.name\": {\n\t\t\"description\": \"The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"myDataSource\"]\n\t}\n};\nvar database_default = {\n\tnamespace: namespace$55,\n\tdescription: description$55,\n\tattributes: attributes$55\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/db.json\nvar namespace$54 = \"db\";\nvar description$54 = \"Database operations attributes\";\nvar attributes$54 = {\n\t\"db.system.name\": {\n\t\t\"description\": \"Identifies the database management system product\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"postgresql\",\n\t\t\t\"mysql\",\n\t\t\t\"microsoft.sql_server\",\n\t\t\t\"mongodb\",\n\t\t\t\"redis\",\n\t\t\t\"cassandra\"\n\t\t]\n\t},\n\t\"db.collection.name\": {\n\t\t\"description\": \"Name of a collection (table, container) within the database\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.namespace\": {\n\t\t\"description\": \"Fully qualified database name within server address and port\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.operation.name\": {\n\t\t\"description\": \"Name of the operation or command being executed\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"SELECT\",\n\t\t\t\"INSERT\",\n\t\t\t\"UPDATE\",\n\t\t\t\"DELETE\",\n\t\t\t\"CREATE\",\n\t\t\t\"DROP\",\n\t\t\t\"find\",\n\t\t\t\"insert\",\n\t\t\t\"update\",\n\t\t\t\"delete\"\n\t\t]\n\t},\n\t\"db.response.status_code\": {\n\t\t\"description\": \"Status code returned by the database\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.operation.batch.size\": {\n\t\t\"description\": \"Number of queries in a batch operation\",\n\t\t\"type\": \"number\"\n\t},\n\t\"db.query.summary\": {\n\t\t\"description\": \"Low-cardinality summary of a database query\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.query.text\": {\n\t\t\"description\": \"The actual database query being executed\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.stored_procedure.name\": {\n\t\t\"description\": \"Name of a stored procedure within the database\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.query.parameter.<key>\": {\n\t\t\"description\": \"Database query parameter values\",\n\t\t\"type\": \"string\"\n\t}\n};\nvar db_default = {\n\tnamespace: namespace$54,\n\tdescription: description$54,\n\tattributes: attributes$54\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/deployment.json\nvar namespace$53 = \"deployment\";\nvar description$53 = \"This document defines attributes for software deployments.\\n\";\nvar attributes$53 = {\n\t\"deployment.name\": {\n\t\t\"description\": \"The name of the deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"deploy my app\", \"deploy-frontend\"]\n\t},\n\t\"deployment.id\": {\n\t\t\"description\": \"The id of the deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1208\"]\n\t},\n\t\"deployment.status\": {\n\t\t\"description\": \"The status of the deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"failed\", \"succeeded\"]\n\t},\n\t\"deployment.environment.name\": {\n\t\t\"description\": \"Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`deployment.environment.name` does not affect the uniqueness constraints defined through\\nthe `service.namespace`, `service.name` and `service.instance.id` resource attributes.\\nThis implies that resources carrying the following attribute combinations MUST be\\nconsidered to be identifying the same service:\\n\\n- `service.name=frontend`, `deployment.environment.name=production`\\n- `service.name=frontend`, `deployment.environment.name=staging`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"staging\", \"production\"]\n\t}\n};\nvar deployment_default = {\n\tnamespace: namespace$53,\n\tdescription: description$53,\n\tattributes: attributes$53\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/destination.json\nvar namespace$52 = \"destination\";\nvar description$52 = \"These attributes may be used to describe the receiver of a network exchange/packet. These should be used when there is no client/server relationship between the two sides, or when that relationship is unknown. This covers low-level network interactions (e.g. packet tracing) where you don't know if there was a connection or which side initiated it. This also covers unidirectional UDP flows and peer-to-peer communication where the \\\"user-facing\\\" surface of the protocol / API doesn't expose a clear notion of client and server.\\n\";\nvar attributes$52 = {\n\t\"destination.address\": {\n\t\t\"description\": \"Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"destination.example.com\",\n\t\t\t\"10.1.2.80\",\n\t\t\t\"/tmp/my.sock\"\n\t\t]\n\t},\n\t\"destination.port\": {\n\t\t\"description\": \"Destination port number\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3389\", \"2888\"]\n\t}\n};\nvar destination_default = {\n\tnamespace: namespace$52,\n\tdescription: description$52,\n\tattributes: attributes$52\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/device.json\nvar namespace$51 = \"device\";\nvar description$51 = \"Describes device attributes.\\n\";\nvar attributes$51 = {\n\t\"device.id\": {\n\t\t\"description\": \"A unique identifier representing the device\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is uninstalled and re-installed.\\nHowever, it might be resettable by the user for all apps on a device.\\nHardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as values.\\n\\nMore information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids).\\n\\n> [!WARNING]\\n>\\n> This attribute may contain sensitive (PII) information. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply,\\n> ensure you do your own due diligence.\\n>\\n> Due to these reasons, this identifier is not recommended for consumer applications and will likely result in rejection from both Google Play and App Store.\\n> However, it may be appropriate for specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with appropriate compliance clearance.\\n> Any instrumentation providing this identifier MUST implement it as an opt-in feature.\\n>\\n> See [`app.installation.id`](/docs/registry/attributes/app.md#app-installation-id) for a more privacy-preserving alternative.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"123456789012345\", \"01:23:45:67:89:AB\"]\n\t},\n\t\"device.manufacturer\": {\n\t\t\"description\": \"The name of the device manufacturer\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Apple\", \"Samsung\"]\n\t},\n\t\"device.model.identifier\": {\n\t\t\"description\": \"The model identifier for the device\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It's recommended this value represents a machine-readable version of the model identifier rather than the market or consumer-friendly name of the device.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"iPhone3,4\", \"SM-G920F\"]\n\t},\n\t\"device.model.name\": {\n\t\t\"description\": \"The marketing name for the device model\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"iPhone 6s Plus\", \"Samsung Galaxy S6\"]\n\t}\n};\nvar device_default = {\n\tnamespace: namespace$51,\n\tdescription: description$51,\n\tattributes: attributes$51\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/disk.json\nvar namespace$50 = \"disk\";\nvar description$50 = \"These attributes may be used for any disk related operation.\\n\";\nvar attributes$50 = { \"disk.io.direction\": {\n\t\"description\": \"The disk IO operation direction.\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"read\", \"write\"]\n} };\nvar disk_default = {\n\tnamespace: namespace$50,\n\tdescription: description$50,\n\tattributes: attributes$50\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/dns.json\nvar namespace$49 = \"dns\";\nvar description$49 = \"This document defines the shared attributes used to report a DNS query.\\n\";\nvar attributes$49 = {\n\t\"dns.question.name\": {\n\t\t\"description\": \"The name being queried.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\\\\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \\\\t, \\\\r, and \\\\n respectively.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"www.example.com\", \"opentelemetry.io\"]\n\t},\n\t\"dns.answers\": {\n\t\t\"description\": \"The list of IPv4 or IPv6 addresses resolved during DNS lookup.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"10.0.0.1\\\",\\\"2001:0db8:85a3:0000:0000:8a2e:0370:7334\\\"]\"]\n\t}\n};\nvar dns_default = {\n\tnamespace: namespace$49,\n\tdescription: description$49,\n\tattributes: attributes$49\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/dotnet.json\nvar namespace$48 = \"dotnet\";\nvar description$48 = \"This document defines .NET related attributes.\\n\";\nvar attributes$48 = { \"dotnet.gc.heap.generation\": {\n\t\"description\": \"Name of the garbage collector managed heap generation.\",\n\t\"type\": \"string\",\n\t\"stability\": \"stable\",\n\t\"examples\": [\n\t\t\"gen0\",\n\t\t\"gen1\",\n\t\t\"gen2\",\n\t\t\"loh\",\n\t\t\"poh\"\n\t]\n} };\nvar dotnet_default = {\n\tnamespace: namespace$48,\n\tdescription: description$48,\n\tattributes: attributes$48\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/elasticsearch.json\nvar namespace$47 = \"elasticsearch\";\nvar description$47 = \"This section defines attributes for Elasticsearch.\\n\";\nvar attributes$47 = { \"elasticsearch.node.name\": {\n\t\"description\": \"Represents the human-readable identifier of the node/instance to which a request was routed.\\n\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"instance-0000000001\"]\n} };\nvar elasticsearch_default = {\n\tnamespace: namespace$47,\n\tdescription: description$47,\n\tattributes: attributes$47\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/enduser.json\nvar namespace$46 = \"enduser\";\nvar description$46 = \"Describes the end user.\\n\";\nvar attributes$46 = {\n\t\"enduser.id\": {\n\t\t\"description\": \"Unique identifier of an end user in the system. It maybe a username, email address, or other identifier.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Unique identifier of an end user in the system.\\n\\n> [!Warning]\\n> This field contains sensitive (PII) information.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"username\"]\n\t},\n\t\"enduser.pseudo.id\": {\n\t\t\"description\": \"Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Pseudonymous identifier of an end user.\\n\\n> [!Warning]\\n> This field contains sensitive (linkable PII) information.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"QdH5CAWJgqVT4rOr0qtumf\"]\n\t}\n};\nvar enduser_default = {\n\tnamespace: namespace$46,\n\tdescription: description$46,\n\tattributes: attributes$46\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/error.json\nvar namespace$45 = \"error\";\nvar description$45 = \"This document defines the shared attributes used to report an error.\\n\";\nvar attributes$45 = {\n\t\"error.type\": {\n\t\t\"description\": \"Describes a class of error the operation ended with.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The `error.type` SHOULD be predictable, and SHOULD have low cardinality.\\n\\nWhen `error.type` is set to a type (e.g., an exception type), its\\ncanonical class name identifying the type within the artifact SHOULD be used.\\n\\nInstrumentations SHOULD document the list of errors they report.\\n\\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\\nshould be prepared for `error.type` to have high cardinality at query time when no\\nadditional filters are applied.\\n\\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\\n\\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\\nit's RECOMMENDED to:\\n\\n- Use a domain-specific attribute\\n- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"_OTHER\"]\n\t},\n\t\"error.message\": {\n\t\t\"description\": \"A message providing more detail about an error in human-readable form.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`error.message` should provide additional context and detail about an error.\\nIt is NOT RECOMMENDED to duplicate the value of `error.type` in `error.message`.\\nIt is also NOT RECOMMENDED to duplicate the value of `exception.message` in `error.message`.\\n\\n`error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded cardinality and overlap with span status.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Unexpected input type: string\", \"The user has exceeded their storage quota\"]\n\t}\n};\nvar error_default = {\n\tnamespace: namespace$45,\n\tdescription: description$45,\n\tattributes: attributes$45\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/faas.json\nvar namespace$44 = \"faas\";\nvar description$44 = \"FaaS attributes\";\nvar attributes$44 = {\n\t\"faas.name\": {\n\t\t\"description\": \"The name of the single function that this runtime instance executes.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This is the name of the function as configured/deployed on the FaaS\\nplatform and is usually different from the name of the callback\\nfunction (which may be stored in the\\n[`code.namespace`/`code.function.name`](/docs/general/attributes.md#source-code-attributes)\\nspan attributes).\\n\\nFor some cloud providers, the above definition is ambiguous. The following\\ndefinition of function name MUST be used for this attribute\\n(and consequently the span name) for the listed cloud providers/products:\\n\\n- **Azure:**  The full name `<FUNCAPP>/<FUNC>`, i.e., function app name\\n  followed by a forward slash followed by the function name (this form\\n  can also be seen in the resource JSON for the function).\\n  This means that a span attribute MUST be used, as an Azure function\\n  app can host multiple functions that would usually share\\n  a TracerProvider (see also the `cloud.resource_id` attribute).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-function\", \"myazurefunctionapp/some-function-name\"]\n\t},\n\t\"faas.version\": {\n\t\t\"description\": \"The immutable version of the function being executed.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Depending on the cloud provider and platform, use:\\n\\n- **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\\n  (an integer represented as a decimal string).\\n- **Google Cloud Run (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions)\\n  (i.e., the function name plus the revision suffix).\\n- **Google Cloud Functions:** The value of the\\n  [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\\n- **Azure Functions:** Not applicable. Do not set this attribute.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"26\", \"pinkfroid-00002\"]\n\t},\n\t\"faas.instance\": {\n\t\t\"description\": \"The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"- **AWS Lambda:** Use the (full) log stream name.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de\"]\n\t},\n\t\"faas.max_memory\": {\n\t\t\"description\": \"The amount of memory available to the serverless function converted to Bytes.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"134217728\"]\n\t},\n\t\"faas.trigger\": {\n\t\t\"description\": \"Type of the trigger which caused this function invocation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"datasource\",\n\t\t\t\"http\",\n\t\t\t\"pubsub\",\n\t\t\t\"timer\",\n\t\t\t\"other\"\n\t\t]\n\t},\n\t\"faas.invoked_name\": {\n\t\t\"description\": \"The name of the invoked function.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"SHOULD be equal to the `faas.name` resource attribute of the invoked function.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-function\"]\n\t},\n\t\"faas.invoked_provider\": {\n\t\t\"description\": \"The cloud provider of the invoked function.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"alibaba_cloud\",\n\t\t\t\"aws\",\n\t\t\t\"azure\",\n\t\t\t\"gcp\",\n\t\t\t\"tencent_cloud\"\n\t\t]\n\t},\n\t\"faas.invoked_region\": {\n\t\t\"description\": \"The cloud region of the invoked function.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"eu-central-1\"]\n\t},\n\t\"faas.invocation_id\": {\n\t\t\"description\": \"The invocation ID of the current function invocation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"af9d5aa4-a685-4c5f-a22b-444f80b3cc28\"]\n\t},\n\t\"faas.time\": {\n\t\t\"description\": \"A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2020-01-23T13:47:06Z\"]\n\t},\n\t\"faas.cron\": {\n\t\t\"description\": \"A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0/5 * * * ? *\"]\n\t},\n\t\"faas.coldstart\": {\n\t\t\"description\": \"A boolean that is true if the serverless function is executed for the first time (aka cold-start).\\n\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"faas.document.collection\": {\n\t\t\"description\": \"The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"myBucketName\", \"myDbName\"]\n\t},\n\t\"faas.document.operation\": {\n\t\t\"description\": \"Describes the type of the operation that was performed on the data.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"insert\",\n\t\t\t\"edit\",\n\t\t\t\"delete\"\n\t\t]\n\t},\n\t\"faas.document.time\": {\n\t\t\"description\": \"A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2020-01-23T13:47:06Z\"]\n\t},\n\t\"faas.document.name\": {\n\t\t\"description\": \"The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"myFile.txt\", \"myTableName\"]\n\t}\n};\nvar faas_default = {\n\tnamespace: namespace$44,\n\tdescription: description$44,\n\tattributes: attributes$44\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/feature_flags.json\nvar namespace$43 = \"feature_flags\";\nvar description$43 = \"This document defines attributes for Feature Flags.\\n\";\nvar attributes$43 = {\n\t\"feature_flag.key\": {\n\t\t\"description\": \"The lookup key of the feature flag.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\"logo-color\"]\n\t},\n\t\"feature_flag.provider.name\": {\n\t\t\"description\": \"Identifies the feature flag provider.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\"Flag Manager\"]\n\t},\n\t\"feature_flag.result.variant\": {\n\t\t\"description\": \"A semantic identifier for an evaluated flag value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"A semantic identifier, commonly referred to as a variant, provides a means\\nfor referring to a value without including the value itself. This can\\nprovide additional context for understanding the meaning behind a value.\\nFor example, the variant `red` maybe be used for the value `#c05543`.\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\n\t\t\t\"red\",\n\t\t\t\"true\",\n\t\t\t\"on\"\n\t\t]\n\t},\n\t\"feature_flag.context.id\": {\n\t\t\"description\": \"The unique identifier for the flag evaluation context. For example, the targeting key.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\"5157782b-2203-4c80-a857-dbbd5e7761db\"]\n\t},\n\t\"feature_flag.version\": {\n\t\t\"description\": \"The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\"1\", \"01ABCDEF\"]\n\t},\n\t\"feature_flag.set.id\": {\n\t\t\"description\": \"The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\n\t\t\t\"proj-1\",\n\t\t\t\"ab98sgs\",\n\t\t\t\"service1/dev\"\n\t\t]\n\t},\n\t\"feature_flag.result.reason\": {\n\t\t\"description\": \"The reason code which shows how a feature flag value was determined.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\n\t\t\t\"static\",\n\t\t\t\"default\",\n\t\t\t\"targeting_match\",\n\t\t\t\"split\",\n\t\t\t\"cached\",\n\t\t\t\"disabled\",\n\t\t\t\"unknown\",\n\t\t\t\"stale\",\n\t\t\t\"error\"\n\t\t]\n\t},\n\t\"feature_flag.result.value\": {\n\t\t\"description\": \"The evaluated value of the feature flag.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"With some feature flag providers, feature flag results can be quite large or contain private or sensitive details.\\nBecause of this, `feature_flag.result.variant` is often the preferred attribute if it is available.\\n\\nIt may be desirable to redact or otherwise limit the size and scope of `feature_flag.result.value` if possible.\\nBecause the evaluated flag value is unstructured and may be any type, it is left to the instrumentation author to determine how best to achieve this.\\n\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\n\t\t\t\"#ff0000\",\n\t\t\t\"true\",\n\t\t\t\"3\"\n\t\t]\n\t}\n};\nvar feature_flags_default = {\n\tnamespace: namespace$43,\n\tdescription: description$43,\n\tattributes: attributes$43\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/file.json\nvar namespace$42 = \"file\";\nvar description$42 = \"Describes file attributes.\";\nvar attributes$42 = {\n\t\"file.accessed\": {\n\t\t\"description\": \"Time when the file was last accessed, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T12:00:00Z\"]\n\t},\n\t\"file.attributes\": {\n\t\t\"description\": \"Array of file attributes.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Attributes names depend on the OS or file system. Here’s a non-exhaustive list of values expected for this attribute: `archive`, `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`, `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`, `write`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"readonly\\\",\\\"hidden\\\"]\"]\n\t},\n\t\"file.created\": {\n\t\t\"description\": \"Time when the file was created, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T12:00:00Z\"]\n\t},\n\t\"file.changed\": {\n\t\t\"description\": \"Time when the file attributes or metadata was last changed, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`file.changed` captures the time when any of the file's properties or attributes (including the content) are changed, while `file.modified` captures the timestamp when the file content is modified.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T12:00:00Z\"]\n\t},\n\t\"file.directory\": {\n\t\t\"description\": \"Directory where the file is located. It should include the drive letter, when appropriate.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/home/user\", \"C:\\\\Program Files\\\\MyApp\"]\n\t},\n\t\"file.extension\": {\n\t\t\"description\": \"File extension, excluding the leading dot.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When the file name has multiple extensions (example.tar.gz), only the last one should be captured (\\\"gz\\\", not \\\"tar.gz\\\").\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"png\", \"gz\"]\n\t},\n\t\"file.fork_name\": {\n\t\t\"description\": \"Name of the fork. A fork is additional data associated with a filesystem object.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist.\\nOn NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: C:\\\\path\\\\to\\\\filename.extension:some_fork_name, and some_fork_name is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Zone.Identifer\"]\n\t},\n\t\"file.group.id\": {\n\t\t\"description\": \"Primary Group ID (GID) of the file.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1000\"]\n\t},\n\t\"file.group.name\": {\n\t\t\"description\": \"Primary group name of the file.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"users\"]\n\t},\n\t\"file.inode\": {\n\t\t\"description\": \"Inode representing the file in the filesystem.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"256383\"]\n\t},\n\t\"file.mode\": {\n\t\t\"description\": \"Mode of the file in octal representation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0640\"]\n\t},\n\t\"file.modified\": {\n\t\t\"description\": \"Time when the file content was last modified, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T12:00:00Z\"]\n\t},\n\t\"file.name\": {\n\t\t\"description\": \"Name of the file including the extension, without the directory.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"example.png\"]\n\t},\n\t\"file.owner.id\": {\n\t\t\"description\": \"The user ID (UID) or security identifier (SID) of the file owner.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1000\"]\n\t},\n\t\"file.owner.name\": {\n\t\t\"description\": \"Username of the file owner.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"root\"]\n\t},\n\t\"file.path\": {\n\t\t\"description\": \"Full path to the file, including the file name. It should include the drive letter, when appropriate.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/home/alice/example.png\", \"C:\\\\Program Files\\\\MyApp\\\\myapp.exe\"]\n\t},\n\t\"file.size\": {\n\t\t\"description\": \"File size in bytes.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"file.symbolic_link.target_path\": {\n\t\t\"description\": \"Path to the target of a symbolic link.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute is only applicable to symbolic links.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/usr/bin/python3\"]\n\t}\n};\nvar file_default = {\n\tnamespace: namespace$42,\n\tdescription: description$42,\n\tattributes: attributes$42\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/gcp.json\nvar namespace$41 = \"gcp\";\nvar description$41 = \"Attributes for Google Cloud client libraries.\\n\";\nvar attributes$41 = { \"gcp.client.service\": {\n\t\"description\": \"Identifies the Google Cloud service for which the official client library is intended.\",\n\t\"type\": \"string\",\n\t\"note\": \"Intended to be a stable identifier for Google Cloud client libraries that is uniform across implementation languages. The value should be derived from the canonical service domain for the service; for example, 'foo.googleapis.com' should result in a value of 'foo'.\\n\",\n\t\"stability\": \"development\",\n\t\"examples\": [\n\t\t\"appengine\",\n\t\t\"run\",\n\t\t\"firestore\",\n\t\t\"alloydb\",\n\t\t\"spanner\"\n\t]\n} };\nvar gcp_default = {\n\tnamespace: namespace$41,\n\tdescription: description$41,\n\tattributes: attributes$41\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/gen_ai.json\nvar namespace$40 = \"gen_ai\";\nvar description$40 = \"This document defines the attributes used to describe telemetry in the context of Generative Artificial Intelligence (GenAI) Models requests and responses.\\n\";\nvar attributes$40 = {\n\t\"gen_ai.provider.name\": {\n\t\t\"description\": \"The Generative AI provider as identified by the client or server instrumentation.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The attribute SHOULD be set based on the instrumentation's best\\nknowledge and may differ from the actual model provider.\\n\\nMultiple providers, including Azure OpenAI, Gemini, and AI hosting platforms\\nare accessible using the OpenAI REST API and corresponding client libraries,\\nbut may proxy or host models from different providers.\\n\\nThe `gen_ai.request.model`, `gen_ai.response.model`, and `server.address`\\nattributes may help identify the actual system in use.\\n\\nThe `gen_ai.provider.name` attribute acts as a discriminator that\\nidentifies the GenAI telemetry format flavor specific to that provider\\nwithin GenAI semantic conventions.\\nIt SHOULD be set consistently with provider-specific attributes and signals.\\nFor example, GenAI spans, metrics, and events related to AWS Bedrock\\nshould have the `gen_ai.provider.name` set to `aws.bedrock` and include\\napplicable `aws.bedrock.*` attributes and are not expected to include\\n`openai.*` attributes.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"openai\",\n\t\t\t\"gcp.gen_ai\",\n\t\t\t\"gcp.vertex_ai\",\n\t\t\t\"gcp.gemini\",\n\t\t\t\"anthropic\",\n\t\t\t\"cohere\",\n\t\t\t\"azure.ai.inference\",\n\t\t\t\"azure.ai.openai\",\n\t\t\t\"ibm.watsonx.ai\",\n\t\t\t\"aws.bedrock\",\n\t\t\t\"perplexity\",\n\t\t\t\"x_ai\",\n\t\t\t\"deepseek\",\n\t\t\t\"groq\",\n\t\t\t\"mistral_ai\"\n\t\t]\n\t},\n\t\"gen_ai.request.model\": {\n\t\t\"description\": \"The name of the GenAI model a request is being made to.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"gpt-4\"]\n\t},\n\t\"gen_ai.request.max_tokens\": {\n\t\t\"description\": \"The maximum number of tokens the model generates for a request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"100\"]\n\t},\n\t\"gen_ai.request.choice.count\": {\n\t\t\"description\": \"The target number of candidate completions to return.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3\"]\n\t},\n\t\"gen_ai.request.temperature\": {\n\t\t\"description\": \"The temperature setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\"]\n\t},\n\t\"gen_ai.request.top_p\": {\n\t\t\"description\": \"The top_p sampling setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\"]\n\t},\n\t\"gen_ai.request.top_k\": {\n\t\t\"description\": \"The top_k sampling setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\"]\n\t},\n\t\"gen_ai.request.stop_sequences\": {\n\t\t\"description\": \"List of sequences that the model will use to stop generating further tokens.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"forest\\\",\\\"lived\\\"]\"]\n\t},\n\t\"gen_ai.request.frequency_penalty\": {\n\t\t\"description\": \"The frequency penalty setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0.1\"]\n\t},\n\t\"gen_ai.request.presence_penalty\": {\n\t\t\"description\": \"The presence penalty setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0.1\"]\n\t},\n\t\"gen_ai.request.encoding_formats\": {\n\t\t\"description\": \"The encoding formats requested in an embeddings operation, if specified.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"base64\\\"]\", \"[\\\"float\\\",\\\"binary\\\"]\"]\n\t},\n\t\"gen_ai.request.seed\": {\n\t\t\"description\": \"Requests with same seed value more likely to return same result.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"100\"]\n\t},\n\t\"gen_ai.response.id\": {\n\t\t\"description\": \"The unique identifier for the completion.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"chatcmpl-123\"]\n\t},\n\t\"gen_ai.response.model\": {\n\t\t\"description\": \"The name of the model that generated the response.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"gpt-4-0613\"]\n\t},\n\t\"gen_ai.response.finish_reasons\": {\n\t\t\"description\": \"Array of reasons the model stopped generating tokens, corresponding to each generation received.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"stop\\\"]\", \"[\\\"stop\\\",\\\"length\\\"]\"]\n\t},\n\t\"gen_ai.usage.input_tokens\": {\n\t\t\"description\": \"The number of tokens used in the GenAI input (prompt).\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"100\"]\n\t},\n\t\"gen_ai.usage.output_tokens\": {\n\t\t\"description\": \"The number of tokens used in the GenAI response (completion).\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"180\"]\n\t},\n\t\"gen_ai.token.type\": {\n\t\t\"description\": \"The type of token being counted.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"input\",\n\t\t\t\"output\",\n\t\t\t\"output\"\n\t\t]\n\t},\n\t\"gen_ai.conversation.id\": {\n\t\t\"description\": \"The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"conv_5j66UpCpwteGg4YSxUnt7lPY\"]\n\t},\n\t\"gen_ai.agent.id\": {\n\t\t\"description\": \"The unique identifier of the GenAI agent.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"asst_5j66UpCpwteGg4YSxUnt7lPY\"]\n\t},\n\t\"gen_ai.agent.name\": {\n\t\t\"description\": \"Human-readable name of the GenAI agent provided by the application.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Math Tutor\", \"Fiction Writer\"]\n\t},\n\t\"gen_ai.agent.description\": {\n\t\t\"description\": \"Free-form description of the GenAI agent provided by the application.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Helps with math problems\", \"Generates fiction stories\"]\n\t},\n\t\"gen_ai.tool.name\": {\n\t\t\"description\": \"Name of the tool utilized by the agent.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Flights\"]\n\t},\n\t\"gen_ai.tool.call.id\": {\n\t\t\"description\": \"The tool call identifier.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"call_mszuSIzqtI65i1wAUOE8w5H4\"]\n\t},\n\t\"gen_ai.tool.description\": {\n\t\t\"description\": \"The tool description.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Multiply two numbers\"]\n\t},\n\t\"gen_ai.tool.type\": {\n\t\t\"description\": \"Type of the tool utilized by the agent\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Extension: A tool executed on the agent-side to directly call external APIs, bridging the gap between the agent and real-world systems.\\n  Agent-side operations involve actions that are performed by the agent on the server or within the agent's controlled environment.\\nFunction: A tool executed on the client-side, where the agent generates parameters for a predefined function, and the client executes the logic.\\n  Client-side operations are actions taken on the user's end or within the client application.\\nDatastore: A tool used by the agent to access and query structured or unstructured external data for retrieval-augmented tasks or knowledge updates.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"function\",\n\t\t\t\"extension\",\n\t\t\t\"datastore\"\n\t\t]\n\t},\n\t\"gen_ai.data_source.id\": {\n\t\t\"description\": \"The data source identifier.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Data sources are used by AI agents and RAG applications to store grounding data. A data source may be an external database, object store, document collection, website, or any other storage system used by the GenAI agent or application. The `gen_ai.data_source.id` SHOULD match the identifier used by the GenAI system rather than a name specific to the external storage, such as a database or object store. Semantic conventions referencing `gen_ai.data_source.id` MAY also leverage additional attributes, such as `db.*`, to further identify and describe the data source.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"H7STPQYOND\"]\n\t},\n\t\"gen_ai.operation.name\": {\n\t\t\"description\": \"The name of the operation being performed.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries SHOULD use applicable predefined value.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"chat\",\n\t\t\t\"generate_content\",\n\t\t\t\"text_completion\",\n\t\t\t\"embeddings\",\n\t\t\t\"create_agent\",\n\t\t\t\"invoke_agent\",\n\t\t\t\"execute_tool\"\n\t\t]\n\t},\n\t\"gen_ai.output.type\": {\n\t\t\"description\": \"Represents the content type requested by the client.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute SHOULD be used when the client requests output of a specific type. The model may return zero or more outputs of this type.\\nThis attribute specifies the output modality and not the actual output format. For example, if an image is requested, the actual output could be a URL pointing to an image file.\\nAdditional output format details may be recorded in the future in the `gen_ai.output.{type}.*` attributes.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"text\",\n\t\t\t\"json\",\n\t\t\t\"image\",\n\t\t\t\"speech\"\n\t\t]\n\t}\n};\nvar gen_ai_default = {\n\tnamespace: namespace$40,\n\tdescription: description$40,\n\tattributes: attributes$40\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/geo.json\nvar namespace$39 = \"geo\";\nvar description$39 = \"Geo fields can carry data about a specific location related to an event. This geolocation information can be derived from techniques such as Geo IP, or be user-supplied.\\nNote: Geo attributes are typically used under another namespace, such as client.* and describe the location of the corresponding entity (device, end-user, etc). Semantic conventions that reference geo attributes (as a root namespace) or embed them (under their own namespace) SHOULD document what geo attributes describe in the scope of that convention.\\n\";\nvar attributes$39 = {\n\t\"geo.locality.name\": {\n\t\t\"description\": \"Locality name. Represents the name of a city, town, village, or similar populated place.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Montreal\", \"Berlin\"]\n\t},\n\t\"geo.continent.code\": {\n\t\t\"description\": \"Two-letter code representing continent’s name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"AF\",\n\t\t\t\"AN\",\n\t\t\t\"AS\",\n\t\t\t\"EU\",\n\t\t\t\"NA\",\n\t\t\t\"OC\",\n\t\t\t\"SA\"\n\t\t]\n\t},\n\t\"geo.country.iso_code\": {\n\t\t\"description\": \"Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CA\"]\n\t},\n\t\"geo.location.lon\": {\n\t\t\"description\": \"Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"-73.61483\"]\n\t},\n\t\"geo.location.lat\": {\n\t\t\"description\": \"Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"45.505918\"]\n\t},\n\t\"geo.postal_code\": {\n\t\t\"description\": \"Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"94040\"]\n\t},\n\t\"geo.region.iso_code\": {\n\t\t\"description\": \"Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CA-QC\"]\n\t}\n};\nvar geo_default = {\n\tnamespace: namespace$39,\n\tdescription: description$39,\n\tattributes: attributes$39\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/go.json\nvar namespace$38 = \"go\";\nvar description$38 = \"This document defines Go related attributes.\\n\";\nvar attributes$38 = { \"go.memory.type\": {\n\t\"description\": \"The type of memory.\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"stack\", \"other\"]\n} };\nvar go_default = {\n\tnamespace: namespace$38,\n\tdescription: description$38,\n\tattributes: attributes$38\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/graphql.json\nvar namespace$37 = \"graphql\";\nvar description$37 = \"This document defines attributes for GraphQL.\";\nvar attributes$37 = {\n\t\"graphql.operation.name\": {\n\t\t\"description\": \"The name of the operation being executed.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"findBookById\"]\n\t},\n\t\"graphql.operation.type\": {\n\t\t\"description\": \"The type of the operation being executed.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"query\",\n\t\t\t\"mutation\",\n\t\t\t\"subscription\"\n\t\t]\n\t},\n\t\"graphql.document\": {\n\t\t\"description\": \"The GraphQL document being executed.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value may be sanitized to exclude sensitive information.\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"query findBookById { bookById(id: ?) { name } }\"]\n\t}\n};\nvar graphql_default = {\n\tnamespace: namespace$37,\n\tdescription: description$37,\n\tattributes: attributes$37\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/hardware.json\nvar namespace$36 = \"hardware\";\nvar description$36 = \"Attributes for hardware.\\n\";\nvar attributes$36 = {\n\t\"hw.id\": {\n\t\t\"description\": \"An identifier for the hardware component, unique within the monitored host\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"win32battery_battery_testsysa33_1\"]\n\t},\n\t\"hw.name\": {\n\t\t\"description\": \"An easily-recognizable name for the hardware component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"eth0\"]\n\t},\n\t\"hw.parent\": {\n\t\t\"description\": \"Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"dellStorage_perc_0\"]\n\t},\n\t\"hw.type\": {\n\t\t\"description\": \"Type of the component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Describes the category of the hardware component for which `hw.state` is being reported. For example, `hw.type=temperature` along with `hw.state=degraded` would indicate that the temperature of the hardware component has been reported as `degraded`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"battery\",\n\t\t\t\"cpu\",\n\t\t\t\"disk_controller\",\n\t\t\t\"enclosure\",\n\t\t\t\"fan\",\n\t\t\t\"gpu\",\n\t\t\t\"logical_disk\",\n\t\t\t\"memory\",\n\t\t\t\"network\",\n\t\t\t\"physical_disk\",\n\t\t\t\"power_supply\",\n\t\t\t\"tape_drive\",\n\t\t\t\"temperature\",\n\t\t\t\"voltage\"\n\t\t]\n\t},\n\t\"hw.state\": {\n\t\t\"description\": \"The current state of the component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"ok\",\n\t\t\t\"degraded\",\n\t\t\t\"failed\"\n\t\t]\n\t}\n};\nvar hardware_default = {\n\tnamespace: namespace$36,\n\tdescription: description$36,\n\tattributes: attributes$36\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/heroku.json\nvar namespace$35 = \"heroku\";\nvar description$35 = \"This document defines attributes for the Heroku platform on which application/s are running.\\n\";\nvar attributes$35 = {\n\t\"heroku.release.creation_timestamp\": {\n\t\t\"description\": \"Time and date the release was created\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2022-10-23T18:00:42Z\"]\n\t},\n\t\"heroku.release.commit\": {\n\t\t\"description\": \"Commit hash for the current release\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"e6134959463efd8966b20e75b913cafe3f5ec\"]\n\t},\n\t\"heroku.app.id\": {\n\t\t\"description\": \"Unique identifier for the application\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2daa2797-e42b-4624-9322-ec3f968df4da\"]\n\t}\n};\nvar heroku_default = {\n\tnamespace: namespace$35,\n\tdescription: description$35,\n\tattributes: attributes$35\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/host.json\nvar namespace$34 = \"host\";\nvar description$34 = \"A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array.\\n\";\nvar attributes$34 = {\n\t\"host.id\": {\n\t\t\"description\": \"Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"fdbf79e8af94cb7f9e8df36789187052\"]\n\t},\n\t\"host.name\": {\n\t\t\"description\": \"Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry-test\"]\n\t},\n\t\"host.type\": {\n\t\t\"description\": \"Type of host. For Cloud, this must be the machine type.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"n1-standard-1\"]\n\t},\n\t\"host.arch\": {\n\t\t\"description\": \"The CPU architecture the host system is running on.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"amd64\",\n\t\t\t\"arm32\",\n\t\t\t\"arm64\",\n\t\t\t\"ia64\",\n\t\t\t\"ppc32\",\n\t\t\t\"ppc64\",\n\t\t\t\"s390x\",\n\t\t\t\"x86\"\n\t\t]\n\t},\n\t\"host.image.name\": {\n\t\t\"description\": \"Name of the VM image or OS install the host was instantiated from.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"infra-ami-eks-worker-node-7d4ec78312\", \"CentOS-8-x86_64-1905\"]\n\t},\n\t\"host.image.id\": {\n\t\t\"description\": \"VM image ID or host OS image ID. For Cloud, this value is from the provider.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"ami-07b06b442921831e5\"]\n\t},\n\t\"host.image.version\": {\n\t\t\"description\": \"The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0.1\"]\n\t},\n\t\"host.ip\": {\n\t\t\"description\": \"Available IP addresses of the host, excluding loopback interfaces.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"192.168.1.140\\\",\\\"fe80::abc2:4a28:737a:609e\\\"]\"]\n\t},\n\t\"host.mac\": {\n\t\t\"description\": \"Available MAC addresses of the host, excluding loopback interfaces.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"AC-DE-48-23-45-67\\\",\\\"AC-DE-48-23-45-67-01-9F\\\"]\"]\n\t},\n\t\"host.cpu.vendor.id\": {\n\t\t\"description\": \"Processor manufacturer identifier. A maximum 12-character string.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"[CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"GenuineIntel\"]\n\t},\n\t\"host.cpu.family\": {\n\t\t\"description\": \"Family or generation of the CPU.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"6\", \"PA-RISC 1.1e\"]\n\t},\n\t\"host.cpu.model.id\": {\n\t\t\"description\": \"Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"6\", \"9000/778/B180L\"]\n\t},\n\t\"host.cpu.model.name\": {\n\t\t\"description\": \"Model designation of the processor.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz\"]\n\t},\n\t\"host.cpu.stepping\": {\n\t\t\"description\": \"Stepping or core revisions.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"r1p1\"]\n\t},\n\t\"host.cpu.cache.l2.size\": {\n\t\t\"description\": \"The amount of level 2 memory cache available to the processor (in Bytes).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"12288000\"]\n\t}\n};\nvar host_default = {\n\tnamespace: namespace$34,\n\tdescription: description$34,\n\tattributes: attributes$34\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/http.json\nvar namespace$33 = \"http\";\nvar description$33 = \"This document defines semantic convention attributes in the HTTP namespace.\";\nvar attributes$33 = {\n\t\"http.request.body.size\": {\n\t\t\"description\": \"The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3495\"]\n\t},\n\t\"http.request.header\": {\n\t\t\"description\": \"HTTP request headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which headers are to be captured.\\nIncluding all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nThe `User-Agent` header is already captured in the `user_agent.original` attribute.\\nUsers MAY explicitly configure instrumentations to capture them even though it is not recommended.\\n\\nThe attribute value MUST consist of either multiple header values as an array of strings\\nor a single-item array containing a possibly comma-concatenated string, depending on the way\\nthe HTTP library provides access to headers.\\n\\nExamples:\\n\\n- A header `Content-Type: application/json` SHOULD be recorded as the `http.request.header.content-type`\\n  attribute with value `[\\\"application/json\\\"]`.\\n- A header `X-Forwarded-For: 1.2.3.4, 1.2.3.5` SHOULD be recorded as the `http.request.header.x-forwarded-for`\\n  attribute with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]` or `[\\\"1.2.3.4, 1.2.3.5\\\"]` depending on the HTTP library.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"[\\\"application/json\\\"]\", \"[\\\"1.2.3.4\\\",\\\"1.2.3.5\\\"]\"]\n\t},\n\t\"http.request.method\": {\n\t\t\"description\": \"HTTP request method.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"HTTP request method value SHOULD be \\\"known\\\" to the instrumentation.\\nBy default, this convention defines \\\"known\\\" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)\\nand the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).\\n\\nIf the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`.\\n\\nIf the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override\\nthe list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named\\nOTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods\\n(this list MUST be a full override of the default known method, it is not a list of known methods in addition to the defaults).\\n\\nHTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.\\nInstrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.\\nTracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"CONNECT\",\n\t\t\t\"DELETE\",\n\t\t\t\"GET\",\n\t\t\t\"HEAD\",\n\t\t\t\"OPTIONS\",\n\t\t\t\"PATCH\",\n\t\t\t\"POST\",\n\t\t\t\"PUT\",\n\t\t\t\"TRACE\",\n\t\t\t\"_OTHER\"\n\t\t]\n\t},\n\t\"http.request.method_original\": {\n\t\t\"description\": \"Original HTTP method sent by the client in the request line.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"GeT\",\n\t\t\t\"ACL\",\n\t\t\t\"foo\"\n\t\t]\n\t},\n\t\"http.request.resend_count\": {\n\t\t\"description\": \"The ordinal number of request resending attempt (for any reason, including redirects).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"3\"]\n\t},\n\t\"http.request.size\": {\n\t\t\"description\": \"The total size of the request in bytes. This should be the total number of bytes sent over the wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request body if any.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1437\"]\n\t},\n\t\"http.response.body.size\": {\n\t\t\"description\": \"The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3495\"]\n\t},\n\t\"http.response.header\": {\n\t\t\"description\": \"HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which headers are to be captured.\\nIncluding all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nUsers MAY explicitly configure instrumentations to capture them even though it is not recommended.\\n\\nThe attribute value MUST consist of either multiple header values as an array of strings\\nor a single-item array containing a possibly comma-concatenated string, depending on the way\\nthe HTTP library provides access to headers.\\n\\nExamples:\\n\\n- A header `Content-Type: application/json` header SHOULD be recorded as the `http.request.response.content-type`\\n  attribute with value `[\\\"application/json\\\"]`.\\n- A header `My-custom-header: abc, def` header SHOULD be recorded as the `http.response.header.my-custom-header`\\n  attribute with value `[\\\"abc\\\", \\\"def\\\"]` or `[\\\"abc, def\\\"]` depending on the HTTP library.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"[\\\"application/json\\\"]\", \"[\\\"abc\\\",\\\"def\\\"]\"]\n\t},\n\t\"http.response.size\": {\n\t\t\"description\": \"The total size of the response in bytes. This should be the total number of bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and response body and trailers if any.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1437\"]\n\t},\n\t\"http.response.status_code\": {\n\t\t\"description\": \"[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"200\"]\n\t},\n\t\"http.route\": {\n\t\t\"description\": \"The matched route, that is, the path template in the format used by the respective server framework.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.\\nSHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"/users/:userID?\", \"{controller}/{action}/{id?}\"]\n\t},\n\t\"http.connection.state\": {\n\t\t\"description\": \"State of the HTTP connection in the HTTP connection pool.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"active\", \"idle\"]\n\t}\n};\nvar http_default = {\n\tnamespace: namespace$33,\n\tdescription: description$33,\n\tattributes: attributes$33\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/ios.json\nvar namespace$32 = \"ios\";\nvar description$32 = \"This group describes iOS-specific attributes.\\n\";\nvar attributes$32 = { \"ios.app.state\": {\n\t\"description\": \"This attribute represents the state of the application.\\n\",\n\t\"type\": \"string\",\n\t\"note\": \"The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.\\n\",\n\t\"stability\": \"development\",\n\t\"examples\": [\n\t\t\"active\",\n\t\t\"inactive\",\n\t\t\"background\",\n\t\t\"foreground\",\n\t\t\"terminate\"\n\t]\n} };\nvar ios_default = {\n\tnamespace: namespace$32,\n\tdescription: description$32,\n\tattributes: attributes$32\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/jvm.json\nvar namespace$31 = \"jvm\";\nvar description$31 = \"This document defines Java Virtual machine related attributes.\\n\";\nvar attributes$31 = {\n\t\"jvm.gc.action\": {\n\t\t\"description\": \"Name of the garbage collector action.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"end of minor GC\", \"end of major GC\"]\n\t},\n\t\"jvm.gc.cause\": {\n\t\t\"description\": \"Name of the garbage collector cause.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Garbage collector cause is generally obtained via [GarbageCollectionNotificationInfo#getGcCause()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcCause()).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"System.gc()\", \"Allocation Failure\"]\n\t},\n\t\"jvm.gc.name\": {\n\t\t\"description\": \"Name of the garbage collector.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"G1 Young Generation\", \"G1 Old Generation\"]\n\t},\n\t\"jvm.memory.type\": {\n\t\t\"description\": \"The type of memory.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"heap\", \"non_heap\"]\n\t},\n\t\"jvm.memory.pool.name\": {\n\t\t\"description\": \"Name of the memory pool.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"G1 Old Gen\",\n\t\t\t\"G1 Eden space\",\n\t\t\t\"G1 Survivor Space\"\n\t\t]\n\t},\n\t\"jvm.thread.daemon\": {\n\t\t\"description\": \"Whether the thread is daemon or not.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"stable\"\n\t},\n\t\"jvm.thread.state\": {\n\t\t\"description\": \"State of the thread.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"new\",\n\t\t\t\"runnable\",\n\t\t\t\"blocked\",\n\t\t\t\"waiting\",\n\t\t\t\"timed_waiting\",\n\t\t\t\"terminated\"\n\t\t]\n\t},\n\t\"jvm.buffer.pool.name\": {\n\t\t\"description\": \"Name of the buffer pool.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Pool names are generally obtained via [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"mapped\", \"direct\"]\n\t}\n};\nvar jvm_default = {\n\tnamespace: namespace$31,\n\tdescription: description$31,\n\tattributes: attributes$31\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/k8s.json\nvar namespace$30 = \"k8s\";\nvar description$30 = \"Kubernetes resource attributes.\\n\";\nvar attributes$30 = {\n\t\"k8s.cluster.name\": {\n\t\t\"description\": \"The name of the cluster.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry-cluster\"]\n\t},\n\t\"k8s.cluster.uid\": {\n\t\t\"description\": \"A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"K8s doesn't have support for obtaining a cluster ID. If this is ever\\nadded, we will recommend collecting the `k8s.cluster.uid` through the\\nofficial APIs. In the meantime, we are able to use the `uid` of the\\n`kube-system` namespace as a proxy for cluster ID. Read on for the\\nrationale.\\n\\nEvery object created in a K8s cluster is assigned a distinct UID. The\\n`kube-system` namespace is used by Kubernetes itself and will exist\\nfor the lifetime of the cluster. Using the `uid` of the `kube-system`\\nnamespace is a reasonable proxy for the K8s ClusterID as it will only\\nchange if the cluster is rebuilt. Furthermore, Kubernetes UIDs are\\nUUIDs as standardized by\\n[ISO/IEC 9834-8 and ITU-T X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).\\nWhich states:\\n\\n> If generated according to one of the mechanisms defined in Rec.\\n> ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be\\n> different from all other UUIDs generated before 3603 A.D., or is\\n> extremely likely to be different (depending on the mechanism chosen).\\n\\nTherefore, UIDs between clusters should be extremely unlikely to\\nconflict.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"k8s.node.name\": {\n\t\t\"description\": \"The name of the Node.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"node-1\"]\n\t},\n\t\"k8s.node.uid\": {\n\t\t\"description\": \"The UID of the Node.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2\"]\n\t},\n\t\"k8s.node.label\": {\n\t\t\"description\": \"The label placed on the Node, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- A label `kubernetes.io/arch` with value `arm64` SHOULD be recorded\\n  as the `k8s.node.label.kubernetes.io/arch` attribute with value `\\\"arm64\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.node.label.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"arm64\", \"\"]\n\t},\n\t\"k8s.node.annotation\": {\n\t\t\"description\": \"The annotation placed on the Node, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- An annotation `node.alpha.kubernetes.io/ttl` with value `0` SHOULD be recorded as\\n  the `k8s.node.annotation.node.alpha.kubernetes.io/ttl` attribute with value `\\\"0\\\"`.\\n- An annotation `data` with empty string value SHOULD be recorded as\\n  the `k8s.node.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"\"]\n\t},\n\t\"k8s.namespace.name\": {\n\t\t\"description\": \"The name of the namespace that the pod is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"default\"]\n\t},\n\t\"k8s.namespace.label\": {\n\t\t\"description\": \"The label placed on the Namespace, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `kubernetes.io/metadata.name` with value `default` SHOULD be recorded\\n  as the `k8s.namespace.label.kubernetes.io/metadata.name` attribute with value `\\\"default\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.namespace.label.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"default\", \"\"]\n\t},\n\t\"k8s.namespace.annotation\": {\n\t\t\"description\": \"The annotation placed on the Namespace, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `ttl` with value `0` SHOULD be recorded\\n  as the `k8s.namespace.annotation.ttl` attribute with value `\\\"0\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.namespace.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"\"]\n\t},\n\t\"k8s.pod.uid\": {\n\t\t\"description\": \"The UID of the Pod.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.pod.name\": {\n\t\t\"description\": \"The name of the Pod.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry-pod-autoconf\"]\n\t},\n\t\"k8s.pod.label\": {\n\t\t\"description\": \"The label placed on the Pod, the `<key>` being the label name, the value being the label value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- A label `app` with value `my-app` SHOULD be recorded as\\n  the `k8s.pod.label.app` attribute with value `\\\"my-app\\\"`.\\n- A label `mycompany.io/arch` with value `x64` SHOULD be recorded as\\n  the `k8s.pod.label.mycompany.io/arch` attribute with value `\\\"x64\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.pod.label.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"my-app\",\n\t\t\t\"x64\",\n\t\t\t\"\"\n\t\t]\n\t},\n\t\"k8s.pod.annotation\": {\n\t\t\"description\": \"The annotation placed on the Pod, the `<key>` being the annotation name, the value being the annotation value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- An annotation `kubernetes.io/enforce-mountable-secrets` with value `true` SHOULD be recorded as\\n  the `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets` attribute with value `\\\"true\\\"`.\\n- An annotation `mycompany.io/arch` with value `x64` SHOULD be recorded as\\n  the `k8s.pod.annotation.mycompany.io/arch` attribute with value `\\\"x64\\\"`.\\n- An annotation `data` with empty string value SHOULD be recorded as\\n  the `k8s.pod.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"true\",\n\t\t\t\"x64\",\n\t\t\t\"\"\n\t\t]\n\t},\n\t\"k8s.container.name\": {\n\t\t\"description\": \"The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"redis\"]\n\t},\n\t\"k8s.container.restart_count\": {\n\t\t\"description\": \"Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"k8s.container.status.last_terminated_reason\": {\n\t\t\"description\": \"Last terminated reason of the Container.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Evicted\", \"Error\"]\n\t},\n\t\"k8s.replicaset.uid\": {\n\t\t\"description\": \"The UID of the ReplicaSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.replicaset.name\": {\n\t\t\"description\": \"The name of the ReplicaSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.replicaset.label\": {\n\t\t\"description\": \"The label placed on the ReplicaSet, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `app` with value `guestbook` SHOULD be recorded\\n  as the `k8s.replicaset.label.app` attribute with value `\\\"guestbook\\\"`.\\n- A label `injected` with empty string value SHOULD be recorded as\\n  the `k8s.replicaset.label.injected` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"guestbook\", \"\"]\n\t},\n\t\"k8s.replicaset.annotation\": {\n\t\t\"description\": \"The annotation placed on the ReplicaSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `0` SHOULD be recorded\\n  as the `k8s.replicaset.annotation.replicas` attribute with value `\\\"0\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.replicaset.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"\"]\n\t},\n\t\"k8s.replicationcontroller.uid\": {\n\t\t\"description\": \"The UID of the replication controller.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.replicationcontroller.name\": {\n\t\t\"description\": \"The name of the replication controller.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.resourcequota.uid\": {\n\t\t\"description\": \"The UID of the resource quota.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.resourcequota.name\": {\n\t\t\"description\": \"The name of the resource quota.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.deployment.uid\": {\n\t\t\"description\": \"The UID of the Deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.deployment.name\": {\n\t\t\"description\": \"The name of the Deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.deployment.label\": {\n\t\t\"description\": \"The label placed on the Deployment, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `0` SHOULD be recorded\\n  as the `k8s.deployment.label.app` attribute with value `\\\"guestbook\\\"`.\\n- A label `injected` with empty string value SHOULD be recorded as\\n  the `k8s.deployment.label.injected` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"guestbook\", \"\"]\n\t},\n\t\"k8s.deployment.annotation\": {\n\t\t\"description\": \"The annotation placed on the Deployment, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `1` SHOULD be recorded\\n  as the `k8s.deployment.annotation.replicas` attribute with value `\\\"1\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.deployment.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"\"]\n\t},\n\t\"k8s.statefulset.uid\": {\n\t\t\"description\": \"The UID of the StatefulSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.statefulset.name\": {\n\t\t\"description\": \"The name of the StatefulSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.statefulset.label\": {\n\t\t\"description\": \"The label placed on the StatefulSet, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `0` SHOULD be recorded\\n  as the `k8s.statefulset.label.app` attribute with value `\\\"guestbook\\\"`.\\n- A label `injected` with empty string value SHOULD be recorded as\\n  the `k8s.statefulset.label.injected` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"guestbook\", \"\"]\n\t},\n\t\"k8s.statefulset.annotation\": {\n\t\t\"description\": \"The annotation placed on the StatefulSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `1` SHOULD be recorded\\n  as the `k8s.statefulset.annotation.replicas` attribute with value `\\\"1\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.statefulset.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"\"]\n\t},\n\t\"k8s.daemonset.uid\": {\n\t\t\"description\": \"The UID of the DaemonSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.daemonset.name\": {\n\t\t\"description\": \"The name of the DaemonSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.daemonset.label\": {\n\t\t\"description\": \"The label placed on the DaemonSet, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `app` with value `guestbook` SHOULD be recorded\\n  as the `k8s.daemonset.label.app` attribute with value `\\\"guestbook\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.daemonset.label.injected` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"guestbook\", \"\"]\n\t},\n\t\"k8s.daemonset.annotation\": {\n\t\t\"description\": \"The annotation placed on the DaemonSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `1` SHOULD be recorded\\n  as the `k8s.daemonset.annotation.replicas` attribute with value `\\\"1\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.daemonset.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"\"]\n\t},\n\t\"k8s.hpa.uid\": {\n\t\t\"description\": \"The UID of the horizontal pod autoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.hpa.name\": {\n\t\t\"description\": \"The name of the horizontal pod autoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.hpa.scaletargetref.kind\": {\n\t\t\"description\": \"The kind of the target resource to scale for the HorizontalPodAutoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Deployment\", \"StatefulSet\"]\n\t},\n\t\"k8s.hpa.scaletargetref.name\": {\n\t\t\"description\": \"The name of the target resource to scale for the HorizontalPodAutoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This maps to the `name` field in the `scaleTargetRef` of the HPA spec.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-deployment\", \"my-statefulset\"]\n\t},\n\t\"k8s.hpa.scaletargetref.api_version\": {\n\t\t\"description\": \"The API version of the target resource to scale for the HorizontalPodAutoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA spec.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"apps/v1\", \"autoscaling/v2\"]\n\t},\n\t\"k8s.hpa.metric.type\": {\n\t\t\"description\": \"The type of metric source for the horizontal pod autoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute reflects the `type` field of spec.metrics[] in the HPA.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Resource\", \"ContainerResource\"]\n\t},\n\t\"k8s.job.uid\": {\n\t\t\"description\": \"The UID of the Job.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.job.name\": {\n\t\t\"description\": \"The name of the Job.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.job.label\": {\n\t\t\"description\": \"The label placed on the Job, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `jobtype` with value `ci` SHOULD be recorded\\n  as the `k8s.job.label.jobtype` attribute with value `\\\"ci\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.job.label.automated` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"ci\", \"\"]\n\t},\n\t\"k8s.job.annotation\": {\n\t\t\"description\": \"The annotation placed on the Job, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `number` with value `1` SHOULD be recorded\\n  as the `k8s.job.annotation.number` attribute with value `\\\"1\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n  the `k8s.job.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"\"]\n\t},\n\t\"k8s.cronjob.uid\": {\n\t\t\"description\": \"The UID of the CronJob.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.cronjob.name\": {\n\t\t\"description\": \"The name of the CronJob.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.cronjob.label\": {\n\t\t\"description\": \"The label placed on the CronJob, the `<key>` being the label name, the value being the label value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- A label `type` with value `weekly` SHOULD be recorded as the\\n  `k8s.cronjob.label.type` attribute with value `\\\"weekly\\\"`.\\n- A label `automated` with empty string value SHOULD be recorded as\\n  the `k8s.cronjob.label.automated` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"weekly\", \"\"]\n\t},\n\t\"k8s.cronjob.annotation\": {\n\t\t\"description\": \"The cronjob annotation placed on the CronJob, the `<key>` being the annotation name, the value being the annotation value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- An annotation `retries` with value `4` SHOULD be recorded as the\\n  `k8s.cronjob.annotation.retries` attribute with value `\\\"4\\\"`.\\n- An annotation `data` with empty string value SHOULD be recorded as\\n  the `k8s.cronjob.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"4\", \"\"]\n\t},\n\t\"k8s.volume.name\": {\n\t\t\"description\": \"The name of the K8s volume.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"volume0\"]\n\t},\n\t\"k8s.volume.type\": {\n\t\t\"description\": \"The type of the K8s volume.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"persistentVolumeClaim\",\n\t\t\t\"configMap\",\n\t\t\t\"downwardAPI\",\n\t\t\t\"emptyDir\",\n\t\t\t\"secret\",\n\t\t\t\"local\"\n\t\t]\n\t},\n\t\"k8s.namespace.phase\": {\n\t\t\"description\": \"The phase of the K8s namespace.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute aligns with the `phase` field of the\\n[K8s NamespaceStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core)\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"active\", \"terminating\"]\n\t},\n\t\"k8s.node.condition.type\": {\n\t\t\"description\": \"The condition type of a K8s Node.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"K8s Node conditions as described\\nby [K8s documentation](https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition).\\n\\nThis attribute aligns with the `type` field of the\\n[NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core)\\n\\nThe set of possible values is not limited to those listed here. Managed Kubernetes environments,\\nor custom controllers MAY introduce additional node condition types.\\nWhen this occurs, the exact value as reported by the Kubernetes API SHOULD be used.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Ready\",\n\t\t\t\"DiskPressure\",\n\t\t\t\"MemoryPressure\",\n\t\t\t\"PIDPressure\",\n\t\t\t\"NetworkUnavailable\"\n\t\t]\n\t},\n\t\"k8s.node.condition.status\": {\n\t\t\"description\": \"The status of the condition, one of True, False, Unknown.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute aligns with the `status` field of the\\n[NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core)\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"true\",\n\t\t\t\"false\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"k8s.container.status.state\": {\n\t\t\"description\": \"The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"experimental\",\n\t\t\"examples\": [\n\t\t\t\"terminated\",\n\t\t\t\"running\",\n\t\t\t\"waiting\"\n\t\t]\n\t},\n\t\"k8s.container.status.reason\": {\n\t\t\"description\": \"The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core) or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"experimental\",\n\t\t\"examples\": [\n\t\t\t\"ContainerCreating\",\n\t\t\t\"CrashLoopBackOff\",\n\t\t\t\"CreateContainerConfigError\",\n\t\t\t\"ErrImagePull\",\n\t\t\t\"ImagePullBackOff\",\n\t\t\t\"OOMKilled\",\n\t\t\t\"Completed\",\n\t\t\t\"Error\",\n\t\t\t\"ContainerCannotRun\"\n\t\t]\n\t},\n\t\"k8s.hugepage.size\": {\n\t\t\"description\": \"The size (identifier) of the K8s huge page.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2Mi\"]\n\t},\n\t\"k8s.storageclass.name\": {\n\t\t\"description\": \"The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"gold.storageclass.storage.k8s.io\"]\n\t},\n\t\"k8s.resourcequota.resource_name\": {\n\t\t\"description\": \"The name of the K8s resource a resource quota defines.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value for this attribute can be either the full `count/<resource>[.<group>]` string (e.g., count/deployments.apps, count/pods), or, for certain core Kubernetes resources, just the resource name (e.g., pods, services, configmaps). Both forms are supported by Kubernetes for object count quotas. See [Kubernetes Resource Quotas documentation](https://kubernetes.io/docs/concepts/policy/resource-quotas/#object-count-quota) for more details.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"count/replicationcontrollers\"]\n\t}\n};\nvar k8s_default = {\n\tnamespace: namespace$30,\n\tdescription: description$30,\n\tattributes: attributes$30\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/linux.json\nvar namespace$29 = \"linux\";\nvar description$29 = \"Describes Linux Memory attributes\";\nvar attributes$29 = { \"linux.memory.slab.state\": {\n\t\"description\": \"The Linux Slab memory state\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"reclaimable\", \"unreclaimable\"]\n} };\nvar linux_default = {\n\tnamespace: namespace$29,\n\tdescription: description$29,\n\tattributes: attributes$29\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/log.json\nvar namespace$28 = \"log\";\nvar description$28 = \"This document defines log attributes\\n\";\nvar attributes$28 = { \"log.iostream\": {\n\t\"description\": \"The stream associated with the log. See below for a list of well-known values.\\n\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"stdout\", \"stderr\"]\n} };\nvar log_default = {\n\tnamespace: namespace$28,\n\tdescription: description$28,\n\tattributes: attributes$28\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/mcp.json\nvar namespace$27 = \"mcp\";\nvar description$27 = \"Model Context Protocol semantic convention attributes\";\nvar attributes$27 = {\n\t\"mcp.method.name\": {\n\t\t\"description\": \"The name of the request or notification method.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"initialize\",\n\t\t\t\"tools/call\",\n\t\t\t\"resources/read\"\n\t\t]\n\t},\n\t\"mcp.protocol.version\": {\n\t\t\"description\": \"The version of the Model Context Protocol used.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"2025-06-18\"]\n\t},\n\t\"mcp.resource.uri\": {\n\t\t\"description\": \"The value of the resource URI.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"postgres://database/customers/schema\", \"file:///home/user/documents/report.pdf\"]\n\t},\n\t\"mcp.session.id\": {\n\t\t\"description\": \"Identifies an MCP session.\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"191c4850af6c49e08843a3f6c80e5046\"]\n\t}\n};\nvar mcp_default = {\n\tnamespace: namespace$27,\n\tdescription: description$27,\n\tattributes: attributes$27\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/messaging.json\nvar namespace$26 = \"messaging\";\nvar description$26 = \"Attributes describing telemetry around messaging systems and messaging activities.\";\nvar attributes$26 = {\n\t\"messaging.batch.message_count\": {\n\t\t\"description\": \"The number of messages sent, received, or processed in the scope of the batching operation.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"2\"\n\t\t]\n\t},\n\t\"messaging.client.id\": {\n\t\t\"description\": \"A unique identifier for the client that consumes or produces a message.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"client-5\", \"myhost@8742@s8083jm\"]\n\t},\n\t\"messaging.consumer.group.name\": {\n\t\t\"description\": \"The name of the consumer group with which a consumer is associated.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Semantic conventions for individual messaging systems SHOULD document whether `messaging.consumer.group.name` is applicable and what it means in the context of that system.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-group\", \"indexer\"]\n\t},\n\t\"messaging.destination.name\": {\n\t\t\"description\": \"The message destination name\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If\\nthe broker doesn't have such notion, the destination name SHOULD uniquely identify the broker.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"MyQueue\", \"MyTopic\"]\n\t},\n\t\"messaging.destination.subscription.name\": {\n\t\t\"description\": \"The name of the destination subscription from which a message is consumed.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"subscription-a\"]\n\t},\n\t\"messaging.destination.template\": {\n\t\t\"description\": \"Low cardinality representation of the messaging destination name\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/customers/{customerId}\"]\n\t},\n\t\"messaging.destination.anonymous\": {\n\t\t\"description\": \"A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name).\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"messaging.destination.temporary\": {\n\t\t\"description\": \"A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"messaging.destination.partition.id\": {\n\t\t\"description\": \"The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\"]\n\t},\n\t\"messaging.message.conversation_id\": {\n\t\t\"description\": \"The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called \\\"Correlation ID\\\".\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"MyConversationId\"]\n\t},\n\t\"messaging.message.envelope.size\": {\n\t\t\"description\": \"The size of the message body and metadata in bytes.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed\\nsize should be used.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2738\"]\n\t},\n\t\"messaging.message.id\": {\n\t\t\"description\": \"A value used by the messaging system as an identifier for the message, represented as a string.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"452a7c7c7c7048c2f887f61572b18fc2\"]\n\t},\n\t\"messaging.message.body.size\": {\n\t\t\"description\": \"The size of the message body in bytes.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed\\nbody size should be used.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1439\"]\n\t},\n\t\"messaging.operation.type\": {\n\t\t\"description\": \"A string identifying the type of the messaging operation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If a custom value is used, it MUST be of low cardinality.\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"create\",\n\t\t\t\"send\",\n\t\t\t\"receive\",\n\t\t\t\"process\",\n\t\t\t\"settle\",\n\t\t\t\"deliver\",\n\t\t\t\"publish\"\n\t\t]\n\t},\n\t\"messaging.operation.name\": {\n\t\t\"description\": \"The system-specific name of the messaging operation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"ack\",\n\t\t\t\"nack\",\n\t\t\t\"send\"\n\t\t]\n\t},\n\t\"messaging.system\": {\n\t\t\"description\": \"The messaging system as identified by the client instrumentation.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"activemq\",\n\t\t\t\"aws_sqs\",\n\t\t\t\"eventgrid\",\n\t\t\t\"eventhubs\",\n\t\t\t\"servicebus\",\n\t\t\t\"gcp_pubsub\",\n\t\t\t\"jms\",\n\t\t\t\"kafka\",\n\t\t\t\"rabbitmq\",\n\t\t\t\"rocketmq\",\n\t\t\t\"pulsar\"\n\t\t]\n\t}\n};\nvar messaging_default = {\n\tnamespace: namespace$26,\n\tdescription: description$26,\n\tattributes: attributes$26\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/network.json\nvar namespace$25 = \"network\";\nvar description$25 = \"These attributes may be used for any network related operation.\\n\";\nvar attributes$25 = {\n\t\"network.carrier.icc\": {\n\t\t\"description\": \"The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"DE\"]\n\t},\n\t\"network.carrier.mcc\": {\n\t\t\"description\": \"The mobile carrier country code.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"310\"]\n\t},\n\t\"network.carrier.mnc\": {\n\t\t\"description\": \"The mobile carrier network code.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"001\"]\n\t},\n\t\"network.carrier.name\": {\n\t\t\"description\": \"The name of the mobile carrier.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"sprint\"]\n\t},\n\t\"network.connection.subtype\": {\n\t\t\"description\": \"This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"gprs\",\n\t\t\t\"edge\",\n\t\t\t\"umts\",\n\t\t\t\"cdma\",\n\t\t\t\"evdo_0\",\n\t\t\t\"evdo_a\",\n\t\t\t\"cdma2000_1xrtt\",\n\t\t\t\"hsdpa\",\n\t\t\t\"hsupa\",\n\t\t\t\"hspa\",\n\t\t\t\"iden\",\n\t\t\t\"evdo_b\",\n\t\t\t\"lte\",\n\t\t\t\"ehrpd\",\n\t\t\t\"hspap\",\n\t\t\t\"gsm\",\n\t\t\t\"td_scdma\",\n\t\t\t\"iwlan\",\n\t\t\t\"nr\",\n\t\t\t\"nrnsa\",\n\t\t\t\"lte_ca\"\n\t\t]\n\t},\n\t\"network.connection.type\": {\n\t\t\"description\": \"The internet connection type.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"wifi\",\n\t\t\t\"wired\",\n\t\t\t\"cell\",\n\t\t\t\"unavailable\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"network.local.address\": {\n\t\t\"description\": \"Local address of the network connection - IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"10.1.2.80\", \"/tmp/my.sock\"]\n\t},\n\t\"network.local.port\": {\n\t\t\"description\": \"Local port number of the network connection.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"65123\"]\n\t},\n\t\"network.peer.address\": {\n\t\t\"description\": \"Peer address of the network connection - IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"10.1.2.80\", \"/tmp/my.sock\"]\n\t},\n\t\"network.peer.port\": {\n\t\t\"description\": \"Peer port number of the network connection.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"65123\"]\n\t},\n\t\"network.protocol.name\": {\n\t\t\"description\": \"[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value SHOULD be normalized to lowercase.\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"amqp\",\n\t\t\t\"http\",\n\t\t\t\"mqtt\"\n\t\t]\n\t},\n\t\"network.protocol.version\": {\n\t\t\"description\": \"The actual version of the protocol used for network communication.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"1.1\", \"2\"]\n\t},\n\t\"network.transport\": {\n\t\t\"description\": \"[OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value SHOULD be normalized to lowercase.\\n\\nConsider always setting the transport when setting a port number, since\\na port number is ambiguous without knowing the transport. For example\\ndifferent processes could be listening on TCP port 12345 and UDP port 12345.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"tcp\",\n\t\t\t\"udp\",\n\t\t\t\"pipe\",\n\t\t\t\"unix\",\n\t\t\t\"quic\"\n\t\t]\n\t},\n\t\"network.type\": {\n\t\t\"description\": \"[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value SHOULD be normalized to lowercase.\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"ipv4\", \"ipv6\"]\n\t},\n\t\"network.io.direction\": {\n\t\t\"description\": \"The network IO operation direction.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"transmit\", \"receive\"]\n\t},\n\t\"network.interface.name\": {\n\t\t\"description\": \"The network interface name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"lo\", \"eth0\"]\n\t},\n\t\"network.connection.state\": {\n\t\t\"description\": \"The state of network connection\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2)\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"closed\",\n\t\t\t\"close_wait\",\n\t\t\t\"closing\",\n\t\t\t\"established\",\n\t\t\t\"fin_wait_1\",\n\t\t\t\"fin_wait_2\",\n\t\t\t\"last_ack\",\n\t\t\t\"listen\",\n\t\t\t\"syn_received\",\n\t\t\t\"syn_sent\",\n\t\t\t\"time_wait\"\n\t\t]\n\t}\n};\nvar network_default = {\n\tnamespace: namespace$25,\n\tdescription: description$25,\n\tattributes: attributes$25\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/nodejs.json\nvar namespace$24 = \"nodejs\";\nvar description$24 = \"Describes Node.js related attributes.\";\nvar attributes$24 = { \"nodejs.eventloop.state\": {\n\t\"description\": \"The state of event loop time.\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"active\", \"idle\"]\n} };\nvar nodejs_default = {\n\tnamespace: namespace$24,\n\tdescription: description$24,\n\tattributes: attributes$24\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/oci.json\nvar namespace$23 = \"oci\";\nvar description$23 = \"An OCI image manifest.\\n\";\nvar attributes$23 = { \"oci.manifest.digest\": {\n\t\"description\": \"The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known.\\n\",\n\t\"type\": \"string\",\n\t\"note\": \"Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).\\nAn example can be found in [Example Image Manifest](https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest).\\n\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4\"]\n} };\nvar oci_default = {\n\tnamespace: namespace$23,\n\tdescription: description$23,\n\tattributes: attributes$23\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/opentracing.json\nvar namespace$22 = \"opentracing\";\nvar description$22 = \"Attributes used by the OpenTracing Shim layer.\";\nvar attributes$22 = { \"opentracing.ref_type\": {\n\t\"description\": \"Parent-child Reference type\",\n\t\"type\": \"string\",\n\t\"note\": \"The causal relationship between a child Span and a parent Span.\\n\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"child_of\", \"follows_from\"]\n} };\nvar opentracing_default = {\n\tnamespace: namespace$22,\n\tdescription: description$22,\n\tattributes: attributes$22\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/os.json\nvar namespace$21 = \"os\";\nvar description$21 = \"The operating system (OS) on which the process represented by this resource is running.\\n\";\nvar attributes$21 = {\n\t\"os.type\": {\n\t\t\"description\": \"The operating system type.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"windows\",\n\t\t\t\"linux\",\n\t\t\t\"darwin\",\n\t\t\t\"freebsd\",\n\t\t\t\"netbsd\",\n\t\t\t\"openbsd\",\n\t\t\t\"dragonflybsd\",\n\t\t\t\"hpux\",\n\t\t\t\"aix\",\n\t\t\t\"solaris\",\n\t\t\t\"z_os\",\n\t\t\t\"zos\"\n\t\t]\n\t},\n\t\"os.description\": {\n\t\t\"description\": \"Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Microsoft Windows [Version 10.0.18363.778]\", \"Ubuntu 18.04.1 LTS\"]\n\t},\n\t\"os.name\": {\n\t\t\"description\": \"Human readable operating system name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"iOS\",\n\t\t\t\"Android\",\n\t\t\t\"Ubuntu\"\n\t\t]\n\t},\n\t\"os.version\": {\n\t\t\"description\": \"The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"14.2.1\", \"18.04.1\"]\n\t},\n\t\"os.build_id\": {\n\t\t\"description\": \"Unique identifier for a particular build or compilation of the operating system.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"TQ3C.230805.001.B2\",\n\t\t\t\"20E247\",\n\t\t\t\"22621\"\n\t\t]\n\t}\n};\nvar os_default = {\n\tnamespace: namespace$21,\n\tdescription: description$21,\n\tattributes: attributes$21\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/otel.json\nvar namespace$20 = \"otel\";\nvar description$20 = \"Attributes reserved for OpenTelemetry\";\nvar attributes$20 = {\n\t\"otel.status_code\": {\n\t\t\"description\": \"Name of the code, either \\\"OK\\\" or \\\"ERROR\\\". MUST NOT be set if the status code is UNSET.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"OK\", \"ERROR\"]\n\t},\n\t\"otel.status_description\": {\n\t\t\"description\": \"Description of the Status if it has a value, otherwise not set.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"resource not found\"]\n\t},\n\t\"otel.span.sampling_result\": {\n\t\t\"description\": \"The result value of the sampler for this span\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"DROP\",\n\t\t\t\"RECORD_ONLY\",\n\t\t\t\"RECORD_AND_SAMPLE\"\n\t\t]\n\t},\n\t\"otel.span.parent.origin\": {\n\t\t\"description\": \"Determines whether the span has a parent span, and if so, [whether it is a remote parent](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote)\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"none\",\n\t\t\t\"local\",\n\t\t\t\"remote\"\n\t\t]\n\t}\n};\nvar otel_default = {\n\tnamespace: namespace$20,\n\tdescription: description$20,\n\tattributes: attributes$20\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/peer.json\nvar namespace$19 = \"peer\";\nvar description$19 = \"Operations that access some remote service.\\n\";\nvar attributes$19 = { \"peer.service\": {\n\t\"description\": \"The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\\n\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"AuthTokenCache\"]\n} };\nvar peer_default = {\n\tnamespace: namespace$19,\n\tdescription: description$19,\n\tattributes: attributes$19\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/process.json\nvar namespace$18 = \"process\";\nvar description$18 = \"An operating system process.\\n\";\nvar attributes$18 = {\n\t\"process.pid\": {\n\t\t\"description\": \"Process identifier (PID).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1234\"]\n\t},\n\t\"process.parent_pid\": {\n\t\t\"description\": \"Parent Process identifier (PPID).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"111\"]\n\t},\n\t\"process.vpid\": {\n\t\t\"description\": \"Virtual process identifier.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"The process ID within a PID namespace. This is not necessarily unique across all processes on the host but it is unique within the process namespace that the process exists within.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"12\"]\n\t},\n\t\"process.session_leader.pid\": {\n\t\t\"description\": \"The PID of the process's session leader. This is also the session ID (SID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"14\"]\n\t},\n\t\"process.group_leader.pid\": {\n\t\t\"description\": \"The PID of the process's group leader. This is also the process group ID (PGID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"23\"]\n\t},\n\t\"process.executable.build_id.gnu\": {\n\t\t\"description\": \"The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"c89b11207f6479603b0d49bf291c092c2b719293\"]\n\t},\n\t\"process.executable.build_id.go\": {\n\t\t\"description\": \"The Go build ID as retrieved by `go tool buildid <go executable>`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY\"]\n\t},\n\t\"process.executable.build_id.htlhash\": {\n\t\t\"description\": \"Profiling specific build ID for executables. See the OTel specification for Profiles for more information.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"600DCAFE4A110000F2BF38C493F5FB92\"]\n\t},\n\t\"process.executable.name\": {\n\t\t\"description\": \"The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"otelcol\"]\n\t},\n\t\"process.executable.path\": {\n\t\t\"description\": \"The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/usr/bin/cmd/otelcol\"]\n\t},\n\t\"process.command\": {\n\t\t\"description\": \"The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"cmd/otelcol\"]\n\t},\n\t\"process.command_line\": {\n\t\t\"description\": \"The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"C:\\\\cmd\\\\otecol --config=\\\"my directory\\\\config.yaml\\\"\"]\n\t},\n\t\"process.command_args\": {\n\t\t\"description\": \"All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"cmd/otecol\\\",\\\"--config=config.yaml\\\"]\"]\n\t},\n\t\"process.args_count\": {\n\t\t\"description\": \"Length of the process.command_args array\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"4\"]\n\t},\n\t\"process.owner\": {\n\t\t\"description\": \"The username of the user that owns the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"root\"]\n\t},\n\t\"process.user.id\": {\n\t\t\"description\": \"The effective user ID (EUID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1001\"]\n\t},\n\t\"process.user.name\": {\n\t\t\"description\": \"The username of the effective user of the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"root\"]\n\t},\n\t\"process.real_user.id\": {\n\t\t\"description\": \"The real user ID (RUID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1000\"]\n\t},\n\t\"process.real_user.name\": {\n\t\t\"description\": \"The username of the real user of the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"operator\"]\n\t},\n\t\"process.saved_user.id\": {\n\t\t\"description\": \"The saved user ID (SUID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1002\"]\n\t},\n\t\"process.saved_user.name\": {\n\t\t\"description\": \"The username of the saved user.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"operator\"]\n\t},\n\t\"process.runtime.name\": {\n\t\t\"description\": \"The name of the runtime of this process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"OpenJDK Runtime Environment\"]\n\t},\n\t\"process.runtime.version\": {\n\t\t\"description\": \"The version of the runtime of this process, as returned by the runtime without modification.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"14.0.2\"]\n\t},\n\t\"process.runtime.description\": {\n\t\t\"description\": \"An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0\"]\n\t},\n\t\"process.title\": {\n\t\t\"description\": \"Process title (proctitle)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In many Unix-like systems, process title (proctitle), is the string that represents the name or command line of a running process, displayed by system monitoring tools like ps, top, and htop.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"cat /etc/hostname\",\n\t\t\t\"xfce4-session\",\n\t\t\t\"bash\"\n\t\t]\n\t},\n\t\"process.creation.time\": {\n\t\t\"description\": \"The date and time the process was created, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2023-11-21T09:25:34.853Z\"]\n\t},\n\t\"process.exit.time\": {\n\t\t\"description\": \"The date and time the process exited, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2023-11-21T09:26:12.315Z\"]\n\t},\n\t\"process.exit.code\": {\n\t\t\"description\": \"The exit code of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"127\"]\n\t},\n\t\"process.interactive\": {\n\t\t\"description\": \"Whether the process is connected to an interactive shell.\\n\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"process.working_directory\": {\n\t\t\"description\": \"The working directory of the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/root\"]\n\t},\n\t\"process.context_switch_type\": {\n\t\t\"description\": \"Specifies whether the context switches for this data point were voluntary or involuntary.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"voluntary\", \"involuntary\"]\n\t},\n\t\"process.paging.fault_type\": {\n\t\t\"description\": \"The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"major\", \"minor\"]\n\t},\n\t\"process.environment_variable\": {\n\t\t\"description\": \"Process environment variables, `<key>` being the environment variable name, the value being the environment variable value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- an environment variable `USER` with value `\\\"ubuntu\\\"` SHOULD be recorded\\nas the `process.environment_variable.USER` attribute with value `\\\"ubuntu\\\"`.\\n\\n- an environment variable `PATH` with value `\\\"/usr/local/bin:/usr/bin\\\"`\\nSHOULD be recorded as the `process.environment_variable.PATH` attribute\\nwith value `\\\"/usr/local/bin:/usr/bin\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"ubuntu\", \"/usr/local/bin:/usr/bin\"]\n\t}\n};\nvar process_default = {\n\tnamespace: namespace$18,\n\tdescription: description$18,\n\tattributes: attributes$18\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/profile.json\nvar namespace$17 = \"profile\";\nvar description$17 = \"Describes the origin of a single frame in a Profile.\\n\";\nvar attributes$17 = { \"profile.frame.type\": {\n\t\"description\": \"Describes the interpreter or compiler of a single frame.\\n\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\n\t\t\"dotnet\",\n\t\t\"jvm\",\n\t\t\"kernel\",\n\t\t\"native\",\n\t\t\"perl\",\n\t\t\"php\",\n\t\t\"cpython\",\n\t\t\"ruby\",\n\t\t\"v8js\",\n\t\t\"beam\",\n\t\t\"go\",\n\t\t\"rust\"\n\t]\n} };\nvar profile_default = {\n\tnamespace: namespace$17,\n\tdescription: description$17,\n\tattributes: attributes$17\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/rpc.json\nvar namespace$16 = \"rpc\";\nvar description$16 = \"This document defines attributes for remote procedure calls.\";\nvar attributes$16 = {\n\t\"rpc.connect_rpc.error_code\": {\n\t\t\"description\": \"The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"cancelled\",\n\t\t\t\"unknown\",\n\t\t\t\"invalid_argument\",\n\t\t\t\"deadline_exceeded\",\n\t\t\t\"not_found\",\n\t\t\t\"already_exists\",\n\t\t\t\"permission_denied\",\n\t\t\t\"resource_exhausted\",\n\t\t\t\"failed_precondition\",\n\t\t\t\"aborted\",\n\t\t\t\"out_of_range\",\n\t\t\t\"unimplemented\",\n\t\t\t\"internal\",\n\t\t\t\"unavailable\",\n\t\t\t\"data_loss\",\n\t\t\t\"unauthenticated\"\n\t\t]\n\t},\n\t\"rpc.connect_rpc.request.metadata\": {\n\t\t\"description\": \"Connect request metadata, `<key>` being the normalized Connect Metadata key (lowercase), the value being the metadata values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\\nIncluding all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nFor example, a property `my-custom-key` with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]` SHOULD be recorded as\\nthe `rpc.connect_rpc.request.metadata.my-custom-key` attribute with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]`\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"1.2.3.4\\\",\\\"1.2.3.5\\\"]\"]\n\t},\n\t\"rpc.connect_rpc.response.metadata\": {\n\t\t\"description\": \"Connect response metadata, `<key>` being the normalized Connect Metadata key (lowercase), the value being the metadata values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\\nIncluding all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nFor example, a property `my-custom-key` with value `\\\"attribute_value\\\"` SHOULD be recorded as\\nthe `rpc.connect_rpc.response.metadata.my-custom-key` attribute with value `[\\\"attribute_value\\\"]`\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"attribute_value\\\"]\"]\n\t},\n\t\"rpc.grpc.status_code\": {\n\t\t\"description\": \"The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"2\",\n\t\t\t\"3\",\n\t\t\t\"4\",\n\t\t\t\"5\",\n\t\t\t\"6\",\n\t\t\t\"7\",\n\t\t\t\"8\",\n\t\t\t\"9\",\n\t\t\t\"10\",\n\t\t\t\"11\",\n\t\t\t\"12\",\n\t\t\t\"13\",\n\t\t\t\"14\",\n\t\t\t\"15\",\n\t\t\t\"16\"\n\t\t]\n\t},\n\t\"rpc.grpc.request.metadata\": {\n\t\t\"description\": \"gRPC request metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\\nIncluding all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nFor example, a property `my-custom-key` with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]` SHOULD be recorded as\\n`rpc.grpc.request.metadata.my-custom-key` attribute with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]`\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"1.2.3.4\\\",\\\"1.2.3.5\\\"]\"]\n\t},\n\t\"rpc.grpc.response.metadata\": {\n\t\t\"description\": \"gRPC response metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\\nIncluding all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nFor example, a property `my-custom-key` with value `[\\\"attribute_value\\\"]` SHOULD be recorded as\\nthe `rpc.grpc.response.metadata.my-custom-key` attribute with value `[\\\"attribute_value\\\"]`\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"attribute_value\\\"]\"]\n\t},\n\t\"rpc.jsonrpc.error_code\": {\n\t\t\"description\": \"`error.code` property of response if it is an error response.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"-32700\", \"100\"]\n\t},\n\t\"rpc.jsonrpc.error_message\": {\n\t\t\"description\": \"`error.message` property of response if it is an error response.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Parse error\", \"User already exists\"]\n\t},\n\t\"rpc.jsonrpc.request_id\": {\n\t\t\"description\": \"`id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"10\",\n\t\t\t\"request-7\",\n\t\t\t\"\"\n\t\t]\n\t},\n\t\"rpc.jsonrpc.version\": {\n\t\t\"description\": \"Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2.0\", \"1.0\"]\n\t},\n\t\"rpc.method\": {\n\t\t\"description\": \"The name of the (logical) method being called, must be equal to the $method part in the span name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"exampleMethod\"]\n\t},\n\t\"rpc.service\": {\n\t\t\"description\": \"The full (logical) name of the service being called, including its package name, if applicable.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"myservice.EchoService\"]\n\t},\n\t\"rpc.system\": {\n\t\t\"description\": \"A string identifying the remoting system. See below for a list of well-known identifiers.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"grpc\",\n\t\t\t\"java_rmi\",\n\t\t\t\"dotnet_wcf\",\n\t\t\t\"apache_dubbo\",\n\t\t\t\"connect_rpc\"\n\t\t]\n\t},\n\t\"rpc.message.type\": {\n\t\t\"description\": \"Whether this is a received or sent message.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"SENT\", \"RECEIVED\"]\n\t},\n\t\"rpc.message.id\": {\n\t\t\"description\": \"MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"This way we guarantee that the values will be consistent between different implementations.\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"rpc.message.compressed_size\": {\n\t\t\"description\": \"Compressed size of the message in bytes.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"rpc.message.uncompressed_size\": {\n\t\t\"description\": \"Uncompressed size of the message in bytes.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\"\n\t}\n};\nvar rpc_default = {\n\tnamespace: namespace$16,\n\tdescription: description$16,\n\tattributes: attributes$16\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/server.json\nvar namespace$15 = \"server\";\nvar description$15 = \"These attributes may be used to describe the server in a connection-based network interaction where there is one side that initiates the connection (the client is the side that initiates the connection). This covers all TCP network interactions since TCP is connection-based and one side initiates the connection (an exception is made for peer-to-peer communication over TCP where the \\\"user-facing\\\" surface of the protocol / API doesn't expose a clear notion of client and server). This also covers UDP network interactions where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.\\n\";\nvar attributes$15 = {\n\t\"server.address\": {\n\t\t\"description\": \"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"example.com\",\n\t\t\t\"10.1.2.80\",\n\t\t\t\"/tmp/my.sock\"\n\t\t]\n\t},\n\t\"server.port\": {\n\t\t\"description\": \"Server port number.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"80\",\n\t\t\t\"8080\",\n\t\t\t\"443\"\n\t\t]\n\t}\n};\nvar server_default = {\n\tnamespace: namespace$15,\n\tdescription: description$15,\n\tattributes: attributes$15\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/service.json\nvar namespace$14 = \"service\";\nvar description$14 = \"A service instance.\\n\";\nvar attributes$14 = {\n\t\"service.name\": {\n\t\t\"description\": \"Logical name of the service.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"shoppingcart\"]\n\t},\n\t\"service.version\": {\n\t\t\"description\": \"The version string of the service API or implementation. The format is not defined by these conventions.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"2.0.0\", \"a01dbef8a\"]\n\t},\n\t\"service.namespace\": {\n\t\t\"description\": \"A namespace for `service.name`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Shop\"]\n\t},\n\t\"service.instance.id\": {\n\t\t\"description\": \"The string ID of the service instance.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words\\n`service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to\\ndistinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled\\nservice).\\n\\nImplementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC\\n4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of\\nthis value if stability is desirable. In that case, the ID SHOULD be used as source of a UUID Version 5 and\\nSHOULD use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.\\n\\nUUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is\\nneeded. Similar to what can be seen in the man page for the\\n[`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) file, the underlying\\ndata, such as pod name and namespace should be treated as confidential, being the user's choice to expose it\\nor not via another resource attribute.\\n\\nFor applications running behind an application server (like unicorn), we do not recommend using one identifier\\nfor all processes participating in the application. Instead, it's recommended each division (e.g. a worker\\nthread in unicorn) to have its own instance.id.\\n\\nIt's not recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the\\nservice instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will\\nlikely be wrong, as the Collector might not know from which container within that pod the telemetry originated.\\nHowever, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance\\nfor that telemetry. This is typically the case for scraping receivers, as they know the target address and\\nport.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"627cc493-f310-47de-96bd-71410b7dec09\"]\n\t}\n};\nvar service_default = {\n\tnamespace: namespace$14,\n\tdescription: description$14,\n\tattributes: attributes$14\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/session.json\nvar namespace$13 = \"session\";\nvar description$13 = \"Session is defined as the period of time encompassing all activities performed by the application and the actions executed by the end user.\\nConsequently, a Session is represented as a collection of Logs, Events, and Spans emitted by the Client Application throughout the Session's duration. Each Session is assigned a unique identifier, which is included as an attribute in the Logs, Events, and Spans generated during the Session's lifecycle.\\nWhen a session reaches end of life, typically due to user inactivity or session timeout, a new session identifier will be assigned. The previous session identifier may be provided by the instrumentation so that telemetry backends can link the two sessions.\\n\";\nvar attributes$13 = {\n\t\"session.id\": {\n\t\t\"description\": \"A unique id to identify a session.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"00112233-4455-6677-8899-aabbccddeeff\"]\n\t},\n\t\"session.previous_id\": {\n\t\t\"description\": \"The previous `session.id` for this user, when known.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"00112233-4455-6677-8899-aabbccddeeff\"]\n\t}\n};\nvar session_default = {\n\tnamespace: namespace$13,\n\tdescription: description$13,\n\tattributes: attributes$13\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/signalr.json\nvar namespace$12 = \"signalr\";\nvar description$12 = \"SignalR attributes\";\nvar attributes$12 = {\n\t\"signalr.connection.status\": {\n\t\t\"description\": \"SignalR HTTP connection closure status.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"normal_closure\",\n\t\t\t\"timeout\",\n\t\t\t\"app_shutdown\"\n\t\t]\n\t},\n\t\"signalr.transport\": {\n\t\t\"description\": \"[SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"server_sent_events\",\n\t\t\t\"long_polling\",\n\t\t\t\"web_sockets\"\n\t\t]\n\t}\n};\nvar signalr_default = {\n\tnamespace: namespace$12,\n\tdescription: description$12,\n\tattributes: attributes$12\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/source.json\nvar namespace$11 = \"source\";\nvar description$11 = \"These attributes may be used to describe the sender of a network exchange/packet. These should be used when there is no client/server relationship between the two sides, or when that relationship is unknown. This covers low-level network interactions (e.g. packet tracing) where you don't know if there was a connection or which side initiated it. This also covers unidirectional UDP flows and peer-to-peer communication where the \\\"user-facing\\\" surface of the protocol / API doesn't expose a clear notion of client and server.\\n\";\nvar attributes$11 = {\n\t\"source.address\": {\n\t\t\"description\": \"Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When observed from the destination side, and when communicating through an intermediary, `source.address` SHOULD represent the source address behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"source.example.com\",\n\t\t\t\"10.1.2.80\",\n\t\t\t\"/tmp/my.sock\"\n\t\t]\n\t},\n\t\"source.port\": {\n\t\t\"description\": \"Source port number\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3389\", \"2888\"]\n\t}\n};\nvar source_default = {\n\tnamespace: namespace$11,\n\tdescription: description$11,\n\tattributes: attributes$11\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/system.json\nvar namespace$10 = \"system\";\nvar description$10 = \"Describes System attributes\";\nvar attributes$10 = { \"system.device\": {\n\t\"description\": \"The device identifier\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"(identifier)\"]\n} };\nvar system_default = {\n\tnamespace: namespace$10,\n\tdescription: description$10,\n\tattributes: attributes$10\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/telemetry.json\nvar namespace$9 = \"telemetry\";\nvar description$9 = \"This document defines attributes for telemetry SDK.\\n\";\nvar attributes$9 = {\n\t\"telemetry.sdk.name\": {\n\t\t\"description\": \"The name of the telemetry SDK as defined above.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.\\nIf another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the\\n`telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point\\nor another suitable identifier depending on the language.\\nThe identifier `opentelemetry` is reserved and MUST NOT be used in this case.\\nAll custom identifiers SHOULD be stable across different versions of an implementation.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"telemetry.sdk.language\": {\n\t\t\"description\": \"The language of the telemetry SDK.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"cpp\",\n\t\t\t\"dotnet\",\n\t\t\t\"erlang\",\n\t\t\t\"go\",\n\t\t\t\"java\",\n\t\t\t\"nodejs\",\n\t\t\t\"php\",\n\t\t\t\"python\",\n\t\t\t\"ruby\",\n\t\t\t\"rust\",\n\t\t\t\"swift\",\n\t\t\t\"webjs\"\n\t\t]\n\t},\n\t\"telemetry.sdk.version\": {\n\t\t\"description\": \"The version string of the telemetry SDK.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"1.2.3\"]\n\t},\n\t\"telemetry.distro.name\": {\n\t\t\"description\": \"The name of the auto instrumentation agent or distribution, if used.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to\\na string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"parts-unlimited-java\"]\n\t},\n\t\"telemetry.distro.version\": {\n\t\t\"description\": \"The version string of the auto instrumentation agent or distribution, if used.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1.2.3\"]\n\t}\n};\nvar telemetry_default = {\n\tnamespace: namespace$9,\n\tdescription: description$9,\n\tattributes: attributes$9\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/test.json\nvar namespace$8 = \"test\";\nvar description$8 = \"This group describes attributes specific to [software tests](https://wikipedia.org/wiki/Software_testing).\\n\";\nvar attributes$8 = {\n\t\"test.suite.name\": {\n\t\t\"description\": \"The human readable name of a [test suite](https://wikipedia.org/wiki/Test_suite).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"TestSuite1\"]\n\t},\n\t\"test.suite.run.status\": {\n\t\t\"description\": \"The status of the test suite run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"success\",\n\t\t\t\"failure\",\n\t\t\t\"skipped\",\n\t\t\t\"aborted\",\n\t\t\t\"timed_out\",\n\t\t\t\"in_progress\"\n\t\t]\n\t},\n\t\"test.case.name\": {\n\t\t\"description\": \"The fully qualified human readable name of the [test case](https://wikipedia.org/wiki/Test_case).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"org.example.TestCase1.test1\",\n\t\t\t\"example/tests/TestCase1.test1\",\n\t\t\t\"ExampleTestCase1_test1\"\n\t\t]\n\t},\n\t\"test.case.result.status\": {\n\t\t\"description\": \"The status of the actual test case result from test execution.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"pass\", \"fail\"]\n\t}\n};\nvar test_default = {\n\tnamespace: namespace$8,\n\tdescription: description$8,\n\tattributes: attributes$8\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/thread.json\nvar namespace$7 = \"thread\";\nvar description$7 = \"These attributes may be used for any operation to store information about a thread that started a span.\\n\";\nvar attributes$7 = {\n\t\"thread.id\": {\n\t\t\"description\": \"Current \\\"managed\\\" thread ID (as opposed to OS thread ID).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"42\"]\n\t},\n\t\"thread.name\": {\n\t\t\"description\": \"Current thread name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"main\"]\n\t}\n};\nvar thread_default = {\n\tnamespace: namespace$7,\n\tdescription: description$7,\n\tattributes: attributes$7\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/tls.json\nvar namespace$6 = \"tls\";\nvar description$6 = \"This document defines semantic convention attributes in the TLS namespace.\";\nvar attributes$6 = {\n\t\"tls.cipher\": {\n\t\t\"description\": \"String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The values allowed for `tls.cipher` MUST be one of the `Descriptions` of the [registered TLS Cipher Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"TLS_RSA_WITH_3DES_EDE_CBC_SHA\", \"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256\"]\n\t},\n\t\"tls.client.certificate\": {\n\t\t\"description\": \"PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"MII...\"]\n\t},\n\t\"tls.client.certificate_chain\": {\n\t\t\"description\": \"Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"MII...\\\",\\\"MI...\\\"]\"]\n\t},\n\t\"tls.client.hash.md5\": {\n\t\t\"description\": \"Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC\"]\n\t},\n\t\"tls.client.hash.sha1\": {\n\t\t\"description\": \"Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"9E393D93138888D288266C2D915214D1D1CCEB2A\"]\n\t},\n\t\"tls.client.hash.sha256\": {\n\t\t\"description\": \"Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0\"]\n\t},\n\t\"tls.client.issuer\": {\n\t\t\"description\": \"Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com\"]\n\t},\n\t\"tls.client.ja3\": {\n\t\t\"description\": \"A hash that identifies clients based on how they perform an SSL/TLS handshake.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"d4e5b18d6b55c71272893221c96ba240\"]\n\t},\n\t\"tls.client.not_after\": {\n\t\t\"description\": \"Date/Time indicating when client certificate is no longer considered valid.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T00:00:00.000Z\"]\n\t},\n\t\"tls.client.not_before\": {\n\t\t\"description\": \"Date/Time indicating when client certificate is first considered valid.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1970-01-01T00:00:00.000Z\"]\n\t},\n\t\"tls.client.subject\": {\n\t\t\"description\": \"Distinguished name of subject of the x.509 certificate presented by the client.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CN=myclient, OU=Documentation Team, DC=example, DC=com\"]\n\t},\n\t\"tls.client.supported_ciphers\": {\n\t\t\"description\": \"Array of ciphers offered by the client during the client hello.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\\\",\\\"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\\\"]\"]\n\t},\n\t\"tls.curve\": {\n\t\t\"description\": \"String indicating the curve used for the given cipher, when applicable\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"secp256r1\"]\n\t},\n\t\"tls.established\": {\n\t\t\"description\": \"Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"true\"]\n\t},\n\t\"tls.next_protocol\": {\n\t\t\"description\": \"String indicating the protocol being tunneled. Per the values in the [IANA registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"http/1.1\"]\n\t},\n\t\"tls.protocol.name\": {\n\t\t\"description\": \"Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"ssl\", \"tls\"]\n\t},\n\t\"tls.protocol.version\": {\n\t\t\"description\": \"Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1.2\", \"3\"]\n\t},\n\t\"tls.resumed\": {\n\t\t\"description\": \"Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"true\"]\n\t},\n\t\"tls.server.certificate\": {\n\t\t\"description\": \"PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"MII...\"]\n\t},\n\t\"tls.server.certificate_chain\": {\n\t\t\"description\": \"Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"MII...\\\",\\\"MI...\\\"]\"]\n\t},\n\t\"tls.server.hash.md5\": {\n\t\t\"description\": \"Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC\"]\n\t},\n\t\"tls.server.hash.sha1\": {\n\t\t\"description\": \"Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"9E393D93138888D288266C2D915214D1D1CCEB2A\"]\n\t},\n\t\"tls.server.hash.sha256\": {\n\t\t\"description\": \"Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0\"]\n\t},\n\t\"tls.server.issuer\": {\n\t\t\"description\": \"Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com\"]\n\t},\n\t\"tls.server.ja3s\": {\n\t\t\"description\": \"A hash that identifies servers based on how they perform an SSL/TLS handshake.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"d4e5b18d6b55c71272893221c96ba240\"]\n\t},\n\t\"tls.server.not_after\": {\n\t\t\"description\": \"Date/Time indicating when server certificate is no longer considered valid.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T00:00:00.000Z\"]\n\t},\n\t\"tls.server.not_before\": {\n\t\t\"description\": \"Date/Time indicating when server certificate is first considered valid.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1970-01-01T00:00:00.000Z\"]\n\t},\n\t\"tls.server.subject\": {\n\t\t\"description\": \"Distinguished name of subject of the x.509 certificate presented by the server.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CN=myserver, OU=Documentation Team, DC=example, DC=com\"]\n\t}\n};\nvar tls_default = {\n\tnamespace: namespace$6,\n\tdescription: description$6,\n\tattributes: attributes$6\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/url.json\nvar namespace$5 = \"url\";\nvar description$5 = \"Attributes describing URL.\";\nvar attributes$5 = {\n\t\"url.domain\": {\n\t\t\"description\": \"Domain extracted from the `url.full`, such as \\\"opentelemetry.io\\\".\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the domain field. If the URL contains a [literal IPv6 address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by `[` and `]`, the `[` and `]` characters should also be captured in the domain field.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"www.foo.bar\",\n\t\t\t\"opentelemetry.io\",\n\t\t\t\"3.12.167.2\",\n\t\t\t\"[1080:0:0:0:8:800:200C:417A]\"\n\t\t]\n\t},\n\t\"url.extension\": {\n\t\t\"description\": \"The file extension extracted from the `url.full`, excluding the leading dot.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The file extension is only set if it exists, as not every url has a file extension. When the file name has multiple extensions `example.tar.gz`, only the last one should be captured `gz`, not `tar.gz`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"png\", \"gz\"]\n\t},\n\t\"url.fragment\": {\n\t\t\"description\": \"The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"SemConv\"]\n\t},\n\t\"url.full\": {\n\t\t\"description\": \"Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment\\nis not transmitted over HTTP, but if it is known, it SHOULD be included nevertheless.\\n\\n`url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`.\\nIn such case username and password SHOULD be redacted and attribute's value SHOULD be `https://REDACTED:REDACTED@www.example.com/`.\\n\\n`url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed).\\n\\nSensitive content provided in `url.full` SHOULD be scrubbed when instrumentations can identify it.\\n\\n![Development](https://img.shields.io/badge/-development-blue)\\nQuery string values for the following keys SHOULD be redacted by default and replaced by the\\nvalue `REDACTED`:\\n\\n* [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\\n* [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\\n* [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)\\n* [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)\\n\\nThis list is subject to change over time.\\n\\nWhen a query string value is redacted, the query string key SHOULD still be preserved, e.g.\\n`https://www.example.com/path?color=blue&sig=REDACTED`.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"https://www.foo.bar/search?q=OpenTelemetry#SemConv\", \"//localhost\"]\n\t},\n\t\"url.original\": {\n\t\t\"description\": \"Unmodified original URL as seen in the event source.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. This field is meant to represent the URL as it was observed, complete or not.\\n`url.original` might contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case password and username SHOULD NOT be redacted and attribute's value SHOULD remain the same.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://www.foo.bar/search?q=OpenTelemetry#SemConv\", \"search?q=OpenTelemetry\"]\n\t},\n\t\"url.path\": {\n\t\t\"description\": \"The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Sensitive content provided in `url.path` SHOULD be scrubbed when instrumentations can identify it.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"/search\"]\n\t},\n\t\"url.port\": {\n\t\t\"description\": \"Port extracted from the `url.full`\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"443\"]\n\t},\n\t\"url.query\": {\n\t\t\"description\": \"The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Sensitive content provided in `url.query` SHOULD be scrubbed when instrumentations can identify it.\\n\\n![Development](https://img.shields.io/badge/-development-blue)\\nQuery string values for the following keys SHOULD be redacted by default and replaced by the value `REDACTED`:\\n\\n* [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\\n* [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\\n* [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)\\n* [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)\\n\\nThis list is subject to change over time.\\n\\nWhen a query string value is redacted, the query string key SHOULD still be preserved, e.g.\\n`q=OpenTelemetry&sig=REDACTED`.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"q=OpenTelemetry\"]\n\t},\n\t\"url.registered_domain\": {\n\t\t\"description\": \"The highest registered url domain, stripped of the subdomain.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value can be determined precisely with the [public suffix list](https://publicsuffix.org/). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"example.com\", \"foo.co.uk\"]\n\t},\n\t\"url.scheme\": {\n\t\t\"description\": \"The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"https\",\n\t\t\t\"ftp\",\n\t\t\t\"telnet\"\n\t\t]\n\t},\n\t\"url.subdomain\": {\n\t\t\"description\": \"The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, with no trailing period.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"east\", \"sub2.sub1\"]\n\t},\n\t\"url.template\": {\n\t\t\"description\": \"The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"/users/{id}\",\n\t\t\t\"/users/:id\",\n\t\t\t\"/users?id={id}\"\n\t\t]\n\t},\n\t\"url.top_level_domain\": {\n\t\t\"description\": \"The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is `com`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value can be determined precisely with the [public suffix list](https://publicsuffix.org/).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"com\", \"co.uk\"]\n\t}\n};\nvar url_default = {\n\tnamespace: namespace$5,\n\tdescription: description$5,\n\tattributes: attributes$5\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/user.json\nvar namespace$4 = \"user\";\nvar description$4 = \"Describes information about the user.\";\nvar attributes$4 = {\n\t\"user.email\": {\n\t\t\"description\": \"User email address.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"a.einstein@example.com\"]\n\t},\n\t\"user.full_name\": {\n\t\t\"description\": \"User's full name\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Albert Einstein\"]\n\t},\n\t\"user.hash\": {\n\t\t\"description\": \"Unique user hash to correlate information for a user in anonymized form.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Useful if `user.id` or `user.name` contain confidential information and cannot be used.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"364fc68eaf4c8acec74a4e52d7d1feaa\"]\n\t},\n\t\"user.id\": {\n\t\t\"description\": \"Unique identifier of the user.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"S-1-5-21-202424912787-2692429404-2351956786-1000\"]\n\t},\n\t\"user.name\": {\n\t\t\"description\": \"Short name or login/username of the user.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"a.einstein\"]\n\t},\n\t\"user.roles\": {\n\t\t\"description\": \"Array of user roles at the time of the event.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"admin\\\",\\\"reporting_user\\\"]\"]\n\t}\n};\nvar user_default = {\n\tnamespace: namespace$4,\n\tdescription: description$4,\n\tattributes: attributes$4\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/v8js.json\nvar namespace$3 = \"v8js\";\nvar description$3 = \"Describes V8 JS Engine Runtime related attributes.\";\nvar attributes$3 = {\n\t\"v8js.gc.type\": {\n\t\t\"description\": \"The type of garbage collection.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"major\",\n\t\t\t\"minor\",\n\t\t\t\"incremental\",\n\t\t\t\"weakcb\"\n\t\t]\n\t},\n\t\"v8js.heap.space.name\": {\n\t\t\"description\": \"The name of the space type of heap memory.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Value can be retrieved from value `space_name` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics)\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"new_space\",\n\t\t\t\"old_space\",\n\t\t\t\"code_space\",\n\t\t\t\"map_space\",\n\t\t\t\"large_object_space\"\n\t\t]\n\t}\n};\nvar v8js_default = {\n\tnamespace: namespace$3,\n\tdescription: description$3,\n\tattributes: attributes$3\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/vcs.json\nvar namespace$2 = \"vcs\";\nvar description$2 = \"This group defines the attributes for [Version Control Systems (VCS)](https://wikipedia.org/wiki/Version_control).\\n\";\nvar attributes$2 = {\n\t\"vcs.repository.url.full\": {\n\t\t\"description\": \"The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In Git Version Control Systems, the canonical URL SHOULD NOT include\\nthe `.git` extension.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://github.com/opentelemetry/open-telemetry-collector-contrib\", \"https://gitlab.com/my-org/my-project/my-projects-project/repo\"]\n\t},\n\t\"vcs.repository.name\": {\n\t\t\"description\": \"The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Due to it only being the name, it can clash with forks of the same\\nrepository if collecting telemetry across multiple orgs or groups in\\nthe same backends.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"semantic-conventions\", \"my-cool-repo\"]\n\t},\n\t\"vcs.ref.base.name\": {\n\t\t\"description\": \"The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`base` refers to the starting point of a change. For example, `main`\\nwould be the base reference of type branch if you've created a new\\nreference of type branch from it and created new commits.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-feature-branch\", \"tag-1-test\"]\n\t},\n\t\"vcs.ref.base.type\": {\n\t\t\"description\": \"The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`base` refers to the starting point of a change. For example, `main`\\nwould be the base reference of type branch if you've created a new\\nreference of type branch from it and created new commits.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"branch\", \"tag\"]\n\t},\n\t\"vcs.ref.base.revision\": {\n\t\t\"description\": \"The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`base` refers to the starting point of a change. For example, `main`\\nwould be the base reference of type branch if you've created a new\\nreference of type branch from it and created new commits. The\\nrevision can be a full [hash value (see\\nglossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf),\\nof the recorded change to a ref within a repository pointing to a\\ncommit [commit](https://git-scm.com/docs/git-commit) object. It does\\nnot necessarily have to be a hash; it can simply define a [revision\\nnumber](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html)\\nwhich is an integer that is monotonically increasing. In cases where\\nit is identical to the `ref.base.name`, it SHOULD still be included.\\nIt is up to the implementer to decide which value to set as the\\nrevision based on the VCS system and situational context.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc\",\n\t\t\t\"main\",\n\t\t\t\"123\",\n\t\t\t\"HEAD\"\n\t\t]\n\t},\n\t\"vcs.ref.head.name\": {\n\t\t\"description\": \"The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`head` refers to where you are right now; the current reference at a\\ngiven time.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-feature-branch\", \"tag-1-test\"]\n\t},\n\t\"vcs.ref.head.type\": {\n\t\t\"description\": \"The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`head` refers to where you are right now; the current reference at a\\ngiven time.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"branch\", \"tag\"]\n\t},\n\t\"vcs.ref.head.revision\": {\n\t\t\"description\": \"The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`head` refers to where you are right now; the current reference at a\\ngiven time.The revision can be a full [hash value (see\\nglossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf),\\nof the recorded change to a ref within a repository pointing to a\\ncommit [commit](https://git-scm.com/docs/git-commit) object. It does\\nnot necessarily have to be a hash; it can simply define a [revision\\nnumber](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html)\\nwhich is an integer that is monotonically increasing. In cases where\\nit is identical to the `ref.head.name`, it SHOULD still be included.\\nIt is up to the implementer to decide which value to set as the\\nrevision based on the VCS system and situational context.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc\",\n\t\t\t\"main\",\n\t\t\t\"123\",\n\t\t\t\"HEAD\"\n\t\t]\n\t},\n\t\"vcs.ref.type\": {\n\t\t\"description\": \"The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"branch\", \"tag\"]\n\t},\n\t\"vcs.revision_delta.direction\": {\n\t\t\"description\": \"The type of revision comparison.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"behind\", \"ahead\"]\n\t},\n\t\"vcs.line_change.type\": {\n\t\t\"description\": \"The type of line change being measured on a branch or change.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"added\", \"removed\"]\n\t},\n\t\"vcs.change.title\": {\n\t\t\"description\": \"The human readable title of the change (pull request/merge request/changelist). This title is often a brief summary of the change and may get merged in to a ref as the commit summary.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Fixes broken thing\",\n\t\t\t\"feat: add my new feature\",\n\t\t\t\"[chore] update dependency\"\n\t\t]\n\t},\n\t\"vcs.change.id\": {\n\t\t\"description\": \"The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"123\"]\n\t},\n\t\"vcs.change.state\": {\n\t\t\"description\": \"The state of the change (pull request/merge request/changelist).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"open\",\n\t\t\t\"wip\",\n\t\t\t\"closed\",\n\t\t\t\"merged\"\n\t\t]\n\t},\n\t\"vcs.owner.name\": {\n\t\t\"description\": \"The group owner within the version control system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"my-org\",\n\t\t\t\"myteam\",\n\t\t\t\"business-unit\"\n\t\t]\n\t},\n\t\"vcs.provider.name\": {\n\t\t\"description\": \"The name of the version control system provider.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"github\",\n\t\t\t\"gitlab\",\n\t\t\t\"gittea\",\n\t\t\t\"gitea\",\n\t\t\t\"bitbucket\"\n\t\t]\n\t}\n};\nvar vcs_default = {\n\tnamespace: namespace$2,\n\tdescription: description$2,\n\tattributes: attributes$2\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/webengine.json\nvar namespace$1 = \"webengine\";\nvar description$1 = \"This document defines the attributes used to describe the packaged software running the application code.\\n\";\nvar attributes$1 = {\n\t\"webengine.name\": {\n\t\t\"description\": \"The name of the web engine.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"WildFly\"]\n\t},\n\t\"webengine.version\": {\n\t\t\"description\": \"The version of the web engine.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"21.0.0\"]\n\t},\n\t\"webengine.description\": {\n\t\t\"description\": \"Additional description of the web engine (e.g. detailed version and edition information).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final\"]\n\t}\n};\nvar webengine_default = {\n\tnamespace: namespace$1,\n\tdescription: description$1,\n\tattributes: attributes$1\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/zos.json\nvar namespace = \"zos\";\nvar description = \"This document defines attributes of a z/OS resource.\\n\";\nvar attributes = {\n\t\"zos.smf.id\": {\n\t\t\"description\": \"The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"SYS1\"]\n\t},\n\t\"zos.sysplex.name\": {\n\t\t\"description\": \"The name of the SYSPLEX to which the z/OS system belongs too.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"SYSPLEX1\"]\n\t}\n};\nvar zos_default = {\n\tnamespace,\n\tdescription,\n\tattributes\n};\n\n//#endregion\n//#region src/internal/agents/tools/otel-semantics.ts\nconst namespaceData = {\n\tandroid: android_default,\n\tapp: app_default,\n\tartifact: artifact_default,\n\taspnetcore: aspnetcore_default,\n\taws: aws_default,\n\tazure: azure_default,\n\tbrowser: browser_default,\n\tcassandra: cassandra_default,\n\tcicd: cicd_default,\n\tclient: client_default,\n\tcloud: cloud_default,\n\tcloudevents: cloudevents_default,\n\tcloudfoundry: cloudfoundry_default,\n\tcode: code_default,\n\tcontainer: container_default,\n\tcpu: cpu_default,\n\tcpython: cpython_default,\n\tdatabase: database_default,\n\tdb: db_default,\n\tdeployment: deployment_default,\n\tdestination: destination_default,\n\tdevice: device_default,\n\tdisk: disk_default,\n\tdns: dns_default,\n\tdotnet: dotnet_default,\n\telasticsearch: elasticsearch_default,\n\tenduser: enduser_default,\n\terror: error_default,\n\tfaas: faas_default,\n\tfeature_flags: feature_flags_default,\n\tfile: file_default,\n\tgcp: gcp_default,\n\tgen_ai: gen_ai_default,\n\tgeo: geo_default,\n\tgo: go_default,\n\tgraphql: graphql_default,\n\thardware: hardware_default,\n\theroku: heroku_default,\n\thost: host_default,\n\thttp: http_default,\n\tios: ios_default,\n\tjvm: jvm_default,\n\tk8s: k8s_default,\n\tlinux: linux_default,\n\tlog: log_default,\n\tmcp: mcp_default,\n\tmessaging: messaging_default,\n\tnetwork: network_default,\n\tnodejs: nodejs_default,\n\toci: oci_default,\n\topentracing: opentracing_default,\n\tos: os_default,\n\totel: otel_default,\n\tpeer: peer_default,\n\tprocess: process_default,\n\tprofile: profile_default,\n\trpc: rpc_default,\n\tserver: server_default,\n\tservice: service_default,\n\tsession: session_default,\n\tsignalr: signalr_default,\n\tsource: source_default,\n\tsystem: system_default,\n\ttelemetry: telemetry_default,\n\ttest: test_default,\n\tthread: thread_default,\n\ttls: tls_default,\n\turl: url_default,\n\tuser: user_default,\n\tv8js: v8js_default,\n\tvcs: vcs_default,\n\twebengine: webengine_default,\n\tzos: zos_default\n};\n/**\n* Lookup OpenTelemetry semantic convention attributes for a given namespace\n*/\nasync function lookupOtelSemantics(namespace$73, dataset, apiService, organizationSlug, projectId) {\n\tconst normalizedNamespace = namespace$73.replace(/-/g, \"_\");\n\tconst data = namespaceData[normalizedNamespace];\n\tif (!data) {\n\t\tconst allNamespaces = Object.keys(namespaceData);\n\t\tconst suggestions = allNamespaces.filter((ns) => ns.includes(namespace$73) || namespace$73.includes(ns)).slice(0, 3);\n\t\treturn suggestions.length > 0 ? `Namespace '${namespace$73}' not found. Did you mean: ${suggestions.join(\", \")}?` : `Namespace '${namespace$73}' not found. Use 'list' to see all available namespaces.`;\n\t}\n\tlet response = `# OpenTelemetry Semantic Conventions: ${data.namespace}\\n\\n`;\n\tresponse += `${data.description}\\n\\n`;\n\tif (data.custom) response += \"**Note:** This is a custom namespace, not part of standard OpenTelemetry conventions.\\n\\n\";\n\tconst attributes$73 = Object.entries(data.attributes);\n\trecordAgentToolResultCount(attributes$73.length);\n\tresponse += `## Attributes (${attributes$73.length} total)\\n\\n`;\n\tconst sortedAttributes = attributes$73.sort(([a], [b]) => a.localeCompare(b));\n\tfor (const [key, attr] of sortedAttributes) {\n\t\tresponse += `### \\`${key}\\`\\n`;\n\t\tresponse += `- **Type:** ${attr.type}\\n`;\n\t\tresponse += `- **Description:** ${attr.description}\\n`;\n\t\tif (attr.stability) response += `- **Stability:** ${attr.stability}\\n`;\n\t\tif (attr.examples && attr.examples.length > 0) response += `- **Examples:** ${attr.examples.map((ex) => `\\`${typeof ex === \"object\" ? JSON.stringify(ex) : String(ex)}\\``).join(\", \")}\\n`;\n\t\tif (attr.note) response += `- **Note:** ${attr.note}\\n`;\n\t\tresponse += \"\\n\";\n\t}\n\treturn response;\n}\n/**\n* Create the otel-semantics-lookup tool for AI agents\n*/\n/**\n* Create a tool for looking up OpenTelemetry semantic convention attributes\n* The tool is pre-bound with the API service and organization configured for the appropriate region\n*/\nfunction createOtelLookupTool(options) {\n\tconst { apiService, organizationSlug, projectId } = options;\n\treturn agentTool({\n\t\tdescription: \"Look up OpenTelemetry semantic convention attributes for a specific namespace. OpenTelemetry attributes are universal standards that work across all datasets.\",\n\t\tparameters: z.object({\n\t\t\tnamespace: z.string().describe(\"The OpenTelemetry namespace to look up (e.g., 'gen_ai', 'db', 'http', 'mcp')\"),\n\t\t\tdataset: z.enum(PUBLIC_EVENTS_DATASETS).describe(\"REQUIRED: Dataset to check attribute availability in. The agent MUST specify this based on their chosen dataset.\")\n\t\t}),\n\t\texecute: async ({ namespace: namespace$73, dataset }) => {\n\t\t\treturn await lookupOtelSemantics(namespace$73, dataset, apiService, organizationSlug, projectId);\n\t\t}\n\t});\n}\n\n//#endregion\nexport { createOtelLookupTool, lookupOtelSemantics };\n//# sourceMappingURL=otel-semantics-DGeu0HI-.js.map","import { agentTool } from \"./utils-DHwF0RI3.js\";\nimport { z } from \"zod\";\n\n//#region src/internal/agents/tools/whoami.ts\n/**\n* Get the current authenticated user's information from Sentry API\n*/\nasync function getCurrentUser(apiService) {\n\tconst user = await apiService.getAuthenticatedUser();\n\treturn {\n\t\tid: user.id,\n\t\tname: user.name,\n\t\temail: user.email\n\t};\n}\n/**\n* Create a tool for getting current user information\n* The tool is pre-bound with the API service configured for the appropriate region\n*/\nfunction createWhoamiTool(options) {\n\tconst { apiService } = options;\n\treturn agentTool({\n\t\tdescription: \"Get the current authenticated user's information\",\n\t\tparameters: z.object({}),\n\t\texecute: async () => {\n\t\t\tconst user = await getCurrentUser(apiService);\n\t\t\treturn `Current user: ${user.name || \"Unknown\"} (${user.email}, ID: ${user.id})`;\n\t\t}\n\t});\n}\n\n//#endregion\nexport { createWhoamiTool, getCurrentUser };\n//# sourceMappingURL=whoami-DU_KhHDm.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { PUBLIC_EVENTS_DATASETS, normalizeEventsDataset } from \"./events-datasets-Cu37u43g.js\";\nimport { isPlainObject } from \"./type-guards-DHLAzjf2.js\";\nimport { formatUserGeoSummary } from \"./user-formatting-BrX0Xi05.js\";\nimport { agentTool, recordAgentToolResultCount } from \"./utils-DHwF0RI3.js\";\nimport { z } from \"zod\";\nimport { getActiveSpan } from \"@sentry/core\";\n\n//#region src/tools/support/search-events/utils.ts\nconst DEFAULT_MAX_VALUE_LENGTH = 200;\nconst DEFAULT_MAX_ARRAY_ITEMS = 20;\nconst SENTRY_SEARCH_TOKEN_PATTERN = /(^|\\s)!?([A-Za-z_][A-Za-z0-9_.[\\],-]*):(?=\\S)(?!\\/\\/)/g;\nconst KNOWN_SENTRY_SEARCH_KEYS = new Set([\n\t\"browser\",\n\t\"device\",\n\t\"duration\",\n\t\"environment\",\n\t\"error.type\",\n\t\"http.status_code\",\n\t\"issue\",\n\t\"level\",\n\t\"message\",\n\t\"os\",\n\t\"project\",\n\t\"release\",\n\t\"severity\",\n\t\"span.action\",\n\t\"span.description\",\n\t\"span.module\",\n\t\"span.op\",\n\t\"span.status\",\n\t\"timestamp\",\n\t\"trace\",\n\t\"transaction\",\n\t\"transaction.duration\",\n\t\"transaction.op\",\n\t\"url\",\n\t\"user\",\n\t\"user.email\",\n\t\"user.id\",\n\t\"user.username\"\n]);\nfunction getStringValue(event, key, defaultValue = \"\") {\n\tconst value = event[key];\n\treturn typeof value === \"string\" ? value : defaultValue;\n}\nfunction getNumberValue(event, key) {\n\tconst value = event[key];\n\treturn typeof value === \"number\" ? value : void 0;\n}\nfunction isAggregateQuery(fields) {\n\treturn fields.some((field) => field.includes(\"(\") && field.includes(\")\"));\n}\nfunction looksLikeSentrySearchSyntax(query) {\n\tconst trimmedQuery = query?.trim();\n\tif (!trimmedQuery) return false;\n\tfor (const match of trimmedQuery.matchAll(SENTRY_SEARCH_TOKEN_PATTERN)) {\n\t\tconst key = match[2];\n\t\tif (!key) continue;\n\t\tif (/^tags\\[[^\\]]+\\]$/.test(key)) return true;\n\t\tif (key !== key.toLowerCase()) continue;\n\t\tif (KNOWN_SENTRY_SEARCH_KEYS.has(key) || /[.[\\],]/.test(key)) return true;\n\t\tif (/^[a-z_][a-z0-9_-]*$/.test(key)) return true;\n\t}\n\treturn false;\n}\nconst FULL_TEXT_SEARCH_KEYS = new Set([\"message\", \"log.body\"]);\n/**\n* Replace quoted regions with same-length placeholders so colons inside quotes\n* are not treated as filter-key separators (e.g. transaction:\"handle message:hello\").\n* Length is preserved so offsets still map back to the original query.\n*/\nfunction maskQuotedRegions(query) {\n\tlet out = \"\";\n\tlet quote = null;\n\tlet escaped = false;\n\tfor (const char of query) {\n\t\tif (escaped) {\n\t\t\tescaped = false;\n\t\t\tout += quote ? \"x\" : char;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\\\") {\n\t\t\tescaped = true;\n\t\t\tout += quote ? \"x\" : char;\n\t\t\tcontinue;\n\t\t}\n\t\tif (quote) {\n\t\t\tif (char === quote) {\n\t\t\t\tquote = null;\n\t\t\t\tout += char;\n\t\t\t} else out += char === \":\" || /\\s/.test(char) ? \"x\" : char;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\"\" || char === \"'\") {\n\t\t\tquote = char;\n\t\t\tout += char;\n\t\t\tcontinue;\n\t\t}\n\t\tout += char;\n\t}\n\treturn out;\n}\nfunction normalizeFilterValue(rawValue) {\n\treturn rawValue.replace(/^['\"]|['\"]$/g, \"\").replace(/^\\*+|\\*+$/g, \"\").trim().toLowerCase();\n}\n/**\n* Read one filter value starting at `valueStart` in the original query.\n* Quoted values keep interior whitespace; unquoted values stop at whitespace.\n*/\nfunction readRawFilterValue(query, valueStart) {\n\tif (valueStart >= query.length) return void 0;\n\tconst first = query[valueStart];\n\tif (first === \"\\\"\" || first === \"'\") {\n\t\tlet escaped = false;\n\t\tfor (let i = valueStart + 1; i < query.length; i += 1) {\n\t\t\tconst char = query[i];\n\t\t\tif (escaped) {\n\t\t\t\tescaped = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (char === \"\\\\\") {\n\t\t\t\tescaped = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (char === first) return query.slice(valueStart, i + 1);\n\t\t}\n\t\treturn query.slice(valueStart);\n\t}\n\tconst valueMatch = query.slice(valueStart).match(/^\\S+/);\n\treturn valueMatch?.[0];\n}\n/**\n* Extract every field:value occurrence while preserving multiplicity and quote\n* boundaries. Values are normalized for comparison (strip wrapping quotes and\n* leading/trailing wildcards).\n*/\nfunction searchFilterOccurrences(query) {\n\tconst occurrences = [];\n\tconst masked = maskQuotedRegions(query);\n\tfor (const match of masked.matchAll(SENTRY_SEARCH_TOKEN_PATTERN)) {\n\t\tconst key = match[2]?.toLowerCase();\n\t\tif (!key || match.index === void 0) continue;\n\t\tconst valueStart = match.index + match[0].indexOf(\":\") + 1;\n\t\tconst rawValue = readRawFilterValue(query, valueStart);\n\t\tif (!rawValue) continue;\n\t\tconst value = normalizeFilterValue(rawValue);\n\t\tif (!value) continue;\n\t\toccurrences.push({\n\t\t\tkey,\n\t\t\tvalue\n\t\t});\n\t}\n\treturn occurrences;\n}\nfunction structuredFilterOccurrences(query) {\n\treturn searchFilterOccurrences(query).filter((occurrence) => !FULL_TEXT_SEARCH_KEYS.has(occurrence.key));\n}\nfunction fullTextFilterValues(query) {\n\treturn searchFilterOccurrences(query).filter((occurrence) => FULL_TEXT_SEARCH_KEYS.has(occurrence.key)).map((occurrence) => occurrence.value);\n}\nfunction filterOccurrenceIdentity(occurrence) {\n\treturn `${occurrence.key}\\0${occurrence.value}`;\n}\nfunction escapeRegExp(value) {\n\treturn value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n/**\n* True when `needle` appears in `haystack` as a whole token, not a bare\n* substring. Prevents `id:1` from matching inside `message:\"error 401\"`.\n*/\nfunction containsAsWholeToken(haystack, needle) {\n\tif (!haystack || !needle) return false;\n\tif (haystack === needle) return true;\n\tconst escaped = escapeRegExp(needle);\n\treturn (/* @__PURE__ */ new RegExp(`(?:^|[^A-Za-z0-9_])${escaped}(?:$|[^A-Za-z0-9_])`)).test(haystack);\n}\nfunction isRelatedFilterValue(left, right) {\n\treturn containsAsWholeToken(left, right) || containsAsWholeToken(right, left);\n}\n/**\n* Structured filters present in `original` that are not covered by multiset\n* cardinality in `repaired` (same key+value pair counts).\n*/\nfunction unmatchedStructuredFilters(original, repaired) {\n\tconst remaining = /* @__PURE__ */ new Map();\n\tfor (const occurrence of repaired) {\n\t\tconst identity = filterOccurrenceIdentity(occurrence);\n\t\tremaining.set(identity, (remaining.get(identity) ?? 0) + 1);\n\t}\n\tconst unmatched = [];\n\tfor (const occurrence of original) {\n\t\tconst identity = filterOccurrenceIdentity(occurrence);\n\t\tconst count = remaining.get(identity) ?? 0;\n\t\tif (count > 0) {\n\t\t\tremaining.set(identity, count - 1);\n\t\t\tcontinue;\n\t\t}\n\t\tunmatched.push(occurrence);\n\t}\n\treturn unmatched;\n}\n/**\n* True when a structured field:value filter was replaced with message/log.body\n* full-text matching (false-success path). Allows real attribute renames.\n*\n* Uses multiset key+value matching so dropping one of several identical keys\n* (e.g. `custom:foo custom:bar` → `custom:bar message:\"*foo*\"`) is still caught.\n* Value comparison is whole-token, not bare substring, so unrelated full-text\n* (e.g. `id:1` vs `message:\"error 401\"`) is not treated as a downgrade.\n*/\nfunction isSemanticFilterDowngrade(originalQuery, repairedQuery) {\n\tif (!looksLikeSentrySearchSyntax(originalQuery)) return false;\n\tconst originalFilters = structuredFilterOccurrences(originalQuery);\n\tif (originalFilters.length === 0) return false;\n\tconst repairedFilters = structuredFilterOccurrences(repairedQuery);\n\tconst droppedFilters = unmatchedStructuredFilters(originalFilters, repairedFilters);\n\tif (droppedFilters.length === 0) return false;\n\tconst repairedFullTextValues = fullTextFilterValues(repairedQuery);\n\tif (repairedFullTextValues.length === 0) return false;\n\treturn droppedFilters.some((filter) => repairedFullTextValues.some((fullTextValue) => isRelatedFilterValue(filter.value, fullTextValue)));\n}\nfunction isPrimitive(value) {\n\treturn value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction isTagPair(value) {\n\treturn isPlainObject(value) && typeof value.key === \"string\" && \"value\" in value;\n}\nconst USER_FIELDS = [\n\t\"id\",\n\t\"email\",\n\t\"username\",\n\t\"ip_address\",\n\t\"name\",\n\t\"display_name\"\n];\nconst USER_IDENTITY_FIELDS = new Set([\n\t\"email\",\n\t\"username\",\n\t\"ip_address\",\n\t\"name\",\n\t\"display_name\"\n]);\nfunction hasUserIdentityFields(value) {\n\treturn USER_FIELDS.some((f) => USER_IDENTITY_FIELDS.has(f) && value[f] != null);\n}\nfunction hasUserSummaryFields(value, options = {}) {\n\treturn hasUserIdentityFields(value) || options.allowId === true && value.id != null;\n}\nfunction formatUserSummary(value, options = {}) {\n\tconst includeGeo = options.includeGeo ?? true;\n\tconst allowIdOnly = options.allowIdOnly ?? false;\n\tconst hasSummaryField = hasUserSummaryFields(value, { allowId: allowIdOnly });\n\tif (!hasSummaryField) return null;\n\tconst parts = USER_FIELDS.filter((f) => value[f] != null).map((f) => `${f}=${formatSimpleValue(value[f])}`);\n\tconst geoSummary = formatUserGeoSummary(value.geo);\n\tif (includeGeo && geoSummary) parts.push(`geo=${geoSummary}`);\n\treturn parts.length > 0 ? parts.join(\", \") : null;\n}\nfunction formatKnownUserValue(value, options = {}) {\n\treturn formatUserSummary(value, {\n\t\tincludeGeo: options.includeGeo,\n\t\tallowIdOnly: true\n\t});\n}\nfunction sanitizeWhitespace(value) {\n\treturn value.replace(/\\s+/g, \" \").trim();\n}\nfunction truncateString(value, maxLength) {\n\tif (value.length <= maxLength) return value;\n\tif (maxLength <= 3) return value.slice(0, maxLength);\n\treturn `${value.slice(0, maxLength - 3)}...`;\n}\nfunction safeJsonStringify(value) {\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\treturn JSON.stringify(value, (_key, currentValue) => {\n\t\tif (typeof currentValue === \"bigint\") return currentValue.toString();\n\t\tif (typeof currentValue === \"function\") return \"[Function]\";\n\t\tif (typeof currentValue === \"object\" && currentValue !== null) {\n\t\t\tif (seen.has(currentValue)) return \"[Circular]\";\n\t\t\tseen.add(currentValue);\n\t\t}\n\t\treturn currentValue;\n\t});\n}\nfunction formatSimpleValue(value) {\n\tif (value === null) return \"null\";\n\tif (value === void 0) return \"undefined\";\n\tif (typeof value === \"string\") return value;\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\treturn safeJsonStringify(value);\n}\nfunction formatArrayValue(values, maxLength) {\n\tif (values.length === 0) return \"[]\";\n\tif (values.every(isTagPair)) {\n\t\tconst pairs = values.map((tag) => `${tag.key}=${formatSimpleValue(tag.value)}`);\n\t\treturn truncateString(sanitizeWhitespace(pairs.join(\", \")), maxLength);\n\t}\n\tif (values.every(isPrimitive)) return truncateString(sanitizeWhitespace(values.map((value) => String(value)).join(\", \")), maxLength);\n\tconst overflow = values.length > DEFAULT_MAX_ARRAY_ITEMS;\n\tconst limitedValues = overflow ? values.slice(0, DEFAULT_MAX_ARRAY_ITEMS) : values;\n\tconst jsonValue = safeJsonStringify(limitedValues);\n\tconst suffix = overflow ? `, ...+${values.length - DEFAULT_MAX_ARRAY_ITEMS} more` : \"\";\n\treturn truncateString(sanitizeWhitespace(`${jsonValue}${suffix}`), maxLength);\n}\nfunction formatObjectValue(value, maxLength) {\n\tif (isTagPair(value)) return truncateString(sanitizeWhitespace(`${value.key}=${formatSimpleValue(value.value)}`), maxLength);\n\tconst userSummary = formatUserSummary(value);\n\tif (userSummary) return truncateString(sanitizeWhitespace(userSummary), maxLength);\n\treturn truncateString(sanitizeWhitespace(safeJsonStringify(value)), maxLength);\n}\nfunction formatEventValue(value, options = {}) {\n\tconst maxLength = options.maxLength ?? DEFAULT_MAX_VALUE_LENGTH;\n\tif (value === null) return \"null\";\n\tif (value === void 0) return \"undefined\";\n\tif (typeof value === \"string\") return truncateString(sanitizeWhitespace(value), maxLength);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\tif (Array.isArray(value)) return formatArrayValue(value, maxLength);\n\tif (isPlainObject(value)) return formatObjectValue(value, maxLength);\n\treturn truncateString(sanitizeWhitespace(String(value)), maxLength);\n}\nasync function fetchCustomAttributes(apiService, organizationSlug, dataset, projectId, timeParams, options = {}) {\n\tconst customAttributes = {};\n\tconst fieldTypes = {};\n\tconst normalizedDataset = normalizeEventsDataset(dataset);\n\tconst attributeTimeParams = timeParams ?? { statsPeriod: \"14d\" };\n\tif (normalizedDataset === \"errors\") {\n\t\tconst tagsResponse = await apiService.listTags({\n\t\t\torganizationSlug,\n\t\t\tdataset: \"events\",\n\t\t\tproject: projectId,\n\t\t\tstatsPeriod: attributeTimeParams.statsPeriod,\n\t\t\tstart: attributeTimeParams.start,\n\t\t\tend: attributeTimeParams.end,\n\t\t\tuseCache: true,\n\t\t\tuseFlagsBackend: true\n\t\t});\n\t\tfor (const tag of tagsResponse) if (tag.key && !tag.key.startsWith(\"sentry:\")) customAttributes[tag.key] = tag.name || tag.key;\n\t} else if (normalizedDataset === \"profiles\") return {\n\t\tattributes: customAttributes,\n\t\tfieldTypes\n\t};\n\telse {\n\t\tconst itemType = getTraceItemType(normalizedDataset);\n\t\tif (!itemType) return {\n\t\t\tattributes: customAttributes,\n\t\t\tfieldTypes\n\t\t};\n\t\tconst attributesResponse = await apiService.listTraceItemAttributes({\n\t\t\torganizationSlug,\n\t\t\titemType,\n\t\t\tproject: projectId,\n\t\t\tstatsPeriod: attributeTimeParams.statsPeriod,\n\t\t\tstart: attributeTimeParams.start,\n\t\t\tend: attributeTimeParams.end,\n\t\t\tattributeTypes: options.attributeTypes,\n\t\t\tsubstringMatch: options.substringMatch,\n\t\t\tquery: options.query\n\t\t});\n\t\tfor (const attr of attributesResponse) if (attr.key && !attr.key.startsWith(\"sentry:\")) {\n\t\t\tcustomAttributes[attr.key] = attr.name || attr.key;\n\t\t\tif (attr.type) fieldTypes[attr.key] = attr.type;\n\t\t}\n\t}\n\treturn {\n\t\tattributes: customAttributes,\n\t\tfieldTypes\n\t};\n}\nfunction getTraceItemType(dataset) {\n\tconst normalizedDataset = normalizeEventsDataset(dataset);\n\tif (normalizedDataset === \"logs\") return \"logs\";\n\tif (normalizedDataset === \"tracemetrics\") return \"tracemetrics\";\n\tif (normalizedDataset === \"spans\") return \"spans\";\n\treturn null;\n}\nfunction formatValidationStatusLine({ valid, name, type, error, indent = 0 }) {\n\tconst status = valid ? \"OK\" : \"INVALID\";\n\tconst label = name ? ` ${name}` : \"\";\n\tconst prefix = `${\" \".repeat(indent)}- ${status}${label}`;\n\tif (valid && type) return `${prefix} — type: ${type}`;\n\tif (error) return `${prefix} — ${error}`;\n\treturn prefix;\n}\nfunction formatQueryValidation(query, failuresOnly) {\n\tconst invalidFields = query.fields.filter((field) => !field.valid);\n\tconst visibleFields = failuresOnly ? invalidFields : query.fields;\n\tconst showQueryLine = failuresOnly ? !query.valid || invalidFields.length > 0 : !query.valid || query.fields.length > 0;\n\tif (!showQueryLine) return [];\n\tconst lines = [];\n\tif (!query.valid) lines.push(formatValidationStatusLine({\n\t\tvalid: false,\n\t\tname: \"query\",\n\t\terror: query.error\n\t}));\n\telse lines.push(formatValidationStatusLine({\n\t\tvalid: true,\n\t\tname: \"query\"\n\t}));\n\tlines.push(...visibleFields.map((field) => formatValidationStatusLine({\n\t\t...field,\n\t\tindent: 2\n\t})));\n\treturn lines;\n}\nfunction pushValidationSection(sections, title, items, failuresOnly) {\n\tconst visibleItems = failuresOnly ? items.filter((item) => !item.valid) : items;\n\tif (visibleItems.length === 0) return;\n\tsections.push(`Validated ${title}:\\n${visibleItems.map((item) => formatValidationStatusLine(item)).join(\"\\n\")}`);\n}\nfunction formatEventsValidationResults(validationResults) {\n\tconst failuresOnly = !validationResults.valid;\n\tconst sections = [];\n\tpushValidationSection(sections, \"Projects\", validationResults.projects, failuresOnly);\n\tpushValidationSection(sections, \"Dataset\", validationResults.dataset, failuresOnly);\n\tpushValidationSection(sections, \"Environment\", validationResults.environment, failuresOnly);\n\tpushValidationSection(sections, \"Fields\", validationResults.field, failuresOnly);\n\tconst queryLines = formatQueryValidation(validationResults.query, failuresOnly);\n\tif (queryLines.length > 0) sections.push(`Validated Query:\\n${queryLines.join(\"\\n\")}`);\n\tpushValidationSection(sections, \"Order By\", validationResults.orderby, failuresOnly);\n\tif (sections.length === 0) return \"\";\n\tconst overall = validationResults.valid ? \"valid\" : \"invalid\";\n\tconst details = sections.join(\"\\n\\n\");\n\treturn `Validation Result: ${overall}\\n${details}\\n`;\n}\nconst VALIDATION_OUTPUT_MAX_LENGTH = 1024;\nfunction truncateValidationOutput(output) {\n\tif (output.length <= VALIDATION_OUTPUT_MAX_LENGTH) return output;\n\treturn `${output.slice(0, VALIDATION_OUTPUT_MAX_LENGTH)}…`;\n}\nfunction recordEventsSearchValidationTelemetry({ attempt, repairIteration, validation }) {\n\tconst span = getActiveSpan();\n\tif (!span) return;\n\tspan.setAttribute(\"app.search_events.validation.attempt\", attempt);\n\tspan.setAttribute(\"app.search_events.validation.valid\", validation.valid);\n\tif (repairIteration !== void 0) span.setAttribute(\"app.search_events.validation.repair_iteration\", repairIteration);\n\tconst formatted = formatEventsValidationResults(validation);\n\tif (formatted) span.setAttribute(\"app.search_events.validation.output\", truncateValidationOutput(formatted));\n}\nasync function validateEventsSearch(apiService, { organizationSlug, dataset, fields, query, sort, projectId, environment, statsPeriod, start, end }) {\n\treturn apiService.validateEvents({\n\t\torganizationSlug,\n\t\tdataset,\n\t\tfields,\n\t\tquery,\n\t\torderby: [sort],\n\t\tproject: projectId,\n\t\tenvironment,\n\t\tstatsPeriod,\n\t\tstart,\n\t\tend\n\t});\n}\nasync function assertEventsSearchIsValid(apiService, { organizationSlug, dataset, fields, query, sort, projectId, environment, statsPeriod, start, end }) {\n\tconst validationResults = await validateEventsSearch(apiService, {\n\t\torganizationSlug,\n\t\tdataset,\n\t\tfields,\n\t\tquery,\n\t\tsort,\n\t\tprojectId,\n\t\tenvironment,\n\t\tstatsPeriod,\n\t\tstart,\n\t\tend\n\t});\n\tif (!validationResults.valid) {\n\t\tconst formatted = formatEventsValidationResults(validationResults);\n\t\tthrow new UserInputError(formatted ? `Search validation failed:\\n${formatted}` : \"Search validation failed.\");\n\t}\n}\n/**\n* Create a tool for the agent to query available attributes by dataset\n* The tool is pre-bound with the API service and organization configured for the appropriate region\n*/\nfunction createDatasetAttributesTool(options) {\n\tconst { apiService, organizationSlug, projectId } = options;\n\tconst traceItemAttributeTypeSchema = z.enum([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"boolean\"\n\t]);\n\treturn agentTool({\n\t\tdescription: \"Query and filter available attributes and fields for a specific Sentry dataset to understand what data is available\",\n\t\tparameters: z.object({\n\t\t\tdataset: z.enum(PUBLIC_EVENTS_DATASETS).describe(\"The dataset to query attributes for\"),\n\t\t\tsubstringMatch: z.string().trim().min(1).optional().describe(\"Optional substring to find matching attribute names\"),\n\t\t\tquery: z.string().trim().min(1).optional().describe(\"Optional Sentry search query to list attributes available for that filtered result set\"),\n\t\t\tattributeTypes: z.array(traceItemAttributeTypeSchema).min(1).optional().describe(\"Optional attribute types to list. Use ['string','number','boolean'] when unsure.\")\n\t\t}),\n\t\texecute: async ({ dataset, substringMatch, query, attributeTypes }) => {\n\t\t\tconst { BASE_COMMON_FIELDS, DATASET_FIELDS, RECOMMENDED_FIELDS, NUMERIC_FIELDS, DATASET_EXAMPLES } = await import(\"./tools/support/search-events/config.js\");\n\t\t\tconst normalizedDataset = normalizeEventsDataset(dataset);\n\t\t\tconst attributeTimeParams = { statsPeriod: \"14d\" };\n\t\t\tconst { attributes: customAttributes, fieldTypes } = await fetchCustomAttributes(apiService, organizationSlug, dataset, projectId, attributeTimeParams, {\n\t\t\t\tattributeTypes,\n\t\t\t\tsubstringMatch,\n\t\t\t\tquery\n\t\t\t});\n\t\t\tconst allFields = {\n\t\t\t\t...BASE_COMMON_FIELDS,\n\t\t\t\t...DATASET_FIELDS[normalizedDataset],\n\t\t\t\t...customAttributes\n\t\t\t};\n\t\t\tconst fieldCount = Object.keys(allFields).length;\n\t\t\tconst recommendedFields = RECOMMENDED_FIELDS[normalizedDataset];\n\t\t\tconst allFieldTypes = { ...fieldTypes };\n\t\t\tconst staticNumericFields = NUMERIC_FIELDS[normalizedDataset] || /* @__PURE__ */ new Set();\n\t\t\tfor (const field of staticNumericFields) allFieldTypes[field] = \"number\";\n\t\t\trecordAgentToolResultCount(fieldCount);\n\t\t\treturn `Dataset: ${dataset}\n\nAvailable Fields (${fieldCount} total):\n${Object.entries(allFields).slice(0, 50).map(([key, desc]) => `- ${key}: ${desc}`).join(\"\\n\")}\n${fieldCount > 50 ? `\\n... and ${fieldCount - 50} more fields` : \"\"}\n\nRecommended Fields for ${dataset}:\n${recommendedFields.basic.map((f) => `- ${f}`).join(\"\\n\")}\n\nField Types (CRITICAL for aggregate functions):\n${Object.entries(allFieldTypes).slice(0, 30).map(([key, type]) => `- ${key}: ${type}`).join(\"\\n\")}\n${Object.keys(allFieldTypes).length > 30 ? `\\n... and ${Object.keys(allFieldTypes).length - 30} more fields` : \"\"}\n\nIMPORTANT: Only use numeric aggregate functions (avg, sum, min, max, percentiles) with numeric fields. Use count() or count_unique() for non-numeric fields.\n\nEXAMPLE QUERIES FOR ${dataset.toUpperCase()}:\n${DATASET_EXAMPLES[normalizedDataset].map((ex) => `- \"${ex.description}\" →\\n  ${JSON.stringify(ex.output)}`).join(\"\\n\\n\")}\n\nUse these examples as patterns for constructing your query.`;\n\t\t}\n\t});\n}\n/**\n* Create a tool for the agent to validate a candidate events search before returning.\n* Prefer this over external try/fail/retry orchestration in the tool handler.\n*/\nfunction createValidateEventsSearchTool(options) {\n\tconst { apiService, organizationSlug, projectId } = options;\n\treturn agentTool({\n\t\tdescription: \"Validate a candidate Sentry events search before returning it. Call this after constructing dataset/query/fields/sort. If invalid, fix the request and validate again. Never replace a structured field:value filter with message/log.body full-text matching.\",\n\t\tparameters: z.object({\n\t\t\tdataset: z.enum(PUBLIC_EVENTS_DATASETS).describe(\"Dataset for the candidate search\"),\n\t\t\tquery: z.string().describe(\"Candidate Sentry search query string (may be empty)\"),\n\t\t\tfields: z.array(z.string()).min(1).describe(\"Candidate fields, including any aggregate functions and sort field\"),\n\t\t\tsort: z.string().min(1).describe(\"Candidate sort parameter\"),\n\t\t\tstatsPeriod: z.string().optional().describe(\"Optional relative time period like 1h, 24h, 7d\"),\n\t\t\tstart: z.string().optional().describe(\"Optional ISO 8601 start time\"),\n\t\t\tend: z.string().optional().describe(\"Optional ISO 8601 end time\"),\n\t\t\tenvironment: z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]).optional().describe(\"Optional environment filter. Prefer query filters for non-replay datasets.\")\n\t\t}),\n\t\texecute: async ({ dataset, query, fields, sort, statsPeriod, start, end, environment }) => {\n\t\t\tconst validation = await validateEventsSearch(apiService, {\n\t\t\t\torganizationSlug,\n\t\t\t\tdataset,\n\t\t\t\tfields,\n\t\t\t\tquery,\n\t\t\t\tsort,\n\t\t\t\tprojectId,\n\t\t\t\tenvironment,\n\t\t\t\tstatsPeriod,\n\t\t\t\tstart,\n\t\t\t\tend\n\t\t\t});\n\t\t\trecordEventsSearchValidationTelemetry({\n\t\t\t\tattempt: 0,\n\t\t\t\tvalidation\n\t\t\t});\n\t\t\tif (validation.valid) return {\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: \"Search validation passed.\"\n\t\t\t};\n\t\t\tconst formatted = formatEventsValidationResults(validation);\n\t\t\treturn {\n\t\t\t\tvalid: false,\n\t\t\t\tmessage: formatted ? `Search validation failed:\\n${formatted}` : \"Search validation failed.\"\n\t\t\t};\n\t\t}\n\t});\n}\n\n//#endregion\nexport { assertEventsSearchIsValid, createDatasetAttributesTool, createValidateEventsSearchTool, fetchCustomAttributes, formatEventValue, formatEventsValidationResults, formatKnownUserValue, getNumberValue, getStringValue, isAggregateQuery, isSemanticFilterDowngrade, looksLikeSentrySearchSyntax, recordEventsSearchValidationTelemetry, validateEventsSearch };\n//# sourceMappingURL=utils-Dg2aeBEb.js.map","import { PUBLIC_EVENTS_DATASETS } from \"./events-datasets-Cu37u43g.js\";\nimport { callEmbeddedAgent } from \"./callEmbeddedAgent-ffwEeqdP.js\";\nimport { createDatasetFieldsTool } from \"./dataset-fields-CBauoBBr.js\";\nimport { createOtelLookupTool } from \"./otel-semantics-DGeu0HI-.js\";\nimport { createWhoamiTool } from \"./whoami-DU_KhHDm.js\";\nimport { systemPrompt } from \"./config-BqCCImAX.js\";\nimport { createDatasetAttributesTool, createValidateEventsSearchTool } from \"./utils-Dg2aeBEb.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/support/search-events/agent.ts\nconst SEARCH_EVENTS_DATASETS = [...PUBLIC_EVENTS_DATASETS, \"replays\"];\nconst searchEventsAgentOutputSchema = z.object({\n\tdataset: z.enum(SEARCH_EVENTS_DATASETS).describe(\"Which dataset to use for the query\"),\n\tquery: z.string().describe(\"The Sentry query string for filtering results\"),\n\tfields: z.array(z.string()).describe(\"Array of field names to return in results.\"),\n\tsort: z.string().describe(\"Sort parameter for results.\"),\n\tenvironment: z.union([z.string(), z.array(z.string()).min(1)]).nullable().default(null).describe(\"Separate environment filter for datasets like replays that do not support environment in the query string. Use a string for one environment or an array when multiple environments are requested.\"),\n\ttimeRange: z.union([\n\t\tz.object({ statsPeriod: z.string().describe(\"Relative time period like '1h', '24h', '7d'\") }),\n\t\tz.object({\n\t\t\tstart: z.string().describe(\"ISO 8601 start time\"),\n\t\t\tend: z.string().describe(\"ISO 8601 end time\")\n\t\t}),\n\t\tz.null()\n\t]).describe(\"Time range for filtering events. Use either statsPeriod for relative time or start/end for absolute time.\"),\n\texplanation: z.string().default(\"\").describe(\"Brief explanation of how you translated this query.\")\n}).refine((data) => {\n\tif (data.dataset === \"replays\") return true;\n\tif (!data.sort || !data.fields || data.fields.length === 0) return true;\n\tconst sortField = data.sort.startsWith(\"-\") ? data.sort.substring(1) : data.sort;\n\treturn data.fields.includes(sortField);\n}, { message: \"Sort field must be included in the fields array. Sentry requires that any field used for sorting must also be explicitly selected. Add the sort field to the fields array or choose a different sort field that's already included.\" });\n/**\n* Search events agent - single entry point for translating natural language queries to Sentry search syntax\n* This returns both the translated query result AND the tool calls made by the agent\n*/\nasync function searchEventsAgent(options) {\n\tconst datasetAttributesTool = createDatasetAttributesTool({\n\t\tapiService: options.apiService,\n\t\torganizationSlug: options.organizationSlug,\n\t\tprojectId: options.projectId\n\t});\n\tconst validateSearchTool = createValidateEventsSearchTool({\n\t\tapiService: options.apiService,\n\t\torganizationSlug: options.organizationSlug,\n\t\tprojectId: options.projectId\n\t});\n\tconst otelLookupTool = createOtelLookupTool({\n\t\tapiService: options.apiService,\n\t\torganizationSlug: options.organizationSlug,\n\t\tprojectId: options.projectId\n\t});\n\tconst replayFieldsTool = createDatasetFieldsTool({\n\t\tapiService: options.apiService,\n\t\torganizationSlug: options.organizationSlug,\n\t\tdataset: \"replays\",\n\t\tprojectId: options.projectId\n\t});\n\tconst whoamiTool = createWhoamiTool({ apiService: options.apiService });\n\treturn await callEmbeddedAgent({\n\t\tsystem: systemPrompt,\n\t\tprompt: options.query,\n\t\ttools: {\n\t\t\tdatasetAttributes: datasetAttributesTool,\n\t\t\tvalidateSearch: validateSearchTool,\n\t\t\treplayFields: replayFieldsTool,\n\t\t\totelSemantics: otelLookupTool,\n\t\t\twhoami: whoamiTool\n\t\t},\n\t\tschema: searchEventsAgentOutputSchema\n\t});\n}\n\n//#endregion\nexport { searchEventsAgent, searchEventsAgentOutputSchema };\n//# sourceMappingURL=agent-BCH9XRWB.js.map","//#region src/tools/support/profile/analyzer.ts\n/**\n* Analyzes flamegraph data to extract hot paths (most CPU-intensive call stacks).\n*\n* Hot paths are merged when duplicate stacks appear, sorted by total duration\n* (most time spent), and limited to maxHotPaths. Each path includes the full\n* call stack with depth tracking.\n*\n* Note: Call stacks are stored leaf-to-root (main frame at end) for efficient\n* flamegraph/call tree merging. User code filtering is done during formatting.\n*\n* @param flamegraph Flamegraph data from API\n* @param options Analysis options\n* @returns Array of hot paths sorted by duration (descending)\n*/\nfunction analyzeHotPathsFromFlamegraph(flamegraph, options) {\n\tconst profile = flamegraph.profiles[0];\n\tif (!profile) return [];\n\tconst frames = flamegraph.shared.frames;\n\tconst frameInfos = flamegraph.shared.frame_infos;\n\tconst totalSamples = profile.sample_counts.reduce((a, b) => a + b, 0);\n\tconst mergedStacks = /* @__PURE__ */ new Map();\n\tfor (let idx = 0; idx < profile.samples.length; idx++) {\n\t\tconst stackIndices = profile.samples[idx];\n\t\tconst sampleCount = profile.sample_counts[idx] || 0;\n\t\tconst duration = profile.sample_durations_ns[idx] || 0;\n\t\tconst weight = profile.weights[idx] || 0;\n\t\tconst stackKey = stackIndices.join(\",\");\n\t\tconst existing = mergedStacks.get(stackKey);\n\t\tif (existing) {\n\t\t\texisting.sampleCount += sampleCount;\n\t\t\texisting.duration += duration;\n\t\t\texisting.weight += weight;\n\t\t} else mergedStacks.set(stackKey, {\n\t\t\tstackIndices,\n\t\t\tsampleCount,\n\t\t\tduration,\n\t\t\tweight\n\t\t});\n\t}\n\tconst hotPaths = Array.from(mergedStacks.values()).map((merged) => {\n\t\tconst callStack = reconstructCallStack([...merged.stackIndices].reverse(), frames, frameInfos);\n\t\tconst userCodeFrames = callStack.filter((f) => f.frame.is_application);\n\t\treturn {\n\t\t\tstackIndices: merged.stackIndices,\n\t\t\tsampleCount: merged.sampleCount,\n\t\t\tduration: merged.duration,\n\t\t\tweight: merged.weight,\n\t\t\tpercentOfTotal: totalSamples > 0 ? merged.sampleCount / totalSamples * 100 : 0,\n\t\t\tcallStack,\n\t\t\tuserCodeFrames\n\t\t};\n\t});\n\treturn hotPaths.sort((a, b) => b.duration - a.duration).slice(0, options.maxHotPaths);\n}\n/** Default frame info for missing data */\nconst DEFAULT_FRAME_INFO = {\n\tcount: 0,\n\tweight: 0,\n\tsumDuration: 0,\n\tsumSelfTime: 0,\n\tp75Duration: 0,\n\tp95Duration: 0,\n\tp99Duration: 0\n};\n/** Default frame for missing data */\nconst DEFAULT_FRAME = {\n\tfile: \"unknown\",\n\tname: \"unknown\",\n\tline: 0,\n\tis_application: false,\n\tfingerprint: 0\n};\n/**\n* Reconstructs a call stack from frame indices with depth tracking.\n*\n* Frames are ordered leaf-to-root (leaf at index 0, root at end) for efficient\n* flamegraph/call tree merging. This allows top-down traversal and early\n* termination when merging stacks.\n*\n* @param stackIndices Array of frame indices forming the call stack (leaf to root)\n* @param frames All frames from flamegraph\n* @param frameInfos Performance stats for each frame\n* @returns Reconstructed call stack with metadata (leaf first, root last)\n*/\nfunction reconstructCallStack(stackIndices, frames, frameInfos) {\n\tconst stackLength = stackIndices.length;\n\treturn stackIndices.map((frameIdx, idx) => ({\n\t\tframe: frames[frameIdx] || DEFAULT_FRAME,\n\t\tframeInfo: frameInfos[frameIdx] || DEFAULT_FRAME_INFO,\n\t\tdepth: idx,\n\t\tisLeaf: idx === 0,\n\t\tisRoot: idx === stackLength - 1,\n\t\tframeIndex: frameIdx\n\t}));\n}\n/**\n* Identifies hotspot frames (functions consuming the most CPU time).\n*\n* Hotspots are individual functions that appear frequently in profiles,\n* sorted by total weight (time spent in that function across all samples).\n*\n* @param flamegraph Flamegraph data from API\n* @param options Analysis options\n* @returns Array of hotspot frames sorted by weight (descending)\n*/\nfunction identifyHotspotFramesFromFlamegraph(flamegraph, options) {\n\tconst frames = flamegraph.shared.frames;\n\tconst frameInfos = flamegraph.shared.frame_infos;\n\tconst totalSamples = flamegraph.profiles.reduce((sum, profile) => sum + profile.sample_counts.reduce((a, b) => a + b, 0), 0);\n\tconst hotspots = frames.map((frame, idx) => {\n\t\tconst frameInfo = frameInfos[idx] || DEFAULT_FRAME_INFO;\n\t\treturn {\n\t\t\tframe,\n\t\t\tframeInfo,\n\t\t\tpercentOfTotal: totalSamples > 0 ? frameInfo.count / totalSamples * 100 : 0,\n\t\t\tframeIndex: idx\n\t\t};\n\t}).filter((h) => !options.focusOnUserCode || h.frame.is_application).sort((a, b) => b.frameInfo.weight - a.frameInfo.weight).slice(0, 20);\n\treturn hotspots;\n}\n/**\n* Generates performance insights based on percentile analysis.\n*\n* Analyzes p75, p95, and p99 latencies to identify:\n* - High variance (inconsistent performance)\n* - Consistently slow functions (high median)\n* - Hot functions (called very frequently)\n* - Consistent functions (low variance)\n*\n* @param frameInfo Performance statistics for a frame\n* @returns Array of insights\n*/\nfunction generatePerformanceInsights(frameInfo) {\n\tconst insights = [];\n\tif (frameInfo.p99Duration > frameInfo.p75Duration * 3) insights.push({\n\t\ttype: \"high_variance\",\n\t\ticon: \"⚠️\",\n\t\tmessage: \"High variance: Performance varies significantly across calls\"\n\t});\n\tif (frameInfo.p75Duration > 1e8) insights.push({\n\t\ttype: \"consistently_slow\",\n\t\ticon: \"🐌\",\n\t\tmessage: \"Consistently slow: Median execution time is high\"\n\t});\n\tif (frameInfo.count > 1e3) insights.push({\n\t\ttype: \"hot_function\",\n\t\ticon: \"🔥\",\n\t\tmessage: \"Hot function: Called very frequently\"\n\t});\n\tif (insights.length === 0 && frameInfo.p99Duration <= frameInfo.p75Duration * 1.5) insights.push({\n\t\ttype: \"consistent\",\n\t\ticon: \"✅\",\n\t\tmessage: \"Consistent: Low performance variance\"\n\t});\n\treturn insights;\n}\n/**\n* Compares frame statistics between baseline and current to detect regressions.\n*\n* Analyzes percentage change in weight (total CPU time) and classifies changes:\n* - Major regression: >20% slower\n* - Minor regression: 10-20% slower\n* - Improvement: Faster\n* - No change: <10% change\n*\n* @param baseline Baseline flamegraph data\n* @param current Current flamegraph data\n* @param options Comparison options\n* @returns Array of frame comparisons sorted by regression severity\n*/\nfunction compareFrameStats(baseline, current, options) {\n\tconst baselineFrames = baseline.shared.frames;\n\tconst currentFrames = current.shared.frames;\n\tconst baselineInfos = baseline.shared.frame_infos;\n\tconst currentInfos = current.shared.frame_infos;\n\tconst frameMap = /* @__PURE__ */ new Map();\n\tbaselineFrames.forEach((frame, idx) => {\n\t\tconst existing = frameMap.get(frame.fingerprint) || {};\n\t\tframeMap.set(frame.fingerprint, {\n\t\t\t...existing,\n\t\t\tbaselineIdx: idx\n\t\t});\n\t});\n\tcurrentFrames.forEach((frame, idx) => {\n\t\tconst existing = frameMap.get(frame.fingerprint) || {};\n\t\tframeMap.set(frame.fingerprint, {\n\t\t\t...existing,\n\t\t\tcurrentIdx: idx\n\t\t});\n\t});\n\tconst comparisons = [];\n\tfor (const [fingerprint, indices] of frameMap.entries()) {\n\t\tif (indices.baselineIdx === void 0 || indices.currentIdx === void 0) continue;\n\t\tconst baselineFrame = baselineFrames[indices.baselineIdx];\n\t\tconst currentFrame = currentFrames[indices.currentIdx];\n\t\tconst baselineInfo = baselineInfos[indices.baselineIdx] || DEFAULT_FRAME_INFO;\n\t\tconst currentInfo = currentInfos[indices.currentIdx] || DEFAULT_FRAME_INFO;\n\t\tif (options.focusOnUserCode && !currentFrame.is_application) continue;\n\t\tconst percentChange = baselineInfo.sumDuration > 0 ? (currentInfo.sumDuration - baselineInfo.sumDuration) / baselineInfo.sumDuration * 100 : 0;\n\t\tlet changeType;\n\t\tif (percentChange > 20) changeType = \"major_regression\";\n\t\telse if (percentChange > 10) changeType = \"minor_regression\";\n\t\telse if (percentChange < -10) changeType = \"improvement\";\n\t\telse changeType = \"no_change\";\n\t\tcomparisons.push({\n\t\t\tframe: currentFrame,\n\t\t\tbaseline: baselineInfo,\n\t\t\tcurrent: currentInfo,\n\t\t\tpercentChange,\n\t\t\tchangeType\n\t\t});\n\t}\n\tconst severityOrder = {\n\t\tmajor_regression: 0,\n\t\tminor_regression: 1,\n\t\tno_change: 2,\n\t\timprovement: 3\n\t};\n\treturn comparisons.sort((a, b) => severityOrder[a.changeType] - severityOrder[b.changeType] || b.percentChange - a.percentChange);\n}\nconst MICROSECOND = 1e3;\nconst MILLISECOND = 1e6;\nconst SECOND = 1e9;\n/**\n* Formats duration from nanoseconds to human-readable string.\n*\n* @param ns Duration in nanoseconds\n* @returns Formatted duration string (e.g., \"157ms\", \"1.2s\")\n*/\nfunction formatDuration(ns) {\n\tif (ns < MILLISECOND) return `${(ns / MICROSECOND).toFixed(0)}µs`;\n\tif (ns < SECOND) return `${(ns / MILLISECOND).toFixed(0)}ms`;\n\treturn `${(ns / SECOND).toFixed(1)}s`;\n}\n/**\n* Formats a percentage value for display.\n*\n* @param value Percentage value (0-100)\n* @returns Formatted percentage string (e.g., \"45.2%\", \"0.1%\")\n*/\nfunction formatPercentage(value) {\n\tif (value < 1) return `${value.toFixed(2)}%`;\n\treturn `${value.toFixed(1)}%`;\n}\n/**\n* Checks if a flamegraph has valid profile data.\n*\n* Validates that the flamegraph contains at least one profile with frames.\n* Used to determine if analysis can proceed.\n*\n* @param flamegraph Flamegraph data from API\n* @returns True if the flamegraph has valid profile data\n*/\nfunction hasProfileData(flamegraph) {\n\treturn flamegraph.profiles.length > 0 && flamegraph.shared.frames.length > 0;\n}\n\n//#endregion\nexport { analyzeHotPathsFromFlamegraph, compareFrameStats, formatDuration, formatPercentage, generatePerformanceInsights, hasProfileData, identifyHotspotFramesFromFlamegraph, reconstructCallStack };\n//# sourceMappingURL=analyzer-CtmUqCwO.js.map","import { logInfo } from \"./logging-B7X3yL0T.js\";\nimport { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { formatUserGeoSummary } from \"./user-formatting-BrX0Xi05.js\";\nimport { formatEventValue, formatKnownUserValue, getStringValue, isAggregateQuery } from \"./utils-Dg2aeBEb.js\";\nimport { formatDuration } from \"./analyzer-CtmUqCwO.js\";\n\n//#region src/tools/support/search-events/formatters.ts\n/**\n* Format an explanation for how the input query was translated\n*/\nfunction formatExplanation(explanation) {\n\treturn `## How I interpreted your query\\n\\n${explanation}`;\n}\nfunction formatInlineCode(value) {\n\tconst backtickRuns = value.match(/`+/g) ?? [];\n\tconst fenceLength = backtickRuns.reduce((max, run) => Math.max(max, run.length), 0) + 1;\n\tconst fence = \"`\".repeat(fenceLength);\n\tconst needsPadding = value.startsWith(\"`\") || value.endsWith(\"`\");\n\treturn needsPadding ? `${fence} ${value} ${fence}` : `${fence}${value}${fence}`;\n}\nfunction formatExecutedTimeRange(timeRange) {\n\tif (!timeRange) return \"Last 14d\";\n\tif (timeRange.statsPeriod) return `Last ${timeRange.statsPeriod}`;\n\tif (timeRange.start && timeRange.end) return `${timeRange.start} to ${timeRange.end}`;\n\treturn \"Last 14d\";\n}\nfunction formatExecutedSearch(executedSearch) {\n\tif (!executedSearch) return \"\";\n\tconst fields = executedSearch.fields === void 0 ? void 0 : executedSearch.fields.length > 0 ? executedSearch.fields.map(formatInlineCode).join(\", \") : \"(none)\";\n\tconst lines = [\n\t\t\"## Executed Search\",\n\t\t`- Dataset: ${formatInlineCode(executedSearch.dataset)}`,\n\t\t`- Query: ${formatInlineCode(executedSearch.query || \"(empty)\")}`\n\t];\n\tif (fields !== void 0) lines.push(`- Fields: ${fields}`);\n\tif (executedSearch.sort) lines.push(`- Sort: ${formatInlineCode(executedSearch.sort)}`);\n\tlines.push(`- Time range: ${formatExecutedTimeRange(executedSearch.timeRange)}`);\n\treturn `${lines.join(\"\\n\")}\\n\\n`;\n}\nfunction formatSearchPresentationHint(hint) {\n\treturn `**Suggested presentation:** ${hint}\\n\\n`;\n}\nfunction formatSentryDashboardLink(url) {\n\treturn `**View these results in Sentry**:\\n${url}\\nPlease tell the user this dashboard link is available if they want to open the results in Sentry.\\n\\n`;\n}\nfunction formatUserFieldLines(value, options = {}) {\n\tconst prefix = options.prefix ?? \"\";\n\tconst geoSummary = formatUserGeoSummary(value.geo);\n\tconst userSummary = formatKnownUserValue(value, { includeGeo: false });\n\tconst lines = [];\n\tif (userSummary) lines.push(`${prefix}**user**: ${userSummary}`);\n\telse if (!geoSummary) lines.push(`${prefix}**user**: ${formatEventValue(value)}`);\n\tif (geoSummary) lines.push(`${prefix}**user.geo**: ${geoSummary}`);\n\treturn lines;\n}\n/**\n* Format error event results for display\n*/\nfunction formatErrorResults(params) {\n\tconst { eventData, inputQuery, includeExplanation, apiService, organizationSlug, explorerUrl, sentryQuery, fields, explanation } = params;\n\tlet output = `# Search Results for \"${inputQuery}\"\\n\\n`;\n\tif (isAggregateQuery(fields)) output += formatSearchPresentationHint(\"A compact table works well for these aggregate results.\");\n\telse output += formatSearchPresentationHint(\"Useful details to surface include severity, event IDs, and links.\");\n\tif (includeExplanation && explanation) {\n\t\toutput += formatExplanation(explanation);\n\t\toutput += `\\n\\n`;\n\t}\n\toutput += formatExecutedSearch(params.executedSearch);\n\toutput += formatSentryDashboardLink(explorerUrl);\n\tif (eventData.length === 0) {\n\t\tlogInfo(`No error events found for query: ${inputQuery}`, { extra: {\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\torganizationSlug,\n\t\t\tdataset: \"errors\"\n\t\t} });\n\t\toutput += `No results found.\\n\\n`;\n\t\toutput += `Try being more specific or using different terms in your search.\\n`;\n\t\treturn output;\n\t}\n\toutput += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"error\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\tif (isAggregateQuery(fields)) {\n\t\toutput += \"```json\\n\";\n\t\toutput += JSON.stringify(eventData, null, 2);\n\t\toutput += \"\\n```\\n\\n\";\n\t} else {\n\t\tconst priorityFields = [\n\t\t\t\"title\",\n\t\t\t\"issue\",\n\t\t\t\"project\",\n\t\t\t\"level\",\n\t\t\t\"error.type\",\n\t\t\t\"message\",\n\t\t\t\"culprit\",\n\t\t\t\"timestamp\",\n\t\t\t\"last_seen()\",\n\t\t\t\"count()\"\n\t\t];\n\t\tfor (const event of eventData) {\n\t\t\tconst title = getStringValue(event, \"title\") || getStringValue(event, \"message\") || getStringValue(event, \"error.value\") || \"Error Event\";\n\t\t\toutput += `## ${title}\\n\\n`;\n\t\t\tfor (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {\n\t\t\t\tconst value = event[field];\n\t\t\t\tif (field === \"issue\" && typeof value === \"string\") {\n\t\t\t\t\toutput += `**Issue ID**: ${value}\\n`;\n\t\t\t\t\toutput += `**Issue URL**: ${apiService.getIssueUrl(organizationSlug, value)}\\n`;\n\t\t\t\t} else if (field === \"issue\") output += `**Issue ID**: ${formatEventValue(value)}\\n`;\n\t\t\t\telse output += `**${field}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\tconst displayedFields = new Set([...priorityFields, \"id\"]);\n\t\t\tfor (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) {\n\t\t\t\tif (key === \"user\" && typeof value === \"object\" && value !== null) {\n\t\t\t\t\tfor (const line of formatUserFieldLines(value)) output += `${line}\\n`;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutput += `**${key}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t}\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- Get more details about a specific error: Use the Issue ID\\n\";\n\toutput += \"- View error groups: Navigate to the Issues page in Sentry\\n\";\n\toutput += \"- Set up alerts: Configure alert rules for these error patterns\\n\";\n\treturn output;\n}\n/**\n* Format log event results for display\n*/\nfunction formatLogResults(params) {\n\tconst { eventData, inputQuery, includeExplanation, apiService, organizationSlug, explorerUrl, sentryQuery, fields, explanation } = params;\n\tlet output = `# Search Results for \"${inputQuery}\"\\n\\n`;\n\tif (isAggregateQuery(fields)) output += formatSearchPresentationHint(\"A compact table works well for these aggregate results.\");\n\telse output += formatSearchPresentationHint(\"Console-style formatting works well for these logs, with timestamps preserved.\");\n\tif (includeExplanation && explanation) {\n\t\toutput += formatExplanation(explanation);\n\t\toutput += `\\n\\n`;\n\t}\n\toutput += formatExecutedSearch(params.executedSearch);\n\toutput += formatSentryDashboardLink(explorerUrl);\n\tif (eventData.length === 0) {\n\t\tlogInfo(`No log events found for query: ${inputQuery}`, { extra: {\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\torganizationSlug,\n\t\t\tdataset: \"logs\"\n\t\t} });\n\t\toutput += `No results found.\\n\\n`;\n\t\toutput += `Try being more specific or using different terms in your search.\\n`;\n\t\treturn output;\n\t}\n\toutput += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"log\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\tif (isAggregateQuery(fields)) {\n\t\toutput += \"```json\\n\";\n\t\toutput += JSON.stringify(eventData, null, 2);\n\t\toutput += \"\\n```\\n\\n\";\n\t} else {\n\t\toutput += \"```console\\n\";\n\t\tfor (const event of eventData) {\n\t\t\tconst timestamp = getStringValue(event, \"timestamp\", \"N/A\");\n\t\t\tconst severity = getStringValue(event, \"severity\", \"info\");\n\t\t\tconst message = getStringValue(event, \"message\", \"No message\");\n\t\t\tconst severityUpper = severity.toUpperCase();\n\t\t\tconst severityEmojis = {\n\t\t\t\tERROR: \"🔴\",\n\t\t\t\tFATAL: \"🔴\",\n\t\t\t\tWARN: \"🟡\",\n\t\t\t\tWARNING: \"🟡\",\n\t\t\t\tINFO: \"🔵\",\n\t\t\t\tDEBUG: \"⚫\",\n\t\t\t\tTRACE: \"⚫\"\n\t\t\t};\n\t\t\tconst severityEmoji = severityEmojis[severityUpper] || \"🔵\";\n\t\t\toutput += `${timestamp} ${severityEmoji} [${severityUpper.padEnd(5)}] ${message}\\n`;\n\t\t}\n\t\toutput += \"```\\n\\n\";\n\t\toutput += \"## Log Details\\n\\n\";\n\t\tconst priorityFields = [\n\t\t\t\"message\",\n\t\t\t\"severity\",\n\t\t\t\"severity_number\",\n\t\t\t\"timestamp\",\n\t\t\t\"project\",\n\t\t\t\"trace\",\n\t\t\t\"sentry.item_id\"\n\t\t];\n\t\tfor (let i = 0; i < eventData.length; i++) {\n\t\t\tconst event = eventData[i];\n\t\t\toutput += `### Log ${i + 1}\\n`;\n\t\t\tfor (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {\n\t\t\t\tconst value = event[field];\n\t\t\t\tif (field === \"trace\" && typeof value === \"string\") {\n\t\t\t\t\toutput += `- **Trace ID**: ${value}\\n`;\n\t\t\t\t\toutput += `- **Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n\t\t\t\t} else output += `- **${field}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\tconst displayedFields = new Set([...priorityFields, \"id\"]);\n\t\t\tfor (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) {\n\t\t\t\tif (key === \"user\" && typeof value === \"object\" && value !== null) {\n\t\t\t\t\tfor (const line of formatUserFieldLines(value, { prefix: \"- \" })) output += `${line}\\n`;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutput += `- **${key}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t}\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- View related traces: Click on the Trace URL if available\\n\";\n\toutput += \"- Filter by severity: Adjust your query to focus on specific log levels\\n\";\n\toutput += \"- Export logs: Use the Sentry web interface for bulk export\\n\";\n\treturn output;\n}\n/**\n* Format span/trace event results for display\n*/\nfunction formatSpanResults(params) {\n\tconst { eventData, inputQuery, includeExplanation, apiService, organizationSlug, explorerUrl, sentryQuery, fields, explanation } = params;\n\tlet output = `# Search Results for \"${inputQuery}\"\\n\\n`;\n\tif (isAggregateQuery(fields)) output += formatSearchPresentationHint(\"A compact table works well for these aggregate results.\");\n\telse output += formatSearchPresentationHint(\"A timeline works well for these traces, with durations and parent-child span relationships visible.\");\n\tif (includeExplanation && explanation) {\n\t\toutput += formatExplanation(explanation);\n\t\toutput += `\\n\\n`;\n\t}\n\toutput += formatExecutedSearch(params.executedSearch);\n\toutput += formatSentryDashboardLink(explorerUrl);\n\tif (eventData.length === 0) {\n\t\tlogInfo(`No span events found for query: ${inputQuery}`, { extra: {\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\torganizationSlug,\n\t\t\tdataset: \"spans\"\n\t\t} });\n\t\toutput += `No results found.\\n\\n`;\n\t\toutput += `Try being more specific or using different terms in your search.\\n`;\n\t\treturn output;\n\t}\n\toutput += `Found ${eventData.length} ${isAggregateQuery(fields) ? `aggregate result${eventData.length === 1 ? \"\" : \"s\"}` : `trace${eventData.length === 1 ? \"\" : \"s\"}/span${eventData.length === 1 ? \"\" : \"s\"}`}:\\n\\n`;\n\tif (isAggregateQuery(fields)) {\n\t\toutput += \"```json\\n\";\n\t\toutput += JSON.stringify(eventData, null, 2);\n\t\toutput += \"\\n```\\n\\n\";\n\t} else {\n\t\tconst priorityFields = [\n\t\t\t\"id\",\n\t\t\t\"span.op\",\n\t\t\t\"span.description\",\n\t\t\t\"transaction\",\n\t\t\t\"span.duration\",\n\t\t\t\"span.status\",\n\t\t\t\"trace\",\n\t\t\t\"project\",\n\t\t\t\"timestamp\"\n\t\t];\n\t\tfor (const event of eventData) {\n\t\t\tconst title = getStringValue(event, \"span.description\") || getStringValue(event, \"transaction\") || getStringValue(event, \"span.op\") || \"Span\";\n\t\t\toutput += `## ${title}\\n\\n`;\n\t\t\tfor (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {\n\t\t\t\tconst value = event[field];\n\t\t\t\tif (field === \"trace\" && typeof value === \"string\") {\n\t\t\t\t\toutput += `**Trace ID**: ${value}\\n`;\n\t\t\t\t\toutput += `**Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n\t\t\t\t} else if (field === \"span.duration\" && typeof value === \"number\") output += `**${field}**: ${value}ms\\n`;\n\t\t\t\telse output += `**${field}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\tconst displayedFields = new Set([...priorityFields, \"id\"]);\n\t\t\tfor (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) {\n\t\t\t\tif (key === \"user\" && typeof value === \"object\" && value !== null) {\n\t\t\t\t\tfor (const line of formatUserFieldLines(value)) output += `${line}\\n`;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutput += `**${key}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t}\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- View the full trace: Click on the Trace URL above\\n\";\n\toutput += \"- Search for related spans: Modify your query to be more specific\\n\";\n\toutput += \"- Export data: Use the Sentry web interface for advanced analysis\\n\";\n\treturn output;\n}\nfunction getProfileDurationLabel(field, value) {\n\tif ((field === \"transaction.duration\" || field === \"profile.duration\") && typeof value === \"number\") return formatDuration(value);\n\treturn void 0;\n}\nfunction getProfileProject(event) {\n\treturn getStringValue(event, \"project\") || null;\n}\nfunction getProfileTimestampValue(value) {\n\tif (typeof value === \"string\") {\n\t\tconst trimmedValue = value.trim();\n\t\treturn trimmedValue.length > 0 ? trimmedValue : null;\n\t}\n\treturn null;\n}\nfunction getProfileDetailUrl(apiService, organizationSlug, event) {\n\tconst project = getProfileProject(event);\n\tif (!project) return null;\n\tconst profileId = getStringValue(event, \"profile.id\");\n\tif (profileId) return apiService.getProfileUrl(organizationSlug, project, profileId);\n\tconst profilerId = getStringValue(event, \"profiler.id\");\n\tconst start = getProfileTimestampValue(event[\"precise.start_ts\"]);\n\tconst end = getProfileTimestampValue(event[\"precise.finish_ts\"]);\n\tif (profilerId && start && end) return apiService.getContinuousProfileUrl(organizationSlug, project, {\n\t\tprofilerId,\n\t\tstart,\n\t\tend\n\t});\n\treturn null;\n}\nfunction formatProfileResults(params) {\n\tconst { eventData, inputQuery, includeExplanation, apiService, organizationSlug, explorerUrl, sentryQuery, fields, explanation } = params;\n\tlet output = `# Search Results for \"${inputQuery}\"\\n\\n`;\n\tif (isAggregateQuery(fields)) output += formatSearchPresentationHint(\"A compact table with readable duration units works well for these profile aggregates.\");\n\telse output += formatSearchPresentationHint(\"Concise summaries work well for these profiles, highlighting profile ID, transaction, duration, release, and trace context.\");\n\tif (includeExplanation && explanation) {\n\t\toutput += formatExplanation(explanation);\n\t\toutput += `\\n\\n`;\n\t}\n\toutput += formatExecutedSearch(params.executedSearch);\n\toutput += formatSentryDashboardLink(explorerUrl);\n\tif (eventData.length === 0) {\n\t\tlogInfo(`No profile events found for query: ${inputQuery}`, { extra: {\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\torganizationSlug,\n\t\t\tdataset: \"profiles\"\n\t\t} });\n\t\toutput += \"No results found.\\n\\n\";\n\t\toutput += \"Try narrowing the transaction, release, platform, or profile filters.\\n\";\n\t\treturn output;\n\t}\n\toutput += `Found ${eventData.length} ${isAggregateQuery(fields) ? `aggregate result${eventData.length === 1 ? \"\" : \"s\"}` : `profile${eventData.length === 1 ? \"\" : \"s\"}`}:\\n\\n`;\n\tif (isAggregateQuery(fields)) {\n\t\toutput += \"```json\\n\";\n\t\toutput += JSON.stringify(eventData, null, 2);\n\t\toutput += \"\\n```\\n\\n\";\n\t} else {\n\t\tconst priorityFields = [\n\t\t\t\"profile.id\",\n\t\t\t\"profiler.id\",\n\t\t\t\"thread.id\",\n\t\t\t\"transaction\",\n\t\t\t\"timestamp\",\n\t\t\t\"transaction.duration\",\n\t\t\t\"release\",\n\t\t\t\"environment\",\n\t\t\t\"project\",\n\t\t\t\"trace\",\n\t\t\t\"precise.start_ts\",\n\t\t\t\"precise.finish_ts\"\n\t\t];\n\t\tfor (const event of eventData) {\n\t\t\tconst title = getStringValue(event, \"transaction\") || getStringValue(event, \"profile.id\") || getStringValue(event, \"profiler.id\") || \"Profile\";\n\t\t\tconst detailUrl = getProfileDetailUrl(apiService, organizationSlug, event);\n\t\t\toutput += `## ${title}\\n\\n`;\n\t\t\tif (detailUrl) output += `**Profile URL**: ${detailUrl}\\n`;\n\t\t\tfor (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {\n\t\t\t\tconst value = event[field];\n\t\t\t\tconst durationLabel = getProfileDurationLabel(field, value);\n\t\t\t\tif (field === \"trace\" && typeof value === \"string\") {\n\t\t\t\t\toutput += `**Trace ID**: ${value}\\n`;\n\t\t\t\t\toutput += `**Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n\t\t\t\t} else if (durationLabel) output += `**${field}**: ${durationLabel}\\n`;\n\t\t\t\telse output += `**${field}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\tconst displayedFields = new Set([...priorityFields, \"id\"]);\n\t\t\tfor (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) {\n\t\t\t\tif (key === \"user\" && typeof value === \"object\" && value !== null) {\n\t\t\t\t\tfor (const line of formatUserFieldLines(value)) output += `${line}\\n`;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutput += `**${key}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t}\n\toutput += \"## Next Steps\\n\\n\";\n\tif (params.experimentalMode === true) output += \"- Open a Profile URL above when available, or use `get_sentry_resource` with the profile URL for the full detail view\\n\";\n\telse {\n\t\tconst profileDetailsInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"get_profile_details\",\n\t\t\targuments: {\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: \"<project>\",\n\t\t\t\tprofileId: \"<profile_id>\"\n\t\t\t},\n\t\t\texperimentalMode: false,\n\t\t\tavailableToolNames: params.availableToolNames,\n\t\t\tdirectToolNames: params.directToolNames,\n\t\t\tfallbackInstruction: \"Profile detail lookup is not available in this session\",\n\t\t\tpurpose: \"for the full detail view\"\n\t\t});\n\t\toutput += `- Open a Profile URL above when available. ${profileDetailsInstruction}\\n`;\n\t}\n\toutput += \"- Open the Trace URL for an end-to-end view of the profiled request when available\\n\";\n\toutput += \"- Refine the profiling search in Sentry by transaction, release, platform, or environment\\n\";\n\treturn output;\n}\n/**\n* Format trace metric results for display\n*/\nfunction formatTraceMetricsResults(params) {\n\tconst { eventData, inputQuery, includeExplanation, apiService, organizationSlug, explorerUrl, sentryQuery, fields, explanation } = params;\n\tlet output = `# Search Results for \"${inputQuery}\"\\n\\n`;\n\tif (isAggregateQuery(fields)) output += formatSearchPresentationHint(\"A compact table with grouping labels and units works well for these metric aggregates.\");\n\telse output += formatSearchPresentationHint(\"Concise summaries work well for these metric samples, highlighting metric name, type, value, and trace context.\");\n\tif (includeExplanation && explanation) {\n\t\toutput += formatExplanation(explanation);\n\t\toutput += `\\n\\n`;\n\t}\n\toutput += formatExecutedSearch(params.executedSearch);\n\toutput += formatSentryDashboardLink(explorerUrl);\n\tif (eventData.length === 0) {\n\t\tlogInfo(`No trace metric events found for query: ${inputQuery}`, { extra: {\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\torganizationSlug,\n\t\t\tdataset: \"tracemetrics\"\n\t\t} });\n\t\toutput += \"No results found.\\n\\n\";\n\t\toutput += \"Try being more specific about the metric name, type, or filters.\\n\";\n\t\treturn output;\n\t}\n\toutput += `Found ${eventData.length} ${isAggregateQuery(fields) ? `aggregate result${eventData.length === 1 ? \"\" : \"s\"}` : `metric sample${eventData.length === 1 ? \"\" : \"s\"}`}:\\n\\n`;\n\tif (isAggregateQuery(fields)) {\n\t\toutput += \"```json\\n\";\n\t\toutput += JSON.stringify(eventData, null, 2);\n\t\toutput += \"\\n```\\n\\n\";\n\t} else {\n\t\tconst priorityFields = [\n\t\t\t\"metric.name\",\n\t\t\t\"metric.type\",\n\t\t\t\"metric.unit\",\n\t\t\t\"value\",\n\t\t\t\"project\",\n\t\t\t\"timestamp\",\n\t\t\t\"trace\",\n\t\t\t\"span_id\"\n\t\t];\n\t\tfor (const event of eventData) {\n\t\t\tconst title = getStringValue(event, \"metric.name\") || getStringValue(event, \"trace\") || \"Metric Sample\";\n\t\t\toutput += `## ${title}\\n\\n`;\n\t\t\tfor (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {\n\t\t\t\tconst value = event[field];\n\t\t\t\tif (field === \"trace\" && typeof value === \"string\") {\n\t\t\t\t\toutput += `**Trace ID**: ${value}\\n`;\n\t\t\t\t\toutput += `**Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n\t\t\t\t} else output += `**${field}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\tconst displayedFields = new Set([...priorityFields, \"id\"]);\n\t\t\tfor (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) {\n\t\t\t\tif (key === \"user\" && typeof value === \"object\" && value !== null) {\n\t\t\t\t\tfor (const line of formatUserFieldLines(value)) output += `${line}\\n`;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutput += `**${key}**: ${formatEventValue(value)}\\n`;\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t}\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- Open the Metrics page link above to refine the selected metric\\n\";\n\toutput += \"- Drill into a specific sample by opening its Trace URL or using `get_sentry_resource` with that trace ID\\n\";\n\toutput += \"- Metrics do not expose a standalone detail resource here; use the related trace for deeper inspection\\n\";\n\toutput += \"- Group by additional attributes to break down the metric further\\n\";\n\toutput += \"- Switch between samples and aggregates in Sentry for deeper analysis\\n\";\n\treturn output;\n}\n\n//#endregion\nexport { formatErrorResults, formatExecutedSearch, formatExplanation, formatLogResults, formatProfileResults, formatSearchPresentationHint, formatSentryDashboardLink, formatSpanResults, formatTraceMetricsResults };\n//# sourceMappingURL=formatters-Cuh2gD9M.js.map","import { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { formatExecutedSearch, formatSearchPresentationHint, formatSentryDashboardLink } from \"./formatters-Cuh2gD9M.js\";\n\n//#region src/tools/support/search-events/replays.ts\nconst DEFAULT_REPLAY_SORT = \"-started_at\";\nconst DEFAULT_REPLAY_STATS_PERIOD = \"14d\";\nconst REPLAY_SORT_FIELDS = [\n\t\"activity\",\n\t\"browser.name\",\n\t\"browser.version\",\n\t\"count_dead_clicks\",\n\t\"count_errors\",\n\t\"count_infos\",\n\t\"count_rage_clicks\",\n\t\"count_urls\",\n\t\"count_warnings\",\n\t\"device.brand\",\n\t\"device.family\",\n\t\"device.model\",\n\t\"device.name\",\n\t\"dist\",\n\t\"duration\",\n\t\"finished_at\",\n\t\"os.name\",\n\t\"os.version\",\n\t\"platform\",\n\t\"project_id\",\n\t\"sdk.name\",\n\t\"started_at\",\n\t\"user.email\",\n\t\"user.id\",\n\t\"user.username\"\n];\nconst replaySortValues = [...REPLAY_SORT_FIELDS, ...REPLAY_SORT_FIELDS.map((field) => `-${field}`)];\nconst REPLAY_SORT_VALUES = new Set(replaySortValues);\nfunction isValidReplaySort(sort) {\n\treturn REPLAY_SORT_VALUES.has(sort);\n}\nfunction formatReplayResults(params) {\n\tconst { replays, inputQuery, includeExplanation, organizationSlug, apiService, searchUrl, replayQuery, sort, environment, explanation, timeRange } = params;\n\tlet output = `# Search Results for \"${inputQuery}\"\\n\\n`;\n\toutput += formatSearchPresentationHint(\"Cards or rows work well for these replays, with replay IDs, user context, duration, click/error counts, and page URLs visible.\");\n\tif (includeExplanation) {\n\t\toutput += \"## Query Translation\\n\";\n\t\toutput += `Input query: \"${inputQuery}\"\\n`;\n\t\toutput += `Replay query: \\`${replayQuery || \"(none)\"}\\`\\n`;\n\t\tif (environment) output += `Environment: ${formatReplayEnvironment(environment)}\\n`;\n\t\toutput += `Sort: ${sort}\\n`;\n\t\toutput += `Time range: ${formatTimeRange(timeRange)}\\n\\n`;\n\t\tif (explanation) output += `## How I interpreted your query\\n\\n${explanation}\\n\\n`;\n\t}\n\toutput += formatExecutedSearch(params.executedSearch);\n\toutput += formatSentryDashboardLink(searchUrl);\n\tif (replays.length === 0) {\n\t\toutput += \"No replays found matching your search criteria.\\n\\n\";\n\t\toutput += \"Try broadening the query or expanding the time range.\";\n\t\treturn output;\n\t}\n\toutput += `Found **${replays.length}** replay${replays.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\treplays.forEach((replay, index) => {\n\t\tconst replayUrl = apiService.getReplayUrl(organizationSlug, replay.id);\n\t\tconst user = formatReplayUser(replay);\n\t\tconst clickSummary = [\n\t\t\t`${replay.count_errors ?? 0} error${replay.count_errors === 1 ? \"\" : \"s\"}`,\n\t\t\t`${replay.count_rage_clicks ?? 0} rage click${replay.count_rage_clicks === 1 ? \"\" : \"s\"}`,\n\t\t\t`${replay.count_dead_clicks ?? 0} dead click${replay.count_dead_clicks === 1 ? \"\" : \"s\"}`\n\t\t].join(\" · \");\n\t\toutput += `## ${index + 1}. [${replay.id}](${replayUrl})\\n\\n`;\n\t\toutput += `- **Started**: ${formatTimestamp(replay.started_at)}\\n`;\n\t\toutput += `- **Duration**: ${formatDurationSeconds(replay.duration)}\\n`;\n\t\toutput += `- **User**: ${user}\\n`;\n\t\toutput += `- **Summary**: ${clickSummary}\\n`;\n\t\toutput += `- **Environment**: ${replay.environment ?? \"Unknown\"}\\n`;\n\t\toutput += `- **Browser**: ${formatNameVersion(replay.browser?.name, replay.browser?.version)}\\n`;\n\t\tif (replay.urls.length > 0) output += `- **Pages**: ${formatReplayUrls(replay.urls)}\\n`;\n\t\tif (replay.releases && replay.releases.length > 0) output += `- **Release**: ${replay.releases[0]}\\n`;\n\t\tif (replay.trace_ids.length > 0) output += `- **Trace**: \\`${replay.trace_ids[0]}\\`${replay.trace_ids.length > 1 ? ` (+${replay.trace_ids.length - 1} more)` : \"\"}\\n`;\n\t\tif (replay.is_archived) output += \"- **Status**: Archived\\n\";\n\t\toutput += \"\\n\";\n\t});\n\toutput += \"## Next Steps\\n\\n\";\n\tconst replayDetailsInstruction = formatToolCallInstruction({\n\t\ttoolName: \"get_replay_details\",\n\t\targuments: { replayUrl: \"<replay_url>\" },\n\t\texperimentalMode: params.experimentalMode ?? false,\n\t\tavailableToolNames: params.availableToolNames,\n\t\tdirectToolNames: params.directToolNames,\n\t\tfallbackInstruction: \"Replay detail lookup is not available in this session\",\n\t\tpurpose: \"to inspect a specific replay in more detail\"\n\t});\n\toutput += `- ${replayDetailsInstruction}\\n`;\n\toutput += \"- Pivot from a replay into related issues or traces: Open the replay link above, then use `get_sentry_resource` on related issue or trace URLs\\n\";\n\treturn output;\n}\nfunction formatReplayUser(replay) {\n\treturn replay.user?.display_name ?? replay.user?.email ?? replay.user?.username ?? replay.user?.id ?? \"Anonymous User\";\n}\nfunction formatReplayUrls(urls) {\n\tconst preview = urls.slice(0, 2).join(\", \");\n\tif (urls.length <= 2) return preview;\n\treturn `${preview} (+${urls.length - 2} more)`;\n}\nfunction formatDurationSeconds(durationSeconds) {\n\tif (durationSeconds == null) return \"Unknown\";\n\tif (durationSeconds < 60) return `${durationSeconds}s`;\n\tconst minutes = Math.floor(durationSeconds / 60);\n\tconst seconds = durationSeconds % 60;\n\treturn seconds > 0 ? `${minutes}m ${seconds}s` : `${minutes}m`;\n}\nfunction formatNameVersion(name, version) {\n\tif (name && version) return `${name} ${version}`;\n\treturn name ?? version ?? \"Unknown\";\n}\nfunction formatTimestamp(value) {\n\tif (!value) return \"Unknown\";\n\treturn value.replace(\"T\", \" \").replace(\"Z\", \" UTC\");\n}\nfunction formatTimeRange(timeRange) {\n\tif (!timeRange) return \"Last 14 days\";\n\tif (timeRange.statsPeriod) return `Last ${timeRange.statsPeriod}`;\n\tif (timeRange.start && timeRange.end) return `${formatTimestamp(timeRange.start)} to ${formatTimestamp(timeRange.end)}`;\n\treturn \"Last 14 days\";\n}\nfunction formatReplayEnvironment(environment) {\n\treturn Array.isArray(environment) ? environment.join(\", \") : environment;\n}\n\n//#endregion\nexport { DEFAULT_REPLAY_SORT, DEFAULT_REPLAY_STATS_PERIOD, REPLAY_SORT_FIELDS, formatReplayResults, isValidReplaySort };\n//# sourceMappingURL=replays-Dg9Syytd.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamPeriod, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { PUBLIC_EVENTS_DATASETS, isMetricsDataset, normalizeEventsDataset } from \"./events-datasets-Cu37u43g.js\";\nimport { extractConversationIdFromSearchQuery } from \"./url-utils-CYEhmNHi.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { hasAgentProvider } from \"./provider-factory-Cs_2DBhe.js\";\nimport { withProviderFallback } from \"./provider-fallback-L61Pbfxx.js\";\nimport { RECOMMENDED_FIELDS, TRACE_METRICS_SAMPLE_IDENTITY_FIELDS } from \"./config-BqCCImAX.js\";\nimport { formatEventsValidationResults, isAggregateQuery, isSemanticFilterDowngrade, looksLikeSentrySearchSyntax, recordEventsSearchValidationTelemetry, validateEventsSearch } from \"./utils-Dg2aeBEb.js\";\nimport { searchEventsAgent } from \"./agent-BCH9XRWB.js\";\nimport { formatErrorResults, formatLogResults, formatProfileResults, formatSpanResults, formatTraceMetricsResults } from \"./formatters-Cuh2gD9M.js\";\nimport { DEFAULT_REPLAY_SORT, DEFAULT_REPLAY_STATS_PERIOD, formatReplayResults, isValidReplaySort } from \"./replays-Dg9Syytd.js\";\nimport { z } from \"zod\";\nimport { getActiveSpan, setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/search-events.ts\nconst SEARCH_EVENTS_DATASETS = [...PUBLIC_EVENTS_DATASETS, \"replays\"];\nconst DEFAULT_EVENTS_SORT = \"-timestamp\";\nfunction defaultSortForDataset(dataset) {\n\treturn dataset === \"replays\" ? DEFAULT_REPLAY_SORT : DEFAULT_EVENTS_SORT;\n}\nfunction defaultFieldsForDataset(dataset) {\n\treturn RECOMMENDED_FIELDS[normalizeEventsDataset(dataset)].basic;\n}\nfunction resolveEventFields({ dataset, explicitFields, agentFields, trustExplicitFields }) {\n\tif (trustExplicitFields && explicitFields && explicitFields.length > 0) return explicitFields;\n\tif (agentFields && agentFields.length > 0) return agentFields;\n\treturn defaultFieldsForDataset(dataset);\n}\nfunction parseAgentTimeRange(timeRange) {\n\tif (typeof timeRange !== \"object\" || timeRange === null) return void 0;\n\tif (\"statsPeriod\" in timeRange && typeof timeRange.statsPeriod === \"string\") return { statsPeriod: timeRange.statsPeriod };\n\tif (\"start\" in timeRange && \"end\" in timeRange && typeof timeRange.start === \"string\" && typeof timeRange.end === \"string\") return {\n\t\tstart: timeRange.start,\n\t\tend: timeRange.end\n\t};\n\treturn void 0;\n}\nfunction augmentFieldsWithSort(fields, sort) {\n\tconst sortField = sort.startsWith(\"-\") ? sort.slice(1) : sort;\n\tconst sortIsAggregate = sortField.includes(\"(\") && sortField.includes(\")\");\n\tif (sortField && !fields.includes(sortField) && (sortIsAggregate || !isAggregateQuery(fields))) return [...fields, sortField];\n\treturn fields;\n}\nfunction buildRequestFields(dataset, fields) {\n\treturn dataset !== \"replays\" && isMetricsDataset(dataset) && !isAggregateQuery(fields) ? Array.from(new Set([...fields, ...TRACE_METRICS_SAMPLE_IDENTITY_FIELDS])) : fields;\n}\nfunction isTraceItemDataset(dataset) {\n\treturn dataset === \"spans\" || dataset === \"logs\" || dataset === \"metrics\";\n}\nfunction hasFields(fields) {\n\treturn Array.isArray(fields) && fields.length > 0;\n}\nfunction formatSearchValue(value) {\n\treturn /^[^\\s\"',[\\]]+$/.test(value) ? value : JSON.stringify(value);\n}\nfunction formatEnvironmentFilter(environment) {\n\tif (!environment) return void 0;\n\tconst environments = Array.isArray(environment) ? environment : [environment];\n\tif (environments.length === 0) return void 0;\n\tif (environments.length === 1) {\n\t\tconst environmentValue = environments[0];\n\t\treturn environmentValue === void 0 ? void 0 : `environment:${formatSearchValue(environmentValue)}`;\n\t}\n\treturn `environment:[${environments.map(formatSearchValue).join(\",\")}]`;\n}\nfunction appendSearchFilter(query, filter) {\n\tconst trimmedQuery = query.trim();\n\tif (!filter) return trimmedQuery;\n\tif (tokenizeSearchQuery(trimmedQuery).includes(filter)) return trimmedQuery;\n\treturn [trimmedQuery, filter].filter(Boolean).join(\" \");\n}\nfunction applyEnvironmentToEventsQuery(dataset, query, environment) {\n\tif (dataset === \"replays\") return query;\n\treturn appendSearchFilter(query, formatEnvironmentFilter(environment));\n}\nfunction tokenizeSearchQuery(query) {\n\tconst tokens = [];\n\tlet currentToken = \"\";\n\tlet quote = null;\n\tlet escaped = false;\n\tfor (const char of query) {\n\t\tif (escaped) {\n\t\t\tcurrentToken += char;\n\t\t\tescaped = false;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\\\") {\n\t\t\tcurrentToken += char;\n\t\t\tescaped = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (quote) {\n\t\t\tcurrentToken += char;\n\t\t\tif (char === quote) quote = null;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\"\" || char === \"'\") {\n\t\t\tcurrentToken += char;\n\t\t\tquote = char;\n\t\t\tcontinue;\n\t\t}\n\t\tif (/\\s/.test(char)) {\n\t\t\tif (currentToken) {\n\t\t\t\ttokens.push(currentToken);\n\t\t\t\tcurrentToken = \"\";\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tcurrentToken += char;\n\t}\n\tif (currentToken) tokens.push(currentToken);\n\treturn tokens;\n}\nfunction containsSearchToken(query, token) {\n\tconst escapedToken = token.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\treturn (/* @__PURE__ */ new RegExp(`(^|\\\\s)${escapedToken}(?=\\\\s|$)`)).test(query);\n}\nfunction preservesSearchTokens(originalQuery, repairedQuery) {\n\treturn tokenizeSearchQuery(originalQuery).every((token) => containsSearchToken(repairedQuery, token));\n}\nfunction choosePreservingRepairedQuery(params) {\n\tconst originalQuery = params.originalQuery.trim();\n\tconst repairedQuery = params.repairedQuery?.trim();\n\tif (!repairedQuery) return appendSearchFilter(originalQuery, params.filter);\n\tif (isSemanticFilterDowngrade(originalQuery, repairedQuery)) return appendSearchFilter(originalQuery, params.filter);\n\tif (!originalQuery || preservesSearchTokens(originalQuery, repairedQuery)) return appendSearchFilter(repairedQuery, params.filter);\n\treturn appendSearchFilter(originalQuery, params.filter);\n}\nfunction buildAgentPrompt(params) {\n\treturn [\n\t\t\"Translate this Sentry event search request.\",\n\t\t\"The query may be natural language or already-valid Sentry search syntax.\",\n\t\t\"Preserve valid explicit parameters, but correct dataset, query syntax, fields, sort, and time range when they conflict or would fail.\",\n\t\t\"If the user query already uses Sentry search syntax, treat its filters as authoritative unless validateSearch proves a field is invalid.\",\n\t\t\"Never replace a structured field filter with message/log.body/full-text matching. If no valid attribute exists for an explicit field:value filter, keep the field and let validation fail.\",\n\t\t\"For spans, logs, and metrics, use datasetAttributes to discover likely fields with substringMatch, query, and attributeTypes before dropping or renaming explicit fields.\",\n\t\t\"A broad datasetAttributes result may be truncated, so absence from that preview does not prove an explicit field is invalid.\",\n\t\t\"For non-replay datasets, call validateSearch on the candidate request and fix failures in this same pass before returning.\",\n\t\t\"For non-replay datasets, convert environment parameters into query filters. For replays, keep environment in the separate environment parameter.\",\n\t\t\"\",\n\t\t`User query: ${params.query || \"(empty)\"}`,\n\t\t\"Current parameters:\",\n\t\tJSON.stringify({\n\t\t\tdataset: params.dataset,\n\t\t\tfields: params.fields ?? null,\n\t\t\tsort: params.sort ?? null,\n\t\t\tstatsPeriod: params.statsPeriod ?? null,\n\t\t\tenvironment: params.environment ?? null\n\t\t}, null, 2)\n\t].join(\"\\n\");\n}\nvar search_events_default = defineTool({\n\tname: \"search_events\",\n\tskills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Search Sentry events and replays. Use for event counts/statistics.\",\n\t\t\"\",\n\t\t\"`query` can be natural language or Sentry search syntax. With an agent configured, it fixes dataset, query, fields, and sort before running.\",\n\t\t\"\",\n\t\t\"Supports TWO query types:\",\n\t\t\"1. AGGREGATIONS (counts, sums, averages): 'how many errors', 'total tokens'\",\n\t\t\"2. Individual events with timestamps: 'error logs from last hour'\",\n\t\t\"\",\n\t\t\"Datasets:\",\n\t\t\"- errors: Exception/crash events with stack traces, usually grouped into issues\",\n\t\t\"- logs: Application log entries, including error-severity log messages\",\n\t\t\"- spans: Raw trace/span events for performance, AI/LLM calls, requests, and operations\",\n\t\t\"- metrics: Metric rows and aggregates: counters, gauges, distributions, values\",\n\t\t\"- profiles: Transaction/continuous profile results, profile IDs, profiled transactions\",\n\t\t\"- replays: Session replay results: rage clicks, dead clicks, visited pages, replay users\",\n\t\t\"If the user says logs, log messages, error logs, or warning logs, choose logs instead of errors.\",\n\t\t\"\",\n\t\t\"Replay searches return replay lists only; replay count()/avg()/sum() are not supported.\",\n\t\t\"\",\n\t\t\"NOT for grouped issue lists (use search_issues) or app screenshots/images (use get_latest_base_snapshot).\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"search_events(organizationSlug='my-org', query='how many errors today')\",\n\t\t\"search_events(organizationSlug='my-org', dataset='errors', query='level:error')\",\n\t\t\"search_events(organizationSlug='my-org', dataset='errors', fields=['issue', 'count()'], sort='-count()')\",\n\t\t\"search_events(organizationSlug='my-org', dataset='spans', query='span.op:db', sort='-span.duration')\",\n\t\t\"search_events(organizationSlug='my-org', dataset='replays', query='count_errors:>0', sort='-count_errors')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"- Parse org/project notation directly without calling find_organizations or find_projects.\",\n\t\t\"- Use fields with aggregate functions like count(), avg(), sum() for statistics\",\n\t\t\"- Sort by -count() for most common, -timestamp for newest\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tdataset: z.enum(SEARCH_EVENTS_DATASETS).optional().describe(\"Initial dataset hint: errors, logs, spans, metrics, profiles, or replays. The agent may correct this when configured.\"),\n\t\tquery: z.string().trim().optional().describe(\"Natural language or Sentry event search query syntax.\"),\n\t\tfields: z.array(z.string()).nullable().optional().describe(\"Fields to return for event datasets. If not specified, uses sensible defaults. Include aggregate functions like count(), avg() for statistics. Leave null for dataset='replays'.\"),\n\t\tsort: z.string().trim().nullable().optional().describe(\"Sort field (prefix with - for descending). If omitted, event datasets default to -timestamp and replays default to -started_at. Use -count() for event aggregations. For dataset='replays', use replay sorts like -started_at or -count_errors.\"),\n\t\tprojectSlug: ParamProjectSlug.nullable().default(null),\n\t\tenvironment: z.union([z.string().trim().min(1), z.array(z.string().trim().min(1)).min(1)]).optional().describe(\"Optional environment filter for dataset='replays'. Use a string for one environment or an array for multiple. Omit when unused. For other datasets, filter environment in the query string instead.\"),\n\t\tperiod: ParamPeriod.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tlimit: z.number().min(1).max(100).default(10).describe(\"Maximum number of results to return (1-100)\"),\n\t\tincludeExplanation: z.boolean().default(false).describe(\"Include explanation of how the query was translated or repaired\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tif (params.projectSlug) setTag(\"project.slug\", params.projectSlug);\n\t\tconst inputDataset = params.dataset ?? \"errors\";\n\t\tconst hasStructuredQuery = looksLikeSentrySearchSyntax(params.query);\n\t\tconst canApplyEnvironmentFilter = inputDataset !== \"replays\" && isTraceItemDataset(inputDataset) && hasStructuredQuery;\n\t\tif (!hasAgentProvider() && inputDataset !== \"replays\" && params.environment && !canApplyEnvironmentFilter) throw new UserInputError(\"The `environment` parameter is only supported for dataset='replays'. For other datasets, include environment filtering in the query string instead.\");\n\t\tlet projectId;\n\t\tif (params.projectSlug) {\n\t\t\tconst project = await apiService.getProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: params.projectSlug\n\t\t\t});\n\t\t\tprojectId = String(project.id);\n\t\t}\n\t\tlet dataset;\n\t\tlet sentryQuery;\n\t\tlet fields;\n\t\tlet sortParam;\n\t\tlet timeParams;\n\t\tlet explanation;\n\t\tlet environment = params.environment;\n\t\tconst explicitSort = params.sort?.trim() || void 0;\n\t\tconst hasExplicitDataset = params.dataset !== void 0;\n\t\tconst hasExplicitFields = hasFields(params.fields);\n\t\tconst hasExplicitSort = explicitSort !== void 0;\n\t\tconst hasExplicitPeriod = params.period !== void 0;\n\t\tconst hasExplicitTraceItemDataset = hasExplicitDataset && isTraceItemDataset(inputDataset);\n\t\tconst shouldTrustStructuredTraceSearch = hasStructuredQuery && hasExplicitTraceItemDataset;\n\t\tconst environmentFilter = formatEnvironmentFilter(params.environment);\n\t\tconst explicitStructuredTraceQuery = shouldTrustStructuredTraceSearch ? appendSearchFilter(params.query ?? \"\", environmentFilter) : params.query ?? \"\";\n\t\tconst canRunWithoutAgent = shouldTrustStructuredTraceSearch && hasExplicitFields && hasExplicitSort;\n\t\tif (hasAgentProvider() && !canRunWithoutAgent) {\n\t\t\tconst parsed = await withProviderFallback({\n\t\t\t\toperation: \"search_events.rewrite\",\n\t\t\t\tfallback: () => ({\n\t\t\t\t\tdataset: inputDataset,\n\t\t\t\t\tquery: params.query ?? \"\",\n\t\t\t\t\tfields: inputDataset === \"replays\" ? [] : params.fields ?? defaultFieldsForDataset(inputDataset),\n\t\t\t\t\tsort: explicitSort || defaultSortForDataset(inputDataset),\n\t\t\t\t\tenvironment: params.environment ?? null,\n\t\t\t\t\ttimeRange: { statsPeriod: params.period ?? \"14d\" },\n\t\t\t\t\texplanation: \"\"\n\t\t\t\t}),\n\t\t\t\trun: async () => (await searchEventsAgent({\n\t\t\t\t\tquery: buildAgentPrompt({\n\t\t\t\t\t\tquery: params.query,\n\t\t\t\t\t\tdataset: inputDataset,\n\t\t\t\t\t\tfields: params.fields,\n\t\t\t\t\t\tsort: params.sort,\n\t\t\t\t\t\tstatsPeriod: params.period,\n\t\t\t\t\t\tenvironment: params.environment\n\t\t\t\t\t}),\n\t\t\t\t\torganizationSlug,\n\t\t\t\t\tapiService,\n\t\t\t\t\tprojectId\n\t\t\t\t})).result\n\t\t\t});\n\t\t\tconst shouldTrustExplicitSearchParams = shouldTrustStructuredTraceSearch || hasStructuredQuery && parsed.dataset === inputDataset;\n\t\t\tif (!parsed.sort?.trim() && !(shouldTrustExplicitSearchParams && hasExplicitSort)) throw new UserInputError(`Search Events Agent response missing required 'sort' parameter. Received: ${JSON.stringify(parsed, null, 2)}. The agent must specify how to sort results (e.g., '-timestamp' for newest first).`);\n\t\t\tdataset = shouldTrustStructuredTraceSearch ? inputDataset : parsed.dataset;\n\t\t\tsentryQuery = shouldTrustStructuredTraceSearch ? choosePreservingRepairedQuery({\n\t\t\t\toriginalQuery: params.query ?? \"\",\n\t\t\t\trepairedQuery: parsed.query,\n\t\t\t\tfilter: environmentFilter\n\t\t\t}) : looksLikeSentrySearchSyntax(params.query) && isSemanticFilterDowngrade(params.query ?? \"\", parsed.query || \"\") ? params.query ?? \"\" : parsed.query || \"\";\n\t\t\tsortParam = shouldTrustExplicitSearchParams && explicitSort ? explicitSort : parsed.sort?.trim() || defaultSortForDataset(dataset);\n\t\t\texplanation = parsed.explanation;\n\t\t\tenvironment = params.environment ?? parsed.environment;\n\t\t\ttimeParams = shouldTrustExplicitSearchParams && hasExplicitPeriod ? { statsPeriod: params.period } : parseAgentTimeRange(parsed.timeRange) ?? { statsPeriod: \"14d\" };\n\t\t\tif (dataset === \"replays\") fields = [];\n\t\t\telse fields = resolveEventFields({\n\t\t\t\tdataset,\n\t\t\t\texplicitFields: params.fields,\n\t\t\t\tagentFields: parsed.fields,\n\t\t\t\ttrustExplicitFields: shouldTrustExplicitSearchParams\n\t\t\t});\n\t\t} else {\n\t\t\tdataset = inputDataset;\n\t\t\tsentryQuery = shouldTrustStructuredTraceSearch ? explicitStructuredTraceQuery : params.query ?? \"\";\n\t\t\tsortParam = explicitSort || defaultSortForDataset(dataset);\n\t\t\ttimeParams = { statsPeriod: params.period ?? \"14d\" };\n\t\t\tfields = dataset === \"replays\" ? [] : params.fields ?? defaultFieldsForDataset(dataset);\n\t\t}\n\t\tif (dataset === \"replays\") {\n\t\t\tconst replaySort = sortParam || DEFAULT_REPLAY_SORT;\n\t\t\tif (!isValidReplaySort(replaySort)) throw new UserInputError(`Invalid replay sort \"${replaySort}\". Use a supported replay sort like ${DEFAULT_REPLAY_SORT}, -count_errors, -count_rage_clicks, or -duration.`);\n\t\t\tconst replayTimeParams = { ...timeParams };\n\t\t\tif (!replayTimeParams.statsPeriod && !replayTimeParams.start && !replayTimeParams.end) replayTimeParams.statsPeriod = DEFAULT_REPLAY_STATS_PERIOD;\n\t\t\tconst replays = await apiService.searchReplays({\n\t\t\t\torganizationSlug,\n\t\t\t\tquery: sentryQuery,\n\t\t\t\tlimit: params.limit,\n\t\t\t\tprojectId,\n\t\t\t\tsort: replaySort,\n\t\t\t\tenvironment: environment ?? void 0,\n\t\t\t\t...replayTimeParams\n\t\t\t});\n\t\t\tconst replaySearchUrl = apiService.getReplaysSearchUrl(organizationSlug, {\n\t\t\t\tquery: sentryQuery || void 0,\n\t\t\t\tprojectSlugOrId: projectId,\n\t\t\t\tenvironment: environment ?? void 0,\n\t\t\t\tsort: replaySort,\n\t\t\t\t...replayTimeParams\n\t\t\t});\n\t\t\tgetActiveSpan()?.setAttribute(\"gen_ai.tool.call.result.count\", replays.length);\n\t\t\treturn formatReplayResults({\n\t\t\t\treplays,\n\t\t\t\tinputQuery: params.query || sentryQuery || \"recent replays\",\n\t\t\t\tincludeExplanation: params.includeExplanation,\n\t\t\t\torganizationSlug,\n\t\t\t\tapiService,\n\t\t\t\tsearchUrl: replaySearchUrl,\n\t\t\t\treplayQuery: sentryQuery,\n\t\t\t\tsort: replaySort,\n\t\t\t\tenvironment,\n\t\t\t\texplanation,\n\t\t\t\ttimeRange: replayTimeParams,\n\t\t\t\texecutedSearch: {\n\t\t\t\t\tdataset,\n\t\t\t\t\tquery: sentryQuery,\n\t\t\t\t\tfields: [],\n\t\t\t\t\tsort: replaySort,\n\t\t\t\t\ttimeRange: replayTimeParams\n\t\t\t\t},\n\t\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\t\tdirectToolNames: context.directToolNames\n\t\t\t});\n\t\t}\n\t\tfields = augmentFieldsWithSort(fields, sortParam);\n\t\tconst requestFields = buildRequestFields(dataset, fields);\n\t\tsentryQuery = applyEnvironmentToEventsQuery(dataset, sentryQuery, environment);\n\t\tconst lastValidation = await validateEventsSearch(apiService, {\n\t\t\torganizationSlug,\n\t\t\tdataset,\n\t\t\tfields: requestFields,\n\t\t\tquery: sentryQuery,\n\t\t\tsort: sortParam,\n\t\t\tprojectId,\n\t\t\tenvironment: environment ?? void 0,\n\t\t\t...timeParams\n\t\t});\n\t\trecordEventsSearchValidationTelemetry({\n\t\t\tattempt: 0,\n\t\t\tvalidation: lastValidation\n\t\t});\n\t\tif (!lastValidation.valid) {\n\t\t\tconst formatted = formatEventsValidationResults(lastValidation);\n\t\t\tthrow new UserInputError(formatted ? `Search validation failed:\\n${formatted}` : \"Search validation failed.\");\n\t\t}\n\t\tconst finalRequestFields = buildRequestFields(dataset, fields);\n\t\tsentryQuery = applyEnvironmentToEventsQuery(dataset, sentryQuery, environment);\n\t\tconst eventsResponse = await apiService.searchEvents({\n\t\t\torganizationSlug,\n\t\t\tquery: sentryQuery,\n\t\t\tfields: finalRequestFields,\n\t\t\tlimit: params.limit,\n\t\t\tprojectId,\n\t\t\tdataset,\n\t\t\tsort: sortParam,\n\t\t\t...timeParams\n\t\t});\n\t\tconst aggregateFunctions = fields.filter((field) => field.includes(\"(\") && field.includes(\")\"));\n\t\tconst groupByFields = fields.filter((field) => !field.includes(\"(\") && !field.includes(\")\"));\n\t\tfunction isValidResponse(response) {\n\t\t\treturn typeof response === \"object\" && response !== null;\n\t\t}\n\t\tfunction isValidEventArray(data) {\n\t\t\treturn Array.isArray(data) && data.every((item) => typeof item === \"object\" && item !== null);\n\t\t}\n\t\tif (!isValidResponse(eventsResponse)) throw new Error(\"Invalid response format from Sentry API\");\n\t\tconst eventData = eventsResponse.data;\n\t\tif (!isValidEventArray(eventData)) throw new Error(\"Invalid event data format from Sentry API\");\n\t\tgetActiveSpan()?.setAttribute(\"gen_ai.tool.call.result.count\", eventData.length);\n\t\tconst conversationId = extractConversationIdFromSearchQuery(sentryQuery);\n\t\tconst explorerUrl = conversationId ? apiService.getAIConversationUrl(organizationSlug, conversationId) : apiService.getEventsExplorerUrl(organizationSlug, sentryQuery, projectId, dataset, fields, sortParam, aggregateFunctions, groupByFields, timeParams.statsPeriod, timeParams.start, timeParams.end, eventData);\n\t\tconst formatParams = {\n\t\t\teventData,\n\t\t\tinputQuery: params.query || sentryQuery || `${dataset} events`,\n\t\t\tincludeExplanation: params.includeExplanation,\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\texplorerUrl,\n\t\t\tsentryQuery,\n\t\t\tfields,\n\t\t\texplanation,\n\t\t\texecutedSearch: {\n\t\t\t\tdataset,\n\t\t\t\tquery: sentryQuery,\n\t\t\t\tfields,\n\t\t\t\tsort: sortParam,\n\t\t\t\ttimeRange: timeParams\n\t\t\t},\n\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames\n\t\t};\n\t\tswitch (dataset) {\n\t\t\tcase \"errors\": return formatErrorResults(formatParams);\n\t\t\tcase \"logs\": return formatLogResults(formatParams);\n\t\t\tcase \"spans\": return formatSpanResults(formatParams);\n\t\t\tcase \"profiles\": return formatProfileResults(formatParams);\n\t\t\tdefault: return formatTraceMetricsResults(formatParams);\n\t\t}\n\t}\n});\n\n//#endregion\nexport { search_events_default };\n//# sourceMappingURL=search-events-C8aVtdIY.js.map","import { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/create-team.ts\nconst createTeamOutputSchema = z.object({ team: z.object({\n\tid: z.string(),\n\tslug: z.string(),\n\tname: z.string()\n}) });\nvar create_team_default = defineTool({\n\tname: \"create_team\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\"team:write\"],\n\tdescription: [\n\t\t\"Create a new team in Sentry.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS WANT TO:\",\n\t\t\"- 'Create a new team'\",\n\t\t\"- 'Set up a team called [X]'\",\n\t\t\"- 'I need a team for my project'\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Create a new team\",\n\t\t\"```\",\n\t\t\"create_team(organizationSlug='my-organization', name='the-goats')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tname: z.string().trim().describe(\"The name of the team to create.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: createTeamOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst team = await apiService.createTeam({\n\t\t\torganizationSlug,\n\t\t\tname: params.name\n\t\t});\n\t\treturn structuredResult({ team: {\n\t\t\tid: String(team.id),\n\t\t\tslug: team.slug,\n\t\t\tname: team.name\n\t\t} });\n\t}\n});\n\n//#endregion\nexport { createTeamOutputSchema, create_team_default };\n//# sourceMappingURL=create-team-Bz1tSDLQ.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamRegionUrl, ParamTeamSlug } from \"./schema-DKEjeVqP.js\";\nimport { logWarn } from \"./logging-B7X3yL0T.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/create-project.ts\nfunction getUsableClientKey(clientKeys) {\n\treturn clientKeys.find((key) => key.name === \"Default\" && key.isActive && key.dsn.public) ?? clientKeys.find((key) => key.isActive && key.dsn.public);\n}\nfunction findRepositoryMatch(repositories, repository) {\n\tconst exactMatches = repositories.filter((candidate) => candidate.name === repository);\n\tconst matches = exactMatches.length > 0 || repository.includes(\"/\") ? exactMatches : repositories.filter((candidate) => candidate.name.endsWith(`/${repository}`));\n\tif (matches.length === 0) throw new UserInputError(`Could not find repository \"${repository}\" in the organization. Make sure it is connected through a VCS integration before creating the project.`);\n\tif (matches.length > 1) throw new UserInputError(`Repository \"${repository}\" matched multiple repositories. Provide the full repository name, such as owner/repo.`);\n\treturn matches[0];\n}\nfunction getRepositoryProvider(repository) {\n\treturn repository.provider.id.replace(/^integrations:/, \"\") || null;\n}\nasync function getOrCreateClientKey({ apiService, organizationSlug, projectSlug }) {\n\tlet clientKey;\n\ttry {\n\t\tclientKey = getUsableClientKey(await apiService.listClientKeys({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug\n\t\t}));\n\t} catch (err) {\n\t\tlogWarn(err, {\n\t\t\tloggerScope: [\"runtime\", \"project-management\"],\n\t\t\textra: { action: \"list_project_client_keys\" }\n\t\t});\n\t}\n\tif (clientKey) return clientKey;\n\ttry {\n\t\treturn await apiService.createClientKey({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug,\n\t\t\tname: \"Default\"\n\t\t});\n\t} catch (err) {\n\t\tlogWarn(err, {\n\t\t\tloggerScope: [\"runtime\", \"project-management\"],\n\t\t\textra: { action: \"create_project_client_key\" }\n\t\t});\n\t\treturn null;\n\t}\n}\nvar create_project_default = defineTool({\n\tname: \"create_project\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\n\t\t\"project:write\",\n\t\t\"team:read\",\n\t\t\"org:read\"\n\t],\n\tdescription: [\n\t\t\"Create a new project in Sentry (provisions DSN automatically).\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS WANT TO:\",\n\t\t\"- 'Create a new project'\",\n\t\t\"- 'Set up a project for [app/service] with team [X]'\",\n\t\t\"- 'I need a new Sentry project'\",\n\t\t\"- Create project AND need DSN in one step\",\n\t\t\"- Create project and link an existing repository\",\n\t\t\"\",\n\t\t\"Returns the created project slug and a usable SENTRY_DSN when key setup succeeds.\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Create new project with team\",\n\t\t\"```\",\n\t\t\"create_project(organizationSlug='my-organization', teamSlug='my-team', name='my-project', platform='javascript')\",\n\t\t\"```\",\n\t\t\"### Create project with an explicit slug\",\n\t\t\"```\",\n\t\t\"create_project(organizationSlug='my-organization', teamSlug='my-team', name='My Project', slug='my-project', platform='javascript')\",\n\t\t\"```\",\n\t\t\"### Create project and link to a repository\",\n\t\t\"```\",\n\t\t\"create_project(organizationSlug='my-organization', teamSlug='my-team', name='my-project', platform='javascript', repository='getsentry/sentry')\",\n\t\t\"```\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tteamSlug: ParamTeamSlug,\n\t\tname: z.string().trim().describe(\"The name of the project to create. Typically this is the name of the application or service. It is only used as a visual label in Sentry.\"),\n\t\tslug: ParamProjectSlug.describe(\"Optional project slug to create.\").nullable().default(null),\n\t\tplatform: ParamPlatform.nullable().default(null),\n\t\trepository: z.string().trim().nullable().default(null).describe(\"Optional repository name to link to the project (e.g. 'getsentry/sentry'). The repo must already be connected to the organization via a VCS integration.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"team.slug\", params.teamSlug);\n\t\tconst repositoryMatch = params.repository ? findRepositoryMatch(await apiService.listRepos({ organizationSlug }), params.repository) : null;\n\t\tconst project = await apiService.createProject({\n\t\t\torganizationSlug,\n\t\t\tteamSlug: params.teamSlug,\n\t\t\tname: params.name,\n\t\t\tslug: params.slug,\n\t\t\tplatform: params.platform\n\t\t});\n\t\tlet repositoryLinked = false;\n\t\tlet repositoryLinkFailed = false;\n\t\tif (repositoryMatch) try {\n\t\t\tconst repositoryMapping = await apiService.linkProjectRepository({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlug: project.slug,\n\t\t\t\trepository: repositoryMatch.name,\n\t\t\t\tprovider: getRepositoryProvider(repositoryMatch)\n\t\t\t});\n\t\t\trepositoryLinked = repositoryMapping.errors === 0 && repositoryMapping.mappings.some((mapping) => [\"created\", \"updated\"].includes(mapping.status));\n\t\t\trepositoryLinkFailed = !repositoryLinked;\n\t\t} catch (err) {\n\t\t\tlogWarn(err, {\n\t\t\t\tloggerScope: [\"runtime\", \"project-management\"],\n\t\t\t\textra: { action: \"link_project_repository\" }\n\t\t\t});\n\t\t\trepositoryLinkFailed = true;\n\t\t}\n\t\tconst clientKey = await getOrCreateClientKey({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: project.slug\n\t\t});\n\t\tconst sentryDsn = clientKey?.dsn.public ?? null;\n\t\tlet output = `# New Project in **${organizationSlug}**\\n\\n`;\n\t\toutput += `**ID**: ${project.id}\\n`;\n\t\toutput += `**Slug**: ${project.slug}\\n`;\n\t\toutput += `**Name**: ${project.name}\\n`;\n\t\toutput += `**SENTRY_DSN**: ${sentryDsn ?? \"unavailable\"}\\n\\n`;\n\t\tif (repositoryMatch && repositoryLinked) {\n\t\t\toutput += `**Repository**: ${repositoryMatch.name} (linked)\\n`;\n\t\t\toutput += \"**Code Mapping**: `/` -> `/`\\n\\n\";\n\t\t} else if (repositoryMatch && repositoryLinkFailed) output += `**Repository**: Found ${repositoryMatch.name} but failed to link it to the project. Check permissions and try linking manually.\\n\\n`;\n\t\toutput += \"## Response Notes\\n\\n\";\n\t\tif (sentryDsn) {\n\t\t\toutput += `- Please tell the user the project slug and **SENTRY_DSN**.\\n`;\n\t\t\toutput += `- No additional DSN creation step is needed.\\n`;\n\t\t\toutput += `- The **SENTRY_DSN** value is used to initialize Sentry SDKs.\\n`;\n\t\t} else {\n\t\t\toutput += `- Please tell the user the project slug.\\n`;\n\t\t\toutput += `- Project creation succeeded, but SENTRY_DSN could not be retrieved or created.\\n`;\n\t\t\toutput += `- Use create_dsn for this project before initializing Sentry SDKs.\\n`;\n\t\t}\n\t\tif (repositoryMatch && repositoryLinked) output += `- Repository linked to project with a root code mapping: ${repositoryMatch.name}\\n`;\n\t\telse if (repositoryMatch && repositoryLinkFailed) output += `- Project creation succeeded, but repository linking did not. Ask the user to confirm permissions or link the repository manually in Sentry.\\n`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { create_project_default };\n//# sourceMappingURL=create-project-CTQakq9G.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { logIssue } from \"./logging-B7X3yL0T.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/update-project.ts\nconst updateProjectOutputSchema = z.object({ project: z.object({\n\tid: z.string(),\n\tslug: z.string(),\n\tname: z.string(),\n\tplatform: z.string().nullable()\n}) });\nvar update_project_default = defineTool({\n\tname: \"update_project\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\"project:write\"],\n\tdescription: [\n\t\t\"Update project metadata in Sentry, such as name, slug, and platform.\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Update a project's name or slug to fix onboarding mistakes\",\n\t\t\"- Change the platform assigned to a project\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Update a project's name and slug\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_project(organizationSlug='my-organization', projectSlug='old-project', name='New Project Name', slug='new-project-slug')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Update platform\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_project(organizationSlug='my-organization', projectSlug='my-project', platform='python')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"- Team access changes are handled by separate project-management tools.\",\n\t\t\"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n\t\t\"- When updating the slug, the project will be accessible at the new slug after the update\",\n\t\t\"- Do not update the slug from a project-scoped session; reconnect with an organization-scoped or unconstrained session first.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tname: z.string().trim().describe(\"The new name for the project\").nullable().default(null),\n\t\tslug: ParamProjectSlug.describe(\"The new slug for the project (must be unique)\").nullable().default(null),\n\t\tplatform: ParamPlatform.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: updateProjectOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tconst hasProjectUpdates = params.name || params.slug || params.platform;\n\t\tif (!hasProjectUpdates) throw new UserInputError(\"At least one project metadata field is required: `name`, `slug`, or `platform`.\");\n\t\tif (params.slug && context.constraints.projectSlug) throw new UserInputError(\"Project slug changes require an organization-scoped or unconstrained session. Reconnect without a project constraint before renaming the project slug.\");\n\t\tlet project;\n\t\ttry {\n\t\t\tproject = await apiService.updateProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlug: params.projectSlug,\n\t\t\t\tname: params.name,\n\t\t\t\tslug: params.slug,\n\t\t\t\tplatform: params.platform\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tlogIssue(err);\n\t\t\tthrow new Error(`Failed to update project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`, { cause: err });\n\t\t}\n\t\treturn structuredResult({ project: {\n\t\t\tid: String(project.id),\n\t\t\tslug: project.slug,\n\t\t\tname: project.name,\n\t\t\tplatform: project.platform ?? null\n\t\t} });\n\t}\n});\n\n//#endregion\nexport { updateProjectOutputSchema, update_project_default };\n//# sourceMappingURL=update-project-BYY10KTt.js.map","import { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl, ParamTeamSlug } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/add-team-to-project.ts\nconst assignedTeamSchema = z.object({\n\tid: z.string(),\n\tslug: z.string(),\n\tname: z.string()\n});\nconst addTeamToProjectOutputSchema = z.object({\n\tchanged: z.boolean(),\n\tteams: z.array(assignedTeamSchema)\n});\nfunction mapTeam(team) {\n\treturn {\n\t\tid: String(team.id),\n\t\tslug: team.slug,\n\t\tname: team.name\n\t};\n}\nvar add_team_to_project_default = defineTool({\n\tname: \"add_team_to_project\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\n\t\t\"project:write\",\n\t\t\"team:read\",\n\t\t\"org:read\"\n\t],\n\tdescription: [\n\t\t\"Grant a team access to an existing Sentry project.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Add another team to a project\",\n\t\t\"- Grant a team access without changing project metadata\",\n\t\t\"- Check whether a team already has project access before adding it\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"add_team_to_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='my-team')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Team access changes are separate from project metadata updates.\",\n\t\t\"- If the team is already assigned, this tool returns the current team list without making another change.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tteamSlug: ParamTeamSlug\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\tidempotentHint: true,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: addTeamToProjectOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tsetTag(\"team.slug\", params.teamSlug);\n\t\tconst currentTeams = await apiService.listProjectTeams({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug\n\t\t});\n\t\tconst alreadyAssigned = currentTeams.some((team) => team.slug === params.teamSlug);\n\t\tif (alreadyAssigned) return structuredResult({\n\t\t\tchanged: false,\n\t\t\tteams: currentTeams.map(mapTeam)\n\t\t});\n\t\tawait apiService.addTeamToProject({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tteamSlug: params.teamSlug\n\t\t});\n\t\tconst updatedTeams = await apiService.listProjectTeams({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug\n\t\t});\n\t\treturn structuredResult({\n\t\t\tchanged: true,\n\t\t\tteams: updatedTeams.map(mapTeam)\n\t\t});\n\t}\n});\n\n//#endregion\nexport { addTeamToProjectOutputSchema, add_team_to_project_default };\n//# sourceMappingURL=add-team-to-project-DrTGc_T9.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl, ParamTeamSlug } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/remove-team-from-project.ts\nconst assignedTeamSchema = z.object({\n\tid: z.string(),\n\tslug: z.string(),\n\tname: z.string()\n});\nconst removeTeamFromProjectOutputSchema = z.object({\n\tchanged: z.boolean(),\n\tteams: z.array(assignedTeamSchema)\n});\nfunction mapTeam(team) {\n\treturn {\n\t\tid: String(team.id),\n\t\tslug: team.slug,\n\t\tname: team.name\n\t};\n}\nvar remove_team_from_project_default = defineTool({\n\tname: \"remove_team_from_project\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\n\t\t\"project:write\",\n\t\t\"team:read\",\n\t\t\"org:read\"\n\t],\n\tdescription: [\n\t\t\"Revoke a team's access to an existing Sentry project.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Remove a team from a project\",\n\t\t\"- Revoke team access without changing project metadata\",\n\t\t\"- Check project team assignments before removing access\",\n\t\t\"\",\n\t\t\"Be careful when using this tool because it revokes project access.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"remove_team_from_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='my-team')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- The team must already be assigned to the project.\",\n\t\t\"- This tool will not remove the last team assigned to a project.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tteamSlug: ParamTeamSlug\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: removeTeamFromProjectOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tsetTag(\"team.slug\", params.teamSlug);\n\t\tconst currentTeams = await apiService.listProjectTeams({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug\n\t\t});\n\t\tconst isAssigned = currentTeams.some((team) => team.slug === params.teamSlug);\n\t\tif (!isAssigned) throw new UserInputError(\"The specified team is not assigned to this project. Choose one of the current project teams before removing access.\");\n\t\tif (currentTeams.length <= 1) throw new UserInputError(\"Cannot remove the last team assigned to a project. Add another team to the project before removing this team.\");\n\t\tawait apiService.removeTeamFromProject({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tteamSlug: params.teamSlug\n\t\t});\n\t\tconst updatedTeams = await apiService.listProjectTeams({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug\n\t\t});\n\t\treturn structuredResult({\n\t\t\tchanged: true,\n\t\t\tteams: updatedTeams.map(mapTeam)\n\t\t});\n\t}\n});\n\n//#endregion\nexport { removeTeamFromProjectOutputSchema, remove_team_from_project_default };\n//# sourceMappingURL=remove-team-from-project-CT7eqBf7.js.map","import { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/create-dsn.ts\nconst createDsnOutputSchema = z.object({ dsn: z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tdsn: z.string()\n}) });\nvar create_dsn_default = defineTool({\n\tname: \"create_dsn\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\"project:write\"],\n\tdescription: [\n\t\t\"Create an additional DSN for an EXISTING project.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN:\",\n\t\t\"- Project already exists and needs additional DSN\",\n\t\t\"- 'Create another DSN for project X'\",\n\t\t\"- 'I need a production DSN for existing project'\",\n\t\t\"\",\n\t\t\"DO NOT USE for new projects (use create_project instead)\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Create additional DSN for existing project\",\n\t\t\"```\",\n\t\t\"create_dsn(organizationSlug='my-organization', projectSlug='my-project', name='Production')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tname: z.string().trim().describe(\"The name of the DSN to create, for example 'Production'.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: createDsnOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tconst clientKey = await apiService.createClientKey({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tname: params.name\n\t\t});\n\t\treturn structuredResult({ dsn: {\n\t\t\tid: String(clientKey.id),\n\t\t\tname: clientKey.name,\n\t\t\tdsn: clientKey.dsn.public\n\t\t} });\n\t}\n});\n\n//#endregion\nexport { createDsnOutputSchema, create_dsn_default };\n//# sourceMappingURL=create-dsn-C-kIpqG7.js.map","import { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/find-dsns.ts\nconst findDsnsOutputSchema = z.object({ dsns: z.array(z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tdsn: z.string()\n})) });\nvar find_dsns_default = defineTool({\n\tname: \"find_dsns\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"List all Sentry DSNs for a specific project.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Retrieve a SENTRY_DSN for a specific project\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `find_organizations()` first.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: findDsnsOutputSchema,\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tconst clientKeys = await apiService.listClientKeys({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug\n\t\t});\n\t\treturn structuredResult({ dsns: clientKeys.map((clientKey) => ({\n\t\t\tid: String(clientKey.id),\n\t\t\tname: clientKey.name,\n\t\t\tdsn: clientKey.dsn.public\n\t\t})) });\n\t}\n});\n\n//#endregion\nexport { findDsnsOutputSchema, find_dsns_default };\n//# sourceMappingURL=find-dsns-DCUQXIHr.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { validateResourceId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/update-dsn.ts\nvar update_dsn_default = defineTool({\n\tname: \"update_dsn\",\n\tskills: [\"project-management\"],\n\trequiredScopes: [\"project:write\"],\n\tdescription: [\n\t\t\"Update settings for an existing DSN (client key) in a project, such as name, active status, rate limit, and loader script options.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN:\",\n\t\t\"- Deactivating or activating a DSN/client key\",\n\t\t\"- Setting or removing DSN rate limits ('set rate limit of 1000 per hour on DSN X')\",\n\t\t\"- Renaming a DSN ('rename DSN X to Production')\",\n\t\t\"- Configuring Javascript SDK loader script options (session replay, performance, debug, feedback, etc.)\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Rename DSN and set rate limit\",\n\t\t\"```\",\n\t\t\"update_dsn(organizationSlug='my-organization', projectSlug='my-project', keyId='d20df0a1ab5031c7f3c7edca9c02814d', name='Production Key', rateLimitWindow=3600, rateLimitCount=500)\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Deactivate a DSN\",\n\t\t\"```\",\n\t\t\"update_dsn(organizationSlug='my-organization', projectSlug='my-project', keyId='d20df0a1ab5031c7f3c7edca9c02814d', isActive=false)\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Disable rate limit entirely\",\n\t\t\"```\",\n\t\t\"update_dsn(organizationSlug='my-organization', projectSlug='my-project', keyId='d20df0a1ab5031c7f3c7edca9c02814d', disableRateLimit=true)\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use `find_dsns()` first to find the `keyId` for the DSN you want to update.\",\n\t\t\"- Both `rateLimitWindow` (seconds) and `rateLimitCount` (error cap) must be provided together to set a rate limit.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tkeyId: z.string().trim().superRefine(validateResourceId).describe(\"The ID of the DSN (client key) to update. Use find_dsns() to retrieve this ID first.\"),\n\t\tname: z.string().trim().max(64).describe(\"The new name for the DSN.\").optional(),\n\t\tisActive: z.boolean().describe(\"Activate or deactivate the DSN.\").optional(),\n\t\trateLimitWindow: z.number().int().min(0).max(60 * 60 * 24).describe(\"The time window in seconds for the rate limit.\").optional(),\n\t\trateLimitCount: z.number().int().min(0).describe(\"The maximum number of errors allowed within the rate limit window.\").optional(),\n\t\tdisableRateLimit: z.boolean().describe(\"Set to true to disable the rate limit entirely (removes the cap).\").optional(),\n\t\tbrowserSdkVersion: z.string().trim().describe(\"The Sentry Javascript SDK version to use (e.g. 'latest', '7.x').\").optional(),\n\t\tloaderHasReplay: z.boolean().describe(\"Configure Session Replay for the Javascript Loader Script.\").optional(),\n\t\tloaderHasPerformance: z.boolean().describe(\"Configure Performance Monitoring for the Javascript Loader Script.\").optional(),\n\t\tloaderHasDebug: z.boolean().describe(\"Configure Debug Bundles & Logging for the Javascript Loader Script.\").optional(),\n\t\tloaderHasFeedback: z.boolean().describe(\"Configure User Feedback for the Javascript Loader Script.\").optional(),\n\t\tloaderHasLogsAndMetrics: z.boolean().describe(\"Configure Logs and Metrics for the Javascript Loader Script (requires SDK >= 10.0.0).\").optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tconst hasUpdates = params.name !== void 0 || params.isActive !== void 0 || params.disableRateLimit !== void 0 || params.rateLimitWindow !== void 0 || params.rateLimitCount !== void 0 || params.browserSdkVersion !== void 0 || params.loaderHasReplay !== void 0 || params.loaderHasPerformance !== void 0 || params.loaderHasDebug !== void 0 || params.loaderHasFeedback !== void 0 || params.loaderHasLogsAndMetrics !== void 0;\n\t\tif (!hasUpdates) throw new UserInputError(\"At least one setting must be provided to update. Provide one or more of: name, isActive, rateLimitWindow + rateLimitCount, disableRateLimit, browserSdkVersion, or loader options.\");\n\t\tif (params.rateLimitWindow !== void 0 && params.rateLimitCount === void 0 || params.rateLimitWindow === void 0 && params.rateLimitCount !== void 0) throw new UserInputError(\"Both rateLimitWindow and rateLimitCount must be provided together to set a rate limit.\");\n\t\tif (params.disableRateLimit && (params.rateLimitWindow !== void 0 || params.rateLimitCount !== void 0)) throw new UserInputError(\"Cannot both set a rate limit and disable it at the same time.\");\n\t\tconst zeroRateLimit = params.rateLimitWindow !== void 0 && params.rateLimitCount !== void 0 && (params.rateLimitWindow === 0 || params.rateLimitCount === 0);\n\t\tlet rateLimit = void 0;\n\t\tif (params.disableRateLimit === true || zeroRateLimit) rateLimit = null;\n\t\telse if (params.rateLimitWindow !== void 0 && params.rateLimitCount !== void 0) rateLimit = {\n\t\t\twindow: params.rateLimitWindow,\n\t\t\tcount: params.rateLimitCount\n\t\t};\n\t\tlet dynamicSdkLoaderOptions = void 0;\n\t\tif (params.loaderHasReplay !== void 0 || params.loaderHasPerformance !== void 0 || params.loaderHasDebug !== void 0 || params.loaderHasFeedback !== void 0 || params.loaderHasLogsAndMetrics !== void 0) {\n\t\t\tdynamicSdkLoaderOptions = {};\n\t\t\tif (params.loaderHasReplay !== void 0) dynamicSdkLoaderOptions.hasReplay = params.loaderHasReplay;\n\t\t\tif (params.loaderHasPerformance !== void 0) dynamicSdkLoaderOptions.hasPerformance = params.loaderHasPerformance;\n\t\t\tif (params.loaderHasDebug !== void 0) dynamicSdkLoaderOptions.hasDebug = params.loaderHasDebug;\n\t\t\tif (params.loaderHasFeedback !== void 0) dynamicSdkLoaderOptions.hasFeedback = params.loaderHasFeedback;\n\t\t\tif (params.loaderHasLogsAndMetrics !== void 0) dynamicSdkLoaderOptions.hasLogsAndMetrics = params.loaderHasLogsAndMetrics;\n\t\t}\n\t\tconst clientKey = await apiService.updateClientKey({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tkeyId: params.keyId,\n\t\t\tname: params.name,\n\t\t\tisActive: params.isActive,\n\t\t\trateLimit,\n\t\t\tbrowserSdkVersion: params.browserSdkVersion,\n\t\t\tdynamicSdkLoaderOptions\n\t\t});\n\t\tlet output = `# Updated DSN in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n\t\toutput += `**DSN ID**: ${clientKey.id}\\n`;\n\t\toutput += `**DSN**: ${clientKey.dsn.public}\\n`;\n\t\toutput += `**Name**: ${clientKey.name}\\n`;\n\t\toutput += `**Status**: ${clientKey.isActive ? \"Active\" : \"Inactive\"}\\n`;\n\t\tif (clientKey.rateLimit && clientKey.rateLimit.count > 0 && clientKey.rateLimit.window > 0) output += `**Rate Limit**: ${clientKey.rateLimit.count} events per ${clientKey.rateLimit.window} seconds\\n`;\n\t\telse output += `**Rate Limit**: Disabled\\n`;\n\t\tif (clientKey.browserSdkVersion) output += `**Browser SDK Version**: ${clientKey.browserSdkVersion}\\n`;\n\t\tif (clientKey.dynamicSdkLoaderOptions) {\n\t\t\tconst loader = clientKey.dynamicSdkLoaderOptions;\n\t\t\tconst optionsStr = [\n\t\t\t\t`Replay: ${loader.hasReplay ? \"Enabled\" : \"Disabled\"}`,\n\t\t\t\t`Performance: ${loader.hasPerformance ? \"Enabled\" : \"Disabled\"}`,\n\t\t\t\t`Debug: ${loader.hasDebug ? \"Enabled\" : \"Disabled\"}`,\n\t\t\t\tloader.hasFeedback !== void 0 ? `Feedback: ${loader.hasFeedback ? \"Enabled\" : \"Disabled\"}` : null,\n\t\t\t\tloader.hasLogsAndMetrics !== void 0 ? `Logs & Metrics: ${loader.hasLogsAndMetrics ? \"Enabled\" : \"Disabled\"}` : null\n\t\t\t].filter((val) => val !== null).join(\", \");\n\t\t\toutput += `**Loader Options**: ${optionsStr}\\n`;\n\t\t}\n\t\tconst updates = [];\n\t\tif (params.name) updates.push(`name to \"${params.name}\"`);\n\t\tif (params.isActive !== void 0) updates.push(`status to ${params.isActive ? \"active\" : \"inactive\"}`);\n\t\tif (params.disableRateLimit || zeroRateLimit) updates.push(\"rate limit disabled\");\n\t\telse if (params.rateLimitWindow !== void 0) updates.push(`rate limit to ${params.rateLimitCount} events per ${params.rateLimitWindow}s`);\n\t\tif (params.browserSdkVersion) updates.push(`browser SDK version to \"${params.browserSdkVersion}\"`);\n\t\tif (dynamicSdkLoaderOptions) updates.push(\"loader options updated\");\n\t\tif (updates.length > 0) {\n\t\t\toutput += `\\n## Updates Applied\\n`;\n\t\t\toutput += updates.map((update) => `- Updated ${update}`).join(\"\\n\");\n\t\t\toutput += `\\n`;\n\t\t}\n\t\toutput += \"\\n## Response Notes\\n\\n\";\n\t\toutput += \"- Please tell the user the updated DSN settings.\\n\";\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { update_dsn_default };\n//# sourceMappingURL=update-dsn-Ce0IWsRx.js.map","//#region src/internal/fetch-utils.ts\n/**\n* Fetch with timeout using AbortController\n* @param url - The URL to fetch\n* @param options - Standard fetch options\n* @param timeoutMs - Timeout in milliseconds (default: 30000)\n* @returns Promise<Response>\n* @throws Error if request times out\n*/\nasync function fetchWithTimeout(url, options = {}, timeoutMs = 3e4) {\n\tconst controller = new AbortController();\n\tconst timeoutId = setTimeout(() => controller.abort(), timeoutMs);\n\ttry {\n\t\tconst response = await fetch(url, {\n\t\t\t...options,\n\t\t\tsignal: controller.signal\n\t\t});\n\t\treturn response;\n\t} catch (error) {\n\t\tif (error instanceof Error && error.name === \"AbortError\") throw new Error(`Request timeout after ${timeoutMs}ms`);\n\t\tthrow error;\n\t} finally {\n\t\tclearTimeout(timeoutId);\n\t}\n}\n/**\n* Retry a function with exponential backoff\n* @param fn - The async function to retry\n* @param options - Retry options\n* @param options.maxRetries - Maximum number of retries (default: 3)\n* @param options.initialDelay - Initial delay in milliseconds (default: 1000)\n* @param options.shouldRetry - Predicate to determine if error should be retried (default: always retry)\n* @returns Promise with the function result\n* @throws The last error if all retries are exhausted\n*/\nasync function retryWithBackoff(fn, { maxRetries = 3, initialDelay = 1e3, shouldRetry = (error) => true } = {}) {\n\tlet lastError;\n\tlet delay = initialDelay;\n\tfor (let attempt = 0; attempt <= maxRetries; attempt++) try {\n\t\treturn await fn();\n\t} catch (error) {\n\t\tlastError = error;\n\t\tif (attempt === maxRetries || !shouldRetry(error)) throw error;\n\t\tawait new Promise((resolve) => setTimeout(resolve, delay));\n\t\tdelay = Math.min(delay * 2, 3e4);\n\t}\n\tthrow lastError;\n}\n\n//#endregion\nexport { fetchWithTimeout, retryWithBackoff };\n//# sourceMappingURL=fetch-utils-By3YW-Mv.js.map","import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { ApiError, ApiServerError } from \"./errors-DG2FreDU.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { parseIssueParams } from \"./issue-helpers-0Dnme3Ym.js\";\nimport { SEER_INITIAL_RETRY_DELAY, SEER_MAX_RETRIES, SEER_POLLING_INTERVAL, SEER_TIMEOUT, getActiveAutofixTodo, getHumanInterventionGuidance, getOutputForAutofixRun, getSeerUnsupportedIssueMessage, getStatusDisplayName, isSeerSupportedIssue, isTerminalStatus } from \"./seer-BoTKAK7k.js\";\nimport { assertIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { retryWithBackoff } from \"./fetch-utils-By3YW-Mv.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/analyze-issue-with-seer.ts\nvar analyze_issue_with_seer_default = defineTool({\n\tname: \"analyze_issue_with_seer\",\n\tskills: [\"seer\"],\n\trequiredScopes: [],\n\tdescription: [\n\t\t\"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n\t\t\"\",\n\t\t\"Use this tool when:\",\n\t\t\"- The user explicitly asks for root cause analysis, Seer analysis, or help fixing/debugging an issue\",\n\t\t\"- You are unable to accurately determine the root cause from the issue details alone\",\n\t\t\"\",\n\t\t\"Do NOT call this tool as an automatic follow-up to get_sentry_resource.\",\n\t\t\"\",\n\t\t\"What this tool provides:\",\n\t\t\"- Root cause analysis with code-level explanations\",\n\t\t\"- Specific file locations and line numbers where errors occur\",\n\t\t\"- Concrete code fixes you can apply\",\n\t\t\"- Step-by-step implementation guidance\",\n\t\t\"\",\n\t\t\"This tool automatically:\",\n\t\t\"1. Checks if analysis already exists (instant results)\",\n\t\t\"2. Starts new AI analysis if needed (~2-5 minutes)\",\n\t\t\"3. Returns complete fix recommendations\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### User: \\\"Run Seer on this issue\\\"\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### User: \\\"Analyze this issue and suggest a fix\\\"\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Only use when the user explicitly requests analysis or you cannot determine the root cause from issue details alone\",\n\t\t\"- Seer Autofix does not support metric alert issues (issueCategory: metric); use get_issue_details and search_events instead\",\n\t\t\"- If the user provides an issueUrl, extract it and use that parameter alone\",\n\t\t\"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n\t\t\"- Results are cached - subsequent calls return instantly\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\tinstruction: z.string().describe(\"Optional custom instruction for the AI analysis\").optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tissueId: params.issueId,\n\t\t\tissueUrl: params.issueUrl\n\t\t});\n\t\tsetTag(\"organization.slug\", orgSlug);\n\t\tconst issue = await apiService.getIssue({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: parsedIssueId\n\t\t});\n\t\tassertIssueWithinProjectConstraint({\n\t\t\tissue,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tif (!isSeerSupportedIssue(issue)) return getSeerUnsupportedIssueMessage(issue);\n\t\tlet output = `# Seer Analysis for Issue ${parsedIssueId}\\n\\n`;\n\t\tlet autofixState = await retryWithBackoff(() => apiService.getAutofixState({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: parsedIssueId\n\t\t}), {\n\t\t\tmaxRetries: SEER_MAX_RETRIES,\n\t\t\tinitialDelay: SEER_INITIAL_RETRY_DELAY,\n\t\t\tshouldRetry: (error) => {\n\t\t\t\treturn error instanceof ApiServerError || !(error instanceof ApiError);\n\t\t\t}\n\t\t});\n\t\tif (!autofixState.autofix) {\n\t\t\toutput += `Starting new analysis...\\n\\n`;\n\t\t\tconst startResult = await apiService.startAutofix({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId,\n\t\t\t\tinstruction: params.instruction\n\t\t\t});\n\t\t\toutput += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, 1e3));\n\t\t\tautofixState = await retryWithBackoff(() => apiService.getAutofixState({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId\n\t\t\t}), {\n\t\t\t\tmaxRetries: SEER_MAX_RETRIES,\n\t\t\t\tinitialDelay: SEER_INITIAL_RETRY_DELAY,\n\t\t\t\tshouldRetry: (error) => {\n\t\t\t\t\treturn error instanceof ApiServerError || !(error instanceof ApiError);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\toutput += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\t\t\tconst existingStatus = autofixState.autofix.status;\n\t\t\tif (isTerminalStatus(existingStatus)) {\n\t\t\t\toutput += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\t\t\t\toutput += getOutputForAutofixRun(autofixState.autofix);\n\t\t\t\tif (existingStatus !== \"completed\") {\n\t\t\t\t\toutput += `\\n**Status**: ${existingStatus}\\n`;\n\t\t\t\t\toutput += getHumanInterventionGuidance(existingStatus);\n\t\t\t\t\toutput += \"\\n\";\n\t\t\t\t}\n\t\t\t\treturn output;\n\t\t\t}\n\t\t}\n\t\tconst startTime = Date.now();\n\t\tlet lastStatus = \"\";\n\t\tlet consecutiveErrors = 0;\n\t\twhile (Date.now() - startTime < SEER_TIMEOUT) {\n\t\t\tif (!autofixState.autofix) {\n\t\t\t\toutput += `Error: Analysis state lost. Please try again by running:\\n`;\n\t\t\t\toutput += `\\`\\`\\`\\n`;\n\t\t\t\toutput += params.issueUrl ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")` : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n\t\t\t\toutput += `\\n\\`\\`\\`\\n`;\n\t\t\t\treturn output;\n\t\t\t}\n\t\t\tconst status = autofixState.autofix.status;\n\t\t\tif (isTerminalStatus(status)) {\n\t\t\t\toutput += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\t\t\t\toutput += getOutputForAutofixRun(autofixState.autofix);\n\t\t\t\tif (status !== \"completed\") {\n\t\t\t\t\toutput += `\\n**Status**: ${status}\\n`;\n\t\t\t\t\toutput += getHumanInterventionGuidance(status);\n\t\t\t\t}\n\t\t\t\treturn output;\n\t\t\t}\n\t\t\tif (status !== lastStatus) {\n\t\t\t\tconst activeTodo = getActiveAutofixTodo(autofixState.autofix);\n\t\t\t\tif (activeTodo) output += `Processing: ${activeTodo}...\\n`;\n\t\t\t\tlastStatus = status;\n\t\t\t}\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, SEER_POLLING_INTERVAL));\n\t\t\ttry {\n\t\t\t\tautofixState = await retryWithBackoff(() => apiService.getAutofixState({\n\t\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\t\tissueId: parsedIssueId\n\t\t\t\t}), {\n\t\t\t\t\tmaxRetries: SEER_MAX_RETRIES,\n\t\t\t\t\tinitialDelay: SEER_INITIAL_RETRY_DELAY,\n\t\t\t\t\tshouldRetry: (error) => {\n\t\t\t\t\t\treturn error instanceof ApiServerError || !(error instanceof ApiError);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tconsecutiveErrors = 0;\n\t\t\t} catch (error) {\n\t\t\t\tconsecutiveErrors++;\n\t\t\t\tif (consecutiveErrors >= 3) {\n\t\t\t\t\toutput += `\\n## Error During Analysis\\n\\n`;\n\t\t\t\t\toutput += `Unable to retrieve analysis status after multiple attempts.\\n`;\n\t\t\t\t\toutput += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n\t\t\t\t\toutput += `You can check the status later by running the same command again:\\n`;\n\t\t\t\t\toutput += `\\`\\`\\`\\n`;\n\t\t\t\t\toutput += params.issueUrl ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")` : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n\t\t\t\t\toutput += `\\n\\`\\`\\`\\n`;\n\t\t\t\t\treturn output;\n\t\t\t\t}\n\t\t\t\toutput += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n\t\t\t}\n\t\t}\n\t\tif (autofixState.autofix) {\n\t\t\toutput += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n\t\t\toutput += getOutputForAutofixRun(autofixState.autofix);\n\t\t}\n\t\toutput += `\\n## Analysis Timed Out\\n\\n`;\n\t\toutput += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1e3}s).\\n\\n`;\n\t\toutput += `\\nYou can check the status later by running the same command again:\\n`;\n\t\toutput += `\\`\\`\\`\\n`;\n\t\toutput += params.issueUrl ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")` : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n\t\toutput += `\\n\\`\\`\\`\\n`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { analyze_issue_with_seer_default };\n//# sourceMappingURL=analyze-issue-with-seer-Dy01BWPf.js.map","import { ParamSentryGuide } from \"./schema-DKEjeVqP.js\";\nimport { ApiError } from \"./errors-DG2FreDU.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { fetchWithTimeout } from \"./fetch-utils-By3YW-Mv.js\";\nimport { z } from \"zod\";\nimport { getActiveSpan } from \"@sentry/core\";\n\n//#region src/tools/catalog/search-docs.ts\nvar search_docs_default = defineTool({\n\tname: \"search_docs\",\n\tskills: [\"inspect\", \"docs\"],\n\trequiredScopes: [],\n\tdescription: ({ experimentalMode, availableToolNames, directToolNames }) => [\n\t\t\"Search Sentry documentation for SDK setup, instrumentation, and configuration guidance.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Set up Sentry SDK or framework integrations (Django, Flask, Express, Next.js, etc.)\",\n\t\t\"- Configure features like performance monitoring, error sampling, or release tracking\",\n\t\t\"- Implement custom instrumentation (spans, transactions, breadcrumbs)\",\n\t\t\"- Configure data scrubbing, filtering, or sampling rules\",\n\t\t\"\",\n\t\t`Returns snippets only. ${formatToolCallInstruction({\n\t\t\ttoolName: \"get_doc\",\n\t\t\targuments: { path: \"...\" },\n\t\t\texperimentalMode,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames\n\t\t})} to fetch full documentation content.`,\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"```\",\n\t\t\"search_docs(query='Django setup configuration SENTRY_DSN', guide='python/django')\",\n\t\t\"search_docs(query='source maps webpack upload', guide='javascript/nextjs')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use guide parameter to filter to specific technologies (e.g., 'javascript/nextjs')\",\n\t\t\"- Include specific feature names like 'beforeSend', 'tracesSampleRate', 'SENTRY_DSN'\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\tquery: z.string().trim().min(2, \"Search query is too short. Please provide at least 2 characters.\").max(200, \"Search query is too long. Please keep your query under 200 characters.\").describe(\"The search query in natural language. Be specific about what you're looking for.\"),\n\t\tmaxResults: z.number().int().min(1).max(10).default(3).describe(\"Maximum number of results to return (1-10)\"),\n\t\tguide: ParamSentryGuide.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tlet output = `# Documentation Search Results\\n\\n`;\n\t\toutput += `**Query**: \"${params.query}\"\\n`;\n\t\tif (params.guide) output += `**Guide**: ${params.guide}\\n`;\n\t\toutput += `\\n`;\n\t\tconst host = context.mcpUrl || \"https://mcp.sentry.dev\";\n\t\tconst searchUrl = new URL(\"/api/search\", host);\n\t\tconst response = await fetchWithTimeout(searchUrl.toString(), {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: { \"Content-Type\": \"application/json\" },\n\t\t\tbody: JSON.stringify({\n\t\t\t\tquery: params.query,\n\t\t\t\tmaxResults: params.maxResults,\n\t\t\t\tguide: params.guide\n\t\t\t})\n\t\t}, 15e3);\n\t\tif (!response.ok) {\n\t\t\tconst errorData = await response.json().catch(() => null);\n\t\t\tconst errorMessage = errorData?.error || `Search failed with status ${response.status}`;\n\t\t\tthrow new ApiError(errorMessage, response.status);\n\t\t}\n\t\tconst data = await response.json();\n\t\tif (\"error\" in data && data.error) {\n\t\t\toutput += `**Error**: ${data.error}\\n\\n`;\n\t\t\treturn output;\n\t\t}\n\t\tgetActiveSpan()?.setAttribute(\"gen_ai.tool.call.result.count\", data.results.length);\n\t\tif (data.results.length === 0) {\n\t\t\toutput += \"No documentation found matching your query.\\n\\n\";\n\t\t\treturn output;\n\t\t}\n\t\toutput += `Found ${data.results.length} match${data.results.length === 1 ? \"\" : \"es\"}\\n\\n`;\n\t\toutput += `These are just snippets. ${formatToolCallInstruction({\n\t\t\ttoolName: \"get_doc\",\n\t\t\targuments: { path: \"...\" },\n\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames\n\t\t})} to fetch the full content.\\n\\n`;\n\t\tfor (const [index, result] of data.results.entries()) {\n\t\t\toutput += `## ${index + 1}. ${result.url}\\n\\n`;\n\t\t\toutput += `**Path**: ${result.id}\\n`;\n\t\t\toutput += `**Relevance**: ${(result.relevance * 100).toFixed(1)}%\\n\\n`;\n\t\t\tif (index < 3) {\n\t\t\t\toutput += \"**Matching Context**\\n\";\n\t\t\t\toutput += `> ${result.snippet.replace(/\\n/g, \"\\n> \")}\\n\\n`;\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { search_docs_default };\n//# sourceMappingURL=search-docs-DVVQKCxP.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { USER_AGENT } from \"./version-Dl3bNTAd.js\";\nimport { ApiError } from \"./errors-DG2FreDU.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { fetchWithTimeout } from \"./fetch-utils-By3YW-Mv.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-doc.ts\nvar get_doc_default = defineTool({\n\tname: \"get_doc\",\n\tskills: [\"inspect\", \"docs\"],\n\trequiredScopes: [],\n\tdescription: [\n\t\t\"Fetch the full markdown content of a Sentry documentation page.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Read the complete documentation for a specific topic\",\n\t\t\"- Get detailed implementation examples or code snippets\",\n\t\t\"- Access the full context of a documentation page\",\n\t\t\"- Extract specific sections from documentation\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Get the Next.js integration guide\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_doc(path='/platforms/javascript/guides/nextjs.md')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use the path from search_docs results for accurate fetching\",\n\t\t\"- Paths should end with .md extension\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: { path: z.string().trim().describe(\"The documentation path (e.g., '/platforms/javascript/guides/nextjs.md'). Get this from search_docs results.\") },\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tsetTag(\"doc.path\", params.path);\n\t\tlet output = `# Documentation Content\\n\\n`;\n\t\toutput += `**Path**: ${params.path}\\n\\n`;\n\t\tif (!params.path.endsWith(\".md\")) throw new UserInputError(\"Invalid documentation path. Path must end with .md extension.\");\n\t\tconst baseUrl = \"https://docs.sentry.io\";\n\t\tconst docUrl = new URL(params.path, baseUrl);\n\t\tconst allowedDomains = [\"docs.sentry.io\", \"develop.sentry.io\"];\n\t\tif (!allowedDomains.includes(docUrl.hostname)) throw new UserInputError(`Invalid domain. Documentation can only be fetched from allowed domains: ${allowedDomains.join(\", \")}`);\n\t\tconst response = await fetchWithTimeout(docUrl.toString(), { headers: {\n\t\t\tAccept: \"text/plain, text/markdown\",\n\t\t\t\"User-Agent\": USER_AGENT\n\t\t} }, 15e3);\n\t\tif (!response.ok) {\n\t\t\tif (response.status === 404) {\n\t\t\t\toutput += `**Error**: Documentation not found at this path.\\n\\n`;\n\t\t\t\toutput += `Please verify the path is correct. Common issues:\\n`;\n\t\t\t\toutput += `- Path should start with / (e.g., /platforms/javascript/guides/nextjs.md)\\n`;\n\t\t\t\toutput += `- Path should match exactly what's shown in search_docs results\\n`;\n\t\t\t\toutput += `- Some pages may have been moved or renamed\\n\\n`;\n\t\t\t\toutput += `Try searching again with \\`search_docs()\\` to find the correct path.\\n`;\n\t\t\t\treturn output;\n\t\t\t}\n\t\t\tthrow new ApiError(`Failed to fetch documentation: ${response.statusText}`, response.status);\n\t\t}\n\t\tconst content = await response.text();\n\t\tif (content.trim().startsWith(\"<!DOCTYPE\") || content.trim().startsWith(\"<html\")) {\n\t\t\toutput += `> **Error**: Received HTML instead of markdown. The path may be incorrect.\\n\\n`;\n\t\t\toutput += `Make sure to use the .md extension in the path.\\n`;\n\t\t\toutput += `Example: /platforms/javascript/guides/nextjs.md\\n`;\n\t\t\treturn output;\n\t\t}\n\t\toutput += \"---\\n\\n\";\n\t\toutput += content;\n\t\toutput += \"\\n\\n---\\n\\n\";\n\t\toutput += \"## Using this documentation\\n\\n\";\n\t\toutput += \"- This is the raw markdown content from Sentry's documentation\\n\";\n\t\toutput += \"- Code examples and configuration snippets can be copied directly\\n\";\n\t\toutput += \"- Links in the documentation are relative to https://docs.sentry.io\\n\";\n\t\toutput += \"- For more related topics, use `search_docs()` to find additional pages\\n\";\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { get_doc_default };\n//# sourceMappingURL=get-doc-CnSvhrTG.js.map","//#region src/tools/support/search-issues/config.ts\n/**\n* Configuration for the search-issues agent\n*/\nconst systemPrompt = `You translate or repair Sentry issue search requests.\n\nPRIMARY INVARIANT:\nPreserve every valid explicit Sentry search token exactly as written.\n\nDEFINITIONS:\n- Explicit token: field:value, field:>value, field:<value, field:[a,b], or boolean syntax.\n- Natural language: words outside explicit search tokens.\n\nBEHAVIOR:\n1. Use Sentry issue search syntax, NOT SQL\n2. If the input is already valid Sentry issue syntax, return the query unchanged\n3. If the input mixes explicit syntax and natural language, preserve valid explicit tokens exactly and translate only the natural-language parts\n4. Change an explicit token only if that exact token is invalid Sentry issue syntax\n5. Do not broaden, simplify, canonicalize, or add default filters to valid explicit tokens\n6. Magic values are valid when explicit: assigned:me, assigned_or_suggested:me, release:latest\n7. Use Sentry search field names, not API response property names:\n   - assigned_or_suggested, not assignedOrSuggested\n   - issue.category, not issueCategory\n8. Sort is returned only in the sort field, never inside query\n\nSYNTAX:\n- Time ranges use relative notation: -24h, -7d, -30d\n- Comparisons: >, <, >=, <=\n- Boolean operators: AND, OR, NOT (or !)\n- Field values with spaces need quotes: environment:\"dev server\"\n\nBUILT-IN FIELDS:\n- is: Issue status and inbox/substatus filters\n  Values: unresolved, resolved, ignored, archived, escalating, new, ongoing, regressed, assigned, unassigned, for_review, linked, unlinked\n  Use is:for_review for issues in the review queue.\n- level: Severity level (error, warning, info, debug, fatal)\n  IMPORTANT: Almost NEVER use this field. Terms like \"critical\", \"important\", \"severe\" refer to IMPACT not level.\n  Only use if user explicitly says \"error level\", \"warning level\", etc.\n- issue.category: Issue classification (error, feedback, outage, metric, db_query, http_client, frontend, mobile)\n  IMPORTANT: User feedback from the User Feedback Widget is stored as issues with issue.category:feedback\n  Use issue.category:feedback when users ask about \"user feedback\", \"feedback submissions\", \"user reports\", etc.\n  Never use API response property names such as issueCategory in search queries.\n- issue.type: Specific issue type slug, such as performance_n_plus_one_db_queries\n- issue.priority: Issue priority (high, medium, low)\n- environment: Deployment environment (production, staging, development)\n- release: Version/release identifier. release:latest is a magic value that resolves to the latest release for the selected project/environment.\n- release.stage: Release stage filter\n- firstRelease: The release where the issue was first seen\n- firstSeen: When the issue was FIRST encountered (use for \"new issues\", \"started\", \"began\")\n  WARNING: Excludes ongoing issues that started before the time window\n- lastSeen: When the issue was LAST encountered (use for \"from the last\", \"recent\", \"active\")\n  This includes ALL issues seen during the time window, regardless of when they started\n- event.timestamp: Event timestamp filter\n- activeSince: When the issue became active\n- assigned: Issues explicitly assigned to a user (email or \"me\")\n- assigned_or_suggested: Issues assigned to OR suggested for a user (broader match)\n- bookmarks: Issues bookmarked by a user\n- subscribed: Issues subscribed to by a user\n- has: Issues with a tag present\n- userCount: Number of unique users affected\n- timesSeen: Total number of events\n- issue.seer_actionability: Seer's AI-assessed fix difficulty (super_high, high, medium, low, super_low)\n  Use for: \"easy to fix\", \"simple fixes\", \"quick wins\", \"low-hanging fruit\", \"actionable issues\", \"trivial\"\n  Values represent how likely Seer can automatically fix the issue.\n  super_high = very easy/trivial, high = easy, medium = moderate, low/super_low = harder to fix\n\nSORTING RULES:\n- date: Last seen (default)\n- freq: Event frequency\n- new: First seen\n- user: User count\n- recommended: Sentry's prioritized ranking\n- If the user asks to sort/rank by users or impact, set sort to user.\n- If the user asks for most frequent/noisy issues, set sort to freq.\n- If the user asks for what to look at/prioritize/triage first, set sort to recommended.\n- Never put sort syntax inside query.\n\nME REFERENCES:\n- Natural-language \"assigned to me\" or \"my issues\": call whoami and use assigned_or_suggested:<email>.\n- Explicit assigned:me or assigned_or_suggested:me: do not call whoami; preserve the token exactly.\n\nCOMMON TRANSLATIONS:\n- unresolved issues -> query \"is:unresolved\", sort \"date\"\n- critical/important issues -> query \"is:unresolved\", sort \"freq\" or \"user\"\n- user feedback -> query \"issue.category:feedback\", sort \"date\"\n- easy to fix or quick wins -> query \"is:unresolved issue.seer_actionability:[high,super_high]\", sort \"date\"\n\nTOOL RESPONSE HANDLING:\nAll tools return responses in this format: {error?: string, result?: data}\n- If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections\n- If 'result' is present: The tool succeeded - use the result data for your query construction\n- Always check for errors before using results\n\nUse issueFields only when a requested field is not in the built-in fields list.\nUse whoami only for natural-language me references.`;\n\n//#endregion\nexport { systemPrompt };\n//# sourceMappingURL=config-lLg5qzu0.js.map","import { callEmbeddedAgent } from \"./callEmbeddedAgent-ffwEeqdP.js\";\nimport { createDatasetFieldsTool } from \"./dataset-fields-CBauoBBr.js\";\nimport { createWhoamiTool } from \"./whoami-DU_KhHDm.js\";\nimport { systemPrompt } from \"./config-lLg5qzu0.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/support/search-issues/agent.ts\nconst searchIssuesAgentOutputSchema = z.object({\n\tquery: z.string().describe(\"The Sentry issue search query\"),\n\tsort: z.enum([\n\t\t\"date\",\n\t\t\"freq\",\n\t\t\"new\",\n\t\t\"user\",\n\t\t\"recommended\"\n\t]).nullable().describe(\"How to sort the results\"),\n\texplanation: z.string().default(\"\").describe(\"Brief explanation of how you translated this query.\")\n});\n/**\n* Search issues agent - single entry point for translating natural language queries to Sentry issue search syntax\n* This returns both the translated query result AND the tool calls made by the agent\n*/\nasync function searchIssuesAgent(options) {\n\treturn await callEmbeddedAgent({\n\t\tsystem: systemPrompt,\n\t\tprompt: options.query,\n\t\ttools: {\n\t\t\tissueFields: createDatasetFieldsTool({\n\t\t\t\tapiService: options.apiService,\n\t\t\t\torganizationSlug: options.organizationSlug,\n\t\t\t\tdataset: \"search_issues\",\n\t\t\t\tprojectId: options.projectId\n\t\t\t}),\n\t\t\twhoami: createWhoamiTool({ apiService: options.apiService })\n\t\t},\n\t\tschema: searchIssuesAgentOutputSchema\n\t});\n}\n\n//#endregion\nexport { searchIssuesAgent, searchIssuesAgentOutputSchema };\n//# sourceMappingURL=agent-BIAUd2t1.js.map","import { logInfo } from \"./logging-B7X3yL0T.js\";\nimport { getIssueUrl, getIssuesSearchUrl } from \"./url-utils-CYEhmNHi.js\";\nimport { formatAvailableToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { getSeerActionabilityLabel } from \"./formatting-Cviy8-dX.js\";\n\n//#region src/tools/support/search-issues/formatters.ts\n/**\n* Format an explanation for how the input query was translated\n*/\nfunction formatExplanation(explanation) {\n\treturn `## How I interpreted your query\\n\\n${explanation}`;\n}\n/**\n* Format issue search results for display\n*/\nfunction formatIssueResults(params) {\n\tconst { issues, organizationSlug, projectSlugOrId, query, regionUrl, host, protocol = \"https\", inputQuery, skipHeader = false, experimentalMode = false, availableToolNames, directToolNames } = params;\n\tconst region = regionUrl ? new URL(regionUrl) : null;\n\tconst resolvedHost = region?.host || host || \"sentry.io\";\n\tconst resolvedProtocol = region?.protocol.replace(\":\", \"\") || protocol;\n\tlet output = \"\";\n\tif (!skipHeader) {\n\t\tif (inputQuery) output = `# Search Results for \"${inputQuery}\"\\n\\n`;\n\t\telse {\n\t\t\toutput = `# Issues in **${organizationSlug}`;\n\t\t\tif (projectSlugOrId) output += `/${projectSlugOrId}`;\n\t\t\toutput += \"**\\n\\n\";\n\t\t}\n\t\toutput += `**Suggested presentation:** Cards work well for these issues, with status, assignee, and issue ID links visible.\\n\\n`;\n\t}\n\tif (issues.length === 0) {\n\t\tlogInfo(`No issues found for query: ${inputQuery || query}`, { extra: {\n\t\t\tquery,\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: projectSlugOrId,\n\t\t\tinputQuery\n\t\t} });\n\t\toutput += \"No issues found matching your search criteria.\\n\\n\";\n\t\toutput += \"Try adjusting your search criteria or time range.\";\n\t\treturn output;\n\t}\n\tconst searchUrl = getIssuesSearchUrl(resolvedHost, organizationSlug, query, projectSlugOrId, resolvedProtocol);\n\toutput += `**View these results in Sentry**:\\n${searchUrl}\\n`;\n\toutput += `Please tell the user this dashboard link is available if they want to open the results in Sentry.\\n\\n`;\n\toutput += `Found **${issues.length}** issue${issues.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\tissues.forEach((issue, index) => {\n\t\tconst issueUrl = getIssueUrl(resolvedHost, organizationSlug, issue.shortId, resolvedProtocol);\n\t\toutput += `## ${index + 1}. [${issue.shortId}](${issueUrl})\\n\\n`;\n\t\toutput += `**${issue.title}**\\n\\n`;\n\t\toutput += `- **Status**: ${issue.status}\\n`;\n\t\tif (issue.issueCategory && issue.issueCategory !== \"error\") output += `- **Category**: ${issue.issueCategory}\\n`;\n\t\toutput += `- **Users**: ${issue.userCount || 0}\\n`;\n\t\toutput += `- **Events**: ${issue.count || 0}\\n`;\n\t\tif (issue.assignedTo) {\n\t\t\tconst assignee = issue.assignedTo;\n\t\t\tif (typeof assignee === \"string\") output += `- **Assigned to**: ${assignee}\\n`;\n\t\t\telse if (assignee && typeof assignee === \"object\" && \"name\" in assignee) output += `- **Assigned to**: ${assignee.name}\\n`;\n\t\t}\n\t\toutput += `- **First seen**: ${formatDate(issue.firstSeen)}\\n`;\n\t\toutput += `- **Last seen**: ${formatDate(issue.lastSeen)}\\n`;\n\t\tif (issue.culprit) output += `- **Culprit**: \\`${issue.culprit}\\`\\n`;\n\t\tif (issue.seerFixabilityScore != null) output += `- **Seer Actionability**: ${getSeerActionabilityLabel(issue.seerFixabilityScore)}\\n`;\n\t\toutput += \"\\n\";\n\t});\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- Get more details about a specific issue: Use get_sentry_resource with the issue ID or issue URL\\n\";\n\tconst updateIssueInstruction = formatAvailableToolCallInstruction({\n\t\ttoolName: \"update_issue\",\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames,\n\t\tpurpose: \"to resolve or assign issues\"\n\t});\n\tif (updateIssueInstruction) output += `- Update issue status: ${updateIssueInstruction}\\n`;\n\toutput += \"- View event counts: Use search_events for aggregated statistics\\n\";\n\tconst hasFeedback = issues.some((i) => i.issueCategory === \"feedback\");\n\tif (hasFeedback) output += \"- View feedback details: Use get_sentry_resource to see full feedback content and linked error events\\n\";\n\treturn output;\n}\n/**\n* Format date for display\n*/\nfunction formatDate(dateString) {\n\tif (!dateString) return \"N/A\";\n\tconst date = new Date(dateString);\n\tconst now = /* @__PURE__ */ new Date();\n\tconst diffMs = now.getTime() - date.getTime();\n\tconst diffHours = Math.floor(diffMs / (1e3 * 60 * 60));\n\tif (diffHours < 1) {\n\t\tconst diffMinutes = Math.floor(diffMs / (1e3 * 60));\n\t\treturn `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n\t}\n\tif (diffHours < 24) return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n\tconst diffDays = Math.floor(diffHours / 24);\n\tif (diffDays < 30) return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n\treturn date.toISOString().split(\"T\")[0];\n}\n\n//#endregion\nexport { formatExplanation, formatIssueResults };\n//# sourceMappingURL=formatters-3Z1cdvzp.js.map","import { SEARCH_ISSUES_PERIOD_VALUES } from \"./constants-CEZaLsGe.js\";\nimport { isNumericId, validateSlugOrId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { hasAgentProvider } from \"./provider-factory-Cs_2DBhe.js\";\nimport { withProviderFallback } from \"./provider-fallback-L61Pbfxx.js\";\nimport { searchIssuesAgent } from \"./agent-BIAUd2t1.js\";\nimport { formatExplanation, formatIssueResults } from \"./formatters-3Z1cdvzp.js\";\nimport { z } from \"zod\";\nimport { getActiveSpan, setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/search-issues.ts\nconst ProjectSlugOrIdSchema = z.string().trim().superRefine(validateSlugOrId);\nfunction buildIssueSearchRepairPrompt(params) {\n\treturn [\n\t\t\"Fix this Sentry issue search request.\",\n\t\t\"The query may be natural language, Sentry issue search syntax, or a mix of both.\",\n\t\t\"Explicit Sentry search terms are authoritative. A token in field:value syntax must be preserved exactly unless Sentry would reject that specific token.\",\n\t\t\"Magic values in explicit syntax, such as me and latest, are valid and must be preserved.\",\n\t\t\"Do not remove, replace, broaden, simplify, or canonicalize valid explicit filters.\",\n\t\t\"Only translate natural-language words around explicit filters, add missing filters that are clearly requested, or correct syntax that would fail.\",\n\t\t\"Sort may be corrected when the requested sort conflicts with the user's intent, but sort must stay out of the query string.\",\n\t\t\"\",\n\t\t`User query: ${params.query}`,\n\t\t\"Current parameters:\",\n\t\tJSON.stringify({ sort: params.sort }, null, 2)\n\t].join(\"\\n\");\n}\nvar search_issues_default = defineTool({\n\tname: \"search_issues\",\n\tskills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Search for grouped issues/problems in Sentry - returns a LIST of issues, NOT counts or aggregations.\",\n\t\t\"\",\n\t\t\"Provide `query` as natural language or Sentry issue search syntax. When an embedded agent is configured, it fixes query and sort before running while preserving explicit Sentry search syntax.\",\n\t\t\"\",\n\t\t\"Returns grouped issues with metadata like title, status, and user count.\",\n\t\t\"\",\n\t\t\"Common Query Syntax:\",\n\t\t\"- is:unresolved / is:resolved / is:ignored / is:for_review / is:new / is:regressed / is:escalating\",\n\t\t\"- level:error / level:warning\",\n\t\t\"- firstSeen:-24h / lastSeen:-7d\",\n\t\t\"- assigned:me / assigned_or_suggested:me\",\n\t\t\"- release:latest\",\n\t\t\"- issue.category:feedback\",\n\t\t\"- issue.priority:high\",\n\t\t\"- environment:production\",\n\t\t\"- userCount:>100\",\n\t\t\"\",\n\t\t\"DO NOT USE FOR COUNTS/AGGREGATIONS → use search_events\",\n\t\t\"DO NOT USE FOR individual events with timestamps → use search_events\",\n\t\t\"DO NOT USE FOR details about a specific issue → use get_sentry_resource\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"search_issues(organizationSlug='my-org', query='critical bugs from last week')\",\n\t\t\"search_issues(organizationSlug='my-org', query='is:unresolved is:unassigned', sort='freq')\",\n\t\t\"search_issues(organizationSlug='my-org', query='level:error firstSeen:-24h', projectSlugOrId='my-project')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlugOrId>.\",\n\t\t\"- Parse org/project notation directly without calling find_organizations or find_projects.\",\n\t\t\"- The projectSlugOrId parameter accepts both project slugs (e.g., 'my-project') and numeric IDs (e.g., '123456').\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tquery: z.string().trim().default(\"is:unresolved\").describe(\"Natural language or Sentry issue search query syntax.\"),\n\t\tsort: z.enum([\n\t\t\t\"date\",\n\t\t\t\"freq\",\n\t\t\t\"new\",\n\t\t\t\"user\",\n\t\t\t\"recommended\"\n\t\t]).default(\"date\").describe(\"Sort order: date (last seen), freq (frequency), new (first seen), user (user count), recommended (Sentry's prioritized ranking)\"),\n\t\tprojectSlugOrId: ProjectSlugOrIdSchema.nullable().default(null).describe(\"The project's slug or numeric ID (optional)\"),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tlimit: z.number().min(1).max(100).default(10).describe(\"Maximum number of issues to return (1-100)\"),\n\t\tperiod: z.enum(SEARCH_ISSUES_PERIOD_VALUES).default(\"30d\").describe(\"Time window for issue search results. Controls which issues are returned based on when they had activity. Default 30d is a balance between coverage and query performance; use 24h for very recent issues or 90d for broader historical searches.\"),\n\t\tincludeExplanation: z.boolean().default(false).describe(\"Include explanation of how the query was translated or repaired\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tif (params.projectSlugOrId) if (isNumericId(params.projectSlugOrId)) setTag(\"project.id\", params.projectSlugOrId);\n\t\telse setTag(\"project.slug\", params.projectSlugOrId);\n\t\tlet query;\n\t\tlet sort;\n\t\tlet explanation;\n\t\tlet projectId;\n\t\tif (params.projectSlugOrId) {\n\t\t\tconst projectSlugOrId = ProjectSlugOrIdSchema.parse(params.projectSlugOrId);\n\t\t\tif (isNumericId(projectSlugOrId)) projectId = projectSlugOrId;\n\t\t\telse {\n\t\t\t\tconst project = await apiService.getProject({\n\t\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\t\tprojectSlugOrId\n\t\t\t\t});\n\t\t\t\tprojectId = String(project.id);\n\t\t\t}\n\t\t}\n\t\tif (hasAgentProvider()) {\n\t\t\tconst translatedQuery = await withProviderFallback({\n\t\t\t\toperation: \"search_issues.rewrite\",\n\t\t\t\tfallback: () => ({\n\t\t\t\t\tquery: params.query,\n\t\t\t\t\tsort: params.sort,\n\t\t\t\t\texplanation: \"\"\n\t\t\t\t}),\n\t\t\t\trun: async () => (await searchIssuesAgent({\n\t\t\t\t\tquery: buildIssueSearchRepairPrompt({\n\t\t\t\t\t\tquery: params.query,\n\t\t\t\t\t\tsort: params.sort\n\t\t\t\t\t}),\n\t\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\t\tapiService,\n\t\t\t\t\tprojectId\n\t\t\t\t})).result\n\t\t\t});\n\t\t\tquery = translatedQuery.query ?? params.query;\n\t\t\tsort = translatedQuery.sort || params.sort;\n\t\t\texplanation = translatedQuery.explanation;\n\t\t} else {\n\t\t\tquery = params.query;\n\t\t\tsort = params.sort;\n\t\t}\n\t\tconst issues = await apiService.listIssues({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectId,\n\t\t\tquery,\n\t\t\tsortBy: sort,\n\t\t\tlimit: params.limit,\n\t\t\tstatsPeriod: params.period\n\t\t});\n\t\tgetActiveSpan()?.setAttribute(\"gen_ai.tool.call.result.count\", issues.length);\n\t\tlet output = \"\";\n\t\tif (params.includeExplanation && explanation) {\n\t\t\toutput += `# Search Results for \"${params.query}\"\\n\\n`;\n\t\t\toutput += `**Suggested presentation:** Cards work well for these issues, with status, assignee, and issue ID links visible.\\n\\n`;\n\t\t\toutput += `## Query Translation\\n`;\n\t\t\toutput += `Input query: \"${params.query}\"\\n`;\n\t\t\toutput += `Sentry query: \\`${query}\\``;\n\t\t\toutput += `\\nSort: ${sort}`;\n\t\t\toutput += `\\n\\n`;\n\t\t\tif (explanation) {\n\t\t\t\toutput += formatExplanation(explanation);\n\t\t\t\toutput += `\\n\\n`;\n\t\t\t}\n\t\t\toutput += formatIssueResults({\n\t\t\t\tissues,\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tprojectSlugOrId: params.projectSlugOrId ?? void 0,\n\t\t\t\tquery,\n\t\t\t\tregionUrl: params.regionUrl ?? void 0,\n\t\t\t\thost: context.sentryHost,\n\t\t\t\tprotocol: context.sentryProtocol,\n\t\t\t\tinputQuery: params.query,\n\t\t\t\tskipHeader: true,\n\t\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\t\tdirectToolNames: context.directToolNames\n\t\t\t});\n\t\t} else output = formatIssueResults({\n\t\t\tissues,\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectSlugOrId: params.projectSlugOrId ?? void 0,\n\t\t\tquery,\n\t\t\tregionUrl: params.regionUrl ?? void 0,\n\t\t\thost: context.sentryHost,\n\t\t\tprotocol: context.sentryProtocol,\n\t\t\tinputQuery: params.query,\n\t\t\tskipHeader: false,\n\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames\n\t\t});\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { search_issues_default };\n//# sourceMappingURL=search-issues-CQ0efOru.js.map","//#region src/tools/support/search-issue-events/config.ts\nconst systemPrompt = `You are a Sentry issue event filter translator. Your job is to:\n1. Translate natural language queries into Sentry tag filters for events within a SPECIFIC issue\n2. Select appropriate fields to return in the results\n3. Determine sort order and time ranges\n\nIMPORTANT CONTEXT:\n- You are filtering events WITHIN a specific issue (the API endpoint is already scoped to that issue)\n- DO NOT include \"issue:\" in your query - the endpoint filters by issue automatically\n- Focus on tag-based filtering: release, environment, user, trace ID, URL, etc.\n- You are working with the \"errors\" dataset (issues are groups of error events)\n\nCRITICAL - TAG FIELD VERIFICATION:\nBefore using ANY tag or field, you should call the issueEventFields tool to verify it exists:\n1. Available tags vary by project and what data is being sent\n2. Using non-existent tags will cause query failures\n3. The issueEventFields tool returns ALL available tags for the issue's project\n4. Field names may not be what you expect (e.g., \"user_agent.original\" not \"browser\")\n\nTOOL USAGE GUIDELINES:\n1. Use issueEventFields tool (no parameters) to discover available tags and fields\n2. Use whoami tool when queries reference \"me\", \"my\", or \"myself\" for user.id/user.email\n3. CRITICAL: All tools return {error?, result?} format - check for errors before using results\n\nQUERY CONSTRUCTION:\nYour query should contain ONLY the filter expressions (tags, operators, values):\n- CORRECT: \"environment:production release:v1.0.5\"\n- CORRECT: \"user.email:alice@example.com\"\n- CORRECT: 'url:\"*/checkout/*\"'\n- WRONG: \"issue:MCP-41 environment:production\" ← DO NOT include issue: prefix\n\nCOMMON TAG PATTERNS:\n- release:VERSION - Filter by software release/version\n- environment:ENV - Filter by environment (production, staging, development)\n- user:USER_ID or user.email:EMAIL - Filter by user\n- trace:TRACE_ID - Filter by distributed trace ID\n- url:URL_PATTERN - Filter by request URL (use wildcards: \"*/path/*\")\n- transaction:NAME - Filter by transaction name\n- level:LEVEL - Filter by error level (error, warning, fatal, info)\n- device:DEVICE - Filter by device identifier\n- os:OS_NAME - Filter by operating system\n- browser:BROWSER - Filter by browser name\n- runtime:RUNTIME - Filter by runtime version (e.g., \"python 3.11\")\n\nWILDCARD MATCHING:\n- Use \"*\" for wildcards in string values\n- Example: url:\"*/checkout/*\" matches any URL containing /checkout/\n- Example: release:\"1.2.*\" matches any 1.2.x release\n\nTIME RANGE HANDLING:\nFor time-based queries (\"last hour\", \"yesterday\", \"from Dec 16\"):\n- Relative: Use statsPeriod (\"1h\", \"24h\", \"7d\", \"14d\", \"30d\")\n  - \"last hour\" → {\"statsPeriod\": \"1h\"}\n  - \"yesterday\" → {\"statsPeriod\": \"24h\"}\n  - \"last week\" → {\"statsPeriod\": \"7d\"}\n- Absolute: Use start/end (ISO 8601 format)\n  - \"from Dec 16 2025 17:50 UTC\" → {\"start\": \"2025-12-16T17:50:00Z\", \"end\": \"2025-12-17T23:59:59Z\"}\n- Default: If no time mentioned, use {\"statsPeriod\": \"14d\"}\n\nFIELD SELECTION:\n- Use recommended default fields unless user asks for specific data\n- For custom fields, verify availability with issueEventFields tool\n- Common useful fields:\n  - id: Event ID\n  - timestamp: When event occurred\n  - title: Event title/message\n  - message: Full error message\n  - environment: Deployment environment\n  - release: Release version\n  - trace: Trace ID\n  - url: Request URL\n  - device: Device identifier\n  - os: Operating system\n  - runtime: Runtime environment\n\nSORTING RULES (CRITICAL):\n1. ALWAYS specify a sort parameter\n2. Default: \"-timestamp\" (newest first) for time-based browsing\n3. Use \"-\" prefix for descending order\n4. CRITICAL: Sort field MUST be included in your fields array\n5. Examples:\n   - sort: \"-timestamp\", fields: [\"id\", \"timestamp\", \"message\"]  ✓ CORRECT\n   - sort: \"-level\", fields: [\"id\", \"timestamp\"]  ✗ WRONG (level not in fields)\n\nDO NOT USE:\n- Aggregate functions (count, avg, sum) - this tool returns individual events, not statistics\n- SQL syntax (IS NULL, yesterday(), etc.) - use has: operator and timeRange instead\n- Field existence checks unless necessary (has:field_name, !has:field_name)\n\nHANDLING \"ME\" REFERENCES:\n- If query contains \"me\", \"my errors\", \"assigned to me\", use whoami tool\n- Replace \"me\" with actual user.id or user.email value\n- Example: \"my errors\" + whoami returns user.email:\"alice@example.com\"\n  → query: \"user.email:alice@example.com\"\n\nYOUR RESPONSE FORMAT:\nReturn a JSON object with:\n- \"query\": Tag filter expressions (empty string \"\" for no filters)\n- \"fields\": Array of field names to return (use recommended defaults if not specified)\n- \"sort\": Sort parameter (REQUIRED - default to \"-timestamp\")\n- \"timeRange\": Optional time range\n  - Relative: {\"statsPeriod\": \"24h\"}\n  - Absolute: {\"start\": \"2025-01-01T00:00:00Z\", \"end\": \"2025-01-02T00:00:00Z\"}\n  - Omit for default 14-day window\n- \"explanation\": Brief explanation of how you translated the query\n\nCORRECT QUERY EXAMPLES:\n1. \"events from last hour\"\n   → {\n       \"query\": \"\",\n       \"fields\": [\"id\", \"timestamp\", \"title\", \"message\", \"level\"],\n       \"sort\": \"-timestamp\",\n       \"timeRange\": {\"statsPeriod\": \"1h\"},\n       \"explanation\": \"Filtering to events from last hour, sorted newest first\"\n     }\n\n2. \"production events with release v1.0.5\"\n   → {\n       \"query\": \"environment:production release:v1.0.5\",\n       \"fields\": [\"id\", \"timestamp\", \"title\", \"environment\", \"release\"],\n       \"sort\": \"-timestamp\",\n       \"timeRange\": {\"statsPeriod\": \"14d\"},\n       \"explanation\": \"Filtering to production environment with specific release\"\n     }\n\n3. \"errors affecting user alice@example.com\"\n   → {\n       \"query\": \"user.email:alice@example.com\",\n       \"fields\": [\"id\", \"timestamp\", \"title\", \"user.display\", \"message\"],\n       \"sort\": \"-timestamp\",\n       \"timeRange\": {\"statsPeriod\": \"14d\"},\n       \"explanation\": \"Filtering to events affecting specific user\"\n     }\n\n4. \"events with trace ID abc123\"\n   → {\n       \"query\": \"trace:abc123\",\n       \"fields\": [\"id\", \"timestamp\", \"title\", \"trace\", \"url\", \"transaction\"],\n       \"sort\": \"-timestamp\",\n       \"timeRange\": {\"statsPeriod\": \"14d\"},\n       \"explanation\": \"Filtering to events with specific trace ID\"\n     }\n\nPROCESS:\n1. Analyze the user's natural language query\n2. Call issueEventFields tool to discover available tags (if needed)\n3. Call whoami tool if query references \"me\" (if needed)\n4. Construct tag filters (WITHOUT \"issue:\" prefix)\n5. Select appropriate fields\n6. Determine sort order (default: \"-timestamp\")\n7. Determine time range (if applicable)\n8. Return JSON response with explanation\n\nCOMMON ERRORS TO AVOID:\n- Including \"issue:\" in query (handler adds this automatically)\n- Using aggregate functions like count() or avg()\n- Using non-existent field names (verify with issueEventFields tool)\n- Forgetting to include sort field in fields array\n- Using SQL syntax instead of Sentry query syntax`;\nconst ISSUE_EVENT_TAGS = {\n\trelease: \"Software version/release identifier\",\n\tenvironment: \"Deployment environment (production, staging, development, etc.)\",\n\tlevel: \"Error severity level (error, warning, fatal, info, debug)\",\n\tuser: \"User identifier\",\n\t\"user.id\": \"User ID\",\n\t\"user.email\": \"User email address\",\n\t\"user.username\": \"Username\",\n\t\"user.display\": \"User display name (formatted)\",\n\ttransaction: \"Transaction name/route\",\n\turl: \"Request URL\",\n\ttrace: \"Distributed trace ID\",\n\tdevice: \"Device identifier\",\n\t\"device.family\": \"Device family\",\n\tos: \"Operating system name\",\n\t\"os.name\": \"OS name\",\n\t\"os.version\": \"OS version\",\n\truntime: \"Runtime environment\",\n\t\"runtime.name\": \"Runtime name (e.g., CPython)\",\n\t\"runtime.version\": \"Runtime version\",\n\tbrowser: \"Browser identifier\",\n\t\"browser.name\": \"Browser name\",\n\t\"browser.version\": \"Browser version\",\n\thandled: \"Whether error was handled (true/false)\",\n\tmechanism: \"Error mechanism type\",\n\t\"error.type\": \"Exception type/class name\",\n\t\"stack.filename\": \"Source file where error occurred\",\n\t\"stack.function\": \"Function where error occurred\",\n\t\"stack.module\": \"Module where error occurred\",\n\tplatform: \"SDK platform (javascript, python, etc.)\",\n\t\"sdk.name\": \"SDK name\",\n\t\"sdk.version\": \"SDK version\",\n\t\"http.method\": \"HTTP request method\",\n\t\"http.status_code\": \"HTTP status code\",\n\t\"user_agent.original\": \"Original user agent string\"\n};\nconst RECOMMENDED_FIELDS = [\n\t\"id\",\n\t\"timestamp\",\n\t\"title\",\n\t\"message\",\n\t\"level\",\n\t\"environment\",\n\t\"release\",\n\t\"user.display\",\n\t\"trace\",\n\t\"url\"\n];\nconst EXAMPLE_QUERIES = [\n\t{\n\t\tdescription: \"Events from last hour\",\n\t\toutput: {\n\t\t\tquery: \"\",\n\t\t\tfields: RECOMMENDED_FIELDS,\n\t\t\tsort: \"-timestamp\",\n\t\t\ttimeRange: { statsPeriod: \"1h\" }\n\t\t}\n\t},\n\t{\n\t\tdescription: \"Production events with specific release\",\n\t\toutput: {\n\t\t\tquery: \"environment:production release:09f66121-a5a3-4947-8be1-1454c4cefa3d\",\n\t\t\tfields: [\n\t\t\t\t\"id\",\n\t\t\t\t\"timestamp\",\n\t\t\t\t\"title\",\n\t\t\t\t\"environment\",\n\t\t\t\t\"release\",\n\t\t\t\t\"user.display\"\n\t\t\t],\n\t\t\tsort: \"-timestamp\",\n\t\t\ttimeRange: { statsPeriod: \"7d\" }\n\t\t}\n\t},\n\t{\n\t\tdescription: \"Events affecting specific user\",\n\t\toutput: {\n\t\t\tquery: \"user.email:alice@example.com\",\n\t\t\tfields: [\n\t\t\t\t\"id\",\n\t\t\t\t\"timestamp\",\n\t\t\t\t\"title\",\n\t\t\t\t\"user.display\",\n\t\t\t\t\"user.email\",\n\t\t\t\t\"message\"\n\t\t\t],\n\t\t\tsort: \"-timestamp\",\n\t\t\ttimeRange: { statsPeriod: \"14d\" }\n\t\t}\n\t},\n\t{\n\t\tdescription: \"Events with specific trace ID\",\n\t\toutput: {\n\t\t\tquery: \"trace:abc123def456\",\n\t\t\tfields: [\n\t\t\t\t\"id\",\n\t\t\t\t\"timestamp\",\n\t\t\t\t\"title\",\n\t\t\t\t\"trace\",\n\t\t\t\t\"url\",\n\t\t\t\t\"transaction\"\n\t\t\t],\n\t\t\tsort: \"-timestamp\",\n\t\t\ttimeRange: { statsPeriod: \"14d\" }\n\t\t}\n\t},\n\t{\n\t\tdescription: \"Events from checkout flow\",\n\t\toutput: {\n\t\t\tquery: \"url:\\\"*/checkout/*\\\"\",\n\t\t\tfields: [\n\t\t\t\t\"id\",\n\t\t\t\t\"timestamp\",\n\t\t\t\t\"title\",\n\t\t\t\t\"url\",\n\t\t\t\t\"transaction\",\n\t\t\t\t\"user.display\"\n\t\t\t],\n\t\t\tsort: \"-timestamp\",\n\t\t\ttimeRange: { statsPeriod: \"7d\" }\n\t\t}\n\t},\n\t{\n\t\tdescription: \"Fatal errors only\",\n\t\toutput: {\n\t\t\tquery: \"level:fatal\",\n\t\t\tfields: [\n\t\t\t\t\"id\",\n\t\t\t\t\"timestamp\",\n\t\t\t\t\"title\",\n\t\t\t\t\"level\",\n\t\t\t\t\"message\",\n\t\t\t\t\"error.type\"\n\t\t\t],\n\t\t\tsort: \"-timestamp\",\n\t\t\ttimeRange: { statsPeriod: \"30d\" }\n\t\t}\n\t},\n\t{\n\t\tdescription: \"Events on mobile devices\",\n\t\toutput: {\n\t\t\tquery: \"device:mobile OR device.family:mobile\",\n\t\t\tfields: [\n\t\t\t\t\"id\",\n\t\t\t\t\"timestamp\",\n\t\t\t\t\"title\",\n\t\t\t\t\"device\",\n\t\t\t\t\"device.family\",\n\t\t\t\t\"os\",\n\t\t\t\t\"browser\"\n\t\t\t],\n\t\t\tsort: \"-timestamp\",\n\t\t\ttimeRange: { statsPeriod: \"7d\" }\n\t\t}\n\t},\n\t{\n\t\tdescription: \"Events from specific browser\",\n\t\toutput: {\n\t\t\tquery: \"browser.name:Chrome\",\n\t\t\tfields: [\n\t\t\t\t\"id\",\n\t\t\t\t\"timestamp\",\n\t\t\t\t\"title\",\n\t\t\t\t\"browser.name\",\n\t\t\t\t\"browser.version\",\n\t\t\t\t\"os\"\n\t\t\t],\n\t\t\tsort: \"-timestamp\",\n\t\t\ttimeRange: { statsPeriod: \"7d\" }\n\t\t}\n\t}\n];\n\n//#endregion\nexport { EXAMPLE_QUERIES, ISSUE_EVENT_TAGS, RECOMMENDED_FIELDS, systemPrompt };\n//# sourceMappingURL=config-ChOUIglS.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { resolveScopedOrganizationSlug } from \"./url-scope-CRM5sNo7.js\";\nimport { agentTool, recordAgentToolResultCount } from \"./utils-DHwF0RI3.js\";\nimport { EXAMPLE_QUERIES, ISSUE_EVENT_TAGS, RECOMMENDED_FIELDS } from \"./config-ChOUIglS.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/support/search-issue-events/utils.ts\n/**\n* Create a tool for the agent to query available tags and fields for issue events\n* The tool is pre-bound with the API service and organization configured for the appropriate region\n*/\nfunction createIssueEventFieldsTool(options) {\n\tconst { apiService, organizationSlug, projectId } = options;\n\treturn agentTool({\n\t\tdescription: \"Get available tags and fields for issue events to understand what filters are available\",\n\t\tparameters: z.object({}),\n\t\texecute: async () => {\n\t\t\tconst tagsResponse = await apiService.listTags({\n\t\t\t\torganizationSlug,\n\t\t\t\tdataset: \"events\",\n\t\t\t\tproject: projectId,\n\t\t\t\tstatsPeriod: \"14d\",\n\t\t\t\tuseCache: true,\n\t\t\t\tuseFlagsBackend: true\n\t\t\t});\n\t\t\tconst availableTags = {};\n\t\t\tfor (const tag of tagsResponse) if (tag.key) {\n\t\t\t\tconst knownTagDescription = ISSUE_EVENT_TAGS[tag.key];\n\t\t\t\tavailableTags[tag.key] = tag.name || knownTagDescription || tag.key;\n\t\t\t}\n\t\t\tconst allTags = {\n\t\t\t\t...ISSUE_EVENT_TAGS,\n\t\t\t\t...availableTags\n\t\t\t};\n\t\t\tconst tagCount = Object.keys(allTags).length;\n\t\t\trecordAgentToolResultCount(tagCount);\n\t\t\treturn `Available Tags and Fields (${tagCount} total):\n\nCommon Tags:\n${Object.entries(ISSUE_EVENT_TAGS).slice(0, 30).map(([key, desc]) => `- ${key}: ${desc}`).join(\"\\n\")}\n${Object.keys(ISSUE_EVENT_TAGS).length > 30 ? `\\n... and ${Object.keys(ISSUE_EVENT_TAGS).length - 30} more common tags` : \"\"}\n\nProject-Specific Tags (from API):\n${Object.entries(availableTags).filter(([key]) => !ISSUE_EVENT_TAGS[key]).slice(0, 20).map(([key, desc]) => `- ${key}: ${desc}`).join(\"\\n\")}\n\nRecommended Fields for Results:\n${RECOMMENDED_FIELDS.map((f) => `- ${f}`).join(\"\\n\")}\n\nEXAMPLE QUERIES:\n${EXAMPLE_QUERIES.map((ex) => `- \"${ex.description}\" →\\n  ${JSON.stringify(ex.output, null, 2)}`).join(\"\\n\\n\")}\n\nIMPORTANT:\n- Use these tag names exactly as shown in your query\n- Tags are case-insensitive\n- Use wildcards with quotes: url:\"*/checkout/*\"\n- Your query should NOT include \"issue:\" prefix - the handler adds it automatically`;\n\t\t}\n\t});\n}\n/**\n* Parse issue parameters from various input formats\n* Supports both direct issueId/organizationSlug and issueUrl parsing\n*/\nfunction parseIssueParams(params) {\n\tif (params.issueUrl) {\n\t\tconst orgMatch = params.issueUrl.match(/\\/organizations\\/([^/]+)\\/issues\\/([^/?]+)/) || params.issueUrl.match(/https?:\\/\\/([^.]+)\\.sentry\\.io\\/issues\\/([^/?]+)/);\n\t\tif (!orgMatch) throw new UserInputError(`Invalid issue URL format. Expected format like:\n- https://sentry.io/organizations/my-org/issues/123/\n- https://my-org.sentry.io/issues/123/\n\nReceived: ${params.issueUrl}`);\n\t\treturn {\n\t\t\torganizationSlug: resolveScopedOrganizationSlug({\n\t\t\t\tresourceLabel: \"Issue\",\n\t\t\t\tscopedOrganizationSlug: params.organizationSlug,\n\t\t\t\turlOrganizationSlug: orgMatch[1]\n\t\t\t}),\n\t\t\tissueId: orgMatch[2]\n\t\t};\n\t}\n\tif (!params.issueId) throw new UserInputError(\"Must provide either issueUrl or issueId parameter. Use issueUrl for convenience, or provide both issueId and organizationSlug.\");\n\tif (!params.organizationSlug) throw new UserInputError(\"When using issueId parameter, organizationSlug is required. Alternatively, provide issueUrl which includes both organization and issue ID.\");\n\treturn {\n\t\torganizationSlug: params.organizationSlug,\n\t\tissueId: params.issueId\n\t};\n}\n\n//#endregion\nexport { createIssueEventFieldsTool, parseIssueParams };\n//# sourceMappingURL=utils-_4r1K2PE.js.map","import { callEmbeddedAgent } from \"./callEmbeddedAgent-ffwEeqdP.js\";\nimport { createWhoamiTool } from \"./whoami-DU_KhHDm.js\";\nimport { systemPrompt } from \"./config-ChOUIglS.js\";\nimport { createIssueEventFieldsTool } from \"./utils-_4r1K2PE.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/support/search-issue-events/agent.ts\nconst searchIssueEventsAgentOutputSchema = z.object({\n\tquery: z.string().describe(\"Sentry query filters for tags/fields (NOT including issue: prefix - handler adds that)\"),\n\tfields: z.array(z.string()).describe(\"Array of field names to return in results\"),\n\tsort: z.string().describe(\"Sort parameter for results (e.g., -timestamp)\"),\n\ttimeRange: z.union([\n\t\tz.object({ statsPeriod: z.string().describe(\"Relative time period like '1h', '24h', '7d', '14d'\") }),\n\t\tz.object({\n\t\t\tstart: z.string().describe(\"ISO 8601 start time\"),\n\t\t\tend: z.string().describe(\"ISO 8601 end time\")\n\t\t}),\n\t\tz.null()\n\t]).describe(\"Time range for filtering events. Use either statsPeriod for relative time or start/end for absolute time. Use null for default 14-day window.\"),\n\texplanation: z.string().default(\"\").describe(\"Brief explanation of how you translated this query\")\n}).refine((data) => {\n\tif (!data.sort || !data.fields || data.fields.length === 0) return true;\n\tconst sortField = data.sort.startsWith(\"-\") ? data.sort.substring(1) : data.sort;\n\treturn data.fields.includes(sortField);\n}, { message: \"Sort field must be included in the fields array. Sentry requires that any field used for sorting must also be explicitly selected. Add the sort field to the fields array or choose a different sort field that's already included.\" });\n/**\n* Search issue events agent - translates natural language queries to Sentry tag filters for events within a specific issue\n* Returns both the translated query result AND the tool calls made by the agent\n*/\nasync function searchIssueEventsAgent(options) {\n\tconst issueEventFieldsTool = createIssueEventFieldsTool({\n\t\tapiService: options.apiService,\n\t\torganizationSlug: options.organizationSlug,\n\t\tprojectId: options.projectId\n\t});\n\tconst whoamiTool = createWhoamiTool({ apiService: options.apiService });\n\treturn await callEmbeddedAgent({\n\t\tsystem: systemPrompt,\n\t\tprompt: options.query,\n\t\ttools: {\n\t\t\tissueEventFields: issueEventFieldsTool,\n\t\t\twhoami: whoamiTool\n\t\t},\n\t\tschema: searchIssueEventsAgentOutputSchema\n\t});\n}\n\n//#endregion\nexport { searchIssueEventsAgent, searchIssueEventsAgentOutputSchema };\n//# sourceMappingURL=agent-Bbb5dUlD.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamPeriod, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { ensureIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { hasAgentProvider } from \"./provider-factory-Cs_2DBhe.js\";\nimport { withProviderFallback } from \"./provider-fallback-L61Pbfxx.js\";\nimport { formatErrorResults } from \"./formatters-Cuh2gD9M.js\";\nimport { RECOMMENDED_FIELDS } from \"./config-ChOUIglS.js\";\nimport { parseIssueParams } from \"./utils-_4r1K2PE.js\";\nimport { searchIssueEventsAgent } from \"./agent-Bbb5dUlD.js\";\nimport { z } from \"zod\";\nimport { getActiveSpan, setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/search-issue-events.ts\nfunction buildIssueEventSearchRepairPrompt(params) {\n\treturn [\n\t\t\"Fix this Sentry issue event search request.\",\n\t\t\"The query may be natural language or already-valid Sentry event search syntax.\",\n\t\t\"Preserve valid explicit parameters, but correct query syntax, fields, sort, and time range when they conflict or would fail.\",\n\t\t\"\",\n\t\t`User query: ${params.query || \"(empty)\"}`,\n\t\t\"Current parameters:\",\n\t\tJSON.stringify({\n\t\t\tsort: params.sort ?? null,\n\t\t\tstatsPeriod: params.statsPeriod ?? null\n\t\t}, null, 2)\n\t].join(\"\\n\");\n}\nvar search_issue_events_default = defineTool({\n\tname: \"search_issue_events\",\n\tskills: [\"inspect\", \"triage\"],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Search and filter events within a specific issue.\",\n\t\t\"\",\n\t\t\"Provide `query` as natural language or Sentry event search syntax. When an embedded agent is configured, it fixes filters, fields, sort, and time range before running.\",\n\t\t\"\",\n\t\t\"The tool automatically constrains results to the specified issue.\",\n\t\t\"\",\n\t\t\"Common Query Filters:\",\n\t\t\"- environment:production - Filter by environment\",\n\t\t\"- release:1.0.0 - Filter by release version\",\n\t\t\"- user.email:alice@example.com - Filter by user\",\n\t\t\"- trace:TRACE_ID - Filter by trace ID\",\n\t\t\"\",\n\t\t\"For cross-issue searches use search_issues. For single issue or event details use get_sentry_resource.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"search_issue_events(issueId='MCP-41', organizationSlug='my-org', query='from last hour')\",\n\t\t\"search_issue_events(issueId='MCP-41', organizationSlug='my-org', query='environment:production')\",\n\t\t\"search_issue_events(issueUrl='https://sentry.io/.../issues/123/', query='release:v1.0.0', period='7d')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.nullable().default(null).describe(\"Organization slug. Required when using issueId. Not needed when using issueUrl.\"),\n\t\tissueId: z.string().optional().describe(\"Issue ID (e.g., 'MCP-41', 'PROJECT-123'). Requires organizationSlug. Alternatively, use issueUrl.\"),\n\t\tissueUrl: z.string().url().optional().describe(\"Full Sentry issue URL (e.g., 'https://sentry.io/organizations/my-org/issues/123/'). Includes both organization and issue ID.\"),\n\t\tquery: z.string().trim().optional().describe(\"Natural language or Sentry event search query syntax for filtering within the issue.\"),\n\t\tsort: z.string().optional().describe(\"Sort field (prefix with - for descending). Default: -timestamp\"),\n\t\tperiod: ParamPeriod.optional(),\n\t\tprojectSlug: ParamProjectSlug.nullable().default(null).describe(\"Project slug for better tag discovery. Optional - helps find project-specific tags.\"),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null).describe(\"Sentry region URL. Optional - defaults to main region.\"),\n\t\tlimit: z.number().min(1).max(100).default(50).describe(\"Maximum number of events to return (1-100, default: 50)\"),\n\t\tincludeExplanation: z.boolean().default(false).describe(\"Include explanation of how the query was translated or repaired\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst { organizationSlug, issueId } = parseIssueParams({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tissueId: params.issueId,\n\t\t\tissueUrl: params.issueUrl\n\t\t});\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"issue.id\", issueId);\n\t\tif (params.projectSlug) setTag(\"project.slug\", params.projectSlug);\n\t\tawait ensureIssueWithinProjectConstraint({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tissueId,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tlet projectId;\n\t\tif (params.projectSlug) try {\n\t\t\tconst project = await apiService.getProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: params.projectSlug\n\t\t\t});\n\t\t\tprojectId = String(project.id);\n\t\t} catch (error) {\n\t\t\tconsole.warn(`Could not resolve project ${params.projectSlug}:`, error);\n\t\t}\n\t\tlet query;\n\t\tlet fields;\n\t\tlet sortParam;\n\t\tlet timeParams;\n\t\tlet explanation;\n\t\tif (hasAgentProvider()) {\n\t\t\tconst parsed = await withProviderFallback({\n\t\t\t\toperation: \"search_issue_events.rewrite\",\n\t\t\t\tfallback: () => ({\n\t\t\t\t\tquery: params.query ?? \"\",\n\t\t\t\t\tfields: RECOMMENDED_FIELDS,\n\t\t\t\t\tsort: params.sort || \"-timestamp\",\n\t\t\t\t\ttimeRange: { statsPeriod: params.period ?? \"14d\" },\n\t\t\t\t\texplanation: \"\"\n\t\t\t\t}),\n\t\t\t\trun: async () => (await searchIssueEventsAgent({\n\t\t\t\t\tquery: buildIssueEventSearchRepairPrompt({\n\t\t\t\t\t\tquery: params.query,\n\t\t\t\t\t\tsort: params.sort,\n\t\t\t\t\t\tstatsPeriod: params.period\n\t\t\t\t\t}),\n\t\t\t\t\torganizationSlug,\n\t\t\t\t\tapiService,\n\t\t\t\t\tprojectId\n\t\t\t\t})).result\n\t\t\t});\n\t\t\tif (!parsed.sort) throw new UserInputError(`Search Issue Events Agent response missing required 'sort' parameter. Received: ${JSON.stringify(parsed, null, 2)}. The agent must specify how to sort results (e.g., '-timestamp' for newest first).`);\n\t\t\tquery = parsed.query || \"\";\n\t\t\tsortParam = parsed.sort;\n\t\t\texplanation = parsed.explanation;\n\t\t\tconst requestedFields = parsed.fields || [];\n\t\t\tfields = requestedFields.length > 0 ? requestedFields : RECOMMENDED_FIELDS;\n\t\t\ttimeParams = parsed.timeRange ? { ...parsed.timeRange } : { statsPeriod: \"14d\" };\n\t\t} else {\n\t\t\tquery = params.query ?? \"\";\n\t\t\tfields = RECOMMENDED_FIELDS;\n\t\t\tsortParam = params.sort || \"-timestamp\";\n\t\t\ttimeParams = { statsPeriod: params.period ?? \"14d\" };\n\t\t}\n\t\tconst eventsResponse = await apiService.listEventsForIssue({\n\t\t\torganizationSlug,\n\t\t\tissueId,\n\t\t\tquery,\n\t\t\tlimit: params.limit,\n\t\t\tsort: sortParam,\n\t\t\t...timeParams\n\t\t});\n\t\tconst explorerQuery = query ? `issue:${issueId} ${query}` : `issue:${issueId}`;\n\t\tconst explorerUrl = apiService.getEventsExplorerUrl(organizationSlug, explorerQuery, projectId, \"errors\", fields, sortParam, [], [], timeParams.statsPeriod, timeParams.start, timeParams.end);\n\t\tfunction isValidEventArray(data) {\n\t\t\treturn Array.isArray(data) && data.every((item) => typeof item === \"object\" && item !== null);\n\t\t}\n\t\tif (!isValidEventArray(eventsResponse)) throw new Error(\"Invalid event data format from Sentry API: expected array of objects\");\n\t\tgetActiveSpan()?.setAttribute(\"gen_ai.tool.call.result.count\", eventsResponse.length);\n\t\tconst naturalLanguageContext = params.query ? `Events in issue ${issueId}: ${params.query}` : `Events in issue ${issueId}`;\n\t\treturn formatErrorResults({\n\t\t\teventData: eventsResponse,\n\t\t\tinputQuery: naturalLanguageContext,\n\t\t\tincludeExplanation: params.includeExplanation,\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\texplorerUrl,\n\t\t\tsentryQuery: explorerQuery,\n\t\t\tfields,\n\t\t\texplanation\n\t\t});\n\t}\n});\n\n//#endregion\nexport { search_issue_events_default };\n//# sourceMappingURL=search-issue-events-fYjr_r6r.js.map","import { analyzeHotPathsFromFlamegraph, compareFrameStats, formatDuration, formatPercentage, generatePerformanceInsights, identifyHotspotFramesFromFlamegraph } from \"./analyzer-CtmUqCwO.js\";\n\n//#region src/tools/support/profile/formatter.ts\n/**\n* Maps a change type to its corresponding status icon.\n*/\nconst CHANGE_TYPE_ICONS = {\n\tmajor_regression: \"🚨\",\n\tminor_regression: \"⚠️\",\n\timprovement: \"✅\",\n\tno_change: \"➖\"\n};\n/**\n* Determines the overall comparison status based on regression/improvement counts.\n*/\nfunction determineComparisonStatus(majorCount, minorCount, improvementCount) {\n\tif (majorCount > 0) return \"⚠️ Performance Regression Detected\";\n\tif (minorCount > 0) return \"⚠️ Minor Performance Changes Detected\";\n\tif (improvementCount > 0) return \"✅ Performance Improvements Detected\";\n\treturn \"✅ No Significant Changes\";\n}\n/**\n* Truncates a file location string for table display.\n*/\nfunction truncateLocation(location, maxLength = 30) {\n\tif (location.length <= maxLength) return location;\n\treturn `...${location.slice(-(maxLength - 3))}`;\n}\n/**\n* Formats flamegraph analysis for a single transaction.\n*\n* Produces markdown output with:\n* - Transaction information\n* - Performance summary (user code vs library)\n* - Top slow functions table\n* - Hot paths with recommendations\n* - Actionable next steps\n*\n* @param flamegraph Flamegraph data from API\n* @param options Formatting options\n* @returns Markdown-formatted analysis\n*/\nfunction formatFlamegraphAnalysis(flamegraph, options) {\n\tconst sections = [];\n\tsections.push(formatTransactionInfo(flamegraph));\n\tsections.push(formatPerformanceSummary(flamegraph, options));\n\tconst hotPaths = analyzeHotPathsFromFlamegraph(flamegraph, options);\n\tsections.push(formatHotPaths(hotPaths, flamegraph, options));\n\tsections.push(formatActionableSteps(hotPaths, options));\n\treturn sections.join(\"\\n\\n\");\n}\nfunction getFlamegraphProfileCount(flamegraph) {\n\treturn flamegraph.shared.profiles.length || flamegraph.profiles.length;\n}\n/**\n* Formats transaction information section.\n*/\nfunction formatTransactionInfo(flamegraph) {\n\tconst profile = flamegraph.profiles[0];\n\tconst profileCount = getFlamegraphProfileCount(flamegraph);\n\tconst totalSamples = profile?.sample_counts.reduce((a, b) => a + b, 0) || 0;\n\tconst totalDuration = profile?.sample_durations_ns.reduce((a, b) => a + b, 0) || 0;\n\treturn [\n\t\t`# Profile Analysis: ${flamegraph.transactionName || \"Unknown Transaction\"}`,\n\t\t\"\",\n\t\t\"## Transaction Information\",\n\t\t`- **Transaction**: ${flamegraph.transactionName || \"Unknown\"}`,\n\t\t`- **Project ID**: ${flamegraph.projectID}`,\n\t\t`- **Platform**: ${flamegraph.platform || \"Unknown\"}`,\n\t\t`- **Total Profiles**: ${profileCount}`,\n\t\t`- **Total Samples**: ${totalSamples.toLocaleString()}`,\n\t\t`- **Estimated Total Time**: ${formatDuration(totalDuration)}`\n\t].join(\"\\n\");\n}\n/**\n* Formats performance summary section.\n*/\nfunction formatPerformanceSummary(flamegraph, options) {\n\tconst hotspots = identifyHotspotFramesFromFlamegraph(flamegraph, { focusOnUserCode: false });\n\tlet userCodeTime = 0;\n\tlet libraryTime = 0;\n\tfor (const h of hotspots) if (h.frame.is_application) userCodeTime += h.frameInfo.sumDuration;\n\telse libraryTime += h.frameInfo.sumDuration;\n\tconst totalTime = userCodeTime + libraryTime;\n\tconst userPercent = totalTime > 0 ? userCodeTime / totalTime * 100 : 0;\n\tconst libraryPercent = totalTime > 0 ? libraryTime / totalTime * 100 : 0;\n\tconst sections = [\n\t\t\"## Performance Summary\",\n\t\t\"\",\n\t\t\"### Code Breakdown\",\n\t\t`- **Total User Code Time**: ${formatDuration(userCodeTime)} (${formatPercentage(userPercent)})`,\n\t\t`- **Total Library Time**: ${formatDuration(libraryTime)} (${formatPercentage(libraryPercent)})`\n\t];\n\tconst topFunctions = identifyHotspotFramesFromFlamegraph(flamegraph, options).slice(0, 10);\n\tif (topFunctions.length > 0) {\n\t\tsections.push(\"\", \"### Top Slow Functions\");\n\t\tsections.push(\"\");\n\t\tsections.push(\"| Function | File:Line | Samples | % Time | p75 | p95 | p99 | Insights |\");\n\t\tsections.push(\"|----------|-----------|---------|--------|-----|-----|-----|----------|\");\n\t\tfor (const func of topFunctions) {\n\t\t\tconst insights = generatePerformanceInsights(func.frameInfo);\n\t\t\tconst insightText = insights.map((i) => i.icon).join(\" \");\n\t\t\tconst location = truncateLocation(`${func.frame.file}:${func.frame.line}`);\n\t\t\tsections.push(`| \\`${func.frame.name}\\` | ${location} | ${func.frameInfo.count.toLocaleString()} | ${formatPercentage(func.percentOfTotal)} | ${formatDuration(func.frameInfo.p75Duration)} | ${formatDuration(func.frameInfo.p95Duration)} | ${formatDuration(func.frameInfo.p99Duration)} | ${insightText} |`);\n\t\t}\n\t}\n\treturn sections.join(\"\\n\");\n}\n/**\n* Formats hot paths section.\n*/\nfunction formatHotPaths(hotPaths, flamegraph, options) {\n\tif (hotPaths.length === 0) return \"## Hot Paths\\n\\nNo significant hot paths found.\";\n\tconst sections = [\"## Top Hot Paths\", \"\"];\n\tconst profileCount = getFlamegraphProfileCount(flamegraph);\n\thotPaths.forEach((path, idx) => {\n\t\tif (idx > 0) sections.push(\"---\", \"\");\n\t\tsections.push(`### Path #${idx + 1}: ${formatPercentage(path.percentOfTotal)} of execution time`);\n\t\tsections.push(\"\");\n\t\tsections.push(`**${path.sampleCount.toLocaleString()} samples** across ${profileCount} profiles`);\n\t\tsections.push(\"\");\n\t\tconst framesToShow = options.focusOnUserCode ? path.userCodeFrames : path.callStack;\n\t\tif (framesToShow.length > 0) {\n\t\t\tsections.push(\"```\");\n\t\t\tconst displayFrames = [...framesToShow].reverse();\n\t\t\tdisplayFrames.forEach((frame, i) => {\n\t\t\t\tconst indent = \"  \".repeat(i);\n\t\t\t\tconst marker = frame.frame.is_application ? \"[YOUR CODE]\" : \"[library]\";\n\t\t\t\tconst isLeaf = i === displayFrames.length - 1;\n\t\t\t\tconst suffix = isLeaf && options.focusOnUserCode ? \" ← PRIMARY BOTTLENECK\" : \"\";\n\t\t\t\tsections.push(`${indent}${frame.frame.file}:${frame.frame.name}:${frame.frame.line} ${marker}${suffix}`);\n\t\t\t});\n\t\t\tsections.push(\"```\");\n\t\t\tsections.push(\"\");\n\t\t}\n\t\tconst leafFrame = path.callStack[0];\n\t\tif (leafFrame) {\n\t\t\tconst insights = generatePerformanceInsights(leafFrame.frameInfo);\n\t\t\tsections.push(\"**Performance Characteristics:**\");\n\t\t\tsections.push(`- **p75**: ${formatDuration(leafFrame.frameInfo.p75Duration)}`);\n\t\t\tsections.push(`- **p95**: ${formatDuration(leafFrame.frameInfo.p95Duration)}`);\n\t\t\tsections.push(`- **p99**: ${formatDuration(leafFrame.frameInfo.p99Duration)}${insights.some((i) => i.type === \"high_variance\") ? \" (⚠️ High variance - some calls are very slow)\" : \"\"}`);\n\t\t\tsections.push(\"\");\n\t\t\tsections.push(\"**💡 Recommendation:**\");\n\t\t\tsections.push(`This path accounts for ${formatPercentage(path.percentOfTotal)} of CPU time.${insights.some((i) => i.type === \"high_variance\") ? \" The high p99 indicates some operations are very slow.\" : \"\"}`);\n\t\t\tsections.push(\"\");\n\t\t}\n\t});\n\treturn sections.join(\"\\n\");\n}\n/**\n* Formats actionable next steps section.\n*/\nfunction formatActionableSteps(hotPaths, options) {\n\tconst sections = [\n\t\t\"## Actionable Next Steps\",\n\t\t\"\",\n\t\t\"### Immediate Actions (High Impact)\"\n\t];\n\tconst topPath = hotPaths[0];\n\tif (topPath) {\n\t\tconst frameToRecommend = options.focusOnUserCode ? topPath.userCodeFrames[0] : topPath.callStack[0];\n\t\tif (frameToRecommend) sections.push(`1. **Optimize \\`${frameToRecommend.frame.name}\\` function** - Accounts for ${formatPercentage(topPath.percentOfTotal)} of CPU time`);\n\t}\n\tsections.push(\"2. **Add caching layer** - Consider caching frequently accessed data\", \"3. **Review query patterns** - Look for N+1 queries or inefficient data access\", \"\", \"### Investigation Actions\", \"1. **Compare with baseline**: Use get_profile with compareAgainstPeriod to check for regressions\");\n\treturn sections.join(\"\\n\");\n}\n/**\n* Formats flamegraph comparison for regression detection.\n*\n* Produces markdown output with:\n* - Comparison summary\n* - Key changes table\n* - Regressions detected\n* - Suggested investigation steps\n*\n* @param baseline Baseline flamegraph data\n* @param current Current flamegraph data\n* @param options Formatting options\n* @returns Markdown-formatted comparison\n*/\nfunction formatFlamegraphComparison(baseline, current, options) {\n\tconst sections = [];\n\tsections.push(`# Profile Comparison: ${current.transactionName || \"Unknown Transaction\"}`);\n\tsections.push(\"\");\n\tsections.push(\"## Summary\");\n\tconst comparisons = compareFrameStats(baseline, current, options);\n\tconst majorRegressions = comparisons.filter((c) => c.changeType === \"major_regression\");\n\tconst minorRegressions = comparisons.filter((c) => c.changeType === \"minor_regression\");\n\tconst improvements = comparisons.filter((c) => c.changeType === \"improvement\");\n\tconst status = determineComparisonStatus(majorRegressions.length, minorRegressions.length, improvements.length);\n\tsections.push(`- **Status**: ${status}`);\n\tsections.push(\"\");\n\tif (comparisons.length > 0) {\n\t\tsections.push(\"## Key Changes\");\n\t\tsections.push(\"\");\n\t\tsections.push(\"| Function | File:Line | Baseline | Current | Change | Status |\");\n\t\tsections.push(\"|----------|-----------|----------|---------|--------|--------|\");\n\t\tfor (const comp of comparisons.slice(0, 10)) {\n\t\t\tconst location = truncateLocation(`${comp.frame.file}:${comp.frame.line}`);\n\t\t\tconst statusIcon = CHANGE_TYPE_ICONS[comp.changeType];\n\t\t\tconst change = comp.percentChange > 0 ? `+${formatPercentage(comp.percentChange)}` : formatPercentage(comp.percentChange);\n\t\t\tsections.push(`| \\`${comp.frame.name}\\` | ${location} | ${formatDuration(comp.baseline.sumDuration)} | ${formatDuration(comp.current.sumDuration)} | ${change} | ${statusIcon} |`);\n\t\t}\n\t\tsections.push(\"\");\n\t}\n\tif (majorRegressions.length > 0) {\n\t\tsections.push(\"## Major Regressions Detected\");\n\t\tsections.push(\"\");\n\t\tfor (const reg of majorRegressions.slice(0, 5)) {\n\t\t\tsections.push(`### 🚨 \\`${reg.frame.name}\\``);\n\t\t\tsections.push(`- **Change**: +${formatPercentage(reg.percentChange)} slower`);\n\t\t\tsections.push(`- **Impact**: ${formatDuration(reg.baseline.sumDuration)} → ${formatDuration(reg.current.sumDuration)}`);\n\t\t\tsections.push(`- **Location**: ${reg.frame.file}:${reg.frame.line}`);\n\t\t\tsections.push(\"\");\n\t\t\tsections.push(\"**Suggested Action**: Investigate recent changes to this function\");\n\t\t\tsections.push(\"\");\n\t\t}\n\t}\n\treturn sections.join(\"\\n\");\n}\n/**\n* Formats raw profile chunk analysis.\n*\n* Produces markdown output with:\n* - Chunk metadata\n* - Sample summary\n* - Frame breakdown\n* - Thread information\n*\n* @param chunk Profile chunk data from API\n* @param options Formatting options\n* @returns Markdown-formatted analysis\n*/\nfunction formatProfileChunkAnalysis(chunk, options) {\n\tconst sections = [];\n\tsections.push(\"# Profile Chunk Details\");\n\tsections.push(\"\");\n\tsections.push(\"## Metadata\");\n\tsections.push(`- **Chunk ID**: ${chunk.chunk_id}`);\n\tsections.push(`- **Profiler ID**: ${chunk.profiler_id}`);\n\tsections.push(`- **Platform**: ${chunk.platform}`);\n\tsections.push(`- **Release**: ${chunk.release}`);\n\tif (chunk.environment) sections.push(`- **Environment**: ${chunk.environment}`);\n\tsections.push(\"\");\n\tsections.push(...formatProfileSampleSections({\n\t\tframes: chunk.profile.frames,\n\t\tsamples: chunk.profile.samples,\n\t\tstacks: chunk.profile.stacks,\n\t\tthreadMetadata: chunk.profile.thread_metadata\n\t}, options));\n\treturn sections.join(\"\\n\");\n}\nfunction formatTransactionProfileAnalysis(profile, options) {\n\tconst sections = [];\n\tconst profileId = profile.profile_id ?? profile.event_id ?? \"Unknown\";\n\tconst transactionName = profile.transaction?.name ?? \"Unknown\";\n\tconst release = formatProfileRelease(profile.release);\n\tconst durationNs = getTransactionProfileDurationNs(profile);\n\tconst device = formatDeviceSummary(profile);\n\tconst os = formatOsSummary(profile);\n\tconst sdk = formatSdkSummary(profile);\n\tsections.push(`# Profile ${profileId}`);\n\tsections.push(\"\");\n\tsections.push(\"## Summary\");\n\tsections.push(`- **Profile URL**: ${options.profileUrl}`);\n\tsections.push(`- **Project**: ${options.projectSlug}`);\n\tsections.push(`- **Profile ID**: ${profileId}`);\n\tsections.push(`- **Transaction**: ${transactionName}`);\n\tif (profile.transaction?.trace_id) sections.push(`- **Trace ID**: ${profile.transaction.trace_id}`);\n\tif (options.traceUrl) sections.push(`- **Trace URL**: ${options.traceUrl}`);\n\tif (durationNs != null) sections.push(`- **Duration**: ${formatDuration(durationNs)}`);\n\tsections.push(`- **Platform**: ${profile.platform}`);\n\tsections.push(`- **Release**: ${release}`);\n\tif (profile.environment) sections.push(`- **Environment**: ${profile.environment}`);\n\tif (device) sections.push(`- **Device**: ${device}`);\n\tif (os) sections.push(`- **OS**: ${os}`);\n\tif (sdk) sections.push(`- **SDK**: ${sdk}`);\n\tif (profile.transaction?.active_thread_id) sections.push(`- **Active Thread**: ${profile.transaction.active_thread_id}`);\n\tsections.push(\"\");\n\tsections.push(...formatProfileSampleSections({\n\t\tframes: profile.profile.frames,\n\t\tsamples: profile.profile.samples,\n\t\tstacks: profile.profile.stacks,\n\t\tthreadMetadata: profile.profile.thread_metadata\n\t}, options));\n\tsections.push(\"\");\n\tsections.push(\"## Next Steps\");\n\tsections.push(\"\");\n\tsections.push(\"- Open the profile URL above in Sentry for the full flamegraph\");\n\tif (options.traceUrl) sections.push(\"- Open the related trace URL to inspect the end-to-end request\");\n\tsections.push(\"- Use `search_events` with the profiles dataset to find similar profiles\");\n\treturn sections.join(\"\\n\");\n}\nfunction formatProfileSampleSections(profile, options) {\n\tconst sections = [];\n\tsections.push(\"## Sample Summary\");\n\tsections.push(`- **Total Frames**: ${profile.frames.length}`);\n\tsections.push(`- **Total Samples**: ${profile.samples.length}`);\n\tsections.push(`- **Total Stacks**: ${profile.stacks.length}`);\n\tsections.push(`- **Threads**: ${Object.keys(profile.threadMetadata).length}`);\n\tsections.push(\"\");\n\tsections.push(\"## Thread Information\");\n\tsections.push(\"\");\n\tfor (const [threadId, metadata] of Object.entries(profile.threadMetadata)) {\n\t\tconst threadSamples = profile.samples.filter((s) => s.thread_id === threadId);\n\t\tsections.push(`- **Thread ${threadId}**: ${metadata.name || \"unnamed\"} (${threadSamples.length} samples)`);\n\t}\n\tsections.push(\"\");\n\tconst frameSection = formatTopFramesByOccurrence(profile, options);\n\tif (frameSection) sections.push(frameSection);\n\treturn sections;\n}\nfunction formatTopFramesByOccurrence(profile, options) {\n\tconst frameCounts = /* @__PURE__ */ new Map();\n\tfor (const sample of profile.samples) {\n\t\tconst stack = profile.stacks[sample.stack_id];\n\t\tif (!stack) continue;\n\t\tfor (const frameIdx of stack) frameCounts.set(frameIdx, (frameCounts.get(frameIdx) || 0) + 1);\n\t}\n\tconst sortedFrames = Array.from(frameCounts.entries()).filter(([frameIdx]) => {\n\t\tconst frame = profile.frames[frameIdx];\n\t\treturn frame !== void 0 && (!options.focusOnUserCode || frame.in_app);\n\t}).sort((a, b) => b[1] - a[1]).slice(0, 10);\n\tif (sortedFrames.length === 0) return null;\n\tconst rows = sortedFrames.map(([frameIdx, count]) => {\n\t\tconst frame = profile.frames[frameIdx];\n\t\tconst functionName = frame.function ?? frame.raw_function ?? \"unknown\";\n\t\tconst funcName = frame.class_name ? `${frame.class_name}.${functionName}` : functionName;\n\t\tconst rawLocation = frame.filename && frame.lineno ? `${frame.filename}:${frame.lineno}` : frame.module || frame.abs_path || \"unknown\";\n\t\tconst location = truncateLocation(rawLocation, 40);\n\t\tconst type = frame.in_app ? \"User Code\" : \"Library\";\n\t\treturn `| \\`${funcName}\\` | ${location} | ${count} | ${type} |`;\n\t});\n\treturn [\n\t\t\"## Top Frames by Occurrence\",\n\t\t\"\",\n\t\t\"| Function | File:Line | Count | Type |\",\n\t\t\"|----------|-----------|-------|------|\",\n\t\t...rows\n\t].join(\"\\n\");\n}\nfunction formatProfileRelease(release) {\n\tif (typeof release === \"string\") return release;\n\tif (release && typeof release === \"object\" && \"version\" in release) return String(release.version);\n\treturn \"Unknown\";\n}\nfunction getTransactionProfileDurationNs(profile) {\n\tconst relativeStart = profile.transaction?.relative_start_ns;\n\tconst relativeEnd = profile.transaction?.relative_end_ns;\n\tif (typeof relativeStart === \"number\" && Number.isFinite(relativeStart) && typeof relativeEnd === \"number\" && Number.isFinite(relativeEnd) && relativeEnd >= relativeStart) return relativeEnd - relativeStart;\n\tconst elapsed = profile.profile.samples.map((sample) => sample.elapsed_since_start_ns).filter((value) => Number.isFinite(value)).sort((a, b) => a - b);\n\tif (elapsed.length < 2) return null;\n\tconst duration = elapsed[elapsed.length - 1] - elapsed[0];\n\treturn duration > 0 ? Math.round(duration) : null;\n}\nfunction formatDeviceSummary(profile) {\n\tconst parts = [\n\t\tprofile.device?.model,\n\t\tprofile.device?.classification,\n\t\tprofile.device?.arch\n\t].filter(Boolean);\n\treturn parts.length > 0 ? parts.join(\" · \") : null;\n}\nfunction formatOsSummary(profile) {\n\tconst parts = [\n\t\tprofile.os?.name,\n\t\tprofile.os?.version,\n\t\tprofile.os?.build_number\n\t].filter(Boolean);\n\treturn parts.length > 0 ? parts.join(\" \") : null;\n}\nfunction formatSdkSummary(profile) {\n\tconst parts = [profile.client_sdk?.name, profile.client_sdk?.version].filter(Boolean);\n\treturn parts.length > 0 ? parts.join(\" \") : null;\n}\n\n//#endregion\nexport { formatFlamegraphAnalysis, formatFlamegraphComparison, formatProfileChunkAnalysis, formatTransactionProfileAnalysis };\n//# sourceMappingURL=formatter-UsEdX-DU.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId, validateSlugOrId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug, ParamPeriod, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { resolveScopedOrganizationSlug, resolveScopedProjectSlugOrId } from \"./url-scope-CRM5sNo7.js\";\nimport { isProfileUrl, parseSentryUrl } from \"./url-helpers-CcAcmPuu.js\";\nimport { hasProfileData } from \"./analyzer-CtmUqCwO.js\";\nimport { formatFlamegraphAnalysis, formatFlamegraphComparison } from \"./formatter-UsEdX-DU.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-profile.ts\n/**\n* Resolves profile parameters from URL or explicit params.\n* URL takes precedence if provided and valid.\n*/\nfunction resolveProfileParams(params) {\n\tif (params.profileUrl) {\n\t\tif (!isProfileUrl(params.profileUrl)) throw new UserInputError(\"Invalid profile URL. URL must be a Sentry profile URL (containing /profiling/profile/).\");\n\t\tconst parsed = parseSentryUrl(params.profileUrl);\n\t\treturn {\n\t\t\torganizationSlug: resolveScopedOrganizationSlug({\n\t\t\t\tresourceLabel: \"Profile\",\n\t\t\t\tscopedOrganizationSlug: params.organizationSlug,\n\t\t\t\turlOrganizationSlug: parsed.organizationSlug\n\t\t\t}),\n\t\t\tprojectSlugOrId: parsed.projectSlugOrId ? resolveScopedProjectSlugOrId({\n\t\t\t\tresourceLabel: \"Profile\",\n\t\t\t\tscopedProjectSlugOrId: params.projectSlugOrId,\n\t\t\t\turlProjectSlug: parsed.projectSlugOrId\n\t\t\t}) : params.projectSlugOrId ?? void 0,\n\t\t\ttransactionName: params.transactionName ?? void 0\n\t\t};\n\t}\n\tif (!params.organizationSlug) throw new UserInputError(\"Organization slug is required. Provide either a profileUrl or organizationSlug parameter.\");\n\treturn {\n\t\torganizationSlug: params.organizationSlug,\n\t\tprojectSlugOrId: params.projectSlugOrId ?? void 0,\n\t\ttransactionName: params.transactionName ?? void 0\n\t};\n}\nvar get_profile_default = defineTool({\n\tname: \"get_profile\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"event:read\"],\n\trequiredCapabilities: [\"profiles\"],\n\thideInExperimentalMode: true,\n\tdescription: [\n\t\t\"Analyze CPU profiling data to identify performance bottlenecks and detect regressions.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN:\",\n\t\t\"- User asks why a specific endpoint/transaction is slow\",\n\t\t\"- User wants to understand where CPU time is spent\",\n\t\t\"- User asks about performance bottlenecks\",\n\t\t\"- User wants to compare performance between time periods\",\n\t\t\"- User shares a Sentry profile URL\",\n\t\t\"\",\n\t\t\"RETURNS:\",\n\t\t\"- Hot paths (call stacks consuming the most CPU time)\",\n\t\t\"- Performance percentiles (p75, p95, p99) for each function\",\n\t\t\"- User code vs library code breakdown\",\n\t\t\"- Actionable recommendations for optimization\",\n\t\t\"- Regression analysis when comparing periods\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Analyze from URL (with transaction name)\",\n\t\t\"```\",\n\t\t\"get_profile(\",\n\t\t\"  profileUrl='https://my-org.sentry.io/explore/profiling/profile/backend/flamegraph/?profilerId=abc123',\",\n\t\t\"  transactionName='/api/users'\",\n\t\t\")\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Analyze by transaction name\",\n\t\t\"```\",\n\t\t\"get_profile(\",\n\t\t\"  organizationSlug='my-org',\",\n\t\t\"  transactionName='/api/users',\",\n\t\t\"  projectSlugOrId='backend'\",\n\t\t\")\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Compare performance between periods\",\n\t\t\"```\",\n\t\t\"get_profile(\",\n\t\t\"  organizationSlug='my-org',\",\n\t\t\"  transactionName='/api/users',\",\n\t\t\"  projectSlugOrId='backend',\",\n\t\t\"  period='7d',\",\n\t\t\"  compareAgainstPeriod='14d'\",\n\t\t\")\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use `focusOnUserCode: true` (default) to filter out library code\",\n\t\t\"- High p99 relative to p75 indicates inconsistent performance\",\n\t\t\"- Use compareAgainstPeriod to detect regressions over time\",\n\t\t\"- Transaction names are case-sensitive\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\tprofileUrl: z.string().url().optional().describe(\"Sentry profile URL. If provided, organization and project are extracted from URL. transactionName is still required.\"),\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlugOrId: z.union([z.string().trim().superRefine(validateSlugOrId), z.number()]).optional().describe(\"Project slug or numeric ID\"),\n\t\ttransactionName: z.string().trim().optional().describe(\"Transaction name (e.g., '/api/users', 'POST /graphql')\"),\n\t\tperiod: ParamPeriod.default(\"7d\").describe(\"Profiling time window (default: '7d'). Use '1h' for very recent profiling data.\"),\n\t\tcompareAgainstPeriod: ParamPeriod.optional().describe(\"Compare against this baseline profiling time window. Enables regression detection.\"),\n\t\tfocusOnUserCode: z.boolean().default(true).describe(\"Show only user code (is_application: true). Set to false to include library code.\"),\n\t\tmaxHotPaths: z.number().int().min(1).max(20).default(10).describe(\"Number of hot paths to display (1-20, default: 10)\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst resolved = resolveProfileParams({\n\t\t\tprofileUrl: params.profileUrl,\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectSlugOrId: params.projectSlugOrId,\n\t\t\ttransactionName: params.transactionName\n\t\t});\n\t\tconst { organizationSlug, projectSlugOrId, transactionName } = resolved;\n\t\tif (!projectSlugOrId) throw new UserInputError(\"Project is required. Please provide a projectSlugOrId parameter or include it in the profile URL.\");\n\t\tif (!transactionName) throw new UserInputError(\"Transaction name is required for flamegraph analysis. Please provide a transactionName parameter.\");\n\t\tlet projectId;\n\t\tif (typeof projectSlugOrId === \"number\" || isNumericId(String(projectSlugOrId))) {\n\t\t\tprojectId = projectSlugOrId;\n\t\t\tsetTag(\"project.id\", String(projectSlugOrId));\n\t\t} else {\n\t\t\tconst project = await apiService.getProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: String(projectSlugOrId)\n\t\t\t});\n\t\t\tprojectId = project.id;\n\t\t\tsetTag(\"project.slug\", String(projectSlugOrId));\n\t\t\tsetTag(\"project.id\", String(project.id));\n\t\t}\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"transaction.name\", transactionName);\n\t\tif (params.compareAgainstPeriod) {\n\t\t\tsetTag(\"baseline.period\", params.compareAgainstPeriod);\n\t\t\tsetTag(\"current.period\", params.period);\n\t\t\tconst [baselineFlamegraph, currentFlamegraph] = await Promise.all([apiService.getFlamegraph({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectId,\n\t\t\t\ttransactionName,\n\t\t\t\tstatsPeriod: params.compareAgainstPeriod\n\t\t\t}), apiService.getFlamegraph({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectId,\n\t\t\t\ttransactionName,\n\t\t\t\tstatsPeriod: params.period\n\t\t\t})]);\n\t\t\tconst hasBaselineData = hasProfileData(baselineFlamegraph);\n\t\t\tconst hasCurrentData = hasProfileData(currentFlamegraph);\n\t\t\tif (!hasBaselineData && !hasCurrentData) return [\n\t\t\t\t`# Profile Comparison: ${transactionName}`,\n\t\t\t\t\"\",\n\t\t\t\t\"## No Profile Data Found\",\n\t\t\t\t\"\",\n\t\t\t\t`No profiling data found for transaction **${transactionName}** in either time period.`,\n\t\t\t\t\"\",\n\t\t\t\t\"**Possible reasons:**\",\n\t\t\t\t\"- Transaction name doesn't match exactly (names are case-sensitive)\",\n\t\t\t\t\"- No profiles collected for this transaction\",\n\t\t\t\t\"- Profiling may not be enabled for this project\",\n\t\t\t\t\"\",\n\t\t\t\t\"**Suggestions:**\",\n\t\t\t\t\"- Verify the exact transaction name using search_events\",\n\t\t\t\t\"- Check if profiling is enabled for this project\"\n\t\t\t].join(\"\\n\");\n\t\t\tif (!hasBaselineData) return [\n\t\t\t\t`# Profile Comparison: ${transactionName}`,\n\t\t\t\t\"\",\n\t\t\t\t\"## Insufficient Baseline Data\",\n\t\t\t\t\"\",\n\t\t\t\t`No profiling data found for the baseline period (${params.compareAgainstPeriod}).`,\n\t\t\t\t`Current period (${params.period}) has data.`,\n\t\t\t\t\"\",\n\t\t\t\t\"**Suggestion:** Try a shorter baseline period or analyze the current period only by removing compareAgainstPeriod.\"\n\t\t\t].join(\"\\n\");\n\t\t\tif (!hasCurrentData) return [\n\t\t\t\t`# Profile Comparison: ${transactionName}`,\n\t\t\t\t\"\",\n\t\t\t\t\"## Insufficient Current Data\",\n\t\t\t\t\"\",\n\t\t\t\t`No profiling data found for the current period (${params.period}).`,\n\t\t\t\t`Baseline period (${params.compareAgainstPeriod}) has data.`,\n\t\t\t\t\"\",\n\t\t\t\t\"**Suggestion:** The transaction may not have been executed recently. Try a longer current period.\"\n\t\t\t].join(\"\\n\");\n\t\t\treturn formatFlamegraphComparison(baselineFlamegraph, currentFlamegraph, { focusOnUserCode: params.focusOnUserCode });\n\t\t}\n\t\tconst flamegraph = await apiService.getFlamegraph({\n\t\t\torganizationSlug,\n\t\t\tprojectId,\n\t\t\ttransactionName,\n\t\t\tstatsPeriod: params.period\n\t\t});\n\t\tif (!hasProfileData(flamegraph)) return [\n\t\t\t`# Profile Analysis: ${transactionName}`,\n\t\t\t\"\",\n\t\t\t\"## No Profile Data Found\",\n\t\t\t\"\",\n\t\t\t`No profiling data found for transaction **${transactionName}** in the last ${params.period}.`,\n\t\t\t\"\",\n\t\t\t\"**Possible reasons:**\",\n\t\t\t\"- Transaction name doesn't match exactly (names are case-sensitive)\",\n\t\t\t\"- No profiles collected for this transaction in the time period\",\n\t\t\t\"- Profiling may not be enabled for this project\",\n\t\t\t\"- Transaction may not have been executed recently\",\n\t\t\t\"\",\n\t\t\t\"**Suggestions:**\",\n\t\t\t\"- Verify the exact transaction name using search_events\",\n\t\t\t\"- Try a longer time period (e.g., '30d')\",\n\t\t\t\"- Check if profiling is enabled for this project\"\n\t\t].join(\"\\n\");\n\t\treturn formatFlamegraphAnalysis(flamegraph, {\n\t\t\tfocusOnUserCode: params.focusOnUserCode,\n\t\t\tmaxHotPaths: params.maxHotPaths\n\t\t});\n\t}\n});\n\n//#endregion\nexport { get_profile_default };\n//# sourceMappingURL=get-profile-CilEVKTg.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId, validateResourceId, validateSlugOrId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { resolveScopedOrganizationSlug, resolveScopedProjectSlugOrId } from \"./url-scope-CRM5sNo7.js\";\nimport { resolveRegionUrlForOrganization } from \"./resolve-region-url-DutLwiPb.js\";\nimport { isProfileUrl, parseSentryUrl } from \"./url-helpers-CcAcmPuu.js\";\nimport { formatProfileChunkAnalysis, formatTransactionProfileAnalysis } from \"./formatter-UsEdX-DU.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-profile-details.ts\nfunction resolveProfileDetailsParams(params) {\n\tif (params.profileUrl) {\n\t\tif (!isProfileUrl(params.profileUrl)) throw new UserInputError(\"Invalid profile URL. URL must point to a Sentry profile resource.\");\n\t\tconst parsed = parseSentryUrl(params.profileUrl);\n\t\tif (parsed.type !== \"profile\" || !parsed.projectSlugOrId) throw new UserInputError(\"Invalid profile URL. URL must point to a Sentry profile resource.\");\n\t\tif (parsed.profileId) return {\n\t\t\tmode: \"transaction\",\n\t\t\torganizationSlug: resolveScopedOrganizationSlug({\n\t\t\t\tresourceLabel: \"Profile\",\n\t\t\t\tscopedOrganizationSlug: params.organizationSlug,\n\t\t\t\turlOrganizationSlug: parsed.organizationSlug\n\t\t\t}),\n\t\t\tprojectSlugOrId: resolveScopedProjectSlugOrId({\n\t\t\t\tresourceLabel: \"Profile\",\n\t\t\t\tscopedProjectSlugOrId: params.projectSlugOrId,\n\t\t\t\turlProjectSlug: parsed.projectSlugOrId\n\t\t\t}),\n\t\t\tprofileId: parsed.profileId\n\t\t};\n\t\tif (parsed.profilerId && parsed.start && parsed.end) return {\n\t\t\tmode: \"continuous\",\n\t\t\torganizationSlug: resolveScopedOrganizationSlug({\n\t\t\t\tresourceLabel: \"Profile\",\n\t\t\t\tscopedOrganizationSlug: params.organizationSlug,\n\t\t\t\turlOrganizationSlug: parsed.organizationSlug\n\t\t\t}),\n\t\t\tprojectSlugOrId: resolveScopedProjectSlugOrId({\n\t\t\t\tresourceLabel: \"Profile\",\n\t\t\t\tscopedProjectSlugOrId: params.projectSlugOrId,\n\t\t\t\turlProjectSlug: parsed.projectSlugOrId\n\t\t\t}),\n\t\t\tprofilerId: parsed.profilerId,\n\t\t\tstart: parsed.start,\n\t\t\tend: parsed.end\n\t\t};\n\t\tthrow new UserInputError(\"Continuous profile URLs must include `profilerId`, `start`, and `end` query parameters.\");\n\t}\n\tconst hasTransactionInput = Boolean(params.profileId);\n\tconst hasAnyContinuousInput = Boolean(params.profilerId || params.start || params.end);\n\tif (hasTransactionInput && hasAnyContinuousInput) throw new UserInputError(\"Provide either `profileId` for a transaction profile or `profilerId` + `start` + `end` for a continuous profile, not both.\");\n\tif (!params.organizationSlug || !params.projectSlugOrId) throw new UserInputError(\"Provide either `profileUrl` or both `organizationSlug` and `projectSlugOrId`.\");\n\tif (params.profileId) return {\n\t\tmode: \"transaction\",\n\t\torganizationSlug: params.organizationSlug,\n\t\tprojectSlugOrId: params.projectSlugOrId,\n\t\tprofileId: params.profileId\n\t};\n\tif (params.profilerId && params.start && params.end) return {\n\t\tmode: \"continuous\",\n\t\torganizationSlug: params.organizationSlug,\n\t\tprojectSlugOrId: params.projectSlugOrId,\n\t\tprofilerId: params.profilerId,\n\t\tstart: params.start,\n\t\tend: params.end\n\t};\n\tthrow new UserInputError(\"Provide either `profileId` for a transaction profile, or `profilerId`, `start`, and `end` for a continuous profile.\");\n}\nasync function resolveProjectContext(apiService, organizationSlug, projectSlugOrId, options = {}) {\n\tconst requireNumericId = options.requireNumericId ?? false;\n\tconst isNumericProject = typeof projectSlugOrId === \"number\" || isNumericId(String(projectSlugOrId));\n\tif (!isNumericProject && !requireNumericId) return {\n\t\tprojectId: projectSlugOrId,\n\t\tprojectSlug: String(projectSlugOrId)\n\t};\n\tconst project = await apiService.getProject({\n\t\torganizationSlug,\n\t\tprojectSlugOrId: String(projectSlugOrId)\n\t});\n\treturn {\n\t\tprojectId: project.id,\n\t\tprojectSlug: project.slug\n\t};\n}\nvar get_profile_details_default = defineTool({\n\tname: \"get_profile_details\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"event:read\"],\n\trequiredCapabilities: [\"profiles\"],\n\thideInExperimentalMode: true,\n\tdescription: [\n\t\t\"Inspect a specific Sentry profile in detail.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN:\",\n\t\t\"- User shares a transaction profile URL and wants the details\",\n\t\t\"- User has a profile ID and wants a concise summary plus raw sample structure\",\n\t\t\"- User needs to inspect a continuous profile session by profiler ID and time range\",\n\t\t\"\",\n\t\t\"RETURNS:\",\n\t\t\"- Transaction profile summary with profile URL, transaction, trace, release, and runtime details\",\n\t\t\"- Sample structure summaries such as frame count, sample count, stacks, and thread breakdown\",\n\t\t\"- Top frames by occurrence for a quick hotspot overview\",\n\t\t\"\",\n\t\t\"NOTE: This tool supports two profile modes.\",\n\t\t\"- Transaction profiles: pass `profileUrl` or `organizationSlug` + `projectSlugOrId` + `profileId`\",\n\t\t\"- Continuous profiles: pass `profileUrl` or `organizationSlug` + `projectSlugOrId` + `profilerId` + `start` + `end`\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Transaction profile URL\",\n\t\t\"```\",\n\t\t\"get_profile_details(\",\n\t\t\"  profileUrl='https://my-org.sentry.io/explore/profiling/profile/backend/cfe78a5c892d4a64a962d837673398d2/flamegraph/'\",\n\t\t\")\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Transaction profile by ID\",\n\t\t\"```\",\n\t\t\"get_profile_details(\",\n\t\t\"  organizationSlug='my-org',\",\n\t\t\"  projectSlugOrId='backend',\",\n\t\t\"  profileId='cfe78a5c892d4a64a962d837673398d2'\",\n\t\t\")\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Continuous profile by session\",\n\t\t\"```\",\n\t\t\"get_profile_details(\",\n\t\t\"  organizationSlug='my-org',\",\n\t\t\"  projectSlugOrId='backend',\",\n\t\t\"  profilerId='041bde57b9844e36b8b7e5734efae5f7',\",\n\t\t\"  start='2024-01-01T00:00:00Z',\",\n\t\t\"  end='2024-01-01T01:00:00Z'\",\n\t\t\")\",\n\t\t\"```\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\tprofileUrl: z.string().url().optional().describe(\"Sentry transaction profile or continuous profile URL. If provided, organization, project, and profile identifiers are extracted from the URL.\"),\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlugOrId: z.union([z.string().trim().superRefine(validateSlugOrId), z.number()]).optional().describe(\"Project slug or numeric ID\"),\n\t\tprofileId: z.string().trim().superRefine(validateResourceId).optional().describe(\"Transaction profile ID from a profile flamegraph URL\"),\n\t\tprofilerId: z.string().trim().superRefine(validateResourceId).optional().describe(\"Continuous profiler session ID\"),\n\t\tstart: z.string().trim().optional().describe(\"Continuous profile start time in ISO 8601 format, for example '2024-01-01T00:00:00Z'\"),\n\t\tend: z.string().trim().optional().describe(\"Continuous profile end time in ISO 8601 format, for example '2024-01-01T01:00:00Z'\"),\n\t\tfocusOnUserCode: z.boolean().default(true).describe(\"Show only user code frames in the hotspot table. Set to false to include library frames.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst resolved = resolveProfileDetailsParams({\n\t\t\tprofileUrl: params.profileUrl,\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectSlugOrId: params.projectSlugOrId,\n\t\t\tprofileId: params.profileId,\n\t\t\tprofilerId: params.profilerId,\n\t\t\tstart: params.start,\n\t\t\tend: params.end\n\t\t});\n\t\tconst regionUrl = await resolveRegionUrlForOrganization({\n\t\t\tcontext,\n\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\tregionUrl: params.regionUrl\n\t\t});\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", resolved.organizationSlug);\n\t\tif (resolved.mode === \"transaction\") {\n\t\t\tsetTag(\"profile.id\", resolved.profileId);\n\t\t\tconst isNumericProjectInput = typeof resolved.projectSlugOrId === \"number\" || isNumericId(String(resolved.projectSlugOrId));\n\t\t\tlet projectSlug$1;\n\t\t\tlet profile;\n\t\t\tif (isNumericProjectInput) {\n\t\t\t\tconst [project, fetchedProfile] = await Promise.all([apiService.getProject({\n\t\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\t\tprojectSlugOrId: String(resolved.projectSlugOrId)\n\t\t\t\t}), apiService.getTransactionProfile({\n\t\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\t\tprojectSlugOrId: resolved.projectSlugOrId,\n\t\t\t\t\tprofileId: resolved.profileId\n\t\t\t\t})]);\n\t\t\t\tprojectSlug$1 = project.slug;\n\t\t\t\tprofile = fetchedProfile;\n\t\t\t} else {\n\t\t\t\tprojectSlug$1 = String(resolved.projectSlugOrId);\n\t\t\t\tprofile = await apiService.getTransactionProfile({\n\t\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\t\tprojectSlugOrId: resolved.projectSlugOrId,\n\t\t\t\t\tprofileId: resolved.profileId\n\t\t\t\t});\n\t\t\t}\n\t\t\tsetTag(\"project.slug\", projectSlug$1);\n\t\t\tconst profileUrl$1 = params.profileUrl ?? apiService.getProfileUrl(resolved.organizationSlug, projectSlug$1, resolved.profileId);\n\t\t\tconst traceUrl = profile.transaction?.trace_id ? apiService.getTraceUrl(resolved.organizationSlug, profile.transaction.trace_id) : void 0;\n\t\t\treturn formatTransactionProfileAnalysis(profile, {\n\t\t\t\tfocusOnUserCode: params.focusOnUserCode,\n\t\t\t\tprofileUrl: profileUrl$1,\n\t\t\t\tprojectSlug: projectSlug$1,\n\t\t\t\ttraceUrl\n\t\t\t});\n\t\t}\n\t\tsetTag(\"profiler.id\", resolved.profilerId);\n\t\tconst { projectId, projectSlug } = await resolveProjectContext(apiService, resolved.organizationSlug, resolved.projectSlugOrId, { requireNumericId: true });\n\t\tsetTag(\"project.slug\", projectSlug);\n\t\tsetTag(\"project.id\", String(projectId));\n\t\tconst chunk = await apiService.getProfileChunk({\n\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\tprofilerId: resolved.profilerId,\n\t\t\tprojectId,\n\t\t\tstart: resolved.start,\n\t\t\tend: resolved.end\n\t\t});\n\t\tconst profileUrl = params.profileUrl ?? apiService.getContinuousProfileUrl(resolved.organizationSlug, projectSlug, {\n\t\t\tprofilerId: resolved.profilerId,\n\t\t\tstart: resolved.start,\n\t\t\tend: resolved.end\n\t\t});\n\t\tconst chunkAnalysis = formatProfileChunkAnalysis(chunk, { focusOnUserCode: params.focusOnUserCode }).replace(\"# Profile Chunk Details\", \"## Raw Sample Analysis\");\n\t\treturn [\n\t\t\t`# Continuous Profile ${resolved.profilerId}`,\n\t\t\t\"\",\n\t\t\t\"## Summary\",\n\t\t\t`- **Profile URL**: ${profileUrl}`,\n\t\t\t`- **Project**: ${projectSlug}`,\n\t\t\t`- **Profiler ID**: ${resolved.profilerId}`,\n\t\t\t`- **Time Range**: ${resolved.start} to ${resolved.end}`,\n\t\t\t`- **Platform**: ${chunk.platform}`,\n\t\t\t`- **Release**: ${chunk.release}`,\n\t\t\tchunk.environment ? `- **Environment**: ${chunk.environment}` : \"\",\n\t\t\t\"\",\n\t\t\tchunkAnalysis\n\t\t].filter(Boolean).join(\"\\n\");\n\t}\n});\n\n//#endregion\nexport { get_profile_details_default };\n//# sourceMappingURL=get-profile-details-B7TCia0B.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-agent-conversation-details.ts\nfunction withoutUndefined(value) {\n\treturn Object.fromEntries(Object.entries(value).filter(([, item]) => item !== void 0));\n}\nconst genAiAttributesSchema = z.object({\n\toperationType: z.string().optional(),\n\tagentName: z.string().optional(),\n\trequestModel: z.string().optional(),\n\tresponseModel: z.string().optional(),\n\tusageTotalTokens: z.number().optional(),\n\tcostTotalTokens: z.number().optional(),\n\tsystemInstructions: z.string().optional(),\n\tinputMessages: z.string().optional(),\n\toutputMessages: z.string().optional(),\n\trequestMessages: z.string().optional(),\n\tresponseText: z.string().optional(),\n\tresponseObject: z.string().optional(),\n\ttoolDefinitions: z.string().optional(),\n\ttoolName: z.string().optional(),\n\ttoolCallArguments: z.string().optional(),\n\ttoolInput: z.string().optional(),\n\ttruncatedFields: z.array(z.string()).optional()\n});\nconst toolCallGenAiAttributesSchema = genAiAttributesSchema.omit({\n\ttoolName: true,\n\ttoolCallArguments: true,\n\ttoolInput: true,\n\ttruncatedFields: true\n});\nconst toolCallSchema = z.object({\n\ttype: z.literal(\"tool_call\"),\n\tname: z.string(),\n\tspanId: z.string(),\n\ttraceId: z.string(),\n\ttimestamp: z.number(),\n\tdurationMs: z.number(),\n\tstatus: z.string().optional(),\n\targuments: z.string().optional(),\n\tinput: z.string().optional(),\n\tgenAi: toolCallGenAiAttributesSchema.optional()\n});\nconst conversationMessageSchema = z.object({\n\ttype: z.literal(\"message\"),\n\trole: z.enum([\"user\", \"assistant\"]),\n\tcontent: z.string(),\n\ttimestamp: z.number(),\n\tspanId: z.string(),\n\ttraceId: z.string(),\n\tuserEmail: z.string().optional(),\n\tmetadata: z.object({\n\t\tagentName: z.string().optional(),\n\t\tmodel: z.string().optional(),\n\t\ttotalTokens: z.number(),\n\t\tstatus: z.string().optional(),\n\t\tdurationMs: z.number()\n\t}).optional(),\n\tgenAi: genAiAttributesSchema.optional()\n});\nconst timelineEventSchema = z.discriminatedUnion(\"type\", [conversationMessageSchema, toolCallSchema]);\nconst lookupWindowSchema = z.object({\n\tstatsPeriod: z.string().optional(),\n\tstart: z.string().optional(),\n\tend: z.string().optional()\n});\nconst spanSummarySchema = z.object({\n\tspanId: z.string(),\n\ttraceId: z.string(),\n\tparentSpanId: z.string().nullable().optional(),\n\tproject: z.string(),\n\tprojectId: z.union([z.string(), z.number()]),\n\ttimestamp: z.number(),\n\tdurationMs: z.number(),\n\tspanName: z.string().optional(),\n\tspanOp: z.string().optional(),\n\tspanDescription: z.string().optional(),\n\tspanStatus: z.string().optional(),\n\ttransaction: z.string().optional(),\n\tisTransaction: z.boolean().optional(),\n\tgenAi: genAiAttributesSchema.optional()\n});\nconst aiConversationDetailsOutputSchema = z.object({\n\tconversationId: z.string(),\n\ttitle: z.string().nullable(),\n\torganizationSlug: z.string(),\n\turl: z.string().url(),\n\tlookupWindow: lookupWindowSchema,\n\tstartTimestamp: z.number().nullable(),\n\tendTimestamp: z.number().nullable(),\n\ttraceIds: z.array(z.string()),\n\tprojects: z.array(z.string()),\n\tspanCount: z.number(),\n\taiCallCount: z.number(),\n\tmessageCount: z.number(),\n\ttoolCallCount: z.number(),\n\ttotalTokens: z.number(),\n\tspanSummaries: z.array(spanSummarySchema),\n\ttimeline: z.array(timelineEventSchema)\n});\nfunction numeric(value) {\n\tif (typeof value === \"number\") return value;\n\tif (typeof value === \"string\") {\n\t\tconst parsed = Number(value);\n\t\treturn Number.isFinite(parsed) ? parsed : 0;\n\t}\n\treturn 0;\n}\nfunction optionalNumeric(value) {\n\tif (typeof value === \"number\") return value;\n\tif (typeof value === \"string\") {\n\t\tconst parsed = Number(value);\n\t\treturn Number.isFinite(parsed) ? parsed : void 0;\n\t}\n\treturn void 0;\n}\nfunction timestampMs(value) {\n\treturn Math.round(value * 1e3);\n}\nfunction durationMs(span) {\n\treturn Math.round((span[\"precise.finish_ts\"] - span[\"precise.start_ts\"]) * 1e3);\n}\nconst MAX_RAW_GEN_AI_ATTRIBUTE_LENGTH = 4e3;\nfunction truncateAttribute(field, value, truncatedFields) {\n\tif (value === void 0 || value.length <= MAX_RAW_GEN_AI_ATTRIBUTE_LENGTH) return value;\n\ttruncatedFields.push(field);\n\treturn `${value.slice(0, MAX_RAW_GEN_AI_ATTRIBUTE_LENGTH)}... [truncated]`;\n}\nfunction getOperationType(span) {\n\tconst explicit = span[\"gen_ai.operation.type\"];\n\tif (explicit) return explicit;\n\tconst spanName = span[\"span.name\"];\n\tif (!spanName?.startsWith(\"gen_ai.\")) return void 0;\n\tif (spanName === \"gen_ai.execute_tool\") return \"tool\";\n\tif (spanName === \"gen_ai.invoke_agent\" || spanName === \"gen_ai.create_agent\") return \"agent\";\n\tif (spanName === \"gen_ai.handoff\") return \"handoff\";\n\treturn \"ai_client\";\n}\nfunction parseJson(value) {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\treturn value;\n\t}\n}\nfunction stringifyContent(value) {\n\tif (typeof value === \"string\") return value;\n\tif (Array.isArray(value)) {\n\t\tconst parts = value.map((part) => {\n\t\t\tif (typeof part === \"string\") return part;\n\t\t\tif (part && typeof part === \"object\") {\n\t\t\t\tconst record = part;\n\t\t\t\tif (typeof record.text === \"string\") return record.text;\n\t\t\t\tif (typeof record.content === \"string\") return record.content;\n\t\t\t}\n\t\t\treturn null;\n\t\t}).filter((part) => Boolean(part));\n\t\treturn parts.length > 0 ? parts.join(\"\\n\") : null;\n\t}\n\tif (value && typeof value === \"object\") {\n\t\tconst record = value;\n\t\tif (typeof record.text === \"string\") return record.text;\n\t\tif (typeof record.content === \"string\") return record.content;\n\t\tif (typeof record.message === \"string\") return record.message;\n\t}\n\treturn value == null ? null : JSON.stringify(value);\n}\nfunction collectMessages(value) {\n\tconst source = value && typeof value === \"object\" && !Array.isArray(value) && Array.isArray(value.messages) ? value.messages : value;\n\tif (!Array.isArray(source)) {\n\t\tconst content = stringifyContent(source);\n\t\treturn content ? [{ content }] : [];\n\t}\n\treturn source.map((message) => {\n\t\tif (typeof message === \"string\") return { content: message };\n\t\tif (!message || typeof message !== \"object\") return null;\n\t\tconst record = message;\n\t\tconst content = stringifyContent(record.content ?? record.text ?? record);\n\t\tif (!content) return null;\n\t\treturn {\n\t\t\trole: typeof record.role === \"string\" ? record.role : void 0,\n\t\t\tcontent\n\t\t};\n\t}).filter((message) => Boolean(message));\n}\nfunction extractUserContent(span) {\n\tconst raw = span[\"gen_ai.input.messages\"] ?? span[\"gen_ai.request.messages\"] ?? null;\n\tif (!raw) return null;\n\tif (raw === \"[Filtered]\") return raw;\n\tconst messages = collectMessages(parseJson(raw));\n\tconst userMessage = messages.findLast((message) => message.role === \"user\");\n\treturn userMessage?.content ?? messages.at(-1)?.content ?? null;\n}\nfunction extractAssistantContent(span) {\n\tconst outputMessages = span[\"gen_ai.output.messages\"];\n\tif (outputMessages) {\n\t\tif (outputMessages === \"[Filtered]\") return outputMessages;\n\t\tconst messages = collectMessages(parseJson(outputMessages));\n\t\tconst assistantMessage = messages.findLast((message) => message.role === \"assistant\");\n\t\tconst content = assistantMessage?.content ?? messages.at(-1)?.content;\n\t\tif (content) return content;\n\t}\n\treturn span[\"gen_ai.response.text\"] ?? span[\"gen_ai.response.object\"] ?? null;\n}\n/** Projects documented GenAI fields into the MCP contract and marks truncated raw payloads. */\nfunction buildGenAIAttributes(span) {\n\tconst truncatedFields = [];\n\tconst attributes = withoutUndefined({\n\t\toperationType: getOperationType(span),\n\t\tagentName: span[\"gen_ai.agent.name\"],\n\t\trequestModel: span[\"gen_ai.request.model\"],\n\t\tresponseModel: span[\"gen_ai.response.model\"],\n\t\tusageTotalTokens: optionalNumeric(span[\"gen_ai.usage.total_tokens\"]),\n\t\tcostTotalTokens: optionalNumeric(span[\"gen_ai.cost.total_tokens\"]),\n\t\tsystemInstructions: truncateAttribute(\"systemInstructions\", span[\"gen_ai.system_instructions\"], truncatedFields),\n\t\tinputMessages: truncateAttribute(\"inputMessages\", span[\"gen_ai.input.messages\"], truncatedFields),\n\t\toutputMessages: truncateAttribute(\"outputMessages\", span[\"gen_ai.output.messages\"], truncatedFields),\n\t\trequestMessages: truncateAttribute(\"requestMessages\", span[\"gen_ai.request.messages\"], truncatedFields),\n\t\tresponseText: truncateAttribute(\"responseText\", span[\"gen_ai.response.text\"], truncatedFields),\n\t\tresponseObject: truncateAttribute(\"responseObject\", span[\"gen_ai.response.object\"], truncatedFields),\n\t\ttoolDefinitions: truncateAttribute(\"toolDefinitions\", span[\"gen_ai.tool.definitions\"], truncatedFields),\n\t\ttoolName: span[\"gen_ai.tool.name\"],\n\t\ttoolCallArguments: truncateAttribute(\"toolCallArguments\", span[\"gen_ai.tool.call.arguments\"], truncatedFields),\n\t\ttoolInput: truncateAttribute(\"toolInput\", span[\"gen_ai.tool.input\"], truncatedFields),\n\t\ttruncatedFields: truncatedFields.length > 0 ? truncatedFields.sort() : void 0\n\t});\n\treturn Object.keys(attributes).length > 0 ? attributes : void 0;\n}\n/** Builds the MCP-facing span summary with IDs for raw span follow-up. */\nfunction buildSpanSummary(span) {\n\treturn withoutUndefined({\n\t\tspanId: span.span_id,\n\t\ttraceId: span.trace,\n\t\tparentSpanId: span.parent_span,\n\t\tproject: span.project,\n\t\tprojectId: span[\"project.id\"],\n\t\ttimestamp: timestampMs(span[\"precise.start_ts\"]),\n\t\tdurationMs: durationMs(span),\n\t\tspanName: span[\"span.name\"],\n\t\tspanOp: span[\"span.op\"],\n\t\tspanDescription: span[\"span.description\"],\n\t\tspanStatus: span[\"span.status\"],\n\t\ttransaction: span.transaction,\n\t\tisTransaction: span.is_transaction,\n\t\tgenAi: buildGenAIAttributes(span)\n\t});\n}\nfunction buildToolCallGenAIAttributes(attributes) {\n\tif (!attributes) return void 0;\n\tconst { toolName: _toolName, toolCallArguments: _toolCallArguments, toolInput: _toolInput, truncatedFields: _truncatedFields,...timelineAttributes } = attributes;\n\treturn Object.keys(timelineAttributes).length > 0 ? timelineAttributes : void 0;\n}\nfunction buildToolCall(span) {\n\tconst name = span[\"gen_ai.tool.name\"];\n\tif (!name) return null;\n\tconst genAi = buildGenAIAttributes(span);\n\treturn withoutUndefined({\n\t\ttype: \"tool_call\",\n\t\tname,\n\t\tspanId: span.span_id,\n\t\ttraceId: span.trace,\n\t\ttimestamp: timestampMs(span[\"precise.start_ts\"]),\n\t\tdurationMs: durationMs(span),\n\t\tstatus: span[\"span.status\"],\n\t\targuments: genAi?.toolCallArguments,\n\t\tinput: genAi?.toolInput,\n\t\tgenAi: buildToolCallGenAIAttributes(genAi)\n\t});\n}\nfunction buildMessageEvents(span) {\n\tconst spanDurationMs = durationMs(span);\n\tconst genAi = buildGenAIAttributes(span);\n\tconst metadata = withoutUndefined({\n\t\tagentName: span[\"gen_ai.agent.name\"],\n\t\tmodel: span[\"gen_ai.response.model\"] ?? span[\"gen_ai.request.model\"],\n\t\ttotalTokens: numeric(span[\"gen_ai.usage.total_tokens\"]),\n\t\tstatus: span[\"span.status\"],\n\t\tdurationMs: spanDurationMs\n\t});\n\tconst events = [];\n\tconst userContent = extractUserContent(span);\n\tif (userContent) events.push(withoutUndefined({\n\t\ttype: \"message\",\n\t\trole: \"user\",\n\t\tcontent: userContent,\n\t\ttimestamp: timestampMs(span[\"precise.start_ts\"]),\n\t\tspanId: span.span_id,\n\t\ttraceId: span.trace,\n\t\tuserEmail: span[\"user.email\"],\n\t\tmetadata: void 0,\n\t\tgenAi\n\t}));\n\tconst assistantContent = extractAssistantContent(span);\n\tif (assistantContent) events.push({\n\t\ttype: \"message\",\n\t\trole: \"assistant\",\n\t\tcontent: assistantContent,\n\t\ttimestamp: timestampMs(span[\"precise.finish_ts\"]),\n\t\tspanId: span.span_id,\n\t\ttraceId: span.trace,\n\t\tmetadata,\n\t\tgenAi\n\t});\n\telse if (events.length > 0) events[events.length - 1] = {\n\t\t...events[events.length - 1],\n\t\tmetadata,\n\t\tgenAi\n\t};\n\treturn events;\n}\nfunction extractTimeline(spans) {\n\tconst events = [];\n\tfor (const span of spans) {\n\t\tconst operationType = getOperationType(span);\n\t\tif (operationType === \"tool\") {\n\t\t\tconst toolCall = buildToolCall(span);\n\t\t\tif (toolCall) events.push(toolCall);\n\t\t\tcontinue;\n\t\t}\n\t\tif (operationType === \"ai_client\") events.push(...buildMessageEvents(span));\n\t}\n\treturn events.sort((a, b) => {\n\t\tconst timestampDiff = a.timestamp - b.timestamp;\n\t\tif (timestampDiff !== 0) return timestampDiff;\n\t\tif (a.type !== b.type) return a.type === \"message\" ? -1 : 1;\n\t\treturn a.spanId.localeCompare(b.spanId);\n\t});\n}\nfunction countAICalls(spans) {\n\treturn spans.filter((span) => getOperationType(span) === \"ai_client\").length;\n}\n/** Builds the stable structured artifact returned as conversation details. */\nfunction buildConversationArtifact(apiService, organizationSlug, conversationId, title, spans, lookupWindow) {\n\tconst timeline = extractTimeline(spans);\n\tconst spanSummaries = spans.map(buildSpanSummary).sort((a, b) => {\n\t\tconst timestampDiff = a.timestamp - b.timestamp;\n\t\tif (timestampDiff !== 0) return timestampDiff;\n\t\treturn a.spanId.localeCompare(b.spanId);\n\t});\n\tconst traceIds = [...new Set(spans.map((span) => span.trace))].sort();\n\tconst projects = [...new Set(spans.map((span) => span.project))].sort();\n\tconst startTimestamp = spans.length > 0 ? Math.min(...spans.map((span) => span[\"precise.start_ts\"])) : null;\n\tconst endTimestamp = spans.length > 0 ? Math.max(...spans.map((span) => span[\"precise.finish_ts\"])) : null;\n\treturn withoutUndefined({\n\t\tconversationId,\n\t\ttitle,\n\t\torganizationSlug,\n\t\turl: apiService.getAIConversationUrl(organizationSlug, conversationId),\n\t\tlookupWindow,\n\t\tstartTimestamp: startTimestamp === null ? null : timestampMs(startTimestamp),\n\t\tendTimestamp: endTimestamp === null ? null : timestampMs(endTimestamp),\n\t\ttraceIds,\n\t\tprojects,\n\t\tspanCount: spans.length,\n\t\taiCallCount: countAICalls(spans),\n\t\tmessageCount: timeline.filter((event) => event.type === \"message\").length,\n\t\ttoolCallCount: timeline.filter((event) => event.type === \"tool_call\").length,\n\t\ttotalTokens: spans.reduce((sum, span) => sum + numeric(span[\"gen_ai.usage.total_tokens\"]), 0),\n\t\tspanSummaries,\n\t\ttimeline\n\t});\n}\nvar get_agent_conversation_details_default = defineTool({\n\tname: \"get_agent_conversation_details\",\n\tskills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\", \"project:read\"],\n\tdescription: [\n\t\t\"Fetch the chronological transcript and debugging details for one agent conversation, formerly called an AI conversation.\",\n\t\t\"\",\n\t\t\"Returns a timeline of user messages, assistant messages, and tool calls, with trace/span IDs for deeper debugging. To discover or list conversations, use search_agent_conversations.\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tconversationId: z.string().trim().describe(\"The agent conversation ID from gen_ai.conversation.id.\"),\n\t\tproject: z.string().trim().optional().describe(\"Numeric project ID to scope the query. Falls back to context constraint or all projects.\"),\n\t\tstart: z.string().trim().optional().describe(\"Explicit start time for the conversation lookup window.\"),\n\t\tend: z.string().trim().optional().describe(\"Explicit end time for the conversation lookup window.\"),\n\t\tregionUrl: ParamRegionUrl.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: aiConversationDetailsOutputSchema,\n\tasync handler(params, context) {\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tsetTag(\"ai_conversation.id\", params.conversationId);\n\t\tif (params.start && !params.end || !params.start && params.end) throw new UserInputError(\"`start` and `end` must be provided together.\");\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tlet projectId;\n\t\tif (context.constraints.projectSlug) {\n\t\t\tconst constrainedProject = await apiService.getProject({\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tprojectSlugOrId: context.constraints.projectSlug\n\t\t\t});\n\t\t\tprojectId = String(constrainedProject.id);\n\t\t} else if (params.project) projectId = params.project;\n\t\tconst conversation = await apiService.getAIConversation({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tconversationId: params.conversationId,\n\t\t\tproject: projectId ?? \"-1\",\n\t\t\tstart: params.start,\n\t\t\tend: params.end\n\t\t}, void 0);\n\t\tconst artifact = buildConversationArtifact(apiService, params.organizationSlug, params.conversationId, conversation.title, conversation.spans, params.start && params.end ? {\n\t\t\tstart: params.start,\n\t\t\tend: params.end\n\t\t} : { statsPeriod: \"30d\" });\n\t\treturn structuredResult(artifact);\n\t}\n});\n\n//#endregion\nexport { aiConversationDetailsOutputSchema, get_agent_conversation_details_default };\n//# sourceMappingURL=get-agent-conversation-details-DTJR8hFg.js.map","//#region src/tools/support/snapshots/formatting.ts\nfunction getSnapshotImageDisplayName(img) {\n\treturn img.display_name || img.image_file_name || \"unknown\";\n}\nfunction formatSnapshotDiffPercent(diff) {\n\treturn `${Math.round(diff * 1e4) / 100}%`;\n}\nfunction renderSnapshotImageTreeSection(title, items) {\n\tif (items.length === 0) return [];\n\tconst root = createBranch(\"\");\n\tfor (const item of items) addItemToBranch(root, item);\n\tconst lines = [`**${title}:**`];\n\tconst entries = collectChildEntries(root);\n\tfor (const [index, entry] of entries.entries()) lines.push(renderEntry(entry, \"\", index === entries.length - 1));\n\treturn lines;\n}\nfunction renderSnapshotImageContext(context) {\n\treturn isPlainObject(context) ? renderContextObject(context, 0) : [];\n}\nfunction createBranch(label) {\n\treturn {\n\t\tkind: \"branch\",\n\t\tlabel,\n\t\tchildren: /* @__PURE__ */ new Map(),\n\t\tleaves: []\n\t};\n}\nfunction addItemToBranch(root, item) {\n\tconst identifier = getSnapshotImageIdentifier(item.image);\n\tconst segments = identifier.split(\"/\").filter(Boolean);\n\tconst pathSegments = segments.length > 0 ? segments : [identifier];\n\tconst leafName = pathSegments[pathSegments.length - 1] ?? identifier;\n\tlet node = root;\n\tfor (const segment of pathSegments.slice(0, -1)) {\n\t\tlet child = node.children.get(segment);\n\t\tif (!child) {\n\t\t\tchild = createBranch(`${segment}/`);\n\t\t\tnode.children.set(segment, child);\n\t\t}\n\t\tnode = child;\n\t}\n\tnode.leaves.push({\n\t\tkind: \"leaf\",\n\t\tlabel: formatLeafLabel(leafName, item.image, item.details ?? [])\n\t});\n}\nfunction getSnapshotImageIdentifier(img) {\n\treturn img.image_file_name || getSnapshotImageDisplayName(img);\n}\nfunction formatLeafLabel(leafName, img, details) {\n\tconst displayName = getSnapshotImageDisplayName(img);\n\tconst suffixes = [...details];\n\tif (displayName !== leafName && displayName !== img.image_file_name) suffixes.push(displayName);\n\tif (img.group && String(img.group) !== displayName) suffixes.push(String(img.group));\n\treturn suffixes.length > 0 ? `${leafName} — ${suffixes.join(\" — \")}` : leafName;\n}\nfunction collectChildEntries(branch) {\n\treturn [...branch.children.values(), ...branch.leaves];\n}\nfunction renderEntry(entry, prefix, isLast) {\n\tconst connector = isLast ? \"└── \" : \"├── \";\n\tif (entry.kind === \"leaf\") return `${prefix}${connector}${entry.label}`;\n\tconst childPrefix = `${prefix}${isLast ? \"    \" : \"│   \"}`;\n\tconst children = collectChildEntries(entry);\n\tconst lines = [`${prefix}${connector}${entry.label}`];\n\tfor (const [index, child] of children.entries()) lines.push(renderEntry(child, childPrefix, index === children.length - 1));\n\treturn lines.join(\"\\n\");\n}\nfunction renderContextObject(context, depth) {\n\tconst prefix = \"  \".repeat(depth);\n\treturn Object.entries(context).flatMap(([key, value]) => {\n\t\tconst formatted = formatSupportedContextValue(value);\n\t\tif (formatted !== null) return [`${prefix}- **${key}**: ${formatted}`];\n\t\tif (!isPlainObject(value)) return [];\n\t\tconst children = renderContextObject(value, depth + 1);\n\t\treturn children.length > 0 ? [`${prefix}- **${key}**:`, ...children] : [];\n\t});\n}\nfunction formatSupportedContextValue(value) {\n\tif (typeof value === \"string\") {\n\t\tconst normalized = value.trim().replace(/\\s+/g, \" \");\n\t\treturn normalized.length > 0 ? normalized : null;\n\t}\n\tif (typeof value === \"number\") return Number.isFinite(value) ? String(value) : null;\n\tif (typeof value === \"boolean\") return String(value);\n\treturn null;\n}\nfunction isPlainObject(value) {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\n\n//#endregion\nexport { formatSnapshotDiffPercent, getSnapshotImageDisplayName, renderSnapshotImageContext, renderSnapshotImageTreeSection };\n//# sourceMappingURL=formatting-C_fxwUSt.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { blobToBase64, createImagePreview } from \"./blob-utils-CdbE_jsd.js\";\nimport { formatSnapshotDiffPercent, getSnapshotImageDisplayName, renderSnapshotImageContext, renderSnapshotImageTreeSection } from \"./formatting-C_fxwUSt.js\";\n\n//#region src/tools/support/snapshots/handlers.ts\nfunction fullResolutionHint({ organizationSlug, snapshotId, imageIdentifier, experimentalMode, availableToolNames, directToolNames }) {\n\treturn `- **Full Resolution**: ${formatToolCallInstruction({\n\t\ttoolName: \"get_snapshot_image\",\n\t\targuments: {\n\t\t\torganizationSlug,\n\t\t\tsnapshotId,\n\t\t\timageIdentifier,\n\t\t\timageResolution: \"full\"\n\t\t},\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames,\n\t\tfallbackInstruction: \"Full-resolution snapshot image bytes are not available in this session\",\n\t\tpurpose: \"for full-resolution image bytes\"\n\t})}`;\n}\nfunction getSnapshotImagePreviewFallback(snapshotUrl) {\n\tconst separator = snapshotUrl.includes(\"?\") ? \"&\" : \"?\";\n\treturn `Use the Sentry tool \\`get_sentry_resource(url=\"${snapshotUrl}${separator}selectedSnapshot=<image_file_name>\")\\``;\n}\nfunction formatSnapshotImageFullResolutionStep({ organizationSlug, snapshotId, imageIdentifier, experimentalMode, availableToolNames, directToolNames }) {\n\tconst instruction = formatToolCallInstruction({\n\t\ttoolName: \"get_snapshot_image\",\n\t\targuments: {\n\t\t\torganizationSlug,\n\t\t\tsnapshotId,\n\t\t\timageIdentifier,\n\t\t\timageResolution: \"full\"\n\t\t},\n\t\texperimentalMode,\n\t\tavailableToolNames,\n\t\tdirectToolNames,\n\t\tfallbackInstruction: \"Full-resolution snapshot image bytes are not available in this session\",\n\t\tpurpose: \"to fetch original full-resolution image bytes\"\n\t});\n\treturn `- ${instruction}`;\n}\nfunction countField(data, key, fallback) {\n\tconst value = data[key];\n\treturn typeof value === \"number\" ? value : fallback;\n}\nfunction formatImageMetadata(img) {\n\tconst lines = [];\n\tif (img.display_name) lines.push(`- **Display Name**: ${img.display_name}`);\n\tif (img.group) lines.push(`- **Group**: ${img.group}`);\n\tif (img.image_file_name) lines.push(`- **File**: \\`${img.image_file_name}\\``);\n\tif (img.width || img.height) lines.push(`- **Dimensions**: ${img.width}×${img.height}`);\n\tif (img.description) lines.push(`- **Description**: ${img.description}`);\n\tconst contextLines = renderSnapshotImageContext(img.context);\n\tif (contextLines.length > 0) lines.push(\"\", \"### Context\", ...contextLines);\n\treturn lines;\n}\nasync function createPreviewOrNull(blob, contentType) {\n\ttry {\n\t\treturn await createImagePreview(blob, contentType);\n\t} catch {\n\t\treturn null;\n\t}\n}\nasync function fetchAndAppendImage(apiService, imageUrl, label, imageResolution, parts) {\n\tconst { blob, contentType } = await apiService.fetchImageByUrl(imageUrl);\n\tif (!contentType.startsWith(\"image/\")) {\n\t\tparts.push({\n\t\t\ttype: \"text\",\n\t\t\ttext: `(${label}: unexpected content type ${contentType})`\n\t\t});\n\t\treturn;\n\t}\n\tif (imageResolution === \"full\") {\n\t\tparts.push({\n\t\t\ttype: \"text\",\n\t\t\ttext: `### ${label} — full`\n\t\t});\n\t\tparts.push({\n\t\t\ttype: \"image\",\n\t\t\tdata: await blobToBase64(blob),\n\t\t\tmimeType: contentType\n\t\t});\n\t\treturn;\n\t}\n\tconst preview = await createPreviewOrNull(blob, contentType);\n\tif (!preview) {\n\t\tparts.push({\n\t\t\ttype: \"text\",\n\t\t\ttext: `### ${label} — preview unavailable. Retry with imageResolution=full to fetch the original image.`\n\t\t});\n\t\treturn;\n\t}\n\tparts.push({\n\t\ttype: \"text\",\n\t\ttext: `### ${label} — preview`\n\t});\n\tparts.push({\n\t\ttype: \"image\",\n\t\tdata: await blobToBase64(preview.blob),\n\t\tmimeType: preview.contentType\n\t});\n}\nasync function fetchSnapshotImage(apiService, organizationSlug, snapshotId, imageIdentifier, imageResolution, options = {}) {\n\tconst detail = await apiService.getSnapshotImageDetail({\n\t\torganizationSlug,\n\t\tsnapshotId,\n\t\timageIdentifier\n\t});\n\tconst headImage = detail.head_image;\n\tconst baseImage = detail.base_image;\n\tconst status = detail.comparison_status;\n\tif (!headImage?.image_url && !baseImage?.image_url) throw new UserInputError(`No image data returned for \"${imageIdentifier}\". The image may not exist in this snapshot.`);\n\tconst snapshotUrl = `${apiService.getPreprodSnapshotUrl(organizationSlug, snapshotId)}?selectedSnapshot=${encodeURIComponent(imageIdentifier)}`;\n\tconst lines = [`## ${imageIdentifier}\\n`];\n\tlines.push(`- **URL**: ${snapshotUrl}`);\n\tif (status) lines.push(`- **Status**: ${status}`);\n\tif (detail.diff_percentage != null) lines.push(`- **Diff**: ${formatSnapshotDiffPercent(detail.diff_percentage)}`);\n\tif (detail.previous_image_file_name) lines.push(`- **Previous File**: \\`${detail.previous_image_file_name}\\``);\n\tlines.push(`- **Image Resolution**: ${imageResolution}`);\n\tif (imageResolution === \"preview\") lines.push(fullResolutionHint({\n\t\torganizationSlug,\n\t\tsnapshotId,\n\t\timageIdentifier,\n\t\texperimentalMode: options.experimentalMode ?? false,\n\t\tavailableToolNames: options.availableToolNames,\n\t\tdirectToolNames: options.directToolNames\n\t}));\n\tconst primary = headImage ?? baseImage;\n\tif (primary) lines.push(...formatImageMetadata(primary));\n\tconst contentParts = [{\n\t\ttype: \"text\",\n\t\ttext: lines.join(\"\\n\")\n\t}];\n\tif (headImage?.image_url) await fetchAndAppendImage(apiService, headImage.image_url, \"Head (current)\", imageResolution, contentParts);\n\tif (baseImage?.image_url && baseImage.image_url !== headImage?.image_url) await fetchAndAppendImage(apiService, baseImage.image_url, \"Base (previous)\", imageResolution, contentParts);\n\tif (detail.diff_image_url) await fetchAndAppendImage(apiService, detail.diff_image_url, \"Diff Mask\", imageResolution, contentParts);\n\treturn contentParts;\n}\nfunction isSnapshotDiffPair(entry) {\n\treturn \"head_image\" in entry || \"base_image\" in entry;\n}\nfunction entryToTreeItem(entry) {\n\tif (isSnapshotDiffPair(entry)) return { image: entry.head_image ?? entry.base_image ?? {} };\n\treturn { image: entry };\n}\nfunction renderTreeSections(sections) {\n\treturn sections.flatMap(({ title, items }, index) => {\n\t\tconst lines = renderSnapshotImageTreeSection(title, items);\n\t\tif (lines.length === 0) return [];\n\t\treturn index === 0 ? lines : [\"\", ...lines];\n\t});\n}\nasync function fetchSnapshotSummary(apiService, organizationSlug, snapshotId, sourceUrlForDisplay, options = {}) {\n\tconst data = await apiService.getSnapshotDetails({\n\t\torganizationSlug,\n\t\tsnapshotId,\n\t\tcompactMetadata: true\n\t});\n\tconst vcsInfo = data.vcs_info;\n\tconst approvalInfo = data.approval_info;\n\tconst allImages = data.images || [];\n\tconst changed = data.changed || [];\n\tconst renamed = data.renamed || [];\n\tconst added = data.added || [];\n\tconst removed = data.removed || [];\n\tconst errored = data.errored || [];\n\tconst unchanged = data.unchanged || [];\n\tconst skipped = data.skipped || [];\n\tconst resolvedSnapshotUrl = sourceUrlForDisplay || apiService.getPreprodSnapshotUrl(organizationSlug, snapshotId);\n\tconst sections = [];\n\tsections.push(`# Snapshot ${snapshotId} in **${organizationSlug}**`);\n\tsections.push(\"\\n## Summary\\n\");\n\tsections.push(`- **URL**: ${resolvedSnapshotUrl}`);\n\tsections.push(`- **Type**: ${data.comparison_type ?? \"unknown\"}`);\n\tsections.push(`- **State**: ${data.state ?? \"unknown\"}`);\n\tif (data.project_id) sections.push(`- **Project ID**: ${data.project_id}`);\n\tconst totalCount = countField(data, \"total_count\", allImages.length);\n\tconst changedCount = countField(data, \"changed_count\", changed.length);\n\tconst addedCount = countField(data, \"added_count\", added.length);\n\tconst removedCount = countField(data, \"removed_count\", removed.length);\n\tconst renamedCount = countField(data, \"renamed_count\", renamed.length);\n\tconst unchangedCount = countField(data, \"unchanged_count\", unchanged.length);\n\tconst erroredCount = countField(data, \"errored_count\", errored.length);\n\tconst skippedCount = countField(data, \"skipped_count\", skipped.length);\n\tsections.push(`- **Images**: ${totalCount} total (${changedCount} changed, ${addedCount} added, ${removedCount} removed, ${renamedCount} renamed, ${unchangedCount} unchanged, ${erroredCount} errored, ${skippedCount} skipped)`);\n\tif (vcsInfo) {\n\t\tsections.push(\"\\n## VCS Info\\n\");\n\t\tif (vcsInfo.repo_name) sections.push(`- **Repo**: ${vcsInfo.repo_name}`);\n\t\tif (vcsInfo.head_ref) sections.push(`- **Head**: ${vcsInfo.head_ref} (\\`${String(vcsInfo.head_sha ?? \"\").slice(0, 8)}\\`)`);\n\t\tif (vcsInfo.base_ref) sections.push(`- **Base**: ${vcsInfo.base_ref} (\\`${String(vcsInfo.base_sha ?? \"\").slice(0, 8)}\\`)`);\n\t\tif (vcsInfo.pr_number) sections.push(`- **PR**: #${vcsInfo.pr_number}`);\n\t}\n\tif (approvalInfo) {\n\t\tconst status = approvalInfo.status ?? \"unknown\";\n\t\tconst auto = approvalInfo.is_auto_approved ? \" (auto-approved)\" : \"\";\n\t\tsections.push(`\\n- **Approval**: ${status}${auto}`);\n\t}\n\tconst hasDiffs = changed.length > 0 || renamed.length > 0 || added.length > 0 || removed.length > 0 || errored.length > 0;\n\tif (hasDiffs) {\n\t\tsections.push(\"\\n## Changes\\n\");\n\t\tconst sortedChanged = changed.slice().sort((left, right) => (right.diff ?? -1) - (left.diff ?? -1));\n\t\tsections.push(...renderTreeSections([\n\t\t\t{\n\t\t\t\ttitle: \"Changed\",\n\t\t\t\titems: sortedChanged.map((pair) => ({\n\t\t\t\t\timage: pair.head_image ?? {},\n\t\t\t\t\tdetails: pair.diff != null ? [`${formatSnapshotDiffPercent(pair.diff)} diff`] : []\n\t\t\t\t}))\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: \"Added\",\n\t\t\t\titems: added.map((image) => ({ image }))\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: \"Removed\",\n\t\t\t\titems: removed.map((image) => ({ image }))\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: \"Renamed\",\n\t\t\t\titems: renamed.map((pair) => ({\n\t\t\t\t\timage: pair.head_image ?? {},\n\t\t\t\t\tdetails: [`previous: ${getSnapshotImageDisplayName(pair.base_image ?? {})}`]\n\t\t\t\t}))\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: \"Errored\",\n\t\t\t\titems: errored.map((pair) => ({ image: pair.head_image ?? {} }))\n\t\t\t}\n\t\t]));\n\t} else if ((data.comparison_type === \"solo\" || options.listImagesWhenNoDiffs) && allImages.length > 0) {\n\t\tsections.push(\"\\n## Images\\n\");\n\t\tsections.push(...renderSnapshotImageTreeSection(\"Snapshot Images\", allImages.map((image) => ({ image }))));\n\t} else if (!options.showUnmodified && (unchangedCount > 0 || skippedCount > 0)) sections.push(\"\\nNo changed images are shown in compact mode. Re-run `get_snapshot` with `showUnmodified=true` to list unchanged and skipped images.\");\n\tif (options.showUnmodified && data.comparison_type !== \"solo\") {\n\t\tconst unmodifiedSections = renderTreeSections([{\n\t\t\ttitle: \"Unchanged\",\n\t\t\titems: unchanged.map((entry) => entryToTreeItem(entry))\n\t\t}, {\n\t\t\ttitle: \"Skipped\",\n\t\t\titems: skipped.map((entry) => entryToTreeItem(entry))\n\t\t}]);\n\t\tif (unmodifiedSections.length > 0) {\n\t\t\tsections.push(\"\\n## Unmodified\\n\");\n\t\t\tsections.push(...unmodifiedSections);\n\t\t}\n\t}\n\tsections.push(`\\n## Next Steps\\n\\n- ${formatToolCallInstruction({\n\t\ttoolName: \"get_snapshot_image\",\n\t\targuments: {\n\t\t\torganizationSlug,\n\t\t\tsnapshotId,\n\t\t\timageIdentifier: \"<image_file_name>\"\n\t\t},\n\t\texperimentalMode: options.experimentalMode ?? false,\n\t\tavailableToolNames: options.availableToolNames,\n\t\tdirectToolNames: options.directToolNames,\n\t\tfallbackInstruction: getSnapshotImagePreviewFallback(resolvedSnapshotUrl)\n\t})} to view a specific image preview\\n${formatSnapshotImageFullResolutionStep({\n\t\torganizationSlug,\n\t\tsnapshotId,\n\t\timageIdentifier: \"<image_file_name>\",\n\t\texperimentalMode: options.experimentalMode ?? false,\n\t\tavailableToolNames: options.availableToolNames,\n\t\tdirectToolNames: options.directToolNames\n\t})}`);\n\treturn sections.join(\"\\n\");\n}\n\n//#endregion\nexport { fetchSnapshotImage, fetchSnapshotSummary };\n//# sourceMappingURL=handlers-CCIzlp0E.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { fetchSnapshotSummary } from \"./handlers-CCIzlp0E.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-snapshot.ts\nvar get_snapshot_default = defineTool({\n\tname: \"get_snapshot\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: ({ experimentalMode, availableToolNames, directToolNames }) => {\n\t\tconst imageInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"get_snapshot_image\",\n\t\t\targuments: {\n\t\t\t\torganizationSlug: \"<organization_slug>\",\n\t\t\t\tsnapshotId: \"<snapshot_id>\",\n\t\t\t\timageIdentifier: \"<image_file_name>\"\n\t\t\t},\n\t\t\texperimentalMode,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames,\n\t\t\tfallbackInstruction: \"Use the Sentry tool `get_sentry_resource`\"\n\t\t});\n\t\tconst imageInstructionSuffix = imageInstruction.includes(\"get_snapshot_image\") ? \" to view a specific image preview or full-resolution image bytes.\" : \" to view a specific image preview.\";\n\t\treturn [\n\t\t\t\"Get a preprod snapshot comparison summary, including metadata, counts, and changed image sections.\",\n\t\t\t\"\",\n\t\t\t\"Use this tool when you need to:\",\n\t\t\t\"- Investigate a failed snapshot test from CI\",\n\t\t\t\"- Review what changed in a specific preprod snapshot\",\n\t\t\t\"- Browse snapshot image file names before viewing a specific image\",\n\t\t\t\"\",\n\t\t\t\"Pass organizationSlug and snapshotId. Use get_sentry_resource for snapshot URLs.\",\n\t\t\t\"Compact output is returned by default. Set showUnmodified=true to list unchanged and skipped images separately.\",\n\t\t\t\"\",\n\t\t\t\"<examples>\",\n\t\t\t\"### Browse a snapshot\",\n\t\t\t\"\",\n\t\t\t\"```\",\n\t\t\t\"get_snapshot(organizationSlug=\\\"sentry\\\", snapshotId=\\\"231949\\\")\",\n\t\t\t\"```\",\n\t\t\t\"\",\n\t\t\t\"### Include unchanged and skipped images\",\n\t\t\t\"\",\n\t\t\t\"```\",\n\t\t\t\"get_snapshot(organizationSlug=\\\"sentry\\\", snapshotId=\\\"231949\\\", showUnmodified=true)\",\n\t\t\t\"```\",\n\t\t\t\"</examples>\",\n\t\t\t\"\",\n\t\t\t\"<hints>\",\n\t\t\t`- ${imageInstruction}${imageInstructionSuffix}`,\n\t\t\t\"- Use get_sentry_resource when starting from a Sentry snapshot URL.\",\n\t\t\t\"- The diff percent field shows what percentage of pixels changed (0-100).\",\n\t\t\t\"- showUnmodified=true is useful when a diff snapshot has no changed image sections.\",\n\t\t\t\"</hints>\"\n\t\t].join(\"\\n\");\n\t},\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tsnapshotId: z.string().trim().min(1).describe(\"The numeric snapshot artifact ID.\"),\n\t\tshowUnmodified: z.boolean().describe(\"When true, include unchanged and skipped image sections. This can substantially increase response size and token usage for large snapshots.\").default(false),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tif (!params.organizationSlug || !params.snapshotId) throw new UserInputError(\"Provide both organizationSlug and snapshotId. Use get_sentry_resource for snapshot URLs.\");\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\treturn fetchSnapshotSummary(apiService, params.organizationSlug, params.snapshotId, null, {\n\t\t\tshowUnmodified: params.showUnmodified,\n\t\t\tlistImagesWhenNoDiffs: true,\n\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames\n\t\t});\n\t}\n});\n\n//#endregion\nexport { get_snapshot_default };\n//# sourceMappingURL=get-snapshot-Ce1Z98WR.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { fetchSnapshotImage } from \"./handlers-CCIzlp0E.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-snapshot-image.ts\nvar get_snapshot_image_default = defineTool({\n\tname: \"get_snapshot_image\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Get metadata and image content for one image in a preprod snapshot.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- View the current, previous, or diff image for a snapshot entry\",\n\t\t\"- Inspect metadata and context for a specific snapshot image\",\n\t\t\"- Fetch full-resolution image bytes when preview images are insufficient; full-resolution images can substantially increase response size and token usage\",\n\t\t\"\",\n\t\t\"Pass organizationSlug, snapshotId, and imageIdentifier. Use get_sentry_resource for snapshot URLs.\",\n\t\t\"Preview images are returned by default; set imageResolution=full for original bytes when needed, but expect higher response size and token usage.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### View a preview image\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_snapshot_image(organizationSlug=\\\"sentry\\\", snapshotId=\\\"231949\\\", imageIdentifier=\\\"login_screen.png\\\")\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Fetch original full-resolution bytes\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_snapshot_image(organizationSlug=\\\"sentry\\\", snapshotId=\\\"231949\\\", imageIdentifier=\\\"login_screen.png\\\", imageResolution=\\\"full\\\")\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use get_snapshot first if you need to discover available image file names.\",\n\t\t\"- Use get_sentry_resource when starting from a Sentry snapshot URL.\",\n\t\t\"- imageIdentifier values may include slashes; pass the full image_file_name exactly as shown by get_snapshot.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tsnapshotId: z.string().trim().min(1).describe(\"The numeric snapshot artifact ID.\"),\n\t\timageIdentifier: z.string().trim().min(1).describe(\"The snapshot image file name or identifier to fetch.\"),\n\t\timageResolution: z.enum([\"preview\", \"full\"]).describe(\"Return locally generated previews or original full-resolution bytes. Full-resolution images can substantially increase response size and token usage.\").default(\"preview\"),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tif (!params.organizationSlug || !params.snapshotId) throw new UserInputError(\"Provide both organizationSlug and snapshotId. Use get_sentry_resource for snapshot URLs.\");\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\treturn fetchSnapshotImage(apiService, params.organizationSlug, params.snapshotId, params.imageIdentifier, params.imageResolution, {\n\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames\n\t\t});\n\t}\n});\n\n//#endregion\nexport { get_snapshot_image_default };\n//# sourceMappingURL=get-snapshot-image-CWtW-DQz.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { get_monitor_details_default } from \"./get-monitor-details-CP_Cj6P3.js\";\nimport { formatToolCallInstruction } from \"./tool-call-formatting-ALc98KqF.js\";\nimport { resolveScopedOrganizationSlug, resolveScopedProjectSlug } from \"./url-scope-CRM5sNo7.js\";\nimport { get_issue_details_default } from \"./get-issue-details-DHDUffp5.js\";\nimport { get_trace_details_default } from \"./get-trace-details-D7U8b5_V.js\";\nimport { get_span_details_default } from \"./get-span-details-DfXIT1v_.js\";\nimport { parseSentryUrl } from \"./url-helpers-CcAcmPuu.js\";\nimport { get_replay_details_default } from \"./get-replay-details-BWeEKq_j.js\";\nimport { get_profile_details_default } from \"./get-profile-details-B7TCia0B.js\";\nimport { get_agent_conversation_details_default } from \"./get-agent-conversation-details-DTJR8hFg.js\";\nimport { get_snapshot_default } from \"./get-snapshot-Ce1Z98WR.js\";\nimport { get_snapshot_image_default } from \"./get-snapshot-image-CWtW-DQz.js\";\nimport { z } from \"zod\";\nimport { getActiveSpan, setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-sentry-resource.ts\n/** Types with full API integration. */\nconst FULLY_SUPPORTED_TYPES = [\n\t\"issue\",\n\t\"event\",\n\t\"trace\",\n\t\"ai_conversation\",\n\t\"replay\",\n\t\"monitor\",\n\t\"snapshot\"\n];\nfunction resolveResourceParams(params) {\n\tif (params.url) {\n\t\tconst parsed = parseSentryUrl(params.url);\n\t\treturn resolveFromParsedUrl(parsed, params);\n\t}\n\tif (!params.resourceType) throw new UserInputError(\"Either `url` or `resourceType` must be provided. Pass a `url` to auto-detect the resource type, or specify `resourceType` with `resourceId`.\");\n\tif (!FULLY_SUPPORTED_TYPES.includes(params.resourceType)) throw new UserInputError(`Invalid resourceType: ${params.resourceType}. Supported types: ${FULLY_SUPPORTED_TYPES.join(\", \")}`);\n\tif (!params.organizationSlug) throw new UserInputError(\"`organizationSlug` is required when not using a URL.\");\n\tconst resourceType = params.resourceType;\n\tconst organizationSlug = params.organizationSlug;\n\tif (!params.resourceId) throw new UserInputError(\"`resourceId` is required when not using a URL.\");\n\tconst resourceId = params.resourceId;\n\tswitch (resourceType) {\n\t\tcase \"issue\": return {\n\t\t\ttype: \"issue\",\n\t\t\torganizationSlug,\n\t\t\tissueId: resourceId.toUpperCase()\n\t\t};\n\t\tcase \"event\": return {\n\t\t\ttype: \"event\",\n\t\t\torganizationSlug,\n\t\t\teventId: resourceId\n\t\t};\n\t\tcase \"trace\": return {\n\t\t\ttype: \"trace\",\n\t\t\torganizationSlug,\n\t\t\ttraceId: resourceId\n\t\t};\n\t\tcase \"ai_conversation\": return {\n\t\t\ttype: \"ai_conversation\",\n\t\t\torganizationSlug,\n\t\t\tconversationId: resourceId\n\t\t};\n\t\tcase \"replay\": return {\n\t\t\ttype: \"replay\",\n\t\t\torganizationSlug,\n\t\t\treplayId: resourceId\n\t\t};\n\t\tcase \"monitor\": return {\n\t\t\ttype: \"monitor\",\n\t\t\torganizationSlug,\n\t\t\tmonitorSlug: resourceId,\n\t\t\tprojectSlugOrId: params.projectSlug ?? void 0\n\t\t};\n\t\tcase \"snapshot\": return {\n\t\t\ttype: \"snapshot\",\n\t\t\torganizationSlug,\n\t\t\tsnapshotId: resourceId\n\t\t};\n\t}\n}\n/**\n* When resourceType is provided alongside a URL, it can override a span-focused\n* trace URL to fetch the full trace.\n*/\nfunction resolveFromParsedUrl(parsed, params) {\n\tconst detectedType = parsed.type === \"trace\" && parsed.spanId ? \"span\" : parsed.type;\n\tconst organizationSlug = resolveScopedOrganizationSlug({\n\t\tresourceLabel: \"Sentry resource\",\n\t\tscopedOrganizationSlug: params.organizationSlug,\n\t\turlOrganizationSlug: parsed.organizationSlug\n\t});\n\tif (detectedType === \"unknown\") {\n\t\tif (parsed.transaction) throw new UserInputError(`Detected a performance summary URL for transaction \"${parsed.transaction}\". Use \\`search_events\\` to find traces and performance data for this transaction.`);\n\t\tthrow new UserInputError(\"Could not determine resource type from URL. Supported URL patterns: issues, events, traces, agent conversations, profiles, replays, monitors, and releases.\");\n\t}\n\tif (params.resourceType && params.resourceType !== detectedType) {\n\t\tif (params.resourceType === \"trace\" && detectedType === \"span\") {\n\t\t\tif (!parsed.traceId) throw new UserInputError(\"Could not extract trace ID from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"trace\",\n\t\t\t\torganizationSlug,\n\t\t\t\ttraceId: parsed.traceId\n\t\t\t};\n\t\t}\n\t\tthrow new UserInputError(`Cannot override URL type with resourceType '${params.resourceType}'. Only 'trace' on a span URL can be used as a resourceType override with a URL.`);\n\t}\n\tswitch (detectedType) {\n\t\tcase \"issue\":\n\t\t\tif (!parsed.issueId) throw new UserInputError(\"Could not extract issue ID from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"issue\",\n\t\t\t\torganizationSlug,\n\t\t\t\tissueId: parsed.issueId\n\t\t\t};\n\t\tcase \"event\":\n\t\t\tif (!parsed.issueId || !parsed.eventId) throw new UserInputError(\"Could not extract issue ID and event ID from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"event\",\n\t\t\t\torganizationSlug,\n\t\t\t\tissueId: parsed.issueId,\n\t\t\t\teventId: parsed.eventId\n\t\t\t};\n\t\tcase \"trace\":\n\t\t\tif (!parsed.traceId) throw new UserInputError(\"Could not extract trace ID from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"trace\",\n\t\t\t\torganizationSlug,\n\t\t\t\ttraceId: parsed.traceId\n\t\t\t};\n\t\tcase \"span\":\n\t\t\tif (!parsed.traceId || !parsed.spanId) throw new UserInputError(\"Could not extract trace ID and span ID from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"span\",\n\t\t\t\torganizationSlug,\n\t\t\t\ttraceId: parsed.traceId,\n\t\t\t\tspanId: parsed.spanId\n\t\t\t};\n\t\tcase \"ai_conversation\":\n\t\t\tif (!parsed.conversationId) throw new UserInputError(\"Could not extract agent conversation ID from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"ai_conversation\",\n\t\t\t\torganizationSlug,\n\t\t\t\tconversationId: parsed.conversationId,\n\t\t\t\tprojectSlugOrId: parsed.projectSlugOrId,\n\t\t\t\tstart: parsed.start,\n\t\t\t\tend: parsed.end\n\t\t\t};\n\t\tcase \"profile\":\n\t\t\tif (!parsed.projectSlugOrId) throw new UserInputError(\"Could not extract project slug from profile URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"profile\",\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: resolveScopedProjectSlug({\n\t\t\t\t\tresourceLabel: \"Profile\",\n\t\t\t\t\tscopedProjectSlug: params.projectSlug,\n\t\t\t\t\turlProjectSlug: parsed.projectSlugOrId\n\t\t\t\t}),\n\t\t\t\tprofileId: parsed.profileId,\n\t\t\t\tprofilerId: parsed.profilerId,\n\t\t\t\tstart: parsed.start,\n\t\t\t\tend: parsed.end\n\t\t\t};\n\t\tcase \"replay\":\n\t\t\tif (!parsed.replayId) throw new UserInputError(\"Could not extract replay ID from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"replay\",\n\t\t\t\torganizationSlug,\n\t\t\t\treplayId: parsed.replayId\n\t\t\t};\n\t\tcase \"monitor\":\n\t\t\tif (!parsed.monitorSlug) throw new UserInputError(\"Could not extract monitor slug from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"monitor\",\n\t\t\t\torganizationSlug,\n\t\t\t\tmonitorSlug: parsed.monitorSlug,\n\t\t\t\tprojectSlugOrId: parsed.projectSlugOrId ? isNumericId(parsed.projectSlugOrId) ? parsed.projectSlugOrId : resolveScopedProjectSlug({\n\t\t\t\t\tresourceLabel: \"Monitor\",\n\t\t\t\t\tscopedProjectSlug: params.projectSlug,\n\t\t\t\t\turlProjectSlug: parsed.projectSlugOrId\n\t\t\t\t}) : void 0\n\t\t\t};\n\t\tcase \"release\":\n\t\t\tif (!parsed.releaseVersion) throw new UserInputError(\"Could not extract release version from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"release\",\n\t\t\t\torganizationSlug,\n\t\t\t\treleaseVersion: parsed.releaseVersion\n\t\t\t};\n\t\tcase \"snapshot\":\n\t\t\tif (!parsed.snapshotId) throw new UserInputError(\"Could not extract snapshot ID from URL.\");\n\t\t\treturn {\n\t\t\t\ttype: \"snapshot\",\n\t\t\t\torganizationSlug,\n\t\t\t\tsnapshotId: parsed.snapshotId,\n\t\t\t\tselectedSnapshot: parsed.selectedSnapshot\n\t\t\t};\n\t}\n}\nfunction assertCatalogToolAvailable(context, toolName, resourceLabel) {\n\tif (!isToolAvailable(toolName, context.availableToolNames)) throw new UserInputError(`${resourceLabel} resources require the inspect skill. Enable inspect tools or call ${toolName} in a session where it is available.`);\n}\nfunction isToolAvailable(toolName, availableToolNames) {\n\treturn !availableToolNames || availableToolNames.has(toolName);\n}\nfunction generateUnsupportedResourceMessage(resolved, apiService, experimentalMode, availableToolNames, directToolNames) {\n\tconst { type, organizationSlug } = resolved;\n\tswitch (type) {\n\t\tcase \"release\": {\n\t\t\tconst releaseUrl = apiService.getReleaseUrl(organizationSlug, resolved.releaseVersion ?? \"\");\n\t\t\tconst findReleasesInstruction = formatToolCallInstruction({\n\t\t\t\ttoolName: \"find_releases\",\n\t\t\t\targuments: { organizationSlug },\n\t\t\t\texperimentalMode,\n\t\t\t\tavailableToolNames,\n\t\t\t\tdirectToolNames,\n\t\t\t\tfallbackInstruction: \"Release listing is not available in this session\",\n\t\t\t\tpurpose: \"to list releases and their details\"\n\t\t\t});\n\t\t\treturn [\n\t\t\t\t\"# Release Detected\",\n\t\t\t\t\"\",\n\t\t\t\t`**Organization**: ${organizationSlug}`,\n\t\t\t\t`**Release**: ${resolved.releaseVersion}`,\n\t\t\t\t\"\",\n\t\t\t\t\"To get release information:\",\n\t\t\t\t\"\",\n\t\t\t\t`- **View in Sentry**: [Open Release](${releaseUrl})`,\n\t\t\t\t`- **Find releases**: ${findReleasesInstruction}`,\n\t\t\t\t`- **Search issues**: Use \\`search_issues\\` with query \\`release:${resolved.releaseVersion}\\` to find issues in this release`\n\t\t\t].join(\"\\n\");\n\t\t}\n\t\tdefault: return `Unsupported resource type: ${type}`;\n\t}\n}\nvar get_sentry_resource_default = defineTool({\n\tname: \"get_sentry_resource\",\n\tskills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\", \"project:read\"],\n\tdescription: ({ experimentalMode, availableToolNames, directToolNames }) => {\n\t\tconst monitorResourcesAvailable = isToolAvailable(\"get_monitor_details\", availableToolNames);\n\t\tconst fullResolutionInstruction = formatToolCallInstruction({\n\t\t\ttoolName: \"get_snapshot_image\",\n\t\t\targuments: {\n\t\t\t\torganizationSlug: \"<organization_slug>\",\n\t\t\t\tsnapshotId: \"<snapshot_id>\",\n\t\t\t\timageIdentifier: \"<image_file_name>\",\n\t\t\t\timageResolution: \"full\"\n\t\t\t},\n\t\t\texperimentalMode,\n\t\t\tavailableToolNames,\n\t\t\tdirectToolNames,\n\t\t\tfallbackInstruction: \"Full-resolution snapshot image bytes are not available in this session\",\n\t\t\tpurpose: \"for full-resolution image bytes\"\n\t\t});\n\t\tconst supportedResources = monitorResourcesAvailable ? \"issues, events, traces, spans, agent conversations, replays, monitors, preprod snapshots, and snapshot images.\" : \"issues, events, traces, spans, agent conversations, replays, preprod snapshots, and snapshot images.\";\n\t\tconst resourceIds = [...monitorResourcesAvailable ? [\"- monitor: <monitorSlug>\"] : [], \"- snapshot: <snapshotId>\"];\n\t\treturn [\n\t\t\t\"Fetch a Sentry resource by URL, or by resourceType plus resourceId.\",\n\t\t\t\"Pass a Sentry URL directly when possible; the resource type is auto-detected.\",\n\t\t\t\"\",\n\t\t\t`Supports ${supportedResources}`,\n\t\t\t\"Trace lookups return a condensed overview by default.\",\n\t\t\t\"\",\n\t\t\t\"Agent Conversations: A conversation is a set of spans sharing the same gen_ai.conversation.id. Use resourceType='ai_conversation' with a conversation ID, or pass a Sentry conversation URL, to fetch the transcript/details. To discover or list conversations, use search_agent_conversations. Conversations are NOT issues — do not use search_issues for conversation queries.\",\n\t\t\t\"\",\n\t\t\t\"For preprod snapshot URLs (matching 'sentry.io/preprod/snapshots/'):\",\n\t\t\t\"- Without ?selectedSnapshot=: returns the snapshot diff summary (changed, added, removed images)\",\n\t\t\t`- With ?selectedSnapshot=<image_file_name>: returns the image preview and metadata. ${fullResolutionInstruction}.`,\n\t\t\t\"\",\n\t\t\t\"Resource IDs:\",\n\t\t\t...resourceIds,\n\t\t\t\"\",\n\t\t\t\"<examples>\",\n\t\t\t\"get_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\",\n\t\t\t\"get_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\",\n\t\t\t\"get_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\",\n\t\t\t\"get_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/123/')\",\n\t\t\t\"get_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/123/?selectedSnapshot=login_screen.png')\",\n\t\t\t\"</examples>\"\n\t\t].join(\"\\n\");\n\t},\n\tinputSchema: {\n\t\turl: z.string().url().optional().describe(\"Sentry URL. The resource type is auto-detected from the URL pattern.\"),\n\t\tresourceType: z.enum([\n\t\t\t\"issue\",\n\t\t\t\"event\",\n\t\t\t\"trace\",\n\t\t\t\"ai_conversation\",\n\t\t\t\"replay\",\n\t\t\t\"monitor\",\n\t\t\t\"snapshot\"\n\t\t]).optional().describe(\"Resource type. With a URL, can override a span-focused trace URL with `trace`. Use `monitor` with a monitor slug only when inspect monitor tools are available or `snapshot` with a snapshot artifact ID.\"),\n\t\tresourceId: z.string().trim().optional().describe(\"Resource identifier: issue shortId (e.g., 'PROJECT-123'), event ID, trace ID, agent conversation ID, replay ID, monitor slug when inspect monitor tools are available, or snapshot artifact ID. Required when not using a URL.\"),\n\t\torganizationSlug: ParamOrganizationSlug.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst resolved = resolveResourceParams({\n\t\t\turl: params.url,\n\t\t\tresourceType: params.resourceType,\n\t\t\tresourceId: params.resourceId,\n\t\t\torganizationSlug: params.organizationSlug ?? context.constraints.organizationSlug,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tsetTag(\"resource.type\", resolved.type);\n\t\tsetTag(\"organization.slug\", resolved.organizationSlug);\n\t\tif (resolved.spanId) setTag(\"trace.span_id\", resolved.spanId);\n\t\tgetActiveSpan()?.setAttribute(\"app.resource.type\", resolved.type);\n\t\tif (resolved.type === \"release\") {\n\t\t\tconst apiService = apiServiceFromContext(context, { regionUrl: context.constraints.regionUrl ?? void 0 });\n\t\t\treturn generateUnsupportedResourceMessage(resolved, apiService, context.experimentalMode ?? false, context.availableToolNames, context.directToolNames);\n\t\t}\n\t\tswitch (resolved.type) {\n\t\t\tcase \"issue\": return get_issue_details_default.handler({\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\tissueId: resolved.issueId,\n\t\t\t\tregionUrl: context.constraints.regionUrl ?? null\n\t\t\t}, context);\n\t\t\tcase \"event\": return get_issue_details_default.handler({\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\tissueId: resolved.issueId,\n\t\t\t\teventId: resolved.eventId,\n\t\t\t\tregionUrl: context.constraints.regionUrl ?? null\n\t\t\t}, context);\n\t\t\tcase \"trace\": return get_trace_details_default.handler({\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\ttraceId: resolved.traceId,\n\t\t\t\tregionUrl: context.constraints.regionUrl ?? null\n\t\t\t}, context);\n\t\t\tcase \"span\": return get_span_details_default.handler({\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\ttraceId: resolved.traceId,\n\t\t\t\tspanId: resolved.spanId,\n\t\t\t\tregionUrl: context.constraints.regionUrl ?? null\n\t\t\t}, context);\n\t\t\tcase \"ai_conversation\": return get_agent_conversation_details_default.handler({\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\tconversationId: resolved.conversationId,\n\t\t\t\tproject: resolved.projectSlugOrId,\n\t\t\t\tstart: resolved.start,\n\t\t\t\tend: resolved.end,\n\t\t\t\tregionUrl: context.constraints.regionUrl ?? void 0\n\t\t\t}, context);\n\t\t\tcase \"replay\": return get_replay_details_default.handler({\n\t\t\t\treplayUrl: params.url,\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\treplayId: resolved.replayId,\n\t\t\t\tregionUrl: context.constraints.regionUrl ?? void 0\n\t\t\t}, context);\n\t\t\tcase \"monitor\":\n\t\t\t\tassertCatalogToolAvailable(context, \"get_monitor_details\", \"Monitor\");\n\t\t\t\treturn get_monitor_details_default.handler({\n\t\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\t\tprojectSlugOrId: resolved.projectSlugOrId ?? null,\n\t\t\t\t\tmonitorSlug: resolved.monitorSlug,\n\t\t\t\t\tregionUrl: context.constraints.regionUrl ?? null,\n\t\t\t\t\tenvironment: null,\n\t\t\t\t\tperiod: \"24h\",\n\t\t\t\t\tstart: null,\n\t\t\t\t\tend: null,\n\t\t\t\t\tcheckInLimit: 10,\n\t\t\t\t\tincludeStats: true,\n\t\t\t\t\trollupSeconds: null\n\t\t\t\t}, context);\n\t\t\tcase \"profile\": return get_profile_details_default.handler({\n\t\t\t\tprofileUrl: params.url,\n\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\tprojectSlugOrId: resolved.projectSlugOrId,\n\t\t\t\tprofileId: resolved.profileId,\n\t\t\t\tprofilerId: resolved.profilerId,\n\t\t\t\tstart: resolved.start,\n\t\t\t\tend: resolved.end,\n\t\t\t\tregionUrl: context.constraints.regionUrl ?? null,\n\t\t\t\tfocusOnUserCode: true\n\t\t\t}, context);\n\t\t\tcase \"snapshot\":\n\t\t\t\tif (resolved.selectedSnapshot) return get_snapshot_image_default.handler({\n\t\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\t\tsnapshotId: resolved.snapshotId,\n\t\t\t\t\timageIdentifier: resolved.selectedSnapshot,\n\t\t\t\t\timageResolution: \"preview\",\n\t\t\t\t\tregionUrl: context.constraints.regionUrl ?? null\n\t\t\t\t}, context);\n\t\t\t\treturn get_snapshot_default.handler({\n\t\t\t\t\torganizationSlug: resolved.organizationSlug,\n\t\t\t\t\tsnapshotId: resolved.snapshotId,\n\t\t\t\t\tshowUnmodified: false,\n\t\t\t\t\tregionUrl: context.constraints.regionUrl ?? null\n\t\t\t\t}, context);\n\t\t\tdefault: {\n\t\t\t\tconst _exhaustiveCheck = resolved.type;\n\t\t\t\tthrow new Error(`Unhandled resource type: ${_exhaustiveCheck}`);\n\t\t\t}\n\t\t}\n\t}\n});\n\n//#endregion\nexport { FULLY_SUPPORTED_TYPES, get_sentry_resource_default, resolveResourceParams };\n//# sourceMappingURL=get-sentry-resource-DAx17Rhc.js.map","import { isNumericId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { renderSnapshotImageTreeSection } from \"./formatting-C_fxwUSt.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/get-latest-base-snapshot.ts\nvar get_latest_base_snapshot_default = defineTool({\n\tname: \"get_latest_base_snapshot\",\n\tskills: [\"inspect\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Get the latest UI screenshots/images for an app from the preprod snapshot system.\",\n\t\t\"\",\n\t\t\"This is the primary tool for retrieving app screenshots — not search_events or search_issues.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Get screenshots, screens, golden images, or reference images for an app\",\n\t\t\"- Find what the current UI looks like (latest screenshots from the main/default branch)\",\n\t\t\"- List available snapshots or browse images before requesting specific ones\",\n\t\t\"- Look up dark mode, light mode, or other variant screenshots\",\n\t\t\"- Understand what baseline images exist when investigating snapshot test or visual regression CI failures\",\n\t\t\"\",\n\t\t\"The appId parameter is the app identifier (e.g. 'sentry-frontend', 'com.emergetools.hackernews').\",\n\t\t\"Returns compact image metadata (display_name, image_file_name, group, description) for every image.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Get the latest screenshots for an app\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_latest_base_snapshot(organizationSlug=\\\"sentry\\\", appId=\\\"sentry-frontend\\\", project=\\\"frontend\\\")\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Get the latest screenshots for a specific branch\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_latest_base_snapshot(organizationSlug=\\\"sentry\\\", appId=\\\"sentry-frontend\\\", project=\\\"frontend\\\", branch=\\\"main\\\")\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- The response includes compact metadata per image. Scan the list to find images matching what you need (e.g. filter by group or name containing 'button').\",\n\t\t\"- To view a specific image, use get_sentry_resource(url='<snapshot_url>?selectedSnapshot=<image_file_name>').\",\n\t\t\"- If you need to investigate a specific snapshot comparison, use get_sentry_resource with the snapshot URL.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tappId: z.string().trim().describe(\"The app identifier (e.g. 'sentry-frontend', 'com.emergetools.hackernews'). Required.\"),\n\t\tbranch: z.string().trim().describe(\"Filter by git branch (e.g. 'main'). Omit to use the app's default branch.\").nullable().default(null),\n\t\tproject: z.string().trim().describe(\"Project slug or numeric ID for scoping (e.g. 'frontend').\").nullable().default(null),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst project = params.project ?? void 0;\n\t\tconst projectId = project && isNumericId(project) ? project : void 0;\n\t\tconst projectSlug = project && !isNumericId(project) ? project : void 0;\n\t\tif (projectId) setTag(\"project.id\", projectId);\n\t\tif (projectSlug) setTag(\"project.slug\", projectSlug);\n\t\tconst data = await apiService.getLatestBaseSnapshot({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tappId: params.appId,\n\t\t\tbranch: params.branch ?? void 0,\n\t\t\tproject: projectId,\n\t\t\tprojectSlug,\n\t\t\tcompactMetadata: true\n\t\t});\n\t\tconst snapshotId = data.id;\n\t\tconst images = data.images || [];\n\t\tconst appInfo = data.app_info;\n\t\tconst vcsInfo = data.vcs_info;\n\t\tconst snapshotUrl = snapshotId ? apiService.getPreprodSnapshotUrl(params.organizationSlug, snapshotId) : null;\n\t\tconst sections = [];\n\t\tsections.push(`# Latest Base Snapshot for **${params.appId}** in **${params.organizationSlug}**`);\n\t\tsections.push(\"\\n## Summary\\n\");\n\t\tif (snapshotUrl) sections.push(`- **URL**: ${snapshotUrl}`);\n\t\tif (snapshotId) sections.push(`- **Snapshot ID**: ${snapshotId}`);\n\t\tif (appInfo) {\n\t\t\tif (appInfo.name) sections.push(`- **App Name**: ${appInfo.name}`);\n\t\t\tif (appInfo.platform) sections.push(`- **Platform**: ${appInfo.platform}`);\n\t\t}\n\t\tif (vcsInfo) {\n\t\t\tif (vcsInfo.head_ref) sections.push(`- **Branch**: ${vcsInfo.head_ref} (\\`${String(vcsInfo.head_sha ?? \"\").slice(0, 8)}\\`)`);\n\t\t}\n\t\tsections.push(`- **Total Images**: ${images.length}`);\n\t\tif (images.length > 0) {\n\t\t\tsections.push(\"\\n## Images\\n\");\n\t\t\tsections.push(...renderSnapshotImageTreeSection(\"Snapshot Images\", images.map((image) => ({ image }))));\n\t\t}\n\t\tsections.push(snapshotUrl ? `\\n## Next Steps\\n\\n- To view a specific image, use \\`get_sentry_resource(url=\"${snapshotUrl}?selectedSnapshot=<image_file_name>\")\\`` : \"\\n## Next Steps\\n\\n- To view a specific image, use `get_sentry_resource` with the snapshot URL + `?selectedSnapshot=<image_file_name>`\");\n\t\treturn sections.join(\"\\n\");\n\t}\n});\n\n//#endregion\nexport { get_latest_base_snapshot_default };\n//# sourceMappingURL=get-latest-base-snapshot-KoSAQyLF.js.map","import { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isNumericId } from \"./slug-validation-MJ3jU0Hd.js\";\nimport { ParamOrganizationSlug, ParamPeriod, ParamProjectSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/search-agent-conversations.ts\nconst PREVIEW_LENGTH = 240;\nconst TRACE_ID_SAMPLE_SIZE = 3;\nconst aiConversationSearchResultSchema = z.object({\n\tconversationId: z.string(),\n\ttitle: z.string().nullable(),\n\turl: z.string().url(),\n\tstartTimestamp: z.number(),\n\tendTimestamp: z.number(),\n\tdurationMs: z.number(),\n\terrors: z.number(),\n\taiCallCount: z.number(),\n\ttoolCallCount: z.number(),\n\ttoolErrorCount: z.number(),\n\ttotalTokens: z.number(),\n\ttotalCost: z.number(),\n\ttraceCount: z.number(),\n\tsampleTraceIds: z.array(z.string()),\n\tfirstInputPreview: z.string().nullable(),\n\tlastOutputPreview: z.string().nullable(),\n\tflow: z.array(z.string()),\n\ttoolNames: z.array(z.string()),\n\tuser: z.object({\n\t\temail: z.string().nullable(),\n\t\tusername: z.string().nullable()\n\t}).nullable()\n});\nconst searchAIConversationsOutputSchema = z.object({\n\torganizationSlug: z.string(),\n\tsearchUrl: z.string().url(),\n\tcount: z.number(),\n\tnextCursor: z.string().nullable(),\n\tconversations: z.array(aiConversationSearchResultSchema)\n});\nfunction normalizeList(value) {\n\tif (value == null) return void 0;\n\treturn Array.isArray(value) ? value : [value];\n}\nasync function resolveProjectIds({ apiService, organizationSlug, project, constrainedProjectSlug }) {\n\tif (constrainedProjectSlug) {\n\t\tconst constrainedProject = await apiService.getProject({\n\t\t\torganizationSlug,\n\t\t\tprojectSlugOrId: constrainedProjectSlug\n\t\t});\n\t\treturn [String(constrainedProject.id)];\n\t}\n\tconst projects = normalizeList(project);\n\tif (!projects || projects.length === 0) return void 0;\n\treturn Promise.all(projects.map(async (projectSlugOrId) => {\n\t\tif (projectSlugOrId === \"-1\" || isNumericId(projectSlugOrId)) return projectSlugOrId;\n\t\tconst resolvedProject = await apiService.getProject({\n\t\t\torganizationSlug,\n\t\t\tprojectSlugOrId\n\t\t});\n\t\treturn String(resolvedProject.id);\n\t}));\n}\nfunction previewText(value) {\n\tif (value == null || value.length <= PREVIEW_LENGTH) return value;\n\treturn `${value.slice(0, PREVIEW_LENGTH - 3)}...`;\n}\nfunction projectUser(user) {\n\tif (!user) return null;\n\treturn {\n\t\temail: user.email,\n\t\tusername: user.username\n\t};\n}\n/**\n* Builds the stable structuredContent projection returned by the search tool.\n*/\nfunction buildArtifact(apiService, organizationSlug, conversations, nextCursor, searchUrl) {\n\treturn {\n\t\torganizationSlug,\n\t\tsearchUrl,\n\t\tcount: conversations.length,\n\t\tnextCursor,\n\t\tconversations: conversations.map((conversation) => {\n\t\t\tconst { conversationId, title, flow, errors, llmCalls, toolCalls, totalTokens, totalCost, startTimestamp, endTimestamp, traceCount, traceIds, firstInput, lastOutput, user, toolNames, toolErrors } = conversation;\n\t\t\treturn {\n\t\t\t\tconversationId,\n\t\t\t\ttitle,\n\t\t\t\tflow,\n\t\t\t\terrors,\n\t\t\t\taiCallCount: llmCalls,\n\t\t\t\ttoolCallCount: toolCalls,\n\t\t\t\ttotalTokens,\n\t\t\t\ttotalCost,\n\t\t\t\tstartTimestamp,\n\t\t\t\tendTimestamp,\n\t\t\t\ttraceCount,\n\t\t\t\tsampleTraceIds: traceIds.slice(0, TRACE_ID_SAMPLE_SIZE),\n\t\t\t\tfirstInputPreview: previewText(firstInput),\n\t\t\t\tlastOutputPreview: previewText(lastOutput),\n\t\t\t\tuser: projectUser(user),\n\t\t\t\ttoolNames,\n\t\t\t\ttoolErrorCount: toolErrors,\n\t\t\t\turl: apiService.getAIConversationUrl(organizationSlug, conversationId),\n\t\t\t\tdurationMs: endTimestamp - startTimestamp\n\t\t\t};\n\t\t})\n\t};\n}\nvar search_agent_conversations_default = defineTool({\n\tname: \"search_agent_conversations\",\n\tskills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\", \"project:read\"],\n\tdescription: [\n\t\t\"Search Sentry Agent Conversations, formerly called AI Conversations, and return one summary row per conversation.\",\n\t\t\"\",\n\t\t\"Use this tool to find or list Agent Conversations. Results are conversation summaries, not raw span rows.\",\n\t\t\"Each row includes title (when available), cost, tokens, call counts, previews, and other list metadata.\",\n\t\t\"Use get_agent_conversation_details with a conversationId to fetch the transcript. Use get_sentry_resource for Sentry conversation URLs.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"search_agent_conversations(organizationSlug='my-org', query='failed conversations', period='7d')\",\n\t\t\"search_agent_conversations(organizationSlug='my-org', query='checkout', project='backend')\",\n\t\t\"</examples>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tquery: z.string().trim().optional().describe(\"Conversation query/filter string.\"),\n\t\tproject: z.union([ParamProjectSlug, z.array(ParamProjectSlug).min(1)]).optional().describe(\"Project slug or numeric project ID, or an array of projects.\"),\n\t\tenvironment: z.union([z.string().trim().min(1), z.array(z.string().trim().min(1)).min(1)]).optional().describe(\"Environment name, or an array of environments.\"),\n\t\tperiod: ParamPeriod.default(\"30d\").describe(\"Relative time range. Defaults to 30d.\"),\n\t\tstart: z.string().trim().optional().describe(\"Explicit start time for the search window.\"),\n\t\tend: z.string().trim().optional().describe(\"Explicit end time for the search window.\"),\n\t\tcursor: z.string().trim().optional().describe(\"Pagination cursor from a previous response.\"),\n\t\tlimit: z.number().int().min(1).max(100).default(10),\n\t\tregionUrl: ParamRegionUrl.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\toutputSchema: searchAIConversationsOutputSchema,\n\tasync handler(params, context) {\n\t\tif (params.start && !params.end || !params.start && params.end) throw new UserInputError(\"`start` and `end` must be provided together.\");\n\t\tconst requestedPeriod = params.period ?? \"30d\";\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst projectIds = await resolveProjectIds({\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\tproject: params.project,\n\t\t\tconstrainedProjectSlug: context.constraints.projectSlug\n\t\t});\n\t\tconst statsPeriod = params.start || params.end ? void 0 : requestedPeriod;\n\t\tconst { conversations, nextCursor } = await apiService.searchAIConversations({\n\t\t\torganizationSlug,\n\t\t\tquery: params.query,\n\t\t\tproject: projectIds,\n\t\t\tenvironment: params.environment,\n\t\t\tstatsPeriod,\n\t\t\tstart: params.start,\n\t\t\tend: params.end,\n\t\t\tlimit: params.limit,\n\t\t\tcursor: params.cursor\n\t\t});\n\t\tconst searchUrl = apiService.getAIConversationsUrl(organizationSlug, {\n\t\t\tquery: params.query,\n\t\t\tproject: projectIds,\n\t\t\tenvironment: params.environment,\n\t\t\tstatsPeriod,\n\t\t\tstart: params.start,\n\t\t\tend: params.end\n\t\t});\n\t\tconst artifact = buildArtifact(apiService, organizationSlug, conversations, nextCursor, searchUrl);\n\t\treturn structuredResult(artifact);\n\t}\n});\n\n//#endregion\nexport { searchAIConversationsOutputSchema, search_agent_conversations_default };\n//# sourceMappingURL=search-agent-conversations-CUhIOq09.js.map","import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { formatActor, formatDate, formatId, readString } from \"./api-formatting-nIGXUFdx.js\";\nimport { parseIssueParams } from \"./issue-helpers-0Dnme3Ym.js\";\nimport { ensureIssueWithinProjectConstraint } from \"./issue-D65xI0F7.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/add-issue-note.ts\nfunction formatComment(comment) {\n\tconst actor = comment.user ? formatActor(comment.user) : \"current user\";\n\tconst text = comment.data ? readString(comment.data, \"text\") : null;\n\treturn [\n\t\t`**Comment ID**: ${formatId(comment.id)}`,\n\t\t`**Type**: ${comment.type ?? \"note\"}`,\n\t\t`**Author**: ${actor}`,\n\t\tformatDate(comment.dateCreated) ? `**Created**: ${formatDate(comment.dateCreated)}` : null,\n\t\ttext ? `**Text**: ${text}` : null\n\t].filter((line) => Boolean(line)).join(\"\\n\");\n}\nvar add_issue_note_default = defineTool({\n\tname: \"add_issue_note\",\n\tskills: [\"triage\"],\n\trequiredScopes: [\"event:write\"],\n\tdescription: [\n\t\t\"Add a human-visible comment to a Sentry issue's activity feed.\",\n\t\t\"\",\n\t\t\"Use this tool when the user explicitly asks to leave a note/comment, or when a triage workflow needs to record a user-approved explanation.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"add_issue_note(organizationSlug='my-organization', issueId='PROJECT-123', text='Investigating with the payments team.')\",\n\t\t\"add_issue_note(issueUrl='https://my-organization.sentry.io/issues/PROJECT-123/', text='Resolved by deploy 1.2.3.')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- This mutates visible Sentry issue state by posting a comment.\",\n\t\t\"- Do not use this for private scratch notes, secrets, credentials, or unapproved content.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\ttext: z.string().trim().min(1).max(4096).describe(\"The exact comment text to add to the issue.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst parsed = parseIssueParams({\n\t\t\tissueUrl: params.issueUrl,\n\t\t\tissueId: params.issueId,\n\t\t\torganizationSlug: params.organizationSlug ?? context.constraints.organizationSlug\n\t\t});\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? context.constraints.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", parsed.organizationSlug);\n\t\tsetTag(\"issue.id\", parsed.issueId);\n\t\tawait ensureIssueWithinProjectConstraint({\n\t\t\tapiService,\n\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\tissueId: parsed.issueId,\n\t\t\tprojectSlug: context.constraints.projectSlug\n\t\t});\n\t\tconst comment = await apiService.createIssueComment({\n\t\t\torganizationSlug: parsed.organizationSlug,\n\t\t\tissueId: parsed.issueId,\n\t\t\ttext: params.text\n\t\t});\n\t\treturn [\n\t\t\t`# Added Note to Issue ${parsed.issueId} in **${parsed.organizationSlug}**`,\n\t\t\t\"\",\n\t\t\tformatComment(comment),\n\t\t\t\"\",\n\t\t\t\"## Response Notes\",\n\t\t\t\"\",\n\t\t\t\"- The note is visible in the issue activity feed.\"\n\t\t].join(\"\\n\");\n\t}\n});\n\n//#endregion\nexport { add_issue_note_default };\n//# sourceMappingURL=add-issue-note-DqTid9mJ.js.map","import { ALL_SKILLS } from \"./skills-Dj4T8Duc.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-DKEjeVqP.js\";\nimport { AgenticOnboardingRunStatusUpdateSchema, AgenticOnboardingRunTokenSchema, AgenticOnboardingStageSchema, AgenticOnboardingStageStatusUpdateSchema, AgenticOnboardingStatusUpdateSchema } from \"./schema-BYZYkgA1.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { apiServiceFromContext } from \"./api-EaEPyKlQ.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/catalog/onboarding-status-update.ts\nconst updateBaseSchema = z.object({\n\tstatus: AgenticOnboardingStageStatusUpdateSchema.describe(\"The stage's current status.\"),\n\trunStatus: AgenticOnboardingRunStatusUpdateSchema.optional().describe(\"Set only when the entire onboarding run has completed or failed.\"),\n\teventNote: z.string().trim().min(1).max(256).optional().describe(\"Short context to display with this progress event. Required when status is failed.\")\n}).strict();\nconst createProjectUpdateSchema = updateBaseSchema.extend({\n\tstage: z.literal(\"create_project\").describe(\"Report progress while creating or selecting Sentry projects.\"),\n\textra: z.object({ projectSlugs: z.array(z.string().trim().min(1)).min(1).max(100).describe(\"Sentry project slugs created or selected during onboarding. Values accumulate across updates; include each project as it becomes usable while active, then all known projects when completed.\") }).strict().optional().describe(\"Project metadata accepted only by the create_project stage.\")\n});\nconst receiveVerificationErrorUpdateSchema = updateBaseSchema.extend({\n\tstage: z.literal(\"receive_verification_error\").describe(\"Report progress while receiving the verification error in Sentry.\"),\n\textra: z.object({ issueIds: z.array(z.string().trim().min(1)).min(1).max(100).describe(\"Sentry issue IDs observed after sending the verification error. Values accumulate across updates; include each matching issue as it is confirmed, then all known issues when completed.\") }).strict().optional().describe(\"Issue metadata accepted only by the receive_verification_error stage.\")\n});\nconst updateWithoutExtraSchema = updateBaseSchema.extend({ stage: AgenticOnboardingStageSchema.exclude([\"create_project\", \"receive_verification_error\"]).describe(\"Report progress for a stage that does not accept extra metadata.\") });\nconst onboardingUpdateSchema = z.discriminatedUnion(\"stage\", [\n\tcreateProjectUpdateSchema,\n\treceiveVerificationErrorUpdateSchema,\n\tupdateWithoutExtraSchema\n]).describe(\"The stage-specific onboarding progress update.\");\nvar onboarding_status_update_default = defineTool({\n\tname: \"onboarding_status_update\",\n\tskills: ALL_SKILLS,\n\tincludeInSkillDefinitions: false,\n\trequiredScopes: [\"org:read\"],\n\tdescription: [\n\t\t\"Update the progress shown in Sentry's agentic onboarding UI.\",\n\t\t\"\",\n\t\t\"Use this tool only when the Sentry getting started skill provides a run token. Call it at the workflow boundaries described by that skill.\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Progress updates are operational UI state, not user analytics.\",\n\t\t\"- Keep eventNote brief and limited to context useful in the progress UI.\",\n\t\t\"- Do not include source code, repository paths, credentials, error output, or other sensitive data.\",\n\t\t\"- status is required for every update.\",\n\t\t\"- Set runStatus to completed or failed only when the entire onboarding run reaches that state.\",\n\t\t\"- A failed status requires a brief eventNote explaining the failure.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\trunToken: AgenticOnboardingRunTokenSchema.describe(\"The 10-character onboarding run token supplied by Sentry.\"),\n\t\tupdate: onboardingUpdateSchema\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\tidempotentHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? context.constraints.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tconst update = AgenticOnboardingStatusUpdateSchema.parse({\n\t\t\tschemaVersion: 1,\n\t\t\trunToken: params.runToken,\n\t\t\t...params.update\n\t\t});\n\t\tconst run = await apiService.updateAgenticOnboardingStatus({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tupdate\n\t\t});\n\t\treturn `Onboarding status updated. Continue updates: ${run.continueUpdates ? \"yes\" : \"no\"}.`;\n\t}\n});\n\n//#endregion\nexport { onboarding_status_update_default };\n//# sourceMappingURL=onboarding-status-update-ZaTsL300.js.map","import { whoami_default } from \"./whoami-Bz6QKirR.js\";\nimport { find_organizations_default } from \"./find-organizations-CXTZEMsb.js\";\nimport { find_teams_default } from \"./find-teams-ZsyAWNb7.js\";\nimport { find_projects_default } from \"./find-projects-BYeZfQDF.js\";\nimport { find_releases_default } from \"./find-releases-fkgr4qqZ.js\";\nimport { get_release_details_default } from \"./get-release-details-0bKoH-Gv.js\";\nimport { find_dashboards_default } from \"./find-dashboards-DE0x5cIv.js\";\nimport { get_dashboard_details_default } from \"./get-dashboard-details-7tf-4Q_F.js\";\nimport { find_monitors_default } from \"./find-monitors-DOaVdrCU.js\";\nimport { get_monitor_details_default } from \"./get-monitor-details-CP_Cj6P3.js\";\nimport { find_uptime_monitors_default } from \"./find-uptime-monitors-NZjkNLjM.js\";\nimport { get_uptime_monitor_details_default } from \"./get-uptime-monitor-details-DfFRiDqD.js\";\nimport { create_uptime_monitor_default } from \"./create-uptime-monitor-fo-rIhsm.js\";\nimport { update_uptime_monitor_default } from \"./update-uptime-monitor-CXyi5lFD.js\";\nimport { delete_uptime_monitor_default } from \"./delete-uptime-monitor-CHj4Cluv.js\";\nimport { find_alert_rules_default } from \"./find-alert-rules-Co9XjMKY.js\";\nimport { get_alert_rule_default } from \"./get-alert-rule-WfTdEa_v.js\";\nimport { get_issue_details_default } from \"./get-issue-details-DHDUffp5.js\";\nimport { get_event_stacktrace_default } from \"./get-event-stacktrace-ODRk7GSR.js\";\nimport { get_issue_activity_default } from \"./get-issue-activity-CKhQWy99.js\";\nimport { get_issue_breadcrumbs_default } from \"./get-issue-breadcrumbs-D5AeF8Vm.js\";\nimport { get_issue_tag_values_default } from \"./get-issue-tag-values-DtJZnl37.js\";\nimport { get_issue_user_reports_default } from \"./get-issue-user-reports-D73TLuX2.js\";\nimport { get_trace_details_default } from \"./get-trace-details-D7U8b5_V.js\";\nimport { get_span_details_default } from \"./get-span-details-DfXIT1v_.js\";\nimport { get_replay_details_default } from \"./get-replay-details-BWeEKq_j.js\";\nimport { get_event_attachment_default } from \"./get-event-attachment-h8oTTPZt.js\";\nimport { update_issue_default } from \"./update-issue-q9a5YNJb.js\";\nimport { search_events_default } from \"./search-events-C8aVtdIY.js\";\nimport { create_team_default } from \"./create-team-Bz1tSDLQ.js\";\nimport { create_project_default } from \"./create-project-CTQakq9G.js\";\nimport { update_project_default } from \"./update-project-BYY10KTt.js\";\nimport { add_team_to_project_default } from \"./add-team-to-project-DrTGc_T9.js\";\nimport { remove_team_from_project_default } from \"./remove-team-from-project-CT7eqBf7.js\";\nimport { create_dsn_default } from \"./create-dsn-C-kIpqG7.js\";\nimport { find_dsns_default } from \"./find-dsns-DCUQXIHr.js\";\nimport { update_dsn_default } from \"./update-dsn-Ce0IWsRx.js\";\nimport { analyze_issue_with_seer_default } from \"./analyze-issue-with-seer-Dy01BWPf.js\";\nimport { search_docs_default } from \"./search-docs-DVVQKCxP.js\";\nimport { get_doc_default } from \"./get-doc-CnSvhrTG.js\";\nimport { search_issues_default } from \"./search-issues-CQ0efOru.js\";\nimport { search_issue_events_default } from \"./search-issue-events-fYjr_r6r.js\";\nimport { get_profile_default } from \"./get-profile-CilEVKTg.js\";\nimport { get_profile_details_default } from \"./get-profile-details-B7TCia0B.js\";\nimport { get_agent_conversation_details_default } from \"./get-agent-conversation-details-DTJR8hFg.js\";\nimport { get_snapshot_default } from \"./get-snapshot-Ce1Z98WR.js\";\nimport { get_snapshot_image_default } from \"./get-snapshot-image-CWtW-DQz.js\";\nimport { get_sentry_resource_default } from \"./get-sentry-resource-DAx17Rhc.js\";\nimport { get_latest_base_snapshot_default } from \"./get-latest-base-snapshot-KoSAQyLF.js\";\nimport { search_agent_conversations_default } from \"./search-agent-conversations-CUhIOq09.js\";\nimport { add_issue_note_default } from \"./add-issue-note-DqTid9mJ.js\";\nimport { onboarding_status_update_default } from \"./onboarding-status-update-ZaTsL300.js\";\n\n//#region src/tools/catalog/index.ts\nconst legacyGetAIConversationDetails = {\n\t...get_agent_conversation_details_default,\n\tname: \"get_ai_conversation_details\",\n\tincludeInSkillDefinitions: false,\n\tdescription: [\n\t\t\"Deprecated alias for get_agent_conversation_details.\",\n\t\t\"\",\n\t\t\"Use get_agent_conversation_details for new integrations. This alias is kept for backward compatibility.\"\n\t].join(\"\\n\")\n};\nconst legacySearchAIConversations = {\n\t...search_agent_conversations_default,\n\tname: \"search_ai_conversations\",\n\tincludeInSkillDefinitions: false,\n\tdescription: [\n\t\t\"Deprecated alias for search_agent_conversations.\",\n\t\t\"\",\n\t\t\"Use search_agent_conversations for new integrations. This alias is kept for backward compatibility.\"\n\t].join(\"\\n\")\n};\n/**\n* Catalog of ordinary Sentry MCP operations.\n*\n* These tools are searchable/executable through search_sentry_tools and execute_sentry_tool.\n* A central subset is also exposed directly via tools/list in surfaces.ts.\n*\n* Wrapper tools such as search_sentry_tools and execute_sentry_tool intentionally\n* live outside this catalog.\n*/\nconst catalogTools = {\n\twhoami: whoami_default,\n\tfind_organizations: find_organizations_default,\n\tfind_teams: find_teams_default,\n\tfind_projects: find_projects_default,\n\tfind_releases: find_releases_default,\n\tget_release_details: get_release_details_default,\n\tfind_dashboards: find_dashboards_default,\n\tget_dashboard_details: get_dashboard_details_default,\n\tfind_monitors: find_monitors_default,\n\tget_monitor_details: get_monitor_details_default,\n\tfind_uptime_monitors: find_uptime_monitors_default,\n\tget_uptime_monitor_details: get_uptime_monitor_details_default,\n\tcreate_uptime_monitor: create_uptime_monitor_default,\n\tupdate_uptime_monitor: update_uptime_monitor_default,\n\tdelete_uptime_monitor: delete_uptime_monitor_default,\n\tfind_alert_rules: find_alert_rules_default,\n\tget_alert_rule: get_alert_rule_default,\n\tget_issue_details: get_issue_details_default,\n\tget_event_stacktrace: get_event_stacktrace_default,\n\tget_issue_activity: get_issue_activity_default,\n\tget_issue_breadcrumbs: get_issue_breadcrumbs_default,\n\tget_issue_user_reports: get_issue_user_reports_default,\n\tget_issue_tag_values: get_issue_tag_values_default,\n\tget_trace_details: get_trace_details_default,\n\tget_span_details: get_span_details_default,\n\tget_replay_details: get_replay_details_default,\n\tget_event_attachment: get_event_attachment_default,\n\tupdate_issue: update_issue_default,\n\tsearch_events: search_events_default,\n\tcreate_team: create_team_default,\n\tcreate_project: create_project_default,\n\tupdate_project: update_project_default,\n\tadd_team_to_project: add_team_to_project_default,\n\tremove_team_from_project: remove_team_from_project_default,\n\tcreate_dsn: create_dsn_default,\n\tfind_dsns: find_dsns_default,\n\tupdate_dsn: update_dsn_default,\n\tanalyze_issue_with_seer: analyze_issue_with_seer_default,\n\tsearch_docs: search_docs_default,\n\tget_doc: get_doc_default,\n\tsearch_issues: search_issues_default,\n\tsearch_issue_events: search_issue_events_default,\n\tget_profile: get_profile_default,\n\tget_profile_details: get_profile_details_default,\n\tget_sentry_resource: get_sentry_resource_default,\n\tget_snapshot: get_snapshot_default,\n\tget_snapshot_image: get_snapshot_image_default,\n\tget_latest_base_snapshot: get_latest_base_snapshot_default,\n\tget_agent_conversation_details: get_agent_conversation_details_default,\n\tget_ai_conversation_details: legacyGetAIConversationDetails,\n\tsearch_agent_conversations: search_agent_conversations_default,\n\tsearch_ai_conversations: legacySearchAIConversations,\n\tadd_issue_note: add_issue_note_default,\n\tonboarding_status_update: onboarding_status_update_default\n};\nvar catalog_default = catalogTools;\n\n//#endregion\nexport { catalog_default };\n//# sourceMappingURL=catalog-DaTB1cy-.js.map","import { z } from \"zod\";\n\n//#region src/tools/catalog-runtime/schema.ts\nconst UNION_KEYWORDS = [\n\t\"anyOf\",\n\t\"oneOf\",\n\t\"allOf\"\n];\nfunction zodFieldMapToJsonSchema(fieldMap) {\n\tconst zodObject = Object.keys(fieldMap).length > 0 ? z.object(fieldMap) : z.object({});\n\tconst { $schema: _,...jsonSchema } = z.toJSONSchema(zodObject, {\n\t\tio: \"input\",\n\t\ttarget: \"draft-7\",\n\t\tunrepresentable: \"any\"\n\t});\n\treturn jsonSchema;\n}\n/**\n* Find JSON Schema union shapes that known model APIs reject for tool schemas.\n*\n* Banned:\n* - root-level `anyOf` / `oneOf` / `allOf` (Anthropic rejects these)\n* - nested unions inside another union (for example union + nullable)\n*\n* Allowed:\n* - property-level flat unions such as `string | null` or `string | string[]`\n*/\nfunction findIncompatibleJsonSchemaUnions(schema, path = [], insideUnion = false) {\n\tif (!schema || typeof schema !== \"object\") return [];\n\tif (Array.isArray(schema)) return schema.flatMap((item, index) => findIncompatibleJsonSchemaUnions(item, path.concat(String(index)), insideUnion));\n\tconst record = schema;\n\tconst violations = [];\n\tconst atRoot = path.length === 0;\n\tfor (const keyword of UNION_KEYWORDS) {\n\t\tconst branches = record[keyword];\n\t\tif (!Array.isArray(branches)) continue;\n\t\tconst nextPath = path.concat(keyword);\n\t\tconst pathLabel = nextPath.join(\".\");\n\t\tif (atRoot) violations.push({\n\t\t\tpath: pathLabel,\n\t\t\treason: \"root-union\",\n\t\t\tkeyword\n\t\t});\n\t\telse if (insideUnion) violations.push({\n\t\t\tpath: pathLabel,\n\t\t\treason: \"nested-union\",\n\t\t\tkeyword\n\t\t});\n\t\tviolations.push(...findIncompatibleJsonSchemaUnions(branches, nextPath, true));\n\t}\n\tfor (const [key, value] of Object.entries(record)) {\n\t\tif (UNION_KEYWORDS.includes(key)) continue;\n\t\tviolations.push(...findIncompatibleJsonSchemaUnions(value, path.concat(key), insideUnion));\n\t}\n\treturn violations;\n}\nfunction formatJsonSchemaUnionViolations(violations) {\n\treturn violations.map((violation) => `${violation.path} (${violation.reason})`).join(\", \");\n}\n\n//#endregion\nexport { findIncompatibleJsonSchemaUnions, formatJsonSchemaUnionViolations, zodFieldMapToJsonSchema };\n//# sourceMappingURL=schema-BuKqZlvC.js.map","import { getFilteredInputSchema, getSearchableTools, resolveToolDescription } from \"./availability-zLnbaxcD.js\";\nimport { zodFieldMapToJsonSchema } from \"./schema-BuKqZlvC.js\";\n\n//#region src/tools/catalog-runtime/search.ts\nfunction tokenize(value) {\n\treturn value.toLowerCase().split(/[^a-z0-9_]+/).map((token) => token.trim()).filter(Boolean);\n}\nfunction scoreTool(tool, query) {\n\tconst normalizedQuery = query.toLowerCase();\n\tconst queryTokens = tokenize(query);\n\tconst name = tool.name.toLowerCase();\n\tconst description = tool.description.toLowerCase();\n\tconst combinedText = `${name} ${description}`;\n\tlet score = combinedText.includes(normalizedQuery) ? 20 : 0;\n\tfor (const token of queryTokens) {\n\t\tif (name === token) score += 12;\n\t\telse if (name.includes(token)) score += 8;\n\t\tif (description.includes(token)) score += 2;\n\t}\n\treturn score;\n}\nfunction searchToolCatalog({ tools, context, query, limit }) {\n\tconst experimentalMode = context.experimentalMode ?? false;\n\treturn getSearchableTools({\n\t\ttools,\n\t\tcontext,\n\t\texperimentalMode,\n\t\tuseDefaultSurfacePolicy: true\n\t}).map(({ tool }) => {\n\t\tconst inputSchema = getFilteredInputSchema(tool, context);\n\t\tconst description = resolveToolDescription(tool, {\n\t\t\texperimentalMode,\n\t\t\tavailableToolNames: context.availableToolNames,\n\t\t\tdirectToolNames: context.directToolNames\n\t\t});\n\t\tconst searchable = {\n\t\t\tname: tool.name,\n\t\t\tdescription\n\t\t};\n\t\treturn {\n\t\t\tscore: scoreTool(searchable, query),\n\t\t\ttool,\n\t\t\tdescription,\n\t\t\tinputSchema\n\t\t};\n\t}).filter(({ score }) => score > 0).sort((a, b) => b.score - a.score || a.tool.name.localeCompare(b.tool.name)).slice(0, limit).map(({ tool, description, inputSchema }) => ({\n\t\tname: tool.name,\n\t\tdescription,\n\t\tinputSchema: zodFieldMapToJsonSchema(inputSchema),\n\t\tannotations: tool.annotations\n\t}));\n}\n\n//#endregion\nexport { searchToolCatalog };\n//# sourceMappingURL=search-CX6pdulw.js.map","import { ALL_SKILLS } from \"./skills-Dj4T8Duc.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { structuredResult } from \"./results-NF1RJbDZ.js\";\nimport { searchToolCatalog } from \"./search-CX6pdulw.js\";\nimport { z } from \"zod\";\nimport { getActiveSpan } from \"@sentry/core\";\n\n//#region src/tools/special/search-tools.ts\nconst DEFAULT_LIMIT = 8;\nconst MAX_LIMIT = 20;\nconst toolAnnotationsOutputSchema = z.object({\n\treadOnlyHint: z.boolean().optional(),\n\tdestructiveHint: z.boolean().optional(),\n\tidempotentHint: z.boolean().optional(),\n\topenWorldHint: z.boolean().optional()\n});\nconst searchToolsOutputSchema = z.object({\n\tquery: z.string(),\n\tresults: z.array(z.object({\n\t\tname: z.string(),\n\t\tdescription: z.string(),\n\t\tinputSchema: z.record(z.string(), z.unknown()).describe(\"JSON Schema for the matching tool's arguments. Session-constrained parameters are omitted.\"),\n\t\tannotations: toolAnnotationsOutputSchema\n\t}))\n});\nfunction createSearchToolsResult(payload) {\n\tconst activeSpan = getActiveSpan();\n\tif (activeSpan) {\n\t\tactiveSpan.setAttribute(\"gen_ai.tool.call.result\", JSON.stringify(payload));\n\t\tactiveSpan.setAttribute(\"gen_ai.tool.call.result.count\", payload.results.length);\n\t}\n\treturn structuredResult(payload);\n}\nfunction createSearchToolsTool(getTools) {\n\treturn defineTool({\n\t\tname: \"search_sentry_tools\",\n\t\tskills: ALL_SKILLS,\n\t\trequiredScopes: [],\n\t\tdescription: [\n\t\t\t\"Search the available Sentry MCP tool catalog by name and description.\",\n\t\t\t\"\",\n\t\t\t\"Many Sentry operations are intentionally not exposed as top-level tools. Use this for any Sentry-related task when you do not see an obvious direct tool, including long-tail inspection, project management, documentation lookup, preprod snapshots, attachments, DSNs, releases, teams, and issue-specific pivots.\",\n\t\t\t\"\",\n\t\t\t\"Use this tool when you need to:\",\n\t\t\t\"- Find the right Sentry operation for a task\",\n\t\t\t\"- Discover catalog tools and their schemas for a task\",\n\t\t\t\"- Inspect the executable JSON input schema for an available tool\",\n\t\t\t\"\",\n\t\t\t\"<examples>\",\n\t\t\t\"search_sentry_tools(query='list projects')\",\n\t\t\t\"search_sentry_tools(query='issue details')\",\n\t\t\t\"search_sentry_tools(query='find dsn', limit=5)\",\n\t\t\t\"search_sentry_tools(query='snapshot image')\",\n\t\t\t\"</examples>\",\n\t\t\t\"\",\n\t\t\t\"<hints>\",\n\t\t\t\"- Results only include tools available in the current session.\",\n\t\t\t\"- If a Sentry operation is not listed as a direct tool, search here before deciding it is unavailable.\",\n\t\t\t\"- Returned schemas already account for active organization, project, and region constraints.\",\n\t\t\t\"- Use the returned name and schema when executing a catalog result.\",\n\t\t\t\"- This tool returns structured JSON. Do not parse markdown from its text content.\",\n\t\t\t\"</hints>\"\n\t\t].join(\"\\n\"),\n\t\tinputSchema: {\n\t\t\tquery: z.string().trim().min(1).describe(\"Natural language keywords describing the Sentry operation, resource, or workflow to find.\"),\n\t\t\tlimit: z.number().int().positive().max(MAX_LIMIT).nullable().default(DEFAULT_LIMIT).describe(`Maximum number of matching tools to return, up to ${MAX_LIMIT}.`)\n\t\t},\n\t\tannotations: {\n\t\t\treadOnlyHint: true,\n\t\t\tdestructiveHint: false,\n\t\t\topenWorldHint: false\n\t\t},\n\t\toutputSchema: searchToolsOutputSchema,\n\t\tasync handler(params, context) {\n\t\t\tconst results = searchToolCatalog({\n\t\t\t\ttools: getTools(),\n\t\t\t\tcontext,\n\t\t\t\tquery: params.query,\n\t\t\t\tlimit: params.limit ?? DEFAULT_LIMIT\n\t\t\t});\n\t\t\treturn createSearchToolsResult({\n\t\t\t\tquery: params.query,\n\t\t\t\tresults\n\t\t\t});\n\t\t}\n\t});\n}\n\n//#endregion\nexport { createSearchToolsTool, searchToolsOutputSchema };\n//# sourceMappingURL=search-tools-CbtWC7w4.js.map","import { ALL_SKILLS } from \"./skills-Dj4T8Duc.js\";\nimport { UserInputError } from \"./errors-CEDWDXew.js\";\nimport { isExpectedToolError } from \"./error-handling-BsZo3KBt.js\";\nimport { getSearchableTools, prepareToolParams } from \"./availability-zLnbaxcD.js\";\nimport { defineTool } from \"./define-SD6AQa4b.js\";\nimport { z } from \"zod\";\nimport { startSpan } from \"@sentry/core\";\n\n//#region src/tools/special/execute-tool.ts\nfunction setToolArgumentAttributes(span, params) {\n\tfor (const [key, value] of Object.entries(params)) {\n\t\tconst attributeValue = value == null || typeof value === \"object\" ? JSON.stringify(value) : value;\n\t\tspan.setAttribute(`gen_ai.tool.call.arguments.${key}`, attributeValue);\n\t}\n}\nasync function executeCatalogToolWithSpan({ tool, params, context }) {\n\treturn startSpan({\n\t\tname: `tools/call ${tool.name}`,\n\t\top: \"mcp.execute_tool\",\n\t\tattributes: {\n\t\t\t\"gen_ai.operation.name\": \"execute_tool\",\n\t\t\t\"gen_ai.tool.name\": tool.name\n\t\t}\n\t}, async (span) => {\n\t\ttry {\n\t\t\tconst paramsWithConstraints = prepareToolParams({\n\t\t\t\ttool,\n\t\t\t\tparams,\n\t\t\t\tcontext\n\t\t\t});\n\t\t\tsetToolArgumentAttributes(span, paramsWithConstraints);\n\t\t\tconst output = await tool.handler(paramsWithConstraints, context);\n\t\t\tspan.setStatus({ code: 1 });\n\t\t\treturn output;\n\t\t} catch (error) {\n\t\t\tspan.setStatus({ code: 2 });\n\t\t\tif (!isExpectedToolError(error)) span.recordException(error);\n\t\t\tthrow error;\n\t\t}\n\t});\n}\nfunction createExecuteTool(getTools) {\n\treturn defineTool({\n\t\tname: \"execute_sentry_tool\",\n\t\tskills: ALL_SKILLS,\n\t\trequiredScopes: [],\n\t\tdescription: [\n\t\t\t\"Execute an available Sentry MCP tool discovered through search_sentry_tools.\",\n\t\t\t\"\",\n\t\t\t\"Use this tool when you need to:\",\n\t\t\t\"- Call a Sentry operation returned by search_sentry_tools\",\n\t\t\t\"- Execute a tool by name using arguments that match its returned schema\",\n\t\t\t\"\",\n\t\t\t\"<examples>\",\n\t\t\t\"execute_sentry_tool(name='find_projects', arguments={ organizationSlug: 'my-org' })\",\n\t\t\t\"execute_sentry_tool(name='whoami', arguments={})\",\n\t\t\t\"</examples>\",\n\t\t\t\"\",\n\t\t\t\"<hints>\",\n\t\t\t\"- Use search_sentry_tools first if you are not sure which name or arguments to pass.\",\n\t\t\t\"- Arguments are validated against the target tool's schema before execution.\",\n\t\t\t\"- Active organization, project, and region constraints are injected automatically.\",\n\t\t\t\"</hints>\"\n\t\t].join(\"\\n\"),\n\t\tinputSchema: {\n\t\t\tname: z.string().trim().min(1).describe(\"The name of the available tool to execute.\"),\n\t\t\targuments: z.record(z.string(), z.unknown()).default({}).describe(\"Arguments for the target tool, matching the schema returned by search_sentry_tools.\")\n\t\t},\n\t\tannotations: {\n\t\t\treadOnlyHint: false,\n\t\t\tdestructiveHint: true,\n\t\t\topenWorldHint: true\n\t\t},\n\t\tasync handler(params, context) {\n\t\t\tconst availableTools = getSearchableTools({\n\t\t\t\ttools: getTools(),\n\t\t\t\tcontext,\n\t\t\t\texperimentalMode: context.experimentalMode ?? false,\n\t\t\t\tuseDefaultSurfacePolicy: true\n\t\t\t});\n\t\t\tconst match = availableTools.find(({ key, tool }) => key === params.name || tool.name === params.name);\n\t\t\tif (!match) throw new UserInputError(`Tool \"${params.name}\" is not available in this session. Use search_sentry_tools to find an executable tool.`);\n\t\t\treturn executeCatalogToolWithSpan({\n\t\t\t\ttool: match.tool,\n\t\t\t\tparams: params.arguments,\n\t\t\t\tcontext\n\t\t\t});\n\t\t}\n\t});\n}\n\n//#endregion\nexport { createExecuteTool };\n//# sourceMappingURL=execute-tool-B_06lhoJ.js.map","import { catalog_default } from \"./catalog-DaTB1cy-.js\";\nimport { createSearchToolsTool } from \"./search-tools-CbtWC7w4.js\";\nimport { createExecuteTool } from \"./execute-tool-B_06lhoJ.js\";\n\n//#region src/tools/index.ts\nfunction getAllTools() {\n\treturn allTools;\n}\nconst allTools = {\n\t...catalog_default,\n\tsearch_sentry_tools: createSearchToolsTool(getAllTools),\n\texecute_sentry_tool: createExecuteTool(getAllTools)\n};\nvar tools_default = allTools;\n\n//#endregion\nexport { tools_default };\n//# sourceMappingURL=tools-fGO-TOBm.js.map","//#region rolldown:runtime\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __exportAll = (all, symbols) => {\n\tlet target = {};\n\tfor (var name in all) {\n\t\t__defProp(target, name, {\n\t\t\tget: all[name],\n\t\t\tenumerable: true\n\t\t});\n\t}\n\tif (symbols) {\n\t\t__defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\t}\n\treturn target;\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\t\tkey = keys[i];\n\t\t\tif (!__hasOwnProp.call(to, key) && key !== except) {\n\t\t\t\t__defProp(to, key, {\n\t\t\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n\n//#endregion\nexport { __exportAll as n, __toESM as r, __commonJSMin as t };","//#region ../core-internal/src/validators/dialects.ts\n/**\n* Canonical `$schema` URIs per supported dialect (http + https variants, trailing-`#` stripped).\n*/\nconst DRAFT_2020_12_URIS = new Set([\"https://json-schema.org/draft/2020-12/schema\", \"http://json-schema.org/draft/2020-12/schema\"]);\nconst DRAFT_2019_09_URIS = new Set([\"https://json-schema.org/draft/2019-09/schema\", \"http://json-schema.org/draft/2019-09/schema\"]);\nconst DRAFT_07_URIS = new Set([\"https://json-schema.org/draft-07/schema\", \"http://json-schema.org/draft-07/schema\"]);\nconst DRAFT_06_URIS = new Set([\"https://json-schema.org/draft-06/schema\", \"http://json-schema.org/draft-06/schema\"]);\n/**\n* Whether a `$schema` value declares the 2019-09 dialect — the only supported dialect with\n* `$recursiveRef`/`$recursiveAnchor`. Non-throwing (unlike {@linkcode declaredDialect}) so\n* wire-layer callers can consult it for documents whose dialect may be unsupported.\n*/\nfunction declares2019Dialect($schema) {\n\treturn typeof $schema === \"string\" && DRAFT_2019_09_URIS.has($schema.replace(/#$/, \"\"));\n}\n/**\n* Classify a schema's declared `$schema` dialect. No `$schema` (or a non-string one) means\n* 2020-12. Any other dialect throws a plain `Error` with a clear message rather than letting the\n* engine crash on an opaque internal error or silently mis-validate; `remedy` names the calling\n* provider's escape hatch in that message.\n*/\nfunction declaredDialect(schema, remedy) {\n\tif (!(\"$schema\" in schema) || typeof schema.$schema !== \"string\") return \"2020-12\";\n\tconst declared = schema.$schema.replace(/#$/, \"\");\n\tif (DRAFT_2020_12_URIS.has(declared)) return \"2020-12\";\n\tif (DRAFT_2019_09_URIS.has(declared)) return \"2019-09\";\n\tif (DRAFT_07_URIS.has(declared) || DRAFT_06_URIS.has(declared)) return \"draft-7\";\n\tthrow new Error(`JSON Schema declares an unsupported dialect (\"$schema\": \"${schema.$schema.slice(0, 200)}\"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${remedy}`);\n}\n\n//#endregion\nexport { declares2019Dialect as n, declaredDialect as t };\n//# sourceMappingURL=dialects-DoSzNhcb.mjs.map","import * as z from \"zod/v4\";\n\n//#region src/constants.ts\nconst LATEST_PROTOCOL_VERSION = \"2025-11-25\";\nconst DEFAULT_NEGOTIATED_PROTOCOL_VERSION = \"2025-03-26\";\nconst SUPPORTED_PROTOCOL_VERSIONS = [\n\tLATEST_PROTOCOL_VERSION,\n\t\"2025-06-18\",\n\t\"2025-03-26\",\n\t\"2024-11-05\",\n\t\"2024-10-07\"\n];\n/**\n* `_meta` key associating a message with a 2025-11-25 task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst RELATED_TASK_META_KEY = \"io.modelcontextprotocol/related-task\";\n/**\n* `_meta` key carrying the MCP protocol version governing a request.\n*\n* For the HTTP transport, the value must match the `MCP-Protocol-Version` header.\n*/\nconst PROTOCOL_VERSION_META_KEY = \"io.modelcontextprotocol/protocolVersion\";\n/**\n* `_meta` key identifying the client software making a request.\n*\n* Clients SHOULD include it on every request; the value is self-reported and\n* intended for display, logging, and debugging — servers should not rely on\n* it for behavior or security decisions.\n*/\nconst CLIENT_INFO_META_KEY = \"io.modelcontextprotocol/clientInfo\";\n/**\n* `_meta` key identifying the server software producing a response.\n*\n* Servers SHOULD include it on every response; the value is self-reported and\n* intended for display, logging, and debugging — clients should not rely on\n* it for behavior or security decisions.\n*/\nconst SERVER_INFO_META_KEY = \"io.modelcontextprotocol/serverInfo\";\n/**\n* `_meta` key carrying the client's capabilities for a request.\n*\n* Capabilities are declared per request rather than once at initialization;\n* servers must not infer capabilities from prior requests.\n*/\nconst CLIENT_CAPABILITIES_META_KEY = \"io.modelcontextprotocol/clientCapabilities\";\n/**\n* `_meta` key carrying the JSON-RPC ID of the `subscriptions/listen` request\n* that opened the stream a notification was delivered on.\n*\n* Stamped by the server on every notification delivered via a\n* `subscriptions/listen` stream (including the leading\n* `notifications/subscriptions/acknowledged`); on stdio, where all messages\n* share one channel, clients use it to correlate notifications with their\n* originating subscription. The value is the listen request's JSON-RPC ID\n* verbatim.\n*/\nconst SUBSCRIPTION_ID_META_KEY = \"io.modelcontextprotocol/subscriptionId\";\n/**\n* `_meta` key carrying the desired log level for a request.\n*\n* When absent, the server must not send `notifications/message` notifications\n* for the request.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months.\n*/\nconst LOG_LEVEL_META_KEY = \"io.modelcontextprotocol/logLevel\";\n/**\n* `_meta` key carrying W3C Trace Context for distributed tracing (SEP-414).\n*\n* When present, the value MUST follow the W3C `traceparent` header format,\n* e.g. `00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01`.\n*\n* @see https://www.w3.org/TR/trace-context/#traceparent-header\n*/\nconst TRACEPARENT_META_KEY = \"traceparent\";\n/**\n* `_meta` key carrying vendor-specific trace state for distributed tracing (SEP-414).\n*\n* When present, the value MUST follow the W3C `tracestate` header format,\n* e.g. `vendor1=value1,vendor2=value2`.\n*\n* @see https://www.w3.org/TR/trace-context/#tracestate-header\n*/\nconst TRACESTATE_META_KEY = \"tracestate\";\n/**\n* `_meta` key carrying cross-cutting propagation values for distributed tracing (SEP-414).\n*\n* When present, the value MUST follow the W3C Baggage header format,\n* e.g. `userId=alice,serverRegion=us-east-1`.\n*\n* @see https://www.w3.org/TR/baggage/\n*/\nconst BAGGAGE_META_KEY = \"baggage\";\nconst JSONRPC_VERSION = \"2.0\";\nconst PARSE_ERROR = -32700;\nconst INVALID_REQUEST = -32600;\nconst METHOD_NOT_FOUND = -32601;\nconst INVALID_PARAMS = -32602;\nconst INTERNAL_ERROR = -32603;\n\n//#endregion\n//#region src/schemas.ts\nconst JSONValueSchema = z.lazy(() => z.union([\n\tz.string(),\n\tz.number(),\n\tz.boolean(),\n\tz.null(),\n\tz.record(z.string(), JSONValueSchema),\n\tz.array(JSONValueSchema)\n]));\nconst JSONObjectSchema = z.record(z.string(), JSONValueSchema);\nconst JSONArraySchema = z.array(JSONValueSchema);\n/**\n* A progress token, used to associate progress notifications with the original request.\n*/\nconst ProgressTokenSchema = z.union([z.string(), z.number().int()]);\n/**\n* An opaque token used to represent a cursor for pagination.\n*/\nconst CursorSchema = z.string();\n/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\nconst TaskMetadataSchema = z.object({ ttl: z.number().optional() });\n/**\n* Metadata for associating messages with a task.\n* Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst RelatedTaskMetadataSchema = z.object({ taskId: z.string() });\nconst RequestMetaSchema = z.looseObject({\n\tprogressToken: ProgressTokenSchema.optional(),\n\t[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()\n});\n/**\n* Common params for any request.\n*/\nconst BaseRequestParamsSchema = z.object({ _meta: RequestMetaSchema.optional() });\n/**\n* Common params for any task-augmented request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({ task: TaskMetadataSchema.optional() });\nconst RequestSchema = z.object({\n\tmethod: z.string(),\n\tparams: BaseRequestParamsSchema.loose().optional()\n});\nconst NotificationsParamsSchema = z.object({ _meta: RequestMetaSchema.optional() });\nconst NotificationSchema = z.object({\n\tmethod: z.string(),\n\tparams: NotificationsParamsSchema.loose().optional()\n});\n/**\n* The contents of a result's `_meta` field (the 2026-07-28 `ResultMetaObject`).\n* Loose — implementation-specific keys pass through.\n*\n* The serverInfo key identifies the server software producing the response\n* (servers SHOULD include it on every response; the value is self-reported\n* and intended for display, logging, and debugging). The getter defers the\n* `ImplementationSchema` reference, which is declared later in this file.\n*/\nconst ResultMetaObjectSchema = z.looseObject({ get [SERVER_INFO_META_KEY]() {\n\treturn ImplementationSchema.optional().catch(void 0);\n} });\nconst ResultSchema = z.looseObject({ _meta: ResultMetaObjectSchema.optional() });\n/**\n* A uniquely identifying ID for a request in JSON-RPC.\n*/\nconst RequestIdSchema = z.union([z.string(), z.number().int()]);\n/**\n* A request that expects a response.\n*/\nconst JSONRPCRequestSchema = z.object({\n\tjsonrpc: z.literal(JSONRPC_VERSION),\n\tid: RequestIdSchema,\n\t...RequestSchema.shape\n}).strict();\n/**\n* A notification which does not expect a response.\n*/\nconst JSONRPCNotificationSchema = z.object({\n\tjsonrpc: z.literal(JSONRPC_VERSION),\n\t...NotificationSchema.shape\n}).strict();\n/**\n* A successful (non-error) response to a request.\n*/\nconst JSONRPCResultResponseSchema = z.object({\n\tjsonrpc: z.literal(JSONRPC_VERSION),\n\tid: RequestIdSchema,\n\tresult: ResultSchema\n}).strict();\n/**\n* A response to a request that indicates an error occurred.\n*/\nconst JSONRPCErrorResponseSchema = z.object({\n\tjsonrpc: z.literal(JSONRPC_VERSION),\n\tid: RequestIdSchema.optional(),\n\terror: z.object({\n\t\tcode: z.number().int(),\n\t\tmessage: z.string(),\n\t\tdata: z.unknown().optional()\n\t})\n}).strict();\nconst JSONRPCMessageSchema = z.union([\n\tJSONRPCRequestSchema,\n\tJSONRPCNotificationSchema,\n\tJSONRPCResultResponseSchema,\n\tJSONRPCErrorResponseSchema\n]);\nconst JSONRPCResponseSchema = z.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);\n/**\n* A response that indicates success but carries no data.\n*/\nconst EmptyResultSchema = ResultSchema.strict();\nconst CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({\n\trequestId: RequestIdSchema.optional(),\n\treason: z.string().optional()\n});\n/**\n* This notification can be sent by either side to indicate that it is cancelling a previously-issued request.\n*\n* The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.\n*\n* This notification indicates that the result will be unused, so any associated processing SHOULD cease.\n*\n* A client MUST NOT attempt to cancel its {@linkcode InitializeRequest | initialize} request.\n*/\nconst CancelledNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/cancelled\"),\n\tparams: CancelledNotificationParamsSchema\n});\n/**\n* Icon schema for use in {@link Tool | tools}, {@link Prompt | prompts}, {@link Resource | resources}, and {@link Implementation | implementations}.\n*/\nconst IconSchema = z.object({\n\tsrc: z.string(),\n\tmimeType: z.string().optional(),\n\tsizes: z.array(z.string()).optional(),\n\ttheme: z.enum([\"light\", \"dark\"]).optional()\n});\n/**\n* Base schema to add `icons` property.\n*\n*/\nconst IconsSchema = z.object({ icons: z.array(IconSchema).optional() });\n/**\n* Base metadata interface for common properties across {@link Resource | resources}, {@link Tool | tools}, {@link Prompt | prompts}, and {@link Implementation | implementations}.\n*/\nconst BaseMetadataSchema = z.object({\n\tname: z.string(),\n\ttitle: z.string().optional()\n});\n/**\n* Describes the name and version of an MCP implementation.\n*/\nconst ImplementationSchema = BaseMetadataSchema.extend({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\tversion: z.string(),\n\twebsiteUrl: z.string().optional(),\n\tdescription: z.string().optional()\n});\nconst FormElicitationCapabilitySchema = z.intersection(z.object({ applyDefaults: z.boolean().optional() }), JSONObjectSchema);\nconst ElicitationCapabilitySchema = z.preprocess((value) => {\n\tif (value && typeof value === \"object\" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };\n\treturn value;\n}, z.intersection(z.object({\n\tform: FormElicitationCapabilitySchema.optional(),\n\turl: JSONObjectSchema.optional()\n}), JSONObjectSchema.optional()));\n/**\n* Task capabilities for clients, indicating which request types support task creation.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst ClientTasksCapabilitySchema = z.looseObject({\n\tlist: JSONObjectSchema.optional(),\n\tcancel: JSONObjectSchema.optional(),\n\trequests: z.looseObject({\n\t\tsampling: z.looseObject({ createMessage: JSONObjectSchema.optional() }).optional(),\n\t\telicitation: z.looseObject({ create: JSONObjectSchema.optional() }).optional()\n\t}).optional()\n});\n/**\n* Task capabilities for servers, indicating which request types support task creation.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst ServerTasksCapabilitySchema = z.looseObject({\n\tlist: JSONObjectSchema.optional(),\n\tcancel: JSONObjectSchema.optional(),\n\trequests: z.looseObject({ tools: z.looseObject({ call: JSONObjectSchema.optional() }).optional() }).optional()\n});\n/**\n* Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.\n*/\nconst ClientCapabilitiesSchema = z.object({\n\texperimental: z.record(z.string(), JSONObjectSchema).optional(),\n\tsampling: z.object({\n\t\tcontext: JSONObjectSchema.optional(),\n\t\ttools: JSONObjectSchema.optional()\n\t}).optional(),\n\telicitation: ElicitationCapabilitySchema.optional(),\n\troots: z.object({ listChanged: z.boolean().optional() }).optional(),\n\ttasks: ClientTasksCapabilitySchema.optional(),\n\textensions: z.record(z.string(), JSONObjectSchema).optional()\n});\nconst InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({\n\tprotocolVersion: z.string(),\n\tcapabilities: ClientCapabilitiesSchema,\n\tclientInfo: ImplementationSchema\n});\n/**\n* This request is sent from the client to the server when it first connects, asking it to begin initialization.\n*/\nconst InitializeRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"initialize\"),\n\tparams: InitializeRequestParamsSchema\n});\n/**\n* Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.\n*/\nconst ServerCapabilitiesSchema = z.object({\n\texperimental: z.record(z.string(), JSONObjectSchema).optional(),\n\tlogging: JSONObjectSchema.optional(),\n\tcompletions: JSONObjectSchema.optional(),\n\tprompts: z.object({ listChanged: z.boolean().optional() }).optional(),\n\tresources: z.object({\n\t\tsubscribe: z.boolean().optional(),\n\t\tlistChanged: z.boolean().optional()\n\t}).optional(),\n\ttools: z.object({ listChanged: z.boolean().optional() }).optional(),\n\ttasks: ServerTasksCapabilitySchema.optional(),\n\textensions: z.record(z.string(), JSONObjectSchema).optional()\n});\n/**\n* After receiving an initialize request from the client, the server sends this response.\n*/\nconst InitializeResultSchema = ResultSchema.extend({\n\tprotocolVersion: z.string(),\n\tcapabilities: ServerCapabilitiesSchema,\n\tserverInfo: ImplementationSchema,\n\tinstructions: z.string().optional()\n});\n/**\n* This notification is sent from the client to the server after initialization has finished.\n*/\nconst InitializedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/initialized\"),\n\tparams: NotificationsParamsSchema.optional()\n});\n/**\n* A request from the client asking the server to advertise its supported protocol\n* versions, capabilities, and other metadata (protocol revision 2026-07-28). Servers\n* MUST implement `server/discover`. Clients MAY call it but are not required to —\n* version negotiation can also happen inline via the per-request `_meta` envelope.\n*/\nconst DiscoverRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"server/discover\"),\n\tparams: BaseRequestParamsSchema.optional()\n});\n/**\n* The result returned by the server for a `server/discover` request.\n*/\nconst DiscoverResultSchema = ResultSchema.extend({\n\tsupportedVersions: z.array(z.string()),\n\tcapabilities: ServerCapabilitiesSchema,\n\tinstructions: z.string().optional()\n});\n/**\n* A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.\n*/\nconst PingRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"ping\"),\n\tparams: BaseRequestParamsSchema.optional()\n});\nconst ProgressSchema = z.object({\n\tprogress: z.number(),\n\ttotal: z.optional(z.number()),\n\tmessage: z.optional(z.string())\n});\nconst ProgressNotificationParamsSchema = z.object({\n\t...NotificationsParamsSchema.shape,\n\t...ProgressSchema.shape,\n\tprogressToken: ProgressTokenSchema\n});\n/**\n* An out-of-band notification used to inform the receiver of a progress update for a long-running request.\n*\n* @category notifications/progress\n*/\nconst ProgressNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/progress\"),\n\tparams: ProgressNotificationParamsSchema\n});\nconst PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({ cursor: CursorSchema.optional() });\nconst PaginatedRequestSchema = RequestSchema.extend({ params: PaginatedRequestParamsSchema.optional() });\nconst PaginatedResultSchema = ResultSchema.extend({ nextCursor: CursorSchema.optional() });\n/**\n* The contents of a specific resource or sub-resource.\n*/\nconst ResourceContentsSchema = z.object({\n\turi: z.string(),\n\tmimeType: z.optional(z.string()),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\nconst TextResourceContentsSchema = ResourceContentsSchema.extend({ text: z.string() });\n/**\n* A Zod schema for validating Base64 strings that is more performant and\n* robust for very large inputs than the default regex-based check. It avoids\n* stack overflows by using the native `atob` function for validation.\n*/\nconst Base64Schema = z.string().refine((val) => {\n\ttry {\n\t\tatob(val);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}, { message: \"Invalid Base64 string\" });\nconst BlobResourceContentsSchema = ResourceContentsSchema.extend({ blob: Base64Schema });\n/**\n* The sender or recipient of messages and data in a conversation.\n*/\nconst RoleSchema = z.enum([\"user\", \"assistant\"]);\n/**\n* Optional annotations providing clients additional context about a resource.\n*/\nconst AnnotationsSchema = z.object({\n\taudience: z.array(RoleSchema).optional(),\n\tpriority: z.number().min(0).max(1).optional(),\n\tlastModified: z.iso.datetime({ offset: true }).optional()\n});\n/**\n* A known resource that the server is capable of reading.\n*/\nconst ResourceSchema = z.object({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\turi: z.string(),\n\tdescription: z.optional(z.string()),\n\tmimeType: z.optional(z.string()),\n\tsize: z.optional(z.number()),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.optional(z.looseObject({}))\n});\n/**\n* A template description for resources available on the server.\n*/\nconst ResourceTemplateSchema = z.object({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\turiTemplate: z.string(),\n\tdescription: z.optional(z.string()),\n\tmimeType: z.optional(z.string()),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.optional(z.looseObject({}))\n});\n/**\n* Sent from the client to request a list of resources the server has.\n*/\nconst ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"resources/list\") });\n/**\n* The server's response to a {@linkcode ListResourcesRequest | resources/list} request from the client.\n*/\nconst ListResourcesResultSchema = PaginatedResultSchema.extend({ resources: z.array(ResourceSchema) });\n/**\n* Sent from the client to request a list of resource templates the server has.\n*/\nconst ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"resources/templates/list\") });\n/**\n* The server's response to a {@linkcode ListResourceTemplatesRequest | resources/templates/list} request from the client.\n*/\nconst ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({ resourceTemplates: z.array(ResourceTemplateSchema) });\nconst ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({ uri: z.string() });\n/**\n* Parameters for a {@linkcode ReadResourceRequest | resources/read} request.\n*/\nconst ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n* Sent from the client to the server, to read a specific resource URI.\n*/\nconst ReadResourceRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"resources/read\"),\n\tparams: ReadResourceRequestParamsSchema\n});\n/**\n* The server's response to a {@linkcode ReadResourceRequest | resources/read} request from the client.\n*/\nconst ReadResourceResultSchema = ResultSchema.extend({ contents: z.array(z.union([TextResourceContentsSchema, BlobResourceContentsSchema])) });\n/**\n* An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.\n*/\nconst ResourceListChangedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/resources/list_changed\"),\n\tparams: NotificationsParamsSchema.optional()\n});\nconst SubscribeRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n* Sent from the client to request `resources/updated` notifications from the server whenever a particular resource changes.\n*/\nconst SubscribeRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"resources/subscribe\"),\n\tparams: SubscribeRequestParamsSchema\n});\nconst UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n* Sent from the client to request cancellation of {@linkcode ResourceUpdatedNotification | resources/updated} notifications from the server. This should follow a previous {@linkcode SubscribeRequest | resources/subscribe} request.\n*/\nconst UnsubscribeRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"resources/unsubscribe\"),\n\tparams: UnsubscribeRequestParamsSchema\n});\n/**\n* The set of notification types a client opts in to on a `subscriptions/listen`\n* request. Each type is opt-in; the server MUST NOT send a notification type\n* the client has not explicitly requested here.\n*/\nconst SubscriptionFilterSchema = z.object({\n\ttoolsListChanged: z.boolean().optional(),\n\tpromptsListChanged: z.boolean().optional(),\n\tresourcesListChanged: z.boolean().optional(),\n\tresourceSubscriptions: z.array(z.string()).optional()\n});\nconst SubscriptionsListenRequestParamsSchema = BaseRequestParamsSchema.extend({ notifications: SubscriptionFilterSchema });\n/**\n* Sent from the client to open a long-lived channel for receiving notifications\n* outside the context of a specific request (protocol revision 2026-07-28).\n* Replaces the previous HTTP GET endpoint and `resources/subscribe`.\n*/\nconst SubscriptionsListenRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"subscriptions/listen\"),\n\tparams: SubscriptionsListenRequestParamsSchema\n});\nconst SubscriptionsAcknowledgedNotificationParamsSchema = NotificationsParamsSchema.extend({ notifications: SubscriptionFilterSchema });\n/**\n* Sent by the server as the first message on a `subscriptions/listen` stream\n* to acknowledge that the subscription has been established and report which\n* notification types it agreed to honor (protocol revision 2026-07-28).\n*/\nconst SubscriptionsAcknowledgedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/subscriptions/acknowledged\"),\n\tparams: SubscriptionsAcknowledgedNotificationParamsSchema\n});\n/**\n* `_meta` for a {@linkcode SubscriptionsListenResult}: the listen request's\n* JSON-RPC ID under the canonical subscription-id key (mirroring the same key\n* on every notification delivered on the stream). Extends\n* {@linkcode ResultMetaObjectSchema}, so the optional serverInfo key is typed\n* here too.\n*/\nconst SubscriptionsListenResultMetaSchema = ResultMetaObjectSchema.extend({ [SUBSCRIPTION_ID_META_KEY]: RequestIdSchema });\n/**\n* The response to a `subscriptions/listen` request, signalling that the\n* subscription has ended gracefully (for example, during server shutdown).\n* Because the listen stream is long-lived, this result is sent only when the\n* server tears the subscription down; an abrupt transport close carries no\n* response. The result body is otherwise empty.\n*/\nconst SubscriptionsListenResultSchema = ResultSchema.extend({ _meta: SubscriptionsListenResultMetaSchema });\n/**\n* Parameters for a {@linkcode ResourceUpdatedNotification | notifications/resources/updated} notification.\n*/\nconst ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({ uri: z.string() });\n/**\n* A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a {@linkcode SubscribeRequest | resources/subscribe} request.\n*/\nconst ResourceUpdatedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/resources/updated\"),\n\tparams: ResourceUpdatedNotificationParamsSchema\n});\n/**\n* Describes an argument that a prompt can accept.\n*/\nconst PromptArgumentSchema = z.object({\n\tname: z.string(),\n\tdescription: z.optional(z.string()),\n\trequired: z.optional(z.boolean())\n});\n/**\n* A prompt or prompt template that the server offers.\n*/\nconst PromptSchema = z.object({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\tdescription: z.optional(z.string()),\n\targuments: z.optional(z.array(PromptArgumentSchema)),\n\t_meta: z.optional(z.looseObject({}))\n});\n/**\n* Sent from the client to request a list of prompts and prompt templates the server has.\n*/\nconst ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"prompts/list\") });\n/**\n* The server's response to a {@linkcode ListPromptsRequest | prompts/list} request from the client.\n*/\nconst ListPromptsResultSchema = PaginatedResultSchema.extend({ prompts: z.array(PromptSchema) });\n/**\n* Parameters for a {@linkcode GetPromptRequest | prompts/get} request.\n*/\nconst GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({\n\tname: z.string(),\n\targuments: z.record(z.string(), z.string()).optional()\n});\n/**\n* Used by the client to get a prompt provided by the server.\n*/\nconst GetPromptRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"prompts/get\"),\n\tparams: GetPromptRequestParamsSchema\n});\n/**\n* Text provided to or from an LLM.\n*/\nconst TextContentSchema = z.object({\n\ttype: z.literal(\"text\"),\n\ttext: z.string(),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* An image provided to or from an LLM.\n*/\nconst ImageContentSchema = z.object({\n\ttype: z.literal(\"image\"),\n\tdata: Base64Schema,\n\tmimeType: z.string(),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Audio content provided to or from an LLM.\n*/\nconst AudioContentSchema = z.object({\n\ttype: z.literal(\"audio\"),\n\tdata: Base64Schema,\n\tmimeType: z.string(),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* A tool call request from an assistant (LLM).\n* Represents the assistant's request to use a tool.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ToolUseContentSchema = z.object({\n\ttype: z.literal(\"tool_use\"),\n\tname: z.string(),\n\tid: z.string(),\n\tinput: z.record(z.string(), z.unknown()),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* The contents of a resource, embedded into a prompt or tool call result.\n*/\nconst EmbeddedResourceSchema = z.object({\n\ttype: z.literal(\"resource\"),\n\tresource: z.union([TextResourceContentsSchema, BlobResourceContentsSchema]),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* A resource that the server is capable of reading, included in a prompt or tool call result.\n*\n* Note: resource links returned by tools are not guaranteed to appear in the results of {@linkcode ListResourcesRequest | resources/list} requests.\n*/\nconst ResourceLinkSchema = ResourceSchema.extend({ type: z.literal(\"resource_link\") });\n/**\n* A content block that can be used in prompts and tool results.\n*/\nconst ContentBlockSchema = z.union([\n\tTextContentSchema,\n\tImageContentSchema,\n\tAudioContentSchema,\n\tResourceLinkSchema,\n\tEmbeddedResourceSchema\n]);\n/**\n* Describes a message returned as part of a prompt.\n*/\nconst PromptMessageSchema = z.object({\n\trole: RoleSchema,\n\tcontent: ContentBlockSchema\n});\n/**\n* The server's response to a {@linkcode GetPromptRequest | prompts/get} request from the client.\n*/\nconst GetPromptResultSchema = ResultSchema.extend({\n\tdescription: z.string().optional(),\n\tmessages: z.array(PromptMessageSchema)\n});\n/**\n* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.\n*/\nconst PromptListChangedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/prompts/list_changed\"),\n\tparams: NotificationsParamsSchema.optional()\n});\n/**\n* Additional properties describing a `Tool` to clients.\n*\n* NOTE: all properties in {@linkcode ToolAnnotations} are **hints**.\n* They are not guaranteed to provide a faithful description of\n* tool behavior (including descriptive properties like `title`).\n*\n* Clients should never make tool use decisions based on `ToolAnnotations`\n* received from untrusted servers.\n*/\nconst ToolAnnotationsSchema = z.object({\n\ttitle: z.string().optional(),\n\treadOnlyHint: z.boolean().optional(),\n\tdestructiveHint: z.boolean().optional(),\n\tidempotentHint: z.boolean().optional(),\n\topenWorldHint: z.boolean().optional()\n});\n/**\n* Execution-related properties for a tool.\n*/\nconst ToolExecutionSchema = z.object({ taskSupport: z.enum([\n\t\"required\",\n\t\"optional\",\n\t\"forbidden\"\n]).optional() });\n/**\n* Definition for a tool the client can call.\n*/\nconst ToolSchema = z.object({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\tdescription: z.string().optional(),\n\tinputSchema: z.object({\n\t\ttype: z.literal(\"object\"),\n\t\tproperties: z.record(z.string(), JSONValueSchema).optional(),\n\t\trequired: z.array(z.string()).optional()\n\t}).catchall(z.unknown()),\n\toutputSchema: z.looseObject({ $schema: z.string().optional() }).optional(),\n\tannotations: ToolAnnotationsSchema.optional(),\n\texecution: ToolExecutionSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Sent from the client to request a list of tools the server has.\n*/\nconst ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"tools/list\") });\n/**\n* The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.\n*/\nconst ListToolsResultSchema = PaginatedResultSchema.extend({ tools: z.array(ToolSchema) });\n/**\n* The server's response to a tool call.\n*/\nconst CallToolResultSchema = ResultSchema.extend({\n\tcontent: z.array(ContentBlockSchema).default([]),\n\tstructuredContent: z.unknown().optional(),\n\tisError: z.boolean().optional()\n});\n/**\n* {@linkcode CallToolResultSchema} extended with backwards compatibility to protocol version 2024-10-07.\n*/\nconst CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({ toolResult: z.unknown() }));\n/**\n* Parameters for a `tools/call` request.\n*/\nconst CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n\tname: z.string(),\n\targuments: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Used by the client to invoke a tool provided by the server.\n*/\nconst CallToolRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"tools/call\"),\n\tparams: CallToolRequestParamsSchema\n});\n/**\n* An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.\n*/\nconst ToolListChangedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/tools/list_changed\"),\n\tparams: NotificationsParamsSchema.optional()\n});\n/**\n* Base schema for list changed subscription options (without callback).\n* Used internally for Zod validation of `autoRefresh` and `debounceMs`.\n*/\nconst ListChangedOptionsBaseSchema = z.object({\n\tautoRefresh: z.boolean().default(true),\n\tdebounceMs: z.number().int().nonnegative().default(300)\n});\n/**\n* The severity of a log message.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst LoggingLevelSchema = z.enum([\n\t\"debug\",\n\t\"info\",\n\t\"notice\",\n\t\"warning\",\n\t\"error\",\n\t\"critical\",\n\t\"alert\",\n\t\"emergency\"\n]);\n/**\n* Parameters for a `logging/setLevel` request.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({ level: LoggingLevelSchema });\n/**\n* A request from the client to the server, to enable or adjust logging.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst SetLevelRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"logging/setLevel\"),\n\tparams: SetLevelRequestParamsSchema\n});\n/**\n* Parameters for a `notifications/message` notification.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({\n\tlevel: LoggingLevelSchema,\n\tlogger: z.string().optional(),\n\tdata: z.unknown()\n});\n/**\n* Notification of a log message passed from server to client. If no `logging/setLevel` request has been sent from the client, the server MAY decide which messages to send automatically.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst LoggingMessageNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/message\"),\n\tparams: LoggingMessageNotificationParamsSchema\n});\n/**\n* Hints to use for model selection.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ModelHintSchema = z.object({ name: z.string().optional() });\n/**\n* The server's preferences for model selection, requested of the client during sampling.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ModelPreferencesSchema = z.object({\n\thints: z.array(ModelHintSchema).optional(),\n\tcostPriority: z.number().min(0).max(1).optional(),\n\tspeedPriority: z.number().min(0).max(1).optional(),\n\tintelligencePriority: z.number().min(0).max(1).optional()\n});\n/**\n* Controls tool usage behavior in sampling requests.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ToolChoiceSchema = z.object({ mode: z.enum([\n\t\"auto\",\n\t\"required\",\n\t\"none\"\n]).optional() });\n/**\n* The result of a tool execution, provided by the user (server).\n* Represents the outcome of invoking a tool requested via `ToolUseContent`.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ToolResultContentSchema = z.object({\n\ttype: z.literal(\"tool_result\"),\n\ttoolUseId: z.string().describe(\"The unique identifier for the corresponding tool call.\"),\n\tcontent: z.array(ContentBlockSchema),\n\tstructuredContent: z.unknown().optional(),\n\tisError: z.boolean().optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Basic content types for sampling responses (without tool use).\n* Used for backwards-compatible {@linkcode CreateMessageResult} when tools are not used.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst SamplingContentSchema = z.discriminatedUnion(\"type\", [\n\tTextContentSchema,\n\tImageContentSchema,\n\tAudioContentSchema\n]);\n/**\n* Content block types allowed in sampling messages.\n* This includes text, image, audio, tool use requests, and tool results.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst SamplingMessageContentBlockSchema = z.discriminatedUnion(\"type\", [\n\tTextContentSchema,\n\tImageContentSchema,\n\tAudioContentSchema,\n\tToolUseContentSchema,\n\tToolResultContentSchema\n]);\n/**\n* Describes a message issued to or received from an LLM API.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst SamplingMessageSchema = z.object({\n\trole: RoleSchema,\n\tcontent: z.union([SamplingMessageContentBlockSchema, z.array(SamplingMessageContentBlockSchema)]),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Parameters for a `sampling/createMessage` request.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n\tmessages: z.array(SamplingMessageSchema),\n\tmodelPreferences: ModelPreferencesSchema.optional(),\n\tsystemPrompt: z.string().optional(),\n\tincludeContext: z.enum([\n\t\t\"none\",\n\t\t\"thisServer\",\n\t\t\"allServers\"\n\t]).optional(),\n\ttemperature: z.number().optional(),\n\tmaxTokens: z.number().int(),\n\tstopSequences: z.array(z.string()).optional(),\n\tmetadata: JSONObjectSchema.optional(),\n\ttools: z.array(ToolSchema).optional(),\n\ttoolChoice: ToolChoiceSchema.optional()\n});\n/**\n* A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst CreateMessageRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"sampling/createMessage\"),\n\tparams: CreateMessageRequestParamsSchema\n});\n/**\n* The client's response to a `sampling/create_message` request from the server.\n* This is the backwards-compatible version that returns single content (no arrays).\n* Used when the request does not include tools.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst CreateMessageResultSchema = ResultSchema.extend({\n\tmodel: z.string(),\n\tstopReason: z.optional(z.enum([\n\t\t\"endTurn\",\n\t\t\"stopSequence\",\n\t\t\"maxTokens\"\n\t]).or(z.string())),\n\trole: RoleSchema,\n\tcontent: SamplingContentSchema\n});\n/**\n* The client's response to a `sampling/create_message` request when tools were provided.\n* This version supports array content for tool use flows.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst CreateMessageResultWithToolsSchema = ResultSchema.extend({\n\tmodel: z.string(),\n\tstopReason: z.optional(z.enum([\n\t\t\"endTurn\",\n\t\t\"stopSequence\",\n\t\t\"maxTokens\",\n\t\t\"toolUse\"\n\t]).or(z.string())),\n\trole: RoleSchema,\n\tcontent: z.union([SamplingMessageContentBlockSchema, z.array(SamplingMessageContentBlockSchema)])\n});\n/**\n* Primitive schema definition for boolean fields.\n*/\nconst BooleanSchemaSchema = z.object({\n\ttype: z.literal(\"boolean\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tdefault: z.boolean().optional()\n});\n/**\n* Primitive schema definition for string fields.\n*/\nconst StringSchemaSchema = z.object({\n\ttype: z.literal(\"string\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tminLength: z.number().optional(),\n\tmaxLength: z.number().optional(),\n\tformat: z.enum([\n\t\t\"email\",\n\t\t\"uri\",\n\t\t\"date\",\n\t\t\"date-time\"\n\t]).optional(),\n\tdefault: z.string().optional()\n});\n/**\n* Primitive schema definition for number fields.\n*/\nconst NumberSchemaSchema = z.object({\n\ttype: z.enum([\"number\", \"integer\"]),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tminimum: z.number().optional(),\n\tmaximum: z.number().optional(),\n\tdefault: z.number().optional()\n});\n/**\n* Schema for single-selection enumeration without display titles for options.\n*/\nconst UntitledSingleSelectEnumSchemaSchema = z.object({\n\ttype: z.literal(\"string\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tenum: z.array(z.string()),\n\tdefault: z.string().optional()\n});\n/**\n* Schema for single-selection enumeration with display titles for each option.\n*/\nconst TitledSingleSelectEnumSchemaSchema = z.object({\n\ttype: z.literal(\"string\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\toneOf: z.array(z.object({\n\t\tconst: z.string(),\n\t\ttitle: z.string()\n\t})),\n\tdefault: z.string().optional()\n});\n/**\n* Use {@linkcode TitledSingleSelectEnumSchema} instead.\n* This interface will be removed in a future version.\n*/\nconst LegacyTitledEnumSchemaSchema = z.object({\n\ttype: z.literal(\"string\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tenum: z.array(z.string()),\n\tenumNames: z.array(z.string()).optional(),\n\tdefault: z.string().optional()\n});\nconst SingleSelectEnumSchemaSchema = z.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);\n/**\n* Schema for multiple-selection enumeration without display titles for options.\n*/\nconst UntitledMultiSelectEnumSchemaSchema = z.object({\n\ttype: z.literal(\"array\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tminItems: z.number().optional(),\n\tmaxItems: z.number().optional(),\n\titems: z.object({\n\t\ttype: z.literal(\"string\"),\n\t\tenum: z.array(z.string())\n\t}),\n\tdefault: z.array(z.string()).optional()\n});\n/**\n* Schema for multiple-selection enumeration with display titles for each option.\n*/\nconst TitledMultiSelectEnumSchemaSchema = z.object({\n\ttype: z.literal(\"array\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tminItems: z.number().optional(),\n\tmaxItems: z.number().optional(),\n\titems: z.object({ anyOf: z.array(z.object({\n\t\tconst: z.string(),\n\t\ttitle: z.string()\n\t})) }),\n\tdefault: z.array(z.string()).optional()\n});\n/**\n* Combined schema for multiple-selection enumeration\n*/\nconst MultiSelectEnumSchemaSchema = z.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);\n/**\n* Primitive schema definition for enum fields.\n*/\nconst EnumSchemaSchema = z.union([\n\tLegacyTitledEnumSchemaSchema,\n\tSingleSelectEnumSchemaSchema,\n\tMultiSelectEnumSchemaSchema\n]);\n/**\n* Union of all primitive schema definitions.\n*/\nconst PrimitiveSchemaDefinitionSchema = z.union([\n\tEnumSchemaSchema,\n\tBooleanSchemaSchema,\n\tStringSchemaSchema,\n\tNumberSchemaSchema\n]);\n/**\n* Parameters for an `elicitation/create` request for form-based elicitation.\n*/\nconst ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n\tmode: z.literal(\"form\").optional(),\n\tmessage: z.string(),\n\trequestedSchema: z.object({\n\t\ttype: z.literal(\"object\"),\n\t\tproperties: z.record(z.string(), PrimitiveSchemaDefinitionSchema),\n\t\trequired: z.array(z.string()).optional()\n\t}).catchall(z.unknown())\n});\n/**\n* Parameters for an {@linkcode ElicitRequest | elicitation/create} request for URL-based elicitation.\n*/\nconst ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n\tmode: z.literal(\"url\"),\n\tmessage: z.string(),\n\telicitationId: z.string(),\n\turl: z.string().url()\n});\n/**\n* The parameters for a request to elicit additional information from the user via the client.\n*/\nconst ElicitRequestParamsSchema = z.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);\n/**\n* A request from the server to elicit user input via the client.\n* The client should present the message and form fields to the user (form mode)\n* or navigate to a URL (URL mode).\n*/\nconst ElicitRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"elicitation/create\"),\n\tparams: ElicitRequestParamsSchema\n});\n/**\n* Parameters for a {@linkcode ElicitationCompleteNotification | notifications/elicitation/complete} notification.\n*\n* @deprecated Removed from the spec by #2891 (2026-07-28). The client learns the outcome\n* of an out-of-band interaction by retrying the original request; no server-initiated\n* completion signal exists in the 2026-07-28 revision. Kept here for the 2025-era flow\n* only. The 2026-07-28 wire codec excludes this notification.\n* @category notifications/elicitation/complete\n*/\nconst ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({ elicitationId: z.string() });\n/**\n* A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.\n*\n* @deprecated Removed from the spec by #2891 (2026-07-28). The client learns the outcome\n* of an out-of-band interaction by retrying the original request; no server-initiated\n* completion signal exists in the 2026-07-28 revision. Kept here for the 2025-era flow\n* only. The 2026-07-28 wire codec excludes this notification.\n* @category notifications/elicitation/complete\n*/\nconst ElicitationCompleteNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/elicitation/complete\"),\n\tparams: ElicitationCompleteNotificationParamsSchema\n});\n/**\n* The client's response to an {@linkcode ElicitRequest | elicitation/create} request from the server.\n*/\nconst ElicitResultSchema = ResultSchema.extend({\n\taction: z.enum([\n\t\t\"accept\",\n\t\t\"decline\",\n\t\t\"cancel\"\n\t]),\n\tcontent: z.preprocess((val) => val === null ? void 0 : val, z.record(z.string(), z.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean(),\n\t\tz.array(z.string())\n\t])).optional())\n});\n/**\n* A reference to a resource or resource template definition.\n*/\nconst ResourceTemplateReferenceSchema = z.object({\n\ttype: z.literal(\"ref/resource\"),\n\turi: z.string()\n});\n/**\n* Identifies a prompt.\n*/\nconst PromptReferenceSchema = z.object({\n\ttype: z.literal(\"ref/prompt\"),\n\tname: z.string()\n});\n/**\n* Parameters for a {@linkcode CompleteRequest | completion/complete} request.\n*/\nconst CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({\n\tref: z.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),\n\targument: z.object({\n\t\tname: z.string(),\n\t\tvalue: z.string()\n\t}),\n\tcontext: z.object({ arguments: z.record(z.string(), z.string()).optional() }).optional()\n});\n/**\n* A request from the client to the server, to ask for completion options.\n*/\nconst CompleteRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"completion/complete\"),\n\tparams: CompleteRequestParamsSchema\n});\n/**\n* The server's response to a {@linkcode CompleteRequest | completion/complete} request\n*/\nconst CompleteResultSchema = ResultSchema.extend({ completion: z.looseObject({\n\tvalues: z.array(z.string()).max(100),\n\ttotal: z.optional(z.number().int()),\n\thasMore: z.optional(z.boolean())\n}) });\n/**\n* Represents a root directory or file that the server can operate on.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to passing paths via\n* tool parameters, resource URIs, or configuration.\n*/\nconst RootSchema = z.object({\n\turi: z.string().startsWith(\"file://\"),\n\tname: z.string().optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Sent from the server to request a list of root URIs from the client.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to passing paths via\n* tool parameters, resource URIs, or configuration.\n*/\nconst ListRootsRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"roots/list\"),\n\tparams: BaseRequestParamsSchema.optional()\n});\n/**\n* The client's response to a `roots/list` request from the server.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to passing paths via\n* tool parameters, resource URIs, or configuration.\n*/\nconst ListRootsResultSchema = ResultSchema.extend({ roots: z.array(RootSchema) });\n/**\n* A notification from the client to the server, informing it that the list of roots has changed.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to passing paths via\n* tool parameters, resource URIs, or configuration.\n*/\nconst RootsListChangedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/roots/list_changed\"),\n\tparams: NotificationsParamsSchema.optional()\n});\n/**\n* Task creation parameters, used to ask that the server create a task to represent a request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskCreationParamsSchema = z.looseObject({\n\tttl: z.number().optional(),\n\tpollInterval: z.number().optional()\n});\n/**\n* The status of a task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskStatusSchema = z.enum([\n\t\"working\",\n\t\"input_required\",\n\t\"completed\",\n\t\"failed\",\n\t\"cancelled\"\n]);\n/**\n* A pollable state object associated with a request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskSchema = z.object({\n\ttaskId: z.string(),\n\tstatus: TaskStatusSchema,\n\tttl: z.union([z.number(), z.null()]),\n\tcreatedAt: z.string(),\n\tlastUpdatedAt: z.string(),\n\tpollInterval: z.optional(z.number()),\n\tstatusMessage: z.optional(z.string())\n});\n/**\n* Result returned when a task is created, containing the task data wrapped in a `task` field.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst CreateTaskResultSchema = ResultSchema.extend({ task: TaskSchema });\n/**\n* Parameters for task status notification.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);\n/**\n* A notification sent when a task's status changes.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskStatusNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/tasks/status\"),\n\tparams: TaskStatusNotificationParamsSchema\n});\n/**\n* A request to get the state of a specific task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst GetTaskRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"tasks/get\"),\n\tparams: BaseRequestParamsSchema.extend({ taskId: z.string() })\n});\n/**\n* The response to a {@linkcode GetTaskRequest | tasks/get} request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst GetTaskResultSchema = ResultSchema.merge(TaskSchema);\n/**\n* A request to get the result of a specific task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst GetTaskPayloadRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"tasks/result\"),\n\tparams: BaseRequestParamsSchema.extend({ taskId: z.string() })\n});\n/**\n* The response to a `tasks/result` request.\n* The structure matches the result type of the original request.\n* For example, a {@linkcode CallToolRequest | tools/call} task would return the `CallToolResult` structure.\n*\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst GetTaskPayloadResultSchema = ResultSchema.loose();\n/**\n* A request to list tasks.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"tasks/list\") });\n/**\n* The response to a {@linkcode ListTasksRequest | tasks/list} request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst ListTasksResultSchema = PaginatedResultSchema.extend({ tasks: z.array(TaskSchema) });\n/**\n* A request to cancel a specific task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst CancelTaskRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"tasks/cancel\"),\n\tparams: BaseRequestParamsSchema.extend({ taskId: z.string() })\n});\n/**\n* The response to a {@linkcode CancelTaskRequest | tasks/cancel} request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst CancelTaskResultSchema = ResultSchema.merge(TaskSchema);\nconst ClientRequestSchema = z.union([\n\tPingRequestSchema,\n\tInitializeRequestSchema,\n\tDiscoverRequestSchema,\n\tCompleteRequestSchema,\n\tSetLevelRequestSchema,\n\tGetPromptRequestSchema,\n\tListPromptsRequestSchema,\n\tListResourcesRequestSchema,\n\tListResourceTemplatesRequestSchema,\n\tReadResourceRequestSchema,\n\tSubscribeRequestSchema,\n\tUnsubscribeRequestSchema,\n\tSubscriptionsListenRequestSchema,\n\tCallToolRequestSchema,\n\tListToolsRequestSchema\n]);\nconst ClientNotificationSchema = z.union([\n\tCancelledNotificationSchema,\n\tProgressNotificationSchema,\n\tInitializedNotificationSchema,\n\tRootsListChangedNotificationSchema\n]);\nconst ClientResultSchema = z.union([\n\tEmptyResultSchema,\n\tCreateMessageResultSchema,\n\tCreateMessageResultWithToolsSchema,\n\tElicitResultSchema,\n\tListRootsResultSchema\n]);\nconst ServerRequestSchema = z.union([\n\tPingRequestSchema,\n\tCreateMessageRequestSchema,\n\tElicitRequestSchema,\n\tListRootsRequestSchema\n]);\nconst ServerNotificationSchema = z.union([\n\tCancelledNotificationSchema,\n\tProgressNotificationSchema,\n\tLoggingMessageNotificationSchema,\n\tResourceUpdatedNotificationSchema,\n\tResourceListChangedNotificationSchema,\n\tToolListChangedNotificationSchema,\n\tPromptListChangedNotificationSchema,\n\tSubscriptionsAcknowledgedNotificationSchema,\n\tElicitationCompleteNotificationSchema\n]);\nconst ServerResultSchema = z.union([\n\tEmptyResultSchema,\n\tInitializeResultSchema,\n\tDiscoverResultSchema,\n\tCompleteResultSchema,\n\tGetPromptResultSchema,\n\tListPromptsResultSchema,\n\tListResourcesResultSchema,\n\tListResourceTemplatesResultSchema,\n\tReadResourceResultSchema,\n\tCallToolResultSchema,\n\tListToolsResultSchema,\n\tSubscriptionsListenResultSchema\n]);\n\n//#endregion\n//#region src/auth.ts\n/**\n* Reusable URL validation that disallows `javascript:` scheme\n*/\nconst SafeUrlSchema = z.url().superRefine((val, ctx) => {\n\tif (!URL.canParse(val)) {\n\t\tctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"URL must be parseable\",\n\t\t\tfatal: true\n\t\t});\n\t\treturn z.NEVER;\n\t}\n}).refine((url) => {\n\tconst u = new URL(url);\n\treturn u.protocol !== \"javascript:\" && u.protocol !== \"data:\" && u.protocol !== \"vbscript:\";\n}, { message: \"URL cannot use javascript:, data:, or vbscript: scheme\" });\n/**\n* RFC 9728 OAuth Protected Resource Metadata\n*/\nconst OAuthProtectedResourceMetadataSchema = z.looseObject({\n\tresource: z.string().url(),\n\tauthorization_servers: z.array(SafeUrlSchema).optional(),\n\tjwks_uri: z.string().url().optional(),\n\tscopes_supported: z.array(z.string()).optional(),\n\tbearer_methods_supported: z.array(z.string()).optional(),\n\tresource_signing_alg_values_supported: z.array(z.string()).optional(),\n\tresource_name: z.string().optional(),\n\tresource_documentation: z.string().optional(),\n\tresource_policy_uri: z.string().url().optional(),\n\tresource_tos_uri: z.string().url().optional(),\n\ttls_client_certificate_bound_access_tokens: z.boolean().optional(),\n\tauthorization_details_types_supported: z.array(z.string()).optional(),\n\tdpop_signing_alg_values_supported: z.array(z.string()).optional(),\n\tdpop_bound_access_tokens_required: z.boolean().optional()\n});\n/**\n* RFC 8414 OAuth 2.0 Authorization Server Metadata\n*/\nconst OAuthMetadataSchema = z.looseObject({\n\tissuer: z.string(),\n\tauthorization_endpoint: SafeUrlSchema,\n\ttoken_endpoint: SafeUrlSchema,\n\tregistration_endpoint: SafeUrlSchema.optional(),\n\tscopes_supported: z.array(z.string()).optional(),\n\tresponse_types_supported: z.array(z.string()),\n\tresponse_modes_supported: z.array(z.string()).optional(),\n\tgrant_types_supported: z.array(z.string()).optional(),\n\ttoken_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n\ttoken_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n\tservice_documentation: SafeUrlSchema.optional(),\n\trevocation_endpoint: SafeUrlSchema.optional(),\n\trevocation_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n\trevocation_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n\tintrospection_endpoint: z.string().optional(),\n\tintrospection_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n\tintrospection_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n\tcode_challenge_methods_supported: z.array(z.string()).optional(),\n\tclient_id_metadata_document_supported: z.boolean().optional(),\n\tauthorization_response_iss_parameter_supported: z.boolean().optional().catch(void 0)\n});\n/**\n* OpenID Connect Discovery 1.0 Provider Metadata\n*\n* @see https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata\n*/\nconst OpenIdProviderMetadataSchema = z.looseObject({\n\tissuer: z.string(),\n\tauthorization_endpoint: SafeUrlSchema,\n\ttoken_endpoint: SafeUrlSchema,\n\tuserinfo_endpoint: SafeUrlSchema.optional(),\n\tjwks_uri: SafeUrlSchema,\n\tregistration_endpoint: SafeUrlSchema.optional(),\n\tscopes_supported: z.array(z.string()).optional(),\n\tresponse_types_supported: z.array(z.string()),\n\tresponse_modes_supported: z.array(z.string()).optional(),\n\tgrant_types_supported: z.array(z.string()).optional(),\n\tacr_values_supported: z.array(z.string()).optional(),\n\tsubject_types_supported: z.array(z.string()),\n\tid_token_signing_alg_values_supported: z.array(z.string()),\n\tid_token_encryption_alg_values_supported: z.array(z.string()).optional(),\n\tid_token_encryption_enc_values_supported: z.array(z.string()).optional(),\n\tuserinfo_signing_alg_values_supported: z.array(z.string()).optional(),\n\tuserinfo_encryption_alg_values_supported: z.array(z.string()).optional(),\n\tuserinfo_encryption_enc_values_supported: z.array(z.string()).optional(),\n\trequest_object_signing_alg_values_supported: z.array(z.string()).optional(),\n\trequest_object_encryption_alg_values_supported: z.array(z.string()).optional(),\n\trequest_object_encryption_enc_values_supported: z.array(z.string()).optional(),\n\ttoken_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n\ttoken_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n\tdisplay_values_supported: z.array(z.string()).optional(),\n\tclaim_types_supported: z.array(z.string()).optional(),\n\tclaims_supported: z.array(z.string()).optional(),\n\tservice_documentation: z.string().optional(),\n\tclaims_locales_supported: z.array(z.string()).optional(),\n\tui_locales_supported: z.array(z.string()).optional(),\n\tclaims_parameter_supported: z.boolean().optional(),\n\trequest_parameter_supported: z.boolean().optional(),\n\trequest_uri_parameter_supported: z.boolean().optional(),\n\trequire_request_uri_registration: z.boolean().optional(),\n\top_policy_uri: SafeUrlSchema.optional(),\n\top_tos_uri: SafeUrlSchema.optional(),\n\tclient_id_metadata_document_supported: z.boolean().optional(),\n\tauthorization_response_iss_parameter_supported: z.boolean().optional().catch(void 0)\n});\n/**\n* OpenID Connect Discovery metadata that may include OAuth 2.0 fields\n* This schema represents the real-world scenario where OIDC providers\n* return a mix of OpenID Connect and OAuth 2.0 metadata fields\n*/\nconst OpenIdProviderDiscoveryMetadataSchema = z.object({\n\t...OpenIdProviderMetadataSchema.shape,\n\t...OAuthMetadataSchema.pick({ code_challenge_methods_supported: true }).shape\n});\n/**\n* OAuth 2.1 token response\n*/\nconst OAuthTokensSchema = z.object({\n\taccess_token: z.string(),\n\tid_token: z.string().optional(),\n\ttoken_type: z.string(),\n\texpires_in: z.coerce.number().optional(),\n\tscope: z.string().optional(),\n\trefresh_token: z.string().optional()\n}).strip();\n/**\n* RFC 8693 §2.2.1 Token Exchange response for ID-JAG tokens.\n*\n* `token_type` is intentionally optional: per RFC 8693 §2.2.1 it is informational when\n* the issued token is not an access token, and per RFC 6749 §5.1 it is case-insensitive,\n* so strict checking rejects conformant IdPs.\n*/\nconst IdJagTokenExchangeResponseSchema = z.object({\n\tissued_token_type: z.literal(\"urn:ietf:params:oauth:token-type:id-jag\"),\n\taccess_token: z.string(),\n\ttoken_type: z.string().optional(),\n\texpires_in: z.number().optional(),\n\tscope: z.string().optional()\n}).strip();\n/**\n* OAuth 2.1 error response\n*/\nconst OAuthErrorResponseSchema = z.object({\n\terror: z.string(),\n\terror_description: z.string().optional(),\n\terror_uri: z.string().optional()\n});\n/**\n* Optional version of {@linkcode SafeUrlSchema} that allows empty string for backward compatibility on `tos_uri` and `logo_uri`\n*/\nconst OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z.literal(\"\").transform(() => void 0));\n/**\n* RFC 7591 OAuth 2.0 Dynamic Client Registration metadata\n*/\nconst OAuthClientMetadataSchema = z.object({\n\tredirect_uris: z.array(SafeUrlSchema),\n\ttoken_endpoint_auth_method: z.string().optional(),\n\tgrant_types: z.array(z.string()).optional(),\n\tresponse_types: z.array(z.string()).optional(),\n\tapplication_type: z.string().optional(),\n\tclient_name: z.string().optional(),\n\tclient_uri: SafeUrlSchema.optional(),\n\tlogo_uri: OptionalSafeUrlSchema,\n\tscope: z.string().optional(),\n\tcontacts: z.array(z.string()).optional(),\n\ttos_uri: OptionalSafeUrlSchema,\n\tpolicy_uri: z.string().optional(),\n\tjwks_uri: SafeUrlSchema.optional(),\n\tjwks: z.any().optional(),\n\tsoftware_id: z.string().optional(),\n\tsoftware_version: z.string().optional(),\n\tsoftware_statement: z.string().optional()\n}).strip();\n/**\n* RFC 7591 OAuth 2.0 Dynamic Client Registration client information\n*/\nconst OAuthClientInformationSchema = z.object({\n\tclient_id: z.string(),\n\tclient_secret: z.string().optional(),\n\tclient_id_issued_at: z.number().optional(),\n\tclient_secret_expires_at: z.number().optional()\n}).strip();\n/**\n* RFC 7591 OAuth 2.0 Dynamic Client Registration full response (client information plus metadata)\n*/\nconst OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);\n/**\n* RFC 7591 OAuth 2.0 Dynamic Client Registration error response\n*/\nconst OAuthClientRegistrationErrorSchema = z.object({\n\terror: z.string(),\n\terror_description: z.string().optional()\n}).strip();\n/**\n* RFC 7009 OAuth 2.0 Token Revocation request\n*/\nconst OAuthTokenRevocationRequestSchema = z.object({\n\ttoken: z.string(),\n\ttoken_type_hint: z.string().optional()\n}).strip();\n\n//#endregion\nexport { EmbeddedResourceSchema as $, TaskMetadataSchema as $n, PrimitiveSchemaDefinitionSchema as $t, ClientRequestSchema as A, SamplingContentSchema as An, PARSE_ERROR as Ar, ListResourceTemplatesRequestSchema as At, CreateMessageResultSchema as B, SingleSelectEnumSchemaSchema as Bn, LoggingLevelSchema as Bt, CallToolResultSchema as C, ResourceUpdatedNotificationParamsSchema as Cn, INTERNAL_ERROR as Cr, JSONRPCResponseSchema as Ct, CancelledNotificationSchema as D, RoleSchema as Dn, LATEST_PROTOCOL_VERSION as Dr, ListChangedOptionsBaseSchema as Dt, CancelledNotificationParamsSchema as E, ResultSchema as En, JSONRPC_VERSION as Er, LegacyTitledEnumSchemaSchema as Et, CompleteRequestSchema as F, ServerRequestSchema as Fn, SUPPORTED_PROTOCOL_VERSIONS as Fr, ListRootsResultSchema as Ft, DiscoverResultSchema as G, SubscriptionsAcknowledgedNotificationParamsSchema as Gn, MultiSelectEnumSchemaSchema as Gt, CreateTaskResultSchema as H, SubscribeRequestParamsSchema as Hn, LoggingMessageNotificationSchema as Ht, CompleteResultSchema as I, ServerResultSchema as In, TRACEPARENT_META_KEY as Ir, ListTasksRequestSchema as It, ElicitRequestSchema as J, SubscriptionsListenRequestSchema as Jn, NumberSchemaSchema as Jt, ElicitRequestFormParamsSchema as K, SubscriptionsAcknowledgedNotificationSchema as Kn, NotificationSchema as Kt, ContentBlockSchema as L, ServerTasksCapabilitySchema as Ln, TRACESTATE_META_KEY as Lr, ListTasksResultSchema as Lt, ClientTasksCapabilitySchema as M, SamplingMessageSchema as Mn, RELATED_TASK_META_KEY as Mr, ListResourcesRequestSchema as Mt, CompatibilityCallToolResultSchema as N, ServerCapabilitiesSchema as Nn, SERVER_INFO_META_KEY as Nr, ListResourcesResultSchema as Nt, ClientCapabilitiesSchema as O, RootSchema as On, LOG_LEVEL_META_KEY as Or, ListPromptsRequestSchema as Ot, CompleteRequestParamsSchema as P, ServerNotificationSchema as Pn, SUBSCRIPTION_ID_META_KEY as Pr, ListRootsRequestSchema as Pt, ElicitationCompleteNotificationSchema as Q, TaskCreationParamsSchema as Qn, PingRequestSchema as Qt, CreateMessageRequestParamsSchema as R, SetLevelRequestParamsSchema as Rn, ListToolsRequestSchema as Rt, CallToolRequestSchema as S, ResourceTemplateSchema as Sn, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as Sr, JSONRPCRequestSchema as St, CancelTaskResultSchema as T, ResultMetaObjectSchema as Tn, INVALID_REQUEST as Tr, JSONValueSchema as Tt, CursorSchema as U, SubscribeRequestSchema as Un, ModelHintSchema as Ut, CreateMessageResultWithToolsSchema as V, StringSchemaSchema as Vn, LoggingMessageNotificationParamsSchema as Vt, DiscoverRequestSchema as W, SubscriptionFilterSchema as Wn, ModelPreferencesSchema as Wt, ElicitResultSchema as X, SubscriptionsListenResultSchema as Xn, PaginatedRequestSchema as Xt, ElicitRequestURLParamsSchema as Y, SubscriptionsListenResultMetaSchema as Yn, PaginatedRequestParamsSchema as Yt, ElicitationCompleteNotificationParamsSchema as Z, TaskAugmentedRequestParamsSchema as Zn, PaginatedResultSchema as Zt, BaseMetadataSchema as _, ResourceLinkSchema as _n, UntitledMultiSelectEnumSchemaSchema as _r, JSONArraySchema as _t, OAuthClientRegistrationErrorSchema as a, PromptListChangedNotificationSchema as an, TextResourceContentsSchema as ar, GetTaskPayloadRequestSchema as at, BooleanSchemaSchema as b, ResourceSchema as bn, CLIENT_CAPABILITIES_META_KEY as br, JSONRPCMessageSchema as bt, OAuthProtectedResourceMetadataSchema as c, PromptSchema as cn, ToolAnnotationsSchema as cr, GetTaskResultSchema as ct, OpenIdProviderDiscoveryMetadataSchema as d, ReadResourceResultSchema as dn, ToolListChangedNotificationSchema as dr, ImageContentSchema as dt, ProgressNotificationParamsSchema as en, TaskSchema as er, EmptyResultSchema as et, OpenIdProviderMetadataSchema as f, RelatedTaskMetadataSchema as fn, ToolResultContentSchema as fr, ImplementationSchema as ft, AudioContentSchema as g, ResourceContentsSchema as gn, UnsubscribeRequestSchema as gr, InitializedNotificationSchema as gt, AnnotationsSchema as h, RequestSchema as hn, UnsubscribeRequestParamsSchema as hr, InitializeResultSchema as ht, OAuthClientMetadataSchema as i, PromptArgumentSchema as in, TextContentSchema as ir, GetPromptResultSchema as it, ClientResultSchema as j, SamplingMessageContentBlockSchema as jn, PROTOCOL_VERSION_META_KEY as jr, ListResourceTemplatesResultSchema as jt, ClientNotificationSchema as k, RootsListChangedNotificationSchema as kn, METHOD_NOT_FOUND as kr, ListPromptsResultSchema as kt, OAuthTokenRevocationRequestSchema as l, ReadResourceRequestParamsSchema as ln, ToolChoiceSchema as lr, IconSchema as lt, SafeUrlSchema as m, RequestMetaSchema as mn, ToolUseContentSchema as mr, InitializeRequestSchema as mt, OAuthClientInformationFullSchema as n, ProgressSchema as nn, TaskStatusNotificationSchema as nr, GetPromptRequestParamsSchema as nt, OAuthErrorResponseSchema as o, PromptMessageSchema as on, TitledMultiSelectEnumSchemaSchema as or, GetTaskPayloadResultSchema as ot, OptionalSafeUrlSchema as p, RequestIdSchema as pn, ToolSchema as pr, InitializeRequestParamsSchema as pt, ElicitRequestParamsSchema as q, SubscriptionsListenRequestParamsSchema as qn, NotificationsParamsSchema as qt, OAuthClientInformationSchema as r, ProgressTokenSchema as rn, TaskStatusSchema as rr, GetPromptRequestSchema as rt, OAuthMetadataSchema as s, PromptReferenceSchema as sn, TitledSingleSelectEnumSchemaSchema as sr, GetTaskRequestSchema as st, IdJagTokenExchangeResponseSchema as t, ProgressNotificationSchema as tn, TaskStatusNotificationParamsSchema as tr, EnumSchemaSchema as tt, OAuthTokensSchema as u, ReadResourceRequestSchema as un, ToolExecutionSchema as ur, IconsSchema as ut, BaseRequestParamsSchema as v, ResourceListChangedNotificationSchema as vn, UntitledSingleSelectEnumSchemaSchema as vr, JSONObjectSchema as vt, CancelTaskRequestSchema as w, ResourceUpdatedNotificationSchema as wn, INVALID_PARAMS as wr, JSONRPCResultResponseSchema as wt, CallToolRequestParamsSchema as x, ResourceTemplateReferenceSchema as xn, CLIENT_INFO_META_KEY as xr, JSONRPCNotificationSchema as xt, BlobResourceContentsSchema as y, ResourceRequestParamsSchema as yn, BAGGAGE_META_KEY as yr, JSONRPCErrorResponseSchema as yt, CreateMessageRequestSchema as z, SetLevelRequestSchema as zn, ListToolsResultSchema as zt };\n//# sourceMappingURL=auth-CUe6YdwF.mjs.map","import { n as __exportAll, r as __toESM, t as __commonJSMin } from \"./chunk-Br0eD_fh.mjs\";\nimport { n as declares2019Dialect } from \"./dialects-DoSzNhcb.mjs\";\nimport { AnnotationsSchema, AudioContentSchema, BAGGAGE_META_KEY, BaseMetadataSchema, BaseRequestParamsSchema, BlobResourceContentsSchema, BooleanSchemaSchema, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, CallToolRequestParamsSchema, CallToolRequestSchema, CallToolResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, ClientCapabilitiesSchema, ClientNotificationSchema, ClientRequestSchema, ClientResultSchema, ClientTasksCapabilitySchema, CompatibilityCallToolResultSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, ContentBlockSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, CreateTaskResultSchema, CursorSchema, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DiscoverRequestSchema, DiscoverResultSchema, ElicitRequestFormParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitRequestURLParamsSchema, ElicitResultSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, EmbeddedResourceSchema, EmptyResultSchema, EnumSchemaSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, GetPromptResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, GetTaskRequestSchema, GetTaskResultSchema, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, IconSchema, IconsSchema, IdJagTokenExchangeResponseSchema, ImageContentSchema, ImplementationSchema, InitializeRequestParamsSchema, InitializeRequestSchema, InitializeResultSchema, InitializedNotificationSchema, JSONArraySchema, JSONObjectSchema, JSONRPCErrorResponseSchema, JSONRPCMessageSchema, JSONRPCNotificationSchema, JSONRPCRequestSchema, JSONRPCResponseSchema, JSONRPCResultResponseSchema, JSONRPC_VERSION, JSONValueSchema, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, LegacyTitledEnumSchemaSchema, ListChangedOptionsBaseSchema, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListRootsRequestSchema, ListRootsResultSchema, ListTasksRequestSchema, ListTasksResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, METHOD_NOT_FOUND, ModelHintSchema, ModelPreferencesSchema, MultiSelectEnumSchemaSchema, NotificationSchema, NotificationsParamsSchema, NumberSchemaSchema, OAuthClientInformationFullSchema, OAuthClientInformationSchema, OAuthClientMetadataSchema, OAuthClientRegistrationErrorSchema, OAuthErrorResponseSchema, OAuthMetadataSchema, OAuthProtectedResourceMetadataSchema, OAuthTokenRevocationRequestSchema, OAuthTokensSchema, OpenIdProviderDiscoveryMetadataSchema, OpenIdProviderMetadataSchema, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, PingRequestSchema, PrimitiveSchemaDefinitionSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, ProgressSchema, ProgressTokenSchema, PromptArgumentSchema, PromptListChangedNotificationSchema, PromptMessageSchema, PromptReferenceSchema, PromptSchema, RELATED_TASK_META_KEY, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, RelatedTaskMetadataSchema, RequestIdSchema, RequestMetaSchema, RequestSchema, ResourceContentsSchema, ResourceLinkSchema, ResourceListChangedNotificationSchema, ResourceRequestParamsSchema, ResourceSchema, ResourceTemplateReferenceSchema, ResourceTemplateSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, ResultMetaObjectSchema, ResultSchema, RoleSchema, RootSchema, RootsListChangedNotificationSchema, SERVER_INFO_META_KEY, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, ServerCapabilitiesSchema, ServerNotificationSchema, ServerRequestSchema, ServerResultSchema, ServerTasksCapabilitySchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, SingleSelectEnumSchemaSchema, StringSchemaSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, SubscriptionFilterSchema, SubscriptionsAcknowledgedNotificationParamsSchema, SubscriptionsAcknowledgedNotificationSchema, SubscriptionsListenRequestParamsSchema, SubscriptionsListenRequestSchema, SubscriptionsListenResultMetaSchema, SubscriptionsListenResultSchema, TRACEPARENT_META_KEY, TRACESTATE_META_KEY, TaskAugmentedRequestParamsSchema, TaskCreationParamsSchema, TaskMetadataSchema, TaskSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, TaskStatusSchema, TextContentSchema, TextResourceContentsSchema, TitledMultiSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, ToolAnnotationsSchema, ToolChoiceSchema, ToolExecutionSchema, ToolListChangedNotificationSchema, ToolResultContentSchema, ToolSchema, ToolUseContentSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, UntitledMultiSelectEnumSchemaSchema, UntitledSingleSelectEnumSchemaSchema } from \"@modelcontextprotocol/core/internal\";\nimport * as z from \"zod/v4\";\n\n//#region ../core-internal/src/errors/crossBundleBrand.ts\n/**\n* Cross-bundle `instanceof` support for the SDK error classes.\n*\n* `@modelcontextprotocol/client` and `@modelcontextprotocol/server` each bundle their\n* own copy of `core-internal`, so an error constructed by one package fails a\n* prototype-identity `instanceof` against the same class re-exported by the other —\n* exactly the check a dual-role process (gateway, host, in-process test) writes.\n*\n* Instead of prototype identity, branded classes stamp every instance with the brand\n* strings of its class chain under a registry symbol (`Symbol.for`, shared across\n* bundles and realms), and resolve `instanceof` via `Symbol.hasInstance` against the\n* brand set. Ordinary prototype-based `instanceof` is kept as a fallback so behavior\n* is unchanged for anything unbranded.\n*\n* A class participates by defining an **own** `mcpBrand` static (via a `static {}`\n* block, so nothing reaches the declaration files — a declared `protected static`\n* field would make the constructor types nominally incompatible across the bundled\n* copies) and (for hierarchy roots) installing {@linkcode brandedHasInstance} as\n* `Symbol.hasInstance`. User-defined subclasses that do not declare their own brand\n* keep plain prototype semantics — a foreign base-class instance never satisfies\n* `instanceof UserSubclass`.\n*\n* Prior art — the same stamp-and-hook shape ships at scale elsewhere: Node core\n* (stream.Writable since 2017, Console via a marker symbol, diagnostics_channel),\n* undici's whole error hierarchy (vendored into Node as fetch), googleapis/gaxios\n* (GaxiosError, Symbol.for marker), AWS SDK v3's ServiceException (which pairs a\n* Symbol.hasInstance override with a static isInstance guard, as we do), and zod v4\n* (Symbol.hasInstance on every schema class for cross-version interop).\n*\n* Contract notes:\n* - Participation criterion: **every error class exported from a public package that\n*   callers are documented to `instanceof` must be branded.** The per-package\n*   errorBrandConformance tests walk the export surfaces and fail naming any\n*   exported Error subclass that has not opted in.\n* - Brands assert **identity, not shape**: brand strings are version-less, so an\n*   instance from one SDK version matches the class of another. Members added to a\n*   branded class in a later version may be absent on a matched instance — read\n*   fields defensively, and treat branded classes as additive-only. The escape\n*   hatch when a release must break a branded class's read contract: change that\n*   class's brand string in the same release, which cleanly severs cross-version\n*   matching for that class. The per-package brand pins make the rename\n*   deliberate: errorSurfacePins.test.ts owns the core-internal brands, and each\n*   package's errorBrandConformance test pins its package-local ones.\n* - Cross-bundle matching requires **both** copies to be at or after the release\n*   that introduced branding; against an older copy, behavior degrades to plain\n*   prototype `instanceof` in both directions.\n* - A consumer re-bundling the SDK with property mangling (`mangle.props`) would\n*   break the brand statics; default esbuild/webpack/terser settings do not.\n*/\n/** Registry symbol — identical across bundled copies and realms. */\nconst BRANDS = Symbol.for(\"mcp.sdk.errorBrands\");\n/**\n* Stamp `instance` with the brand of every class in `ctor`'s chain that declares an\n* own `mcpBrand`. Call once from the hierarchy root's constructor with `new.target` —\n* subclasses inherit the stamping without touching their constructors.\n*\n* Constructor-time only: never stamp arbitrary objects. A stamped non-instance would\n* satisfy `instanceof` while lacking the prototype members (getters like `.status`)\n* that callers reach for after the check.\n*/\nfunction stampErrorBrands(instance, ctor) {\n\tconst brands = /* @__PURE__ */ new Set();\n\tlet current = ctor;\n\twhile (typeof current === \"function\") {\n\t\tconst brand = current.mcpBrand;\n\t\tif (Object.prototype.hasOwnProperty.call(current, \"mcpBrand\") && typeof brand === \"string\") brands.add(brand);\n\t\tcurrent = Object.getPrototypeOf(current);\n\t}\n\tif (brands.size === 0) return;\n\tObject.defineProperty(instance, BRANDS, {\n\t\tvalue: brands,\n\t\tenumerable: false,\n\t\tconfigurable: true\n\t});\n}\n/**\n* `Symbol.hasInstance` implementation for branded hierarchy roots. Matches when the\n* value carries the **own** brand of the class being tested against (cross-bundle\n* path), falling back to ordinary prototype-based `instanceof` otherwise.\n*/\nfunction brandedHasInstance(cls, value) {\n\ttry {\n\t\tif (typeof value === \"object\" && value !== null && Object.prototype.hasOwnProperty.call(cls, \"mcpBrand\") && typeof cls.mcpBrand === \"string\" && Object.prototype.hasOwnProperty.call(value, BRANDS)) {\n\t\t\tconst carried = value[BRANDS];\n\t\t\tif (carried && typeof carried.has === \"function\" && carried.has(cls.mcpBrand)) return true;\n\t\t}\n\t} catch {}\n\treturn Function.prototype[Symbol.hasInstance].call(cls, value);\n}\n\n//#endregion\n//#region ../core-internal/src/auth/errors.ts\n/**\n* OAuth error codes as defined by {@link https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 | RFC 6749}\n* and extensions.\n*/\nlet OAuthErrorCode = /* @__PURE__ */ function(OAuthErrorCode$1) {\n\t/**\n\t* The request is missing a required parameter, includes an invalid parameter value,\n\t* includes a parameter more than once, or is otherwise malformed.\n\t*/\n\tOAuthErrorCode$1[\"InvalidRequest\"] = \"invalid_request\";\n\t/**\n\t* Client authentication failed (e.g., unknown client, no client authentication included,\n\t* or unsupported authentication method).\n\t*/\n\tOAuthErrorCode$1[\"InvalidClient\"] = \"invalid_client\";\n\t/**\n\t* The provided authorization grant or refresh token is invalid, expired, revoked,\n\t* does not match the redirection URI used in the authorization request, or was issued to another client.\n\t*/\n\tOAuthErrorCode$1[\"InvalidGrant\"] = \"invalid_grant\";\n\t/**\n\t* The authenticated client is not authorized to use this authorization grant type.\n\t*/\n\tOAuthErrorCode$1[\"UnauthorizedClient\"] = \"unauthorized_client\";\n\t/**\n\t* The authorization grant type is not supported by the authorization server.\n\t*/\n\tOAuthErrorCode$1[\"UnsupportedGrantType\"] = \"unsupported_grant_type\";\n\t/**\n\t* The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.\n\t*/\n\tOAuthErrorCode$1[\"InvalidScope\"] = \"invalid_scope\";\n\t/**\n\t* The resource owner or authorization server denied the request.\n\t*/\n\tOAuthErrorCode$1[\"AccessDenied\"] = \"access_denied\";\n\t/**\n\t* The authorization server encountered an unexpected condition that prevented it from fulfilling the request.\n\t*/\n\tOAuthErrorCode$1[\"ServerError\"] = \"server_error\";\n\t/**\n\t* The authorization server is currently unable to handle the request due to temporary overloading or maintenance.\n\t*/\n\tOAuthErrorCode$1[\"TemporarilyUnavailable\"] = \"temporarily_unavailable\";\n\t/**\n\t* The authorization server does not support obtaining an authorization code using this method.\n\t*/\n\tOAuthErrorCode$1[\"UnsupportedResponseType\"] = \"unsupported_response_type\";\n\t/**\n\t* The authorization server does not support the requested token type.\n\t*/\n\tOAuthErrorCode$1[\"UnsupportedTokenType\"] = \"unsupported_token_type\";\n\t/**\n\t* The access token provided is expired, revoked, malformed, or invalid for other reasons.\n\t*/\n\tOAuthErrorCode$1[\"InvalidToken\"] = \"invalid_token\";\n\t/**\n\t* The HTTP method used is not allowed for this endpoint. (Custom, non-standard error)\n\t*/\n\tOAuthErrorCode$1[\"MethodNotAllowed\"] = \"method_not_allowed\";\n\t/**\n\t* Rate limit exceeded. (Custom, non-standard error based on RFC 6585)\n\t*/\n\tOAuthErrorCode$1[\"TooManyRequests\"] = \"too_many_requests\";\n\t/**\n\t* The client metadata is invalid. (Custom error for dynamic client registration - RFC 7591)\n\t*/\n\tOAuthErrorCode$1[\"InvalidClientMetadata\"] = \"invalid_client_metadata\";\n\t/**\n\t* The value of one or more redirection URIs is invalid. (Dynamic client registration - RFC 7591 §3.2.2)\n\t*/\n\tOAuthErrorCode$1[\"InvalidRedirectUri\"] = \"invalid_redirect_uri\";\n\t/**\n\t* The request requires higher privileges than provided by the access token.\n\t*/\n\tOAuthErrorCode$1[\"InsufficientScope\"] = \"insufficient_scope\";\n\t/**\n\t* The requested resource is invalid, missing, unknown, or malformed. (Custom error for resource indicators - RFC 8707)\n\t*/\n\tOAuthErrorCode$1[\"InvalidTarget\"] = \"invalid_target\";\n\treturn OAuthErrorCode$1;\n}({});\n/**\n* OAuth error class for all OAuth-related errors.\n*/\nvar OAuthError = class OAuthError extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.OAuthError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(code, message, errorUri) {\n\t\tsuper(message);\n\t\tthis.code = code;\n\t\tthis.errorUri = errorUri;\n\t\tthis.name = \"OAuthError\";\n\t\tstampErrorBrands(this, new.target);\n\t}\n\t/**\n\t* Converts the error to a standard OAuth error response object.\n\t*/\n\ttoResponseObject() {\n\t\tconst response = {\n\t\t\terror: this.code,\n\t\t\terror_description: this.message\n\t\t};\n\t\tif (this.errorUri) response.error_uri = this.errorUri;\n\t\treturn response;\n\t}\n\t/**\n\t* Creates an {@linkcode OAuthError} from an OAuth error response.\n\t*/\n\tstatic fromResponse(response) {\n\t\treturn new OAuthError(response.error, response.error_description ?? response.error, response.error_uri);\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/errors/sdkErrors.ts\n/**\n* Error codes for SDK errors (local errors that never cross the wire).\n* Unlike {@linkcode ProtocolErrorCode} which uses numeric JSON-RPC codes, `SdkErrorCode` uses\n* descriptive string values for better developer experience.\n*\n* These errors are thrown locally by the SDK and are never serialized as\n* JSON-RPC error responses.\n*/\nlet SdkErrorCode = /* @__PURE__ */ function(SdkErrorCode$1) {\n\t/** Transport is not connected */\n\tSdkErrorCode$1[\"NotConnected\"] = \"NOT_CONNECTED\";\n\t/** Transport is already connected */\n\tSdkErrorCode$1[\"AlreadyConnected\"] = \"ALREADY_CONNECTED\";\n\t/** Protocol is not initialized */\n\tSdkErrorCode$1[\"NotInitialized\"] = \"NOT_INITIALIZED\";\n\t/** Required capability is not supported by the remote side */\n\tSdkErrorCode$1[\"CapabilityNotSupported\"] = \"CAPABILITY_NOT_SUPPORTED\";\n\t/** Request timed out waiting for response */\n\tSdkErrorCode$1[\"RequestTimeout\"] = \"REQUEST_TIMEOUT\";\n\t/** Connection was closed */\n\tSdkErrorCode$1[\"ConnectionClosed\"] = \"CONNECTION_CLOSED\";\n\t/** Failed to send message */\n\tSdkErrorCode$1[\"SendFailed\"] = \"SEND_FAILED\";\n\t/** Response result failed local schema validation */\n\tSdkErrorCode$1[\"InvalidResult\"] = \"INVALID_RESULT\";\n\t/**\n\t* The response carried a `resultType` discriminator (protocol revision\n\t* 2026-07-28) naming a result kind this client cannot consume yet, e.g.\n\t* `input_required`. The kind is carried in `data.resultType`.\n\t*/\n\tSdkErrorCode$1[\"UnsupportedResultType\"] = \"UNSUPPORTED_RESULT_TYPE\";\n\t/**\n\t* The multi-round-trip auto-fulfilment driver exhausted its round cap\n\t* (`inputRequired.maxRounds`) without the server returning a complete\n\t* result. `data.rounds` carries the cap that was hit and\n\t* `data.lastResult` carries the last `input_required` payload received\n\t* (`{ inputRequests, requestState? }`), so callers can inspect or resume\n\t* the flow manually.\n\t*/\n\tSdkErrorCode$1[\"InputRequiredRoundsExceeded\"] = \"INPUT_REQUIRED_ROUNDS_EXCEEDED\";\n\t/**\n\t* The auto-aggregating no-`cursor` `listTools()` / `listPrompts()` /\n\t* `listResources()` / `listResourceTemplates()` walk hit the\n\t* `ClientOptions.listMaxPages` cap without the server's pagination\n\t* converging. `data.method` carries the list verb and\n\t* `data.listMaxPages` the cap that was hit; raise the cap or fall back to\n\t* explicit per-page `{ cursor }` calls.\n\t*/\n\tSdkErrorCode$1[\"ListPaginationExceeded\"] = \"LIST_PAGINATION_EXCEEDED\";\n\t/**\n\t* The spec method being sent does not exist on the negotiated protocol\n\t* version's wire era (e.g. `tasks/get` toward a 2026-07-28 peer, or\n\t* `server/discover` toward a 2025-era peer). Raised locally, before\n\t* anything reaches the transport. The method and era are carried in\n\t* `data.method` / `data.era`.\n\t*/\n\tSdkErrorCode$1[\"MethodNotSupportedByProtocolVersion\"] = \"METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION\";\n\t/**\n\t* Protocol-era negotiation at connect time failed without producing either a\n\t* usable modern (2026-07-28+) era or a definitive legacy fallback signal —\n\t* e.g. the negotiation mode forbids falling back (`pin`), the probe hit a\n\t* network failure, or the server answered the probe with a 5xx (a typed\n\t* connect error, never an era verdict).\n\t*\n\t* Negotiation-phase only: this code is never used once an era is\n\t* established. Auth walls never carry it: a 401/403 rejecting the probe\n\t* uses {@linkcode ClientHttpAuthentication} / {@linkcode ClientHttpForbidden}\n\t* instead, so era-recovery flows keyed on this code (e.g. cached-verdict\n\t* gateways) can never persist a verdict for an unauthorized exchange.\n\t*/\n\tSdkErrorCode$1[\"EraNegotiationFailed\"] = \"ERA_NEGOTIATION_FAILED\";\n\tSdkErrorCode$1[\"ClientHttpNotImplemented\"] = \"CLIENT_HTTP_NOT_IMPLEMENTED\";\n\t/**\n\t* HTTP 401 authentication failure: the transport's re-auth retry still got\n\t* 401 (`Server returned 401 after re-authentication`), or the version\n\t* negotiation probe was rejected 401 with no `authProvider` configured\n\t* (`Version negotiation failed: the server requires authorization (HTTP 401)`).\n\t* Carried on an {@linkcode SdkHttpError} with `status: 401`.\n\t*/\n\tSdkErrorCode$1[\"ClientHttpAuthentication\"] = \"CLIENT_HTTP_AUTHENTICATION\";\n\t/**\n\t* HTTP 403 denial: the step-up re-authorization retry limit was reached,\n\t* or the version negotiation probe was rejected 403\n\t* (`Version negotiation failed: the server denied access (HTTP 403)`).\n\t* Carried on an {@linkcode SdkHttpError} with `status: 403`.\n\t*/\n\tSdkErrorCode$1[\"ClientHttpForbidden\"] = \"CLIENT_HTTP_FORBIDDEN\";\n\tSdkErrorCode$1[\"ClientHttpUnexpectedContent\"] = \"CLIENT_HTTP_UNEXPECTED_CONTENT\";\n\tSdkErrorCode$1[\"ClientHttpFailedToOpenStream\"] = \"CLIENT_HTTP_FAILED_TO_OPEN_STREAM\";\n\tSdkErrorCode$1[\"ClientHttpFailedToTerminateSession\"] = \"CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION\";\n\treturn SdkErrorCode$1;\n}({});\n/**\n* SDK errors are local errors that never cross the wire.\n* They are distinct from {@linkcode ProtocolError} which represents JSON-RPC protocol errors\n* that are serialized and sent as error responses.\n*\n* @example\n* ```ts source=\"./sdkErrors.examples.ts#SdkError_basicUsage\"\n* try {\n*     // Throwing an SDK error\n*     throw new SdkError(SdkErrorCode.NotConnected, 'Transport is not connected');\n* } catch (error) {\n*     // Checking error type by code\n*     if (error instanceof SdkError && error.code === SdkErrorCode.RequestTimeout) {\n*         // Handle timeout\n*     }\n* }\n* ```\n*/\nvar SdkError = class extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.SdkError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(code, message, data) {\n\t\tsuper(message);\n\t\tthis.code = code;\n\t\tthis.data = data;\n\t\tthis.name = \"SdkError\";\n\t\tstampErrorBrands(this, new.target);\n\t}\n};\n/**\n* An {@linkcode SdkError} subclass for HTTP transport failures.\n*\n* Thrown by the streamable HTTP transport when the server responds with a\n* non-OK status code. Narrows {@linkcode SdkError.data | data} to\n* {@linkcode SdkHttpErrorData} so consumers can inspect the HTTP status\n* without unsafe casting.\n*\n* @example\n* ```ts source=\"./sdkErrors.examples.ts#SdkHttpError_basicUsage\"\n* if (error instanceof SdkHttpError) {\n*     console.log(error.status); // number\n*     console.log(error.statusText); // string | undefined\n* }\n* ```\n*/\nvar SdkHttpError = class extends SdkError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.SdkHttpError\" });\n\t}\n\tconstructor(code, message, data) {\n\t\tsuper(code, message, data);\n\t\tthis.name = \"SdkHttpError\";\n\t}\n\tget status() {\n\t\treturn this.data.status;\n\t}\n\tget statusText() {\n\t\treturn this.data.statusText;\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/shared/authUtils.ts\n/**\n* Utilities for handling OAuth resource URIs.\n*/\n/**\n* Converts a server URL to a resource URL by removing the fragment.\n* {@link https://datatracker.ietf.org/doc/html/rfc8707#section-2 | RFC 8707 section 2}\n* states that resource URIs \"MUST NOT include a fragment component\".\n* Keeps everything else unchanged (scheme, domain, port, path, query).\n*/\nfunction resourceUrlFromServerUrl(url) {\n\tconst resourceURL = typeof url === \"string\" ? new URL(url) : new URL(url.href);\n\tresourceURL.hash = \"\";\n\treturn resourceURL;\n}\n/**\n* Checks if a requested resource URL matches a configured resource URL.\n* A requested resource matches if it has the same scheme, domain, port,\n* and its path starts with the configured resource's path.\n*\n* @param options - The options object\n* @param options.requestedResource - The resource URL being requested\n* @param options.configuredResource - The resource URL that has been configured\n* @returns true if the requested resource matches the configured resource, false otherwise\n*/\nfunction checkResourceAllowed({ requestedResource, configuredResource }) {\n\tconst requested = typeof requestedResource === \"string\" ? new URL(requestedResource) : new URL(requestedResource.href);\n\tconst configured = typeof configuredResource === \"string\" ? new URL(configuredResource) : new URL(configuredResource.href);\n\tif (requested.origin !== configured.origin) return false;\n\tif (requested.pathname.length < configured.pathname.length) return false;\n\tconst requestedPath = requested.pathname.endsWith(\"/\") ? requested.pathname : requested.pathname + \"/\";\n\tconst configuredPath = configured.pathname.endsWith(\"/\") ? configured.pathname : configured.pathname + \"/\";\n\treturn requestedPath.startsWith(configuredPath);\n}\n\n//#endregion\n//#region ../core-internal/src/shared/clientCapabilityRequirements.ts\n/**\n* Inbound request methods whose processing structurally requires a client\n* capability, keyed by method, valued by the capabilities required.\n*\n* Currently empty: none of the request methods served on the 2026-07-28\n* registry unconditionally requires a client capability. Entries appear here\n* when such methods exist — for example requests whose handling embeds\n* elicitation or sampling input requests (the input-request engine), or\n* opt-in subscription delivery. Handler-conditional requirements (a specific\n* tool that needs sampling) are not expressible as a static method table and\n* are enforced at the point the requirement arises instead.\n*/\nconst REQUIRED_CLIENT_CAPABILITIES_BY_METHOD = {};\n/**\n* The client capabilities a request method structurally requires, or\n* `undefined` when the method has no static requirement.\n*/\nfunction requiredClientCapabilitiesForRequest(method) {\n\treturn Object.hasOwn(REQUIRED_CLIENT_CAPABILITIES_BY_METHOD, method) ? REQUIRED_CLIENT_CAPABILITIES_BY_METHOD[method] : void 0;\n}\nfunction isPlainObject$7(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/**\n* Whether a required nested member counts as declared even though it is not\n* spelled out: a bare `elicitation: {}` declaration (no mode sub-capability at\n* all) is read as form support — the pre-mode (2025) meaning of a bare\n* declaration — so an `elicitation.form` requirement treats it as satisfied.\n* Declaring any mode explicitly (for example `elicitation: { url: {} }`)\n* removes the implication.\n*/\nfunction isImpliedCapabilityMember(capability, member, declaredValue) {\n\treturn capability === \"elicitation\" && member === \"form\" && declaredValue[\"form\"] === void 0 && declaredValue[\"url\"] === void 0;\n}\n/**\n* The client capabilities an embedded multi-round-trip input request requires\n* (call site 2 — the outbound input-request leg): a server MUST NOT send an\n* `inputRequests` kind the request's declared client capabilities do not\n* cover. Returns `undefined` for entries whose method is not one of the\n* embedded input-request kinds (those are a server bug handled separately,\n* not a capability question).\n*\n* The requirement is mode-aware where the capability is: URL-mode elicitation\n* requires `elicitation.url`; form-mode (or mode-omitted) elicitation requires\n* `elicitation.form` (modes are sub-capabilities, and a server MUST NOT send a\n* mode the client did not declare); sampling with `tools`/`toolChoice`\n* requires `sampling.tools`. A bare `elicitation: {}` declaration satisfies\n* the form requirement — see {@linkcode missingClientCapabilities}.\n*/\nfunction requiredClientCapabilitiesForInputRequest(entry) {\n\tswitch (entry.method) {\n\t\tcase \"elicitation/create\":\n\t\t\tif (entry.params?.[\"mode\"] === \"url\") return { elicitation: { url: {} } };\n\t\t\treturn { elicitation: { form: {} } };\n\t\tcase \"sampling/createMessage\": {\n\t\t\tconst params = entry.params;\n\t\t\tif (params !== void 0 && (params[\"tools\"] !== void 0 || params[\"toolChoice\"] !== void 0)) return { sampling: { tools: {} } };\n\t\t\treturn { sampling: {} };\n\t\t}\n\t\tcase \"roots/list\": return { roots: {} };\n\t\tdefault: return;\n\t}\n}\n/**\n* Computes the subset of `required` client capabilities the client did not\n* declare. Returns `undefined` when every required capability is declared;\n* otherwise returns an object in the `ClientCapabilities` shape containing\n* exactly the missing capabilities (suitable for\n* `data.requiredCapabilities` on the `-32021` error).\n*\n* A capability counts as declared when its top-level key is present on the\n* declared capabilities; when the requirement names nested members (for\n* example `elicitation: { url: {} }`), each named member must also be present\n* under the declared capability. One lenient reading applies: a bare\n* `elicitation: {}` declaration (no mode sub-capability at all) counts as\n* declaring `elicitation.form` — the pre-mode (2025) meaning of a bare\n* declaration. An absent or empty `declared` value means\n* nothing is declared — every required capability is missing (the structural\n* clean-refusal posture for sessions with no per-request capability view).\n*/\nfunction missingClientCapabilities(required, declared) {\n\tconst missing = {};\n\tfor (const [capability, requirement] of Object.entries(required)) {\n\t\tif (requirement === void 0) continue;\n\t\tconst declaredValue = declared === void 0 ? void 0 : declared[capability];\n\t\tif (declaredValue === void 0) {\n\t\t\tmissing[capability] = requirement;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isPlainObject$7(requirement) && isPlainObject$7(declaredValue)) {\n\t\t\tconst missingMembers = {};\n\t\t\tfor (const [member, memberRequirement] of Object.entries(requirement)) if (memberRequirement !== void 0 && declaredValue[member] === void 0 && !isImpliedCapabilityMember(capability, member, declaredValue)) missingMembers[member] = memberRequirement;\n\t\t\tif (Object.keys(missingMembers).length > 0) missing[capability] = missingMembers;\n\t\t}\n\t}\n\treturn Object.keys(missing).length > 0 ? missing : void 0;\n}\n\n//#endregion\n//#region ../core-internal/src/shared/protocolEras.ts\n/**\n* The first protocol revision of the modern (2026-07-28) era. Revision identifiers\n* are ISO dates, so lexicographic comparison orders them chronologically.\n*/\nconst FIRST_MODERN_PROTOCOL_VERSION = \"2026-07-28\";\n/**\n* Modern-era protocol revisions this SDK can negotiate via `server/discover`.\n* Deliberately separate from {@linkcode SUPPORTED_PROTOCOL_VERSIONS} (the legacy\n* `initialize` list), so adding a revision here can never leak a modern version\n* string into a 2025-era handshake. Internal — not part of the public API surface.\n*/\nconst SUPPORTED_MODERN_PROTOCOL_VERSIONS = [FIRST_MODERN_PROTOCOL_VERSION];\n/** Whether the given protocol revision belongs to the modern (2026-07-28+) era. */\nfunction isModernProtocolVersion(version) {\n\treturn version >= FIRST_MODERN_PROTOCOL_VERSION;\n}\n/** The legacy-era (pre-2026-07-28) subset of a supported-versions list, in the list's own preference order. */\nfunction legacyProtocolVersions(versions) {\n\treturn versions.filter((version) => !isModernProtocolVersion(version));\n}\n/** The modern-era (2026-07-28+) subset of a supported-versions list, in the list's own preference order. */\nfunction modernProtocolVersions(versions) {\n\treturn versions.filter((version) => isModernProtocolVersion(version));\n}\n\n//#endregion\n//#region ../core-internal/src/wire/textFallback.ts\n/**\n* SEP-2106 §4.3 TextContent auto-append, era-agnostic, called from BOTH\n* codecs' {@link WireCodec.projectCallToolResult}: when `structuredContent`\n* is a non-object value (array/primitive/`null`) and the handler authored no\n* `type:'text'` block, append `{type:'text', text: JSON.stringify(value)}`.\n* Object-shaped (or absent) `structuredContent` returns the same reference.\n*\n* Leaf module: imported by both era codec modules, so it must NOT import from\n* `./codec.js` (which value-imports the rev codecs at top level — that would\n* make a runtime cycle and a TDZ hazard for entries that evaluate a rev codec\n* module first).\n*/\nfunction appendTextFallbackForNonObject(result) {\n\tconst sc = result.structuredContent;\n\tif (sc === void 0) return result;\n\tif (!(typeof sc !== \"object\" || sc === null || Array.isArray(sc))) return result;\n\tif (result.content?.some((c) => c.type === \"text\") ?? false) return result;\n\treturn {\n\t\t...result,\n\t\tcontent: [...result.content ?? [], {\n\t\t\ttype: \"text\",\n\t\t\ttext: JSON.stringify(sc)\n\t\t}]\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/wire/resultFamilies.ts\n/**\n* Result-family keys that must never default into a `{content: []}` tools/call\n* success. Shared by the 2025 wire-seam schema and server normalization.\n* Leaf module (like `textFallback.ts`): imported by registry/server paths, so\n* it must NOT import from `./codec.js` — that would close a runtime cycle.\n*/\nconst TOOL_RESULT_FOREIGN_FAMILY_KEYS = [\n\t\"task\",\n\t\"inputRequests\",\n\t\"requestState\"\n];\n/**\n* Single owner of the v1-parity ruling: a plain-object tool result without `content` (and\n* without foreign-family keys) gains `content: []`. Shared by the 2025 wire seam and server-side handler normalization.\n*/\nfunction normalizeContentlessToolResult(value) {\n\tif (value === null || typeof value !== \"object\" || Array.isArray(value) || value.content !== void 0 || TOOL_RESULT_FOREIGN_FAMILY_KEYS.some((key) => key in value)) return value;\n\treturn {\n\t\t...value,\n\t\tcontent: []\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2025-11-25/buildSchemas.ts\n/**\n* Complete frozen 2025-11-25 wire schemas. Self-contained — no imports from\n* the public/neutral types/schemas.ts. The neutral layer is the public-API\n* superset and is free to evolve (e.g., SEP-2106 widening); this file is the\n* 2025 wire-parse contract (Q10-L2 byte-identity) and is BEHAVIOR-FROZEN.\n*\n* This is the era's complete frozen wire-parse contract — both the 2025-only\n* delta (the deprecated task family, the era role unions) AND frozen copies of\n* every era-shared shape (Tool, CallToolResult, Initialize*, ContentBlock,\n* prompts/resources/completion/elicitation, …). The 2026-era codec\n* (`wire/rev2026-07-28/`) is symmetrically self-contained in the same way.\n*\n* The 2025-only delta (the task message surface, restored types-only by #2248\n* for interop with task-capable 2025 peers) is parsed ONLY through this era's\n* registry; the deprecated Task* schemas also live (marked `@deprecated`) in\n* the neutral schema layer so the public types stay nameable without a\n* cross-layer import — nameability is constant, runtime availability is\n* version-keyed — but appear in no API signature. Q1 increment 2 — deletions\n* are physical: the\n* 2026-era REGISTRY has no Task* methods (its frozen building-block copies do\n* carry the deprecated Task* sub-schemas by composition — soft contamination,\n* tracked for anchor-exactness adjudication).\n*\n* The only cross-layer dependency is `import type { JSONObject, JSONValue }`\n* from the neutral types barrel — pure structural type aliases with no parse\n* behavior. No runtime schema is shared with the neutral layer.\n*/\nfunction build$1() {\n\tconst JSONValueSchema$1 = z.lazy(() => z.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean(),\n\t\tz.null(),\n\t\tz.record(z.string(), JSONValueSchema$1),\n\t\tz.array(JSONValueSchema$1)\n\t]));\n\tconst JSONObjectSchema$1 = z.record(z.string(), JSONValueSchema$1);\n\t/**\n\t* A progress token, used to associate progress notifications with the original request.\n\t*/\n\tconst ProgressTokenSchema$1 = z.union([z.string(), z.number().int()]);\n\t/**\n\t* An opaque token used to represent a cursor for pagination.\n\t*/\n\tconst CursorSchema$1 = z.string();\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst TaskMetadataSchema$1 = z.object({ ttl: z.number().optional() });\n\t/**\n\t* Metadata for associating messages with a task.\n\t* Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst RelatedTaskMetadataSchema$1 = z.object({ taskId: z.string() });\n\tconst RequestMetaSchema$1 = z.looseObject({\n\t\tprogressToken: ProgressTokenSchema$1.optional(),\n\t\t\"io.modelcontextprotocol/related-task\": RelatedTaskMetadataSchema$1.optional()\n\t});\n\t/**\n\t* Common params for any request.\n\t*/\n\tconst BaseRequestParamsSchema$1 = z.object({ _meta: RequestMetaSchema$1.optional() });\n\t/**\n\t* Common params for any task-augmented request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskAugmentedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ task: TaskMetadataSchema$1.optional() });\n\tconst RequestSchema$1 = z.object({\n\t\tmethod: z.string(),\n\t\tparams: BaseRequestParamsSchema$1.loose().optional()\n\t});\n\tconst NotificationsParamsSchema$1 = z.object({ _meta: RequestMetaSchema$1.optional() });\n\tconst NotificationSchema$1 = z.object({\n\t\tmethod: z.string(),\n\t\tparams: NotificationsParamsSchema$1.loose().optional()\n\t});\n\tconst ResultSchema$1 = z.looseObject({ _meta: RequestMetaSchema$1.optional() });\n\t/**\n\t* A uniquely identifying ID for a request in JSON-RPC.\n\t*/\n\tconst RequestIdSchema$1 = z.union([z.string(), z.number().int()]);\n\t/**\n\t* A response that indicates success but carries no data.\n\t*/\n\tconst EmptyResultSchema$1 = ResultSchema$1.strict();\n\tconst CancelledNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({\n\t\trequestId: RequestIdSchema$1.optional(),\n\t\treason: z.string().optional()\n\t});\n\t/**\n\t* This notification can be sent by either side to indicate that it is cancelling a previously-issued request.\n\t*\n\t* The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.\n\t*\n\t* This notification indicates that the result will be unused, so any associated processing SHOULD cease.\n\t*\n\t* A client MUST NOT attempt to cancel its {@linkcode InitializeRequest | initialize} request.\n\t*/\n\tconst CancelledNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/cancelled\"),\n\t\tparams: CancelledNotificationParamsSchema$1\n\t});\n\t/**\n\t* Icon schema for use in {@link Tool | tools}, {@link Prompt | prompts}, {@link Resource | resources}, and {@link Implementation | implementations}.\n\t*/\n\tconst IconSchema$1 = z.object({\n\t\tsrc: z.string(),\n\t\tmimeType: z.string().optional(),\n\t\tsizes: z.array(z.string()).optional(),\n\t\ttheme: z.enum([\"light\", \"dark\"]).optional()\n\t});\n\t/**\n\t* Base schema to add `icons` property.\n\t*\n\t*/\n\tconst IconsSchema$1 = z.object({ icons: z.array(IconSchema$1).optional() });\n\t/**\n\t* Base metadata interface for common properties across {@link Resource | resources}, {@link Tool | tools}, {@link Prompt | prompts}, and {@link Implementation | implementations}.\n\t*/\n\tconst BaseMetadataSchema$1 = z.object({\n\t\tname: z.string(),\n\t\ttitle: z.string().optional()\n\t});\n\t/**\n\t* Describes the name and version of an MCP implementation.\n\t*/\n\tconst ImplementationSchema$1 = BaseMetadataSchema$1.extend({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tversion: z.string(),\n\t\twebsiteUrl: z.string().optional(),\n\t\tdescription: z.string().optional()\n\t});\n\tconst FormElicitationCapabilitySchema = z.intersection(z.object({ applyDefaults: z.boolean().optional() }), JSONObjectSchema$1);\n\tconst ElicitationCapabilitySchema = z.preprocess((value) => {\n\t\tif (value && typeof value === \"object\" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };\n\t\treturn value;\n\t}, z.intersection(z.object({\n\t\tform: FormElicitationCapabilitySchema.optional(),\n\t\turl: JSONObjectSchema$1.optional()\n\t}), JSONObjectSchema$1.optional()));\n\t/**\n\t* Task capabilities for clients, indicating which request types support task creation.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst ClientTasksCapabilitySchema$1 = z.looseObject({\n\t\tlist: JSONObjectSchema$1.optional(),\n\t\tcancel: JSONObjectSchema$1.optional(),\n\t\trequests: z.looseObject({\n\t\t\tsampling: z.looseObject({ createMessage: JSONObjectSchema$1.optional() }).optional(),\n\t\t\telicitation: z.looseObject({ create: JSONObjectSchema$1.optional() }).optional()\n\t\t}).optional()\n\t});\n\t/**\n\t* Task capabilities for servers, indicating which request types support task creation.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst ServerTasksCapabilitySchema$1 = z.looseObject({\n\t\tlist: JSONObjectSchema$1.optional(),\n\t\tcancel: JSONObjectSchema$1.optional(),\n\t\trequests: z.looseObject({ tools: z.looseObject({ call: JSONObjectSchema$1.optional() }).optional() }).optional()\n\t});\n\t/**\n\t* Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.\n\t*/\n\tconst ClientCapabilitiesSchema$1 = z.object({\n\t\texperimental: z.record(z.string(), JSONObjectSchema$1).optional(),\n\t\tsampling: z.object({\n\t\t\tcontext: JSONObjectSchema$1.optional(),\n\t\t\ttools: JSONObjectSchema$1.optional()\n\t\t}).optional(),\n\t\telicitation: ElicitationCapabilitySchema.optional(),\n\t\troots: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\ttasks: ClientTasksCapabilitySchema$1.optional(),\n\t\textensions: z.record(z.string(), JSONObjectSchema$1).optional()\n\t});\n\tconst InitializeRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({\n\t\tprotocolVersion: z.string(),\n\t\tcapabilities: ClientCapabilitiesSchema$1,\n\t\tclientInfo: ImplementationSchema$1\n\t});\n\t/**\n\t* This request is sent from the client to the server when it first connects, asking it to begin initialization.\n\t*/\n\tconst InitializeRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"initialize\"),\n\t\tparams: InitializeRequestParamsSchema$1\n\t});\n\t/**\n\t* Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.\n\t*/\n\tconst ServerCapabilitiesSchema$1 = z.object({\n\t\texperimental: z.record(z.string(), JSONObjectSchema$1).optional(),\n\t\tlogging: JSONObjectSchema$1.optional(),\n\t\tcompletions: JSONObjectSchema$1.optional(),\n\t\tprompts: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\tresources: z.object({\n\t\t\tsubscribe: z.boolean().optional(),\n\t\t\tlistChanged: z.boolean().optional()\n\t\t}).optional(),\n\t\ttools: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\ttasks: ServerTasksCapabilitySchema$1.optional(),\n\t\textensions: z.record(z.string(), JSONObjectSchema$1).optional()\n\t});\n\t/**\n\t* After receiving an initialize request from the client, the server sends this response.\n\t*/\n\tconst InitializeResultSchema$1 = ResultSchema$1.extend({\n\t\tprotocolVersion: z.string(),\n\t\tcapabilities: ServerCapabilitiesSchema$1,\n\t\tserverInfo: ImplementationSchema$1,\n\t\tinstructions: z.string().optional()\n\t});\n\t/**\n\t* This notification is sent from the client to the server after initialization has finished.\n\t*/\n\tconst InitializedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/initialized\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\t/**\n\t* A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.\n\t*/\n\tconst PingRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"ping\"),\n\t\tparams: BaseRequestParamsSchema$1.optional()\n\t});\n\tconst ProgressSchema$1 = z.object({\n\t\tprogress: z.number(),\n\t\ttotal: z.optional(z.number()),\n\t\tmessage: z.optional(z.string())\n\t});\n\tconst ProgressNotificationParamsSchema$1 = z.object({\n\t\t...NotificationsParamsSchema$1.shape,\n\t\t...ProgressSchema$1.shape,\n\t\tprogressToken: ProgressTokenSchema$1\n\t});\n\t/**\n\t* An out-of-band notification used to inform the receiver of a progress update for a long-running request.\n\t*\n\t* @category notifications/progress\n\t*/\n\tconst ProgressNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/progress\"),\n\t\tparams: ProgressNotificationParamsSchema$1\n\t});\n\tconst PaginatedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ cursor: CursorSchema$1.optional() });\n\tconst PaginatedRequestSchema$1 = RequestSchema$1.extend({ params: PaginatedRequestParamsSchema$1.optional() });\n\tconst PaginatedResultSchema$1 = ResultSchema$1.extend({ nextCursor: CursorSchema$1.optional() });\n\t/**\n\t* The contents of a specific resource or sub-resource.\n\t*/\n\tconst ResourceContentsSchema$1 = z.object({\n\t\turi: z.string(),\n\t\tmimeType: z.optional(z.string()),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst TextResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ text: z.string() });\n\t/**\n\t* A Zod schema for validating Base64 strings that is more performant and\n\t* robust for very large inputs than the default regex-based check. It avoids\n\t* stack overflows by using the native `atob` function for validation.\n\t*/\n\tconst Base64Schema = z.string().refine((val) => {\n\t\ttry {\n\t\t\tatob(val);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, { message: \"Invalid Base64 string\" });\n\tconst BlobResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ blob: Base64Schema });\n\t/**\n\t* The sender or recipient of messages and data in a conversation.\n\t*/\n\tconst RoleSchema$1 = z.enum([\"user\", \"assistant\"]);\n\t/**\n\t* Optional annotations providing clients additional context about a resource.\n\t*/\n\tconst AnnotationsSchema$1 = z.object({\n\t\taudience: z.array(RoleSchema$1).optional(),\n\t\tpriority: z.number().min(0).max(1).optional(),\n\t\tlastModified: z.iso.datetime({ offset: true }).optional()\n\t});\n\t/**\n\t* A known resource that the server is capable of reading.\n\t*/\n\tconst ResourceSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\turi: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\tmimeType: z.optional(z.string()),\n\t\tsize: z.optional(z.number()),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\t/**\n\t* A template description for resources available on the server.\n\t*/\n\tconst ResourceTemplateSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\turiTemplate: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\tmimeType: z.optional(z.string()),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\t/**\n\t* Sent from the client to request a list of resources the server has.\n\t*/\n\tconst ListResourcesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"resources/list\") });\n\t/**\n\t* The server's response to a {@linkcode ListResourcesRequest | resources/list} request from the client.\n\t*/\n\tconst ListResourcesResultSchema$1 = PaginatedResultSchema$1.extend({ resources: z.array(ResourceSchema$1) });\n\t/**\n\t* Sent from the client to request a list of resource templates the server has.\n\t*/\n\tconst ListResourceTemplatesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"resources/templates/list\") });\n\t/**\n\t* The server's response to a {@linkcode ListResourceTemplatesRequest | resources/templates/list} request from the client.\n\t*/\n\tconst ListResourceTemplatesResultSchema$1 = PaginatedResultSchema$1.extend({ resourceTemplates: z.array(ResourceTemplateSchema$1) });\n\tconst ResourceRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ uri: z.string() });\n\t/**\n\t* Parameters for a {@linkcode ReadResourceRequest | resources/read} request.\n\t*/\n\tconst ReadResourceRequestParamsSchema$1 = ResourceRequestParamsSchema$1;\n\t/**\n\t* Sent from the client to the server, to read a specific resource URI.\n\t*/\n\tconst ReadResourceRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"resources/read\"),\n\t\tparams: ReadResourceRequestParamsSchema$1\n\t});\n\t/**\n\t* The server's response to a {@linkcode ReadResourceRequest | resources/read} request from the client.\n\t*/\n\tconst ReadResourceResultSchema$1 = ResultSchema$1.extend({ contents: z.array(z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1])) });\n\t/**\n\t* An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.\n\t*/\n\tconst ResourceListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/resources/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\tconst SubscribeRequestParamsSchema$1 = ResourceRequestParamsSchema$1;\n\t/**\n\t* Sent from the client to request `resources/updated` notifications from the server whenever a particular resource changes.\n\t*/\n\tconst SubscribeRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"resources/subscribe\"),\n\t\tparams: SubscribeRequestParamsSchema$1\n\t});\n\tconst UnsubscribeRequestParamsSchema$1 = ResourceRequestParamsSchema$1;\n\t/**\n\t* Sent from the client to request cancellation of {@linkcode ResourceUpdatedNotification | resources/updated} notifications from the server. This should follow a previous {@linkcode SubscribeRequest | resources/subscribe} request.\n\t*/\n\tconst UnsubscribeRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"resources/unsubscribe\"),\n\t\tparams: UnsubscribeRequestParamsSchema$1\n\t});\n\t/**\n\t* Parameters for a {@linkcode ResourceUpdatedNotification | notifications/resources/updated} notification.\n\t*/\n\tconst ResourceUpdatedNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({ uri: z.string() });\n\t/**\n\t* A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a {@linkcode SubscribeRequest | resources/subscribe} request.\n\t*/\n\tconst ResourceUpdatedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/resources/updated\"),\n\t\tparams: ResourceUpdatedNotificationParamsSchema$1\n\t});\n\t/**\n\t* Describes an argument that a prompt can accept.\n\t*/\n\tconst PromptArgumentSchema$1 = z.object({\n\t\tname: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\trequired: z.optional(z.boolean())\n\t});\n\t/**\n\t* A prompt or prompt template that the server offers.\n\t*/\n\tconst PromptSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tdescription: z.optional(z.string()),\n\t\targuments: z.optional(z.array(PromptArgumentSchema$1)),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\t/**\n\t* Sent from the client to request a list of prompts and prompt templates the server has.\n\t*/\n\tconst ListPromptsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"prompts/list\") });\n\t/**\n\t* The server's response to a {@linkcode ListPromptsRequest | prompts/list} request from the client.\n\t*/\n\tconst ListPromptsResultSchema$1 = PaginatedResultSchema$1.extend({ prompts: z.array(PromptSchema$1) });\n\t/**\n\t* Parameters for a {@linkcode GetPromptRequest | prompts/get} request.\n\t*/\n\tconst GetPromptRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({\n\t\tname: z.string(),\n\t\targuments: z.record(z.string(), z.string()).optional()\n\t});\n\t/**\n\t* Used by the client to get a prompt provided by the server.\n\t*/\n\tconst GetPromptRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"prompts/get\"),\n\t\tparams: GetPromptRequestParamsSchema$1\n\t});\n\t/**\n\t* Text provided to or from an LLM.\n\t*/\n\tconst TextContentSchema$1 = z.object({\n\t\ttype: z.literal(\"text\"),\n\t\ttext: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* An image provided to or from an LLM.\n\t*/\n\tconst ImageContentSchema$1 = z.object({\n\t\ttype: z.literal(\"image\"),\n\t\tdata: Base64Schema,\n\t\tmimeType: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Audio content provided to or from an LLM.\n\t*/\n\tconst AudioContentSchema$1 = z.object({\n\t\ttype: z.literal(\"audio\"),\n\t\tdata: Base64Schema,\n\t\tmimeType: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* A tool call request from an assistant (LLM).\n\t* Represents the assistant's request to use a tool.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ToolUseContentSchema$1 = z.object({\n\t\ttype: z.literal(\"tool_use\"),\n\t\tname: z.string(),\n\t\tid: z.string(),\n\t\tinput: z.record(z.string(), z.unknown()),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* The contents of a resource, embedded into a prompt or tool call result.\n\t*/\n\tconst EmbeddedResourceSchema$1 = z.object({\n\t\ttype: z.literal(\"resource\"),\n\t\tresource: z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* A resource that the server is capable of reading, included in a prompt or tool call result.\n\t*\n\t* Note: resource links returned by tools are not guaranteed to appear in the results of {@linkcode ListResourcesRequest | resources/list} requests.\n\t*/\n\tconst ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: z.literal(\"resource_link\") });\n\t/**\n\t* A content block that can be used in prompts and tool results.\n\t*/\n\tconst ContentBlockSchema$1 = z.union([\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1,\n\t\tResourceLinkSchema$1,\n\t\tEmbeddedResourceSchema$1\n\t]);\n\t/**\n\t* Describes a message returned as part of a prompt.\n\t*/\n\tconst PromptMessageSchema$1 = z.object({\n\t\trole: RoleSchema$1,\n\t\tcontent: ContentBlockSchema$1\n\t});\n\t/**\n\t* The server's response to a {@linkcode GetPromptRequest | prompts/get} request from the client.\n\t*/\n\tconst GetPromptResultSchema$1 = ResultSchema$1.extend({\n\t\tdescription: z.string().optional(),\n\t\tmessages: z.array(PromptMessageSchema$1)\n\t});\n\t/**\n\t* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.\n\t*/\n\tconst PromptListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/prompts/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\t/**\n\t* Additional properties describing a `Tool` to clients.\n\t*\n\t* NOTE: all properties in {@linkcode ToolAnnotations} are **hints**.\n\t* They are not guaranteed to provide a faithful description of\n\t* tool behavior (including descriptive properties like `title`).\n\t*\n\t* Clients should never make tool use decisions based on `ToolAnnotations`\n\t* received from untrusted servers.\n\t*/\n\tconst ToolAnnotationsSchema$1 = z.object({\n\t\ttitle: z.string().optional(),\n\t\treadOnlyHint: z.boolean().optional(),\n\t\tdestructiveHint: z.boolean().optional(),\n\t\tidempotentHint: z.boolean().optional(),\n\t\topenWorldHint: z.boolean().optional()\n\t});\n\t/**\n\t* Execution-related properties for a tool.\n\t*/\n\tconst ToolExecutionSchema$1 = z.object({ taskSupport: z.enum([\n\t\t\"required\",\n\t\t\"optional\",\n\t\t\"forbidden\"\n\t]).optional() });\n\t/**\n\t* Definition for a tool the client can call.\n\t*/\n\tconst ToolSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tdescription: z.string().optional(),\n\t\tinputSchema: z.object({\n\t\t\ttype: z.literal(\"object\"),\n\t\t\tproperties: z.record(z.string(), JSONValueSchema$1).optional(),\n\t\t\trequired: z.array(z.string()).optional()\n\t\t}).catchall(z.unknown()),\n\t\toutputSchema: z.object({\n\t\t\ttype: z.literal(\"object\"),\n\t\t\tproperties: z.record(z.string(), JSONValueSchema$1).optional(),\n\t\t\trequired: z.array(z.string()).optional()\n\t\t}).catchall(z.unknown()).optional(),\n\t\tannotations: ToolAnnotationsSchema$1.optional(),\n\t\texecution: ToolExecutionSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Sent from the client to request a list of tools the server has.\n\t*/\n\tconst ListToolsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"tools/list\") });\n\t/**\n\t* The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.\n\t*/\n\tconst ListToolsResultSchema$1 = PaginatedResultSchema$1.extend({ tools: z.array(ToolSchema$1) });\n\t/**\n\t* The server's response to a tool call.\n\t*/\n\tconst CallToolResultSchema$1 = ResultSchema$1.extend({\n\t\tcontent: z.array(ContentBlockSchema$1),\n\t\tstructuredContent: z.record(z.string(), z.unknown()).optional(),\n\t\tisError: z.boolean().optional()\n\t});\n\t/**\n\t* Parameters for a `tools/call` request.\n\t*/\n\tconst CallToolRequestParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tname: z.string(),\n\t\targuments: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Used by the client to invoke a tool provided by the server.\n\t*/\n\tconst CallToolRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"tools/call\"),\n\t\tparams: CallToolRequestParamsSchema$1\n\t});\n\t/**\n\t* An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.\n\t*/\n\tconst ToolListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/tools/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\t/**\n\t* The severity of a log message.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst LoggingLevelSchema$1 = z.enum([\n\t\t\"debug\",\n\t\t\"info\",\n\t\t\"notice\",\n\t\t\"warning\",\n\t\t\"error\",\n\t\t\"critical\",\n\t\t\"alert\",\n\t\t\"emergency\"\n\t]);\n\t/**\n\t* Parameters for a `logging/setLevel` request.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst SetLevelRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ level: LoggingLevelSchema$1 });\n\t/**\n\t* A request from the client to the server, to enable or adjust logging.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst SetLevelRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"logging/setLevel\"),\n\t\tparams: SetLevelRequestParamsSchema$1\n\t});\n\t/**\n\t* Parameters for a `notifications/message` notification.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst LoggingMessageNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({\n\t\tlevel: LoggingLevelSchema$1,\n\t\tlogger: z.string().optional(),\n\t\tdata: z.unknown()\n\t});\n\t/**\n\t* Notification of a log message passed from server to client. If no `logging/setLevel` request has been sent from the client, the server MAY decide which messages to send automatically.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst LoggingMessageNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/message\"),\n\t\tparams: LoggingMessageNotificationParamsSchema$1\n\t});\n\t/**\n\t* Hints to use for model selection.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ModelHintSchema$1 = z.object({ name: z.string().optional() });\n\t/**\n\t* The server's preferences for model selection, requested of the client during sampling.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ModelPreferencesSchema$1 = z.object({\n\t\thints: z.array(ModelHintSchema$1).optional(),\n\t\tcostPriority: z.number().min(0).max(1).optional(),\n\t\tspeedPriority: z.number().min(0).max(1).optional(),\n\t\tintelligencePriority: z.number().min(0).max(1).optional()\n\t});\n\t/**\n\t* Controls tool usage behavior in sampling requests.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ToolChoiceSchema$1 = z.object({ mode: z.enum([\n\t\t\"auto\",\n\t\t\"required\",\n\t\t\"none\"\n\t]).optional() });\n\t/**\n\t* The result of a tool execution, provided by the user (server).\n\t* Represents the outcome of invoking a tool requested via `ToolUseContent`.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ToolResultContentSchema$1 = z.object({\n\t\ttype: z.literal(\"tool_result\"),\n\t\ttoolUseId: z.string().describe(\"The unique identifier for the corresponding tool call.\"),\n\t\tcontent: z.array(ContentBlockSchema$1),\n\t\tstructuredContent: z.object({}).loose().optional(),\n\t\tisError: z.boolean().optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Basic content types for sampling responses (without tool use).\n\t* Used for backwards-compatible {@linkcode CreateMessageResult} when tools are not used.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst SamplingContentSchema$1 = z.discriminatedUnion(\"type\", [\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1\n\t]);\n\t/**\n\t* Content block types allowed in sampling messages.\n\t* This includes text, image, audio, tool use requests, and tool results.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst SamplingMessageContentBlockSchema$1 = z.discriminatedUnion(\"type\", [\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1,\n\t\tToolUseContentSchema$1,\n\t\tToolResultContentSchema$1\n\t]);\n\t/**\n\t* Describes a message issued to or received from an LLM API.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst SamplingMessageSchema$1 = z.object({\n\t\trole: RoleSchema$1,\n\t\tcontent: z.union([SamplingMessageContentBlockSchema$1, z.array(SamplingMessageContentBlockSchema$1)]),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Parameters for a `sampling/createMessage` request.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst CreateMessageRequestParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tmessages: z.array(SamplingMessageSchema$1),\n\t\tmodelPreferences: ModelPreferencesSchema$1.optional(),\n\t\tsystemPrompt: z.string().optional(),\n\t\tincludeContext: z.enum([\n\t\t\t\"none\",\n\t\t\t\"thisServer\",\n\t\t\t\"allServers\"\n\t\t]).optional(),\n\t\ttemperature: z.number().optional(),\n\t\tmaxTokens: z.number().int(),\n\t\tstopSequences: z.array(z.string()).optional(),\n\t\tmetadata: JSONObjectSchema$1.optional(),\n\t\ttools: z.array(ToolSchema$1).optional(),\n\t\ttoolChoice: ToolChoiceSchema$1.optional()\n\t});\n\t/**\n\t* A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst CreateMessageRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"sampling/createMessage\"),\n\t\tparams: CreateMessageRequestParamsSchema$1\n\t});\n\t/**\n\t* The client's response to a `sampling/create_message` request from the server.\n\t* This is the backwards-compatible version that returns single content (no arrays).\n\t* Used when the request does not include tools.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst CreateMessageResultSchema$1 = ResultSchema$1.extend({\n\t\tmodel: z.string(),\n\t\tstopReason: z.optional(z.enum([\n\t\t\t\"endTurn\",\n\t\t\t\"stopSequence\",\n\t\t\t\"maxTokens\"\n\t\t]).or(z.string())),\n\t\trole: RoleSchema$1,\n\t\tcontent: SamplingContentSchema$1\n\t});\n\t/**\n\t* The client's response to a `sampling/create_message` request when tools were provided.\n\t* This version supports array content for tool use flows.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst CreateMessageResultWithToolsSchema$1 = ResultSchema$1.extend({\n\t\tmodel: z.string(),\n\t\tstopReason: z.optional(z.enum([\n\t\t\t\"endTurn\",\n\t\t\t\"stopSequence\",\n\t\t\t\"maxTokens\",\n\t\t\t\"toolUse\"\n\t\t]).or(z.string())),\n\t\trole: RoleSchema$1,\n\t\tcontent: z.union([SamplingMessageContentBlockSchema$1, z.array(SamplingMessageContentBlockSchema$1)])\n\t});\n\t/**\n\t* Primitive schema definition for boolean fields.\n\t*/\n\tconst BooleanSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"boolean\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tdefault: z.boolean().optional()\n\t});\n\t/**\n\t* Primitive schema definition for string fields.\n\t*/\n\tconst StringSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminLength: z.number().optional(),\n\t\tmaxLength: z.number().optional(),\n\t\tformat: z.enum([\n\t\t\t\"email\",\n\t\t\t\"uri\",\n\t\t\t\"date\",\n\t\t\t\"date-time\"\n\t\t]).optional(),\n\t\tdefault: z.string().optional()\n\t});\n\t/**\n\t* Primitive schema definition for number fields.\n\t*/\n\tconst NumberSchemaSchema$1 = z.object({\n\t\ttype: z.enum([\"number\", \"integer\"]),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminimum: z.number().optional(),\n\t\tmaximum: z.number().optional(),\n\t\tdefault: z.number().optional()\n\t});\n\t/**\n\t* Schema for single-selection enumeration without display titles for options.\n\t*/\n\tconst UntitledSingleSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tenum: z.array(z.string()),\n\t\tdefault: z.string().optional()\n\t});\n\t/**\n\t* Schema for single-selection enumeration with display titles for each option.\n\t*/\n\tconst TitledSingleSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\toneOf: z.array(z.object({\n\t\t\tconst: z.string(),\n\t\t\ttitle: z.string()\n\t\t})),\n\t\tdefault: z.string().optional()\n\t});\n\t/**\n\t* Use {@linkcode TitledSingleSelectEnumSchema} instead.\n\t* This interface will be removed in a future version.\n\t*/\n\tconst LegacyTitledEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tenum: z.array(z.string()),\n\t\tenumNames: z.array(z.string()).optional(),\n\t\tdefault: z.string().optional()\n\t});\n\tconst SingleSelectEnumSchemaSchema$1 = z.union([UntitledSingleSelectEnumSchemaSchema$1, TitledSingleSelectEnumSchemaSchema$1]);\n\t/**\n\t* Schema for multiple-selection enumeration without display titles for options.\n\t*/\n\tconst UntitledMultiSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"array\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminItems: z.number().optional(),\n\t\tmaxItems: z.number().optional(),\n\t\titems: z.object({\n\t\t\ttype: z.literal(\"string\"),\n\t\t\tenum: z.array(z.string())\n\t\t}),\n\t\tdefault: z.array(z.string()).optional()\n\t});\n\t/**\n\t* Schema for multiple-selection enumeration with display titles for each option.\n\t*/\n\tconst TitledMultiSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"array\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminItems: z.number().optional(),\n\t\tmaxItems: z.number().optional(),\n\t\titems: z.object({ anyOf: z.array(z.object({\n\t\t\tconst: z.string(),\n\t\t\ttitle: z.string()\n\t\t})) }),\n\t\tdefault: z.array(z.string()).optional()\n\t});\n\t/**\n\t* Combined schema for multiple-selection enumeration\n\t*/\n\tconst MultiSelectEnumSchemaSchema$1 = z.union([UntitledMultiSelectEnumSchemaSchema$1, TitledMultiSelectEnumSchemaSchema$1]);\n\t/**\n\t* Primitive schema definition for enum fields.\n\t*/\n\tconst EnumSchemaSchema$1 = z.union([\n\t\tLegacyTitledEnumSchemaSchema$1,\n\t\tSingleSelectEnumSchemaSchema$1,\n\t\tMultiSelectEnumSchemaSchema$1\n\t]);\n\t/**\n\t* Union of all primitive schema definitions.\n\t*/\n\tconst PrimitiveSchemaDefinitionSchema$1 = z.union([\n\t\tEnumSchemaSchema$1,\n\t\tBooleanSchemaSchema$1,\n\t\tStringSchemaSchema$1,\n\t\tNumberSchemaSchema$1\n\t]);\n\t/**\n\t* Parameters for an `elicitation/create` request for form-based elicitation.\n\t*/\n\tconst ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tmode: z.literal(\"form\").optional(),\n\t\tmessage: z.string(),\n\t\trequestedSchema: z.object({\n\t\t\ttype: z.literal(\"object\"),\n\t\t\tproperties: z.record(z.string(), PrimitiveSchemaDefinitionSchema$1),\n\t\t\trequired: z.array(z.string()).optional()\n\t\t}).catchall(z.unknown())\n\t});\n\t/**\n\t* Parameters for an {@linkcode ElicitRequest | elicitation/create} request for URL-based elicitation.\n\t*/\n\tconst ElicitRequestURLParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tmode: z.literal(\"url\"),\n\t\tmessage: z.string(),\n\t\telicitationId: z.string(),\n\t\turl: z.string().url()\n\t});\n\t/**\n\t* The parameters for a request to elicit additional information from the user via the client.\n\t*/\n\tconst ElicitRequestParamsSchema$1 = z.union([ElicitRequestFormParamsSchema$1, ElicitRequestURLParamsSchema$1]);\n\t/**\n\t* A request from the server to elicit user input via the client.\n\t* The client should present the message and form fields to the user (form mode)\n\t* or navigate to a URL (URL mode).\n\t*/\n\tconst ElicitRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"elicitation/create\"),\n\t\tparams: ElicitRequestParamsSchema$1\n\t});\n\t/**\n\t* Parameters for a {@linkcode ElicitationCompleteNotification | notifications/elicitation/complete} notification.\n\t*\n\t* @category notifications/elicitation/complete\n\t*/\n\tconst ElicitationCompleteNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({ elicitationId: z.string() });\n\t/**\n\t* A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.\n\t*\n\t* @category notifications/elicitation/complete\n\t*/\n\tconst ElicitationCompleteNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/elicitation/complete\"),\n\t\tparams: ElicitationCompleteNotificationParamsSchema$1\n\t});\n\t/**\n\t* The client's response to an {@linkcode ElicitRequest | elicitation/create} request from the server.\n\t*/\n\tconst ElicitResultSchema$1 = ResultSchema$1.extend({\n\t\taction: z.enum([\n\t\t\t\"accept\",\n\t\t\t\"decline\",\n\t\t\t\"cancel\"\n\t\t]),\n\t\tcontent: z.preprocess((val) => val === null ? void 0 : val, z.record(z.string(), z.union([\n\t\t\tz.string(),\n\t\t\tz.number(),\n\t\t\tz.boolean(),\n\t\t\tz.array(z.string())\n\t\t])).optional())\n\t});\n\t/**\n\t* A reference to a resource or resource template definition.\n\t*/\n\tconst ResourceTemplateReferenceSchema$1 = z.object({\n\t\ttype: z.literal(\"ref/resource\"),\n\t\turi: z.string()\n\t});\n\t/**\n\t* Identifies a prompt.\n\t*/\n\tconst PromptReferenceSchema$1 = z.object({\n\t\ttype: z.literal(\"ref/prompt\"),\n\t\tname: z.string()\n\t});\n\t/**\n\t* Parameters for a {@linkcode CompleteRequest | completion/complete} request.\n\t*/\n\tconst CompleteRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({\n\t\tref: z.union([PromptReferenceSchema$1, ResourceTemplateReferenceSchema$1]),\n\t\targument: z.object({\n\t\t\tname: z.string(),\n\t\t\tvalue: z.string()\n\t\t}),\n\t\tcontext: z.object({ arguments: z.record(z.string(), z.string()).optional() }).optional()\n\t});\n\t/**\n\t* A request from the client to the server, to ask for completion options.\n\t*/\n\tconst CompleteRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"completion/complete\"),\n\t\tparams: CompleteRequestParamsSchema$1\n\t});\n\t/**\n\t* The server's response to a {@linkcode CompleteRequest | completion/complete} request\n\t*/\n\tconst CompleteResultSchema$1 = ResultSchema$1.extend({ completion: z.looseObject({\n\t\tvalues: z.array(z.string()).max(100),\n\t\ttotal: z.optional(z.number().int()),\n\t\thasMore: z.optional(z.boolean())\n\t}) });\n\t/**\n\t* Represents a root directory or file that the server can operate on.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to passing paths via\n\t* tool parameters, resource URIs, or configuration.\n\t*/\n\tconst RootSchema$1 = z.object({\n\t\turi: z.string().startsWith(\"file://\"),\n\t\tname: z.string().optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Sent from the server to request a list of root URIs from the client.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to passing paths via\n\t* tool parameters, resource URIs, or configuration.\n\t*/\n\tconst ListRootsRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"roots/list\"),\n\t\tparams: BaseRequestParamsSchema$1.optional()\n\t});\n\t/**\n\t* The client's response to a `roots/list` request from the server.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to passing paths via\n\t* tool parameters, resource URIs, or configuration.\n\t*/\n\tconst ListRootsResultSchema$1 = ResultSchema$1.extend({ roots: z.array(RootSchema$1) });\n\t/**\n\t* A notification from the client to the server, informing it that the list of roots has changed.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to passing paths via\n\t* tool parameters, resource URIs, or configuration.\n\t*/\n\tconst RootsListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/roots/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\t/**\n\t* Task creation parameters, used to ask that the server create a task to represent a request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskCreationParamsSchema$1 = z.looseObject({\n\t\tttl: z.number().optional(),\n\t\tpollInterval: z.number().optional()\n\t});\n\t/**\n\t* The status of a task.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskStatusSchema$1 = z.enum([\n\t\t\"working\",\n\t\t\"input_required\",\n\t\t\"completed\",\n\t\t\"failed\",\n\t\t\"cancelled\"\n\t]);\n\t/**\n\t* A pollable state object associated with a request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskSchema$1 = z.object({\n\t\ttaskId: z.string(),\n\t\tstatus: TaskStatusSchema$1,\n\t\tttl: z.union([z.number(), z.null()]),\n\t\tcreatedAt: z.string(),\n\t\tlastUpdatedAt: z.string(),\n\t\tpollInterval: z.optional(z.number()),\n\t\tstatusMessage: z.optional(z.string())\n\t});\n\t/**\n\t* Result returned when a task is created, containing the task data wrapped in a `task` field.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst CreateTaskResultSchema$1 = ResultSchema$1.extend({ task: TaskSchema$1 });\n\t/**\n\t* Parameters for task status notification.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskStatusNotificationParamsSchema$1 = NotificationsParamsSchema$1.merge(TaskSchema$1);\n\t/**\n\t* A notification sent when a task's status changes.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskStatusNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/tasks/status\"),\n\t\tparams: TaskStatusNotificationParamsSchema$1\n\t});\n\t/**\n\t* A request to get the state of a specific task.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst GetTaskRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"tasks/get\"),\n\t\tparams: BaseRequestParamsSchema$1.extend({ taskId: z.string() })\n\t});\n\t/**\n\t* The response to a {@linkcode GetTaskRequest | tasks/get} request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst GetTaskResultSchema$1 = ResultSchema$1.merge(TaskSchema$1);\n\t/**\n\t* A request to get the result of a specific task.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst GetTaskPayloadRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"tasks/result\"),\n\t\tparams: BaseRequestParamsSchema$1.extend({ taskId: z.string() })\n\t});\n\t/**\n\t* The response to a `tasks/result` request.\n\t* The structure matches the result type of the original request.\n\t* For example, a {@linkcode CallToolRequest | tools/call} task would return the `CallToolResult` structure.\n\t*\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst GetTaskPayloadResultSchema$1 = ResultSchema$1.loose();\n\t/**\n\t* A request to list tasks.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst ListTasksRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"tasks/list\") });\n\t/**\n\t* The response to a {@linkcode ListTasksRequest | tasks/list} request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst ListTasksResultSchema$1 = PaginatedResultSchema$1.extend({ tasks: z.array(TaskSchema$1) });\n\t/**\n\t* A request to cancel a specific task.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst CancelTaskRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"tasks/cancel\"),\n\t\tparams: BaseRequestParamsSchema$1.extend({ taskId: z.string() })\n\t});\n\treturn {\n\t\tJSONValueSchema: JSONValueSchema$1,\n\t\tJSONObjectSchema: JSONObjectSchema$1,\n\t\tProgressTokenSchema: ProgressTokenSchema$1,\n\t\tCursorSchema: CursorSchema$1,\n\t\tTaskMetadataSchema: TaskMetadataSchema$1,\n\t\tRelatedTaskMetadataSchema: RelatedTaskMetadataSchema$1,\n\t\tRequestMetaSchema: RequestMetaSchema$1,\n\t\tBaseRequestParamsSchema: BaseRequestParamsSchema$1,\n\t\tTaskAugmentedRequestParamsSchema: TaskAugmentedRequestParamsSchema$1,\n\t\tRequestSchema: RequestSchema$1,\n\t\tNotificationsParamsSchema: NotificationsParamsSchema$1,\n\t\tNotificationSchema: NotificationSchema$1,\n\t\tResultSchema: ResultSchema$1,\n\t\tRequestIdSchema: RequestIdSchema$1,\n\t\tEmptyResultSchema: EmptyResultSchema$1,\n\t\tCancelledNotificationParamsSchema: CancelledNotificationParamsSchema$1,\n\t\tCancelledNotificationSchema: CancelledNotificationSchema$1,\n\t\tIconSchema: IconSchema$1,\n\t\tIconsSchema: IconsSchema$1,\n\t\tBaseMetadataSchema: BaseMetadataSchema$1,\n\t\tImplementationSchema: ImplementationSchema$1,\n\t\tClientTasksCapabilitySchema: ClientTasksCapabilitySchema$1,\n\t\tServerTasksCapabilitySchema: ServerTasksCapabilitySchema$1,\n\t\tClientCapabilitiesSchema: ClientCapabilitiesSchema$1,\n\t\tInitializeRequestParamsSchema: InitializeRequestParamsSchema$1,\n\t\tInitializeRequestSchema: InitializeRequestSchema$1,\n\t\tServerCapabilitiesSchema: ServerCapabilitiesSchema$1,\n\t\tInitializeResultSchema: InitializeResultSchema$1,\n\t\tInitializedNotificationSchema: InitializedNotificationSchema$1,\n\t\tPingRequestSchema: PingRequestSchema$1,\n\t\tProgressSchema: ProgressSchema$1,\n\t\tProgressNotificationParamsSchema: ProgressNotificationParamsSchema$1,\n\t\tProgressNotificationSchema: ProgressNotificationSchema$1,\n\t\tPaginatedRequestParamsSchema: PaginatedRequestParamsSchema$1,\n\t\tPaginatedRequestSchema: PaginatedRequestSchema$1,\n\t\tPaginatedResultSchema: PaginatedResultSchema$1,\n\t\tResourceContentsSchema: ResourceContentsSchema$1,\n\t\tTextResourceContentsSchema: TextResourceContentsSchema$1,\n\t\tBlobResourceContentsSchema: BlobResourceContentsSchema$1,\n\t\tRoleSchema: RoleSchema$1,\n\t\tAnnotationsSchema: AnnotationsSchema$1,\n\t\tResourceSchema: ResourceSchema$1,\n\t\tResourceTemplateSchema: ResourceTemplateSchema$1,\n\t\tListResourcesRequestSchema: ListResourcesRequestSchema$1,\n\t\tListResourcesResultSchema: ListResourcesResultSchema$1,\n\t\tListResourceTemplatesRequestSchema: ListResourceTemplatesRequestSchema$1,\n\t\tListResourceTemplatesResultSchema: ListResourceTemplatesResultSchema$1,\n\t\tResourceRequestParamsSchema: ResourceRequestParamsSchema$1,\n\t\tReadResourceRequestParamsSchema: ReadResourceRequestParamsSchema$1,\n\t\tReadResourceRequestSchema: ReadResourceRequestSchema$1,\n\t\tReadResourceResultSchema: ReadResourceResultSchema$1,\n\t\tResourceListChangedNotificationSchema: ResourceListChangedNotificationSchema$1,\n\t\tSubscribeRequestParamsSchema: SubscribeRequestParamsSchema$1,\n\t\tSubscribeRequestSchema: SubscribeRequestSchema$1,\n\t\tUnsubscribeRequestParamsSchema: UnsubscribeRequestParamsSchema$1,\n\t\tUnsubscribeRequestSchema: UnsubscribeRequestSchema$1,\n\t\tResourceUpdatedNotificationParamsSchema: ResourceUpdatedNotificationParamsSchema$1,\n\t\tResourceUpdatedNotificationSchema: ResourceUpdatedNotificationSchema$1,\n\t\tPromptArgumentSchema: PromptArgumentSchema$1,\n\t\tPromptSchema: PromptSchema$1,\n\t\tListPromptsRequestSchema: ListPromptsRequestSchema$1,\n\t\tListPromptsResultSchema: ListPromptsResultSchema$1,\n\t\tGetPromptRequestParamsSchema: GetPromptRequestParamsSchema$1,\n\t\tGetPromptRequestSchema: GetPromptRequestSchema$1,\n\t\tTextContentSchema: TextContentSchema$1,\n\t\tImageContentSchema: ImageContentSchema$1,\n\t\tAudioContentSchema: AudioContentSchema$1,\n\t\tToolUseContentSchema: ToolUseContentSchema$1,\n\t\tEmbeddedResourceSchema: EmbeddedResourceSchema$1,\n\t\tResourceLinkSchema: ResourceLinkSchema$1,\n\t\tContentBlockSchema: ContentBlockSchema$1,\n\t\tPromptMessageSchema: PromptMessageSchema$1,\n\t\tGetPromptResultSchema: GetPromptResultSchema$1,\n\t\tPromptListChangedNotificationSchema: PromptListChangedNotificationSchema$1,\n\t\tToolAnnotationsSchema: ToolAnnotationsSchema$1,\n\t\tToolExecutionSchema: ToolExecutionSchema$1,\n\t\tToolSchema: ToolSchema$1,\n\t\tListToolsRequestSchema: ListToolsRequestSchema$1,\n\t\tListToolsResultSchema: ListToolsResultSchema$1,\n\t\tCallToolResultSchema: CallToolResultSchema$1,\n\t\tCallToolRequestParamsSchema: CallToolRequestParamsSchema$1,\n\t\tCallToolRequestSchema: CallToolRequestSchema$1,\n\t\tToolListChangedNotificationSchema: ToolListChangedNotificationSchema$1,\n\t\tLoggingLevelSchema: LoggingLevelSchema$1,\n\t\tSetLevelRequestParamsSchema: SetLevelRequestParamsSchema$1,\n\t\tSetLevelRequestSchema: SetLevelRequestSchema$1,\n\t\tLoggingMessageNotificationParamsSchema: LoggingMessageNotificationParamsSchema$1,\n\t\tLoggingMessageNotificationSchema: LoggingMessageNotificationSchema$1,\n\t\tModelHintSchema: ModelHintSchema$1,\n\t\tModelPreferencesSchema: ModelPreferencesSchema$1,\n\t\tToolChoiceSchema: ToolChoiceSchema$1,\n\t\tToolResultContentSchema: ToolResultContentSchema$1,\n\t\tSamplingContentSchema: SamplingContentSchema$1,\n\t\tSamplingMessageContentBlockSchema: SamplingMessageContentBlockSchema$1,\n\t\tSamplingMessageSchema: SamplingMessageSchema$1,\n\t\tCreateMessageRequestParamsSchema: CreateMessageRequestParamsSchema$1,\n\t\tCreateMessageRequestSchema: CreateMessageRequestSchema$1,\n\t\tCreateMessageResultSchema: CreateMessageResultSchema$1,\n\t\tCreateMessageResultWithToolsSchema: CreateMessageResultWithToolsSchema$1,\n\t\tBooleanSchemaSchema: BooleanSchemaSchema$1,\n\t\tStringSchemaSchema: StringSchemaSchema$1,\n\t\tNumberSchemaSchema: NumberSchemaSchema$1,\n\t\tUntitledSingleSelectEnumSchemaSchema: UntitledSingleSelectEnumSchemaSchema$1,\n\t\tTitledSingleSelectEnumSchemaSchema: TitledSingleSelectEnumSchemaSchema$1,\n\t\tLegacyTitledEnumSchemaSchema: LegacyTitledEnumSchemaSchema$1,\n\t\tSingleSelectEnumSchemaSchema: SingleSelectEnumSchemaSchema$1,\n\t\tUntitledMultiSelectEnumSchemaSchema: UntitledMultiSelectEnumSchemaSchema$1,\n\t\tTitledMultiSelectEnumSchemaSchema: TitledMultiSelectEnumSchemaSchema$1,\n\t\tMultiSelectEnumSchemaSchema: MultiSelectEnumSchemaSchema$1,\n\t\tEnumSchemaSchema: EnumSchemaSchema$1,\n\t\tPrimitiveSchemaDefinitionSchema: PrimitiveSchemaDefinitionSchema$1,\n\t\tElicitRequestFormParamsSchema: ElicitRequestFormParamsSchema$1,\n\t\tElicitRequestURLParamsSchema: ElicitRequestURLParamsSchema$1,\n\t\tElicitRequestParamsSchema: ElicitRequestParamsSchema$1,\n\t\tElicitRequestSchema: ElicitRequestSchema$1,\n\t\tElicitationCompleteNotificationParamsSchema: ElicitationCompleteNotificationParamsSchema$1,\n\t\tElicitationCompleteNotificationSchema: ElicitationCompleteNotificationSchema$1,\n\t\tElicitResultSchema: ElicitResultSchema$1,\n\t\tResourceTemplateReferenceSchema: ResourceTemplateReferenceSchema$1,\n\t\tPromptReferenceSchema: PromptReferenceSchema$1,\n\t\tCompleteRequestParamsSchema: CompleteRequestParamsSchema$1,\n\t\tCompleteRequestSchema: CompleteRequestSchema$1,\n\t\tCompleteResultSchema: CompleteResultSchema$1,\n\t\tRootSchema: RootSchema$1,\n\t\tListRootsRequestSchema: ListRootsRequestSchema$1,\n\t\tListRootsResultSchema: ListRootsResultSchema$1,\n\t\tRootsListChangedNotificationSchema: RootsListChangedNotificationSchema$1,\n\t\tTaskCreationParamsSchema: TaskCreationParamsSchema$1,\n\t\tTaskStatusSchema: TaskStatusSchema$1,\n\t\tTaskSchema: TaskSchema$1,\n\t\tCreateTaskResultSchema: CreateTaskResultSchema$1,\n\t\tTaskStatusNotificationParamsSchema: TaskStatusNotificationParamsSchema$1,\n\t\tTaskStatusNotificationSchema: TaskStatusNotificationSchema$1,\n\t\tGetTaskRequestSchema: GetTaskRequestSchema$1,\n\t\tGetTaskResultSchema: GetTaskResultSchema$1,\n\t\tGetTaskPayloadRequestSchema: GetTaskPayloadRequestSchema$1,\n\t\tGetTaskPayloadResultSchema: GetTaskPayloadResultSchema$1,\n\t\tListTasksRequestSchema: ListTasksRequestSchema$1,\n\t\tListTasksResultSchema: ListTasksResultSchema$1,\n\t\tCancelTaskRequestSchema: CancelTaskRequestSchema$1,\n\t\tCancelTaskResultSchema: ResultSchema$1.merge(TaskSchema$1),\n\t\tClientRequestSchema: z.union([\n\t\t\tPingRequestSchema$1,\n\t\t\tInitializeRequestSchema$1,\n\t\t\tCompleteRequestSchema$1,\n\t\t\tSetLevelRequestSchema$1,\n\t\t\tGetPromptRequestSchema$1,\n\t\t\tListPromptsRequestSchema$1,\n\t\t\tListResourcesRequestSchema$1,\n\t\t\tListResourceTemplatesRequestSchema$1,\n\t\t\tReadResourceRequestSchema$1,\n\t\t\tSubscribeRequestSchema$1,\n\t\t\tUnsubscribeRequestSchema$1,\n\t\t\tCallToolRequestSchema$1,\n\t\t\tListToolsRequestSchema$1,\n\t\t\tGetTaskRequestSchema$1,\n\t\t\tGetTaskPayloadRequestSchema$1,\n\t\t\tListTasksRequestSchema$1,\n\t\t\tCancelTaskRequestSchema$1\n\t\t]),\n\t\tClientNotificationSchema: z.union([\n\t\t\tCancelledNotificationSchema$1,\n\t\t\tProgressNotificationSchema$1,\n\t\t\tInitializedNotificationSchema$1,\n\t\t\tRootsListChangedNotificationSchema$1,\n\t\t\tTaskStatusNotificationSchema$1\n\t\t]),\n\t\tClientResultSchema: z.union([\n\t\t\tEmptyResultSchema$1,\n\t\t\tCreateMessageResultSchema$1,\n\t\t\tCreateMessageResultWithToolsSchema$1,\n\t\t\tElicitResultSchema$1,\n\t\t\tListRootsResultSchema$1,\n\t\t\tGetTaskResultSchema$1,\n\t\t\tListTasksResultSchema$1,\n\t\t\tCreateTaskResultSchema$1\n\t\t]),\n\t\tServerRequestSchema: z.union([\n\t\t\tPingRequestSchema$1,\n\t\t\tCreateMessageRequestSchema$1,\n\t\t\tElicitRequestSchema$1,\n\t\t\tListRootsRequestSchema$1,\n\t\t\tGetTaskRequestSchema$1,\n\t\t\tGetTaskPayloadRequestSchema$1,\n\t\t\tListTasksRequestSchema$1,\n\t\t\tCancelTaskRequestSchema$1\n\t\t]),\n\t\tServerNotificationSchema: z.union([\n\t\t\tCancelledNotificationSchema$1,\n\t\t\tProgressNotificationSchema$1,\n\t\t\tLoggingMessageNotificationSchema$1,\n\t\t\tResourceUpdatedNotificationSchema$1,\n\t\t\tResourceListChangedNotificationSchema$1,\n\t\t\tToolListChangedNotificationSchema$1,\n\t\t\tPromptListChangedNotificationSchema$1,\n\t\t\tTaskStatusNotificationSchema$1,\n\t\t\tElicitationCompleteNotificationSchema$1\n\t\t]),\n\t\tServerResultSchema: z.union([\n\t\t\tEmptyResultSchema$1,\n\t\t\tInitializeResultSchema$1,\n\t\t\tCompleteResultSchema$1,\n\t\t\tGetPromptResultSchema$1,\n\t\t\tListPromptsResultSchema$1,\n\t\t\tListResourcesResultSchema$1,\n\t\t\tListResourceTemplatesResultSchema$1,\n\t\t\tReadResourceResultSchema$1,\n\t\t\tCallToolResultSchema$1,\n\t\t\tListToolsResultSchema$1,\n\t\t\tGetTaskResultSchema$1,\n\t\t\tListTasksResultSchema$1,\n\t\t\tCreateTaskResultSchema$1\n\t\t]),\n\t\tCallToolResultWireSchema: z.unknown().superRefine((value, ctx) => {\n\t\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value) || value.content !== void 0) return;\n\t\t\tfor (const key of TOOL_RESULT_FOREIGN_FAMILY_KEYS) if (key in value) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: `content is required when the body carries '${key}' — another result family cannot default into an empty tools/call success`\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}).transform(normalizeContentlessToolResult).pipe(CallToolResultSchema$1)\n\t};\n}\nlet memo$1;\n/**\n* Builds the era wire-schema set on first call and returns the same object\n* thereafter. Module evaluation stays construction-free so importing the\n* era codec/registry costs nothing until the first validation actually\n* needs a schema; the registry, the codec, and the eager `schemas.ts`\n* shim all pull through this memo, so reference identity holds across\n* every consumer.\n*/\nfunction buildSchemas2025() {\n\treturn memo$1 ??= build$1();\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2025-11-25/legacyWrap.ts\n/**\n* SEP-2106 legacy `outputSchema` wrap helpers (2025-era projection only).\n*\n* The neutral / 2026-07-28 model lets a tool's `outputSchema` carry any JSON\n* Schema root. The 2025-11-25 wire shape requires `type:'object'` at the root,\n* so when an era-blind handler advertises a non-object root, the 2025 codec's\n* `encodeResult('tools/list', …)` projects it down to\n* `{type:'object', properties:{result:<natural>}, required:['result']}`, and\n* `projectCallToolResult` wraps the matching `structuredContent` as\n* `{result:<value>}`. The 2026 codec's projections are the identity.\n*\n* These helpers are wire-layer property — they exist so the projection can\n* live behind {@link WireCodec.encodeResult} / {@link WireCodec.projectCallToolResult}\n* and never be re-derived in shared/ or server-side code.\n*/\n/**\n* Whether a JSON Schema's root is non-object: either an explicit non-object\n* `type`, or a typeless root such as `{anyOf:[…]}`. Object-shaped typeless\n* roots that the schema-conversion layer can prove are objects are stamped\n* `type:'object'` upstream, so they reach this predicate as object roots.\n*/\nfunction isNonObjectJsonSchemaRoot(json) {\n\treturn json[\"type\"] !== \"object\";\n}\n/**\n* Keyword-position keys whose values are instance data (not subschemas). A\n* `{$ref:…}` appearing inside one is a literal value, not a JSON Pointer to\n* rewrite. Only consulted when the current object is in keyword position —\n* a PROPERTY named `default`/`const` (under `properties`/`$defs`/…) is a name\n* position whose value IS a subschema and is recursed into.\n*/\nconst REF_REWRITE_DATA_POSITION_KEYS = new Set([\n\t\"const\",\n\t\"enum\",\n\t\"default\",\n\t\"examples\"\n]);\n/**\n* Keyword-position keys whose value is a name→subschema map. Entries inside\n* such a map are in NAME position: their keys are author-chosen property\n* names (which may collide with JSON Schema keywords), their values are\n* subschemas to recurse into.\n*/\nconst REF_REWRITE_NAME_MAP_KEYS = new Set([\n\t\"properties\",\n\t\"patternProperties\",\n\t\"$defs\",\n\t\"definitions\",\n\t\"dependentSchemas\",\n\t\"dependencies\"\n]);\n/**\n* Whether a subtree's `$id` establishes a new resolution base. A fragment-only\n* `$id` (`\"#item\"`, the draft-07/06 spelling of 2020-12's `$anchor`) does not\n* change the RFC 3986 base URI — same-document pointers inside still resolve\n* against the document root and must be rewritten.\n*/\nfunction establishesNewBase(id) {\n\treturn id !== void 0 && !(typeof id === \"string\" && id.startsWith(\"#\"));\n}\n/**\n* Wrap a non-object output schema in the 2025-era envelope:\n* `{type:'object', properties:{result:<natural>}, required:['result']}`.\n*\n* Same-document `$ref` / `$dynamicRef` JSON Pointers inside the natural schema\n* (e.g. `#/properties/foo` produced by zod for de-duplicated/recursive types)\n* are rewritten to account for the new `#/properties/result` root: bare `#` →\n* `#/properties/result`, `#/…` → `#/properties/result/…`. Cross-document refs\n* (anything not starting with `#`) are left untouched.\n*\n* The rewrite is position-aware: data-valued keywords\n* (`const`/`enum`/`default`/`examples`) in keyword position are NOT descended\n* into; the same names appearing as property names under\n* `properties`/`patternProperties`/`$defs`/`definitions`/`dependentSchemas`/\n* `dependencies` ARE descended into (they're subschemas). The rewrite is also\n* `$id`-scoped: if the natural root carries a base-establishing `$id` no\n* pointer is rewritten (same-document refs inside resolve against the embedded\n* `$id` base, not the wrapper root), and any subtree that establishes its own\n* `$id` is left untouched for the same reason. Fragment-only `$id` (`\"#item\"`,\n* draft-07's anchor spelling) does not establish a base and IS descended into.\n*/\nfunction wrapOutputSchemaForLegacy(natural) {\n\tconst $schema = typeof natural[\"$schema\"] === \"string\" ? natural[\"$schema\"] : void 0;\n\tif (establishesNewBase(natural[\"$id\"])) return {\n\t\t...$schema !== void 0 && { $schema },\n\t\ttype: \"object\",\n\t\tproperties: { result: natural },\n\t\trequired: [\"result\"]\n\t};\n\tconst convertRecursiveRefs = declares2019Dialect(natural[\"$schema\"]) && natural[\"$recursiveAnchor\"] !== true;\n\tconst rewriteRefs = (node, parentIsNameMap) => {\n\t\tif (Array.isArray(node)) return node.map((item) => rewriteRefs(item, false));\n\t\tif (node === null || typeof node !== \"object\") return node;\n\t\tif (!parentIsNameMap && establishesNewBase(node[\"$id\"])) return node;\n\t\tconst out = {};\n\t\tlet convertedRecursion = false;\n\t\tfor (const [k, v] of Object.entries(node)) if (parentIsNameMap) out[k] = rewriteRefs(v, false);\n\t\telse if ((k === \"$ref\" || k === \"$dynamicRef\") && typeof v === \"string\") out[k] = v === \"#\" ? \"#/properties/result\" : v.startsWith(\"#/\") ? `#/properties/result${v.slice(1)}` : v;\n\t\telse if (k === \"$recursiveRef\" && v === \"#\" && convertRecursiveRefs) convertedRecursion = true;\n\t\telse if (REF_REWRITE_DATA_POSITION_KEYS.has(k)) out[k] = v;\n\t\telse if (REF_REWRITE_NAME_MAP_KEYS.has(k)) out[k] = rewriteRefs(v, true);\n\t\telse out[k] = rewriteRefs(v, false);\n\t\tif (convertedRecursion) if (\"$ref\" in out) out[\"allOf\"] = [...Array.isArray(out[\"allOf\"]) ? out[\"allOf\"] : [], { $ref: \"#/properties/result\" }];\n\t\telse out[\"$ref\"] = \"#/properties/result\";\n\t\treturn out;\n\t};\n\treturn {\n\t\t...$schema !== void 0 && { $schema },\n\t\ttype: \"object\",\n\t\tproperties: { result: rewriteRefs(natural, false) },\n\t\trequired: [\"result\"]\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2025-11-25/registry.ts\nconst requestMethodKeys$1 = {\n\tping: null,\n\tinitialize: null,\n\t\"completion/complete\": null,\n\t\"logging/setLevel\": null,\n\t\"prompts/get\": null,\n\t\"prompts/list\": null,\n\t\"resources/list\": null,\n\t\"resources/templates/list\": null,\n\t\"resources/read\": null,\n\t\"resources/subscribe\": null,\n\t\"resources/unsubscribe\": null,\n\t\"tools/call\": null,\n\t\"tools/list\": null,\n\t\"tasks/get\": null,\n\t\"tasks/result\": null,\n\t\"tasks/list\": null,\n\t\"tasks/cancel\": null,\n\t\"sampling/createMessage\": null,\n\t\"elicitation/create\": null,\n\t\"roots/list\": null\n};\nconst notificationMethodKeys$1 = {\n\t\"notifications/cancelled\": null,\n\t\"notifications/progress\": null,\n\t\"notifications/initialized\": null,\n\t\"notifications/roots/list_changed\": null,\n\t\"notifications/tasks/status\": null,\n\t\"notifications/message\": null,\n\t\"notifications/resources/updated\": null,\n\t\"notifications/resources/list_changed\": null,\n\t\"notifications/tools/list_changed\": null,\n\t\"notifications/prompts/list_changed\": null,\n\t\"notifications/elicitation/complete\": null\n};\nconst resultMethodKeys = {\n\tping: null,\n\tinitialize: null,\n\t\"completion/complete\": null,\n\t\"logging/setLevel\": null,\n\t\"prompts/get\": null,\n\t\"prompts/list\": null,\n\t\"resources/list\": null,\n\t\"resources/templates/list\": null,\n\t\"resources/read\": null,\n\t\"resources/subscribe\": null,\n\t\"resources/unsubscribe\": null,\n\t\"tools/call\": null,\n\t\"tools/list\": null,\n\t\"sampling/createMessage\": null,\n\t\"elicitation/create\": null,\n\t\"roots/list\": null\n};\nlet maps$1;\nfunction registryMaps() {\n\tif (maps$1) return maps$1;\n\tconst s = buildSchemas2025();\n\tmaps$1 = {\n\t\trequestSchemas: {\n\t\t\tping: s.PingRequestSchema,\n\t\t\tinitialize: s.InitializeRequestSchema,\n\t\t\t\"completion/complete\": s.CompleteRequestSchema,\n\t\t\t\"logging/setLevel\": s.SetLevelRequestSchema,\n\t\t\t\"prompts/get\": s.GetPromptRequestSchema,\n\t\t\t\"prompts/list\": s.ListPromptsRequestSchema,\n\t\t\t\"resources/list\": s.ListResourcesRequestSchema,\n\t\t\t\"resources/templates/list\": s.ListResourceTemplatesRequestSchema,\n\t\t\t\"resources/read\": s.ReadResourceRequestSchema,\n\t\t\t\"resources/subscribe\": s.SubscribeRequestSchema,\n\t\t\t\"resources/unsubscribe\": s.UnsubscribeRequestSchema,\n\t\t\t\"tools/call\": s.CallToolRequestSchema,\n\t\t\t\"tools/list\": s.ListToolsRequestSchema,\n\t\t\t\"tasks/get\": s.GetTaskRequestSchema,\n\t\t\t\"tasks/result\": s.GetTaskPayloadRequestSchema,\n\t\t\t\"tasks/list\": s.ListTasksRequestSchema,\n\t\t\t\"tasks/cancel\": s.CancelTaskRequestSchema,\n\t\t\t\"sampling/createMessage\": s.CreateMessageRequestSchema,\n\t\t\t\"elicitation/create\": s.ElicitRequestSchema,\n\t\t\t\"roots/list\": s.ListRootsRequestSchema\n\t\t},\n\t\tnotificationSchemas: {\n\t\t\t\"notifications/cancelled\": s.CancelledNotificationSchema,\n\t\t\t\"notifications/progress\": s.ProgressNotificationSchema,\n\t\t\t\"notifications/initialized\": s.InitializedNotificationSchema,\n\t\t\t\"notifications/roots/list_changed\": s.RootsListChangedNotificationSchema,\n\t\t\t\"notifications/tasks/status\": s.TaskStatusNotificationSchema,\n\t\t\t\"notifications/message\": s.LoggingMessageNotificationSchema,\n\t\t\t\"notifications/resources/updated\": s.ResourceUpdatedNotificationSchema,\n\t\t\t\"notifications/resources/list_changed\": s.ResourceListChangedNotificationSchema,\n\t\t\t\"notifications/tools/list_changed\": s.ToolListChangedNotificationSchema,\n\t\t\t\"notifications/prompts/list_changed\": s.PromptListChangedNotificationSchema,\n\t\t\t\"notifications/elicitation/complete\": s.ElicitationCompleteNotificationSchema\n\t\t},\n\t\tresultSchemas: {\n\t\t\tping: s.EmptyResultSchema,\n\t\t\tinitialize: s.InitializeResultSchema,\n\t\t\t\"completion/complete\": s.CompleteResultSchema,\n\t\t\t\"logging/setLevel\": s.EmptyResultSchema,\n\t\t\t\"prompts/get\": s.GetPromptResultSchema,\n\t\t\t\"prompts/list\": s.ListPromptsResultSchema,\n\t\t\t\"resources/list\": s.ListResourcesResultSchema,\n\t\t\t\"resources/templates/list\": s.ListResourceTemplatesResultSchema,\n\t\t\t\"resources/read\": s.ReadResourceResultSchema,\n\t\t\t\"resources/subscribe\": s.EmptyResultSchema,\n\t\t\t\"resources/unsubscribe\": s.EmptyResultSchema,\n\t\t\t\"tools/call\": s.CallToolResultWireSchema,\n\t\t\t\"tools/list\": s.ListToolsResultSchema,\n\t\t\t\"sampling/createMessage\": s.CreateMessageResultWithToolsSchema,\n\t\t\t\"elicitation/create\": s.ElicitResultSchema,\n\t\t\t\"roots/list\": s.ListRootsResultSchema\n\t\t}\n\t};\n\treturn maps$1;\n}\n/**\n* Forces the lazy registry maps (and, through them, the era's schema memo).\n* Warm-up hook for `preloadSchemas()` — no-op once the maps exist.\n*/\nfunction warmRegistryMaps2025() {\n\tregistryMaps();\n}\n/** The 2025-era request-method set (registry membership = the deletion story). */\nfunction hasRequestMethod2025(method) {\n\treturn Object.prototype.hasOwnProperty.call(requestMethodKeys$1, method);\n}\n/** The 2025-era notification-method set. */\nfunction hasNotificationMethod2025(method) {\n\treturn Object.prototype.hasOwnProperty.call(notificationMethodKeys$1, method);\n}\n/** Result-map membership: exactly the era's typed-method subset (no task entries, no 2026-only methods). */\nfunction hasResultMethod(method) {\n\treturn Object.prototype.hasOwnProperty.call(resultMethodKeys, method);\n}\nfunction getResultSchema(method) {\n\treturn hasResultMethod(method) ? registryMaps().resultSchemas[method] : void 0;\n}\nfunction getRequestSchema(method) {\n\treturn hasRequestMethod2025(method) ? registryMaps().requestSchemas[method] : void 0;\n}\nfunction getNotificationSchema(method) {\n\treturn hasNotificationMethod2025(method) ? registryMaps().notificationSchemas[method] : void 0;\n}\n/** Registry method lists (for the spec-method universe and the CI registry-diff oracle). */\nconst rev2025RequestMethods = Object.keys(requestMethodKeys$1);\nconst rev2025NotificationMethods = Object.keys(notificationMethodKeys$1);\n\n//#endregion\n//#region ../core-internal/src/wire/rev2025-11-25/codec.ts\nfunction isPlainObject$6(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/** Tri-state wrap of an optional Zod schema lookup (the function-only contract). */\nfunction triState$1(schema, raw) {\n\tif (schema === void 0) return {\n\t\tok: false,\n\t\treason: \"not-in-era\"\n\t};\n\tconst parsed = schema.safeParse(raw);\n\treturn parsed.success ? {\n\t\tok: true,\n\t\tvalue: parsed.data\n\t} : {\n\t\tok: false,\n\t\treason: \"invalid\",\n\t\tmessage: String(parsed.error)\n\t};\n}\nconst NOT_IN_ERA$1 = {\n\tok: false,\n\treason: \"not-in-era\"\n};\n/** Whether a `tools/list` entry advertises a non-object `outputSchema` root that needs the SEP-2106 legacy wrap. */\nfunction toolNeedsLegacyWrap(t) {\n\treturn isPlainObject$6(t) && isPlainObject$6(t[\"outputSchema\"]) && isNonObjectJsonSchemaRoot(t[\"outputSchema\"]);\n}\n/** The wire→neutral trust boundary: a decoded 2025-era wire result is adopted as the neutral `Result` here (the module's single deliberate assertion). */\nfunction toNeutralResult(value) {\n\treturn value;\n}\nconst rev2025Codec = {\n\tera: \"2025-11-25\",\n\thasRequestMethod: hasRequestMethod2025,\n\thasNotificationMethod: hasNotificationMethod2025,\n\tvalidateRequest: (method, raw) => triState$1(getRequestSchema(method), raw),\n\tvalidateResult: (method, raw) => triState$1(getResultSchema(method), raw),\n\tvalidateNotification: (method, raw) => triState$1(getNotificationSchema(method), raw),\n\thasInputRequestMethod: () => false,\n\tvalidateInputRequest: () => NOT_IN_ERA$1,\n\tvalidateInputResponse: () => NOT_IN_ERA$1,\n\tsamplingResultVariant: ((hasTools, raw) => {\n\t\tconst s = buildSchemas2025();\n\t\treturn triState$1(hasTools ? s.CreateMessageResultWithToolsSchema : s.CreateMessageResultSchema, raw);\n\t}),\n\toutboundEnvelope: (_material) => void 0,\n\tvalidateEnvelopeMeta: (_meta) => [],\n\tprojectCallToolResult(result, advertisedOutputSchema) {\n\t\tconst withText = appendTextFallbackForNonObject(result);\n\t\tconst sc = withText.structuredContent;\n\t\tif (sc === void 0) return withText;\n\t\tconst valueIsNonObject = typeof sc !== \"object\" || sc === null || Array.isArray(sc);\n\t\tconst schemaWrapped = advertisedOutputSchema !== void 0 && isNonObjectJsonSchemaRoot(advertisedOutputSchema);\n\t\tif (!valueIsNonObject && !schemaWrapped) return withText;\n\t\treturn {\n\t\t\t...withText,\n\t\t\tstructuredContent: { result: sc }\n\t\t};\n\t},\n\tdecodeResult(_method, raw) {\n\t\tif (isPlainObject$6(raw) && \"resultType\" in raw) {\n\t\t\tconst stripped = { ...raw };\n\t\t\tdelete stripped[\"resultType\"];\n\t\t\treturn {\n\t\t\t\tkind: \"complete\",\n\t\t\t\tresult: toNeutralResult(stripped)\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tkind: \"complete\",\n\t\t\tresult: toNeutralResult(raw)\n\t\t};\n\t},\n\tencodeResult(method, result) {\n\t\tif (method !== \"tools/list\") return result;\n\t\tconst tools = result.tools;\n\t\tif (!Array.isArray(tools) || !tools.some((t) => toolNeedsLegacyWrap(t))) return result;\n\t\treturn {\n\t\t\t...result,\n\t\t\ttools: tools.map((t) => toolNeedsLegacyWrap(t) ? {\n\t\t\t\t...t,\n\t\t\t\toutputSchema: wrapOutputSchemaForLegacy(t.outputSchema)\n\t\t\t} : t)\n\t\t};\n\t},\n\tencodeErrorCode: (code) => code === -32002 ? -32602 : code,\n\tcheckInboundEnvelope: (_material) => void 0\n};\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/buildSchemas.ts\n/**\n* 2026-era wire schemas (protocol revision 2026-07-28).\n*\n* Fully self-contained — no runtime imports from types/schemas.ts. The\n* neutral types/schemas.ts layer is the public-API superset and is free to\n* evolve; this file is the 2026 wire-parse contract and is BEHAVIOR-FROZEN\n* against the 2026-07-28 anchor. Every era-shared building block (content\n* blocks, resources, prompts, capabilities, notifications, …) that the wire\n* shapes compose is a frozen LOCAL copy — verbatim from the neutral layer at\n* the point this revision was sealed, dependencies first. The only cross-layer\n* dependency is `import type { JSONObject, JSONValue }` from the neutral types\n* barrel — pure structural type aliases with no parse behavior.\n*\n* This module is the only place the per-request `_meta` envelope is modeled.\n* The envelope is wire-only vocabulary: the protocol layer lifts it off\n* inbound requests before any handler runs and surfaces it at\n* `ctx.mcpReq.envelope`; the 2026-era codec enforces its requiredness at\n* dispatch time (`checkInboundEnvelope`) - the former neutral-schema JSDoc\n* deferral (\"enforced per request at dispatch time, not here\") is now\n* discharged by that codec step.\n*\n* No 2025-era traffic ever touches this module, so requiredness here is\n* bare and spec-exact (the shared-schema `.catch` hazards do not apply).\n*\n* SPEC-CURRENCY RE-SEAL (2026-07-17): the 2026-07-28 revision was re-sealed\n* upstream by spec PR #3002 (commit 71e30695, merged 2026-07-15 — after the\n* previous anchor pin f68d864a): the envelope's `clientInfo` demoted from\n* required to SHOULD, and `DiscoverResult.serverInfo` moved from the result\n* body to the new `ResultMetaObject` key\n* `_meta['io.modelcontextprotocol/serverInfo']` (optional on every result).\n* The shapes below are the re-sealed anchor, exactly — no pre-#3002 shape is\n* modeled anywhere (per ruling: the final revision is the only 2026-07-28).\n*/\nfunction build() {\n\tconst JSONValueSchema$1 = z.lazy(() => z.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean(),\n\t\tz.null(),\n\t\tz.record(z.string(), JSONValueSchema$1),\n\t\tz.array(JSONValueSchema$1)\n\t]));\n\tconst JSONObjectSchema$1 = z.record(z.string(), JSONValueSchema$1);\n\t/**\n\t* A progress token, used to associate progress notifications with the original request.\n\t*/\n\tconst ProgressTokenSchema$1 = z.union([z.string(), z.number().int()]);\n\t/**\n\t* An opaque token used to represent a cursor for pagination.\n\t*/\n\tconst CursorSchema$1 = z.string();\n\t/**\n\t* A uniquely identifying ID for a request in JSON-RPC.\n\t*/\n\tconst RequestIdSchema$1 = z.union([z.string(), z.number().int()]);\n\t/**\n\t* The sender or recipient of messages and data in a conversation.\n\t*/\n\tconst RoleSchema$1 = z.enum([\"user\", \"assistant\"]);\n\t/**\n\t* The severity of a log message.\n\t*/\n\tconst LoggingLevelSchema$1 = z.enum([\n\t\t\"debug\",\n\t\t\"info\",\n\t\t\"notice\",\n\t\t\"warning\",\n\t\t\"error\",\n\t\t\"critical\",\n\t\t\"alert\",\n\t\t\"emergency\"\n\t]);\n\t/**\n\t* A Zod schema for validating Base64 strings that is more performant and\n\t* robust for very large inputs than the default regex-based check. It avoids\n\t* stack overflows by using the native `atob` function for validation.\n\t*/\n\tconst Base64Schema = z.string().refine((val) => {\n\t\ttry {\n\t\t\tatob(val);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, { message: \"Invalid Base64 string\" });\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst TaskMetadataSchema$1 = z.object({ ttl: z.number().optional() });\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst RelatedTaskMetadataSchema$1 = z.object({ taskId: z.string() });\n\tconst RequestMetaSchema$1 = z.looseObject({\n\t\tprogressToken: ProgressTokenSchema$1.optional(),\n\t\t\"io.modelcontextprotocol/related-task\": RelatedTaskMetadataSchema$1.optional()\n\t});\n\tconst BaseRequestParamsSchema$1 = z.object({ _meta: RequestMetaSchema$1.optional() });\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst TaskAugmentedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ task: TaskMetadataSchema$1.optional() });\n\tconst NotificationsParamsSchema$1 = z.object({ _meta: RequestMetaSchema$1.optional() });\n\tconst NotificationSchema$1 = z.object({\n\t\tmethod: z.string(),\n\t\tparams: NotificationsParamsSchema$1.loose().optional()\n\t});\n\tconst IconSchema$1 = z.object({\n\t\tsrc: z.string(),\n\t\tmimeType: z.string().optional(),\n\t\tsizes: z.array(z.string()).optional(),\n\t\ttheme: z.enum([\"light\", \"dark\"]).optional()\n\t});\n\tconst IconsSchema$1 = z.object({ icons: z.array(IconSchema$1).optional() });\n\tconst BaseMetadataSchema$1 = z.object({\n\t\tname: z.string(),\n\t\ttitle: z.string().optional()\n\t});\n\tconst ImplementationSchema$1 = BaseMetadataSchema$1.extend({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tversion: z.string(),\n\t\twebsiteUrl: z.string().optional(),\n\t\tdescription: z.string().optional()\n\t});\n\tconst FormElicitationCapabilitySchema = z.intersection(z.object({ applyDefaults: z.boolean().optional() }), JSONObjectSchema$1);\n\tconst ElicitationCapabilitySchema = z.preprocess((value) => {\n\t\tif (value && typeof value === \"object\" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };\n\t\treturn value;\n\t}, z.intersection(z.object({\n\t\tform: FormElicitationCapabilitySchema.optional(),\n\t\turl: JSONObjectSchema$1.optional()\n\t}), JSONObjectSchema$1.optional()));\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst ClientTasksCapabilitySchema$1 = z.looseObject({\n\t\tlist: JSONObjectSchema$1.optional(),\n\t\tcancel: JSONObjectSchema$1.optional(),\n\t\trequests: z.looseObject({\n\t\t\tsampling: z.looseObject({ createMessage: JSONObjectSchema$1.optional() }).optional(),\n\t\t\telicitation: z.looseObject({ create: JSONObjectSchema$1.optional() }).optional()\n\t\t}).optional()\n\t});\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst ServerTasksCapabilitySchema$1 = z.looseObject({\n\t\tlist: JSONObjectSchema$1.optional(),\n\t\tcancel: JSONObjectSchema$1.optional(),\n\t\trequests: z.looseObject({ tools: z.looseObject({ call: JSONObjectSchema$1.optional() }).optional() }).optional()\n\t});\n\tconst ClientCapabilitiesSchema$1 = z.object({\n\t\texperimental: z.record(z.string(), JSONObjectSchema$1).optional(),\n\t\tsampling: z.object({\n\t\t\tcontext: JSONObjectSchema$1.optional(),\n\t\t\ttools: JSONObjectSchema$1.optional()\n\t\t}).optional(),\n\t\telicitation: ElicitationCapabilitySchema.optional(),\n\t\troots: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\ttasks: ClientTasksCapabilitySchema$1.optional(),\n\t\textensions: z.record(z.string(), JSONObjectSchema$1).optional()\n\t});\n\tconst ServerCapabilitiesSchema$1 = z.object({\n\t\texperimental: z.record(z.string(), JSONObjectSchema$1).optional(),\n\t\tlogging: JSONObjectSchema$1.optional(),\n\t\tcompletions: JSONObjectSchema$1.optional(),\n\t\tprompts: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\tresources: z.object({\n\t\t\tsubscribe: z.boolean().optional(),\n\t\t\tlistChanged: z.boolean().optional()\n\t\t}).optional(),\n\t\ttools: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\ttasks: ServerTasksCapabilitySchema$1.optional(),\n\t\textensions: z.record(z.string(), JSONObjectSchema$1).optional()\n\t});\n\tconst ProgressSchema$1 = z.object({\n\t\tprogress: z.number(),\n\t\ttotal: z.optional(z.number()),\n\t\tmessage: z.optional(z.string())\n\t});\n\tconst ProgressNotificationParamsSchema$1 = z.object({\n\t\t...NotificationsParamsSchema$1.shape,\n\t\t...ProgressSchema$1.shape,\n\t\tprogressToken: ProgressTokenSchema$1\n\t});\n\tconst ProgressNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/progress\"),\n\t\tparams: ProgressNotificationParamsSchema$1\n\t});\n\tconst LoggingMessageNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({\n\t\tlevel: LoggingLevelSchema$1,\n\t\tlogger: z.string().optional(),\n\t\tdata: z.unknown()\n\t});\n\tconst LoggingMessageNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/message\"),\n\t\tparams: LoggingMessageNotificationParamsSchema$1\n\t});\n\tconst ResourceContentsSchema$1 = z.object({\n\t\turi: z.string(),\n\t\tmimeType: z.optional(z.string()),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst TextResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ text: z.string() });\n\tconst BlobResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ blob: Base64Schema });\n\tconst AnnotationsSchema$1 = z.object({\n\t\taudience: z.array(RoleSchema$1).optional(),\n\t\tpriority: z.number().min(0).max(1).optional(),\n\t\tlastModified: z.iso.datetime({ offset: true }).optional()\n\t});\n\tconst ResourceSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\turi: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\tmimeType: z.optional(z.string()),\n\t\tsize: z.optional(z.number()),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\tconst ResourceTemplateSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\turiTemplate: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\tmimeType: z.optional(z.string()),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\tconst ResourceListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/resources/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\tconst ResourceUpdatedNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({ uri: z.string() });\n\tconst ResourceUpdatedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/resources/updated\"),\n\t\tparams: ResourceUpdatedNotificationParamsSchema$1\n\t});\n\tconst PromptArgumentSchema$1 = z.object({\n\t\tname: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\trequired: z.optional(z.boolean())\n\t});\n\tconst PromptSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tdescription: z.optional(z.string()),\n\t\targuments: z.optional(z.array(PromptArgumentSchema$1)),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\tconst PromptListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/prompts/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\tconst TextContentSchema$1 = z.object({\n\t\ttype: z.literal(\"text\"),\n\t\ttext: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst ImageContentSchema$1 = z.object({\n\t\ttype: z.literal(\"image\"),\n\t\tdata: Base64Schema,\n\t\tmimeType: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst AudioContentSchema$1 = z.object({\n\t\ttype: z.literal(\"audio\"),\n\t\tdata: Base64Schema,\n\t\tmimeType: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst ToolUseContentSchema$1 = z.object({\n\t\ttype: z.literal(\"tool_use\"),\n\t\tname: z.string(),\n\t\tid: z.string(),\n\t\tinput: z.record(z.string(), z.unknown()),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst EmbeddedResourceSchema$1 = z.object({\n\t\ttype: z.literal(\"resource\"),\n\t\tresource: z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: z.literal(\"resource_link\") });\n\tconst ContentBlockSchema$1 = z.union([\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1,\n\t\tResourceLinkSchema$1,\n\t\tEmbeddedResourceSchema$1\n\t]);\n\tconst PromptMessageSchema$1 = z.object({\n\t\trole: RoleSchema$1,\n\t\tcontent: ContentBlockSchema$1\n\t});\n\tconst ToolAnnotationsSchema$1 = z.object({\n\t\ttitle: z.string().optional(),\n\t\treadOnlyHint: z.boolean().optional(),\n\t\tdestructiveHint: z.boolean().optional(),\n\t\tidempotentHint: z.boolean().optional(),\n\t\topenWorldHint: z.boolean().optional()\n\t});\n\tconst ToolListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/tools/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\tconst ModelHintSchema$1 = z.object({ name: z.string().optional() });\n\tconst ModelPreferencesSchema$1 = z.object({\n\t\thints: z.array(ModelHintSchema$1).optional(),\n\t\tcostPriority: z.number().min(0).max(1).optional(),\n\t\tspeedPriority: z.number().min(0).max(1).optional(),\n\t\tintelligencePriority: z.number().min(0).max(1).optional()\n\t});\n\tconst ToolChoiceSchema$1 = z.object({ mode: z.enum([\n\t\t\"auto\",\n\t\t\"required\",\n\t\t\"none\"\n\t]).optional() });\n\tconst BooleanSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"boolean\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tdefault: z.boolean().optional()\n\t});\n\tconst StringSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminLength: z.number().optional(),\n\t\tmaxLength: z.number().optional(),\n\t\tformat: z.enum([\n\t\t\t\"email\",\n\t\t\t\"uri\",\n\t\t\t\"date\",\n\t\t\t\"date-time\"\n\t\t]).optional(),\n\t\tdefault: z.string().optional()\n\t});\n\tconst NumberSchemaSchema$1 = z.object({\n\t\ttype: z.enum([\"number\", \"integer\"]),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminimum: z.number().optional(),\n\t\tmaximum: z.number().optional(),\n\t\tdefault: z.number().optional()\n\t});\n\tconst UntitledSingleSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tenum: z.array(z.string()),\n\t\tdefault: z.string().optional()\n\t});\n\tconst TitledSingleSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\toneOf: z.array(z.object({\n\t\t\tconst: z.string(),\n\t\t\ttitle: z.string()\n\t\t})),\n\t\tdefault: z.string().optional()\n\t});\n\tconst LegacyTitledEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tenum: z.array(z.string()),\n\t\tenumNames: z.array(z.string()).optional(),\n\t\tdefault: z.string().optional()\n\t});\n\tconst SingleSelectEnumSchemaSchema$1 = z.union([UntitledSingleSelectEnumSchemaSchema$1, TitledSingleSelectEnumSchemaSchema$1]);\n\tconst UntitledMultiSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"array\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminItems: z.number().optional(),\n\t\tmaxItems: z.number().optional(),\n\t\titems: z.object({\n\t\t\ttype: z.literal(\"string\"),\n\t\t\tenum: z.array(z.string())\n\t\t}),\n\t\tdefault: z.array(z.string()).optional()\n\t});\n\tconst TitledMultiSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"array\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminItems: z.number().optional(),\n\t\tmaxItems: z.number().optional(),\n\t\titems: z.object({ anyOf: z.array(z.object({\n\t\t\tconst: z.string(),\n\t\t\ttitle: z.string()\n\t\t})) }),\n\t\tdefault: z.array(z.string()).optional()\n\t});\n\tconst MultiSelectEnumSchemaSchema$1 = z.union([UntitledMultiSelectEnumSchemaSchema$1, TitledMultiSelectEnumSchemaSchema$1]);\n\tconst EnumSchemaSchema$1 = z.union([\n\t\tLegacyTitledEnumSchemaSchema$1,\n\t\tSingleSelectEnumSchemaSchema$1,\n\t\tMultiSelectEnumSchemaSchema$1\n\t]);\n\tconst PrimitiveSchemaDefinitionSchema$1 = z.union([\n\t\tEnumSchemaSchema$1,\n\t\tBooleanSchemaSchema$1,\n\t\tStringSchemaSchema$1,\n\t\tNumberSchemaSchema$1\n\t]);\n\tconst ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tmode: z.literal(\"form\").optional(),\n\t\tmessage: z.string(),\n\t\trequestedSchema: z.object({\n\t\t\ttype: z.literal(\"object\"),\n\t\t\tproperties: z.record(z.string(), PrimitiveSchemaDefinitionSchema$1),\n\t\t\trequired: z.array(z.string()).optional()\n\t\t}).catchall(z.unknown())\n\t});\n\tconst ResourceTemplateReferenceSchema$1 = z.object({\n\t\ttype: z.literal(\"ref/resource\"),\n\t\turi: z.string()\n\t});\n\tconst PromptReferenceSchema$1 = z.object({\n\t\ttype: z.literal(\"ref/prompt\"),\n\t\tname: z.string()\n\t});\n\tconst RootSchema$1 = z.object({\n\t\turi: z.string().startsWith(\"file://\"),\n\t\tname: z.string().optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst sharedClientCapabilityShape = ClientCapabilitiesSchema$1.shape;\n\tconst ClientCapabilities2026Schema = z.object({\n\t\texperimental: sharedClientCapabilityShape.experimental,\n\t\tsampling: sharedClientCapabilityShape.sampling,\n\t\telicitation: sharedClientCapabilityShape.elicitation,\n\t\troots: sharedClientCapabilityShape.roots,\n\t\textensions: sharedClientCapabilityShape.extensions\n\t});\n\tconst sharedServerCapabilityShape = ServerCapabilitiesSchema$1.shape;\n\tconst ServerCapabilities2026Schema = z.object({\n\t\texperimental: sharedServerCapabilityShape.experimental,\n\t\tlogging: sharedServerCapabilityShape.logging,\n\t\tcompletions: sharedServerCapabilityShape.completions,\n\t\tprompts: sharedServerCapabilityShape.prompts,\n\t\tresources: sharedServerCapabilityShape.resources,\n\t\ttools: sharedServerCapabilityShape.tools,\n\t\textensions: sharedServerCapabilityShape.extensions\n\t});\n\t/**\n\t* The per-request `_meta` envelope carried by every request under protocol revision\n\t* 2026-07-28: the protocol version governing the request, the client implementation\n\t* info, and the client's capabilities — declared per request rather than once at\n\t* initialization — plus the optional log-level opt-in.\n\t*\n\t* This schema models the complete envelope on its own (loose: foreign keys\n\t* pass through - the lift extracts exactly the reserved keys, so enforcement\n\t* never sees extension material). Requiredness is enforced per request at\n\t* dispatch time by the 2026-era codec's `checkInboundEnvelope` step.\n\t*/\n\tconst RequestMetaEnvelopeSchema = z.looseObject({\n\t\tprogressToken: ProgressTokenSchema$1.optional(),\n\t\t[PROTOCOL_VERSION_META_KEY]: z.string(),\n\t\t[CLIENT_INFO_META_KEY]: ImplementationSchema$1.optional(),\n\t\t[CLIENT_CAPABILITIES_META_KEY]: ClientCapabilities2026Schema,\n\t\t[LOG_LEVEL_META_KEY]: LoggingLevelSchema$1.optional()\n\t});\n\t/** 2026-era Tool: anchor-exact — no `execution` (deleted vocabulary). */\n\tconst ToolSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tdescription: z.string().optional(),\n\t\tinputSchema: z.looseObject({\n\t\t\t$schema: z.string().optional(),\n\t\t\ttype: z.literal(\"object\")\n\t\t}),\n\t\toutputSchema: z.looseObject({ $schema: z.string().optional() }).optional(),\n\t\tannotations: ToolAnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/** 2026-era ToolResultContent (anchor-exact: `structuredContent?: unknown`). */\n\tconst ToolResultContentSchema$1 = z.object({\n\t\ttype: z.literal(\"tool_result\"),\n\t\ttoolUseId: z.string(),\n\t\tcontent: z.array(ContentBlockSchema$1),\n\t\tstructuredContent: z.unknown().optional(),\n\t\tisError: z.boolean().optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/** 2026-era sampling content union (composes the forked tool-result shape). */\n\tconst SamplingMessageContentBlockSchema$1 = z.union([\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1,\n\t\tToolUseContentSchema$1,\n\t\tToolResultContentSchema$1\n\t]);\n\t/** 2026-era SamplingMessage (anchor-exact: single block or array). */\n\tconst SamplingMessageSchema$1 = z.object({\n\t\trole: RoleSchema$1,\n\t\tcontent: z.union([SamplingMessageContentBlockSchema$1, z.array(SamplingMessageContentBlockSchema$1)]),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/** Open union per the anchor: 'complete' | 'input_required' | string. */\n\tconst ResultTypeSchema = z.string();\n\t/**\n\t* Result `_meta` (anchor `ResultMetaObject`, added by spec PR #3002):\n\t* loose, with the serverInfo key typed when present; the outbound stamp\n\t* is the encode contract's `stampServerInfoMeta` step.\n\t*/\n\tconst ResultMetaSchema = z.looseObject({ [SERVER_INFO_META_KEY]: ImplementationSchema$1.optional().catch(void 0) });\n\tconst wireMeta = ResultMetaSchema.optional();\n\tfunction wireResult(shape) {\n\t\treturn z.looseObject({\n\t\t\t_meta: wireMeta,\n\t\t\tresultType: ResultTypeSchema.default(\"complete\"),\n\t\t\t...shape\n\t\t});\n\t}\n\tconst ResultSchema$1 = wireResult({});\n\tconst PaginatedResultSchema$1 = wireResult({ nextCursor: CursorSchema$1.optional() });\n\tconst CallToolResultSchema$1 = wireResult({\n\t\tcontent: z.array(ContentBlockSchema$1),\n\t\tstructuredContent: z.unknown().optional(),\n\t\tisError: z.boolean().optional()\n\t});\n\tconst ListToolsResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\ttools: z.array(ToolSchema$1),\n\t\tnextCursor: CursorSchema$1.optional()\n\t});\n\tconst ListPromptsResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\tprompts: z.array(PromptSchema$1),\n\t\tnextCursor: CursorSchema$1.optional()\n\t});\n\tconst GetPromptResultSchema$1 = wireResult({\n\t\tdescription: z.string().optional(),\n\t\tmessages: z.array(PromptMessageSchema$1)\n\t});\n\tconst ListResourcesResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\tresources: z.array(ResourceSchema$1),\n\t\tnextCursor: CursorSchema$1.optional()\n\t});\n\tconst ListResourceTemplatesResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\tresourceTemplates: z.array(ResourceTemplateSchema$1),\n\t\tnextCursor: CursorSchema$1.optional()\n\t});\n\tconst ReadResourceResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\tcontents: z.array(z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]))\n\t});\n\tconst CompleteResultSchema$1 = wireResult({ completion: z.object({\n\t\tvalues: z.array(z.string()).max(100),\n\t\ttotal: z.number().int().optional(),\n\t\thasMore: z.boolean().optional()\n\t}).loose() });\n\t/** CacheableResult (SEP-2549): ttlMs and cacheScope REQUIRED per the anchor. */\n\tconst CacheableResultSchema = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"])\n\t});\n\tconst DiscoverResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0).catch(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]).catch(\"private\"),\n\t\tsupportedVersions: z.array(z.string()),\n\t\tcapabilities: ServerCapabilities2026Schema,\n\t\tinstructions: z.string().optional()\n\t});\n\t/** 2026-era CreateMessageRequestParams (anchor-exact: forked SamplingMessage/Tool, no task augmentation). */\n\tconst CreateMessageRequestParamsSchema$1 = z.object({\n\t\tmessages: z.array(SamplingMessageSchema$1),\n\t\tmodelPreferences: ModelPreferencesSchema$1.optional(),\n\t\tsystemPrompt: z.string().optional(),\n\t\tincludeContext: z.enum([\n\t\t\t\"none\",\n\t\t\t\"thisServer\",\n\t\t\t\"allServers\"\n\t\t]).optional(),\n\t\ttemperature: z.number().optional(),\n\t\tmaxTokens: z.number().int(),\n\t\tstopSequences: z.array(z.string()).optional(),\n\t\tmetadata: JSONObjectSchema$1.optional(),\n\t\ttools: z.array(ToolSchema$1).optional(),\n\t\ttoolChoice: ToolChoiceSchema$1.optional()\n\t});\n\t/** 2026-era embedded sampling request (de-JSON-RPC'd). */\n\tconst CreateMessageRequestSchema$1 = z.object({\n\t\tmethod: z.literal(\"sampling/createMessage\"),\n\t\tparams: CreateMessageRequestParamsSchema$1\n\t});\n\t/**\n\t* 2026-era embedded roots listing request (de-JSON-RPC'd). Embedded input\n\t* requests do NOT carry the per-request `_meta` envelope on this revision —\n\t* the anchor declares a bare optional `_meta` on `params`.\n\t*/\n\tconst ListRootsRequestSchema$1 = z.object({\n\t\tmethod: z.literal(\"roots/list\"),\n\t\tparams: z.object({ _meta: z.record(z.string(), z.unknown()).optional() }).optional()\n\t});\n\t/** 2026-era embedded sampling response (anchor-exact: extends the forked SamplingMessage). */\n\tconst CreateMessageResultSchema$1 = z.object({\n\t\t...SamplingMessageSchema$1.shape,\n\t\tmodel: z.string(),\n\t\tstopReason: z.string().optional()\n\t});\n\t/** 2026-era embedded roots listing response (anchor-exact: bare `roots` array). */\n\tconst ListRootsResultSchema$1 = z.object({ roots: z.array(RootSchema$1) });\n\t/** 2026-era embedded elicitation response (anchor-exact: bare result, restricted content value types). */\n\tconst ElicitResultSchema$1 = z.object({\n\t\taction: z.enum([\n\t\t\t\"accept\",\n\t\t\t\"decline\",\n\t\t\t\"cancel\"\n\t\t]),\n\t\tcontent: z.record(z.string(), z.union([\n\t\t\tz.string(),\n\t\t\tz.number(),\n\t\t\tz.boolean(),\n\t\t\tz.array(z.string())\n\t\t])).optional()\n\t});\n\t/**\n\t* 2026-era URL-mode elicitation params (anchor-exact fork): the draft removed\n\t* `elicitationId` (and the `notifications/elicitation/complete` channel it\n\t* keyed) — the shared schema keeps the field because it is required on the\n\t* frozen 2025-11-25 revision.\n\t*/\n\tconst ElicitRequestURLParamsSchema$1 = z.object({\n\t\tmode: z.literal(\"url\"),\n\t\tmessage: z.string(),\n\t\turl: z.string().url()\n\t});\n\t/** 2026-era elicitation params (form mode is revision-identical; URL mode is the fork above). */\n\tconst ElicitRequestParamsSchema$1 = z.union([ElicitRequestFormParamsSchema$1, ElicitRequestURLParamsSchema$1]);\n\t/** 2026-era embedded elicitation request (de-JSON-RPC'd; see the URL-mode fork above). */\n\tconst ElicitRequestSchema$1 = z.object({\n\t\tmethod: z.literal(\"elicitation/create\"),\n\t\tparams: ElicitRequestParamsSchema$1\n\t});\n\t/** A single embedded input request (one of the three demoted server→client requests). */\n\tconst InputRequestSchema = z.union([\n\t\tCreateMessageRequestSchema$1,\n\t\tListRootsRequestSchema$1,\n\t\tElicitRequestSchema$1\n\t]);\n\t/** A single embedded input response — the BARE result union (never a `{method, result}` wrapper). */\n\tconst InputResponseSchema = z.union([\n\t\tCreateMessageResultSchema$1,\n\t\tListRootsResultSchema$1,\n\t\tElicitResultSchema$1\n\t]);\n\t/** Map of embedded input requests, keyed by server-assigned identifiers. */\n\tconst InputRequestsSchema = z.record(z.string(), InputRequestSchema);\n\t/** Map of embedded input responses, keyed by the corresponding request identifiers. */\n\tconst InputResponsesSchema = z.record(z.string(), InputResponseSchema);\n\t/**\n\t* The wire InputRequiredResult: `resultType: 'input_required'` plus at least\n\t* one of `inputRequests` / `requestState` (the at-least-one rule is enforced\n\t* at the server seam, not by this parse shape).\n\t*/\n\tconst InputRequiredResultSchema = wireResult({\n\t\tinputRequests: InputRequestsSchema.optional(),\n\t\trequestState: z.string().optional()\n\t});\n\t/** The retry-channel members carried by client-initiated requests on this revision. */\n\tconst retryParamsShape = {\n\t\tinputResponses: InputResponsesSchema.optional(),\n\t\trequestState: z.string().optional()\n\t};\n\t/** Anchor InputResponseRequestParams: the retry channel on top of the required request `_meta` envelope. */\n\tconst InputResponseRequestParamsSchema = z.object({\n\t\t_meta: RequestMetaEnvelopeSchema,\n\t\t...retryParamsShape\n\t});\n\t/** Post-lift request `_meta` (progressToken + extension keys; loose). */\n\tconst DispatchRequestMetaSchema = z.looseObject({ progressToken: ProgressTokenSchema$1.optional() });\n\tfunction wireRequest(method, paramsShape) {\n\t\treturn z.object({\n\t\t\tmethod: z.literal(method),\n\t\t\tparams: z.object({\n\t\t\t\t_meta: RequestMetaEnvelopeSchema,\n\t\t\t\t...paramsShape\n\t\t\t})\n\t\t});\n\t}\n\tfunction dispatchRequest(method, paramsShape) {\n\t\treturn z.object({\n\t\t\tmethod: z.literal(method),\n\t\t\tparams: z.object({\n\t\t\t\t_meta: DispatchRequestMetaSchema.optional(),\n\t\t\t\t...paramsShape\n\t\t\t}).optional()\n\t\t});\n\t}\n\tconst callToolParamsShape = {\n\t\tname: z.string(),\n\t\targuments: z.record(z.string(), z.unknown()).optional(),\n\t\t...retryParamsShape\n\t};\n\tconst paginatedParamsShape = { cursor: CursorSchema$1.optional() };\n\tconst CallToolRequestSchema$1 = wireRequest(\"tools/call\", callToolParamsShape);\n\tconst ListToolsRequestSchema$1 = wireRequest(\"tools/list\", paginatedParamsShape);\n\tconst ListPromptsRequestSchema$1 = wireRequest(\"prompts/list\", paginatedParamsShape);\n\tconst GetPromptRequestSchema$1 = wireRequest(\"prompts/get\", {\n\t\tname: z.string(),\n\t\targuments: z.record(z.string(), z.string()).optional(),\n\t\t...retryParamsShape\n\t});\n\tconst ListResourcesRequestSchema$1 = wireRequest(\"resources/list\", paginatedParamsShape);\n\tconst ListResourceTemplatesRequestSchema$1 = wireRequest(\"resources/templates/list\", paginatedParamsShape);\n\tconst ReadResourceRequestSchema$1 = wireRequest(\"resources/read\", {\n\t\turi: z.string(),\n\t\t...retryParamsShape\n\t});\n\tconst completeParamsShape = {\n\t\tref: z.union([PromptReferenceSchema$1, ResourceTemplateReferenceSchema$1]),\n\t\targument: z.object({\n\t\t\tname: z.string(),\n\t\t\tvalue: z.string()\n\t\t}),\n\t\tcontext: z.object({ arguments: z.record(z.string(), z.string()).optional() }).optional()\n\t};\n\tconst CompleteRequestSchema$1 = wireRequest(\"completion/complete\", completeParamsShape);\n\tconst DiscoverRequestSchema$1 = wireRequest(\"server/discover\", {});\n\t/** Anchor SubscriptionFilter (2026-only). */\n\tconst SubscriptionFilterSchema$1 = z.object({\n\t\ttoolsListChanged: z.boolean().optional(),\n\t\tpromptsListChanged: z.boolean().optional(),\n\t\tresourcesListChanged: z.boolean().optional(),\n\t\tresourceSubscriptions: z.array(z.string()).optional()\n\t});\n\tconst subscriptionsListenParamsShape = { notifications: SubscriptionFilterSchema$1 };\n\tconst SubscriptionsListenRequestSchema$1 = wireRequest(\"subscriptions/listen\", subscriptionsListenParamsShape);\n\t/**\n\t* Anchor SubscriptionsListenResultMeta — required subscriptionId stamp on\n\t* the graceful-close result. Extends `ResultMetaObject` since spec PR\n\t* #3002 (composed, so the serverInfo key and its leniency stay single-sourced).\n\t*/\n\tconst SubscriptionsListenResultMetaSchema$1 = ResultMetaSchema.extend({ \"io.modelcontextprotocol/subscriptionId\": RequestIdSchema$1 });\n\t/**\n\t* Anchor SubscriptionsListenResult (2026-only). The empty `subscriptions/listen`\n\t* response signalling that the subscription has ended gracefully (server\n\t* shutdown). An abrupt transport close carries no response — the client treats\n\t* stream-close-without-result as a disconnect.\n\t*/\n\tconst SubscriptionsListenResultSchema$1 = z.looseObject({\n\t\t_meta: SubscriptionsListenResultMetaSchema$1,\n\t\tresultType: ResultTypeSchema.default(\"complete\")\n\t});\n\t/** Dispatch (post-lift) request schemas, keyed by method — registry-internal. */\n\tconst dispatchRequestSchemas = {\n\t\t\"tools/call\": dispatchRequest(\"tools/call\", callToolParamsShape),\n\t\t\"tools/list\": dispatchRequest(\"tools/list\", paginatedParamsShape),\n\t\t\"prompts/get\": dispatchRequest(\"prompts/get\", {\n\t\t\tname: z.string(),\n\t\t\targuments: z.record(z.string(), z.string()).optional()\n\t\t}),\n\t\t\"prompts/list\": dispatchRequest(\"prompts/list\", paginatedParamsShape),\n\t\t\"resources/list\": dispatchRequest(\"resources/list\", paginatedParamsShape),\n\t\t\"resources/templates/list\": dispatchRequest(\"resources/templates/list\", paginatedParamsShape),\n\t\t\"resources/read\": dispatchRequest(\"resources/read\", { uri: z.string() }),\n\t\t\"completion/complete\": dispatchRequest(\"completion/complete\", completeParamsShape),\n\t\t\"server/discover\": dispatchRequest(\"server/discover\", {}),\n\t\t\"subscriptions/listen\": dispatchRequest(\"subscriptions/listen\", subscriptionsListenParamsShape)\n\t};\n\t/** Dispatch (post-lift) result schemas, keyed by method — what the funnel\n\t* validates AFTER `decodeResult` consumed `resultType`. */\n\tfunction liftedResult(shape) {\n\t\treturn z.looseObject({\n\t\t\t_meta: wireMeta,\n\t\t\t...shape\n\t\t});\n\t}\n\tconst dispatchResultSchemas = {\n\t\t\"tools/call\": liftedResult({\n\t\t\tcontent: z.array(ContentBlockSchema$1),\n\t\t\tstructuredContent: z.unknown().optional(),\n\t\t\tisError: z.boolean().optional()\n\t\t}),\n\t\t\"tools/list\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\ttools: z.array(ToolSchema$1),\n\t\t\tnextCursor: CursorSchema$1.optional()\n\t\t}),\n\t\t\"prompts/get\": liftedResult({\n\t\t\tdescription: z.string().optional(),\n\t\t\tmessages: z.array(PromptMessageSchema$1)\n\t\t}),\n\t\t\"prompts/list\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\tprompts: z.array(PromptSchema$1),\n\t\t\tnextCursor: CursorSchema$1.optional()\n\t\t}),\n\t\t\"resources/list\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\tresources: z.array(ResourceSchema$1),\n\t\t\tnextCursor: CursorSchema$1.optional()\n\t\t}),\n\t\t\"resources/templates/list\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\tresourceTemplates: z.array(ResourceTemplateSchema$1),\n\t\t\tnextCursor: CursorSchema$1.optional()\n\t\t}),\n\t\t\"resources/read\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\tcontents: z.array(z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]))\n\t\t}),\n\t\t\"completion/complete\": liftedResult({ completion: z.object({\n\t\t\tvalues: z.array(z.string()).max(100),\n\t\t\ttotal: z.number().int().optional(),\n\t\t\thasMore: z.boolean().optional()\n\t\t}).loose() }),\n\t\t\"server/discover\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0).catch(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]).catch(\"private\"),\n\t\t\tsupportedVersions: z.array(z.string()),\n\t\t\tcapabilities: ServerCapabilities2026Schema,\n\t\t\tinstructions: z.string().optional()\n\t\t}),\n\t\t\"subscriptions/listen\": liftedResult({})\n\t};\n\t/**\n\t* Notification `_meta` (anchor `NotificationMetaObject`): loose, with the\n\t* subscriptions/listen demux key typed when present. Only the anchor-exact\n\t* SHAPE is modeled here — listen delivery itself (filter gating, demux,\n\t* teardown) is #14 scope and not implemented by this module.\n\t*/\n\tconst NotificationMetaSchema = z.looseObject({ \"io.modelcontextprotocol/subscriptionId\": RequestIdSchema$1.optional() });\n\t/** Anchor SubscriptionsAcknowledgedNotification (2026-only). */\n\tconst SubscriptionsAcknowledgedNotificationSchema$1 = z.object({\n\t\tmethod: z.literal(\"notifications/subscriptions/acknowledged\"),\n\t\tparams: z.object({\n\t\t\t_meta: NotificationMetaSchema.optional(),\n\t\t\tnotifications: SubscriptionFilterSchema$1\n\t\t})\n\t});\n\t/**\n\t* 2026-era `notifications/cancelled` params (anchor-exact fork): `requestId`\n\t* is REQUIRED on this revision — the shared schema keeps it optional because\n\t* the frozen 2025-11-25 shape declares it optional (task cancellation goes\n\t* through `tasks/cancel` there). Requiredness is bare because no 2025-era\n\t* traffic touches this module.\n\t*/\n\tconst CancelledNotificationParamsSchema$1 = z.object({\n\t\t_meta: NotificationMetaSchema.optional(),\n\t\trequestId: RequestIdSchema$1,\n\t\treason: z.string().optional()\n\t});\n\t/** 2026-era `notifications/cancelled` (see the params fork above). */\n\tconst CancelledNotificationSchema$1 = z.object({\n\t\tmethod: z.literal(\"notifications/cancelled\"),\n\t\tparams: CancelledNotificationParamsSchema$1\n\t});\n\tconst notificationSchemas2026 = {\n\t\t\"notifications/cancelled\": CancelledNotificationSchema$1,\n\t\t\"notifications/progress\": ProgressNotificationSchema$1,\n\t\t\"notifications/message\": LoggingMessageNotificationSchema$1,\n\t\t\"notifications/resources/updated\": ResourceUpdatedNotificationSchema$1,\n\t\t\"notifications/resources/list_changed\": ResourceListChangedNotificationSchema$1,\n\t\t\"notifications/tools/list_changed\": ToolListChangedNotificationSchema$1,\n\t\t\"notifications/prompts/list_changed\": PromptListChangedNotificationSchema$1,\n\t\t\"notifications/subscriptions/acknowledged\": SubscriptionsAcknowledgedNotificationSchema$1\n\t};\n\tconst wireResultResponse = (result) => z.object({\n\t\tjsonrpc: z.literal(\"2.0\"),\n\t\tid: z.union([z.string(), z.number().int()]),\n\t\tresult\n\t}).strict();\n\treturn {\n\t\tJSONValueSchema: JSONValueSchema$1,\n\t\tJSONObjectSchema: JSONObjectSchema$1,\n\t\tProgressTokenSchema: ProgressTokenSchema$1,\n\t\tCursorSchema: CursorSchema$1,\n\t\tRequestIdSchema: RequestIdSchema$1,\n\t\tRoleSchema: RoleSchema$1,\n\t\tLoggingLevelSchema: LoggingLevelSchema$1,\n\t\tTaskMetadataSchema: TaskMetadataSchema$1,\n\t\tRelatedTaskMetadataSchema: RelatedTaskMetadataSchema$1,\n\t\tRequestMetaSchema: RequestMetaSchema$1,\n\t\tBaseRequestParamsSchema: BaseRequestParamsSchema$1,\n\t\tTaskAugmentedRequestParamsSchema: TaskAugmentedRequestParamsSchema$1,\n\t\tNotificationsParamsSchema: NotificationsParamsSchema$1,\n\t\tNotificationSchema: NotificationSchema$1,\n\t\tIconSchema: IconSchema$1,\n\t\tIconsSchema: IconsSchema$1,\n\t\tBaseMetadataSchema: BaseMetadataSchema$1,\n\t\tImplementationSchema: ImplementationSchema$1,\n\t\tClientTasksCapabilitySchema: ClientTasksCapabilitySchema$1,\n\t\tServerTasksCapabilitySchema: ServerTasksCapabilitySchema$1,\n\t\tClientCapabilitiesSchema: ClientCapabilitiesSchema$1,\n\t\tServerCapabilitiesSchema: ServerCapabilitiesSchema$1,\n\t\tProgressSchema: ProgressSchema$1,\n\t\tProgressNotificationParamsSchema: ProgressNotificationParamsSchema$1,\n\t\tProgressNotificationSchema: ProgressNotificationSchema$1,\n\t\tLoggingMessageNotificationParamsSchema: LoggingMessageNotificationParamsSchema$1,\n\t\tLoggingMessageNotificationSchema: LoggingMessageNotificationSchema$1,\n\t\tResourceContentsSchema: ResourceContentsSchema$1,\n\t\tTextResourceContentsSchema: TextResourceContentsSchema$1,\n\t\tBlobResourceContentsSchema: BlobResourceContentsSchema$1,\n\t\tAnnotationsSchema: AnnotationsSchema$1,\n\t\tResourceSchema: ResourceSchema$1,\n\t\tResourceTemplateSchema: ResourceTemplateSchema$1,\n\t\tResourceListChangedNotificationSchema: ResourceListChangedNotificationSchema$1,\n\t\tResourceUpdatedNotificationParamsSchema: ResourceUpdatedNotificationParamsSchema$1,\n\t\tResourceUpdatedNotificationSchema: ResourceUpdatedNotificationSchema$1,\n\t\tPromptArgumentSchema: PromptArgumentSchema$1,\n\t\tPromptSchema: PromptSchema$1,\n\t\tPromptListChangedNotificationSchema: PromptListChangedNotificationSchema$1,\n\t\tTextContentSchema: TextContentSchema$1,\n\t\tImageContentSchema: ImageContentSchema$1,\n\t\tAudioContentSchema: AudioContentSchema$1,\n\t\tToolUseContentSchema: ToolUseContentSchema$1,\n\t\tEmbeddedResourceSchema: EmbeddedResourceSchema$1,\n\t\tResourceLinkSchema: ResourceLinkSchema$1,\n\t\tContentBlockSchema: ContentBlockSchema$1,\n\t\tPromptMessageSchema: PromptMessageSchema$1,\n\t\tToolAnnotationsSchema: ToolAnnotationsSchema$1,\n\t\tToolListChangedNotificationSchema: ToolListChangedNotificationSchema$1,\n\t\tModelHintSchema: ModelHintSchema$1,\n\t\tModelPreferencesSchema: ModelPreferencesSchema$1,\n\t\tToolChoiceSchema: ToolChoiceSchema$1,\n\t\tBooleanSchemaSchema: BooleanSchemaSchema$1,\n\t\tStringSchemaSchema: StringSchemaSchema$1,\n\t\tNumberSchemaSchema: NumberSchemaSchema$1,\n\t\tUntitledSingleSelectEnumSchemaSchema: UntitledSingleSelectEnumSchemaSchema$1,\n\t\tTitledSingleSelectEnumSchemaSchema: TitledSingleSelectEnumSchemaSchema$1,\n\t\tLegacyTitledEnumSchemaSchema: LegacyTitledEnumSchemaSchema$1,\n\t\tSingleSelectEnumSchemaSchema: SingleSelectEnumSchemaSchema$1,\n\t\tUntitledMultiSelectEnumSchemaSchema: UntitledMultiSelectEnumSchemaSchema$1,\n\t\tTitledMultiSelectEnumSchemaSchema: TitledMultiSelectEnumSchemaSchema$1,\n\t\tMultiSelectEnumSchemaSchema: MultiSelectEnumSchemaSchema$1,\n\t\tEnumSchemaSchema: EnumSchemaSchema$1,\n\t\tPrimitiveSchemaDefinitionSchema: PrimitiveSchemaDefinitionSchema$1,\n\t\tElicitRequestFormParamsSchema: ElicitRequestFormParamsSchema$1,\n\t\tResourceTemplateReferenceSchema: ResourceTemplateReferenceSchema$1,\n\t\tPromptReferenceSchema: PromptReferenceSchema$1,\n\t\tRootSchema: RootSchema$1,\n\t\tClientCapabilities2026Schema,\n\t\tServerCapabilities2026Schema,\n\t\tRequestMetaEnvelopeSchema,\n\t\tToolSchema: ToolSchema$1,\n\t\tToolResultContentSchema: ToolResultContentSchema$1,\n\t\tSamplingMessageContentBlockSchema: SamplingMessageContentBlockSchema$1,\n\t\tSamplingMessageSchema: SamplingMessageSchema$1,\n\t\tResultTypeSchema,\n\t\tResultMetaSchema,\n\t\tResultSchema: ResultSchema$1,\n\t\tPaginatedResultSchema: PaginatedResultSchema$1,\n\t\tCallToolResultSchema: CallToolResultSchema$1,\n\t\tListToolsResultSchema: ListToolsResultSchema$1,\n\t\tListPromptsResultSchema: ListPromptsResultSchema$1,\n\t\tGetPromptResultSchema: GetPromptResultSchema$1,\n\t\tListResourcesResultSchema: ListResourcesResultSchema$1,\n\t\tListResourceTemplatesResultSchema: ListResourceTemplatesResultSchema$1,\n\t\tReadResourceResultSchema: ReadResourceResultSchema$1,\n\t\tCompleteResultSchema: CompleteResultSchema$1,\n\t\tCacheableResultSchema,\n\t\tDiscoverResultSchema: DiscoverResultSchema$1,\n\t\tCreateMessageRequestParamsSchema: CreateMessageRequestParamsSchema$1,\n\t\tCreateMessageRequestSchema: CreateMessageRequestSchema$1,\n\t\tListRootsRequestSchema: ListRootsRequestSchema$1,\n\t\tCreateMessageResultSchema: CreateMessageResultSchema$1,\n\t\tListRootsResultSchema: ListRootsResultSchema$1,\n\t\tElicitResultSchema: ElicitResultSchema$1,\n\t\tElicitRequestURLParamsSchema: ElicitRequestURLParamsSchema$1,\n\t\tElicitRequestParamsSchema: ElicitRequestParamsSchema$1,\n\t\tElicitRequestSchema: ElicitRequestSchema$1,\n\t\tInputRequestSchema,\n\t\tInputResponseSchema,\n\t\tInputRequestsSchema,\n\t\tInputResponsesSchema,\n\t\tInputRequiredResultSchema,\n\t\tInputResponseRequestParamsSchema,\n\t\tCallToolRequestSchema: CallToolRequestSchema$1,\n\t\tListToolsRequestSchema: ListToolsRequestSchema$1,\n\t\tListPromptsRequestSchema: ListPromptsRequestSchema$1,\n\t\tGetPromptRequestSchema: GetPromptRequestSchema$1,\n\t\tListResourcesRequestSchema: ListResourcesRequestSchema$1,\n\t\tListResourceTemplatesRequestSchema: ListResourceTemplatesRequestSchema$1,\n\t\tReadResourceRequestSchema: ReadResourceRequestSchema$1,\n\t\tCompleteRequestSchema: CompleteRequestSchema$1,\n\t\tDiscoverRequestSchema: DiscoverRequestSchema$1,\n\t\tSubscriptionFilterSchema: SubscriptionFilterSchema$1,\n\t\tSubscriptionsListenRequestSchema: SubscriptionsListenRequestSchema$1,\n\t\tSubscriptionsListenResultMetaSchema: SubscriptionsListenResultMetaSchema$1,\n\t\tSubscriptionsListenResultSchema: SubscriptionsListenResultSchema$1,\n\t\tdispatchRequestSchemas,\n\t\tdispatchResultSchemas,\n\t\tNotificationMetaSchema,\n\t\tSubscriptionsAcknowledgedNotificationSchema: SubscriptionsAcknowledgedNotificationSchema$1,\n\t\tCancelledNotificationParamsSchema: CancelledNotificationParamsSchema$1,\n\t\tCancelledNotificationSchema: CancelledNotificationSchema$1,\n\t\tnotificationSchemas2026,\n\t\tJSONRPCResultResponseSchema: wireResultResponse(ResultSchema$1),\n\t\tCallToolResultResponseSchema: wireResultResponse(z.union([CallToolResultSchema$1, InputRequiredResultSchema])),\n\t\tListToolsResultResponseSchema: wireResultResponse(ListToolsResultSchema$1),\n\t\tListPromptsResultResponseSchema: wireResultResponse(ListPromptsResultSchema$1),\n\t\tGetPromptResultResponseSchema: wireResultResponse(z.union([GetPromptResultSchema$1, InputRequiredResultSchema])),\n\t\tListResourcesResultResponseSchema: wireResultResponse(ListResourcesResultSchema$1),\n\t\tListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),\n\t\tReadResourceResultResponseSchema: wireResultResponse(z.union([ReadResourceResultSchema$1, InputRequiredResultSchema])),\n\t\tCompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),\n\t\tDiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)\n\t};\n}\nlet memo;\n/**\n* Builds the era wire-schema set on first call and returns the same object\n* thereafter. Module evaluation stays construction-free so importing the\n* era codec/registry costs nothing until the first validation actually\n* needs a schema; the registry, the codec, and the eager `schemas.ts`\n* shim all pull through this memo, so reference identity holds across\n* every consumer.\n*/\nfunction buildSchemas2026() {\n\treturn memo ??= build();\n}\n\n//#endregion\n//#region ../core-internal/src/shared/resultCacheHints.ts\n/**\n* The operations whose results are cacheable on the 2026-07-28 revision (the\n* `CacheableResult` extenders). This list is closed: no other operation's\n* result ever receives cache fields from the SDK.\n*/\nconst CACHEABLE_RESULT_METHODS = [\n\t\"tools/list\",\n\t\"prompts/list\",\n\t\"resources/list\",\n\t\"resources/templates/list\",\n\t\"resources/read\",\n\t\"server/discover\"\n];\n/** Whether the given method's result is cacheable on the 2026-07-28 revision. */\nfunction isCacheableResultMethod(method) {\n\treturn CACHEABLE_RESULT_METHODS.includes(method);\n}\n/**\n* The symbol-keyed carrier for a configured cache hint on a result object.\n* Symbol properties are invisible to JSON serialization, so the carrier can be\n* attached era-blind: only the 2026-era encode seam consumes it.\n*/\nconst RESULT_CACHE_HINT_FALLBACK = Symbol(\"modelcontextprotocol.resultCacheHintFallback\");\n/**\n* Attaches a configured cache hint to a result as the encode-time fallback.\n* Returns the result unchanged when there is nothing to attach. When a more\n* specific hint is already attached, the two hints are combined per field\n* (most-specific-author-wins for each of `ttlMs` and `cacheScope`): the\n* per-registration hint attached by the feature layer keeps every field it\n* sets, and the server-level per-operation hint only fills the fields the\n* more specific hint leaves unset.\n*/\nfunction attachCacheHintFallback(result, hint) {\n\tif (hint === void 0) return result;\n\tconst attached = result[RESULT_CACHE_HINT_FALLBACK];\n\tif (attached === void 0) return {\n\t\t...result,\n\t\t[RESULT_CACHE_HINT_FALLBACK]: hint\n\t};\n\tconst merged = {};\n\tconst ttlMs = attached.ttlMs ?? hint.ttlMs;\n\tif (ttlMs !== void 0) merged.ttlMs = ttlMs;\n\tconst cacheScope = attached.cacheScope ?? hint.cacheScope;\n\tif (cacheScope !== void 0) merged.cacheScope = cacheScope;\n\treturn {\n\t\t...result,\n\t\t[RESULT_CACHE_HINT_FALLBACK]: merged\n\t};\n}\n/** Reads the configured cache-hint fallback attached to a result, if any. */\nfunction cacheHintFallbackOf(result) {\n\treturn result[RESULT_CACHE_HINT_FALLBACK];\n}\n/**\n* Whether a value is a valid `ttlMs`: a non-negative safe integer. Safe\n* integers are required because the wire schemas validate `ttlMs` as an\n* integer within `Number.MIN_SAFE_INTEGER`/`Number.MAX_SAFE_INTEGER`; a value\n* outside that range is treated as invalid here so it falls through to the\n* next author instead of being emitted and rejected downstream.\n*/\nfunction isValidCacheTtlMs(value) {\n\treturn typeof value === \"number\" && Number.isSafeInteger(value) && value >= 0;\n}\n/** Whether a value is a valid `cacheScope`. */\nfunction isValidCacheScope(value) {\n\treturn value === \"public\" || value === \"private\";\n}\n/**\n* Validates a configured cache hint at configuration time. Throws a\n* `RangeError` naming the offending field, so misconfiguration fails at\n* startup/registration rather than silently degrading at encode time.\n*/\nfunction assertValidCacheHint(hint, context) {\n\tif (hint.ttlMs !== void 0 && !isValidCacheTtlMs(hint.ttlMs)) throw new RangeError(`Invalid cache hint for ${context}: ttlMs must be a non-negative safe integer (got ${String(hint.ttlMs)})`);\n\tif (hint.cacheScope !== void 0 && !isValidCacheScope(hint.cacheScope)) throw new RangeError(`Invalid cache hint for ${context}: cacheScope must be 'public' or 'private' (got ${String(hint.cacheScope)})`);\n}\n\n//#endregion\n//#region ../core-internal/src/types/enums.ts\n/**\n* Error codes for protocol errors that cross the wire as JSON-RPC error responses.\n* These follow the JSON-RPC specification and MCP-specific extensions.\n*/\nlet ProtocolErrorCode = /* @__PURE__ */ function(ProtocolErrorCode$1) {\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"ParseError\"] = -32700] = \"ParseError\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"InvalidRequest\"] = -32600] = \"InvalidRequest\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"MethodNotFound\"] = -32601] = \"MethodNotFound\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"InvalidParams\"] = -32602] = \"InvalidParams\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"InternalError\"] = -32603] = \"InternalError\";\n\t/**\n\t* Resource not found.\n\t*\n\t* Receive-tolerated only: the SDK never EMITS `-32002` — `resources/read`\n\t* misses answer `-32602` (Invalid Params) on every protocol revision per\n\t* the 2026-07-28 spec MUST, and a handler-thrown `-32002` is mapped to\n\t* `-32602` at the era encode seam. The member stays importable so clients\n\t* can recognise `-32002` from peers built on earlier SDK releases (the\n\t* spec's \"clients SHOULD also accept `-32002`\" backwards-compatibility\n\t* clause). Throw `ResourceNotFoundError` instead.\n\t*/\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"ResourceNotFound\"] = -32002] = \"ResourceNotFound\";\n\t/**\n\t* Processing the request requires a capability the client did not declare\n\t* in the request's `clientCapabilities` (protocol revision 2026-07-28).\n\t*/\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"MissingRequiredClientCapability\"] = -32021] = \"MissingRequiredClientCapability\";\n\t/**\n\t* The request's protocol version is unknown to the server or unsupported\n\t* by it (protocol revision 2026-07-28).\n\t*/\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"UnsupportedProtocolVersion\"] = -32022] = \"UnsupportedProtocolVersion\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"UrlElicitationRequired\"] = -32042] = \"UrlElicitationRequired\";\n\treturn ProtocolErrorCode$1;\n}({});\n\n//#endregion\n//#region ../core-internal/src/types/errors.ts\n/**\n* Protocol errors are JSON-RPC errors that cross the wire as error responses.\n* They use numeric error codes from the {@linkcode ProtocolErrorCode} enum.\n*\n* `instanceof` on this class (and its subclasses) is brand-matched, so it works\n* across separately bundled copies of the SDK — e.g. an error constructed by\n* `@modelcontextprotocol/client` matches the class re-exported by\n* `@modelcontextprotocol/server` in the same process.\n*/\nvar ProtocolError = class ProtocolError extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.ProtocolError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(code, message, data) {\n\t\tsuper(message);\n\t\tthis.code = code;\n\t\tthis.data = data;\n\t\tthis.name = \"ProtocolError\";\n\t\tstampErrorBrands(this, new.target);\n\t}\n\t/**\n\t* Factory method to create the appropriate error type based on the error code and data\n\t*/\n\tstatic fromError(code, message, data) {\n\t\tif (code === ProtocolErrorCode.UrlElicitationRequired && data) {\n\t\t\tconst errorData = data;\n\t\t\tif (errorData.elicitations) return new UrlElicitationRequiredError(errorData.elicitations, message);\n\t\t}\n\t\tif (code === ProtocolErrorCode.UnsupportedProtocolVersion && data) {\n\t\t\tconst errorData = data;\n\t\t\tif (Array.isArray(errorData.supported) && typeof errorData.requested === \"string\") return new UnsupportedProtocolVersionError({\n\t\t\t\tsupported: errorData.supported,\n\t\t\t\trequested: errorData.requested\n\t\t\t}, message);\n\t\t}\n\t\tif (code === ProtocolErrorCode.InvalidParams || code === ProtocolErrorCode.ResourceNotFound) {\n\t\t\tconst errorData = data;\n\t\t\tif (typeof errorData?.uri === \"string\" && (code === ProtocolErrorCode.ResourceNotFound || Object.keys(errorData).length === 1)) return new ResourceNotFoundError(errorData.uri, message);\n\t\t}\n\t\tif (code === ProtocolErrorCode.MissingRequiredClientCapability && data) {\n\t\t\tconst errorData = data;\n\t\t\tif (errorData.requiredCapabilities !== null && typeof errorData.requiredCapabilities === \"object\" && !Array.isArray(errorData.requiredCapabilities)) return new MissingRequiredClientCapabilityError({ requiredCapabilities: errorData.requiredCapabilities }, message);\n\t\t}\n\t\treturn new ProtocolError(code, message, data);\n\t}\n};\n/**\n* Error type for a `resources/read` miss: the requested resource does not\n* exist. The wire code is `-32602` (Invalid Params) on every protocol\n* revision — the spec MUST for revision 2026-07-28, and the value the v1.x\n* SDK has always emitted on earlier revisions. The error data echoes the\n* requested URI.\n*\n* Recognise this error by checking `error.data` is exactly `{ uri: string }`\n* (a `-32602` whose data carries `uri` and nothing else is resource-not-found;\n* any other `-32602` is an ordinary Invalid Params). For backwards compatibility, clients should also\n* accept `-32002` as resource not found — earlier SDK builds emitted that\n* code, and {@linkcode ProtocolError.fromError} reconstructs this class for\n* either code **when `error.data` carries `uri`** (a bare `-32002` without\n* `data.uri` stays a generic {@linkcode ProtocolError}). `instanceof` checks\n* are brand-matched and work across separately bundled copies of the SDK.\n*/\nvar ResourceNotFoundError = class extends ProtocolError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.ResourceNotFoundError\" });\n\t}\n\tconstructor(uri, message = `Resource not found: ${uri}`) {\n\t\tsuper(ProtocolErrorCode.InvalidParams, message, { uri });\n\t}\n\t/** The URI that was requested and not found. */\n\tget uri() {\n\t\treturn this.data.uri;\n\t}\n};\n/**\n* Specialized error type when a tool requires a URL mode elicitation.\n* This makes it nicer for the client to handle since there is specific data to work with instead of just a code to check against.\n*/\nvar UrlElicitationRequiredError = class extends ProtocolError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.UrlElicitationRequiredError\" });\n\t}\n\tconstructor(elicitations, message = `URL elicitation${elicitations.length > 1 ? \"s\" : \"\"} required`) {\n\t\tsuper(ProtocolErrorCode.UrlElicitationRequired, message, { elicitations });\n\t}\n\tget elicitations() {\n\t\treturn this.data?.elicitations ?? [];\n\t}\n};\n/**\n* Error type for the `-32022` UnsupportedProtocolVersion protocol error (protocol\n* revision 2026-07-28): the request's protocol version is unknown to the server or\n* unsupported by it.\n*\n* The error data lists the protocol versions the receiver supports (`supported`),\n* so the sender can choose a mutually supported version and retry, and echoes the\n* version that was requested (`requested`).\n*/\nvar UnsupportedProtocolVersionError = class extends ProtocolError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.UnsupportedProtocolVersionError\" });\n\t}\n\tconstructor(data, message = `Unsupported protocol version: ${data.requested}`) {\n\t\tsuper(ProtocolErrorCode.UnsupportedProtocolVersion, message, data);\n\t}\n\t/**\n\t* Protocol versions the receiver supports.\n\t*/\n\tget supported() {\n\t\treturn this.data.supported;\n\t}\n\t/**\n\t* The protocol version that was requested.\n\t*/\n\tget requested() {\n\t\treturn this.data.requested;\n\t}\n};\n/**\n* Error type for the `-32021` MissingRequiredClientCapability protocol error\n* (protocol revision 2026-07-28): processing the request requires a capability\n* the client did not declare in the request's `clientCapabilities`.\n*\n* The error data lists the missing capabilities (`requiredCapabilities`) in\n* the `ClientCapabilities` shape, so the client can see exactly what it would\n* have to declare for the request to be served. On HTTP, the response status\n* is `400 Bad Request`.\n*\n* Recognize this error by its code and `data.requiredCapabilities`, or by\n* `instanceof` — checks are brand-matched and work across separately bundled\n* copies of the SDK.\n*/\nvar MissingRequiredClientCapabilityError = class extends ProtocolError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.MissingRequiredClientCapabilityError\" });\n\t}\n\tconstructor(data, message = `Missing required client capabilities: ${Object.keys(data.requiredCapabilities).join(\", \")}`) {\n\t\tsuper(ProtocolErrorCode.MissingRequiredClientCapability, message, data);\n\t}\n\t/**\n\t* The capabilities the server requires from the client to process the\n\t* request (only the missing capabilities are listed).\n\t*/\n\tget requiredCapabilities() {\n\t\treturn this.data.requiredCapabilities;\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/encodeContract.ts\n/** The default cache policy when neither the handler nor configuration provides one. */\nconst DEFAULT_CACHE_TTL_MS = 0;\nconst DEFAULT_CACHE_SCOPE = \"private\";\n/**\n* Request methods whose spec result vocabulary goes beyond `'complete'` on the\n* 2026-07-28 revision: their results may be `input_required` (multi\n* round-trip requests), so a handler-provided `resultType` passes through the\n* stamp untouched. `subscriptions/listen` is NOT in this set: it never emits\n* a JSON-RPC result — termination is stream close (HTTP) or\n* `notifications/cancelled` (stdio) per the spec.\n*/\nconst EXTENDED_RESULT_TYPE_METHODS = [\n\t\"tools/call\",\n\t\"prompts/get\",\n\t\"resources/read\"\n];\n/**\n* Step 1 of the encode contract: ensure the outbound result carries the\n* required `resultType` discriminator.\n*\n* - No handler-provided value → stamp `'complete'`.\n* - Handler-provided `'complete'` → kept as-is.\n* - Handler-provided non-`'complete'` value on a method whose vocabulary\n*   allows it ({@linkcode EXTENDED_RESULT_TYPE_METHODS}) → passes through.\n*   The value is forwarded verbatim — the wire vocabulary is an open union and\n*   the SDK does not validate the string, so emitting a `resultType` the\n*   negotiated revision does not define is the handler author's\n*   responsibility.\n* - Handler-provided non-`'complete'` value on any other method → internal\n*   error (loud): the value would be mis-typed on the wire, and silently\n*   rewriting it would hide a server bug.\n*/\nfunction stampResultType(method, result) {\n\tconst provided = result[\"resultType\"];\n\tif (provided === void 0) return {\n\t\t...result,\n\t\tresultType: \"complete\"\n\t};\n\tif (provided === \"complete\") return result;\n\tif (EXTENDED_RESULT_TYPE_METHODS.includes(method)) return result;\n\tthrow new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned resultType '${String(provided)}', but results of ${method} only support 'complete' on protocol revision 2026-07-28`);\n}\n/**\n* Step 2 of the encode contract: fill the required `ttlMs`/`cacheScope` fields\n* on cacheable results.\n*\n* Applies only when the (post-stamp) `resultType` is `'complete'` and the\n* method is one of the cacheable operations; everything else is returned\n* untouched apart from removing the configured-hint carrier. Field resolution\n* is per field, most specific author first: a valid handler-returned value,\n* then the configured cache hint attached by the server layer, then the\n* defaults. Handler-returned values are validated at encode time (`ttlMs`\n* must be a non-negative integer, `cacheScope` must be `'public'` or\n* `'private'`); invalid values are ignored rather than emitted.\n*/\nfunction fillCacheFields(method, result) {\n\tconst fallback = cacheHintFallbackOf(result);\n\tif (result[\"resultType\"] !== \"complete\" || !isCacheableResultMethod(method)) return fallback === void 0 ? result : stripCacheHintFallback(result);\n\tconst provided = result;\n\tconst ttlMs = isValidCacheTtlMs(provided[\"ttlMs\"]) ? provided[\"ttlMs\"] : resolveTtlMs(fallback);\n\tconst cacheScope = isValidCacheScope(provided[\"cacheScope\"]) ? provided[\"cacheScope\"] : resolveCacheScope(fallback);\n\tconst filled = {\n\t\t...provided,\n\t\tttlMs,\n\t\tcacheScope\n\t};\n\tdelete filled[RESULT_CACHE_HINT_FALLBACK];\n\treturn filled;\n}\nfunction isPlainObject$5(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/**\n* Step 3 of the encode contract: stamp the server's identity into the\n* result's `_meta` under `io.modelcontextprotocol/serverInfo` (spec PR #3002:\n* servers SHOULD include it on every response).\n*\n* - No `serverInfo` supplied (a client instance, or a hand-constructed\n*   protocol object) → identity function.\n* - The result's `_meta` already carries the key → kept as-is (the handler\n*   is the more specific author; mirrors the cache-fill resolution order).\n* - A present-but-non-object `_meta` (a dynamic-caller bug) → kept as-is:\n*   the stamp never rewrites handler material, and the malformed value fails\n*   loudly at the peer instead of being silently replaced here.\n* - Otherwise → the key is added, preserving any other `_meta` entries.\n*\n* Runs for every result regardless of `resultType`: the anchor types\n* `Result._meta` as `ResultMetaObject` on all results, `input_required`\n* included.\n*/\nfunction stampServerInfoMeta(result, serverInfo) {\n\tif (serverInfo === void 0) return result;\n\tconst meta = result[\"_meta\"];\n\tif (meta === void 0) return {\n\t\t...result,\n\t\t_meta: { [SERVER_INFO_META_KEY]: serverInfo }\n\t};\n\tif (!isPlainObject$5(meta)) return result;\n\tif (meta[SERVER_INFO_META_KEY] !== void 0) return result;\n\treturn {\n\t\t...result,\n\t\t_meta: {\n\t\t\t...meta,\n\t\t\t[SERVER_INFO_META_KEY]: serverInfo\n\t\t}\n\t};\n}\nfunction resolveTtlMs(fallback) {\n\treturn fallback !== void 0 && isValidCacheTtlMs(fallback.ttlMs) ? fallback.ttlMs : DEFAULT_CACHE_TTL_MS;\n}\nfunction resolveCacheScope(fallback) {\n\treturn fallback !== void 0 && isValidCacheScope(fallback.cacheScope) ? fallback.cacheScope : DEFAULT_CACHE_SCOPE;\n}\nfunction stripCacheHintFallback(result) {\n\tconst copy = { ...result };\n\tdelete copy[RESULT_CACHE_HINT_FALLBACK];\n\treturn copy;\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/inputRequired.ts\n/**\n* In-band input-request vocabulary of the 2026-07-28 revision (SEP-2322\n* multi round-trip requests), dispatch view.\n*\n* The three former server→client wire requests (`elicitation/create`,\n* `sampling/createMessage`, `roots/list`) are NOT wire request methods on\n* this revision — they are demoted to de-JSON-RPC'd payloads embedded in an\n* `input_required` result. The multi-round-trip driver dispatches those\n* embedded payloads to the client's registered handlers through the normal\n* handler machinery, and these are the schemas that dispatch parses them\n* with: lenient where the anchor's wire-true artifacts are strict (an\n* embedded request never carries the per-request `_meta` envelope), exact\n* where the vocabulary forks (the sampling shapes compose the forked\n* SamplingMessage/Tool payloads).\n*\n* Registry membership is intentionally NOT granted here — these methods stay\n* absent from the 2026-era request registry (a peer sending one as a wire\n* request still gets −32601 by absence). Only the codec's\n* `inputRequestSchema`/`inputResponseSchema` accessors expose them.\n*/\n/** The embedded input-request methods of the 2026-07-28 revision. */\nconst INPUT_REQUEST_METHODS_2026 = [\n\t\"elicitation/create\",\n\t\"sampling/createMessage\",\n\t\"roots/list\"\n];\nlet maps;\nfunction inputSchemaMaps() {\n\tif (maps) return maps;\n\tconst s = buildSchemas2026();\n\tmaps = {\n\t\trequest: {\n\t\t\t\"elicitation/create\": z.object({\n\t\t\t\tmethod: z.literal(\"elicitation/create\"),\n\t\t\t\tparams: s.ElicitRequestParamsSchema\n\t\t\t}),\n\t\t\t\"sampling/createMessage\": z.object({\n\t\t\t\tmethod: z.literal(\"sampling/createMessage\"),\n\t\t\t\tparams: s.CreateMessageRequestParamsSchema\n\t\t\t}),\n\t\t\t\"roots/list\": z.object({\n\t\t\t\tmethod: z.literal(\"roots/list\"),\n\t\t\t\tparams: z.looseObject({}).optional()\n\t\t\t})\n\t\t},\n\t\tresponse: {\n\t\t\t\"elicitation/create\": s.ElicitResultSchema,\n\t\t\t\"sampling/createMessage\": s.CreateMessageResultSchema,\n\t\t\t\"roots/list\": s.ListRootsResultSchema\n\t\t}\n\t};\n\treturn maps;\n}\n/**\n* Forces the lazy embedded-request maps (and, through them, the era's schema\n* memo). Warm-up hook for `preloadSchemas()` — no-op once the maps exist.\n*/\nfunction warmInputSchemaMaps2026() {\n\tinputSchemaMaps();\n}\nfunction isInputRequestMethod2026(method) {\n\treturn INPUT_REQUEST_METHODS_2026.includes(method);\n}\nfunction getInputRequestSchema2026(method) {\n\treturn isInputRequestMethod2026(method) ? inputSchemaMaps().request[method] : void 0;\n}\nfunction getInputResponseSchema2026(method) {\n\treturn isInputRequestMethod2026(method) ? inputSchemaMaps().response[method] : void 0;\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/registry.ts\nconst requestMethodKeys = {\n\t\"tools/call\": null,\n\t\"tools/list\": null,\n\t\"prompts/get\": null,\n\t\"prompts/list\": null,\n\t\"resources/list\": null,\n\t\"resources/templates/list\": null,\n\t\"resources/read\": null,\n\t\"completion/complete\": null,\n\t\"server/discover\": null,\n\t\"subscriptions/listen\": null\n};\nconst notificationMethodKeys = {\n\t\"notifications/cancelled\": null,\n\t\"notifications/progress\": null,\n\t\"notifications/message\": null,\n\t\"notifications/resources/updated\": null,\n\t\"notifications/resources/list_changed\": null,\n\t\"notifications/tools/list_changed\": null,\n\t\"notifications/prompts/list_changed\": null,\n\t\"notifications/subscriptions/acknowledged\": null\n};\n/** The 2026-era request-method set (registry membership = the deletion story). */\nfunction hasRequestMethod2026(method) {\n\treturn Object.prototype.hasOwnProperty.call(requestMethodKeys, method);\n}\n/** The 2026-era notification-method set. */\nfunction hasNotificationMethod2026(method) {\n\treturn Object.prototype.hasOwnProperty.call(notificationMethodKeys, method);\n}\n/** Result-map membership (same key set as the request map on this era). */\nfunction hasResultMethod2026(method) {\n\treturn Object.prototype.hasOwnProperty.call(requestMethodKeys, method);\n}\nfunction getRequestSchema2026(method) {\n\treturn hasRequestMethod2026(method) ? buildSchemas2026().dispatchRequestSchemas[method] : void 0;\n}\nfunction getResultSchema2026(method) {\n\treturn hasResultMethod2026(method) ? buildSchemas2026().dispatchResultSchemas[method] : void 0;\n}\nfunction getNotificationSchema2026(method) {\n\treturn hasNotificationMethod2026(method) ? buildSchemas2026().notificationSchemas2026[method] : void 0;\n}\n/** Registry method lists (for the spec-method universe and the CI registry-diff oracle). */\nconst rev2026RequestMethods = Object.keys(requestMethodKeys);\nconst rev2026NotificationMethods = Object.keys(notificationMethodKeys);\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/codec.ts\nfunction isPlainObject$4(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/** Tri-state wrap of an optional Zod schema lookup (the function-only contract). */\nfunction triState(schema, raw) {\n\tif (schema === void 0) return {\n\t\tok: false,\n\t\treason: \"not-in-era\"\n\t};\n\tconst parsed = schema.safeParse(raw);\n\treturn parsed.success ? {\n\t\tok: true,\n\t\tvalue: parsed.data\n\t} : {\n\t\tok: false,\n\t\treason: \"invalid\",\n\t\tmessage: String(parsed.error)\n\t};\n}\nconst NOT_IN_ERA = {\n\tok: false,\n\treason: \"not-in-era\"\n};\n/**\n* The reserved `_meta` keys an envelope must carry on this era (in reporting\n* order). `clientInfo` is NOT here: spec PR #3002 demoted it to SHOULD, so a\n* request without it is accepted (a present-but-malformed value still fails\n* the envelope schema parse below).\n*/\nconst REQUIRED_ENVELOPE_KEYS = [PROTOCOL_VERSION_META_KEY, CLIENT_CAPABILITIES_META_KEY];\n/** Strip the known deleted-field set from an outbound result (Q1-SD3 iii). */\nfunction enforceDeletedFields(method, result) {\n\tlet next = result;\n\tlet copied = false;\n\tconst copy = () => {\n\t\tif (!copied) {\n\t\t\tnext = { ...next };\n\t\t\tcopied = true;\n\t\t}\n\t\treturn next;\n\t};\n\tconst tools = result.tools;\n\tif (method === \"tools/list\" && Array.isArray(tools) && tools.some((tool) => isPlainObject$4(tool) && \"execution\" in tool)) copy().tools = tools.map((tool) => {\n\t\tif (!isPlainObject$4(tool) || !(\"execution\" in tool)) return tool;\n\t\tconst rest = { ...tool };\n\t\tdelete rest[\"execution\"];\n\t\treturn rest;\n\t});\n\tconst capabilities = result.capabilities;\n\tif (isPlainObject$4(capabilities) && \"tasks\" in capabilities) {\n\t\tconst rest = { ...capabilities };\n\t\tdelete rest[\"tasks\"];\n\t\tcopy().capabilities = rest;\n\t}\n\treturn next;\n}\nconst rev2026Codec = {\n\tera: \"2026-07-28\",\n\thasRequestMethod: hasRequestMethod2026,\n\thasNotificationMethod: hasNotificationMethod2026,\n\thasInputRequestMethod: (method) => getInputRequestSchema2026(method) !== void 0,\n\tvalidateRequest: (method, raw) => triState(getRequestSchema2026(method), raw),\n\tvalidateResult: (method, raw) => triState(getResultSchema2026(method), raw),\n\tvalidateNotification: (method, raw) => triState(getNotificationSchema2026(method), raw),\n\tvalidateInputRequest: (method, raw) => triState(getInputRequestSchema2026(method), raw),\n\tvalidateInputResponse: (method, raw) => triState(getInputResponseSchema2026(method), raw),\n\tsamplingResultVariant: () => NOT_IN_ERA,\n\toutboundEnvelope(material) {\n\t\treturn {\n\t\t\t[PROTOCOL_VERSION_META_KEY]: material.protocolVersion,\n\t\t\t[CLIENT_INFO_META_KEY]: material.clientInfo,\n\t\t\t[CLIENT_CAPABILITIES_META_KEY]: material.clientCapabilities,\n\t\t\t...material.logLevel !== void 0 && { [LOG_LEVEL_META_KEY]: material.logLevel }\n\t\t};\n\t},\n\tvalidateEnvelopeMeta(meta) {\n\t\tconst issues = [];\n\t\tfor (const key of REQUIRED_ENVELOPE_KEYS) if (!(key in meta)) issues.push({\n\t\t\tkey,\n\t\t\tproblem: \"missing\"\n\t\t});\n\t\tconst parsed = buildSchemas2026().RequestMetaEnvelopeSchema.safeParse(meta);\n\t\tif (!parsed.success) for (const issue of parsed.error.issues) {\n\t\t\tconst path = issue.path.map(String);\n\t\t\tconst key = path.length > 0 ? path.join(\".\") : \"_meta\";\n\t\t\tif (path.length === 1 && issues.some((existing) => existing.key === key && existing.problem === \"missing\")) continue;\n\t\t\tissues.push({\n\t\t\t\tkey,\n\t\t\t\tproblem: issue.message\n\t\t\t});\n\t\t}\n\t\treturn issues;\n\t},\n\tprojectCallToolResult: (result) => appendTextFallbackForNonObject(result),\n\tinputRequestSchema: getInputRequestSchema2026,\n\tdecodeResult(method, raw) {\n\t\tif (!isPlainObject$4(raw)) return {\n\t\t\tkind: \"invalid\",\n\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: not an object`, { method })\n\t\t};\n\t\tconst rawResultType = raw[\"resultType\"];\n\t\tif (rawResultType === void 0) return {\n\t\t\tkind: \"invalid\",\n\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`, {\n\t\t\t\tmethod,\n\t\t\t\tviolation: \"missing-resultType\"\n\t\t\t})\n\t\t};\n\t\tif (typeof rawResultType !== \"string\") return {\n\t\t\tkind: \"invalid\",\n\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: non-string resultType`, {\n\t\t\t\tmethod,\n\t\t\t\tresultType: rawResultType\n\t\t\t})\n\t\t};\n\t\tif (rawResultType === \"input_required\") {\n\t\t\tconst rawInputRequests = raw[\"inputRequests\"];\n\t\t\tconst inputRequests = isPlainObject$4(rawInputRequests) ? rawInputRequests : {};\n\t\t\tconst requestState = raw[\"requestState\"];\n\t\t\tif (Object.keys(inputRequests).length === 0 && typeof requestState !== \"string\") return {\n\t\t\t\tkind: \"invalid\",\n\t\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`, {\n\t\t\t\t\tmethod,\n\t\t\t\t\tviolation: \"input-required-missing-both\"\n\t\t\t\t})\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tkind: \"input_required\",\n\t\t\t\tinputRequests,\n\t\t\t\t...typeof requestState === \"string\" && { requestState }\n\t\t\t};\n\t\t}\n\t\tif (rawResultType !== \"complete\") return {\n\t\t\tkind: \"invalid\",\n\t\t\terror: new SdkError(SdkErrorCode.UnsupportedResultType, `Unsupported result type '${rawResultType}' for ${method}`, {\n\t\t\t\tresultType: rawResultType,\n\t\t\t\tmethod\n\t\t\t})\n\t\t};\n\t\tconst wireResultSchemas = getWireResultSchemas();\n\t\tconst wireSchema = Object.hasOwn(wireResultSchemas, method) ? wireResultSchemas[method] : void 0;\n\t\tif (wireSchema !== void 0) {\n\t\t\tconst parsed = wireSchema.safeParse(raw);\n\t\t\tif (!parsed.success) return {\n\t\t\t\tkind: \"invalid\",\n\t\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: ${parsed.error}`, { method })\n\t\t\t};\n\t\t}\n\t\tconst lifted = { ...raw };\n\t\tdelete lifted[\"resultType\"];\n\t\treturn {\n\t\t\tkind: \"complete\",\n\t\t\tresult: lifted\n\t\t};\n\t},\n\tencodeResult(method, result, serverInfo) {\n\t\treturn stampServerInfoMeta(fillCacheFields(method, stampResultType(method, enforceDeletedFields(method, result))), serverInfo);\n\t},\n\tencodeErrorCode: (code) => code === -32002 ? -32602 : code,\n\tcheckInboundEnvelope(material) {\n\t\tif (material.envelope === void 0) return \"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)\";\n\t\tconst parsed = buildSchemas2026().RequestMetaEnvelopeSchema.safeParse(material.envelope);\n\t\tif (!parsed.success) return `Invalid _meta envelope for protocol revision 2026-07-28: ${parsed.error.issues.map((issue) => issue.message).join(\"; \")}`;\n\t}\n};\n/** Wire-true result wrappers consulted by decode step 2, keyed by method —\n* built once through the era's schema memo on the first decode. */\nlet wireResultSchemasMemo;\nfunction getWireResultSchemas() {\n\tif (wireResultSchemasMemo) return wireResultSchemasMemo;\n\tconst s = buildSchemas2026();\n\twireResultSchemasMemo = {\n\t\t\"tools/call\": s.CallToolResultSchema,\n\t\t\"tools/list\": s.ListToolsResultSchema,\n\t\t\"prompts/get\": s.GetPromptResultSchema,\n\t\t\"prompts/list\": s.ListPromptsResultSchema,\n\t\t\"resources/list\": s.ListResourcesResultSchema,\n\t\t\"resources/templates/list\": s.ListResourceTemplatesResultSchema,\n\t\t\"resources/read\": s.ReadResourceResultSchema,\n\t\t\"completion/complete\": s.CompleteResultSchema,\n\t\t\"server/discover\": s.DiscoverResultSchema\n\t};\n\treturn wireResultSchemasMemo;\n}\n/**\n* Forces the lazy wire-result wrapper map (and, through it, the era's schema\n* memo). Warm-up hook for `preloadSchemas()` — no-op once the map exists.\n*/\nfunction warmWireResultSchemas2026() {\n\tgetWireResultSchemas();\n}\n\n//#endregion\n//#region ../core-internal/src/wire/codec.ts\n/**\n* The modern wire revision literal. Internal only — deliberately NOT a public\n* constant (G-D2-4: no public modern-version constant ships before era-aware\n* list semantics exist).\n*/\nconst MODERN_WIRE_REVISION = \"2026-07-28\";\n/**\n* Era resolution, many-to-one (Q1-SD1): every modern-era revision\n* (`>= 2026-07-28`) → the 2026-era codec; every legacy revision (the five\n* `SUPPORTED_PROTOCOL_VERSIONS`) and `undefined`/unknown → the 2025-era\n* codec (the DV-13 default posture — hand-constructed instances and\n* unclassified traffic are legacy-era). This is the same era predicate the\n* rest of the SDK uses ({@link isModernProtocolVersion}); a pinned modern\n* revision other than the literal '2026-07-28' must still resolve modern.\n*/\nfunction codecForVersion(version) {\n\treturn version !== void 0 && isModernProtocolVersion(version) ? rev2026Codec : rev2025Codec;\n}\n/**\n* The wire era an edge classification names (Q2 — produced at the\n* transport/entry edge; this layer only CONSUMES it). The dispatch funnel no\n* longer resolves a codec FROM the classification: era is instance state, and\n* a classified inbound message is VALIDATED against the instance era — a\n* mismatch is an entry/routing error, never a per-message era switch. The\n* exact `revision` wins over the coarse era flag when both are present.\n*/\nfunction classifiedWireEra(classification) {\n\tif (classification.revision !== void 0) return codecForVersion(classification.revision).era;\n\treturn classification.era === \"modern\" ? rev2026Codec.era : rev2025Codec.era;\n}\n/**\n* The derived spec-method universe: the union of every codec registry. A\n* method in this set is era-gated at dispatch and send time; a method outside\n* it is a consumer-owned extension method (era-blind, schema-explicit).\n* Derived from the registries — never hand-curated (the LEGACY_ONLY_METHODS\n* table class is exactly what registry membership replaces).\n*/\nfunction isSpecRequestMethod(method) {\n\treturn ALL_CODECS.some((codec) => codec.hasRequestMethod(method));\n}\nfunction isSpecNotificationMethod(method) {\n\treturn ALL_CODECS.some((codec) => codec.hasNotificationMethod(method));\n}\nconst ALL_CODECS = [rev2025Codec, rev2026Codec];\n\n//#endregion\n//#region ../core-internal/src/shared/envelope.ts\n/**\n* Per-request `_meta` envelope claim helpers (protocol revision 2026-07-28).\n*\n* Pure, value-returning helpers used by the inbound HTTP classifier\n* (`classifyInboundRequest`): claim detection and envelope validation with\n* self-identifying issues. The envelope schema itself stays the wire layer's\n* single source of truth (`RequestMetaEnvelopeSchema`); this module only maps\n* its outcomes into the shapes the validation ladder emits.\n*\n* Claim detection is deliberately narrow: a message claims the 2026-07-28\n* envelope mechanism if and only if the reserved protocol-version `_meta` key\n* is present in `params._meta`. Other reserved keys (client info, client\n* capabilities, log level), a bare `progressToken`, or unrelated keys under\n* the `io.modelcontextprotocol/` prefix do NOT constitute a claim on their\n* own — but once the claim key is present, a malformed envelope is a\n* validation error, never a silent fall back to legacy handling.\n*\n* The wire-exact envelope schema, the required-key set, and the per-key issue\n* mapping live in the wire layer (the 2026-era codec's `validateEnvelopeMeta`).\n* This module never reaches into a per-revision wire module directly.\n*/\nfunction isPlainObject$3(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/** The `_meta` object of a message's params, when present. */\nfunction requestMetaOf(params) {\n\tif (!isPlainObject$3(params)) return void 0;\n\tconst meta = params[\"_meta\"];\n\treturn isPlainObject$3(meta) ? meta : void 0;\n}\n/**\n* Whether a message's params carry the per-request envelope claim: the\n* reserved protocol-version `_meta` key is present (regardless of whether the\n* rest of the envelope is valid — validation is a separate, later step).\n*/\nfunction hasEnvelopeClaim(params) {\n\tconst meta = requestMetaOf(params);\n\treturn meta !== void 0 && PROTOCOL_VERSION_META_KEY in meta;\n}\n/**\n* The protocol version named by a message's envelope claim, when the claim is\n* present and carries a string value. A present claim with a non-string value\n* still counts as a claim ({@linkcode hasEnvelopeClaim}); it surfaces as a\n* validation issue instead of a version.\n*/\nfunction envelopeClaimVersion(params) {\n\tconst value = requestMetaOf(params)?.[PROTOCOL_VERSION_META_KEY];\n\treturn typeof value === \"string\" ? value : void 0;\n}\n/**\n* Validates a request's `_meta` object as a 2026-07-28 per-request envelope\n* and reports problems as self-identifying issues (which key, what problem).\n*\n* Returns an empty array when the envelope is valid. Missing required keys are\n* reported first (as `problem: 'missing'`), then schema violations inside\n* present keys, in a stable order.\n*/\nfunction validateEnvelopeMeta(meta) {\n\treturn codecForVersion(MODERN_WIRE_REVISION).validateEnvelopeMeta(meta);\n}\n\n//#endregion\n//#region ../core-internal/src/types/schemas.ts\nvar schemas_exports = /* @__PURE__ */ __exportAll({\n\tAnnotationsSchema: () => AnnotationsSchema,\n\tAudioContentSchema: () => AudioContentSchema,\n\tBaseMetadataSchema: () => BaseMetadataSchema,\n\tBaseRequestParamsSchema: () => BaseRequestParamsSchema,\n\tBlobResourceContentsSchema: () => BlobResourceContentsSchema,\n\tBooleanSchemaSchema: () => BooleanSchemaSchema,\n\tCallToolRequestParamsSchema: () => CallToolRequestParamsSchema,\n\tCallToolRequestSchema: () => CallToolRequestSchema,\n\tCallToolResultSchema: () => CallToolResultSchema,\n\tCancelTaskRequestSchema: () => CancelTaskRequestSchema,\n\tCancelTaskResultSchema: () => CancelTaskResultSchema,\n\tCancelledNotificationParamsSchema: () => CancelledNotificationParamsSchema,\n\tCancelledNotificationSchema: () => CancelledNotificationSchema,\n\tClientCapabilitiesSchema: () => ClientCapabilitiesSchema,\n\tClientNotificationSchema: () => ClientNotificationSchema,\n\tClientRequestSchema: () => ClientRequestSchema,\n\tClientResultSchema: () => ClientResultSchema,\n\tClientTasksCapabilitySchema: () => ClientTasksCapabilitySchema,\n\tCompatibilityCallToolResultSchema: () => CompatibilityCallToolResultSchema,\n\tCompleteRequestParamsSchema: () => CompleteRequestParamsSchema,\n\tCompleteRequestSchema: () => CompleteRequestSchema,\n\tCompleteResultSchema: () => CompleteResultSchema,\n\tContentBlockSchema: () => ContentBlockSchema,\n\tCreateMessageRequestParamsSchema: () => CreateMessageRequestParamsSchema,\n\tCreateMessageRequestSchema: () => CreateMessageRequestSchema,\n\tCreateMessageResultSchema: () => CreateMessageResultSchema,\n\tCreateMessageResultWithToolsSchema: () => CreateMessageResultWithToolsSchema,\n\tCreateTaskResultSchema: () => CreateTaskResultSchema,\n\tCursorSchema: () => CursorSchema,\n\tDiscoverRequestSchema: () => DiscoverRequestSchema,\n\tDiscoverResultSchema: () => DiscoverResultSchema,\n\tElicitRequestFormParamsSchema: () => ElicitRequestFormParamsSchema,\n\tElicitRequestParamsSchema: () => ElicitRequestParamsSchema,\n\tElicitRequestSchema: () => ElicitRequestSchema,\n\tElicitRequestURLParamsSchema: () => ElicitRequestURLParamsSchema,\n\tElicitResultSchema: () => ElicitResultSchema,\n\tElicitationCompleteNotificationParamsSchema: () => ElicitationCompleteNotificationParamsSchema,\n\tElicitationCompleteNotificationSchema: () => ElicitationCompleteNotificationSchema,\n\tEmbeddedResourceSchema: () => EmbeddedResourceSchema,\n\tEmptyResultSchema: () => EmptyResultSchema,\n\tEnumSchemaSchema: () => EnumSchemaSchema,\n\tGetPromptRequestParamsSchema: () => GetPromptRequestParamsSchema,\n\tGetPromptRequestSchema: () => GetPromptRequestSchema,\n\tGetPromptResultSchema: () => GetPromptResultSchema,\n\tGetTaskPayloadRequestSchema: () => GetTaskPayloadRequestSchema,\n\tGetTaskPayloadResultSchema: () => GetTaskPayloadResultSchema,\n\tGetTaskRequestSchema: () => GetTaskRequestSchema,\n\tGetTaskResultSchema: () => GetTaskResultSchema,\n\tIconSchema: () => IconSchema,\n\tIconsSchema: () => IconsSchema,\n\tImageContentSchema: () => ImageContentSchema,\n\tImplementationSchema: () => ImplementationSchema,\n\tInitializeRequestParamsSchema: () => InitializeRequestParamsSchema,\n\tInitializeRequestSchema: () => InitializeRequestSchema,\n\tInitializeResultSchema: () => InitializeResultSchema,\n\tInitializedNotificationSchema: () => InitializedNotificationSchema,\n\tJSONArraySchema: () => JSONArraySchema,\n\tJSONObjectSchema: () => JSONObjectSchema,\n\tJSONRPCErrorResponseSchema: () => JSONRPCErrorResponseSchema,\n\tJSONRPCMessageSchema: () => JSONRPCMessageSchema,\n\tJSONRPCNotificationSchema: () => JSONRPCNotificationSchema,\n\tJSONRPCRequestSchema: () => JSONRPCRequestSchema,\n\tJSONRPCResponseSchema: () => JSONRPCResponseSchema,\n\tJSONRPCResultResponseSchema: () => JSONRPCResultResponseSchema,\n\tJSONValueSchema: () => JSONValueSchema,\n\tLegacyTitledEnumSchemaSchema: () => LegacyTitledEnumSchemaSchema,\n\tListChangedOptionsBaseSchema: () => ListChangedOptionsBaseSchema,\n\tListPromptsRequestSchema: () => ListPromptsRequestSchema,\n\tListPromptsResultSchema: () => ListPromptsResultSchema,\n\tListResourceTemplatesRequestSchema: () => ListResourceTemplatesRequestSchema,\n\tListResourceTemplatesResultSchema: () => ListResourceTemplatesResultSchema,\n\tListResourcesRequestSchema: () => ListResourcesRequestSchema,\n\tListResourcesResultSchema: () => ListResourcesResultSchema,\n\tListRootsRequestSchema: () => ListRootsRequestSchema,\n\tListRootsResultSchema: () => ListRootsResultSchema,\n\tListTasksRequestSchema: () => ListTasksRequestSchema,\n\tListTasksResultSchema: () => ListTasksResultSchema,\n\tListToolsRequestSchema: () => ListToolsRequestSchema,\n\tListToolsResultSchema: () => ListToolsResultSchema,\n\tLoggingLevelSchema: () => LoggingLevelSchema,\n\tLoggingMessageNotificationParamsSchema: () => LoggingMessageNotificationParamsSchema,\n\tLoggingMessageNotificationSchema: () => LoggingMessageNotificationSchema,\n\tModelHintSchema: () => ModelHintSchema,\n\tModelPreferencesSchema: () => ModelPreferencesSchema,\n\tMultiSelectEnumSchemaSchema: () => MultiSelectEnumSchemaSchema,\n\tNotificationSchema: () => NotificationSchema,\n\tNotificationsParamsSchema: () => NotificationsParamsSchema,\n\tNumberSchemaSchema: () => NumberSchemaSchema,\n\tPaginatedRequestParamsSchema: () => PaginatedRequestParamsSchema,\n\tPaginatedRequestSchema: () => PaginatedRequestSchema,\n\tPaginatedResultSchema: () => PaginatedResultSchema,\n\tPingRequestSchema: () => PingRequestSchema,\n\tPrimitiveSchemaDefinitionSchema: () => PrimitiveSchemaDefinitionSchema,\n\tProgressNotificationParamsSchema: () => ProgressNotificationParamsSchema,\n\tProgressNotificationSchema: () => ProgressNotificationSchema,\n\tProgressSchema: () => ProgressSchema,\n\tProgressTokenSchema: () => ProgressTokenSchema,\n\tPromptArgumentSchema: () => PromptArgumentSchema,\n\tPromptListChangedNotificationSchema: () => PromptListChangedNotificationSchema,\n\tPromptMessageSchema: () => PromptMessageSchema,\n\tPromptReferenceSchema: () => PromptReferenceSchema,\n\tPromptSchema: () => PromptSchema,\n\tReadResourceRequestParamsSchema: () => ReadResourceRequestParamsSchema,\n\tReadResourceRequestSchema: () => ReadResourceRequestSchema,\n\tReadResourceResultSchema: () => ReadResourceResultSchema,\n\tRelatedTaskMetadataSchema: () => RelatedTaskMetadataSchema,\n\tRequestIdSchema: () => RequestIdSchema,\n\tRequestMetaSchema: () => RequestMetaSchema,\n\tRequestSchema: () => RequestSchema,\n\tResourceContentsSchema: () => ResourceContentsSchema,\n\tResourceLinkSchema: () => ResourceLinkSchema,\n\tResourceListChangedNotificationSchema: () => ResourceListChangedNotificationSchema,\n\tResourceRequestParamsSchema: () => ResourceRequestParamsSchema,\n\tResourceSchema: () => ResourceSchema,\n\tResourceTemplateReferenceSchema: () => ResourceTemplateReferenceSchema,\n\tResourceTemplateSchema: () => ResourceTemplateSchema,\n\tResourceUpdatedNotificationParamsSchema: () => ResourceUpdatedNotificationParamsSchema,\n\tResourceUpdatedNotificationSchema: () => ResourceUpdatedNotificationSchema,\n\tResultMetaObjectSchema: () => ResultMetaObjectSchema,\n\tResultSchema: () => ResultSchema,\n\tRoleSchema: () => RoleSchema,\n\tRootSchema: () => RootSchema,\n\tRootsListChangedNotificationSchema: () => RootsListChangedNotificationSchema,\n\tSamplingContentSchema: () => SamplingContentSchema,\n\tSamplingMessageContentBlockSchema: () => SamplingMessageContentBlockSchema,\n\tSamplingMessageSchema: () => SamplingMessageSchema,\n\tServerCapabilitiesSchema: () => ServerCapabilitiesSchema,\n\tServerNotificationSchema: () => ServerNotificationSchema,\n\tServerRequestSchema: () => ServerRequestSchema,\n\tServerResultSchema: () => ServerResultSchema,\n\tServerTasksCapabilitySchema: () => ServerTasksCapabilitySchema,\n\tSetLevelRequestParamsSchema: () => SetLevelRequestParamsSchema,\n\tSetLevelRequestSchema: () => SetLevelRequestSchema,\n\tSingleSelectEnumSchemaSchema: () => SingleSelectEnumSchemaSchema,\n\tStringSchemaSchema: () => StringSchemaSchema,\n\tSubscribeRequestParamsSchema: () => SubscribeRequestParamsSchema,\n\tSubscribeRequestSchema: () => SubscribeRequestSchema,\n\tSubscriptionFilterSchema: () => SubscriptionFilterSchema,\n\tSubscriptionsAcknowledgedNotificationParamsSchema: () => SubscriptionsAcknowledgedNotificationParamsSchema,\n\tSubscriptionsAcknowledgedNotificationSchema: () => SubscriptionsAcknowledgedNotificationSchema,\n\tSubscriptionsListenRequestParamsSchema: () => SubscriptionsListenRequestParamsSchema,\n\tSubscriptionsListenRequestSchema: () => SubscriptionsListenRequestSchema,\n\tSubscriptionsListenResultMetaSchema: () => SubscriptionsListenResultMetaSchema,\n\tSubscriptionsListenResultSchema: () => SubscriptionsListenResultSchema,\n\tTaskAugmentedRequestParamsSchema: () => TaskAugmentedRequestParamsSchema,\n\tTaskCreationParamsSchema: () => TaskCreationParamsSchema,\n\tTaskMetadataSchema: () => TaskMetadataSchema,\n\tTaskSchema: () => TaskSchema,\n\tTaskStatusNotificationParamsSchema: () => TaskStatusNotificationParamsSchema,\n\tTaskStatusNotificationSchema: () => TaskStatusNotificationSchema,\n\tTaskStatusSchema: () => TaskStatusSchema,\n\tTextContentSchema: () => TextContentSchema,\n\tTextResourceContentsSchema: () => TextResourceContentsSchema,\n\tTitledMultiSelectEnumSchemaSchema: () => TitledMultiSelectEnumSchemaSchema,\n\tTitledSingleSelectEnumSchemaSchema: () => TitledSingleSelectEnumSchemaSchema,\n\tToolAnnotationsSchema: () => ToolAnnotationsSchema,\n\tToolChoiceSchema: () => ToolChoiceSchema,\n\tToolExecutionSchema: () => ToolExecutionSchema,\n\tToolListChangedNotificationSchema: () => ToolListChangedNotificationSchema,\n\tToolResultContentSchema: () => ToolResultContentSchema,\n\tToolSchema: () => ToolSchema,\n\tToolUseContentSchema: () => ToolUseContentSchema,\n\tUnsubscribeRequestParamsSchema: () => UnsubscribeRequestParamsSchema,\n\tUnsubscribeRequestSchema: () => UnsubscribeRequestSchema,\n\tUntitledMultiSelectEnumSchemaSchema: () => UntitledMultiSelectEnumSchemaSchema,\n\tUntitledSingleSelectEnumSchemaSchema: () => UntitledSingleSelectEnumSchemaSchema\n});\n\n//#endregion\n//#region ../core-internal/src/types/guards.ts\n/**\n* Validates and parses an unknown value as a JSON-RPC message.\n*\n* Use this to validate incoming messages in custom transport implementations.\n* Throws if the value does not conform to the JSON-RPC message schema.\n*\n* @param value - The value to validate (typically a parsed JSON object).\n* @returns The validated {@linkcode JSONRPCMessage}.\n* @throws If validation fails.\n*/\nfunction parseJSONRPCMessage(value) {\n\treturn JSONRPCMessageSchema.parse(value);\n}\nconst isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;\nconst isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;\n/**\n* Checks if a value is a valid {@linkcode JSONRPCResultResponse}.\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode JSONRPCResultResponse}, false otherwise.\n*/\nconst isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success;\n/**\n* Checks if a value is a valid {@linkcode JSONRPCErrorResponse}.\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode JSONRPCErrorResponse}, false otherwise.\n*/\nconst isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;\n/**\n* Checks if a value is a valid {@linkcode JSONRPCResponse} (either a result or error response).\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode JSONRPCResponse}, false otherwise.\n*/\nconst isJSONRPCResponse = (value) => JSONRPCResponseSchema.safeParse(value).success;\n/**\n* Checks if a value is a valid {@linkcode CallToolResult}.\n*\n* This is a consumer-side VALUE check against the neutral model, not a wire\n* validator: a raw wire object that additionally carries wire-only members\n* (e.g. `resultType`) still passes through the loose index signature. Use a\n* transport-level parse to validate raw wire traffic.\n*\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode CallToolResult}, false otherwise.\n*/\nconst isCallToolResult = (value) => {\n\tif (typeof value !== \"object\" || value === null || value.content === void 0) return false;\n\treturn CallToolResultSchema.safeParse(value).success;\n};\n/**\n* Checks whether a value is an input-required result (protocol revision\n* 2026-07-28): the multi-round-trip return shape discriminated by\n* `resultType: 'input_required'`.\n*\n* This is a discriminator check, not a full validator — the at-least-one rule\n* (`inputRequests` or `requestState`) is enforced by the `inputRequired()`\n* builder and re-checked by the server seam for hand-built values.\n*\n* @param value - The value to check.\n* @returns True if the value carries the `input_required` discriminator.\n*/\nconst isInputRequiredResult = (value) => typeof value === \"object\" && value !== null && !Array.isArray(value) && value.resultType === \"input_required\";\n/**\n* Checks if a value is a valid {@linkcode TaskAugmentedRequestParams}.\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode TaskAugmentedRequestParams}, false otherwise.\n*\n* @deprecated Recognizes 2025-11-25 task wire vocabulary, which has no SDK\n* runtime; kept importable for interoperability only.\n*/\nconst isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;\nconst isInitializeRequest = (value) => InitializeRequestSchema.safeParse(value).success;\nconst isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;\nfunction assertCompleteRequestPrompt(request) {\n\tif (request.params.ref.type !== \"ref/prompt\") throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`);\n}\nfunction assertCompleteRequestResourceTemplate(request) {\n\tif (request.params.ref.type !== \"ref/resource\") throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`);\n}\n\n//#endregion\n//#region ../core-internal/src/shared/mcpParamHeaders.ts\n/** The fixed prefix every custom-parameter header carries. */\nconst MCP_PARAM_HEADER_PREFIX = \"Mcp-Param-\";\n/** The schema-extension property name a tool's `inputSchema` carries. */\nconst X_MCP_HEADER_KEY = \"x-mcp-header\";\n/**\n* RFC 9110 §5.1 `token` syntax (`1*tchar`). Rejects empty, space, control\n* characters (including CR/LF), and the listed delimiters.\n*/\nconst RFC9110_TOKEN = /^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$/;\n/**\n* JSON Schema `type` values the spec admits on an `x-mcp-header` property.\n*\n* The spec text names `integer`, `string`, `boolean` and explicitly excludes\n* `number`. The published conformance referee at the pinned release ships its\n* `http-custom-headers` scenario with two `type: \"number\"` `x-mcp-header`\n* parameters and expects the client to mirror them, so `number` is accepted\n* here so that the conformance gate passes; the discrepancy is tracked\n* upstream. Everything else (`object`, `array`, `null`, absent) is rejected.\n*/\nconst PERMITTED_X_MCP_HEADER_TYPES = new Set([\n\t\"string\",\n\t\"integer\",\n\t\"boolean\",\n\t\"number\"\n]);\n/**\n* Scan a tool's JSON-serialized `inputSchema` for `x-mcp-header` declarations\n* and validate every constraint the spec places on them. Returns either the\n* collected declarations (possibly empty) or the first violated constraint.\n*\n* The walk descends through `properties` at any depth (the spec's \"any nesting\n* depth\" clause). The static-reachability MUST is enforced as a structural\n* sweep: every position the chain MUST NOT pass through (`items`/\n* `additionalProperties`, `oneOf`/`anyOf`/`allOf`/`not`, `if`/`then`/`else`,\n* `$defs`, `$ref` targets within `$defs`) is visited too, and an\n* `x-mcp-header` found anywhere on that path invalidates the schema — \"an\n* annotation anywhere else makes the tool definition invalid\".\n*/\nfunction scanXMcpHeaderDeclarations(inputSchema) {\n\tconst declarations = [];\n\tconst seenLower = /* @__PURE__ */ new Map();\n\tconst visit = (node, path, reachable) => {\n\t\tif (node === null || typeof node !== \"object\") return void 0;\n\t\tconst schema = node;\n\t\tif (X_MCP_HEADER_KEY in schema) {\n\t\t\tif (!reachable || path.length === 0) return `${pathName(path)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;\n\t\t\tconst raw = schema[X_MCP_HEADER_KEY];\n\t\t\tif (typeof raw !== \"string\" || raw.length === 0) return `${pathName(path)}: x-mcp-header MUST be a non-empty string`;\n\t\t\tif (!RFC9110_TOKEN.test(raw)) return `${pathName(path)}: x-mcp-header '${raw}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;\n\t\t\tconst type = typeof schema.type === \"string\" ? schema.type : void 0;\n\t\t\tif (type === void 0 || !PERMITTED_X_MCP_HEADER_TYPES.has(type)) return `${pathName(path)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${type ?? \"<none>\"}`;\n\t\t\tconst lower = raw.toLowerCase();\n\t\t\tconst prior = seenLower.get(lower);\n\t\t\tif (prior !== void 0) return `x-mcp-header '${raw}' is not case-insensitively unique (also declared as '${prior}')`;\n\t\t\tseenLower.set(lower, raw);\n\t\t\tdeclarations.push({\n\t\t\t\tpath,\n\t\t\t\theaderName: raw,\n\t\t\t\ttype\n\t\t\t});\n\t\t}\n\t\tconst properties = schema.properties;\n\t\tif (properties !== null && typeof properties === \"object\") for (const [key, child] of Object.entries(properties)) {\n\t\t\tconst fault$1 = visit(child, [...path, key], reachable);\n\t\t\tif (fault$1 !== void 0) return fault$1;\n\t\t}\n\t\tfor (const k of NON_REACHABLE_SUBSCHEMA_KEYWORDS) {\n\t\t\tconst sub = schema[k];\n\t\t\tif (sub === void 0) continue;\n\t\t\tconst branches = Array.isArray(sub) ? sub : sub !== null && typeof sub === \"object\" && OBJECT_VALUED_SUBSCHEMA_KEYWORDS.has(k) ? Object.values(sub) : [sub];\n\t\t\tfor (const branch of branches) {\n\t\t\t\tconst fault$1 = visit(branch, [...path, `<${k}>`], false);\n\t\t\t\tif (fault$1 !== void 0) return fault$1;\n\t\t\t}\n\t\t}\n\t};\n\tconst fault = visit(inputSchema, [], true);\n\treturn fault === void 0 ? {\n\t\tvalid: true,\n\t\tdeclarations\n\t} : {\n\t\tvalid: false,\n\t\treason: fault\n\t};\n}\n/**\n* JSON Schema keywords whose subschemas the SEP-2243 static-reachability\n* constraint excludes from the `properties`-only chain. An `x-mcp-header`\n* found under any of these invalidates the tool definition.\n*/\nconst NON_REACHABLE_SUBSCHEMA_KEYWORDS = [\n\t\"items\",\n\t\"prefixItems\",\n\t\"contains\",\n\t\"additionalProperties\",\n\t\"unevaluatedProperties\",\n\t\"unevaluatedItems\",\n\t\"propertyNames\",\n\t\"patternProperties\",\n\t\"dependentSchemas\",\n\t\"oneOf\",\n\t\"anyOf\",\n\t\"allOf\",\n\t\"not\",\n\t\"if\",\n\t\"then\",\n\t\"else\",\n\t\"$defs\",\n\t\"definitions\"\n];\n/**\n* Subschema-carrying keywords whose value is a `name → subschema` object\n* (not a single subschema or array of subschemas). The visit branches over\n* `Object.values()` for these.\n*/\nconst OBJECT_VALUED_SUBSCHEMA_KEYWORDS = new Set([\n\t\"patternProperties\",\n\t\"dependentSchemas\",\n\t\"$defs\",\n\t\"definitions\"\n]);\nfunction pathName(path) {\n\treturn path.length === 0 ? \"<root>\" : path.join(\".\");\n}\nconst BASE64_SENTINEL_PREFIX = \"=?base64?\";\nconst BASE64_SENTINEL_SUFFIX = \"?=\";\nconst BASE64_CANONICAL = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\nconst CANONICAL_DECIMAL = /^-?\\d+(\\.\\d+)?$/;\n/**\n* Convert a primitive argument value to its string representation per the\n* spec's type-conversion rules: strings pass through, integers and numbers\n* become their decimal string, booleans become lowercase `'true'` / `'false'`.\n* Non-finite numbers and integers outside the safe range are refused (the\n* caller treats `undefined` as \"do not emit a header for this value\").\n*/\nfunction mcpParamPrimitiveToString(value) {\n\tif (typeof value === \"string\") return value;\n\tif (typeof value === \"boolean\") return value ? \"true\" : \"false\";\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isFinite(value)) return void 0;\n\t\tif (Number.isInteger(value) && !Number.isSafeInteger(value)) return void 0;\n\t\treturn String(value);\n\t}\n}\nfunction base64ToUtf8(b64) {\n\tconst bin = atob(b64);\n\tconst bytes = new Uint8Array(bin.length);\n\tfor (let i = 0; i < bin.length; i++) bytes[i] = bin.codePointAt(i);\n\treturn new TextDecoder(\"utf-8\", { fatal: true }).decode(bytes);\n}\n/**\n* Decode an `Mcp-Param-*` header value: when it carries the Base64 sentinel,\n* the payload is decoded as UTF-8; otherwise the value is returned as-is.\n* Returns `undefined` when the sentinel is present but the payload is not\n* canonical Base64 (or not valid UTF-8) — the spec requires servers to reject\n* such values.\n*/\nfunction decodeMcpParamValue(value) {\n\tif (!(value.startsWith(BASE64_SENTINEL_PREFIX) && value.endsWith(BASE64_SENTINEL_SUFFIX))) return value;\n\tconst b64 = value.slice(9, value.length - 2);\n\tif (!BASE64_CANONICAL.test(b64)) return void 0;\n\ttry {\n\t\treturn base64ToUtf8(b64);\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction valueAtPath(root, path) {\n\tlet node = root;\n\tfor (const key of path) {\n\t\tif (node === null || typeof node !== \"object\") return void 0;\n\t\tnode = node[key];\n\t}\n\treturn node;\n}\n/**\n* The header/body comparison the server performs at tool-resolution time.\n*\n* For each `x-mcp-header` declaration on the named tool: when the body\n* `arguments` carries a value, the matching `Mcp-Param-{Name}` header MUST be\n* present and decode to an equal value; when the body value is `null` or\n* absent the server MUST NOT expect the header (a present header is ignored).\n* A sentinel-carrying header whose payload is not canonical Base64 / valid\n* UTF-8 is rejected as invalid characters.\n*\n* Integer-typed declarations are compared numerically (the spec's SHOULD —\n* `42.0` and `42` are equal); everything else is compared as decoded strings.\n*\n* Returns `undefined` when every check passes, or an\n* {@linkcode InboundLadderRejection} carrying the same `-32020`\n* (`HeaderMismatch`) shape the inbound classifier emits for the\n* standard-header cross-checks — `400 Bad Request` with the disagreeing pair\n* in `data.mismatch`.\n*/\nfunction validateMcpParamHeaders(declarations, args, headers) {\n\tfor (const decl of declarations) {\n\t\tconst headerKey = `${MCP_PARAM_HEADER_PREFIX}${decl.headerName}`;\n\t\tconst headerValue = headers.get(headerKey);\n\t\tconst bodyRaw = valueAtPath(args, decl.path);\n\t\tif (bodyRaw === void 0 || bodyRaw === null) continue;\n\t\tconst bodyString = mcpParamPrimitiveToString(bodyRaw);\n\t\tif (bodyString === void 0) continue;\n\t\tif (headerValue === null) return paramHeaderMismatchRejection(\"param-header-missing\", headerKey, `the body carries ${pathName(decl.path)}=${JSON.stringify(bodyRaw)} but the ${headerKey} header is absent`);\n\t\tconst decoded = decodeMcpParamValue(headerValue);\n\t\tif (decoded === void 0) return paramHeaderMismatchRejection(\"param-header-invalid-encoding\", headerKey, `the ${headerKey} header carries an invalid Base64 sentinel value`);\n\t\tif (!((decl.type === \"integer\" || decl.type === \"number\") && CANONICAL_DECIMAL.test(decoded) && typeof bodyRaw === \"number\" ? Number(decoded) === bodyRaw : decoded === bodyString)) return paramHeaderMismatchRejection(\"param-header-mismatch\", headerKey, `the ${headerKey} header decodes to ${JSON.stringify(decoded)} but the body carries ${pathName(decl.path)}=${JSON.stringify(bodyRaw)}`);\n\t}\n}\n/**\n* Build the `-32020` (`HeaderMismatch`) rejection for an `Mcp-Param-*`\n* disagreement. Same shape as the inbound classifier's standard-header\n* cross-check mismatch (HTTP `400`, `data.mismatch` naming the disagreeing\n* pair, `settled: true`); only the rung differs because this check runs at the\n* pre-dispatch step against a known tool's schema rather than at the edge.\n*/\nfunction paramHeaderMismatchRejection(cell, header, body) {\n\treturn {\n\t\tkind: \"reject\",\n\t\trung: \"param-header-validation\",\n\t\tcell,\n\t\thttpStatus: 400,\n\t\tcode: HEADER_MISMATCH_ERROR_CODE,\n\t\tmessage: `Bad Request: the request headers and body disagree: ${body}`,\n\t\tdata: { mismatch: {\n\t\t\theader,\n\t\t\tbody\n\t\t} },\n\t\tsettled: true\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/shared/inboundClassification.ts\n/**\n* Inbound HTTP request classification and the inbound validation ladder\n* (protocol revision 2026-07-28).\n*\n* `classifyInboundRequest` is the body-primary era predicate for an HTTP\n* entry that serves both protocol eras on one endpoint. It is evaluated\n* exactly once, at the entry boundary, on the already-parsed request body:\n*\n* - `initialize` is a legacy-era request by definition (the modern era has no\n*   `initialize` handshake) — unless it carries a valid envelope claim naming\n*   a modern revision, in which case the claim wins and the request is\n*   classified like any other enveloped request (the modern era then answers\n*   it with method-not-found, exactly like every other method it does not\n*   define).\n* - A request whose `params._meta` carries the reserved protocol-version key\n*   claims the per-request envelope mechanism and classifies into the era the\n*   named revision belongs to (a malformed envelope behind a present claim is\n*   a validation error, never a silent fall back to legacy handling).\n* - A request without a claim is legacy-era traffic.\n* - The `MCP-Protocol-Version` header is a cross-check only: it never\n*   upgrades or downgrades a body-derived classification, and a disagreement\n*   between header and body is an explicit ladder outcome.\n* - Notifications carry no envelope claim of their own under the current\n*   spec, so for notification POSTs without a body claim the modern header is\n*   determinative; the `Mcp-Method` header is validated against the body when\n*   the message classifies modern and is never enforced on legacy traffic.\n*   A notification that does carry a claim is treated body-primary like a\n*   request, and a malformed claim is rejected the same way a request's\n*   malformed claim is — never silently resolved against the header.\n*   The notification-POST header cross-checks here are an SDK-defensive\n*   posture, not a spec requirement: the spec leaves header rules for posted\n*   notifications undefined (core client notifications do not occur over\n*   Streamable HTTP); applying the request rules symmetrically is what an\n*   ecosystem custom-notification POST expects, and the −32020 cells stay\n*   passing for them.\n* - `GET`/`DELETE` (and any other non-`POST` method) are body-less 2025-era\n*   session operations: the modern era is `POST`-only, so they are routed to\n*   legacy serving when it is configured and rejected otherwise.\n* - Array (batch) bodies are classified element-wise: an array containing a\n*   modern-claiming or invalid element is rejected, an all-legacy array is\n*   legacy traffic unchanged, and a single-element array is still an array.\n*\n* The classifier returns plain values (it never throws and never touches a\n* transport): a routing outcome (`legacy`/`modern`) or a ladder rejection\n* carrying the JSON-RPC error to emit and the HTTP status to emit it with.\n* Legacy routing outcomes deliberately carry NO `MessageClassification` —\n* legacy and hand-wired traffic is never classified, which keeps its\n* dispatch behavior byte-identical to today's.\n*\n* Error codes for the modern-path rejection cells follow the published\n* conformance suite (and the spec text it asserts):\n*\n* - A header/body cross-check mismatch (the `MCP-Protocol-Version` header\n*   disagreeing with the body, or the `Mcp-Method` header disagreeing with the\n*   body method) is rejected with `-32020` (`HeaderMismatch`) on HTTP 400.\n* - A request whose protocol-version header names a modern revision but whose\n*   body carries no `_meta` envelope claim — including an envelope present but\n*   missing the required protocol-version key — is rejected with `-32602`\n*   (invalid params) naming the missing key(s), on HTTP 400.\n*\n* Should a future spec revision or conformance release change these\n* assignments, the affected cells are re-derived against that release; the\n* `settled` flag on {@linkcode InboundLadderRejection} stays available to mark\n* a cell provisional again while such a change is in flight.\n*/\n/**\n* The error code emitted for header/body cross-check mismatches: the\n* `MCP-Protocol-Version` header disagreeing with the body's envelope claim (or\n* with the body's classification), and the `Mcp-Method` header disagreeing\n* with the body method.\n*\n* `-32020` is the draft schema's `HEADER_MISMATCH` constant (the SEP-2243\n* `HeaderMismatch` code; the spec requires HTTP 400 for it), as also asserted\n* by the published conformance suite for header-validation failures. It has no\n* {@linkcode ProtocolErrorCode} member because it is not part of the 2025-era\n* wire vocabulary; the validation ladder is its only emitter.\n*/\nconst HEADER_MISMATCH_ERROR_CODE = -32020;\n/**\n* The inbound validation ladder, expressed as data rather than control flow.\n*\n* The edge rungs are evaluated by {@linkcode classifyInboundRequest}; the\n* dispatch rungs are evaluated by the protocol layer once the classified\n* message is injected into a per-request server instance (the era registry\n* gate, the envelope requiredness check, and per-method params validation).\n* The client-capability rung is evaluated by the HTTP entry itself,\n* pre-dispatch, on the validated envelope the classifier produced — see that\n* rung's rationale for the ordering caveat. The order is the precedence: a\n* request that fails several rungs is answered by the earliest one.\n*/\nconst INBOUND_VALIDATION_LADDER = [\n\t{\n\t\trung: \"http-method\",\n\t\torder: 1,\n\t\tevaluatedAt: \"edge\",\n\t\tcodes: [-32e3],\n\t\tconformance: [],\n\t\trationale: \"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read.\"\n\t},\n\t{\n\t\trung: \"jsonrpc-shape\",\n\t\torder: 2,\n\t\tevaluatedAt: \"edge\",\n\t\tcodes: [ProtocolErrorCode.InvalidRequest],\n\t\tconformance: [\"server-stateless\"],\n\t\trationale: \"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic.\"\n\t},\n\t{\n\t\trung: \"era-classification\",\n\t\torder: 3,\n\t\tevaluatedAt: \"edge\",\n\t\tcodes: [HEADER_MISMATCH_ERROR_CODE, ProtocolErrorCode.UnsupportedProtocolVersion],\n\t\tconformance: [\n\t\t\t\"server-stateless\",\n\t\t\t\"http-header-validation\",\n\t\t\t\"http-custom-header-server-validation\"\n\t\t],\n\t\trationale: \"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions.\"\n\t},\n\t{\n\t\trung: \"envelope\",\n\t\torder: 4,\n\t\tevaluatedAt: \"edge\",\n\t\tcodes: [ProtocolErrorCode.InvalidParams],\n\t\tconformance: [\"server-stateless\"],\n\t\trationale: \"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400.\"\n\t},\n\t{\n\t\trung: \"method-registry\",\n\t\torder: 5,\n\t\tevaluatedAt: \"dispatch\",\n\t\tcodes: [ProtocolErrorCode.MethodNotFound],\n\t\tconformance: [\"server-stateless\"],\n\t\trationale: \"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at.\"\n\t},\n\t{\n\t\trung: \"request-params\",\n\t\torder: 6,\n\t\tevaluatedAt: \"dispatch\",\n\t\tcodes: [ProtocolErrorCode.InvalidParams],\n\t\tconformance: [],\n\t\trationale: \"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table.\"\n\t},\n\t{\n\t\trung: \"standard-header-validation\",\n\t\torder: 7,\n\t\tevaluatedAt: \"pre-dispatch\",\n\t\tcodes: [HEADER_MISMATCH_ERROR_CODE],\n\t\tconformance: [\"http-header-validation\"],\n\t\trationale: \"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted.\"\n\t},\n\t{\n\t\trung: \"client-capabilities\",\n\t\torder: 8,\n\t\tevaluatedAt: \"pre-dispatch\",\n\t\tcodes: [ProtocolErrorCode.MissingRequiredClientCapability],\n\t\tconformance: [\"server-stateless\"],\n\t\trationale: \"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable.\"\n\t},\n\t{\n\t\trung: \"param-header-validation\",\n\t\torder: 9,\n\t\tevaluatedAt: \"pre-dispatch\",\n\t\tcodes: [HEADER_MISMATCH_ERROR_CODE],\n\t\tconformance: [\"http-custom-header-server-validation\"],\n\t\trationale: \"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung.\"\n\t}\n];\n/**\n* HTTP status for ladder-originated JSON-RPC error codes.\n*\n* Keyed on origin, not on the bare code: this table only applies to errors\n* the ladder (or a pre-handler protocol gate) produced. Errors produced by\n* request handlers — whatever their code — stay in-band on HTTP 200, and are\n* never mapped to an HTTP status by this table; in particular `-32603` and\n* domain-specific codes never become a blanket 500. The single exception is\n* `MissingRequiredClientCapability` (-32021) — see\n* {@linkcode httpStatusForErrorCode}.\n*\n* `-32602` (invalid params) deliberately has NO entry: the only invalid-params\n* rejection that maps to HTTP 400 is the classifier's own envelope rung\n* short-circuit, which carries its HTTP status directly. A dispatch- or\n* handler-produced invalid-params error is always in-band.\n*/\nconst LADDER_ERROR_HTTP_STATUS = {\n\t[ProtocolErrorCode.ParseError]: 400,\n\t[ProtocolErrorCode.InvalidRequest]: 400,\n\t[ProtocolErrorCode.MethodNotFound]: 404,\n\t[ProtocolErrorCode.UnsupportedProtocolVersion]: 400,\n\t[ProtocolErrorCode.MissingRequiredClientCapability]: 400,\n\t[HEADER_MISMATCH_ERROR_CODE]: 400\n};\n/**\n* The HTTP status to answer a JSON-RPC error with, keyed on the error's\n* origin. `in-band` errors (anything produced by a request handler) are\n* HTTP 200 — the JSON-RPC error response is the payload, not an HTTP\n* failure — with ONE exception: `MissingRequiredClientCapability` (-32021),\n* whose 400 the spec mandates on the error itself with no origin condition,\n* and which the SDK genuinely produces after dispatch (the `input_required`\n* capability gate). A handler relaying some downstream peer's `-32020`/`-32022`\n* is NOT that peer's spec error and stays in-band like every other handler\n* code. `ladder` errors map through {@linkcode LADDER_ERROR_HTTP_STATUS}.\n*\n* The per-request transport intentionally does NOT delegate to this function:\n* its `?? 400` ladder fallback is only correct for entry-gate codes known to\n* the table, and would wrongly map dispatch-window errors outside it (a\n* window `-32602` must stay in-band on 200). The transport indexes the table\n* directly; keep the two in agreement when editing either.\n*/\nfunction httpStatusForErrorCode(code, origin) {\n\tif (origin === \"in-band\") return code === ProtocolErrorCode.MissingRequiredClientCapability ? 400 : 200;\n\treturn LADDER_ERROR_HTTP_STATUS[code] ?? 400;\n}\nfunction rejection(rung, cell, httpStatus, error, settled) {\n\treturn {\n\t\tkind: \"reject\",\n\t\trung,\n\t\tcell,\n\t\thttpStatus,\n\t\tcode: error.code,\n\t\tmessage: error.message,\n\t\t...error.data !== void 0 && { data: error.data },\n\t\tsettled\n\t};\n}\nfunction crossCheckMismatch(cell, header, body, rung = \"era-classification\") {\n\treturn rejection(rung, cell, 400, new ProtocolError(HEADER_MISMATCH_ERROR_CODE, `Bad Request: the request headers and body disagree: ${body}`, { mismatch: {\n\t\theader,\n\t\tbody\n\t} }), true);\n}\n/**\n* The methods whose body carries a `params.name` / `params.uri` value the\n* `Mcp-Name` header must mirror, and which body field supplies it (SEP-2243\n* § Standard Request Headers, `Required For` column).\n*/\nconst MCP_NAME_HEADER_SOURCE = {\n\t\"tools/call\": \"name\",\n\t\"prompts/get\": \"name\",\n\t\"resources/read\": \"uri\"\n};\n/** Strip RFC 9110 optional whitespace (SP / HTAB) around a field value in linear time. */\nfunction stripHttpOws(value) {\n\tlet start = 0;\n\twhile (start < value.length) {\n\t\tconst code = value.codePointAt(start);\n\t\tif (code !== 9 && code !== 32) break;\n\t\tstart += 1;\n\t}\n\tlet end = value.length;\n\twhile (end > start) {\n\t\tconst code = value.codePointAt(end - 1);\n\t\tif (code !== 9 && code !== 32) break;\n\t\tend -= 1;\n\t}\n\treturn start === 0 && end === value.length ? value : value.slice(start, end);\n}\n/**\n* SEP-2243 standard-header server-side validation, evaluated by the HTTP\n* entry on a modern-classified request immediately after\n* {@linkcode classifyInboundRequest} returns a modern route.\n*\n* Returns the `-32020` (`HeaderMismatch`) ladder rejection (HTTP `400`,\n* `standard-header-validation` rung — the same shape\n* {@linkcode classifyInboundRequest} already emits on the edge\n* `era-classification` rung for the `MCP-Protocol-Version` and\n* `Mcp-Method` *mismatch* cells) when:\n*\n* - the required `Mcp-Method` header is absent;\n* - the required `Mcp-Name` header is absent on a `tools/call`,\n*   `prompts/get`, or `resources/read` request whose body carries the\n*   `params.name` / `params.uri` value the header mirrors;\n* - the `Mcp-Name` header carries an invalid `=?base64?…?=` sentinel; or\n* - the (decoded) `Mcp-Name` value disagrees with the body's\n*   `params.name` / `params.uri`.\n*\n* Returns `undefined` (pass) for notifications (the spec table reads\n* \"All requests\"), for methods that have no `Mcp-Name` source, and when the\n* headers agree with the body. Never enforced on legacy traffic — the entry\n* only calls this on a modern route.\n*\n* Kept separate from {@linkcode classifyInboundRequest} so that a body-only\n* call to the classifier (no headers passed) keeps routing a modern request\n* unchanged: the classifier remains a pure body-primary router, and this\n* function is the presence/`Mcp-Name` half of the standard-header rung the\n* entry layers on top.\n*/\nfunction validateStandardRequestHeaders(request, route) {\n\tif (route.messageKind !== \"request\") return;\n\tconst method = route.message.method;\n\tif (request.mcpMethodHeader === void 0) return crossCheckMismatch(\"method-header-missing\", \"(missing)\", `the body names method ${method} but the required Mcp-Method header is absent`, \"standard-header-validation\");\n\tconst sourceField = Object.hasOwn(MCP_NAME_HEADER_SOURCE, method) ? MCP_NAME_HEADER_SOURCE[method] : void 0;\n\tif (sourceField === void 0) return;\n\tconst sourceValue = route.message.params?.[sourceField];\n\tconst bodyValue = typeof sourceValue === \"string\" ? sourceValue : void 0;\n\tif (request.mcpNameHeader === void 0) {\n\t\tif (bodyValue === void 0) return;\n\t\treturn crossCheckMismatch(\"name-header-missing\", \"(missing)\", `the body carries params.${sourceField}=\"${bodyValue}\" but the required Mcp-Name header is absent`, \"standard-header-validation\");\n\t}\n\tconst normalizedNameHeader = stripHttpOws(request.mcpNameHeader);\n\tconst decoded = decodeMcpParamValue(normalizedNameHeader);\n\tif (decoded === void 0) return crossCheckMismatch(\"name-header-invalid-encoding\", normalizedNameHeader, \"the Mcp-Name header carries an invalid Base64 sentinel value\", \"standard-header-validation\");\n\tif (bodyValue !== void 0 && decoded !== bodyValue) return crossCheckMismatch(\"name-header-mismatch\", normalizedNameHeader, `the body carries params.${sourceField}=\"${bodyValue}\" but the Mcp-Name header names \"${decoded}\"`, \"standard-header-validation\");\n}\nfunction isPlainObject$2(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\nfunction classificationForClaim(claimedVersion) {\n\tif (claimedVersion === void 0) return { era: \"modern\" };\n\treturn {\n\t\tera: isModernProtocolVersion(claimedVersion) ? \"modern\" : \"legacy\",\n\t\trevision: claimedVersion\n\t};\n}\n/**\n* Whether a request's params carry a per-request envelope claim that is both\n* well-formed and names a modern protocol revision.\n*\n* Used by the `initialize` precedence rule: only such a claim overrides the\n* `initialize` ⇒ legacy-handshake classification — a request carrying a valid\n* modern envelope is a modern request regardless of its method name, and the\n* modern era then answers `initialize` exactly like any other method it does\n* not define (method-not-found). A malformed claim, or one naming a pre-2026\n* revision, keeps the legacy-handshake routing unchanged.\n*\n* Exported on the core internal barrel for the stdio serving entry, which\n* applies the same precedence rule to a connection's opening message; not\n* public API.\n*/\nfunction carriesValidModernEnvelopeClaim(params) {\n\tif (!hasEnvelopeClaim(params)) return false;\n\tconst claimedVersion = envelopeClaimVersion(params);\n\tif (claimedVersion === void 0 || !isModernProtocolVersion(claimedVersion)) return false;\n\tconst meta = requestMetaOf(params);\n\treturn meta !== void 0 && validateEnvelopeMeta(meta).length === 0;\n}\nfunction classifyBatch(body) {\n\tif (body.length === 0) return rejection(\"jsonrpc-shape\", \"empty-batch\", 400, new ProtocolError(ProtocolErrorCode.InvalidRequest, \"Bad Request: empty JSON-RPC batch\"), true);\n\tfor (const element of body) {\n\t\tif (hasEnvelopeClaim(isPlainObject$2(element) ? element[\"params\"] : void 0)) return rejection(\"jsonrpc-shape\", \"batch-with-modern-element\", 400, new ProtocolError(ProtocolErrorCode.InvalidRequest, \"Bad Request: JSON-RPC batches may not contain requests for protocol revision 2026-07-28 or later\"), true);\n\t\tif (!(isJSONRPCRequest(element) || isJSONRPCNotification(element) || isJSONRPCResultResponse(element) || isJSONRPCErrorResponse(element))) return rejection(\"jsonrpc-shape\", \"batch-with-invalid-element\", 400, new ProtocolError(ProtocolErrorCode.InvalidRequest, \"Bad Request: JSON-RPC batch contains an invalid message\"), true);\n\t}\n\treturn {\n\t\tkind: \"legacy\",\n\t\treason: \"batch\"\n\t};\n}\nfunction classifyRequestBody(request, body) {\n\tconst params = body.params;\n\tconst method = body.method;\n\tconst headerVersion = request.protocolVersionHeader;\n\tconst headerNamesModern = headerVersion !== void 0 && isModernProtocolVersion(headerVersion);\n\tif (method === \"initialize\" && !carriesValidModernEnvelopeClaim(params)) {\n\t\tif (headerNamesModern) return crossCheckMismatch(\"initialize-with-modern-header\", headerVersion, \"an initialize request (legacy handshake) was sent with a modern MCP-Protocol-Version header\");\n\t\tconst requestedVersion = isPlainObject$2(params) && typeof params[\"protocolVersion\"] === \"string\" ? params[\"protocolVersion\"] : void 0;\n\t\treturn {\n\t\t\tkind: \"legacy\",\n\t\t\treason: \"initialize\",\n\t\t\t...requestedVersion !== void 0 && { requestedVersion }\n\t\t};\n\t}\n\tif (hasEnvelopeClaim(params)) {\n\t\tconst meta = requestMetaOf(params);\n\t\tconst firstIssue = (meta === void 0 ? [] : validateEnvelopeMeta(meta))[0];\n\t\tif (firstIssue !== void 0) return rejection(\"envelope\", \"envelope-invalid\", 400, new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid _meta envelope for protocol revision 2026-07-28: ${firstIssue.key}: ${firstIssue.problem}`, { envelope: firstIssue }), true);\n\t\tconst claimedVersion = envelopeClaimVersion(params);\n\t\tif (headerVersion !== void 0 && claimedVersion !== void 0 && headerVersion !== claimedVersion) return crossCheckMismatch(\"header-body-version-mismatch\", headerVersion, `the body envelope names protocol version ${claimedVersion} but the MCP-Protocol-Version header names ${headerVersion}`);\n\t\tif (request.mcpMethodHeader !== void 0 && request.mcpMethodHeader !== method) return crossCheckMismatch(\"method-header-mismatch\", request.mcpMethodHeader, `the body names method ${method} but the Mcp-Method header names ${request.mcpMethodHeader}`);\n\t\treturn {\n\t\t\tkind: \"modern\",\n\t\t\tmessageKind: \"request\",\n\t\t\tmessage: body,\n\t\t\tclassification: classificationForClaim(claimedVersion)\n\t\t};\n\t}\n\tif (headerNamesModern) {\n\t\tconst meta = requestMetaOf(params);\n\t\tconst missingFromEnvelope = validateEnvelopeMeta(meta ?? {}).filter((issue) => issue.problem === \"missing\").map((issue) => issue.key);\n\t\tconst missing = meta === void 0 ? [\"_meta\"] : missingFromEnvelope.length > 0 ? missingFromEnvelope : [PROTOCOL_VERSION_META_KEY];\n\t\treturn rejection(\"envelope\", \"modern-header-without-claim\", 400, new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid params: the MCP-Protocol-Version header names protocol revision ${headerVersion}, but the request is missing the required per-request envelope key(s): ${missing.join(\", \")}`, { envelope: { missing } }), true);\n\t}\n\treturn {\n\t\tkind: \"legacy\",\n\t\treason: \"no-claim\",\n\t\t...headerVersion !== void 0 && { requestedVersion: headerVersion }\n\t};\n}\nfunction classifyNotificationBody(request, body) {\n\tconst params = body.params;\n\tconst method = body.method;\n\tconst headerVersion = request.protocolVersionHeader;\n\tconst headerNamesModern = headerVersion !== void 0 && isModernProtocolVersion(headerVersion);\n\tif (hasEnvelopeClaim(params)) {\n\t\tconst claimedVersion = envelopeClaimVersion(params);\n\t\tif (claimedVersion === void 0) {\n\t\t\tconst meta = requestMetaOf(params);\n\t\t\tconst claimIssue = (meta === void 0 ? [] : validateEnvelopeMeta(meta)).find((issue) => issue.key === PROTOCOL_VERSION_META_KEY) ?? {\n\t\t\t\tkey: PROTOCOL_VERSION_META_KEY,\n\t\t\t\tproblem: \"expected a protocol version string\"\n\t\t\t};\n\t\t\treturn rejection(\"envelope\", \"notification-envelope-invalid\", 400, new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid _meta envelope for protocol revision 2026-07-28: ${claimIssue.key}: ${claimIssue.problem}`, { envelope: claimIssue }), true);\n\t\t}\n\t\tif (headerVersion !== void 0 && headerVersion !== claimedVersion) return crossCheckMismatch(\"notification-header-body-version-mismatch\", headerVersion, `the notification envelope names protocol version ${claimedVersion} but the MCP-Protocol-Version header names ${headerVersion}`);\n\t\tconst classification = classificationForClaim(claimedVersion);\n\t\tif (classification.era === \"modern\" && request.mcpMethodHeader !== void 0 && request.mcpMethodHeader !== method) return crossCheckMismatch(\"notification-method-header-mismatch\", request.mcpMethodHeader, `the notification body names method ${method} but the Mcp-Method header names ${request.mcpMethodHeader}`);\n\t\treturn {\n\t\t\tkind: \"modern\",\n\t\t\tmessageKind: \"notification\",\n\t\t\tmessage: body,\n\t\t\tclassification\n\t\t};\n\t}\n\tif (headerNamesModern) {\n\t\tif (request.mcpMethodHeader !== void 0 && request.mcpMethodHeader !== method) return crossCheckMismatch(\"notification-method-header-mismatch\", request.mcpMethodHeader, `the notification body names method ${method} but the Mcp-Method header names ${request.mcpMethodHeader}`);\n\t\treturn {\n\t\t\tkind: \"modern\",\n\t\t\tmessageKind: \"notification\",\n\t\t\tmessage: body,\n\t\t\tclassification: {\n\t\t\t\tera: \"modern\",\n\t\t\t\trevision: headerVersion\n\t\t\t}\n\t\t};\n\t}\n\treturn {\n\t\tkind: \"legacy\",\n\t\treason: \"notification\",\n\t\t...headerVersion !== void 0 && { requestedVersion: headerVersion }\n\t};\n}\n/**\n* Classifies one inbound HTTP request for dual-era serving.\n*\n* The body-primary predicate, evaluated once at the entry boundary: see the\n* module documentation for the rules. Returns a routing outcome (`legacy` or\n* `modern`) or a ladder rejection; it never throws.\n*/\nfunction classifyInboundRequest(request) {\n\trequest = {\n\t\t...request,\n\t\t...request.protocolVersionHeader !== void 0 && { protocolVersionHeader: stripHttpOws(request.protocolVersionHeader) },\n\t\t...request.mcpMethodHeader !== void 0 && { mcpMethodHeader: stripHttpOws(request.mcpMethodHeader) },\n\t\t...request.mcpNameHeader !== void 0 && { mcpNameHeader: stripHttpOws(request.mcpNameHeader) }\n\t};\n\tif (request.httpMethod.toUpperCase() !== \"POST\") return {\n\t\tkind: \"legacy\",\n\t\treason: \"http-method\"\n\t};\n\tconst body = request.body;\n\tif (Array.isArray(body)) return classifyBatch(body);\n\tif (isJSONRPCResultResponse(body) || isJSONRPCErrorResponse(body)) return {\n\t\tkind: \"legacy\",\n\t\treason: \"response\"\n\t};\n\tif (isPlainObject$2(body) && isJSONRPCRequest(body)) return classifyRequestBody(request, body);\n\tif (isPlainObject$2(body) && isJSONRPCNotification(body)) return classifyNotificationBody(request, body);\n\treturn rejection(\"jsonrpc-shape\", \"invalid-json-rpc-body\", 400, new ProtocolError(ProtocolErrorCode.InvalidRequest, \"Bad Request: the request body is not a valid JSON-RPC message\"), true);\n}\n/**\n* The rejection a modern-only endpoint (no legacy serving configured)\n* answers a legacy-classified request with.\n*\n* - Envelope-less requests (including `initialize`) are answered with the\n*   unsupported-protocol-version error carrying the endpoint's supported\n*   versions and echoing the version the request named (when it named one —\n*   `requested` is omitted rather than fabricated when the request named no\n*   version at all), so a legacy client can discover what the endpoint serves\n*   from the error alone.\n* - Posted responses and batch arrays are invalid requests on the modern era.\n* - Non-`POST` methods are not allowed.\n* - Legacy-classified notifications return `undefined`: the caller answers\n*   202 with no body and does not dispatch the notification (accept-and-drop).\n*/\nfunction modernOnlyStrictRejection(route, supportedVersions) {\n\tswitch (route.reason) {\n\t\tcase \"http-method\": return rejection(\"http-method\", \"modern-only-method-not-allowed\", 405, new ProtocolError(-32e3, \"Method not allowed.\"), true);\n\t\tcase \"batch\": return rejection(\"jsonrpc-shape\", \"modern-only-batch-not-supported\", 400, new ProtocolError(ProtocolErrorCode.InvalidRequest, \"Bad Request: JSON-RPC batches are not supported by this endpoint\"), true);\n\t\tcase \"response\": return rejection(\"jsonrpc-shape\", \"modern-only-response-post\", 400, new ProtocolError(ProtocolErrorCode.InvalidRequest, \"Bad Request: JSON-RPC responses cannot be posted to this endpoint\"), true);\n\t\tcase \"notification\": return;\n\t\tcase \"initialize\":\n\t\tcase \"no-claim\": {\n\t\t\tconst requested = route.requestedVersion;\n\t\t\treturn rejection(\"era-classification\", \"modern-only-missing-envelope\", 400, requested === void 0 ? new ProtocolError(ProtocolErrorCode.UnsupportedProtocolVersion, \"Unsupported protocol version: the request did not name a protocol version\", { supported: [...supportedVersions] }) : new UnsupportedProtocolVersionError({\n\t\t\t\tsupported: [...supportedVersions],\n\t\t\t\trequested\n\t\t\t}), true);\n\t\t}\n\t}\n}\n\n//#endregion\n//#region ../core-internal/src/util/schema.ts\n/**\n* Internal Zod schema utilities for protocol handling.\n* These are used internally by the SDK for protocol message validation.\n*/\n/**\n* Parses data against a Zod schema (synchronous).\n* Returns a discriminated union with success/error.\n*/\nfunction parseSchema(schema, data) {\n\treturn z.safeParse(schema, data);\n}\n/**\n* Union of the declared shape keys across several Zod object schemas.\n*/\nfunction shapeKeys(schemas) {\n\treturn new Set(schemas.flatMap((schema) => Object.keys(schema.shape)));\n}\n\n//#endregion\n//#region ../core-internal/src/util/standardSchema.ts\n/**\n* Standard Schema utilities for user-provided schemas.\n* Supports Zod v4, Valibot, ArkType, and other Standard Schema implementations.\n* @see https://standardschema.dev\n*/\nfunction isStandardSchema(schema) {\n\tif (schema == null) return false;\n\tconst schemaType = typeof schema;\n\tif (schemaType !== \"object\" && schemaType !== \"function\") return false;\n\tif (!(\"~standard\" in schema)) return false;\n\treturn typeof schema[\"~standard\"]?.validate === \"function\";\n}\nlet warnedZodFallback = false;\n/** JSON Schema draft targeted by every conversion; shared so pattern references above stay in lockstep. */\nconst JSON_SCHEMA_CONVERSION_TARGET = \"draft-2020-12\";\n/**\n* Converts a StandardSchema to JSON Schema for use as an MCP tool/prompt schema.\n*\n* MCP requires `type: \"object\"` at the root of tool `inputSchema` and prompt\n* argument schemas; `outputSchema` may have any JSON Schema root (SEP-2106).\n* Zod's discriminated unions emit `{oneOf: [...]}` without a top-level `type`,\n* so for `io: 'input'` this function defaults `type` to `\"object\"` when absent\n* and throws on an explicit non-object `type` (e.g. `z.string()`). For\n* `io: 'output'` a non-object root is returned as-is; the `\"object\"` default is\n* applied only when the root is provably object-shaped.\n*/\nfunction standardSchemaToJsonSchema(schema, io = \"input\") {\n\tconst std = schema[\"~standard\"];\n\tlet result;\n\tif (std.jsonSchema) result = std.jsonSchema[io]({ target: JSON_SCHEMA_CONVERSION_TARGET });\n\telse if (std.vendor === \"zod\") {\n\t\tif (!(\"_zod\" in schema)) throw new Error(\"Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().\");\n\t\tif (!warnedZodFallback) {\n\t\t\twarnedZodFallback = true;\n\t\t\tconsole.warn(\"[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.\");\n\t\t}\n\t\tresult = z.toJSONSchema(schema, {\n\t\t\ttarget: JSON_SCHEMA_CONVERSION_TARGET,\n\t\t\tio\n\t\t});\n\t} else throw new Error(`Schema library \"${std.vendor}\" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);\n\tif (io === \"output\") {\n\t\tif (result.type !== void 0) return result;\n\t\treturn isProvablyObjectShapedRoot(result) ? {\n\t\t\ttype: \"object\",\n\t\t\t...result\n\t\t} : result;\n\t}\n\tif (result.type !== void 0 && result.type !== \"object\") throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(result.type)}). Wrap your schema in z.object({...}) or equivalent.`);\n\treturn {\n\t\ttype: \"object\",\n\t\t...result\n\t};\n}\n/**\n* A typeless JSON Schema root is \"provably object-shaped\" when either it carries object keywords\n* directly (`properties`/`patternProperties`/`additionalProperties`/`required`), or it is a\n* composition (`oneOf`/`anyOf`/`allOf`) whose every member is itself `type:'object'` or recursively\n* provably object-shaped (e.g. a nested `discriminatedUnion`). `$ref` is not followed. Used to\n* decide whether stamping `type:'object'` is safe (redundant-but-valid) versus self-contradictory.\n*/\nfunction isProvablyObjectShapedRoot(schema) {\n\tif (\"properties\" in schema || \"patternProperties\" in schema || \"additionalProperties\" in schema || \"required\" in schema) return true;\n\tfor (const key of [\n\t\t\"oneOf\",\n\t\t\"anyOf\",\n\t\t\"allOf\"\n\t]) {\n\t\tconst members = schema[key];\n\t\tif (Array.isArray(members) && members.length > 0) return members.every((m) => m !== null && typeof m === \"object\" && (m.type === \"object\" || isProvablyObjectShapedRoot(m)));\n\t}\n\treturn false;\n}\nfunction formatIssue(issue) {\n\tif (!issue.path?.length) return issue.message;\n\treturn `${issue.path.map((p) => String(typeof p === \"object\" ? p.key : p)).join(\".\")}: ${issue.message}`;\n}\nasync function validateStandardSchema(schema, data) {\n\tconst result = await schema[\"~standard\"].validate(data);\n\tif (result.issues && result.issues.length > 0) return {\n\t\tsuccess: false,\n\t\terror: result.issues.map((i) => formatIssue(i)).join(\", \")\n\t};\n\treturn {\n\t\tsuccess: true,\n\t\tdata: result.value\n\t};\n}\nfunction zodEmittedPattern(schema) {\n\tconst jsonSchema = z.toJSONSchema(schema, {\n\t\ttarget: JSON_SCHEMA_CONVERSION_TARGET,\n\t\tio: \"input\"\n\t});\n\treturn typeof jsonSchema.pattern === \"string\" ? jsonSchema.pattern : void 0;\n}\nconst DATETIME_FRACTION_DIGITS = /\\\\\\.\\\\d\\{(\\d+)\\}/;\nfunction datetimeReferenceSchemas(pattern) {\n\tconst fractionDigits = DATETIME_FRACTION_DIGITS.exec(pattern);\n\tconst precisions = [\n\t\tvoid 0,\n\t\t-1,\n\t\t0\n\t];\n\tif (fractionDigits) precisions.push(Number(fractionDigits[1]));\n\treturn [false, true].flatMap((local) => [false, true].flatMap((offset) => precisions.map((precision) => z.iso.datetime({\n\t\tlocal,\n\t\toffset,\n\t\tprecision\n\t}))));\n}\nfunction referencePatternsForFormat(format, pattern) {\n\tlet referenceSchemas;\n\tswitch (format) {\n\t\tcase \"email\":\n\t\t\treferenceSchemas = [z.email()];\n\t\t\tbreak;\n\t\tcase \"uri\":\n\t\t\treferenceSchemas = [z.url()];\n\t\t\tbreak;\n\t\tcase \"date\":\n\t\t\treferenceSchemas = [z.iso.date()];\n\t\t\tbreak;\n\t\tcase \"date-time\":\n\t\t\treferenceSchemas = datetimeReferenceSchemas(pattern);\n\t\t\tbreak;\n\t}\n\treturn new Set(referenceSchemas.map((schema) => zodEmittedPattern(schema)).filter((emitted) => emitted !== void 0));\n}\n/** Whether `pattern` is the library's own realization of `format` (droppable) rather than a user customization. */\nfunction isLibraryFormatPattern(format, pattern, vendor) {\n\tif (vendor !== \"zod\") return true;\n\treturn referencePatternsForFormat(format, pattern).has(pattern);\n}\nfunction promptArgumentsFromStandardSchema(schema) {\n\tconst jsonSchema = standardSchemaToJsonSchema(schema, \"input\");\n\tconst properties = jsonSchema.properties || {};\n\tconst required = jsonSchema.required || [];\n\treturn Object.entries(properties).map(([name, prop]) => ({\n\t\tname,\n\t\tdescription: prop?.description,\n\t\trequired: required.includes(name)\n\t}));\n}\n\n//#endregion\n//#region ../core-internal/src/shared/elicitation.ts\nfunction isJsonObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction convertStandardElicitationSchema(schema) {\n\ttry {\n\t\treturn standardSchemaToJsonSchema(schema, \"input\");\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tthrow new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema must describe an object with flat primitive properties: ${detail}`);\n\t}\n}\nconst ANNOTATION_ONLY_JSON_SCHEMA_KEYWORDS = new Set([\n\t\"$comment\",\n\t\"deprecated\",\n\t\"description\",\n\t\"examples\",\n\t\"readOnly\",\n\t\"title\",\n\t\"writeOnly\"\n]);\nfunction isAnnotationOnlyJsonSchemaKeyword(key) {\n\treturn ANNOTATION_ONLY_JSON_SCHEMA_KEYWORDS.has(key) || key.startsWith(\"x-\");\n}\nconst ROOT_KEYS = new Set([\"$schema\", ...Object.keys(ElicitRequestFormParamsSchema.shape.requestedSchema.shape)]);\nconst PROPERTY_KEYS_BY_TYPE = {\n\tstring: shapeKeys([\n\t\tStringSchemaSchema,\n\t\tUntitledSingleSelectEnumSchemaSchema,\n\t\tTitledSingleSelectEnumSchemaSchema,\n\t\tLegacyTitledEnumSchemaSchema\n\t]),\n\tnumber: shapeKeys([NumberSchemaSchema]),\n\tinteger: shapeKeys([NumberSchemaSchema]),\n\tboolean: shapeKeys([BooleanSchemaSchema]),\n\tarray: shapeKeys([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema])\n};\nconst SUPPORTED_STRING_FORMATS = new Set(StringSchemaSchema.shape.format.unwrap().options);\n/** Walks one property node: keeps grammar keys, drops the library format pattern, rejects unknown constraints. */\nfunction walkProperty(node, path, vendor, unsupported) {\n\tif (!isJsonObject(node)) return node;\n\tconst allowedKeys = typeof node.type === \"string\" && Object.hasOwn(PROPERTY_KEYS_BY_TYPE, node.type) ? PROPERTY_KEYS_BY_TYPE[node.type] : void 0;\n\tif (allowedKeys === void 0) return node;\n\tconst pruned = {};\n\tfor (const [key, value] of Object.entries(node)) if (allowedKeys.has(key) || isAnnotationOnlyJsonSchemaKeyword(key)) pruned[key] = value;\n\telse if (key === \"pattern\" && node.type === \"string\" && typeof node.format === \"string\") {\n\t\tif (!SUPPORTED_STRING_FORMATS.has(node.format)) pruned[key] = value;\n\t\telse if (typeof value !== \"string\" || !isLibraryFormatPattern(node.format, value, vendor)) unsupported.push(`${path}.${key}`);\n\t} else unsupported.push(`${path}.${key}`);\n\treturn pruned;\n}\n/** Walks the schema root: keeps the spec root keys, drops annotations, rejects the rest. */\nfunction walkRequestedSchema(converted, vendor) {\n\tconst pruned = {};\n\tconst unsupported = [];\n\tfor (const [key, value] of Object.entries(converted)) if (key === \"properties\" && isJsonObject(value)) pruned[key] = Object.fromEntries(Object.entries(value).map(([name, node]) => [name, walkProperty(node, `properties.${name}`, vendor, unsupported)]));\n\telse if (ROOT_KEYS.has(key)) pruned[key] = value;\n\telse if (!isAnnotationOnlyJsonSchemaKeyword(key)) unsupported.push(key);\n\tif (unsupported.length > 0) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${unsupported.join(\", \")}`);\n\treturn pruned;\n}\n/** Names the properties that fail value validation, instead of surfacing a raw union dump. */\nfunction describeUnsupportedProperties(pruned, fallback) {\n\tif (!isJsonObject(pruned.properties)) return fallback;\n\tconst offenders = Object.entries(pruned.properties).filter(([, node]) => !parseSchema(PrimitiveSchemaDefinitionSchema, node).success).map(([name]) => `properties.${name}`);\n\treturn offenders.length > 0 ? offenders.join(\", \") : fallback;\n}\nfunction findDroppedConstraintPaths(original, parsed, path = \"\") {\n\tif (Array.isArray(original) && Array.isArray(parsed)) return original.flatMap((item, index) => findDroppedConstraintPaths(item, parsed[index], `${path}[${index}]`));\n\tif (!isJsonObject(original) || !isJsonObject(parsed)) return [];\n\treturn Object.entries(original).flatMap(([key, value]) => {\n\t\tconst childPath = path ? `${path}.${key}` : key;\n\t\tif (!Object.prototype.hasOwnProperty.call(parsed, key)) return isAnnotationOnlyJsonSchemaKeyword(key) ? [] : [childPath];\n\t\treturn findDroppedConstraintPaths(value, parsed[key], childPath);\n\t});\n}\n/** Converts an authoring-friendly elicitation input into its wire-ready form. */\nfunction normalizeElicitInputParams(input) {\n\tif (!isStandardSchema(input.requestedSchema)) return {\n\t\t...input,\n\t\tmode: \"form\",\n\t\trequestedSchema: input.requestedSchema\n\t};\n\tconst vendor = input.requestedSchema[\"~standard\"].vendor;\n\tconst pruned = walkRequestedSchema(convertStandardElicitationSchema(input.requestedSchema), vendor);\n\tconst parsed = parseSchema(ElicitRequestFormParamsSchema.shape.requestedSchema, pruned);\n\tif (!parsed.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${describeUnsupportedProperties(pruned, parsed.error.message)}`);\n\tconst droppedConstraints = findDroppedConstraintPaths(pruned, parsed.data);\n\tif (droppedConstraints.length > 0) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${droppedConstraints.join(\", \")}`);\n\tconst danglingRequired = (parsed.data.required ?? []).filter((key) => !Object.prototype.hasOwnProperty.call(parsed.data.properties, key));\n\tif (danglingRequired.length > 0) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema lists required properties that are not defined in properties: ${danglingRequired.join(\", \")}`);\n\treturn {\n\t\t...input,\n\t\tmode: \"form\",\n\t\trequestedSchema: parsed.data\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/shared/inputRequired.ts\n/**\n* Authoring helpers for multi-round-trip requests (protocol revision\n* 2026-07-28).\n*\n* A handler for one of the multi-round-trip methods (`tools/call`,\n* `prompts/get`, `resources/read`) requests additional client input by\n* returning an {@linkcode InputRequiredResult} instead of a final result. The\n* helpers here build that return value and its embedded requests as NEUTRAL\n* values; only the 2026-07-28 wire codec maps them to/from the wire. The\n* 2025-era codec has no input-required vocabulary — on a 2025-era request the\n* server's legacy shim (on by default) fulfils the embedded requests as real\n* server→client requests and re-enters the handler, so the same return shape\n* serves both eras; `ServerOptions.inputRequired.legacyShim: false` restores\n* the pre-shim loud failure.\n*\n* There is no nominal brand: `resultType: 'input_required'` is the\n* discriminator, and hand-built result literals are equally legal — the\n* server seam re-checks the at-least-one rule for them.\n*/\nfunction buildInputRequired(spec) {\n\tconst hasInputRequests = spec.inputRequests !== void 0 && Object.keys(spec.inputRequests).length > 0;\n\tconst hasRequestState = typeof spec.requestState === \"string\";\n\tif (!hasInputRequests && !hasRequestState) throw new TypeError(\"inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)\");\n\treturn {\n\t\tresultType: \"input_required\",\n\t\t...spec.inputRequests !== void 0 && { inputRequests: spec.inputRequests },\n\t\t...spec.requestState !== void 0 && { requestState: spec.requestState }\n\t};\n}\n/**\n* Builder for the input-required return value of multi-round-trip handlers,\n* with per-kind constructors for the embedded requests\n* (`inputRequired.elicit`, `inputRequired.elicitUrl`,\n* `inputRequired.createMessage`, `inputRequired.listRoots`).\n*\n* @example Write-once tool requesting confirmation\n* ```ts\n* server.registerTool('deploy', { inputSchema: z.object({ env: z.string() }) }, async ({ env }, ctx) => {\n*     const confirmed = acceptedContent<{ confirm: boolean }>(ctx.mcpReq.inputResponses, 'confirm');\n*     if (!confirmed) {\n*         return inputRequired({\n*             inputRequests: {\n*                 confirm: inputRequired.elicit({\n*                     message: `Deploy to ${env}?`,\n*                     requestedSchema: { type: 'object', properties: { confirm: { type: 'boolean' } }, required: ['confirm'] }\n*                 })\n*             }\n*         });\n*     }\n*     return { content: [{ type: 'text', text: `deployed to ${env}` }] };\n* });\n* ```\n*/\nconst inputRequired = Object.assign(buildInputRequired, {\n\telicit(params) {\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tmethod: \"elicitation/create\",\n\t\t\t\tparams: normalizeElicitInputParams(params)\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tthrow error instanceof ProtocolError ? new TypeError(error.message, { cause: error }) : error;\n\t\t}\n\t},\n\telicitUrl(params) {\n\t\treturn {\n\t\t\tmethod: \"elicitation/create\",\n\t\t\tparams: {\n\t\t\t\t...params,\n\t\t\t\tmode: \"url\"\n\t\t\t}\n\t\t};\n\t},\n\tcreateMessage(params) {\n\t\treturn {\n\t\t\tmethod: \"sampling/createMessage\",\n\t\t\tparams\n\t\t};\n\t},\n\tlistRoots() {\n\t\treturn { method: \"roots/list\" };\n\t}\n});\nfunction acceptedContent(responses, key, schema) {\n\tconst view = inputResponse(responses, key);\n\tif (view.kind !== \"elicit\" || view.action !== \"accept\" || view.content === void 0) return void 0;\n\tif (schema === void 0) return view.content;\n\tconst outcome = schema[\"~standard\"].validate(view.content);\n\tif (outcome instanceof Promise) throw new TypeError(\"acceptedContent(responses, key, schema) requires a synchronously-validating schema\");\n\treturn outcome.issues === void 0 ? outcome.value : void 0;\n}\n/**\n* Reads one entry of a retried request's `inputResponses`\n* (`ctx.mcpReq.inputResponses`) as a discriminated view, covering\n* decline/cancel detection and the non-elicitation response kinds that\n* {@linkcode acceptedContent} does not surface.\n*\n* The values arrive from the client and are not re-validated here — treat\n* them as untrusted input (validate elicitation content with the\n* schema-aware {@linkcode acceptedContent} overload where it matters).\n*/\nfunction inputResponse(responses, key) {\n\tif (responses === void 0 || typeof responses !== \"object\" || responses === null) return { kind: \"missing\" };\n\tconst entry = responses[key];\n\tif (entry === null || typeof entry !== \"object\" || Array.isArray(entry)) return { kind: \"missing\" };\n\tconst candidate = entry;\n\tif (candidate[\"action\"] === \"accept\" || candidate[\"action\"] === \"decline\" || candidate[\"action\"] === \"cancel\") {\n\t\tconst content = candidate[\"content\"];\n\t\treturn {\n\t\t\tkind: \"elicit\",\n\t\t\taction: candidate[\"action\"],\n\t\t\t...content !== null && typeof content === \"object\" && !Array.isArray(content) && { content }\n\t\t};\n\t}\n\tif (Array.isArray(candidate[\"roots\"])) return {\n\t\tkind: \"roots\",\n\t\troots: candidate[\"roots\"]\n\t};\n\tif (typeof candidate[\"role\"] === \"string\" && candidate[\"content\"] !== void 0) return {\n\t\tkind: \"sampling\",\n\t\tresult: candidate\n\t};\n\treturn { kind: \"missing\" };\n}\n\n//#endregion\n//#region ../core-internal/src/shared/inputRequiredDriver.ts\n/**\n* The multi-round-trip auto-fulfilment driver (protocol revision 2026-07-28).\n*\n* When a request to one of the multi-round-trip methods comes back as\n* `input_required`, the driver fulfils the embedded input requests by\n* dispatching them to the client's already-registered handlers (elicitation,\n* sampling, roots — one generic engine, no per-feature API), then retries the\n* original request with the collected `inputResponses` and a byte-exact echo\n* of `requestState`, on a fresh request id, until the server returns a\n* complete result or the round cap is exhausted.\n*\n* The driver is a LAYER OVER THE MANUAL PATH: each retry is issued with the\n* same primitive a manual caller uses (`allowInputRequired` semantics — the\n* retry hands back the next `input_required` payload instead of recursing),\n* so the loop, the cap, and the pacing live in one place and disabling\n* auto-fulfilment (`inputRequired.autoFulfill: false`) simply skips this\n* module. Timeouts ride the EXISTING knobs: the per-leg `timeout` applies to\n* every wire leg unchanged, and `maxTotalTimeout` bounds the whole flow by\n* shrinking the budget passed to each leg — no new timer system.\n*/\n/**\n* Fixed pacing applied before retrying a requestState-only (load-shedding)\n* leg — a leg that carries no embedded input requests, so nothing slows the\n* loop down naturally. Counted in the same round cap.\n*/\nconst REQUEST_STATE_ONLY_LEG_PACING_MS = 250;\n/**\n* The message both multi-round-trip loops emit when the round cap is\n* exhausted — the client driver as a typed error, the server-side legacy\n* shim as its per-family failure. One formatter so the texts cannot drift\n* (hosts and models read the tool-result copy verbatim).\n*/\nfunction inputRequiredRoundsExceededMessage(method, maxRounds) {\n\treturn `Multi-round-trip request '${method}' still required input after ${maxRounds} rounds (inputRequired.maxRounds)`;\n}\n/**\n* Abortable delay: resolves after `ms`, or rejects with the signal's reason\n* (wrapped in an `SdkError` when it isn't already one) if the signal aborts\n* first. Aborting after resolution is a no-op. Shared with the server-side\n* legacy shim (the pacing semantics must match per era).\n*/\nfunction sleep(ms, signal) {\n\treturn new Promise((resolve, reject) => {\n\t\tif (signal?.aborted) {\n\t\t\treject(signal.reason instanceof SdkError ? signal.reason : new SdkError(SdkErrorCode.RequestTimeout, String(signal.reason)));\n\t\t\treturn;\n\t\t}\n\t\tconst timer = setTimeout(() => {\n\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\tresolve();\n\t\t}, ms);\n\t\tconst onAbort = () => {\n\t\t\tclearTimeout(timer);\n\t\t\treject(signal?.reason instanceof SdkError ? signal.reason : new SdkError(SdkErrorCode.RequestTimeout, String(signal?.reason)));\n\t\t};\n\t\tsignal?.addEventListener(\"abort\", onAbort, { once: true });\n\t});\n}\n/**\n* A per-round abort linked to the caller's signal: the embedded sibling\n* dispatches share it, so the first failure (or a caller abort) cancels the\n* others instead of leaving them running. Shared with the server-side legacy\n* shim (the abort-linkage semantics must match per era).\n*/\nfunction linkedRoundAbort(outer) {\n\tconst controller = new AbortController();\n\tconst onOuterAbort = () => controller.abort(outer?.reason);\n\touter?.addEventListener(\"abort\", onOuterAbort, { once: true });\n\tif (outer?.aborted) controller.abort(outer.reason);\n\treturn {\n\t\tsignal: controller.signal,\n\t\tabort: (reason) => controller.abort(reason),\n\t\tdispose: () => outer?.removeEventListener(\"abort\", onOuterAbort)\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/types/specTypeSchema.ts\n/**\n* Explicit allowlist of protocol Zod schemas that correspond to a public spec type in `types.ts`.\n*\n* This intentionally excludes internal helper schemas exported from `schemas.ts` that have no\n* matching public type (e.g. `ListChangedOptionsBaseSchema`, `BaseRequestParamsSchema`,\n* `NotificationsParamsSchema`, `ClientTasksCapabilitySchema`, `ServerTasksCapabilitySchema`).\n* Keeping the list explicit means new public spec types must be added here deliberately, and\n* internals never leak into `SpecTypeName`.\n*\n* `ResourceTemplateSchema` is included; its public type is exported as `ResourceTemplateType`\n* (the bare name collides with the server package's `ResourceTemplate` class), so\n* `SpecTypes['ResourceTemplate']` is structurally equal to `ResourceTemplateType` rather than to\n* a type literally named `ResourceTemplate`.\n*/\nconst SPEC_SCHEMA_KEYS = [\n\t\"AnnotationsSchema\",\n\t\"AudioContentSchema\",\n\t\"BaseMetadataSchema\",\n\t\"BlobResourceContentsSchema\",\n\t\"BooleanSchemaSchema\",\n\t\"CallToolRequestSchema\",\n\t\"CallToolRequestParamsSchema\",\n\t\"CallToolResultSchema\",\n\t\"CancelledNotificationSchema\",\n\t\"CancelledNotificationParamsSchema\",\n\t\"CancelTaskRequestSchema\",\n\t\"CancelTaskResultSchema\",\n\t\"ClientCapabilitiesSchema\",\n\t\"ClientNotificationSchema\",\n\t\"ClientRequestSchema\",\n\t\"ClientResultSchema\",\n\t\"CompatibilityCallToolResultSchema\",\n\t\"CompleteRequestSchema\",\n\t\"CompleteRequestParamsSchema\",\n\t\"CompleteResultSchema\",\n\t\"ContentBlockSchema\",\n\t\"CreateMessageRequestSchema\",\n\t\"CreateMessageRequestParamsSchema\",\n\t\"CreateMessageResultSchema\",\n\t\"CreateMessageResultWithToolsSchema\",\n\t\"CreateTaskResultSchema\",\n\t\"CursorSchema\",\n\t\"DiscoverRequestSchema\",\n\t\"DiscoverResultSchema\",\n\t\"ElicitationCompleteNotificationSchema\",\n\t\"ElicitationCompleteNotificationParamsSchema\",\n\t\"ElicitRequestSchema\",\n\t\"ElicitRequestFormParamsSchema\",\n\t\"ElicitRequestParamsSchema\",\n\t\"ElicitRequestURLParamsSchema\",\n\t\"ElicitResultSchema\",\n\t\"EmbeddedResourceSchema\",\n\t\"EmptyResultSchema\",\n\t\"EnumSchemaSchema\",\n\t\"GetPromptRequestSchema\",\n\t\"GetPromptRequestParamsSchema\",\n\t\"GetPromptResultSchema\",\n\t\"GetTaskPayloadRequestSchema\",\n\t\"GetTaskPayloadResultSchema\",\n\t\"GetTaskRequestSchema\",\n\t\"GetTaskResultSchema\",\n\t\"IconSchema\",\n\t\"IconsSchema\",\n\t\"ImageContentSchema\",\n\t\"ImplementationSchema\",\n\t\"InitializedNotificationSchema\",\n\t\"InitializeRequestSchema\",\n\t\"InitializeRequestParamsSchema\",\n\t\"InitializeResultSchema\",\n\t\"JSONArraySchema\",\n\t\"JSONObjectSchema\",\n\t\"JSONRPCErrorResponseSchema\",\n\t\"JSONRPCMessageSchema\",\n\t\"JSONRPCNotificationSchema\",\n\t\"JSONRPCRequestSchema\",\n\t\"JSONRPCResponseSchema\",\n\t\"JSONRPCResultResponseSchema\",\n\t\"JSONValueSchema\",\n\t\"LegacyTitledEnumSchemaSchema\",\n\t\"ListPromptsRequestSchema\",\n\t\"ListPromptsResultSchema\",\n\t\"ListResourcesRequestSchema\",\n\t\"ListResourcesResultSchema\",\n\t\"ListResourceTemplatesRequestSchema\",\n\t\"ListResourceTemplatesResultSchema\",\n\t\"ListRootsRequestSchema\",\n\t\"ListRootsResultSchema\",\n\t\"ListTasksRequestSchema\",\n\t\"ListTasksResultSchema\",\n\t\"ListToolsRequestSchema\",\n\t\"ListToolsResultSchema\",\n\t\"LoggingLevelSchema\",\n\t\"LoggingMessageNotificationSchema\",\n\t\"LoggingMessageNotificationParamsSchema\",\n\t\"ModelHintSchema\",\n\t\"ModelPreferencesSchema\",\n\t\"MultiSelectEnumSchemaSchema\",\n\t\"NotificationSchema\",\n\t\"NumberSchemaSchema\",\n\t\"PaginatedRequestSchema\",\n\t\"PaginatedRequestParamsSchema\",\n\t\"PaginatedResultSchema\",\n\t\"PingRequestSchema\",\n\t\"PrimitiveSchemaDefinitionSchema\",\n\t\"ProgressSchema\",\n\t\"ProgressNotificationSchema\",\n\t\"ProgressNotificationParamsSchema\",\n\t\"ProgressTokenSchema\",\n\t\"PromptSchema\",\n\t\"PromptArgumentSchema\",\n\t\"PromptListChangedNotificationSchema\",\n\t\"PromptMessageSchema\",\n\t\"PromptReferenceSchema\",\n\t\"ReadResourceRequestSchema\",\n\t\"ReadResourceRequestParamsSchema\",\n\t\"ReadResourceResultSchema\",\n\t\"RelatedTaskMetadataSchema\",\n\t\"RequestSchema\",\n\t\"RequestIdSchema\",\n\t\"RequestMetaSchema\",\n\t\"ResourceSchema\",\n\t\"ResourceContentsSchema\",\n\t\"ResourceLinkSchema\",\n\t\"ResourceListChangedNotificationSchema\",\n\t\"ResourceRequestParamsSchema\",\n\t\"ResourceTemplateSchema\",\n\t\"ResourceTemplateReferenceSchema\",\n\t\"ResourceUpdatedNotificationSchema\",\n\t\"ResourceUpdatedNotificationParamsSchema\",\n\t\"ResultMetaObjectSchema\",\n\t\"ResultSchema\",\n\t\"RoleSchema\",\n\t\"RootSchema\",\n\t\"RootsListChangedNotificationSchema\",\n\t\"SamplingContentSchema\",\n\t\"SamplingMessageSchema\",\n\t\"SamplingMessageContentBlockSchema\",\n\t\"ServerCapabilitiesSchema\",\n\t\"ServerNotificationSchema\",\n\t\"ServerRequestSchema\",\n\t\"ServerResultSchema\",\n\t\"SetLevelRequestSchema\",\n\t\"SetLevelRequestParamsSchema\",\n\t\"SingleSelectEnumSchemaSchema\",\n\t\"StringSchemaSchema\",\n\t\"SubscribeRequestSchema\",\n\t\"SubscribeRequestParamsSchema\",\n\t\"SubscriptionFilterSchema\",\n\t\"SubscriptionsAcknowledgedNotificationSchema\",\n\t\"SubscriptionsAcknowledgedNotificationParamsSchema\",\n\t\"SubscriptionsListenRequestSchema\",\n\t\"SubscriptionsListenRequestParamsSchema\",\n\t\"SubscriptionsListenResultSchema\",\n\t\"SubscriptionsListenResultMetaSchema\",\n\t\"TaskAugmentedRequestParamsSchema\",\n\t\"TaskCreationParamsSchema\",\n\t\"TaskMetadataSchema\",\n\t\"TaskSchema\",\n\t\"TaskStatusSchema\",\n\t\"TaskStatusNotificationSchema\",\n\t\"TaskStatusNotificationParamsSchema\",\n\t\"TextContentSchema\",\n\t\"TextResourceContentsSchema\",\n\t\"TitledMultiSelectEnumSchemaSchema\",\n\t\"TitledSingleSelectEnumSchemaSchema\",\n\t\"ToolSchema\",\n\t\"ToolAnnotationsSchema\",\n\t\"ToolChoiceSchema\",\n\t\"ToolExecutionSchema\",\n\t\"ToolListChangedNotificationSchema\",\n\t\"ToolResultContentSchema\",\n\t\"ToolUseContentSchema\",\n\t\"UnsubscribeRequestSchema\",\n\t\"UnsubscribeRequestParamsSchema\",\n\t\"UntitledMultiSelectEnumSchemaSchema\",\n\t\"UntitledSingleSelectEnumSchemaSchema\"\n];\nconst authSchemas = {\n\tIdJagTokenExchangeResponseSchema,\n\tOAuthClientInformationFullSchema,\n\tOAuthClientInformationSchema,\n\tOAuthClientMetadataSchema,\n\tOAuthClientRegistrationErrorSchema,\n\tOAuthErrorResponseSchema,\n\tOAuthMetadataSchema,\n\tOAuthProtectedResourceMetadataSchema,\n\tOAuthTokenRevocationRequestSchema,\n\tOAuthTokensSchema,\n\tOpenIdProviderDiscoveryMetadataSchema,\n\tOpenIdProviderMetadataSchema\n};\nconst _specTypeSchemas = {};\nconst _isSpecType = {};\nfunction register(key, schema) {\n\tconst name = key.slice(0, -6);\n\t_specTypeSchemas[name] = schema;\n\t_isSpecType[name] = (v) => schema.safeParse(v).success;\n}\nfor (const key of SPEC_SCHEMA_KEYS) register(key, schemas_exports[key]);\nfor (const [key, schema] of Object.entries(authSchemas)) register(key, schema);\n/**\n* Runtime validators for every MCP spec type, keyed by type name.\n*\n* Use this when you need to validate a spec-defined shape at a boundary the SDK does not own, for\n* example an extension's custom-method payload that embeds a `CallToolResult`, or a value read from\n* storage that should be a `Tool`.\n*\n* Each entry implements the Standard Schema interface, so it composes with any\n* Standard-Schema-aware library. For a simple boolean check, use {@linkcode isSpecType} instead.\n*\n* @example\n* ```ts source=\"./specTypeSchema.examples.ts#specTypeSchemas_basicUsage\"\n* const result = specTypeSchemas.CallToolResult['~standard'].validate(untrusted);\n* if (result.issues === undefined) {\n*     // result.value is CallToolResult\n* }\n* ```\n*/\nconst specTypeSchemas = Object.freeze(_specTypeSchemas);\n/**\n* Type predicates for every MCP spec type, keyed by type name.\n*\n* Returns `true` if the value satisfies the schema's input type (`z.input<>`, before defaults and\n* transforms are applied), and narrows to that input type. For schemas with `.default()` or\n* `.preprocess()`, this may accept values that do not structurally match the named output type;\n* for example `isSpecType.CallToolResult({})` is `true` because `content` has a default. Use\n* `specTypeSchemas.X['~standard'].validate(value)` when you need the validated output value.\n*\n* Each guard is a standalone function, so it can be passed directly as a callback.\n*\n* @example\n* ```ts source=\"./specTypeSchema.examples.ts#isSpecType_basicUsage\"\n* if (isSpecType.ContentBlock(value)) {\n*     // value is ContentBlock\n* }\n*\n* const blocks = mixed.filter(isSpecType.ContentBlock);\n* ```\n*/\nconst isSpecType = Object.freeze(_isSpecType);\n\n//#endregion\n//#region ../core-internal/src/wire/bootstrap.ts\nfunction bootstrapOutboundCodec(method) {\n\tswitch (method) {\n\t\tcase \"initialize\":\n\t\tcase \"notifications/initialized\": return codecForVersion(void 0);\n\t\tcase \"server/discover\": return codecForVersion(MODERN_WIRE_REVISION);\n\t\tdefault: return;\n\t}\n}\n\n//#endregion\n//#region ../core-internal/src/shared/protocol.ts\n/**\n* The default request timeout, in milliseconds.\n*/\nconst DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;\n/**\n* The reserved per-request `_meta` envelope keys (protocol revision\n* 2026-07-28). The protocol layer lifts these out of inbound `_meta` before\n* handlers run and surfaces them at `ctx.mcpReq.envelope` — they are\n* wire-level bookkeeping, not handler material.\n*/\nconst RESERVED_ENVELOPE_META_KEYS = [\n\tPROTOCOL_VERSION_META_KEY,\n\tCLIENT_INFO_META_KEY,\n\tCLIENT_CAPABILITIES_META_KEY,\n\tLOG_LEVEL_META_KEY\n];\n/**\n* Top-level params members carrying multi-round-trip driver material\n* (protocol revision 2026-07-28). The spec reserves these names on\n* client-initiated REQUESTS only — notification params keep them untouched\n* (a vendor notification may legitimately use the same names).\n*/\nconst RETRY_PARAMS_KEYS = [\"inputResponses\", \"requestState\"];\n/**\n* Lift wire-only material out of an inbound message so handlers see exactly\n* the 2025-era shape, and surface it for the protocol layer (requests: via\n* `ctx.mcpReq`). What counts as wire-only depends on the message kind: the\n* reserved envelope `_meta` keys are reserved on every message, while the\n* multi-round-trip retry fields (`inputResponses`/`requestState`) are\n* reserved on client-initiated requests only — so notifications get only the\n* envelope lift, and their top-level params stay untouched. Messages without\n* wire-only material are returned unchanged (same reference).\n*/\nfunction liftWireOnlyMaterial(message, kind) {\n\tconst params = message.params;\n\tif (!isPlainObject$1(params)) return {\n\t\tmessage,\n\t\tlifted: {}\n\t};\n\tconst meta = params._meta;\n\tconst envelopeKeys = isPlainObject$1(meta) ? RESERVED_ENVELOPE_META_KEYS.filter((key) => key in meta) : [];\n\tconst retryKeys = kind === \"request\" ? RETRY_PARAMS_KEYS.filter((key) => key in params) : [];\n\tif (envelopeKeys.length === 0 && retryKeys.length === 0) return {\n\t\tmessage,\n\t\tlifted: {}\n\t};\n\tconst lifted = {};\n\tconst nextParams = { ...params };\n\tif (envelopeKeys.length > 0 && isPlainObject$1(meta)) {\n\t\tconst envelope = {};\n\t\tconst nextMeta = { ...meta };\n\t\tfor (const key of envelopeKeys) {\n\t\t\tenvelope[key] = meta[key];\n\t\t\tdelete nextMeta[key];\n\t\t}\n\t\tlifted.envelope = envelope;\n\t\tif (Object.keys(nextMeta).length > 0) nextParams._meta = nextMeta;\n\t\telse delete nextParams._meta;\n\t}\n\tfor (const key of retryKeys) {\n\t\tif (key === \"inputResponses\") lifted.inputResponses = nextParams[key];\n\t\tif (key === \"requestState\") lifted.requestState = nextParams[key];\n\t\tdelete nextParams[key];\n\t}\n\treturn {\n\t\tmessage: {\n\t\t\t...message,\n\t\t\tparams: nextParams\n\t\t},\n\t\tlifted\n\t};\n}\n/**\n* Standard Schema adapter over the era codec's `validateResult` function (the\n* function-only WireCodec contract exposes no schema objects). Used by the\n* spec-method `request()` overload so the request funnel keeps a single\n* `StandardSchemaV1`-shaped validation seam for both spec and explicit-schema\n* paths.\n*\n* Returns `undefined` when the method has no result entry on this era's\n* registry — the caller maps that to the synchronous \"pass a result schema\"\n* TypeError, exactly matching the pre-function-only behavior the\n* typedMapAlignment suite pins (the result map deliberately excludes the\n* `tasks/*` methods, so the spec-method overload refuses them up front).\n*/\nfunction codecResultValidator(codec, method) {\n\tconst probe = codec.validateResult(method, void 0);\n\tif (!probe.ok && probe.reason === \"not-in-era\") return void 0;\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"mcp-wire-codec\",\n\t\tvalidate(value) {\n\t\t\tconst outcome = codec.validateResult(method, value);\n\t\t\tif (outcome.ok) return { value: outcome.value };\n\t\t\treturn { issues: [{ message: outcome.reason === \"invalid\" ? outcome.message : `not-in-era: ${method}` }] };\n\t\t}\n\t} };\n}\n/**\n* Builds the `ctx.mcpReq.requestState` accessor for a resolved value. The\n* `as T` below is the one place {@linkcode RequestStateAccessor}'s\n* caller-asserted typing is implemented — no implementation can produce an\n* arbitrary `T` from a runtime value honestly.\n*/\nfunction requestStateAccessor(value) {\n\treturn () => value;\n}\n/** Shared no-state accessor: the common case allocates nothing per request. */\nconst NO_REQUEST_STATE = requestStateAccessor(void 0);\n/**\n* Returns a context whose `requestState` accessor reads the given value —\n* how the server seam hands a verify hook's decoded payload (or the legacy\n* shim's per-round echo) to the handler without mutating the original\n* context.\n*/\nfunction withRequestStateValue(ctx, value) {\n\treturn {\n\t\t...ctx,\n\t\tmcpReq: {\n\t\t\t...ctx.mcpReq,\n\t\t\trequestState: requestStateAccessor(value)\n\t\t}\n\t};\n}\nlet writeNegotiatedProtocolVersion;\n/**\n* Package-internal write channel for a {@linkcode Protocol} instance's\n* negotiated protocol version, for callers outside the class hierarchy:\n* tests and the (future) modern-era server entry that marks a factory\n* instance modern at binding time. Exported on the core internal barrel\n* only — never public API.\n*/\nfunction setNegotiatedProtocolVersion(instance, version) {\n\twriteNegotiatedProtocolVersion(instance, version);\n}\n/**\n* Implements MCP protocol framing on top of a pluggable transport, including\n* features like request/response linking, notifications, and progress.\n*\n* `Protocol` is abstract; `Client` and `Server` are the concrete role-specific\n* implementations most code should use.\n*/\nvar Protocol = class {\n\t_transport;\n\t_requestMessageId = 0;\n\t_requestHandlers = /* @__PURE__ */ new Map();\n\t_requestHandlerAbortControllers = /* @__PURE__ */ new Map();\n\t_notificationHandlers = /* @__PURE__ */ new Map();\n\t_responseHandlers = /* @__PURE__ */ new Map();\n\t_progressHandlers = /* @__PURE__ */ new Map();\n\t_timeoutInfo = /* @__PURE__ */ new Map();\n\t_pendingDebouncedNotifications = /* @__PURE__ */ new Set();\n\t/**\n\t* The protocol version negotiated for the current connection (`undefined`\n\t* before negotiation completes), which determines the wire era this\n\t* instance speaks. Set by the SDK's negotiation and initialize paths\n\t* (`Client.connect`, `Server._oninitialize`).\n\t*/\n\t_negotiatedProtocolVersion;\n\tstatic {\n\t\twriteNegotiatedProtocolVersion = (instance, version) => {\n\t\t\tinstance._negotiatedProtocolVersion = version;\n\t\t};\n\t}\n\t_supportedProtocolVersions;\n\t/**\n\t* Callback for when the connection is closed for any reason.\n\t*\n\t* This is invoked when {@linkcode Protocol.close | close()} is called as well.\n\t*/\n\tonclose;\n\t/**\n\t* Callback for when an error occurs.\n\t*\n\t* Note that errors are not necessarily fatal; they are used for reporting any kind of exceptional condition out of band.\n\t*/\n\tonerror;\n\t/**\n\t* A handler to invoke for any request types that do not have their own handler installed.\n\t*/\n\tfallbackRequestHandler;\n\t/**\n\t* A handler to invoke for any notification types that do not have their own handler installed.\n\t*/\n\tfallbackNotificationHandler;\n\tconstructor(_options) {\n\t\tthis._options = _options;\n\t\tthis._supportedProtocolVersions = _options?.supportedProtocolVersions ?? SUPPORTED_PROTOCOL_VERSIONS;\n\t\tthis.setNotificationHandler(\"notifications/cancelled\", (notification) => {\n\t\t\tthis._oncancel(notification);\n\t\t});\n\t\tthis.setNotificationHandler(\"notifications/progress\", (notification) => {\n\t\t\tthis._onprogress(notification);\n\t\t});\n\t\tthis.setRequestHandler(\"ping\", (_request) => ({}));\n\t}\n\t/**\n\t* Drop consult for inbound messages whose transport did not classify them\n\t* at the edge — long-lived channels such as stdio, where a role class may\n\t* need to decline traffic the negotiated era has no answer for (the\n\t* client-side inbound-request drop on modern-era connections: the\n\t* 2026-07-28 era has no server→client request channel, and on stdio the\n\t* client must never write JSON-RPC responses).\n\t*\n\t* Consulted ONLY when the transport supplied no\n\t* {@linkcode MessageExtraInfo.classification}: edge-classified traffic\n\t* never reaches the hook. Returning `'drop'` discards the message without\n\t* writing any response (requests are surfaced via `onerror`). The base\n\t* implementation returns `undefined`: unclassified traffic keeps today's\n\t* dispatch path unchanged. Era selection never happens here — era is\n\t* instance state, owned by the serving entry that constructed and\n\t* connected the instance.\n\t*/\n\t_shouldDropInbound(_message) {}\n\t/**\n\t* The per-request `_meta` envelope this instance attaches to every outgoing\n\t* request and notification, when one applies. The base implementation\n\t* returns `undefined` (no envelope — the 2025-era posture, so legacy-era\n\t* outbound traffic is byte-identical to a build without this seam).\n\t* `Client` overrides it on a connection that negotiated a modern (2026-07-28+)\n\t* era to return the reserved protocol-version / client-info /\n\t* client-capabilities keys. User-supplied `_meta` keys take precedence over\n\t* the auto-attached ones.\n\t*/\n\t_outboundMetaEnvelope() {}\n\t/**\n\t* Attach this instance's outbound `_meta` envelope (when one is configured)\n\t* to a request or notification. A no-op when the seam returns `undefined`\n\t* — the message returns by reference, so the legacy-era wire stays\n\t* byte-identical. User-supplied `_meta` keys are spread last so they win\n\t* over the auto-attached envelope keys.\n\t*/\n\t_envelopeOutbound(message) {\n\t\tconst envelope = this._outboundMetaEnvelope();\n\t\tif (envelope === void 0) return message;\n\t\tconst params = message.params ?? {};\n\t\treturn {\n\t\t\t...message,\n\t\t\tparams: {\n\t\t\t\t...params,\n\t\t\t\t_meta: {\n\t\t\t\t\t...envelope,\n\t\t\t\t\t...params._meta\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Extension point for non-`complete` decoded results in the response\n\t* funnel: a result the wire codec discriminated into a kind other than\n\t* `'complete'` or `'invalid'` is handed here for the role class to\n\t* resolve. The base default surfaces it as a typed\n\t* {@linkcode SdkErrorCode.UnsupportedResultType} error (no retry).\n\t*\n\t* Intended consumers (named so the seam stays accountable):\n\t* - the `Client`'s multi-round-trip auto-fulfilment engine, which fulfils\n\t*   `'input_required'` results through the registered\n\t*   elicitation/sampling/roots handlers and retries via `flow.retry`;\n\t* - a future client-side terminal-result handler for\n\t*   `subscriptions/listen`, when the spec defines one.\n\t*\n\t* `Server` instances never receive `input_required` responses on their\n\t* outbound legs and leave the base behavior in place.\n\t*/\n\t_resolveNonCompleteResult(decoded, flow) {\n\t\treturn Promise.reject(new SdkError(SdkErrorCode.UnsupportedResultType, `Unsupported result type '${decoded.kind}' for ${flow.request.method}`, {\n\t\t\tresultType: decoded.kind,\n\t\t\tmethod: flow.request.method\n\t\t}));\n\t}\n\t/**\n\t* Protected accessor for a registered request handler. Used by role\n\t* classes that dispatch synthesized requests through the same stored\n\t* handler chain (e.g. the `Client` fulfilling an embedded multi-round-trip\n\t* input request).\n\t*/\n\t_getRequestHandler(method) {\n\t\treturn this._requestHandlers.get(method);\n\t}\n\tasync _oncancel(notification) {\n\t\tif (!notification.params.requestId) return;\n\t\tthis._requestHandlerAbortControllers.get(notification.params.requestId)?.abort(notification.params.reason);\n\t}\n\t_setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {\n\t\tthis._timeoutInfo.set(messageId, {\n\t\t\ttimeoutId: setTimeout(onTimeout, timeout),\n\t\t\tstartTime: Date.now(),\n\t\t\ttimeout,\n\t\t\tmaxTotalTimeout,\n\t\t\tresetTimeoutOnProgress,\n\t\t\tonTimeout\n\t\t});\n\t}\n\t_resetTimeout(messageId) {\n\t\tconst info = this._timeoutInfo.get(messageId);\n\t\tif (!info) return false;\n\t\tconst totalElapsed = Date.now() - info.startTime;\n\t\tif (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) {\n\t\t\tthis._timeoutInfo.delete(messageId);\n\t\t\tthrow new SdkError(SdkErrorCode.RequestTimeout, \"Maximum total timeout exceeded\", {\n\t\t\t\tmaxTotalTimeout: info.maxTotalTimeout,\n\t\t\t\ttotalElapsed\n\t\t\t});\n\t\t}\n\t\tclearTimeout(info.timeoutId);\n\t\tinfo.timeoutId = setTimeout(info.onTimeout, info.timeout);\n\t\treturn true;\n\t}\n\t_cleanupTimeout(messageId) {\n\t\tconst info = this._timeoutInfo.get(messageId);\n\t\tif (info) {\n\t\t\tclearTimeout(info.timeoutId);\n\t\t\tthis._timeoutInfo.delete(messageId);\n\t\t}\n\t}\n\t/**\n\t* Attaches to the given transport, starts it, and starts listening for messages.\n\t*\n\t* The caller assumes ownership of the {@linkcode Transport}, replacing any callbacks that have already been set, and expects that it is the only user of the {@linkcode Transport} instance going forward.\n\t*/\n\tasync connect(transport) {\n\t\tthis._transport = transport;\n\t\tconst _onclose = this.transport?.onclose;\n\t\tthis._transport.onclose = () => {\n\t\t\ttry {\n\t\t\t\t_onclose?.();\n\t\t\t} finally {\n\t\t\t\tthis._onclose();\n\t\t\t}\n\t\t};\n\t\tconst _onerror = this.transport?.onerror;\n\t\tthis._transport.onerror = (error) => {\n\t\t\t_onerror?.(error);\n\t\t\tthis._onerror(error);\n\t\t};\n\t\tconst _onmessage = this._transport?.onmessage;\n\t\tthis._transport.onmessage = (message, extra) => {\n\t\t\t_onmessage?.(message, extra);\n\t\t\tif (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) this._onresponse(message);\n\t\t\telse if (isJSONRPCRequest(message)) this._onrequest(message, extra);\n\t\t\telse if (isJSONRPCNotification(message)) this._onnotification(message, extra);\n\t\t\telse this._onerror(/* @__PURE__ */ new Error(`Unknown message type: ${JSON.stringify(message)}`));\n\t\t};\n\t\ttransport.setSupportedProtocolVersions?.(this._supportedProtocolVersions);\n\t\tawait this._transport.start();\n\t}\n\t/**\n\t* Transport-close hook. Subclass overrides MUST call `super._onclose()`\n\t* after their own cleanup — base teardown (response-handler settlement,\n\t* timeout clearing, in-flight request abort) does not run otherwise.\n\t*/\n\t_onclose() {\n\t\tconst responseHandlers = this._responseHandlers;\n\t\tthis._responseHandlers = /* @__PURE__ */ new Map();\n\t\tthis._progressHandlers.clear();\n\t\tthis._pendingDebouncedNotifications.clear();\n\t\tfor (const info of this._timeoutInfo.values()) clearTimeout(info.timeoutId);\n\t\tthis._timeoutInfo.clear();\n\t\tconst requestHandlerAbortControllers = this._requestHandlerAbortControllers;\n\t\tthis._requestHandlerAbortControllers = /* @__PURE__ */ new Map();\n\t\tconst error = new SdkError(SdkErrorCode.ConnectionClosed, \"Connection closed\");\n\t\tthis._transport = void 0;\n\t\ttry {\n\t\t\tthis.onclose?.();\n\t\t} finally {\n\t\t\tfor (const handler of responseHandlers.values()) handler(error);\n\t\t\tfor (const controller of requestHandlerAbortControllers.values()) controller.abort(error);\n\t\t}\n\t}\n\t_onerror(error) {\n\t\tthis.onerror?.(error);\n\t}\n\t/**\n\t* Inbound-notification dispatch. Subclass overrides MUST delegate\n\t* unmatched traffic to `super._onnotification(rawNotification, extra)` —\n\t* an override that consumes only what it owns and falls through to base\n\t* dispatch for everything else.\n\t*/\n\t_onnotification(rawNotification, extra) {\n\t\tconst { message: notification } = liftWireOnlyMaterial(rawNotification, \"notification\");\n\t\tconst codec = this._negotiatedWireCodec();\n\t\tif (extra?.classification === void 0 && this._shouldDropInbound(rawNotification) === \"drop\") return;\n\t\tif (extra?.classification !== void 0) {\n\t\t\tconst classified = classifiedWireEra(extra.classification);\n\t\t\tif (classified !== codec.era) {\n\t\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Era mismatch on inbound notification '${notification.method}': classified as ${classified} but this instance serves ${codec.era}`));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (isSpecNotificationMethod(notification.method) && !codec.hasNotificationMethod(notification.method)) return;\n\t\tconst handler = this._notificationHandlers.get(notification.method);\n\t\tconst fallback = this.fallbackNotificationHandler;\n\t\tif (handler === void 0 && fallback === void 0) return;\n\t\tPromise.resolve().then(() => handler === void 0 ? fallback(notification) : handler(notification, codec)).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Uncaught error in notification handler: ${error}`)));\n\t}\n\t_onrequest(rawRequest, extra) {\n\t\tconst { message: request, lifted } = liftWireOnlyMaterial(rawRequest, \"request\");\n\t\tconst codec = this._negotiatedWireCodec();\n\t\tif (extra?.classification === void 0 && this._shouldDropInbound(rawRequest) === \"drop\") {\n\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Dropped inbound request '${rawRequest.method}': not servable on this connection's protocol era`));\n\t\t\treturn;\n\t\t}\n\t\tconst capturedTransport = this._transport;\n\t\tconst sendErrorResponse = (code, message, data) => {\n\t\t\tconst errorResponse = {\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: request.id,\n\t\t\t\terror: {\n\t\t\t\t\tcode,\n\t\t\t\t\tmessage,\n\t\t\t\t\t...data !== void 0 && { data }\n\t\t\t\t}\n\t\t\t};\n\t\t\tcapturedTransport?.send(errorResponse).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Failed to send an error response: ${error}`)));\n\t\t};\n\t\tif (extra?.classification !== void 0) {\n\t\t\tconst classified = classifiedWireEra(extra.classification);\n\t\t\tif (classified !== codec.era) {\n\t\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Era mismatch on inbound request '${request.method}': classified as ${classified} but this instance serves ${codec.era}`));\n\t\t\t\tconst requested = extra.classification.revision ?? classified;\n\t\t\t\tsendErrorResponse(ProtocolErrorCode.UnsupportedProtocolVersion, `Unsupported protocol version: ${requested}`, {\n\t\t\t\t\tsupported: this._supportedProtocolVersions,\n\t\t\t\t\trequested\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method)) {\n\t\t\tsendErrorResponse(ProtocolErrorCode.MethodNotFound, \"Method not found\");\n\t\t\treturn;\n\t\t}\n\t\tconst handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;\n\t\tif (handler === void 0) {\n\t\t\tsendErrorResponse(ProtocolErrorCode.MethodNotFound, \"Method not found\");\n\t\t\treturn;\n\t\t}\n\t\tconst envelopeError = codec.checkInboundEnvelope(lifted);\n\t\tif (envelopeError !== void 0) {\n\t\t\tsendErrorResponse(ProtocolErrorCode.InvalidParams, envelopeError);\n\t\t\treturn;\n\t\t}\n\t\tconst sendNotification = (notification, options) => this._notificationViaCodec(this._resolveOutboundCodec(notification.method), notification, {\n\t\t\t...options,\n\t\t\trelatedRequestId: request.id\n\t\t});\n\t\tconst sendRequest = (r, resultSchema, options) => this._requestWithSchemaViaCodec(this._resolveOutboundCodec(r.method), r, resultSchema, {\n\t\t\t...options,\n\t\t\trelatedRequestId: request.id\n\t\t});\n\t\tconst abortController = new AbortController();\n\t\tthis._requestHandlerAbortControllers.set(request.id, abortController);\n\t\tconst partitionedInputResponses = lifted.inputResponses === void 0 ? void 0 : partitionInputResponses(lifted.inputResponses);\n\t\tconst baseCtx = {\n\t\t\tsessionId: capturedTransport?.sessionId,\n\t\t\tmcpReq: {\n\t\t\t\tid: request.id,\n\t\t\t\tmethod: request.method,\n\t\t\t\t_meta: request.params?._meta,\n\t\t\t\t...lifted.envelope !== void 0 && { envelope: lifted.envelope },\n\t\t\t\t...partitionedInputResponses !== void 0 && { inputResponses: partitionedInputResponses.accepted },\n\t\t\t\t...partitionedInputResponses !== void 0 && partitionedInputResponses.droppedKeys.length > 0 && { droppedInputResponseKeys: partitionedInputResponses.droppedKeys },\n\t\t\t\trequestState: lifted.requestState === void 0 ? NO_REQUEST_STATE : requestStateAccessor(lifted.requestState),\n\t\t\t\tsignal: abortController.signal,\n\t\t\t\tsend: ((r, schemaOrOptions, maybeOptions) => {\n\t\t\t\t\tconst sendCodec = this._resolveOutboundCodec(r.method);\n\t\t\t\t\tthis._assertOutboundRequestInEra(sendCodec, r.method);\n\t\t\t\t\tif (isStandardSchema(schemaOrOptions)) return sendRequest(r, schemaOrOptions, maybeOptions);\n\t\t\t\t\tconst validate = codecResultValidator(sendCodec, r.method);\n\t\t\t\t\tif (validate === void 0) throw new TypeError(`'${r.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);\n\t\t\t\t\treturn sendRequest(r, validate, schemaOrOptions);\n\t\t\t\t}),\n\t\t\t\tnotify: sendNotification\n\t\t\t},\n\t\t\thttp: extra?.authInfo ? { authInfo: extra.authInfo } : void 0\n\t\t};\n\t\tconst ctx = this.buildContext(baseCtx, extra);\n\t\tPromise.resolve().then(() => handler(request, ctx)).then(async (result) => {\n\t\t\tif (abortController.signal.aborted) return;\n\t\t\tlet encoded;\n\t\t\ttry {\n\t\t\t\tencoded = codec.encodeResult(request.method, result, this._outboundServerInfo());\n\t\t\t} catch (error) {\n\t\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Failed to encode result for ${request.method}: ${error}`));\n\t\t\t\tsendErrorResponse(ProtocolErrorCode.InternalError, \"Internal error\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst response = {\n\t\t\t\tresult: encoded,\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: request.id\n\t\t\t};\n\t\t\tawait capturedTransport?.send(response);\n\t\t}, async (error) => {\n\t\t\tif (abortController.signal.aborted) return;\n\t\t\tconst thrownCode = Number.isSafeInteger(error[\"code\"]) ? error[\"code\"] : ProtocolErrorCode.InternalError;\n\t\t\tconst errorResponse = {\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: request.id,\n\t\t\t\terror: {\n\t\t\t\t\tcode: codec.encodeErrorCode(thrownCode),\n\t\t\t\t\tmessage: error.message ?? \"Internal error\",\n\t\t\t\t\t...error[\"data\"] !== void 0 && { data: error[\"data\"] }\n\t\t\t\t}\n\t\t\t};\n\t\t\tawait capturedTransport?.send(errorResponse);\n\t\t}).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Failed to send response: ${error}`))).finally(() => {\n\t\t\tif (this._requestHandlerAbortControllers.get(request.id) === abortController) this._requestHandlerAbortControllers.delete(request.id);\n\t\t});\n\t}\n\t_onprogress(notification) {\n\t\tconst { progressToken, ...params } = notification.params;\n\t\tconst messageId = Number(progressToken);\n\t\tconst handler = this._progressHandlers.get(messageId);\n\t\tif (!handler) {\n\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));\n\t\t\treturn;\n\t\t}\n\t\tconst responseHandler = this._responseHandlers.get(messageId);\n\t\tconst timeoutInfo = this._timeoutInfo.get(messageId);\n\t\tif (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) try {\n\t\t\tthis._resetTimeout(messageId);\n\t\t} catch (error) {\n\t\t\tthis._responseHandlers.delete(messageId);\n\t\t\tthis._progressHandlers.delete(messageId);\n\t\t\tthis._cleanupTimeout(messageId);\n\t\t\tresponseHandler(error);\n\t\t\treturn;\n\t\t}\n\t\thandler(params);\n\t}\n\t/**\n\t* Inbound-response dispatch. Subclass overrides MUST delegate unmatched\n\t* traffic to `super._onresponse(response)` — an override that consumes\n\t* only what it owns and falls through to base dispatch for everything\n\t* else.\n\t*/\n\t_onresponse(response) {\n\t\tconst messageId = Number(response.id);\n\t\tconst handler = this._responseHandlers.get(messageId);\n\t\tif (handler === void 0) {\n\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Received a response for an unknown message ID: ${JSON.stringify(response)}`));\n\t\t\treturn;\n\t\t}\n\t\tthis._responseHandlers.delete(messageId);\n\t\tthis._cleanupTimeout(messageId);\n\t\tthis._progressHandlers.delete(messageId);\n\t\tif (isJSONRPCResultResponse(response)) handler(response);\n\t\telse handler(ProtocolError.fromError(response.error.code, response.error.message, response.error.data));\n\t}\n\tget transport() {\n\t\treturn this._transport;\n\t}\n\t/**\n\t* Closes the connection.\n\t*/\n\tasync close() {\n\t\tawait this._transport?.close();\n\t}\n\trequest(request, schemaOrOptions, maybeOptions) {\n\t\tconst codec = this._resolveOutboundCodec(request.method);\n\t\tthis._assertOutboundRequestInEra(codec, request.method);\n\t\tif (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);\n\t\tconst validate = codecResultValidator(codec, request.method);\n\t\tif (validate === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);\n\t\treturn this._requestWithSchemaViaCodec(codec, request, validate, schemaOrOptions);\n\t}\n\t/**\n\t* The wire codec for this instance's negotiated era — the phase-2 truth:\n\t* everything an established connection sends and receives resolves\n\t* through it. Legacy until a version has been negotiated.\n\t*/\n\t_negotiatedWireCodec() {\n\t\treturn codecForVersion(this._negotiatedProtocolVersion);\n\t}\n\t/**\n\t* Protected accessor for the instance's negotiated wire codec, for role\n\t* classes (Client/Server/McpServer) routing era-dependent behavior\n\t* through the codec's function-only surface — `samplingResultVariant`,\n\t* `outboundEnvelope`, `projectCallToolResult` — instead of branching on\n\t* the protocol version themselves.\n\t*/\n\t_wireCodec() {\n\t\treturn this._negotiatedWireCodec();\n\t}\n\t/**\n\t* Outbound codec resolution: while the negotiated version is still unset\n\t* (the negotiation window), lifecycle messages are bootstrap-pinned BY\n\t* METHOD — they self-identify their era (`initialize` IS the legacy\n\t* handshake, `server/discover` IS the modern probe). Once a version has\n\t* been negotiated, the instance era is authoritative for everything — a\n\t* negotiated session never re-routes a method onto the other era.\n\t*/\n\t_resolveOutboundCodec(method) {\n\t\tif (this._negotiatedProtocolVersion === void 0) {\n\t\t\tconst pinned = bootstrapOutboundCodec(method);\n\t\t\tif (pinned) return pinned;\n\t\t}\n\t\treturn this._negotiatedWireCodec();\n\t}\n\t/**\n\t* Era gate for outbound requests — deletions are physical in BOTH\n\t* directions: sending a spec method that the resolved era does not define\n\t* dies locally with a typed error before anything reaches the transport.\n\t* Methods outside the spec universe are consumer-owned extension methods\n\t* and stay era-blind.\n\t*/\n\t_assertOutboundRequestInEra(codec, method) {\n\t\tif (isSpecRequestMethod(method) && !codec.hasRequestMethod(method)) throw new SdkError(SdkErrorCode.MethodNotSupportedByProtocolVersion, `Method '${method}' is not supported by the negotiated protocol version (wire era ${codec.era})`, {\n\t\t\tmethod,\n\t\t\tera: codec.era\n\t\t});\n\t}\n\t/**\n\t* Sends a request and waits for a response, using the provided schema for\n\t* validation instead of the era registry's method-keyed entry.\n\t*\n\t* This is the internal implementation used by SDK methods whose result\n\t* schema cannot be expressed as a method-keyed registry entry — the one\n\t* surviving case is `server.createMessage`, whose result schema depends\n\t* on the REQUEST params (tools vs no tools) — and by callers passing\n\t* explicit compatibility schemas. Spec methods are still era-gated here:\n\t* an explicit schema never smuggles a deleted method onto the wire.\n\t*/\n\t_requestWithSchema(request, resultSchema, options) {\n\t\tconst codec = this._resolveOutboundCodec(request.method);\n\t\tthis._assertOutboundRequestInEra(codec, request.method);\n\t\treturn this._requestWithSchemaViaCodec(codec, request, resultSchema, options);\n\t}\n\t/**\n\t* The request funnel proper, keyed by the resolved era codec: the codec\n\t* owns result decoding (raw-first `resultType` discrimination — V-1 —\n\t* and the era's lift posture) before the schema validation step.\n\t*/\n\t_requestWithSchemaViaCodec(codec, request, resultSchema, options) {\n\t\tconst { relatedRequestId, resumptionToken, onresumptiontoken, headers } = options ?? {};\n\t\tconst flowStartedAt = Date.now();\n\t\tlet onAbort;\n\t\tlet cleanupMessageId;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst earlyReject = (error) => {\n\t\t\t\treject(error);\n\t\t\t};\n\t\t\tif (!this._transport) {\n\t\t\t\tearlyReject(/* @__PURE__ */ new Error(\"Not connected\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._options?.enforceStrictCapabilities === true) try {\n\t\t\t\tthis.assertCapabilityForMethod(request.method);\n\t\t\t} catch (error) {\n\t\t\t\tearlyReject(error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (options?.signal?.aborted) {\n\t\t\t\tconst reason = options.signal.reason;\n\t\t\t\tthrow reason instanceof SdkError ? reason : new SdkError(SdkErrorCode.RequestTimeout, String(reason));\n\t\t\t}\n\t\t\tconst requestAbort = codec.era === MODERN_WIRE_REVISION && this._transport.hasPerRequestStream === true ? new AbortController() : void 0;\n\t\t\tconst messageId = this._requestMessageId++;\n\t\t\tcleanupMessageId = messageId;\n\t\t\tconst jsonrpcRequest = {\n\t\t\t\t...request,\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: messageId\n\t\t\t};\n\t\t\tif (options?.onprogress) {\n\t\t\t\tthis._progressHandlers.set(messageId, options.onprogress);\n\t\t\t\tjsonrpcRequest.params = {\n\t\t\t\t\t...request.params,\n\t\t\t\t\t_meta: {\n\t\t\t\t\t\t...request.params?._meta,\n\t\t\t\t\t\tprogressToken: messageId\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst outbound = this._envelopeOutbound(jsonrpcRequest);\n\t\t\tlet responseReceived = false;\n\t\t\tconst cancel = (reason) => {\n\t\t\t\tif (responseReceived) return;\n\t\t\t\tthis._progressHandlers.delete(messageId);\n\t\t\t\tif (requestAbort === void 0) this._transport?.send(this._envelopeOutbound({\n\t\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\t\tmethod: \"notifications/cancelled\",\n\t\t\t\t\tparams: {\n\t\t\t\t\t\trequestId: messageId,\n\t\t\t\t\t\treason: String(reason)\n\t\t\t\t\t}\n\t\t\t\t}), {\n\t\t\t\t\trelatedRequestId,\n\t\t\t\t\tresumptionToken,\n\t\t\t\t\tonresumptiontoken\n\t\t\t\t}).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Failed to send cancellation: ${error}`)));\n\t\t\t\telse requestAbort.abort();\n\t\t\t\treject(reason instanceof SdkError ? reason : new SdkError(SdkErrorCode.RequestTimeout, String(reason)));\n\t\t\t};\n\t\t\tthis._responseHandlers.set(messageId, (response) => {\n\t\t\t\tif (options?.signal?.aborted) return;\n\t\t\t\tresponseReceived = true;\n\t\t\t\tif (response instanceof Error) return reject(response);\n\t\t\t\tlet decoded;\n\t\t\t\ttry {\n\t\t\t\t\tdecoded = codec.decodeResult(request.method, response.result);\n\t\t\t\t} catch (error) {\n\t\t\t\t\treturn reject(error instanceof Error ? error : new Error(String(error)));\n\t\t\t\t}\n\t\t\t\tif (decoded.kind === \"invalid\") return reject(decoded.error);\n\t\t\t\tif (decoded.kind === \"input_required\") {\n\t\t\t\t\tif (options?.allowInputRequired === true) return resolve(manualInputRequiredValue(decoded));\n\t\t\t\t\tconst flow = {\n\t\t\t\t\t\tcodec,\n\t\t\t\t\t\trequest,\n\t\t\t\t\t\tresultSchema,\n\t\t\t\t\t\toptions,\n\t\t\t\t\t\tflowStartedAt,\n\t\t\t\t\t\tretry: (params, legOptions) => this._requestWithSchemaViaCodec(codec, params === void 0 ? { method: request.method } : {\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tparams\n\t\t\t\t\t\t}, resultSchema, legOptions)\n\t\t\t\t\t};\n\t\t\t\t\treturn resolve(this._resolveNonCompleteResult(decoded, flow));\n\t\t\t\t}\n\t\t\t\tconst result = decoded.result;\n\t\t\t\tvalidateStandardSchema(resultSchema, result).then((parseResult) => {\n\t\t\t\t\tif (parseResult.success) resolve(parseResult.data);\n\t\t\t\t\telse reject(new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${request.method}: ${parseResult.error}`));\n\t\t\t\t}, reject);\n\t\t\t});\n\t\t\tonAbort = () => cancel(options?.signal?.reason);\n\t\t\toptions?.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\tconst timeout = options?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC;\n\t\t\tconst timeoutHandler = () => cancel(new SdkError(SdkErrorCode.RequestTimeout, \"Request timed out\", { timeout }));\n\t\t\tthis._setupTimeout(messageId, timeout, options?.maxTotalTimeout, timeoutHandler, options?.resetTimeoutOnProgress ?? false);\n\t\t\tthis._transport.send(outbound, {\n\t\t\t\trelatedRequestId,\n\t\t\t\tresumptionToken,\n\t\t\t\tonresumptiontoken,\n\t\t\t\theaders,\n\t\t\t\trequestSignal: requestAbort?.signal\n\t\t\t}).catch((error) => {\n\t\t\t\tthis._progressHandlers.delete(messageId);\n\t\t\t\treject(error);\n\t\t\t});\n\t\t}).finally(() => {\n\t\t\tif (onAbort) options?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\tif (cleanupMessageId !== void 0) {\n\t\t\t\tthis._responseHandlers.delete(cleanupMessageId);\n\t\t\t\tthis._cleanupTimeout(cleanupMessageId);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Emits a notification, which is a one-way message that does not expect a response.\n\t*/\n\tasync notification(notification, options) {\n\t\treturn this._notificationViaCodec(this._resolveOutboundCodec(notification.method), notification, options);\n\t}\n\t/**\n\t* The notification funnel proper, keyed by the resolved era codec —\n\t* direct sends and related notifications (`ctx.mcpReq.notify`) alike\n\t* resolve through the instance's negotiated era at send time.\n\t*/\n\tasync _notificationViaCodec(codec, notification, options) {\n\t\tif (!this._transport) throw new SdkError(SdkErrorCode.NotConnected, \"Not connected\");\n\t\tif (isSpecNotificationMethod(notification.method) && !codec.hasNotificationMethod(notification.method)) throw new SdkError(SdkErrorCode.MethodNotSupportedByProtocolVersion, `Notification '${notification.method}' is not supported by the negotiated protocol version (wire era ${codec.era})`, {\n\t\t\tmethod: notification.method,\n\t\t\tera: codec.era\n\t\t});\n\t\tthis.assertNotificationCapability(notification.method);\n\t\tconst jsonrpcNotification = this._envelopeOutbound({\n\t\t\tjsonrpc: \"2.0\",\n\t\t\t...notification\n\t\t});\n\t\tif ((this._options?.debouncedNotificationMethods ?? []).includes(notification.method) && !notification.params && !options?.relatedRequestId) {\n\t\t\tif (this._pendingDebouncedNotifications.has(notification.method)) return;\n\t\t\tthis._pendingDebouncedNotifications.add(notification.method);\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tthis._pendingDebouncedNotifications.delete(notification.method);\n\t\t\t\tif (!this._transport) return;\n\t\t\t\tthis._transport?.send(jsonrpcNotification, options).catch((error) => this._onerror(error));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tawait this._transport.send(jsonrpcNotification, options);\n\t}\n\tsetRequestHandler(method, schemasOrHandler, maybeHandler) {\n\t\tthis.assertRequestHandlerCapability(method);\n\t\tlet stored;\n\t\tif (typeof schemasOrHandler === \"function\") {\n\t\t\tif (!isSpecRequestMethod(method)) throw new TypeError(`'${method}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);\n\t\t\tstored = (request, ctx) => {\n\t\t\t\tconst dispatchCodec = this._negotiatedWireCodec();\n\t\t\t\tlet outcome = dispatchCodec.validateRequest(method, request);\n\t\t\t\tif (!outcome.ok && outcome.reason === \"not-in-era\") outcome = dispatchCodec.validateInputRequest(method, request);\n\t\t\t\tif (!outcome.ok) {\n\t\t\t\t\tif (outcome.reason === \"not-in-era\") throw new ProtocolError(ProtocolErrorCode.InternalError, `No wire schema for ${method} in the resolved era`);\n\t\t\t\t\tthrow new Error(outcome.message);\n\t\t\t\t}\n\t\t\t\treturn Promise.resolve(schemasOrHandler(outcome.value, ctx));\n\t\t\t};\n\t\t} else if (maybeHandler) stored = async (request, ctx) => {\n\t\t\tconst parsed = await validateStandardSchema(schemasOrHandler.params, { ...request.params });\n\t\t\tif (!parsed.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid params for ${method}: ${parsed.error}`);\n\t\t\treturn maybeHandler(parsed.data, ctx);\n\t\t};\n\t\telse throw new TypeError(\"setRequestHandler: handler is required\");\n\t\tthis._requestHandlers.set(method, this._wrapHandler(method, stored));\n\t}\n\t/**\n\t* Hook for subclasses to wrap a registered request handler with role-specific\n\t* validation or behavior (e.g. `Server` validates `tools/call` results, `Client`\n\t* validates `elicitation/create` mode and result). Runs for both the 2-arg and\n\t* 3-arg registration paths. The default implementation is identity.\n\t*\n\t* Subclasses overriding this hook avoid redeclaring `setRequestHandler`'s overload set.\n\t*/\n\t_wrapHandler(_method, handler) {\n\t\treturn handler;\n\t}\n\t/**\n\t* Hook for subclasses to supply the implementation identity the 2026-era\n\t* encode seam stamps into outbound result `_meta` under\n\t* `io.modelcontextprotocol/serverInfo` (spec PR #3002: servers SHOULD\n\t* identify themselves on every response). The default is `undefined` — no\n\t* stamp. Only `Server` overrides this: the key identifies the software\n\t* producing a response, and the 2025-era codec never stamps anything\n\t* regardless (the never-stamp guarantee).\n\t*/\n\t_outboundServerInfo() {}\n\t/**\n\t* Removes the request handler for the given method.\n\t*/\n\tremoveRequestHandler(method) {\n\t\tthis._requestHandlers.delete(method);\n\t}\n\t/**\n\t* Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.\n\t*/\n\tassertCanSetRequestHandler(method) {\n\t\tif (this._requestHandlers.has(method)) throw new Error(`A request handler for ${method} already exists, which would be overridden`);\n\t}\n\tsetNotificationHandler(method, schemasOrHandler, maybeHandler) {\n\t\tif (typeof schemasOrHandler === \"function\") {\n\t\t\tif (!isSpecNotificationMethod(method)) throw new TypeError(`'${method}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);\n\t\t\tthis._notificationHandlers.set(method, (notification, codec) => {\n\t\t\t\tconst outcome = codec.validateNotification(method, notification);\n\t\t\t\tif (!outcome.ok) {\n\t\t\t\t\tif (outcome.reason === \"not-in-era\") throw new ProtocolError(ProtocolErrorCode.InternalError, `No wire schema for ${method} in the resolved era`);\n\t\t\t\t\tthrow new Error(outcome.message);\n\t\t\t\t}\n\t\t\t\treturn Promise.resolve(schemasOrHandler(outcome.value));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (!maybeHandler) throw new TypeError(\"setNotificationHandler: handler is required\");\n\t\tthis._notificationHandlers.set(method, async (notification) => {\n\t\t\tconst parsed = await validateStandardSchema(schemasOrHandler.params, { ...notification.params });\n\t\t\tif (!parsed.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid params for notification ${method}: ${parsed.error}`);\n\t\t\tawait maybeHandler(parsed.data, notification);\n\t\t});\n\t}\n\t/**\n\t* Removes the notification handler for the given method.\n\t*/\n\tremoveNotificationHandler(method) {\n\t\tthis._notificationHandlers.delete(method);\n\t}\n};\nfunction isPlainObject$1(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\nfunction mergeCapabilities(base, additional) {\n\tconst result = { ...base };\n\tfor (const key in additional) {\n\t\tconst k = key;\n\t\tconst addValue = additional[k];\n\t\tif (addValue === void 0) continue;\n\t\tconst baseValue = result[k];\n\t\tresult[k] = isPlainObject$1(baseValue) && isPlainObject$1(addValue) ? {\n\t\t\t...baseValue,\n\t\t\t...addValue\n\t\t} : addValue;\n\t}\n\treturn result;\n}\n\n//#endregion\n//#region ../core-internal/src/shared/inputRequiredEngine.ts\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/**\n* Splits a retried request's `inputResponses` map into the BARE response\n* entries the spec defines and everything else. The spec's embedded responses\n* are the bare result objects (an `ElicitResult`, `CreateMessageResult`, or\n* `ListRootsResult`); a wrapped `{method, result}` envelope (a shape some\n* peers emit) is never accepted as a response — its key is recorded so the\n* handler can re-issue the corresponding input request.\n*/\nfunction partitionInputResponses(inputResponses) {\n\tconst accepted = {};\n\tconst droppedKeys = [];\n\tif (!isPlainObject(inputResponses)) return {\n\t\taccepted,\n\t\tdroppedKeys\n\t};\n\tfor (const [key, entry] of Object.entries(inputResponses)) {\n\t\tif (!isPlainObject(entry) || \"method\" in entry || \"result\" in entry) {\n\t\t\tdroppedKeys.push(key);\n\t\t\tcontinue;\n\t\t}\n\t\taccepted[key] = entry;\n\t}\n\treturn {\n\t\taccepted,\n\t\tdroppedKeys\n\t};\n}\n/**\n* Builds the manual-mode {@linkcode InputRequiredResult} value from the\n* codec's decoded payload — what an `allowInputRequired: true` caller\n* receives instead of the auto-fulfilled complete result.\n*/\nfunction manualInputRequiredValue(decoded) {\n\treturn {\n\t\tresultType: \"input_required\",\n\t\tinputRequests: decoded.inputRequests,\n\t\t...decoded.requestState !== void 0 && { requestState: decoded.requestState }\n\t};\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/content-type@1.0.5/node_modules/content-type/index.js\n/*!\n* content-type\n* Copyright(c) 2015 Douglas Christopher Wilson\n* MIT Licensed\n*/\nvar require_content_type = /* @__PURE__ */ __commonJSMin(((exports) => {\n\t/**\n\t* RegExp to match *( \";\" parameter ) in RFC 7231 sec 3.1.1.1\n\t*\n\t* parameter     = token \"=\" ( token / quoted-string )\n\t* token         = 1*tchar\n\t* tchar         = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n\t*               / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n\t*               / DIGIT / ALPHA\n\t*               ; any VCHAR, except delimiters\n\t* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE\n\t* qdtext        = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text\n\t* obs-text      = %x80-FF\n\t* quoted-pair   = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n\t*/\n\tvar PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *(\"(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*\"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;\n\t/**\n\t* RegExp to match quoted-pair in RFC 7230 sec 3.2.6\n\t*\n\t* quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n\t* obs-text    = %x80-FF\n\t*/\n\tvar QESC_REGEXP = /\\\\([\\u000b\\u0020-\\u00ff])/g;\n\t/**\n\t* RegExp to match type in RFC 7231 sec 3.1.1.1\n\t*\n\t* media-type = type \"/\" subtype\n\t* type       = token\n\t* subtype    = token\n\t*/\n\tvar TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;\n\texports.parse = parse;\n\t/**\n\t* Parse media type to object.\n\t*\n\t* @param {string|object} string\n\t* @return {Object}\n\t* @public\n\t*/\n\tfunction parse(string) {\n\t\tif (!string) throw new TypeError(\"argument string is required\");\n\t\tvar header = typeof string === \"object\" ? getcontenttype(string) : string;\n\t\tif (typeof header !== \"string\") throw new TypeError(\"argument string is required to be a string\");\n\t\tvar index = header.indexOf(\";\");\n\t\tvar type = index !== -1 ? header.slice(0, index).trim() : header.trim();\n\t\tif (!TYPE_REGEXP.test(type)) throw new TypeError(\"invalid media type\");\n\t\tvar obj = new ContentType(type.toLowerCase());\n\t\tif (index !== -1) {\n\t\t\tvar key;\n\t\t\tvar match;\n\t\t\tvar value;\n\t\t\tPARAM_REGEXP.lastIndex = index;\n\t\t\twhile (match = PARAM_REGEXP.exec(header)) {\n\t\t\t\tif (match.index !== index) throw new TypeError(\"invalid parameter format\");\n\t\t\t\tindex += match[0].length;\n\t\t\t\tkey = match[1].toLowerCase();\n\t\t\t\tvalue = match[2];\n\t\t\t\tif (value.charCodeAt(0) === 34) {\n\t\t\t\t\tvalue = value.slice(1, -1);\n\t\t\t\t\tif (value.indexOf(\"\\\\\") !== -1) value = value.replace(QESC_REGEXP, \"$1\");\n\t\t\t\t}\n\t\t\t\tobj.parameters[key] = value;\n\t\t\t}\n\t\t\tif (index !== header.length) throw new TypeError(\"invalid parameter format\");\n\t\t}\n\t\treturn obj;\n\t}\n\t/**\n\t* Get content-type from req/res objects.\n\t*\n\t* @param {object}\n\t* @return {Object}\n\t* @private\n\t*/\n\tfunction getcontenttype(obj) {\n\t\tvar header;\n\t\tif (typeof obj.getHeader === \"function\") header = obj.getHeader(\"content-type\");\n\t\telse if (typeof obj.headers === \"object\") header = obj.headers && obj.headers[\"content-type\"];\n\t\tif (typeof header !== \"string\") throw new TypeError(\"content-type header is missing from object\");\n\t\treturn header;\n\t}\n\t/**\n\t* Class to represent a content type.\n\t* @private\n\t*/\n\tfunction ContentType(type) {\n\t\tthis.parameters = Object.create(null);\n\t\tthis.type = type;\n\t}\n}));\n\n//#endregion\n//#region ../core-internal/src/shared/mediaType.ts\nvar import_content_type = /* @__PURE__ */ __toESM(require_content_type(), 1);\n/**\n* Extracts the media type (the lowercased `type/subtype` pair, without\n* parameters) from a raw `Content-Type` header value, or `undefined` when the\n* header is missing or empty.\n*\n* Content-Type comparisons must use the parsed media type, never a substring\n* search of the raw header: a value like `text/plain; a=application/json`\n* contains the substring `application/json` but its media type is\n* `text/plain`, and case variants or parameters make naive string comparison\n* wrong in both directions.\n*\n* \"Essence\" is the WHATWG MIME Sniffing standard's term for the bare\n* `type/subtype` pair (https://mimesniff.spec.whatwg.org/#mime-type-essence);\n* the Fetch standard's request classification is defined against it\n* (https://fetch.spec.whatwg.org/#cors-safelisted-request-header).\n*\n* Parsing is RFC 9110 (`content-type` package) first. When the parameter\n* section is malformed (`application/json;`, `application/json; charset=`),\n* browsers and most HTTP stacks still derive the media type from the segment\n* before the first `;` — the fallback matches that widely-implemented\n* behavior, so a header whose media type is unambiguous is not rejected for\n* a sloppy parameter section.\n*/\nfunction mediaTypeEssence(header) {\n\tif (!header) return;\n\ttry {\n\t\treturn import_content_type.parse(header).type;\n\t} catch {\n\t\tconst essence = (header.split(\";\", 1)[0] ?? \"\").trim().toLowerCase();\n\t\tif (essence === \"\" || header.slice(essence.length).includes(\",\")) return;\n\t\treturn essence;\n\t}\n}\n/**\n* Whether a raw `Content-Type` header value denotes `application/json`.\n* Parameters (for example `charset=utf-8`) are allowed and ignored; malformed\n* parameter sections do not reject a header whose media type is unambiguously\n* `application/json` (see `mediaTypeEssence` for the exact grammar).\n*/\nfunction isJsonContentType(header) {\n\tif (header === \"application/json\") return true;\n\treturn mediaTypeEssence(header) === \"application/json\";\n}\n\n//#endregion\n//#region ../core-internal/src/shared/metadataUtils.ts\n/**\n* Utilities for working with {@linkcode BaseMetadata} objects.\n*/\n/**\n* Gets the display name for an object with {@linkcode BaseMetadata}.\n* For tools, the precedence is: `title` → {@linkcode index.ToolAnnotations | annotations}.`title` → `name`\n* For other objects: `title` → `name`\n* This implements the spec requirement: \"if no title is provided, name should be used for display purposes\"\n*/\nfunction getDisplayName(metadata) {\n\tif (metadata.title !== void 0 && metadata.title !== \"\") return metadata.title;\n\tif (\"annotations\" in metadata && metadata.annotations?.title) return metadata.annotations.title;\n\treturn metadata.name;\n}\n\n//#endregion\n//#region ../core-internal/src/shared/stdio.ts\nconst STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;\n/**\n* Buffers a continuous stdio stream into discrete JSON-RPC messages.\n*/\nvar ReadBuffer = class {\n\t_buffer;\n\t_maxBufferSize;\n\tconstructor(options) {\n\t\tthis._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;\n\t}\n\tappend(chunk) {\n\t\tif ((this._buffer?.length ?? 0) + chunk.length > this._maxBufferSize) {\n\t\t\tthis.clear();\n\t\t\tthrow new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);\n\t\t}\n\t\tthis._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;\n\t}\n\treadMessage() {\n\t\twhile (this._buffer) {\n\t\t\tconst index = this._buffer.indexOf(\"\\n\");\n\t\t\tif (index === -1) return null;\n\t\t\tconst line = this._buffer.toString(\"utf8\", 0, index).replace(/\\r$/, \"\");\n\t\t\tthis._buffer = this._buffer.subarray(index + 1);\n\t\t\ttry {\n\t\t\t\treturn deserializeMessage(line);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof SyntaxError) continue;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\tclear() {\n\t\tthis._buffer = void 0;\n\t}\n};\nfunction deserializeMessage(line) {\n\treturn JSONRPCMessageSchema.parse(JSON.parse(line));\n}\nfunction serializeMessage(message) {\n\treturn JSON.stringify(message) + \"\\n\";\n}\n\n//#endregion\n//#region ../core-internal/src/shared/toolNameValidation.ts\n/**\n* Tool name validation utilities according to SEP: Specify Format for Tool Names\n*\n* Tool names SHOULD be between 1 and 128 characters in length (inclusive).\n* Tool names are case-sensitive.\n* Allowed characters: uppercase and lowercase ASCII letters (`A-Z`, `a-z`), digits\n* (`0-9`), underscore (`_`), dash (`-`), and dot (`.`).\n* Tool names SHOULD NOT contain spaces, commas, or other special characters.\n*\n* @see {@link https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986 | SEP-986: Specify Format for Tool Names}\n*/\n/**\n* Regular expression for valid tool names according to SEP-986 specification\n*/\nconst TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;\n/**\n* Validates a tool name according to the SEP specification\n* @param name - The tool name to validate\n* @returns An object containing validation result and any warnings\n*/\nfunction validateToolName(name) {\n\tconst warnings = [];\n\tif (name.length === 0) return {\n\t\tisValid: false,\n\t\twarnings: [\"Tool name cannot be empty\"]\n\t};\n\tif (name.length > 128) return {\n\t\tisValid: false,\n\t\twarnings: [`Tool name exceeds maximum length of 128 characters (current: ${name.length})`]\n\t};\n\tif (name.includes(\" \")) warnings.push(\"Tool name contains spaces, which may cause parsing issues\");\n\tif (name.includes(\",\")) warnings.push(\"Tool name contains commas, which may cause parsing issues\");\n\tif (name.startsWith(\"-\") || name.endsWith(\"-\")) warnings.push(\"Tool name starts or ends with a dash, which may cause parsing issues in some contexts\");\n\tif (name.startsWith(\".\") || name.endsWith(\".\")) warnings.push(\"Tool name starts or ends with a dot, which may cause parsing issues in some contexts\");\n\tif (!TOOL_NAME_REGEX.test(name)) {\n\t\tconst invalidChars = [...name].filter((char) => !/[A-Za-z0-9._-]/.test(char)).filter((char, index, arr) => arr.indexOf(char) === index);\n\t\twarnings.push(`Tool name contains invalid characters: ${invalidChars.map((c) => `\"${c}\"`).join(\", \")}`, \"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)\");\n\t\treturn {\n\t\t\tisValid: false,\n\t\t\twarnings\n\t\t};\n\t}\n\treturn {\n\t\tisValid: true,\n\t\twarnings\n\t};\n}\n/**\n* Issues warnings for non-conforming tool names\n* @param name - The tool name that triggered the warnings\n* @param warnings - Array of warning messages\n*/\nfunction issueToolNameWarning(name, warnings) {\n\tif (warnings.length > 0) {\n\t\tconsole.warn(`Tool name validation warning for \"${name}\":`);\n\t\tfor (const warning of warnings) console.warn(`  - ${warning}`);\n\t\tconsole.warn(\"Tool registration will proceed, but this may cause compatibility issues.\");\n\t\tconsole.warn(\"Consider updating the tool name to conform to the MCP tool naming standard.\");\n\t\tconsole.warn(\"See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.\");\n\t}\n}\n/**\n* Validates a tool name and issues warnings for non-conforming names\n* @param name - The tool name to validate\n* @returns `true` if the name is valid, `false` otherwise\n*/\nfunction validateAndWarnToolName(name) {\n\tconst result = validateToolName(name);\n\tissueToolNameWarning(name, result.warnings);\n\treturn result.isValid;\n}\n\n//#endregion\n//#region ../core-internal/src/shared/transport.ts\n/**\n* Normalizes `HeadersInit` to a plain `Record<string, string>` for manipulation.\n* Handles `Headers` objects, arrays of tuples, and plain objects.\n*/\nfunction normalizeHeaders(headers) {\n\tif (!headers) return {};\n\tif (headers instanceof Headers) return Object.fromEntries(headers.entries());\n\tif (Array.isArray(headers)) return Object.fromEntries(headers);\n\treturn { ...headers };\n}\n/**\n* Creates a fetch function that includes base `RequestInit` options.\n* This ensures requests inherit settings like credentials, mode, headers, etc. from the base init.\n*\n* @param baseFetch - The base fetch function to wrap (defaults to global `fetch`)\n* @param baseInit - The base `RequestInit` to merge with each request\n* @returns A wrapped fetch function that merges base options with call-specific options\n*/\nfunction createFetchWithInit(baseFetch = fetch, baseInit) {\n\tif (!baseInit) return baseFetch;\n\treturn async (url, init) => {\n\t\treturn baseFetch(url, {\n\t\t\t...baseInit,\n\t\t\t...init,\n\t\t\theaders: init?.headers ? {\n\t\t\t\t...normalizeHeaders(baseInit.headers),\n\t\t\t\t...normalizeHeaders(init.headers)\n\t\t\t} : baseInit.headers\n\t\t});\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/shared/uriTemplate.ts\nconst MAX_TEMPLATE_LENGTH = 1e6;\nconst MAX_VARIABLE_LENGTH = 1e6;\nconst MAX_TEMPLATE_EXPRESSIONS = 1e4;\nconst MAX_REGEX_LENGTH = 1e6;\nvar UriTemplate = class UriTemplate {\n\t/**\n\t* Returns true if the given string contains any URI template expressions.\n\t* A template expression is a sequence of characters enclosed in curly braces,\n\t* like `{foo}` or `{?bar}`.\n\t*/\n\tstatic isTemplate(str) {\n\t\treturn /\\{[^}\\s]+\\}/.test(str);\n\t}\n\tstatic validateLength(str, max, context) {\n\t\tif (str.length > max) throw new Error(`${context} exceeds maximum length of ${max} characters (got ${str.length})`);\n\t}\n\ttemplate;\n\tparts;\n\tget variableNames() {\n\t\treturn this.parts.flatMap((part) => typeof part === \"string\" ? [] : part.names);\n\t}\n\tconstructor(template) {\n\t\tUriTemplate.validateLength(template, MAX_TEMPLATE_LENGTH, \"Template\");\n\t\tthis.template = template;\n\t\tthis.parts = this.parse(template);\n\t}\n\ttoString() {\n\t\treturn this.template;\n\t}\n\tparse(template) {\n\t\tconst parts = [];\n\t\tlet currentText = \"\";\n\t\tlet i = 0;\n\t\tlet expressionCount = 0;\n\t\twhile (i < template.length) if (template[i] === \"{\") {\n\t\t\tif (currentText) {\n\t\t\t\tparts.push(currentText);\n\t\t\t\tcurrentText = \"\";\n\t\t\t}\n\t\t\tconst end = template.indexOf(\"}\", i);\n\t\t\tif (end === -1) throw new Error(\"Unclosed template expression\");\n\t\t\texpressionCount++;\n\t\t\tif (expressionCount > MAX_TEMPLATE_EXPRESSIONS) throw new Error(`Template contains too many expressions (max ${MAX_TEMPLATE_EXPRESSIONS})`);\n\t\t\tconst expr = template.slice(i + 1, end);\n\t\t\tconst operator = this.getOperator(expr);\n\t\t\tconst exploded = expr.includes(\"*\");\n\t\t\tconst names = this.getNames(expr);\n\t\t\tconst name = names[0];\n\t\t\tfor (const name$1 of names) UriTemplate.validateLength(name$1, MAX_VARIABLE_LENGTH, \"Variable name\");\n\t\t\tparts.push({\n\t\t\t\tname,\n\t\t\t\toperator,\n\t\t\t\tnames,\n\t\t\t\texploded\n\t\t\t});\n\t\t\ti = end + 1;\n\t\t} else {\n\t\t\tcurrentText += template[i];\n\t\t\ti++;\n\t\t}\n\t\tif (currentText) parts.push(currentText);\n\t\treturn parts;\n\t}\n\tgetOperator(expr) {\n\t\treturn [\n\t\t\t\"+\",\n\t\t\t\"#\",\n\t\t\t\".\",\n\t\t\t\"/\",\n\t\t\t\"?\",\n\t\t\t\"&\"\n\t\t].find((op) => expr.startsWith(op)) || \"\";\n\t}\n\tgetNames(expr) {\n\t\tconst operator = this.getOperator(expr);\n\t\treturn expr.slice(operator.length).split(\",\").map((name) => name.replace(\"*\", \"\").trim()).filter((name) => name.length > 0);\n\t}\n\tencodeValue(value, operator) {\n\t\tUriTemplate.validateLength(value, MAX_VARIABLE_LENGTH, \"Variable value\");\n\t\tif (operator === \"+\" || operator === \"#\") return encodeURI(value);\n\t\treturn encodeURIComponent(value);\n\t}\n\texpandPart(part, variables) {\n\t\tif (part.operator === \"?\" || part.operator === \"&\") {\n\t\t\tconst pairs = part.names.map((name) => {\n\t\t\t\tconst value$1 = variables[name];\n\t\t\t\tif (value$1 === void 0) return \"\";\n\t\t\t\treturn `${name}=${Array.isArray(value$1) ? value$1.map((v) => this.encodeValue(v, part.operator)).join(\",\") : this.encodeValue(value$1.toString(), part.operator)}`;\n\t\t\t}).filter((pair) => pair.length > 0);\n\t\t\tif (pairs.length === 0) return \"\";\n\t\t\treturn (part.operator === \"?\" ? \"?\" : \"&\") + pairs.join(\"&\");\n\t\t}\n\t\tif (part.names.length > 1) {\n\t\t\tconst values = part.names.map((name) => variables[name]).filter((v) => v !== void 0);\n\t\t\tif (values.length === 0) return \"\";\n\t\t\treturn values.map((v) => Array.isArray(v) ? v[0] : v).join(\",\");\n\t\t}\n\t\tconst value = variables[part.name];\n\t\tif (value === void 0) return \"\";\n\t\tconst encoded = (Array.isArray(value) ? value : [value]).map((v) => this.encodeValue(v, part.operator));\n\t\tswitch (part.operator) {\n\t\t\tcase \"\": return encoded.join(\",\");\n\t\t\tcase \"+\": return encoded.join(\",\");\n\t\t\tcase \"#\": return \"#\" + encoded.join(\",\");\n\t\t\tcase \".\": return \".\" + encoded.join(\".\");\n\t\t\tcase \"/\": return \"/\" + encoded.join(\"/\");\n\t\t\tdefault: return encoded.join(\",\");\n\t\t}\n\t}\n\texpand(variables) {\n\t\tlet result = \"\";\n\t\tlet hasQueryParam = false;\n\t\tfor (const part of this.parts) {\n\t\t\tif (typeof part === \"string\") {\n\t\t\t\tresult += part;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst expanded = this.expandPart(part, variables);\n\t\t\tif (!expanded) continue;\n\t\t\tresult += (part.operator === \"?\" || part.operator === \"&\") && hasQueryParam ? expanded.replace(\"?\", \"&\") : expanded;\n\t\t\tif (part.operator === \"?\" || part.operator === \"&\") hasQueryParam = true;\n\t\t}\n\t\treturn result;\n\t}\n\tescapeRegExp(str) {\n\t\treturn str.replaceAll(/[.*+?^${}()|[\\]\\\\]/g, String.raw`\\$&`);\n\t}\n\tpartToRegExp(part) {\n\t\tconst patterns = [];\n\t\tfor (const name$1 of part.names) UriTemplate.validateLength(name$1, MAX_VARIABLE_LENGTH, \"Variable name\");\n\t\tif (part.operator === \"?\" || part.operator === \"&\") {\n\t\t\tfor (let i = 0; i < part.names.length; i++) {\n\t\t\t\tconst name$1 = part.names[i];\n\t\t\t\tconst prefix = i === 0 ? \"\\\\\" + part.operator : \"&\";\n\t\t\t\tpatterns.push({\n\t\t\t\t\tpattern: prefix + this.escapeRegExp(name$1) + \"=([^&]+)\",\n\t\t\t\t\tname: name$1\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn patterns;\n\t\t}\n\t\tlet pattern;\n\t\tconst name = part.name;\n\t\tswitch (part.operator) {\n\t\t\tcase \"\":\n\t\t\t\tpattern = part.exploded ? \"([^/,]+(?:,[^/,]+)*)\" : \"([^/,]+)\";\n\t\t\t\tbreak;\n\t\t\tcase \"+\":\n\t\t\tcase \"#\":\n\t\t\t\tpattern = \"(.+)\";\n\t\t\t\tbreak;\n\t\t\tcase \".\":\n\t\t\t\tpattern = String.raw`\\.([^/,]+)`;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tpattern = \"/\" + (part.exploded ? \"([^/,]+(?:,[^/,]+)*)\" : \"([^/,]+)\");\n\t\t\t\tbreak;\n\t\t\tdefault: pattern = \"([^/]+)\";\n\t\t}\n\t\tpatterns.push({\n\t\t\tpattern,\n\t\t\tname\n\t\t});\n\t\treturn patterns;\n\t}\n\tmatch(uri) {\n\t\tUriTemplate.validateLength(uri, MAX_TEMPLATE_LENGTH, \"URI\");\n\t\tlet pattern = \"^\";\n\t\tconst names = [];\n\t\tfor (const part of this.parts) if (typeof part === \"string\") pattern += this.escapeRegExp(part);\n\t\telse {\n\t\t\tconst patterns = this.partToRegExp(part);\n\t\t\tfor (const { pattern: partPattern, name } of patterns) {\n\t\t\t\tpattern += partPattern;\n\t\t\t\tnames.push({\n\t\t\t\t\tname,\n\t\t\t\t\texploded: part.exploded\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tpattern += \"$\";\n\t\tUriTemplate.validateLength(pattern, MAX_REGEX_LENGTH, \"Generated regex pattern\");\n\t\tconst regex = new RegExp(pattern);\n\t\tconst match = uri.match(regex);\n\t\tif (!match) return null;\n\t\tconst result = {};\n\t\tfor (const [i, name_] of names.entries()) {\n\t\t\tconst { name, exploded } = name_;\n\t\t\tconst value = match[i + 1];\n\t\t\tconst cleanName = name.replace(\"*\", \"\");\n\t\t\tresult[cleanName] = exploded && value.includes(\",\") ? value.split(\",\") : value;\n\t\t}\n\t\treturn result;\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/util/inMemory.ts\n/**\n* In-memory transport for creating clients and servers that talk to each other within the same process.\n*\n* Intended for testing and development. For production in-process connections, use\n* `StreamableHTTPClientTransport` against a local server URL.\n*/\nvar InMemoryTransport = class InMemoryTransport {\n\t_otherTransport;\n\t_messageQueue = [];\n\t_closed = false;\n\tonclose;\n\tonerror;\n\tonmessage;\n\tsessionId;\n\t/**\n\t* Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a {@linkcode @modelcontextprotocol/client!client/client.Client | Client} and one to a {@linkcode @modelcontextprotocol/server!server/server.Server | Server}.\n\t*/\n\tstatic createLinkedPair() {\n\t\tconst clientTransport = new InMemoryTransport();\n\t\tconst serverTransport = new InMemoryTransport();\n\t\tclientTransport._otherTransport = serverTransport;\n\t\tserverTransport._otherTransport = clientTransport;\n\t\treturn [clientTransport, serverTransport];\n\t}\n\tasync start() {\n\t\twhile (this._messageQueue.length > 0) {\n\t\t\tconst queuedMessage = this._messageQueue.shift();\n\t\t\tthis.onmessage?.(queuedMessage.message, queuedMessage.extra);\n\t\t}\n\t}\n\tasync close() {\n\t\tif (this._closed) return;\n\t\tthis._closed = true;\n\t\tconst other = this._otherTransport;\n\t\tthis._otherTransport = void 0;\n\t\ttry {\n\t\t\tawait other?.close();\n\t\t} finally {\n\t\t\tthis.onclose?.();\n\t\t}\n\t}\n\t/**\n\t* Sends a message with optional auth info.\n\t* This is useful for testing authentication scenarios.\n\t*/\n\tasync send(message, options) {\n\t\tif (!this._otherTransport) throw new SdkError(SdkErrorCode.NotConnected, \"Not connected\");\n\t\tif (this._otherTransport.onmessage) this._otherTransport.onmessage(message, { authInfo: options?.authInfo });\n\t\telse this._otherTransport._messageQueue.push({\n\t\t\tmessage,\n\t\t\textra: { authInfo: options?.authInfo }\n\t\t});\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/util/zodCompat.ts\n/**\n* Zod-specific helpers for the v1-compat raw-shape shorthand on\n* `registerTool`/`registerPrompt`. Kept separate from `standardSchema.ts` so\n* that file stays library-agnostic per the Standard Schema spec.\n*/\nfunction isZodV4Schema(v) {\n\treturn typeof v === \"object\" && v !== null && \"_zod\" in v;\n}\nfunction looksLikeZodV3(v) {\n\treturn typeof v === \"object\" && v !== null && !(\"_zod\" in v) && \"_def\" in v && typeof v._def?.typeName === \"string\";\n}\n/**\n* Detects a \"raw shape\" — a plain object whose values are Zod field schemas,\n* e.g. `{ name: z.string() }`. Powers the auto-wrap in\n* {@linkcode normalizeRawShapeSchema}, which wraps with `z.object()`, so only\n* Zod values are supported.\n*\n* @internal\n*/\nfunction isZodRawShape(obj) {\n\tif (typeof obj !== \"object\" || obj === null) return false;\n\tif (isStandardSchema(obj)) return false;\n\tconst proto = Object.getPrototypeOf(obj);\n\tif (proto !== Object.prototype && proto !== null) return false;\n\treturn Object.values(obj).every((v) => isZodV4Schema(v));\n}\n/**\n* Accepts either a {@linkcode StandardSchemaWithJSON} or a raw Zod shape\n* `{ field: z.string() }` and returns a {@linkcode StandardSchemaWithJSON}.\n* Raw shapes are wrapped with `z.object()` so the rest of the pipeline sees a\n* uniform schema type; already-wrapped schemas pass through unchanged.\n*\n* @internal\n*/\nfunction normalizeRawShapeSchema(schema) {\n\tif (schema === void 0) return void 0;\n\tif (isZodRawShape(schema)) return z.object(schema);\n\tif (typeof schema === \"object\" && schema !== null && !isStandardSchema(schema) && Object.values(schema).some((v) => looksLikeZodV3(v))) throw new TypeError(\"Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.\");\n\tif (!isStandardSchema(schema)) throw new TypeError(\"inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).\");\n\treturn schema;\n}\n\n//#endregion\n//#region ../core-internal/src/wire/preload.ts\n/**\n* Explicit warm-up entry for the lazy wire-schema layers.\n*\n* The per-revision wire schemas are built lazily: each era's schema set sits\n* behind a memoized factory (`buildSchemas2025`/`buildSchemas2026`), and the\n* registry/codec lookup maps above those factories are memoized the same way.\n* That laziness is the right default on process-per-invocation runtimes (CLI\n* tools, dev servers), where module evaluation IS startup latency and most\n* short-lived processes never validate a message on both eras.\n*\n* On platforms that bill request CPU but not module evaluation — isolate-based\n* edge/serverless runtimes such as Cloudflare Workers — the trade inverts:\n* module-scope work runs during isolate warm-up outside any request, while\n* lazy construction lands inside the first request's billed (and latency\n* budgeted) CPU. `preloadSchemas()` lets deployments on such platforms move\n* the one-time construction cost back to module scope by calling it at module\n* scope themselves. The packages' own workerd shims already do this, so\n* Workers deployments get eager construction automatically.\n*/\n/**\n* Eagerly builds every lazily-constructed wire-schema layer, so that no later\n* validation pays schema-construction cost.\n*\n* Synchronous and idempotent: every layer is a memo, so the first call does\n* all the work and subsequent calls return immediately. Reference identity is\n* unaffected — this forces the same memos every lazy consumer pulls through.\n*\n* Call it at module scope on platforms that bill per-request CPU but not\n* module evaluation (isolate-based edge/serverless runtimes), where deferring\n* construction would move it into the first request of every fresh isolate:\n*\n* ```ts\n* // from '@modelcontextprotocol/server' or '@modelcontextprotocol/client' —\n* // each package bundles its own schema copy, so warm the one(s) you import.\n* preloadSchemas(); // module scope — runs during isolate warm-up\n* ```\n*\n* On Node CLIs and other process-per-invocation runtimes, prefer the lazy\n* default — there, module-scope construction is pure added boot latency.\n*/\nfunction preloadSchemas() {\n\tbuildSchemas2025();\n\tbuildSchemas2026();\n\twarmRegistryMaps2025();\n\twarmInputSchemaMaps2026();\n\twarmWireResultSchemas2026();\n}\n\n//#endregion\n//#region ../core-internal/src/validators/fromJsonSchema.ts\n/**\n* Wrap a raw JSON Schema object as a {@linkcode StandardSchemaWithJSON} so it can be\n* passed to `registerTool` / `registerPrompt`. Use this when you already have JSON\n* Schema (e.g. from TypeBox, or hand-written) and want to register it without going\n* through a Standard Schema library.\n*\n* The callback arguments will be typed `unknown` (raw JSON Schema has no TypeScript\n* types attached). Cast at the call site, or use the generic `fromJsonSchema<MyType>(...)`.\n*\n* @param schema - A JSON Schema object describing the expected shape\n* @param validator - A validator provider. When importing `fromJsonSchema` from\n*   `@modelcontextprotocol/server` or `@modelcontextprotocol/client`, a runtime-appropriate\n*   default is provided automatically (AJV on Node.js, CfWorker on edge runtimes).\n*\n* @example\n* ```ts source=\"./fromJsonSchema.examples.ts#fromJsonSchema_basicUsage\"\n* const inputSchema = fromJsonSchema<{ name: string }>(\n*     { type: 'object', properties: { name: { type: 'string' } }, required: ['name'] },\n*     validator\n* );\n* // Use with server.registerTool('greet', { inputSchema }, handler)\n* ```\n*/\nfunction fromJsonSchema(schema, validator) {\n\tconst check = validator.getValidator(schema);\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"mcp\",\n\t\tjsonSchema: {\n\t\t\tinput: () => schema,\n\t\t\toutput: () => schema\n\t\t},\n\t\tvalidate: (data) => {\n\t\t\tconst result = check(data);\n\t\t\treturn result.valid ? { value: result.data } : { issues: [{ message: result.errorMessage }] };\n\t\t}\n\t} };\n}\n\n//#endregion\nexport { isTaskAugmentedRequestParams as $, promptArgumentsFromStandardSchema as A, LATEST_PROTOCOL_VERSION as At, scanXMcpHeaderDeclarations as B, TRACESTATE_META_KEY as Bt, REQUEST_STATE_ONLY_LEG_PACING_MS as C, CLIENT_CAPABILITIES_META_KEY as Ct, acceptedContent as D, INVALID_PARAMS as Dt, sleep as E, INTERNAL_ERROR as Et, carriesValidModernEnvelopeClaim as F, RELATED_TASK_META_KEY as Ft, isInitializeRequest as G, resourceUrlFromServerUrl as Gt, assertCompleteRequestPrompt as H, requiredClientCapabilitiesForInputRequest as Ht, classifyInboundRequest as I, SERVER_INFO_META_KEY as It, isJSONRPCErrorResponse as J, SdkHttpError as Jt, isInitializedNotification as K, SdkError as Kt, httpStatusForErrorCode as L, SUBSCRIPTION_ID_META_KEY as Lt, validateStandardSchema as M, METHOD_NOT_FOUND as Mt, parseSchema as N, PARSE_ERROR as Nt, inputRequired as O, INVALID_REQUEST as Ot, LADDER_ERROR_HTTP_STATUS as P, PROTOCOL_VERSION_META_KEY as Pt, isJSONRPCResultResponse as Q, modernOnlyStrictRejection as R, SUPPORTED_PROTOCOL_VERSIONS as Rt, specTypeSchemas as S, BAGGAGE_META_KEY as St, linkedRoundAbort as T, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as Tt, assertCompleteRequestResourceTemplate as U, requiredClientCapabilitiesForRequest as Ut, validateMcpParamHeaders as V, missingClientCapabilities as Vt, isCallToolResult as W, checkResourceAllowed as Wt, isJSONRPCRequest as X, OAuthErrorCode as Xt, isJSONRPCNotification as Y, OAuthError as Yt, isJSONRPCResponse as Z, mergeCapabilities as _, normalizeContentlessToolResult as _t, UriTemplate as a, requestMetaOf as at, withRequestStateValue as b, legacyProtocolVersions as bt, ReadBuffer as c, codecForVersion as ct, serializeMessage as d, ResourceNotFoundError as dt, parseJSONRPCMessage as et, getDisplayName as f, UnsupportedProtocolVersionError as ft, Protocol as g, attachCacheHintFallback as gt, DEFAULT_REQUEST_TIMEOUT_MSEC as h, assertValidCacheHint as ht, InMemoryTransport as i, hasEnvelopeClaim as it, standardSchemaToJsonSchema as j, LOG_LEVEL_META_KEY as jt, inputResponse as k, JSONRPC_VERSION as kt, STDIO_DEFAULT_MAX_BUFFER_SIZE as l, MissingRequiredClientCapabilityError as lt, mediaTypeEssence as m, ProtocolErrorCode as mt, preloadSchemas as n, LoggingLevelSchema as nt, createFetchWithInit as o, validateEnvelopeMeta as ot, isJsonContentType as p, UrlElicitationRequiredError as pt, isInputRequiredResult as q, SdkErrorCode as qt, normalizeRawShapeSchema as r, envelopeClaimVersion as rt, validateAndWarnToolName as s, MODERN_WIRE_REVISION as st, fromJsonSchema as t, JSONRPCMessageSchema as tt, deserializeMessage as u, ProtocolError as ut, requestStateAccessor as v, SUPPORTED_MODERN_PROTOCOL_VERSIONS as vt, inputRequiredRoundsExceededMessage as w, CLIENT_INFO_META_KEY as wt, isSpecType as x, modernProtocolVersions as xt, setNegotiatedProtocolVersion as y, isModernProtocolVersion as yt, validateStandardRequestHeaders as z, TRACEPARENT_META_KEY as zt };\n//# sourceMappingURL=src-CX2iR2pK.mjs.map","import { r as __toESM, t as __commonJSMin } from \"./chunk-Br0eD_fh.mjs\";\nimport { t as declaredDialect } from \"./dialects-DoSzNhcb.mjs\";\n\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js\nvar require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;\n\tvar _CodeOrName = class {};\n\texports._CodeOrName = _CodeOrName;\n\texports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\n\tvar Name = class extends _CodeOrName {\n\t\tconstructor(s) {\n\t\t\tsuper();\n\t\t\tif (!exports.IDENTIFIER.test(s)) throw new Error(\"CodeGen: name must be a valid identifier\");\n\t\t\tthis.str = s;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t\temptyStr() {\n\t\t\treturn false;\n\t\t}\n\t\tget names() {\n\t\t\treturn { [this.str]: 1 };\n\t\t}\n\t};\n\texports.Name = Name;\n\tvar _Code = class extends _CodeOrName {\n\t\tconstructor(code) {\n\t\t\tsuper();\n\t\t\tthis._items = typeof code === \"string\" ? [code] : code;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t\temptyStr() {\n\t\t\tif (this._items.length > 1) return false;\n\t\t\tconst item = this._items[0];\n\t\t\treturn item === \"\" || item === \"\\\"\\\"\";\n\t\t}\n\t\tget str() {\n\t\t\tvar _a;\n\t\t\treturn (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, \"\");\n\t\t}\n\t\tget names() {\n\t\t\tvar _a;\n\t\t\treturn (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {\n\t\t\t\tif (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1;\n\t\t\t\treturn names;\n\t\t\t}, {});\n\t\t}\n\t};\n\texports._Code = _Code;\n\texports.nil = new _Code(\"\");\n\tfunction _(strs, ...args) {\n\t\tconst code = [strs[0]];\n\t\tlet i = 0;\n\t\twhile (i < args.length) {\n\t\t\taddCodeArg(code, args[i]);\n\t\t\tcode.push(strs[++i]);\n\t\t}\n\t\treturn new _Code(code);\n\t}\n\texports._ = _;\n\tconst plus = new _Code(\"+\");\n\tfunction str(strs, ...args) {\n\t\tconst expr = [safeStringify(strs[0])];\n\t\tlet i = 0;\n\t\twhile (i < args.length) {\n\t\t\texpr.push(plus);\n\t\t\taddCodeArg(expr, args[i]);\n\t\t\texpr.push(plus, safeStringify(strs[++i]));\n\t\t}\n\t\toptimize(expr);\n\t\treturn new _Code(expr);\n\t}\n\texports.str = str;\n\tfunction addCodeArg(code, arg) {\n\t\tif (arg instanceof _Code) code.push(...arg._items);\n\t\telse if (arg instanceof Name) code.push(arg);\n\t\telse code.push(interpolate(arg));\n\t}\n\texports.addCodeArg = addCodeArg;\n\tfunction optimize(expr) {\n\t\tlet i = 1;\n\t\twhile (i < expr.length - 1) {\n\t\t\tif (expr[i] === plus) {\n\t\t\t\tconst res = mergeExprItems(expr[i - 1], expr[i + 1]);\n\t\t\t\tif (res !== void 0) {\n\t\t\t\t\texpr.splice(i - 1, 3, res);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\texpr[i++] = \"+\";\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n\tfunction mergeExprItems(a, b) {\n\t\tif (b === \"\\\"\\\"\") return a;\n\t\tif (a === \"\\\"\\\"\") return b;\n\t\tif (typeof a == \"string\") {\n\t\t\tif (b instanceof Name || a[a.length - 1] !== \"\\\"\") return;\n\t\t\tif (typeof b != \"string\") return `${a.slice(0, -1)}${b}\"`;\n\t\t\tif (b[0] === \"\\\"\") return a.slice(0, -1) + b.slice(1);\n\t\t\treturn;\n\t\t}\n\t\tif (typeof b == \"string\" && b[0] === \"\\\"\" && !(a instanceof Name)) return `\"${a}${b.slice(1)}`;\n\t}\n\tfunction strConcat(c1, c2) {\n\t\treturn c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;\n\t}\n\texports.strConcat = strConcat;\n\tfunction interpolate(x) {\n\t\treturn typeof x == \"number\" || typeof x == \"boolean\" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(\",\") : x);\n\t}\n\tfunction stringify(x) {\n\t\treturn new _Code(safeStringify(x));\n\t}\n\texports.stringify = stringify;\n\tfunction safeStringify(x) {\n\t\treturn JSON.stringify(x).replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\");\n\t}\n\texports.safeStringify = safeStringify;\n\tfunction getProperty(key) {\n\t\treturn typeof key == \"string\" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;\n\t}\n\texports.getProperty = getProperty;\n\tfunction getEsmExportName(key) {\n\t\tif (typeof key == \"string\" && exports.IDENTIFIER.test(key)) return new _Code(`${key}`);\n\t\tthrow new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n\t}\n\texports.getEsmExportName = getEsmExportName;\n\tfunction regexpCode(rx) {\n\t\treturn new _Code(rx.toString());\n\t}\n\texports.regexpCode = regexpCode;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js\nvar require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;\n\tconst code_1 = require_code$1();\n\tvar ValueError = class extends Error {\n\t\tconstructor(name) {\n\t\t\tsuper(`CodeGen: \"code\" for ${name} not defined`);\n\t\t\tthis.value = name.value;\n\t\t}\n\t};\n\tvar UsedValueState;\n\t(function(UsedValueState) {\n\t\tUsedValueState[UsedValueState[\"Started\"] = 0] = \"Started\";\n\t\tUsedValueState[UsedValueState[\"Completed\"] = 1] = \"Completed\";\n\t})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));\n\texports.varKinds = {\n\t\tconst: new code_1.Name(\"const\"),\n\t\tlet: new code_1.Name(\"let\"),\n\t\tvar: new code_1.Name(\"var\")\n\t};\n\tvar Scope = class {\n\t\tconstructor({ prefixes, parent } = {}) {\n\t\t\tthis._names = {};\n\t\t\tthis._prefixes = prefixes;\n\t\t\tthis._parent = parent;\n\t\t}\n\t\ttoName(nameOrPrefix) {\n\t\t\treturn nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn new code_1.Name(this._newName(prefix));\n\t\t}\n\t\t_newName(prefix) {\n\t\t\tconst ng = this._names[prefix] || this._nameGroup(prefix);\n\t\t\treturn `${prefix}${ng.index++}`;\n\t\t}\n\t\t_nameGroup(prefix) {\n\t\t\tvar _a, _b;\n\t\t\tif (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`);\n\t\t\treturn this._names[prefix] = {\n\t\t\t\tprefix,\n\t\t\t\tindex: 0\n\t\t\t};\n\t\t}\n\t};\n\texports.Scope = Scope;\n\tvar ValueScopeName = class extends code_1.Name {\n\t\tconstructor(prefix, nameStr) {\n\t\t\tsuper(nameStr);\n\t\t\tthis.prefix = prefix;\n\t\t}\n\t\tsetValue(value, { property, itemIndex }) {\n\t\t\tthis.value = value;\n\t\t\tthis.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;\n\t\t}\n\t};\n\texports.ValueScopeName = ValueScopeName;\n\tconst line = (0, code_1._)`\\n`;\n\tvar ValueScope = class extends Scope {\n\t\tconstructor(opts) {\n\t\t\tsuper(opts);\n\t\t\tthis._values = {};\n\t\t\tthis._scope = opts.scope;\n\t\t\tthis.opts = {\n\t\t\t\t...opts,\n\t\t\t\t_n: opts.lines ? line : code_1.nil\n\t\t\t};\n\t\t}\n\t\tget() {\n\t\t\treturn this._scope;\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn new ValueScopeName(prefix, this._newName(prefix));\n\t\t}\n\t\tvalue(nameOrPrefix, value) {\n\t\t\tvar _a;\n\t\t\tif (value.ref === void 0) throw new Error(\"CodeGen: ref must be passed in value\");\n\t\t\tconst name = this.toName(nameOrPrefix);\n\t\t\tconst { prefix } = name;\n\t\t\tconst valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;\n\t\t\tlet vs = this._values[prefix];\n\t\t\tif (vs) {\n\t\t\t\tconst _name = vs.get(valueKey);\n\t\t\t\tif (_name) return _name;\n\t\t\t} else vs = this._values[prefix] = /* @__PURE__ */ new Map();\n\t\t\tvs.set(valueKey, name);\n\t\t\tconst s = this._scope[prefix] || (this._scope[prefix] = []);\n\t\t\tconst itemIndex = s.length;\n\t\t\ts[itemIndex] = value.ref;\n\t\t\tname.setValue(value, {\n\t\t\t\tproperty: prefix,\n\t\t\t\titemIndex\n\t\t\t});\n\t\t\treturn name;\n\t\t}\n\t\tgetValue(prefix, keyOrRef) {\n\t\t\tconst vs = this._values[prefix];\n\t\t\tif (!vs) return;\n\t\t\treturn vs.get(keyOrRef);\n\t\t}\n\t\tscopeRefs(scopeName, values = this._values) {\n\t\t\treturn this._reduceValues(values, (name) => {\n\t\t\t\tif (name.scopePath === void 0) throw new Error(`CodeGen: name \"${name}\" has no value`);\n\t\t\t\treturn (0, code_1._)`${scopeName}${name.scopePath}`;\n\t\t\t});\n\t\t}\n\t\tscopeCode(values = this._values, usedValues, getCode) {\n\t\t\treturn this._reduceValues(values, (name) => {\n\t\t\t\tif (name.value === void 0) throw new Error(`CodeGen: name \"${name}\" has no value`);\n\t\t\t\treturn name.value.code;\n\t\t\t}, usedValues, getCode);\n\t\t}\n\t\t_reduceValues(values, valueCode, usedValues = {}, getCode) {\n\t\t\tlet code = code_1.nil;\n\t\t\tfor (const prefix in values) {\n\t\t\t\tconst vs = values[prefix];\n\t\t\t\tif (!vs) continue;\n\t\t\t\tconst nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();\n\t\t\t\tvs.forEach((name) => {\n\t\t\t\t\tif (nameSet.has(name)) return;\n\t\t\t\t\tnameSet.set(name, UsedValueState.Started);\n\t\t\t\t\tlet c = valueCode(name);\n\t\t\t\t\tif (c) {\n\t\t\t\t\t\tconst def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;\n\t\t\t\t\t\tcode = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`;\n\t\t\t\t\t} else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) code = (0, code_1._)`${code}${c}${this.opts._n}`;\n\t\t\t\t\telse throw new ValueError(name);\n\t\t\t\t\tnameSet.set(name, UsedValueState.Completed);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn code;\n\t\t}\n\t};\n\texports.ValueScope = ValueScope;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js\nvar require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;\n\tconst code_1 = require_code$1();\n\tconst scope_1 = require_scope();\n\tvar code_2 = require_code$1();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"strConcat\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.strConcat;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"getProperty\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.getProperty;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"regexpCode\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.regexpCode;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.Name;\n\t\t}\n\t});\n\tvar scope_2 = require_scope();\n\tObject.defineProperty(exports, \"Scope\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.Scope;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"ValueScope\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.ValueScope;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"ValueScopeName\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.ValueScopeName;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"varKinds\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.varKinds;\n\t\t}\n\t});\n\texports.operators = {\n\t\tGT: new code_1._Code(\">\"),\n\t\tGTE: new code_1._Code(\">=\"),\n\t\tLT: new code_1._Code(\"<\"),\n\t\tLTE: new code_1._Code(\"<=\"),\n\t\tEQ: new code_1._Code(\"===\"),\n\t\tNEQ: new code_1._Code(\"!==\"),\n\t\tNOT: new code_1._Code(\"!\"),\n\t\tOR: new code_1._Code(\"||\"),\n\t\tAND: new code_1._Code(\"&&\"),\n\t\tADD: new code_1._Code(\"+\")\n\t};\n\tvar Node = class {\n\t\toptimizeNodes() {\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(_names, _constants) {\n\t\t\treturn this;\n\t\t}\n\t};\n\tvar Def = class extends Node {\n\t\tconstructor(varKind, name, rhs) {\n\t\t\tsuper();\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.rhs = rhs;\n\t\t}\n\t\trender({ es5, _n }) {\n\t\t\tconst varKind = es5 ? scope_1.varKinds.var : this.varKind;\n\t\t\tconst rhs = this.rhs === void 0 ? \"\" : ` = ${this.rhs}`;\n\t\t\treturn `${varKind} ${this.name}${rhs};` + _n;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!names[this.name.str]) return;\n\t\t\tif (this.rhs) this.rhs = optimizeExpr(this.rhs, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};\n\t\t}\n\t};\n\tvar Assign = class extends Node {\n\t\tconstructor(lhs, rhs, sideEffects) {\n\t\t\tsuper();\n\t\t\tthis.lhs = lhs;\n\t\t\tthis.rhs = rhs;\n\t\t\tthis.sideEffects = sideEffects;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.lhs} = ${this.rhs};` + _n;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) return;\n\t\t\tthis.rhs = optimizeExpr(this.rhs, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addExprNames(this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }, this.rhs);\n\t\t}\n\t};\n\tvar AssignOp = class extends Assign {\n\t\tconstructor(lhs, op, rhs, sideEffects) {\n\t\t\tsuper(lhs, rhs, sideEffects);\n\t\t\tthis.op = op;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.lhs} ${this.op}= ${this.rhs};` + _n;\n\t\t}\n\t};\n\tvar Label = class extends Node {\n\t\tconstructor(label) {\n\t\t\tsuper();\n\t\t\tthis.label = label;\n\t\t\tthis.names = {};\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.label}:` + _n;\n\t\t}\n\t};\n\tvar Break = class extends Node {\n\t\tconstructor(label) {\n\t\t\tsuper();\n\t\t\tthis.label = label;\n\t\t\tthis.names = {};\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `break${this.label ? ` ${this.label}` : \"\"};` + _n;\n\t\t}\n\t};\n\tvar Throw = class extends Node {\n\t\tconstructor(error) {\n\t\t\tsuper();\n\t\t\tthis.error = error;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `throw ${this.error};` + _n;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.error.names;\n\t\t}\n\t};\n\tvar AnyCode = class extends Node {\n\t\tconstructor(code) {\n\t\t\tsuper();\n\t\t\tthis.code = code;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.code};` + _n;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\treturn `${this.code}` ? this : void 0;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tthis.code = optimizeExpr(this.code, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.code instanceof code_1._CodeOrName ? this.code.names : {};\n\t\t}\n\t};\n\tvar ParentNode = class extends Node {\n\t\tconstructor(nodes = []) {\n\t\t\tsuper();\n\t\t\tthis.nodes = nodes;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn this.nodes.reduce((code, n) => code + n.render(opts), \"\");\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tconst { nodes } = this;\n\t\t\tlet i = nodes.length;\n\t\t\twhile (i--) {\n\t\t\t\tconst n = nodes[i].optimizeNodes();\n\t\t\t\tif (Array.isArray(n)) nodes.splice(i, 1, ...n);\n\t\t\t\telse if (n) nodes[i] = n;\n\t\t\t\telse nodes.splice(i, 1);\n\t\t\t}\n\t\t\treturn nodes.length > 0 ? this : void 0;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tconst { nodes } = this;\n\t\t\tlet i = nodes.length;\n\t\t\twhile (i--) {\n\t\t\t\tconst n = nodes[i];\n\t\t\t\tif (n.optimizeNames(names, constants)) continue;\n\t\t\t\tsubtractNames(names, n.names);\n\t\t\t\tnodes.splice(i, 1);\n\t\t\t}\n\t\t\treturn nodes.length > 0 ? this : void 0;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.nodes.reduce((names, n) => addNames(names, n.names), {});\n\t\t}\n\t};\n\tvar BlockNode = class extends ParentNode {\n\t\trender(opts) {\n\t\t\treturn \"{\" + opts._n + super.render(opts) + \"}\" + opts._n;\n\t\t}\n\t};\n\tvar Root = class extends ParentNode {};\n\tvar Else = class extends BlockNode {};\n\tElse.kind = \"else\";\n\tvar If = class If extends BlockNode {\n\t\tconstructor(condition, nodes) {\n\t\t\tsuper(nodes);\n\t\t\tthis.condition = condition;\n\t\t}\n\t\trender(opts) {\n\t\t\tlet code = `if(${this.condition})` + super.render(opts);\n\t\t\tif (this.else) code += \"else \" + this.else.render(opts);\n\t\t\treturn code;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tsuper.optimizeNodes();\n\t\t\tconst cond = this.condition;\n\t\t\tif (cond === true) return this.nodes;\n\t\t\tlet e = this.else;\n\t\t\tif (e) {\n\t\t\t\tconst ns = e.optimizeNodes();\n\t\t\t\te = this.else = Array.isArray(ns) ? new Else(ns) : ns;\n\t\t\t}\n\t\t\tif (e) {\n\t\t\t\tif (cond === false) return e instanceof If ? e : e.nodes;\n\t\t\t\tif (this.nodes.length) return this;\n\t\t\t\treturn new If(not(cond), e instanceof If ? [e] : e.nodes);\n\t\t\t}\n\t\t\tif (cond === false || !this.nodes.length) return void 0;\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tvar _a;\n\t\t\tthis.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n\t\t\tif (!(super.optimizeNames(names, constants) || this.else)) return;\n\t\t\tthis.condition = optimizeExpr(this.condition, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\tconst names = super.names;\n\t\t\taddExprNames(names, this.condition);\n\t\t\tif (this.else) addNames(names, this.else.names);\n\t\t\treturn names;\n\t\t}\n\t};\n\tIf.kind = \"if\";\n\tvar For = class extends BlockNode {};\n\tFor.kind = \"for\";\n\tvar ForLoop = class extends For {\n\t\tconstructor(iteration) {\n\t\t\tsuper();\n\t\t\tthis.iteration = iteration;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `for(${this.iteration})` + super.render(opts);\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!super.optimizeNames(names, constants)) return;\n\t\t\tthis.iteration = optimizeExpr(this.iteration, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addNames(super.names, this.iteration.names);\n\t\t}\n\t};\n\tvar ForRange = class extends For {\n\t\tconstructor(varKind, name, from, to) {\n\t\t\tsuper();\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.from = from;\n\t\t\tthis.to = to;\n\t\t}\n\t\trender(opts) {\n\t\t\tconst varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;\n\t\t\tconst { name, from, to } = this;\n\t\t\treturn `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);\n\t\t}\n\t\tget names() {\n\t\t\treturn addExprNames(addExprNames(super.names, this.from), this.to);\n\t\t}\n\t};\n\tvar ForIter = class extends For {\n\t\tconstructor(loop, varKind, name, iterable) {\n\t\t\tsuper();\n\t\t\tthis.loop = loop;\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.iterable = iterable;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!super.optimizeNames(names, constants)) return;\n\t\t\tthis.iterable = optimizeExpr(this.iterable, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addNames(super.names, this.iterable.names);\n\t\t}\n\t};\n\tvar Func = class extends BlockNode {\n\t\tconstructor(name, args, async) {\n\t\t\tsuper();\n\t\t\tthis.name = name;\n\t\t\tthis.args = args;\n\t\t\tthis.async = async;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `${this.async ? \"async \" : \"\"}function ${this.name}(${this.args})` + super.render(opts);\n\t\t}\n\t};\n\tFunc.kind = \"func\";\n\tvar Return = class extends ParentNode {\n\t\trender(opts) {\n\t\t\treturn \"return \" + super.render(opts);\n\t\t}\n\t};\n\tReturn.kind = \"return\";\n\tvar Try = class extends BlockNode {\n\t\trender(opts) {\n\t\t\tlet code = \"try\" + super.render(opts);\n\t\t\tif (this.catch) code += this.catch.render(opts);\n\t\t\tif (this.finally) code += this.finally.render(opts);\n\t\t\treturn code;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tvar _a, _b;\n\t\t\tsuper.optimizeNodes();\n\t\t\t(_a = this.catch) === null || _a === void 0 || _a.optimizeNodes();\n\t\t\t(_b = this.finally) === null || _b === void 0 || _b.optimizeNodes();\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tvar _a, _b;\n\t\t\tsuper.optimizeNames(names, constants);\n\t\t\t(_a = this.catch) === null || _a === void 0 || _a.optimizeNames(names, constants);\n\t\t\t(_b = this.finally) === null || _b === void 0 || _b.optimizeNames(names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\tconst names = super.names;\n\t\t\tif (this.catch) addNames(names, this.catch.names);\n\t\t\tif (this.finally) addNames(names, this.finally.names);\n\t\t\treturn names;\n\t\t}\n\t};\n\tvar Catch = class extends BlockNode {\n\t\tconstructor(error) {\n\t\t\tsuper();\n\t\t\tthis.error = error;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `catch(${this.error})` + super.render(opts);\n\t\t}\n\t};\n\tCatch.kind = \"catch\";\n\tvar Finally = class extends BlockNode {\n\t\trender(opts) {\n\t\t\treturn \"finally\" + super.render(opts);\n\t\t}\n\t};\n\tFinally.kind = \"finally\";\n\tvar CodeGen = class {\n\t\tconstructor(extScope, opts = {}) {\n\t\t\tthis._values = {};\n\t\t\tthis._blockStarts = [];\n\t\t\tthis._constants = {};\n\t\t\tthis.opts = {\n\t\t\t\t...opts,\n\t\t\t\t_n: opts.lines ? \"\\n\" : \"\"\n\t\t\t};\n\t\t\tthis._extScope = extScope;\n\t\t\tthis._scope = new scope_1.Scope({ parent: extScope });\n\t\t\tthis._nodes = [new Root()];\n\t\t}\n\t\ttoString() {\n\t\t\treturn this._root.render(this.opts);\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn this._scope.name(prefix);\n\t\t}\n\t\tscopeName(prefix) {\n\t\t\treturn this._extScope.name(prefix);\n\t\t}\n\t\tscopeValue(prefixOrName, value) {\n\t\t\tconst name = this._extScope.value(prefixOrName, value);\n\t\t\t(this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set())).add(name);\n\t\t\treturn name;\n\t\t}\n\t\tgetScopeValue(prefix, keyOrRef) {\n\t\t\treturn this._extScope.getValue(prefix, keyOrRef);\n\t\t}\n\t\tscopeRefs(scopeName) {\n\t\t\treturn this._extScope.scopeRefs(scopeName, this._values);\n\t\t}\n\t\tscopeCode() {\n\t\t\treturn this._extScope.scopeCode(this._values);\n\t\t}\n\t\t_def(varKind, nameOrPrefix, rhs, constant) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\tif (rhs !== void 0 && constant) this._constants[name.str] = rhs;\n\t\t\tthis._leafNode(new Def(varKind, name, rhs));\n\t\t\treturn name;\n\t\t}\n\t\tconst(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tlet(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tvar(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tassign(lhs, rhs, sideEffects) {\n\t\t\treturn this._leafNode(new Assign(lhs, rhs, sideEffects));\n\t\t}\n\t\tadd(lhs, rhs) {\n\t\t\treturn this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));\n\t\t}\n\t\tcode(c) {\n\t\t\tif (typeof c == \"function\") c();\n\t\t\telse if (c !== code_1.nil) this._leafNode(new AnyCode(c));\n\t\t\treturn this;\n\t\t}\n\t\tobject(...keyValues) {\n\t\t\tconst code = [\"{\"];\n\t\t\tfor (const [key, value] of keyValues) {\n\t\t\t\tif (code.length > 1) code.push(\",\");\n\t\t\t\tcode.push(key);\n\t\t\t\tif (key !== value || this.opts.es5) {\n\t\t\t\t\tcode.push(\":\");\n\t\t\t\t\t(0, code_1.addCodeArg)(code, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcode.push(\"}\");\n\t\t\treturn new code_1._Code(code);\n\t\t}\n\t\tif(condition, thenBody, elseBody) {\n\t\t\tthis._blockNode(new If(condition));\n\t\t\tif (thenBody && elseBody) this.code(thenBody).else().code(elseBody).endIf();\n\t\t\telse if (thenBody) this.code(thenBody).endIf();\n\t\t\telse if (elseBody) throw new Error(\"CodeGen: \\\"else\\\" body without \\\"then\\\" body\");\n\t\t\treturn this;\n\t\t}\n\t\telseIf(condition) {\n\t\t\treturn this._elseNode(new If(condition));\n\t\t}\n\t\telse() {\n\t\t\treturn this._elseNode(new Else());\n\t\t}\n\t\tendIf() {\n\t\t\treturn this._endBlockNode(If, Else);\n\t\t}\n\t\t_for(node, forBody) {\n\t\t\tthis._blockNode(node);\n\t\t\tif (forBody) this.code(forBody).endFor();\n\t\t\treturn this;\n\t\t}\n\t\tfor(iteration, forBody) {\n\t\t\treturn this._for(new ForLoop(iteration), forBody);\n\t\t}\n\t\tforRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\treturn this._for(new ForRange(varKind, name, from, to), () => forBody(name));\n\t\t}\n\t\tforOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\tif (this.opts.es5) {\n\t\t\t\tconst arr = iterable instanceof code_1.Name ? iterable : this.var(\"_arr\", iterable);\n\t\t\t\treturn this.forRange(\"_i\", 0, (0, code_1._)`${arr}.length`, (i) => {\n\t\t\t\t\tthis.var(name, (0, code_1._)`${arr}[${i}]`);\n\t\t\t\t\tforBody(name);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name));\n\t\t}\n\t\tforIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n\t\t\tif (this.opts.ownProperties) return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\treturn this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n\t\t}\n\t\tendFor() {\n\t\t\treturn this._endBlockNode(For);\n\t\t}\n\t\tlabel(label) {\n\t\t\treturn this._leafNode(new Label(label));\n\t\t}\n\t\tbreak(label) {\n\t\t\treturn this._leafNode(new Break(label));\n\t\t}\n\t\treturn(value) {\n\t\t\tconst node = new Return();\n\t\t\tthis._blockNode(node);\n\t\t\tthis.code(value);\n\t\t\tif (node.nodes.length !== 1) throw new Error(\"CodeGen: \\\"return\\\" should have one node\");\n\t\t\treturn this._endBlockNode(Return);\n\t\t}\n\t\ttry(tryBody, catchCode, finallyCode) {\n\t\t\tif (!catchCode && !finallyCode) throw new Error(\"CodeGen: \\\"try\\\" without \\\"catch\\\" and \\\"finally\\\"\");\n\t\t\tconst node = new Try();\n\t\t\tthis._blockNode(node);\n\t\t\tthis.code(tryBody);\n\t\t\tif (catchCode) {\n\t\t\t\tconst error = this.name(\"e\");\n\t\t\t\tthis._currNode = node.catch = new Catch(error);\n\t\t\t\tcatchCode(error);\n\t\t\t}\n\t\t\tif (finallyCode) {\n\t\t\t\tthis._currNode = node.finally = new Finally();\n\t\t\t\tthis.code(finallyCode);\n\t\t\t}\n\t\t\treturn this._endBlockNode(Catch, Finally);\n\t\t}\n\t\tthrow(error) {\n\t\t\treturn this._leafNode(new Throw(error));\n\t\t}\n\t\tblock(body, nodeCount) {\n\t\t\tthis._blockStarts.push(this._nodes.length);\n\t\t\tif (body) this.code(body).endBlock(nodeCount);\n\t\t\treturn this;\n\t\t}\n\t\tendBlock(nodeCount) {\n\t\t\tconst len = this._blockStarts.pop();\n\t\t\tif (len === void 0) throw new Error(\"CodeGen: not in self-balancing block\");\n\t\t\tconst toClose = this._nodes.length - len;\n\t\t\tif (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);\n\t\t\tthis._nodes.length = len;\n\t\t\treturn this;\n\t\t}\n\t\tfunc(name, args = code_1.nil, async, funcBody) {\n\t\t\tthis._blockNode(new Func(name, args, async));\n\t\t\tif (funcBody) this.code(funcBody).endFunc();\n\t\t\treturn this;\n\t\t}\n\t\tendFunc() {\n\t\t\treturn this._endBlockNode(Func);\n\t\t}\n\t\toptimize(n = 1) {\n\t\t\twhile (n-- > 0) {\n\t\t\t\tthis._root.optimizeNodes();\n\t\t\t\tthis._root.optimizeNames(this._root.names, this._constants);\n\t\t\t}\n\t\t}\n\t\t_leafNode(node) {\n\t\t\tthis._currNode.nodes.push(node);\n\t\t\treturn this;\n\t\t}\n\t\t_blockNode(node) {\n\t\t\tthis._currNode.nodes.push(node);\n\t\t\tthis._nodes.push(node);\n\t\t}\n\t\t_endBlockNode(N1, N2) {\n\t\t\tconst n = this._currNode;\n\t\t\tif (n instanceof N1 || N2 && n instanceof N2) {\n\t\t\t\tthis._nodes.pop();\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthrow new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`);\n\t\t}\n\t\t_elseNode(node) {\n\t\t\tconst n = this._currNode;\n\t\t\tif (!(n instanceof If)) throw new Error(\"CodeGen: \\\"else\\\" without \\\"if\\\"\");\n\t\t\tthis._currNode = n.else = node;\n\t\t\treturn this;\n\t\t}\n\t\tget _root() {\n\t\t\treturn this._nodes[0];\n\t\t}\n\t\tget _currNode() {\n\t\t\tconst ns = this._nodes;\n\t\t\treturn ns[ns.length - 1];\n\t\t}\n\t\tset _currNode(node) {\n\t\t\tconst ns = this._nodes;\n\t\t\tns[ns.length - 1] = node;\n\t\t}\n\t};\n\texports.CodeGen = CodeGen;\n\tfunction addNames(names, from) {\n\t\tfor (const n in from) names[n] = (names[n] || 0) + (from[n] || 0);\n\t\treturn names;\n\t}\n\tfunction addExprNames(names, from) {\n\t\treturn from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;\n\t}\n\tfunction optimizeExpr(expr, names, constants) {\n\t\tif (expr instanceof code_1.Name) return replaceName(expr);\n\t\tif (!canOptimize(expr)) return expr;\n\t\treturn new code_1._Code(expr._items.reduce((items, c) => {\n\t\t\tif (c instanceof code_1.Name) c = replaceName(c);\n\t\t\tif (c instanceof code_1._Code) items.push(...c._items);\n\t\t\telse items.push(c);\n\t\t\treturn items;\n\t\t}, []));\n\t\tfunction replaceName(n) {\n\t\t\tconst c = constants[n.str];\n\t\t\tif (c === void 0 || names[n.str] !== 1) return n;\n\t\t\tdelete names[n.str];\n\t\t\treturn c;\n\t\t}\n\t\tfunction canOptimize(e) {\n\t\t\treturn e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);\n\t\t}\n\t}\n\tfunction subtractNames(names, from) {\n\t\tfor (const n in from) names[n] = (names[n] || 0) - (from[n] || 0);\n\t}\n\tfunction not(x) {\n\t\treturn typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : (0, code_1._)`!${par(x)}`;\n\t}\n\texports.not = not;\n\tconst andCode = mappend(exports.operators.AND);\n\tfunction and(...args) {\n\t\treturn args.reduce(andCode);\n\t}\n\texports.and = and;\n\tconst orCode = mappend(exports.operators.OR);\n\tfunction or(...args) {\n\t\treturn args.reduce(orCode);\n\t}\n\texports.or = or;\n\tfunction mappend(op) {\n\t\treturn (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;\n\t}\n\tfunction par(x) {\n\t\treturn x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js\nvar require_util = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst code_1 = require_code$1();\n\tfunction toHash(arr) {\n\t\tconst hash = {};\n\t\tfor (const item of arr) hash[item] = true;\n\t\treturn hash;\n\t}\n\texports.toHash = toHash;\n\tfunction alwaysValidSchema(it, schema) {\n\t\tif (typeof schema == \"boolean\") return schema;\n\t\tif (Object.keys(schema).length === 0) return true;\n\t\tcheckUnknownRules(it, schema);\n\t\treturn !schemaHasRules(schema, it.self.RULES.all);\n\t}\n\texports.alwaysValidSchema = alwaysValidSchema;\n\tfunction checkUnknownRules(it, schema = it.schema) {\n\t\tconst { opts, self } = it;\n\t\tif (!opts.strictSchema) return;\n\t\tif (typeof schema === \"boolean\") return;\n\t\tconst rules = self.RULES.keywords;\n\t\tfor (const key in schema) if (!rules[key]) checkStrictMode(it, `unknown keyword: \"${key}\"`);\n\t}\n\texports.checkUnknownRules = checkUnknownRules;\n\tfunction schemaHasRules(schema, rules) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (rules[key]) return true;\n\t\treturn false;\n\t}\n\texports.schemaHasRules = schemaHasRules;\n\tfunction schemaHasRulesButRef(schema, RULES) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (key !== \"$ref\" && RULES.all[key]) return true;\n\t\treturn false;\n\t}\n\texports.schemaHasRulesButRef = schemaHasRulesButRef;\n\tfunction schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {\n\t\tif (!$data) {\n\t\t\tif (typeof schema == \"number\" || typeof schema == \"boolean\") return schema;\n\t\t\tif (typeof schema == \"string\") return (0, codegen_1._)`${schema}`;\n\t\t}\n\t\treturn (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;\n\t}\n\texports.schemaRefOrVal = schemaRefOrVal;\n\tfunction unescapeFragment(str) {\n\t\treturn unescapeJsonPointer(decodeURIComponent(str));\n\t}\n\texports.unescapeFragment = unescapeFragment;\n\tfunction escapeFragment(str) {\n\t\treturn encodeURIComponent(escapeJsonPointer(str));\n\t}\n\texports.escapeFragment = escapeFragment;\n\tfunction escapeJsonPointer(str) {\n\t\tif (typeof str == \"number\") return `${str}`;\n\t\treturn str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n\t}\n\texports.escapeJsonPointer = escapeJsonPointer;\n\tfunction unescapeJsonPointer(str) {\n\t\treturn str.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n\t}\n\texports.unescapeJsonPointer = unescapeJsonPointer;\n\tfunction eachItem(xs, f) {\n\t\tif (Array.isArray(xs)) for (const x of xs) f(x);\n\t\telse f(xs);\n\t}\n\texports.eachItem = eachItem;\n\tfunction makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {\n\t\treturn (gen, from, to, toName) => {\n\t\t\tconst res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);\n\t\t\treturn toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;\n\t\t};\n\t}\n\texports.mergeEvaluated = {\n\t\tprops: makeMergeEvaluated({\n\t\t\tmergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {\n\t\t\t\tgen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));\n\t\t\t}),\n\t\t\tmergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {\n\t\t\t\tif (from === true) gen.assign(to, true);\n\t\t\t\telse {\n\t\t\t\t\tgen.assign(to, (0, codegen_1._)`${to} || {}`);\n\t\t\t\t\tsetEvaluated(gen, to, from);\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmergeValues: (from, to) => from === true ? true : {\n\t\t\t\t...from,\n\t\t\t\t...to\n\t\t\t},\n\t\t\tresultToName: evaluatedPropsToName\n\t\t}),\n\t\titems: makeMergeEvaluated({\n\t\t\tmergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),\n\t\t\tmergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),\n\t\t\tmergeValues: (from, to) => from === true ? true : Math.max(from, to),\n\t\t\tresultToName: (gen, items) => gen.var(\"items\", items)\n\t\t})\n\t};\n\tfunction evaluatedPropsToName(gen, ps) {\n\t\tif (ps === true) return gen.var(\"props\", true);\n\t\tconst props = gen.var(\"props\", (0, codegen_1._)`{}`);\n\t\tif (ps !== void 0) setEvaluated(gen, props, ps);\n\t\treturn props;\n\t}\n\texports.evaluatedPropsToName = evaluatedPropsToName;\n\tfunction setEvaluated(gen, props, ps) {\n\t\tObject.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));\n\t}\n\texports.setEvaluated = setEvaluated;\n\tconst snippets = {};\n\tfunction useFunc(gen, f) {\n\t\treturn gen.scopeValue(\"func\", {\n\t\t\tref: f,\n\t\t\tcode: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))\n\t\t});\n\t}\n\texports.useFunc = useFunc;\n\tvar Type;\n\t(function(Type) {\n\t\tType[Type[\"Num\"] = 0] = \"Num\";\n\t\tType[Type[\"Str\"] = 1] = \"Str\";\n\t})(Type || (exports.Type = Type = {}));\n\tfunction getErrorPath(dataProp, dataPropType, jsPropertySyntax) {\n\t\tif (dataProp instanceof codegen_1.Name) {\n\t\t\tconst isNumber = dataPropType === Type.Num;\n\t\t\treturn jsPropertySyntax ? isNumber ? (0, codegen_1._)`\"[\" + ${dataProp} + \"]\"` : (0, codegen_1._)`\"['\" + ${dataProp} + \"']\"` : isNumber ? (0, codegen_1._)`\"/\" + ${dataProp}` : (0, codegen_1._)`\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")`;\n\t\t}\n\t\treturn jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp);\n\t}\n\texports.getErrorPath = getErrorPath;\n\tfunction checkStrictMode(it, msg, mode = it.opts.strictSchema) {\n\t\tif (!mode) return;\n\t\tmsg = `strict mode: ${msg}`;\n\t\tif (mode === true) throw new Error(msg);\n\t\tit.self.logger.warn(msg);\n\t}\n\texports.checkStrictMode = checkStrictMode;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js\nvar require_names = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst names = {\n\t\tdata: new codegen_1.Name(\"data\"),\n\t\tvalCxt: new codegen_1.Name(\"valCxt\"),\n\t\tinstancePath: new codegen_1.Name(\"instancePath\"),\n\t\tparentData: new codegen_1.Name(\"parentData\"),\n\t\tparentDataProperty: new codegen_1.Name(\"parentDataProperty\"),\n\t\trootData: new codegen_1.Name(\"rootData\"),\n\t\tdynamicAnchors: new codegen_1.Name(\"dynamicAnchors\"),\n\t\tvErrors: new codegen_1.Name(\"vErrors\"),\n\t\terrors: new codegen_1.Name(\"errors\"),\n\t\tthis: new codegen_1.Name(\"this\"),\n\t\tself: new codegen_1.Name(\"self\"),\n\t\tscope: new codegen_1.Name(\"scope\"),\n\t\tjson: new codegen_1.Name(\"json\"),\n\t\tjsonPos: new codegen_1.Name(\"jsonPos\"),\n\t\tjsonLen: new codegen_1.Name(\"jsonLen\"),\n\t\tjsonPart: new codegen_1.Name(\"jsonPart\")\n\t};\n\texports.default = names;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js\nvar require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\texports.keywordError = { message: ({ keyword }) => (0, codegen_1.str)`must pass \"${keyword}\" keyword validation` };\n\texports.keyword$DataError = { message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`\"${keyword}\" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`\"${keyword}\" keyword is invalid ($data)` };\n\tfunction reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {\n\t\tconst { it } = cxt;\n\t\tconst { gen, compositeRule, allErrors } = it;\n\t\tconst errObj = errorObjectCode(cxt, error, errorPaths);\n\t\tif (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) addError(gen, errObj);\n\t\telse returnErrors(it, (0, codegen_1._)`[${errObj}]`);\n\t}\n\texports.reportError = reportError;\n\tfunction reportExtraError(cxt, error = exports.keywordError, errorPaths) {\n\t\tconst { it } = cxt;\n\t\tconst { gen, compositeRule, allErrors } = it;\n\t\taddError(gen, errorObjectCode(cxt, error, errorPaths));\n\t\tif (!(compositeRule || allErrors)) returnErrors(it, names_1.default.vErrors);\n\t}\n\texports.reportExtraError = reportExtraError;\n\tfunction resetErrorsCount(gen, errsCount) {\n\t\tgen.assign(names_1.default.errors, errsCount);\n\t\tgen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));\n\t}\n\texports.resetErrorsCount = resetErrorsCount;\n\tfunction extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {\n\t\t/* istanbul ignore if */\n\t\tif (errsCount === void 0) throw new Error(\"ajv implementation error\");\n\t\tconst err = gen.name(\"err\");\n\t\tgen.forRange(\"i\", errsCount, names_1.default.errors, (i) => {\n\t\t\tgen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);\n\t\t\tgen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));\n\t\t\tgen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`);\n\t\t\tif (it.opts.verbose) {\n\t\t\t\tgen.assign((0, codegen_1._)`${err}.schema`, schemaValue);\n\t\t\t\tgen.assign((0, codegen_1._)`${err}.data`, data);\n\t\t\t}\n\t\t});\n\t}\n\texports.extendErrors = extendErrors;\n\tfunction addError(gen, errObj) {\n\t\tconst err = gen.const(\"err\", errObj);\n\t\tgen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);\n\t\tgen.code((0, codegen_1._)`${names_1.default.errors}++`);\n\t}\n\tfunction returnErrors(it, errs) {\n\t\tconst { gen, validateName, schemaEnv } = it;\n\t\tif (schemaEnv.$async) gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, errs);\n\t\t\tgen.return(false);\n\t\t}\n\t}\n\tconst E = {\n\t\tkeyword: new codegen_1.Name(\"keyword\"),\n\t\tschemaPath: new codegen_1.Name(\"schemaPath\"),\n\t\tparams: new codegen_1.Name(\"params\"),\n\t\tpropertyName: new codegen_1.Name(\"propertyName\"),\n\t\tmessage: new codegen_1.Name(\"message\"),\n\t\tschema: new codegen_1.Name(\"schema\"),\n\t\tparentSchema: new codegen_1.Name(\"parentSchema\")\n\t};\n\tfunction errorObjectCode(cxt, error, errorPaths) {\n\t\tconst { createErrors } = cxt.it;\n\t\tif (createErrors === false) return (0, codegen_1._)`{}`;\n\t\treturn errorObject(cxt, error, errorPaths);\n\t}\n\tfunction errorObject(cxt, error, errorPaths = {}) {\n\t\tconst { gen, it } = cxt;\n\t\tconst keyValues = [errorInstancePath(it, errorPaths), errorSchemaPath(cxt, errorPaths)];\n\t\textraErrorProps(cxt, error, keyValues);\n\t\treturn gen.object(...keyValues);\n\t}\n\tfunction errorInstancePath({ errorPath }, { instancePath }) {\n\t\tconst instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;\n\t\treturn [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];\n\t}\n\tfunction errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {\n\t\tlet schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`;\n\t\tif (schemaPath) schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;\n\t\treturn [E.schemaPath, schPath];\n\t}\n\tfunction extraErrorProps(cxt, { params, message }, keyValues) {\n\t\tconst { keyword, data, schemaValue, it } = cxt;\n\t\tconst { opts, propertyName, topSchemaRef, schemaPath } = it;\n\t\tkeyValues.push([E.keyword, keyword], [E.params, typeof params == \"function\" ? params(cxt) : params || (0, codegen_1._)`{}`]);\n\t\tif (opts.messages) keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message]);\n\t\tif (opts.verbose) keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);\n\t\tif (propertyName) keyValues.push([E.propertyName, propertyName]);\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js\nvar require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;\n\tconst errors_1 = require_errors();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst boolError = { message: \"boolean schema is false\" };\n\tfunction topBoolOrEmptySchema(it) {\n\t\tconst { gen, schema, validateName } = it;\n\t\tif (schema === false) falseSchemaError(it, false);\n\t\telse if (typeof schema == \"object\" && schema.$async === true) gen.return(names_1.default.data);\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, null);\n\t\t\tgen.return(true);\n\t\t}\n\t}\n\texports.topBoolOrEmptySchema = topBoolOrEmptySchema;\n\tfunction boolOrEmptySchema(it, valid) {\n\t\tconst { gen, schema } = it;\n\t\tif (schema === false) {\n\t\t\tgen.var(valid, false);\n\t\t\tfalseSchemaError(it);\n\t\t} else gen.var(valid, true);\n\t}\n\texports.boolOrEmptySchema = boolOrEmptySchema;\n\tfunction falseSchemaError(it, overrideAllErrors) {\n\t\tconst { gen, data } = it;\n\t\tconst cxt = {\n\t\t\tgen,\n\t\t\tkeyword: \"false schema\",\n\t\t\tdata,\n\t\t\tschema: false,\n\t\t\tschemaCode: false,\n\t\t\tschemaValue: false,\n\t\t\tparams: {},\n\t\t\tit\n\t\t};\n\t\t(0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js\nvar require_rules = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getRules = exports.isJSONType = void 0;\n\tconst jsonTypes = new Set([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"integer\",\n\t\t\"boolean\",\n\t\t\"null\",\n\t\t\"object\",\n\t\t\"array\"\n\t]);\n\tfunction isJSONType(x) {\n\t\treturn typeof x == \"string\" && jsonTypes.has(x);\n\t}\n\texports.isJSONType = isJSONType;\n\tfunction getRules() {\n\t\tconst groups = {\n\t\t\tnumber: {\n\t\t\t\ttype: \"number\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tstring: {\n\t\t\t\ttype: \"string\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tarray: {\n\t\t\t\ttype: \"array\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tobject: {\n\t\t\t\ttype: \"object\",\n\t\t\t\trules: []\n\t\t\t}\n\t\t};\n\t\treturn {\n\t\t\ttypes: {\n\t\t\t\t...groups,\n\t\t\t\tinteger: true,\n\t\t\t\tboolean: true,\n\t\t\t\tnull: true\n\t\t\t},\n\t\t\trules: [\n\t\t\t\t{ rules: [] },\n\t\t\t\tgroups.number,\n\t\t\t\tgroups.string,\n\t\t\t\tgroups.array,\n\t\t\t\tgroups.object\n\t\t\t],\n\t\t\tpost: { rules: [] },\n\t\t\tall: {},\n\t\t\tkeywords: {}\n\t\t};\n\t}\n\texports.getRules = getRules;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js\nvar require_applicability = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;\n\tfunction schemaHasRulesForType({ schema, self }, type) {\n\t\tconst group = self.RULES.types[type];\n\t\treturn group && group !== true && shouldUseGroup(schema, group);\n\t}\n\texports.schemaHasRulesForType = schemaHasRulesForType;\n\tfunction shouldUseGroup(schema, group) {\n\t\treturn group.rules.some((rule) => shouldUseRule(schema, rule));\n\t}\n\texports.shouldUseGroup = shouldUseGroup;\n\tfunction shouldUseRule(schema, rule) {\n\t\tvar _a;\n\t\treturn schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));\n\t}\n\texports.shouldUseRule = shouldUseRule;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js\nvar require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;\n\tconst rules_1 = require_rules();\n\tconst applicability_1 = require_applicability();\n\tconst errors_1 = require_errors();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tvar DataType;\n\t(function(DataType) {\n\t\tDataType[DataType[\"Correct\"] = 0] = \"Correct\";\n\t\tDataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n\t})(DataType || (exports.DataType = DataType = {}));\n\tfunction getSchemaTypes(schema) {\n\t\tconst types = getJSONTypes(schema.type);\n\t\tif (types.includes(\"null\")) {\n\t\t\tif (schema.nullable === false) throw new Error(\"type: null contradicts nullable: false\");\n\t\t} else {\n\t\t\tif (!types.length && schema.nullable !== void 0) throw new Error(\"\\\"nullable\\\" cannot be used without \\\"type\\\"\");\n\t\t\tif (schema.nullable === true) types.push(\"null\");\n\t\t}\n\t\treturn types;\n\t}\n\texports.getSchemaTypes = getSchemaTypes;\n\tfunction getJSONTypes(ts) {\n\t\tconst types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n\t\tif (types.every(rules_1.isJSONType)) return types;\n\t\tthrow new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n\t}\n\texports.getJSONTypes = getJSONTypes;\n\tfunction coerceAndCheckDataType(it, types) {\n\t\tconst { gen, data, opts } = it;\n\t\tconst coerceTo = coerceToTypes(types, opts.coerceTypes);\n\t\tconst checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n\t\tif (checkTypes) {\n\t\t\tconst wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n\t\t\tgen.if(wrongType, () => {\n\t\t\t\tif (coerceTo.length) coerceData(it, types, coerceTo);\n\t\t\t\telse reportTypeError(it);\n\t\t\t});\n\t\t}\n\t\treturn checkTypes;\n\t}\n\texports.coerceAndCheckDataType = coerceAndCheckDataType;\n\tconst COERCIBLE = new Set([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"integer\",\n\t\t\"boolean\",\n\t\t\"null\"\n\t]);\n\tfunction coerceToTypes(types, coerceTypes) {\n\t\treturn coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === \"array\" && t === \"array\") : [];\n\t}\n\tfunction coerceData(it, types, coerceTo) {\n\t\tconst { gen, data, opts } = it;\n\t\tconst dataType = gen.let(\"dataType\", (0, codegen_1._)`typeof ${data}`);\n\t\tconst coerced = gen.let(\"coerced\", (0, codegen_1._)`undefined`);\n\t\tif (opts.coerceTypes === \"array\") gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n\t\tgen.if((0, codegen_1._)`${coerced} !== undefined`);\n\t\tfor (const t of coerceTo) if (COERCIBLE.has(t) || t === \"array\" && opts.coerceTypes === \"array\") coerceSpecificType(t);\n\t\tgen.else();\n\t\treportTypeError(it);\n\t\tgen.endIf();\n\t\tgen.if((0, codegen_1._)`${coerced} !== undefined`, () => {\n\t\t\tgen.assign(data, coerced);\n\t\t\tassignParentData(it, coerced);\n\t\t});\n\t\tfunction coerceSpecificType(t) {\n\t\t\tswitch (t) {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} == \"number\" || ${dataType} == \"boolean\"`).assign(coerced, (0, codegen_1._)`\"\" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`\"\"`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"number\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} == \"boolean\" || ${data} === null\n              || (${dataType} == \"string\" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"integer\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} === \"boolean\" || ${data} === null\n              || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"boolean\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${data} === \"false\" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === \"true\" || ${data} === 1`).assign(coerced, true);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"null\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${data} === \"\" || ${data} === 0 || ${data} === false`);\n\t\t\t\t\tgen.assign(coerced, null);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"array\": gen.elseIf((0, codegen_1._)`${dataType} === \"string\" || ${dataType} === \"number\"\n              || ${dataType} === \"boolean\" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`);\n\t\t\t}\n\t\t}\n\t}\n\tfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n\t\tgen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));\n\t}\n\tfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n\t\tconst EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n\t\tlet cond;\n\t\tswitch (dataType) {\n\t\t\tcase \"null\": return (0, codegen_1._)`${data} ${EQ} null`;\n\t\t\tcase \"array\":\n\t\t\t\tcond = (0, codegen_1._)`Array.isArray(${data})`;\n\t\t\t\tbreak;\n\t\t\tcase \"object\":\n\t\t\t\tcond = (0, codegen_1._)`${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n\t\t\t\tbreak;\n\t\t\tcase \"integer\":\n\t\t\t\tcond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`);\n\t\t\t\tbreak;\n\t\t\tcase \"number\":\n\t\t\t\tcond = numCond();\n\t\t\t\tbreak;\n\t\t\tdefault: return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`;\n\t\t}\n\t\treturn correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n\t\tfunction numCond(_cond = codegen_1.nil) {\n\t\t\treturn (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);\n\t\t}\n\t}\n\texports.checkDataType = checkDataType;\n\tfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n\t\tif (dataTypes.length === 1) return checkDataType(dataTypes[0], data, strictNums, correct);\n\t\tlet cond;\n\t\tconst types = (0, util_1.toHash)(dataTypes);\n\t\tif (types.array && types.object) {\n\t\t\tconst notObj = (0, codegen_1._)`typeof ${data} != \"object\"`;\n\t\t\tcond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;\n\t\t\tdelete types.null;\n\t\t\tdelete types.array;\n\t\t\tdelete types.object;\n\t\t} else cond = codegen_1.nil;\n\t\tif (types.number) delete types.integer;\n\t\tfor (const t in types) cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n\t\treturn cond;\n\t}\n\texports.checkDataTypes = checkDataTypes;\n\tconst typeError = {\n\t\tmessage: ({ schema }) => `must be ${schema}`,\n\t\tparams: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`\n\t};\n\tfunction reportTypeError(it) {\n\t\tconst cxt = getTypeErrorContext(it);\n\t\t(0, errors_1.reportError)(cxt, typeError);\n\t}\n\texports.reportTypeError = reportTypeError;\n\tfunction getTypeErrorContext(it) {\n\t\tconst { gen, data, schema } = it;\n\t\tconst schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n\t\treturn {\n\t\t\tgen,\n\t\t\tkeyword: \"type\",\n\t\t\tdata,\n\t\t\tschema: schema.type,\n\t\t\tschemaCode,\n\t\t\tschemaValue: schemaCode,\n\t\t\tparentSchema: schema,\n\t\t\tparams: {},\n\t\t\tit\n\t\t};\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js\nvar require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.assignDefaults = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tfunction assignDefaults(it, ty) {\n\t\tconst { properties, items } = it.schema;\n\t\tif (ty === \"object\" && properties) for (const key in properties) assignDefault(it, key, properties[key].default);\n\t\telse if (ty === \"array\" && Array.isArray(items)) items.forEach((sch, i) => assignDefault(it, i, sch.default));\n\t}\n\texports.assignDefaults = assignDefaults;\n\tfunction assignDefault(it, prop, defaultValue) {\n\t\tconst { gen, compositeRule, data, opts } = it;\n\t\tif (defaultValue === void 0) return;\n\t\tconst childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`;\n\t\tif (compositeRule) {\n\t\t\t(0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n\t\t\treturn;\n\t\t}\n\t\tlet condition = (0, codegen_1._)`${childData} === undefined`;\n\t\tif (opts.useDefaults === \"empty\") condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === \"\"`;\n\t\tgen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js\nvar require_code = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\tconst util_2 = require_util();\n\tfunction checkReportMissingProp(cxt, prop) {\n\t\tconst { gen, data, it } = cxt;\n\t\tgen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n\t\t\tcxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true);\n\t\t\tcxt.error();\n\t\t});\n\t}\n\texports.checkReportMissingProp = checkReportMissingProp;\n\tfunction checkMissingProp({ gen, data, it: { opts } }, properties, missing) {\n\t\treturn (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));\n\t}\n\texports.checkMissingProp = checkMissingProp;\n\tfunction reportMissingProp(cxt, missing) {\n\t\tcxt.setParams({ missingProperty: missing }, true);\n\t\tcxt.error();\n\t}\n\texports.reportMissingProp = reportMissingProp;\n\tfunction hasPropFunc(gen) {\n\t\treturn gen.scopeValue(\"func\", {\n\t\t\tref: Object.prototype.hasOwnProperty,\n\t\t\tcode: (0, codegen_1._)`Object.prototype.hasOwnProperty`\n\t\t});\n\t}\n\texports.hasPropFunc = hasPropFunc;\n\tfunction isOwnProperty(gen, data, property) {\n\t\treturn (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`;\n\t}\n\texports.isOwnProperty = isOwnProperty;\n\tfunction propertyInData(gen, data, property, ownProperties) {\n\t\tconst cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;\n\t\treturn ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond;\n\t}\n\texports.propertyInData = propertyInData;\n\tfunction noPropertyInData(gen, data, property, ownProperties) {\n\t\tconst cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;\n\t\treturn ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;\n\t}\n\texports.noPropertyInData = noPropertyInData;\n\tfunction allSchemaProperties(schemaMap) {\n\t\treturn schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : [];\n\t}\n\texports.allSchemaProperties = allSchemaProperties;\n\tfunction schemaProperties(it, schemaMap) {\n\t\treturn allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));\n\t}\n\texports.schemaProperties = schemaProperties;\n\tfunction callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {\n\t\tconst dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;\n\t\tconst valCxt = [\n\t\t\t[names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],\n\t\t\t[names_1.default.parentData, it.parentData],\n\t\t\t[names_1.default.parentDataProperty, it.parentDataProperty],\n\t\t\t[names_1.default.rootData, names_1.default.rootData]\n\t\t];\n\t\tif (it.opts.dynamicRef) valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);\n\t\tconst args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;\n\t\treturn context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`;\n\t}\n\texports.callValidateCode = callValidateCode;\n\tconst newRegExp = (0, codegen_1._)`new RegExp`;\n\tfunction usePattern({ gen, it: { opts } }, pattern) {\n\t\tconst u = opts.unicodeRegExp ? \"u\" : \"\";\n\t\tconst { regExp } = opts.code;\n\t\tconst rx = regExp(pattern, u);\n\t\treturn gen.scopeValue(\"pattern\", {\n\t\t\tkey: rx.toString(),\n\t\t\tref: rx,\n\t\t\tcode: (0, codegen_1._)`${regExp.code === \"new RegExp\" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`\n\t\t});\n\t}\n\texports.usePattern = usePattern;\n\tfunction validateArray(cxt) {\n\t\tconst { gen, data, keyword, it } = cxt;\n\t\tconst valid = gen.name(\"valid\");\n\t\tif (it.allErrors) {\n\t\t\tconst validArr = gen.let(\"valid\", true);\n\t\t\tvalidateItems(() => gen.assign(validArr, false));\n\t\t\treturn validArr;\n\t\t}\n\t\tgen.var(valid, true);\n\t\tvalidateItems(() => gen.break());\n\t\treturn valid;\n\t\tfunction validateItems(notValid) {\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tgen.forRange(\"i\", 0, len, (i) => {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tdataProp: i,\n\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t}, valid);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), notValid);\n\t\t\t});\n\t\t}\n\t}\n\texports.validateArray = validateArray;\n\tfunction validateUnion(cxt) {\n\t\tconst { gen, schema, keyword, it } = cxt;\n\t\t/* istanbul ignore if */\n\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\tif (schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)) && !it.opts.unevaluated) return;\n\t\tconst valid = gen.let(\"valid\", false);\n\t\tconst schValid = gen.name(\"_valid\");\n\t\tgen.block(() => schema.forEach((_sch, i) => {\n\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\tkeyword,\n\t\t\t\tschemaProp: i,\n\t\t\t\tcompositeRule: true\n\t\t\t}, schValid);\n\t\t\tgen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);\n\t\t\tif (!cxt.mergeValidEvaluated(schCxt, schValid)) gen.if((0, codegen_1.not)(valid));\n\t\t}));\n\t\tcxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n\t}\n\texports.validateUnion = validateUnion;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js\nvar require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst code_1 = require_code();\n\tconst errors_1 = require_errors();\n\tfunction macroKeywordCode(cxt, def) {\n\t\tconst { gen, keyword, schema, parentSchema, it } = cxt;\n\t\tconst macroSchema = def.macro.call(it.self, schema, parentSchema, it);\n\t\tconst schemaRef = useKeyword(gen, keyword, macroSchema);\n\t\tif (it.opts.validateSchema !== false) it.self.validateSchema(macroSchema, true);\n\t\tconst valid = gen.name(\"valid\");\n\t\tcxt.subschema({\n\t\t\tschema: macroSchema,\n\t\t\tschemaPath: codegen_1.nil,\n\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}`,\n\t\t\ttopSchemaRef: schemaRef,\n\t\t\tcompositeRule: true\n\t\t}, valid);\n\t\tcxt.pass(valid, () => cxt.error(true));\n\t}\n\texports.macroKeywordCode = macroKeywordCode;\n\tfunction funcKeywordCode(cxt, def) {\n\t\tvar _a;\n\t\tconst { gen, keyword, schema, parentSchema, $data, it } = cxt;\n\t\tcheckAsyncKeyword(it, def);\n\t\tconst validateRef = useKeyword(gen, keyword, !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate);\n\t\tconst valid = gen.let(\"valid\");\n\t\tcxt.block$data(valid, validateKeyword);\n\t\tcxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);\n\t\tfunction validateKeyword() {\n\t\t\tif (def.errors === false) {\n\t\t\t\tassignValid();\n\t\t\t\tif (def.modifying) modifyData(cxt);\n\t\t\t\treportErrs(() => cxt.error());\n\t\t\t} else {\n\t\t\t\tconst ruleErrs = def.async ? validateAsync() : validateSync();\n\t\t\t\tif (def.modifying) modifyData(cxt);\n\t\t\t\treportErrs(() => addErrs(cxt, ruleErrs));\n\t\t\t}\n\t\t}\n\t\tfunction validateAsync() {\n\t\t\tconst ruleErrs = gen.let(\"ruleErrs\", null);\n\t\t\tgen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));\n\t\t\treturn ruleErrs;\n\t\t}\n\t\tfunction validateSync() {\n\t\t\tconst validateErrs = (0, codegen_1._)`${validateRef}.errors`;\n\t\t\tgen.assign(validateErrs, null);\n\t\t\tassignValid(codegen_1.nil);\n\t\t\treturn validateErrs;\n\t\t}\n\t\tfunction assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {\n\t\t\tconst passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;\n\t\t\tconst passSchema = !(\"compile\" in def && !$data || def.schema === false);\n\t\t\tgen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);\n\t\t}\n\t\tfunction reportErrs(errors) {\n\t\t\tvar _a$1;\n\t\t\tgen.if((0, codegen_1.not)((_a$1 = def.valid) !== null && _a$1 !== void 0 ? _a$1 : valid), errors);\n\t\t}\n\t}\n\texports.funcKeywordCode = funcKeywordCode;\n\tfunction modifyData(cxt) {\n\t\tconst { gen, data, it } = cxt;\n\t\tgen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));\n\t}\n\tfunction addErrs(cxt, errs) {\n\t\tconst { gen } = cxt;\n\t\tgen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {\n\t\t\tgen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);\n\t\t\t(0, errors_1.extendErrors)(cxt);\n\t\t}, () => cxt.error());\n\t}\n\tfunction checkAsyncKeyword({ schemaEnv }, def) {\n\t\tif (def.async && !schemaEnv.$async) throw new Error(\"async keyword in sync schema\");\n\t}\n\tfunction useKeyword(gen, keyword, result) {\n\t\tif (result === void 0) throw new Error(`keyword \"${keyword}\" failed to compile`);\n\t\treturn gen.scopeValue(\"keyword\", typeof result == \"function\" ? { ref: result } : {\n\t\t\tref: result,\n\t\t\tcode: (0, codegen_1.stringify)(result)\n\t\t});\n\t}\n\tfunction validSchemaType(schema, schemaType, allowUndefined = false) {\n\t\treturn !schemaType.length || schemaType.some((st) => st === \"array\" ? Array.isArray(schema) : st === \"object\" ? schema && typeof schema == \"object\" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == \"undefined\");\n\t}\n\texports.validSchemaType = validSchemaType;\n\tfunction validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {\n\t\t/* istanbul ignore if */\n\t\tif (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) throw new Error(\"ajv implementation error\");\n\t\tconst deps = def.dependencies;\n\t\tif (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`);\n\t\tif (def.validateSchema) {\n\t\t\tif (!def.validateSchema(schema[keyword])) {\n\t\t\t\tconst msg = `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` + self.errorsText(def.validateSchema.errors);\n\t\t\t\tif (opts.validateSchema === \"log\") self.logger.error(msg);\n\t\t\t\telse throw new Error(msg);\n\t\t\t}\n\t\t}\n\t}\n\texports.validateKeywordUsage = validateKeywordUsage;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js\nvar require_subschema = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tfunction getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {\n\t\tif (keyword !== void 0 && schema !== void 0) throw new Error(\"both \\\"keyword\\\" and \\\"schema\\\" passed, only one allowed\");\n\t\tif (keyword !== void 0) {\n\t\t\tconst sch = it.schema[keyword];\n\t\t\treturn schemaProp === void 0 ? {\n\t\t\t\tschema: sch,\n\t\t\t\tschemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,\n\t\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}`\n\t\t\t} : {\n\t\t\t\tschema: sch[schemaProp],\n\t\t\t\tschemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,\n\t\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`\n\t\t\t};\n\t\t}\n\t\tif (schema !== void 0) {\n\t\t\tif (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) throw new Error(\"\\\"schemaPath\\\", \\\"errSchemaPath\\\" and \\\"topSchemaRef\\\" are required with \\\"schema\\\"\");\n\t\t\treturn {\n\t\t\t\tschema,\n\t\t\t\tschemaPath,\n\t\t\t\ttopSchemaRef,\n\t\t\t\terrSchemaPath\n\t\t\t};\n\t\t}\n\t\tthrow new Error(\"either \\\"keyword\\\" or \\\"schema\\\" must be passed\");\n\t}\n\texports.getSubschema = getSubschema;\n\tfunction extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {\n\t\tif (data !== void 0 && dataProp !== void 0) throw new Error(\"both \\\"data\\\" and \\\"dataProp\\\" passed, only one allowed\");\n\t\tconst { gen } = it;\n\t\tif (dataProp !== void 0) {\n\t\t\tconst { errorPath, dataPathArr, opts } = it;\n\t\t\tdataContextProps(gen.let(\"data\", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true));\n\t\t\tsubschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;\n\t\t\tsubschema.parentDataProperty = (0, codegen_1._)`${dataProp}`;\n\t\t\tsubschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];\n\t\t}\n\t\tif (data !== void 0) {\n\t\t\tdataContextProps(data instanceof codegen_1.Name ? data : gen.let(\"data\", data, true));\n\t\t\tif (propertyName !== void 0) subschema.propertyName = propertyName;\n\t\t}\n\t\tif (dataTypes) subschema.dataTypes = dataTypes;\n\t\tfunction dataContextProps(_nextData) {\n\t\t\tsubschema.data = _nextData;\n\t\t\tsubschema.dataLevel = it.dataLevel + 1;\n\t\t\tsubschema.dataTypes = [];\n\t\t\tit.definedProperties = /* @__PURE__ */ new Set();\n\t\t\tsubschema.parentData = it.data;\n\t\t\tsubschema.dataNames = [...it.dataNames, _nextData];\n\t\t}\n\t}\n\texports.extendSubschemaData = extendSubschemaData;\n\tfunction extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {\n\t\tif (compositeRule !== void 0) subschema.compositeRule = compositeRule;\n\t\tif (createErrors !== void 0) subschema.createErrors = createErrors;\n\t\tif (allErrors !== void 0) subschema.allErrors = allErrors;\n\t\tsubschema.jtdDiscriminator = jtdDiscriminator;\n\t\tsubschema.jtdMetadata = jtdMetadata;\n\t}\n\texports.extendSubschemaMode = extendSubschemaMode;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js\nvar require_fast_deep_equal = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = function equal(a, b) {\n\t\tif (a === b) return true;\n\t\tif (a && b && typeof a == \"object\" && typeof b == \"object\") {\n\t\t\tif (a.constructor !== b.constructor) return false;\n\t\t\tvar length, i, keys;\n\t\t\tif (Array.isArray(a)) {\n\t\t\t\tlength = a.length;\n\t\t\t\tif (length != b.length) return false;\n\t\t\t\tfor (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n\t\t\tif (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n\t\t\tif (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\t\t\tkeys = Object.keys(a);\n\t\t\tlength = keys.length;\n\t\t\tif (length !== Object.keys(b).length) return false;\n\t\t\tfor (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\t\t\tfor (i = length; i-- !== 0;) {\n\t\t\t\tvar key = keys[i];\n\t\t\t\tif (!equal(a[key], b[key])) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn a !== a && b !== b;\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js\nvar require_json_schema_traverse = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar traverse = module.exports = function(schema, opts, cb) {\n\t\tif (typeof opts == \"function\") {\n\t\t\tcb = opts;\n\t\t\topts = {};\n\t\t}\n\t\tcb = opts.cb || cb;\n\t\tvar pre = typeof cb == \"function\" ? cb : cb.pre || function() {};\n\t\tvar post = cb.post || function() {};\n\t\t_traverse(opts, pre, post, schema, \"\", schema);\n\t};\n\ttraverse.keywords = {\n\t\tadditionalItems: true,\n\t\titems: true,\n\t\tcontains: true,\n\t\tadditionalProperties: true,\n\t\tpropertyNames: true,\n\t\tnot: true,\n\t\tif: true,\n\t\tthen: true,\n\t\telse: true\n\t};\n\ttraverse.arrayKeywords = {\n\t\titems: true,\n\t\tallOf: true,\n\t\tanyOf: true,\n\t\toneOf: true\n\t};\n\ttraverse.propsKeywords = {\n\t\t$defs: true,\n\t\tdefinitions: true,\n\t\tproperties: true,\n\t\tpatternProperties: true,\n\t\tdependencies: true\n\t};\n\ttraverse.skipKeywords = {\n\t\tdefault: true,\n\t\tenum: true,\n\t\tconst: true,\n\t\trequired: true,\n\t\tmaximum: true,\n\t\tminimum: true,\n\t\texclusiveMaximum: true,\n\t\texclusiveMinimum: true,\n\t\tmultipleOf: true,\n\t\tmaxLength: true,\n\t\tminLength: true,\n\t\tpattern: true,\n\t\tformat: true,\n\t\tmaxItems: true,\n\t\tminItems: true,\n\t\tuniqueItems: true,\n\t\tmaxProperties: true,\n\t\tminProperties: true\n\t};\n\tfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n\t\tif (schema && typeof schema == \"object\" && !Array.isArray(schema)) {\n\t\t\tpre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n\t\t\tfor (var key in schema) {\n\t\t\t\tvar sch = schema[key];\n\t\t\t\tif (Array.isArray(sch)) {\n\t\t\t\t\tif (key in traverse.arrayKeywords) for (var i = 0; i < sch.length; i++) _traverse(opts, pre, post, sch[i], jsonPtr + \"/\" + key + \"/\" + i, rootSchema, jsonPtr, key, schema, i);\n\t\t\t\t} else if (key in traverse.propsKeywords) {\n\t\t\t\t\tif (sch && typeof sch == \"object\") for (var prop in sch) _traverse(opts, pre, post, sch[prop], jsonPtr + \"/\" + key + \"/\" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);\n\t\t\t\t} else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) _traverse(opts, pre, post, sch, jsonPtr + \"/\" + key, rootSchema, jsonPtr, key, schema);\n\t\t\t}\n\t\t\tpost(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n\t\t}\n\t}\n\tfunction escapeJsonPtr(str) {\n\t\treturn str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js\nvar require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;\n\tconst util_1 = require_util();\n\tconst equal = require_fast_deep_equal();\n\tconst traverse = require_json_schema_traverse();\n\tconst SIMPLE_INLINED = new Set([\n\t\t\"type\",\n\t\t\"format\",\n\t\t\"pattern\",\n\t\t\"maxLength\",\n\t\t\"minLength\",\n\t\t\"maxProperties\",\n\t\t\"minProperties\",\n\t\t\"maxItems\",\n\t\t\"minItems\",\n\t\t\"maximum\",\n\t\t\"minimum\",\n\t\t\"uniqueItems\",\n\t\t\"multipleOf\",\n\t\t\"required\",\n\t\t\"enum\",\n\t\t\"const\"\n\t]);\n\tfunction inlineRef(schema, limit = true) {\n\t\tif (typeof schema == \"boolean\") return true;\n\t\tif (limit === true) return !hasRef(schema);\n\t\tif (!limit) return false;\n\t\treturn countKeys(schema) <= limit;\n\t}\n\texports.inlineRef = inlineRef;\n\tconst REF_KEYWORDS = new Set([\n\t\t\"$ref\",\n\t\t\"$recursiveRef\",\n\t\t\"$recursiveAnchor\",\n\t\t\"$dynamicRef\",\n\t\t\"$dynamicAnchor\"\n\t]);\n\tfunction hasRef(schema) {\n\t\tfor (const key in schema) {\n\t\t\tif (REF_KEYWORDS.has(key)) return true;\n\t\t\tconst sch = schema[key];\n\t\t\tif (Array.isArray(sch) && sch.some(hasRef)) return true;\n\t\t\tif (typeof sch == \"object\" && hasRef(sch)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\tfunction countKeys(schema) {\n\t\tlet count = 0;\n\t\tfor (const key in schema) {\n\t\t\tif (key === \"$ref\") return Infinity;\n\t\t\tcount++;\n\t\t\tif (SIMPLE_INLINED.has(key)) continue;\n\t\t\tif (typeof schema[key] == \"object\") (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));\n\t\t\tif (count === Infinity) return Infinity;\n\t\t}\n\t\treturn count;\n\t}\n\tfunction getFullPath(resolver, id = \"\", normalize) {\n\t\tif (normalize !== false) id = normalizeId(id);\n\t\treturn _getFullPath(resolver, resolver.parse(id));\n\t}\n\texports.getFullPath = getFullPath;\n\tfunction _getFullPath(resolver, p) {\n\t\treturn resolver.serialize(p).split(\"#\")[0] + \"#\";\n\t}\n\texports._getFullPath = _getFullPath;\n\tconst TRAILING_SLASH_HASH = /#\\/?$/;\n\tfunction normalizeId(id) {\n\t\treturn id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\";\n\t}\n\texports.normalizeId = normalizeId;\n\tfunction resolveUrl(resolver, baseId, id) {\n\t\tid = normalizeId(id);\n\t\treturn resolver.resolve(baseId, id);\n\t}\n\texports.resolveUrl = resolveUrl;\n\tconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i;\n\tfunction getSchemaRefs(schema, baseId) {\n\t\tif (typeof schema == \"boolean\") return {};\n\t\tconst { schemaId, uriResolver } = this.opts;\n\t\tconst schId = normalizeId(schema[schemaId] || baseId);\n\t\tconst baseIds = { \"\": schId };\n\t\tconst pathPrefix = getFullPath(uriResolver, schId, false);\n\t\tconst localRefs = {};\n\t\tconst schemaRefs = /* @__PURE__ */ new Set();\n\t\ttraverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {\n\t\t\tif (parentJsonPtr === void 0) return;\n\t\t\tconst fullPath = pathPrefix + jsonPtr;\n\t\t\tlet innerBaseId = baseIds[parentJsonPtr];\n\t\t\tif (typeof sch[schemaId] == \"string\") innerBaseId = addRef.call(this, sch[schemaId]);\n\t\t\taddAnchor.call(this, sch.$anchor);\n\t\t\taddAnchor.call(this, sch.$dynamicAnchor);\n\t\t\tbaseIds[jsonPtr] = innerBaseId;\n\t\t\tfunction addRef(ref) {\n\t\t\t\tconst _resolve = this.opts.uriResolver.resolve;\n\t\t\t\tref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);\n\t\t\t\tif (schemaRefs.has(ref)) throw ambiguos(ref);\n\t\t\t\tschemaRefs.add(ref);\n\t\t\t\tlet schOrRef = this.refs[ref];\n\t\t\t\tif (typeof schOrRef == \"string\") schOrRef = this.refs[schOrRef];\n\t\t\t\tif (typeof schOrRef == \"object\") checkAmbiguosRef(sch, schOrRef.schema, ref);\n\t\t\t\telse if (ref !== normalizeId(fullPath)) if (ref[0] === \"#\") {\n\t\t\t\t\tcheckAmbiguosRef(sch, localRefs[ref], ref);\n\t\t\t\t\tlocalRefs[ref] = sch;\n\t\t\t\t} else this.refs[ref] = fullPath;\n\t\t\t\treturn ref;\n\t\t\t}\n\t\t\tfunction addAnchor(anchor) {\n\t\t\t\tif (typeof anchor == \"string\") {\n\t\t\t\t\tif (!ANCHOR.test(anchor)) throw new Error(`invalid anchor \"${anchor}\"`);\n\t\t\t\t\taddRef.call(this, `#${anchor}`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn localRefs;\n\t\tfunction checkAmbiguosRef(sch1, sch2, ref) {\n\t\t\tif (sch2 !== void 0 && !equal(sch1, sch2)) throw ambiguos(ref);\n\t\t}\n\t\tfunction ambiguos(ref) {\n\t\t\treturn /* @__PURE__ */ new Error(`reference \"${ref}\" resolves to more than one schema`);\n\t\t}\n\t}\n\texports.getSchemaRefs = getSchemaRefs;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js\nvar require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;\n\tconst boolSchema_1 = require_boolSchema();\n\tconst dataType_1 = require_dataType();\n\tconst applicability_1 = require_applicability();\n\tconst dataType_2 = require_dataType();\n\tconst defaults_1 = require_defaults();\n\tconst keyword_1 = require_keyword();\n\tconst subschema_1 = require_subschema();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst resolve_1 = require_resolve();\n\tconst util_1 = require_util();\n\tconst errors_1 = require_errors();\n\tfunction validateFunctionCode(it) {\n\t\tif (isSchemaObj(it)) {\n\t\t\tcheckKeywords(it);\n\t\t\tif (schemaCxtHasRules(it)) {\n\t\t\t\ttopSchemaObjCode(it);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tvalidateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n\t}\n\texports.validateFunctionCode = validateFunctionCode;\n\tfunction validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {\n\t\tif (opts.code.es5) gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {\n\t\t\tgen.code((0, codegen_1._)`\"use strict\"; ${funcSourceUrl(schema, opts)}`);\n\t\t\tdestructureValCxtES5(gen, opts);\n\t\t\tgen.code(body);\n\t\t});\n\t\telse gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));\n\t}\n\tfunction destructureValCxt(opts) {\n\t\treturn (0, codegen_1._)`{${names_1.default.instancePath}=\"\", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;\n\t}\n\tfunction destructureValCxtES5(gen, opts) {\n\t\tgen.if(names_1.default.valCxt, () => {\n\t\t\tgen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);\n\t\t\tgen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);\n\t\t\tgen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);\n\t\t\tgen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);\n\t\t\tif (opts.dynamicRef) gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);\n\t\t}, () => {\n\t\t\tgen.var(names_1.default.instancePath, (0, codegen_1._)`\"\"`);\n\t\t\tgen.var(names_1.default.parentData, (0, codegen_1._)`undefined`);\n\t\t\tgen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);\n\t\t\tgen.var(names_1.default.rootData, names_1.default.data);\n\t\t\tif (opts.dynamicRef) gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);\n\t\t});\n\t}\n\tfunction topSchemaObjCode(it) {\n\t\tconst { schema, opts, gen } = it;\n\t\tvalidateFunction(it, () => {\n\t\t\tif (opts.$comment && schema.$comment) commentKeyword(it);\n\t\t\tcheckNoDefault(it);\n\t\t\tgen.let(names_1.default.vErrors, null);\n\t\t\tgen.let(names_1.default.errors, 0);\n\t\t\tif (opts.unevaluated) resetEvaluated(it);\n\t\t\ttypeAndKeywords(it);\n\t\t\treturnResults(it);\n\t\t});\n\t}\n\tfunction resetEvaluated(it) {\n\t\tconst { gen, validateName } = it;\n\t\tit.evaluated = gen.const(\"evaluated\", (0, codegen_1._)`${validateName}.evaluated`);\n\t\tgen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));\n\t\tgen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));\n\t}\n\tfunction funcSourceUrl(schema, opts) {\n\t\tconst schId = typeof schema == \"object\" && schema[opts.schemaId];\n\t\treturn schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;\n\t}\n\tfunction subschemaCode(it, valid) {\n\t\tif (isSchemaObj(it)) {\n\t\t\tcheckKeywords(it);\n\t\t\tif (schemaCxtHasRules(it)) {\n\t\t\t\tsubSchemaObjCode(it, valid);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t(0, boolSchema_1.boolOrEmptySchema)(it, valid);\n\t}\n\tfunction schemaCxtHasRules({ schema, self }) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (self.RULES.all[key]) return true;\n\t\treturn false;\n\t}\n\tfunction isSchemaObj(it) {\n\t\treturn typeof it.schema != \"boolean\";\n\t}\n\tfunction subSchemaObjCode(it, valid) {\n\t\tconst { schema, gen, opts } = it;\n\t\tif (opts.$comment && schema.$comment) commentKeyword(it);\n\t\tupdateContext(it);\n\t\tcheckAsyncSchema(it);\n\t\tconst errsCount = gen.const(\"_errs\", names_1.default.errors);\n\t\ttypeAndKeywords(it, errsCount);\n\t\tgen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t}\n\tfunction checkKeywords(it) {\n\t\t(0, util_1.checkUnknownRules)(it);\n\t\tcheckRefsAndKeywords(it);\n\t}\n\tfunction typeAndKeywords(it, errsCount) {\n\t\tif (it.opts.jtd) return schemaKeywords(it, [], false, errsCount);\n\t\tconst types = (0, dataType_1.getSchemaTypes)(it.schema);\n\t\tschemaKeywords(it, types, !(0, dataType_1.coerceAndCheckDataType)(it, types), errsCount);\n\t}\n\tfunction checkRefsAndKeywords(it) {\n\t\tconst { schema, errSchemaPath, opts, self } = it;\n\t\tif (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`);\n\t}\n\tfunction checkNoDefault(it) {\n\t\tconst { schema, opts } = it;\n\t\tif (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) (0, util_1.checkStrictMode)(it, \"default is ignored in the schema root\");\n\t}\n\tfunction updateContext(it) {\n\t\tconst schId = it.schema[it.opts.schemaId];\n\t\tif (schId) it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);\n\t}\n\tfunction checkAsyncSchema(it) {\n\t\tif (it.schema.$async && !it.schemaEnv.$async) throw new Error(\"async schema in sync schema\");\n\t}\n\tfunction commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {\n\t\tconst msg = schema.$comment;\n\t\tif (opts.$comment === true) gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);\n\t\telse if (typeof opts.$comment == \"function\") {\n\t\t\tconst schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;\n\t\t\tconst rootName = gen.scopeValue(\"root\", { ref: schemaEnv.root });\n\t\t\tgen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);\n\t\t}\n\t}\n\tfunction returnResults(it) {\n\t\tconst { gen, schemaEnv, validateName, ValidationError, opts } = it;\n\t\tif (schemaEnv.$async) gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);\n\t\t\tif (opts.unevaluated) assignEvaluated(it);\n\t\t\tgen.return((0, codegen_1._)`${names_1.default.errors} === 0`);\n\t\t}\n\t}\n\tfunction assignEvaluated({ gen, evaluated, props, items }) {\n\t\tif (props instanceof codegen_1.Name) gen.assign((0, codegen_1._)`${evaluated}.props`, props);\n\t\tif (items instanceof codegen_1.Name) gen.assign((0, codegen_1._)`${evaluated}.items`, items);\n\t}\n\tfunction schemaKeywords(it, types, typeErrors, errsCount) {\n\t\tconst { gen, schema, data, allErrors, opts, self } = it;\n\t\tconst { RULES } = self;\n\t\tif (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {\n\t\t\tgen.block(() => keywordCode(it, \"$ref\", RULES.all.$ref.definition));\n\t\t\treturn;\n\t\t}\n\t\tif (!opts.jtd) checkStrictTypes(it, types);\n\t\tgen.block(() => {\n\t\t\tfor (const group of RULES.rules) groupKeywords(group);\n\t\t\tgroupKeywords(RULES.post);\n\t\t});\n\t\tfunction groupKeywords(group) {\n\t\t\tif (!(0, applicability_1.shouldUseGroup)(schema, group)) return;\n\t\t\tif (group.type) {\n\t\t\t\tgen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));\n\t\t\t\titerateKeywords(it, group);\n\t\t\t\tif (types.length === 1 && types[0] === group.type && typeErrors) {\n\t\t\t\t\tgen.else();\n\t\t\t\t\t(0, dataType_2.reportTypeError)(it);\n\t\t\t\t}\n\t\t\t\tgen.endIf();\n\t\t\t} else iterateKeywords(it, group);\n\t\t\tif (!allErrors) gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);\n\t\t}\n\t}\n\tfunction iterateKeywords(it, group) {\n\t\tconst { gen, schema, opts: { useDefaults } } = it;\n\t\tif (useDefaults) (0, defaults_1.assignDefaults)(it, group.type);\n\t\tgen.block(() => {\n\t\t\tfor (const rule of group.rules) if ((0, applicability_1.shouldUseRule)(schema, rule)) keywordCode(it, rule.keyword, rule.definition, group.type);\n\t\t});\n\t}\n\tfunction checkStrictTypes(it, types) {\n\t\tif (it.schemaEnv.meta || !it.opts.strictTypes) return;\n\t\tcheckContextTypes(it, types);\n\t\tif (!it.opts.allowUnionTypes) checkMultipleTypes(it, types);\n\t\tcheckKeywordTypes(it, it.dataTypes);\n\t}\n\tfunction checkContextTypes(it, types) {\n\t\tif (!types.length) return;\n\t\tif (!it.dataTypes.length) {\n\t\t\tit.dataTypes = types;\n\t\t\treturn;\n\t\t}\n\t\ttypes.forEach((t) => {\n\t\t\tif (!includesType(it.dataTypes, t)) strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`);\n\t\t});\n\t\tnarrowSchemaTypes(it, types);\n\t}\n\tfunction checkMultipleTypes(it, ts) {\n\t\tif (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) strictTypesError(it, \"use allowUnionTypes to allow union type keyword\");\n\t}\n\tfunction checkKeywordTypes(it, ts) {\n\t\tconst rules = it.self.RULES.all;\n\t\tfor (const keyword in rules) {\n\t\t\tconst rule = rules[keyword];\n\t\t\tif (typeof rule == \"object\" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {\n\t\t\t\tconst { type } = rule.definition;\n\t\t\t\tif (type.length && !type.some((t) => hasApplicableType(ts, t))) strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`);\n\t\t\t}\n\t\t}\n\t}\n\tfunction hasApplicableType(schTs, kwdT) {\n\t\treturn schTs.includes(kwdT) || kwdT === \"number\" && schTs.includes(\"integer\");\n\t}\n\tfunction includesType(ts, t) {\n\t\treturn ts.includes(t) || t === \"integer\" && ts.includes(\"number\");\n\t}\n\tfunction narrowSchemaTypes(it, withTypes) {\n\t\tconst ts = [];\n\t\tfor (const t of it.dataTypes) if (includesType(withTypes, t)) ts.push(t);\n\t\telse if (withTypes.includes(\"integer\") && t === \"number\") ts.push(\"integer\");\n\t\tit.dataTypes = ts;\n\t}\n\tfunction strictTypesError(it, msg) {\n\t\tconst schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n\t\tmsg += ` at \"${schemaPath}\" (strictTypes)`;\n\t\t(0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);\n\t}\n\tvar KeywordCxt = class {\n\t\tconstructor(it, def, keyword) {\n\t\t\t(0, keyword_1.validateKeywordUsage)(it, def, keyword);\n\t\t\tthis.gen = it.gen;\n\t\t\tthis.allErrors = it.allErrors;\n\t\t\tthis.keyword = keyword;\n\t\t\tthis.data = it.data;\n\t\t\tthis.schema = it.schema[keyword];\n\t\t\tthis.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;\n\t\t\tthis.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);\n\t\t\tthis.schemaType = def.schemaType;\n\t\t\tthis.parentSchema = it.schema;\n\t\t\tthis.params = {};\n\t\t\tthis.it = it;\n\t\t\tthis.def = def;\n\t\t\tif (this.$data) this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it));\n\t\t\telse {\n\t\t\t\tthis.schemaCode = this.schemaValue;\n\t\t\t\tif (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);\n\t\t\t}\n\t\t\tif (\"code\" in def ? def.trackErrors : def.errors !== false) this.errsCount = it.gen.const(\"_errs\", names_1.default.errors);\n\t\t}\n\t\tresult(condition, successAction, failAction) {\n\t\t\tthis.failResult((0, codegen_1.not)(condition), successAction, failAction);\n\t\t}\n\t\tfailResult(condition, successAction, failAction) {\n\t\t\tthis.gen.if(condition);\n\t\t\tif (failAction) failAction();\n\t\t\telse this.error();\n\t\t\tif (successAction) {\n\t\t\t\tthis.gen.else();\n\t\t\t\tsuccessAction();\n\t\t\t\tif (this.allErrors) this.gen.endIf();\n\t\t\t} else if (this.allErrors) this.gen.endIf();\n\t\t\telse this.gen.else();\n\t\t}\n\t\tpass(condition, failAction) {\n\t\t\tthis.failResult((0, codegen_1.not)(condition), void 0, failAction);\n\t\t}\n\t\tfail(condition) {\n\t\t\tif (condition === void 0) {\n\t\t\t\tthis.error();\n\t\t\t\tif (!this.allErrors) this.gen.if(false);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.gen.if(condition);\n\t\t\tthis.error();\n\t\t\tif (this.allErrors) this.gen.endIf();\n\t\t\telse this.gen.else();\n\t\t}\n\t\tfail$data(condition) {\n\t\t\tif (!this.$data) return this.fail(condition);\n\t\t\tconst { schemaCode } = this;\n\t\t\tthis.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);\n\t\t}\n\t\terror(append, errorParams, errorPaths) {\n\t\t\tif (errorParams) {\n\t\t\t\tthis.setParams(errorParams);\n\t\t\t\tthis._error(append, errorPaths);\n\t\t\t\tthis.setParams({});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._error(append, errorPaths);\n\t\t}\n\t\t_error(append, errorPaths) {\n\t\t\t(append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);\n\t\t}\n\t\t$dataError() {\n\t\t\t(0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);\n\t\t}\n\t\treset() {\n\t\t\tif (this.errsCount === void 0) throw new Error(\"add \\\"trackErrors\\\" to keyword definition\");\n\t\t\t(0, errors_1.resetErrorsCount)(this.gen, this.errsCount);\n\t\t}\n\t\tok(cond) {\n\t\t\tif (!this.allErrors) this.gen.if(cond);\n\t\t}\n\t\tsetParams(obj, assign) {\n\t\t\tif (assign) Object.assign(this.params, obj);\n\t\t\telse this.params = obj;\n\t\t}\n\t\tblock$data(valid, codeBlock, $dataValid = codegen_1.nil) {\n\t\t\tthis.gen.block(() => {\n\t\t\t\tthis.check$data(valid, $dataValid);\n\t\t\t\tcodeBlock();\n\t\t\t});\n\t\t}\n\t\tcheck$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {\n\t\t\tif (!this.$data) return;\n\t\t\tconst { gen, schemaCode, schemaType, def } = this;\n\t\t\tgen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));\n\t\t\tif (valid !== codegen_1.nil) gen.assign(valid, true);\n\t\t\tif (schemaType.length || def.validateSchema) {\n\t\t\t\tgen.elseIf(this.invalid$data());\n\t\t\t\tthis.$dataError();\n\t\t\t\tif (valid !== codegen_1.nil) gen.assign(valid, false);\n\t\t\t}\n\t\t\tgen.else();\n\t\t}\n\t\tinvalid$data() {\n\t\t\tconst { gen, schemaCode, schemaType, def, it } = this;\n\t\t\treturn (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());\n\t\t\tfunction wrong$DataType() {\n\t\t\t\tif (schemaType.length) {\n\t\t\t\t\t/* istanbul ignore if */\n\t\t\t\t\tif (!(schemaCode instanceof codegen_1.Name)) throw new Error(\"ajv implementation error\");\n\t\t\t\t\tconst st = Array.isArray(schemaType) ? schemaType : [schemaType];\n\t\t\t\t\treturn (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;\n\t\t\t\t}\n\t\t\t\treturn codegen_1.nil;\n\t\t\t}\n\t\t\tfunction invalid$DataSchema() {\n\t\t\t\tif (def.validateSchema) {\n\t\t\t\t\tconst validateSchemaRef = gen.scopeValue(\"validate$data\", { ref: def.validateSchema });\n\t\t\t\t\treturn (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`;\n\t\t\t\t}\n\t\t\t\treturn codegen_1.nil;\n\t\t\t}\n\t\t}\n\t\tsubschema(appl, valid) {\n\t\t\tconst subschema = (0, subschema_1.getSubschema)(this.it, appl);\n\t\t\t(0, subschema_1.extendSubschemaData)(subschema, this.it, appl);\n\t\t\t(0, subschema_1.extendSubschemaMode)(subschema, appl);\n\t\t\tconst nextContext = {\n\t\t\t\t...this.it,\n\t\t\t\t...subschema,\n\t\t\t\titems: void 0,\n\t\t\t\tprops: void 0\n\t\t\t};\n\t\t\tsubschemaCode(nextContext, valid);\n\t\t\treturn nextContext;\n\t\t}\n\t\tmergeEvaluated(schemaCxt, toName) {\n\t\t\tconst { it, gen } = this;\n\t\t\tif (!it.opts.unevaluated) return;\n\t\t\tif (it.props !== true && schemaCxt.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);\n\t\t\tif (it.items !== true && schemaCxt.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);\n\t\t}\n\t\tmergeValidEvaluated(schemaCxt, valid) {\n\t\t\tconst { it, gen } = this;\n\t\t\tif (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n\t\t\t\tgen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t};\n\texports.KeywordCxt = KeywordCxt;\n\tfunction keywordCode(it, keyword, def, ruleType) {\n\t\tconst cxt = new KeywordCxt(it, def, keyword);\n\t\tif (\"code\" in def) def.code(cxt, ruleType);\n\t\telse if (cxt.$data && def.validate) (0, keyword_1.funcKeywordCode)(cxt, def);\n\t\telse if (\"macro\" in def) (0, keyword_1.macroKeywordCode)(cxt, def);\n\t\telse if (def.compile || def.validate) (0, keyword_1.funcKeywordCode)(cxt, def);\n\t}\n\tconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\n\tconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\n\tfunction getData($data, { dataLevel, dataNames, dataPathArr }) {\n\t\tlet jsonPointer;\n\t\tlet data;\n\t\tif ($data === \"\") return names_1.default.rootData;\n\t\tif ($data[0] === \"/\") {\n\t\t\tif (!JSON_POINTER.test($data)) throw new Error(`Invalid JSON-pointer: ${$data}`);\n\t\t\tjsonPointer = $data;\n\t\t\tdata = names_1.default.rootData;\n\t\t} else {\n\t\t\tconst matches = RELATIVE_JSON_POINTER.exec($data);\n\t\t\tif (!matches) throw new Error(`Invalid JSON-pointer: ${$data}`);\n\t\t\tconst up = +matches[1];\n\t\t\tjsonPointer = matches[2];\n\t\t\tif (jsonPointer === \"#\") {\n\t\t\t\tif (up >= dataLevel) throw new Error(errorMsg(\"property/index\", up));\n\t\t\t\treturn dataPathArr[dataLevel - up];\n\t\t\t}\n\t\t\tif (up > dataLevel) throw new Error(errorMsg(\"data\", up));\n\t\t\tdata = dataNames[dataLevel - up];\n\t\t\tif (!jsonPointer) return data;\n\t\t}\n\t\tlet expr = data;\n\t\tconst segments = jsonPointer.split(\"/\");\n\t\tfor (const segment of segments) if (segment) {\n\t\t\tdata = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;\n\t\t\texpr = (0, codegen_1._)`${expr} && ${data}`;\n\t\t}\n\t\treturn expr;\n\t\tfunction errorMsg(pointerType, up) {\n\t\t\treturn `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;\n\t\t}\n\t}\n\texports.getData = getData;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js\nvar require_validation_error = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar ValidationError = class extends Error {\n\t\tconstructor(errors) {\n\t\t\tsuper(\"validation failed\");\n\t\t\tthis.errors = errors;\n\t\t\tthis.ajv = this.validation = true;\n\t\t}\n\t};\n\texports.default = ValidationError;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js\nvar require_ref_error = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst resolve_1 = require_resolve();\n\tvar MissingRefError = class extends Error {\n\t\tconstructor(resolver, baseId, ref, msg) {\n\t\t\tsuper(msg || `can't resolve reference ${ref} from id ${baseId}`);\n\t\t\tthis.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);\n\t\t\tthis.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));\n\t\t}\n\t};\n\texports.default = MissingRefError;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js\nvar require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst validation_error_1 = require_validation_error();\n\tconst names_1 = require_names();\n\tconst resolve_1 = require_resolve();\n\tconst util_1 = require_util();\n\tconst validate_1 = require_validate();\n\tvar SchemaEnv = class {\n\t\tconstructor(env) {\n\t\t\tvar _a;\n\t\t\tthis.refs = {};\n\t\t\tthis.dynamicAnchors = {};\n\t\t\tlet schema;\n\t\t\tif (typeof env.schema == \"object\") schema = env.schema;\n\t\t\tthis.schema = env.schema;\n\t\t\tthis.schemaId = env.schemaId;\n\t\t\tthis.root = env.root || this;\n\t\t\tthis.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n\t\t\tthis.schemaPath = env.schemaPath;\n\t\t\tthis.localRefs = env.localRefs;\n\t\t\tthis.meta = env.meta;\n\t\t\tthis.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n\t\t\tthis.refs = {};\n\t\t}\n\t};\n\texports.SchemaEnv = SchemaEnv;\n\tfunction compileSchema(sch) {\n\t\tconst _sch = getCompilingSchema.call(this, sch);\n\t\tif (_sch) return _sch;\n\t\tconst rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);\n\t\tconst { es5, lines } = this.opts.code;\n\t\tconst { ownProperties } = this.opts;\n\t\tconst gen = new codegen_1.CodeGen(this.scope, {\n\t\t\tes5,\n\t\t\tlines,\n\t\t\townProperties\n\t\t});\n\t\tlet _ValidationError;\n\t\tif (sch.$async) _ValidationError = gen.scopeValue(\"Error\", {\n\t\t\tref: validation_error_1.default,\n\t\t\tcode: (0, codegen_1._)`require(\"ajv/dist/runtime/validation_error\").default`\n\t\t});\n\t\tconst validateName = gen.scopeName(\"validate\");\n\t\tsch.validateName = validateName;\n\t\tconst schemaCxt = {\n\t\t\tgen,\n\t\t\tallErrors: this.opts.allErrors,\n\t\t\tdata: names_1.default.data,\n\t\t\tparentData: names_1.default.parentData,\n\t\t\tparentDataProperty: names_1.default.parentDataProperty,\n\t\t\tdataNames: [names_1.default.data],\n\t\t\tdataPathArr: [codegen_1.nil],\n\t\t\tdataLevel: 0,\n\t\t\tdataTypes: [],\n\t\t\tdefinedProperties: /* @__PURE__ */ new Set(),\n\t\t\ttopSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true ? {\n\t\t\t\tref: sch.schema,\n\t\t\t\tcode: (0, codegen_1.stringify)(sch.schema)\n\t\t\t} : { ref: sch.schema }),\n\t\t\tvalidateName,\n\t\t\tValidationError: _ValidationError,\n\t\t\tschema: sch.schema,\n\t\t\tschemaEnv: sch,\n\t\t\trootId,\n\t\t\tbaseId: sch.baseId || rootId,\n\t\t\tschemaPath: codegen_1.nil,\n\t\t\terrSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n\t\t\terrorPath: (0, codegen_1._)`\"\"`,\n\t\t\topts: this.opts,\n\t\t\tself: this\n\t\t};\n\t\tlet sourceCode;\n\t\ttry {\n\t\t\tthis._compilations.add(sch);\n\t\t\t(0, validate_1.validateFunctionCode)(schemaCxt);\n\t\t\tgen.optimize(this.opts.code.optimize);\n\t\t\tconst validateCode = gen.toString();\n\t\t\tsourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n\t\t\tif (this.opts.code.process) sourceCode = this.opts.code.process(sourceCode, sch);\n\t\t\tconst validate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode)(this, this.scope.get());\n\t\t\tthis.scope.value(validateName, { ref: validate });\n\t\t\tvalidate.errors = null;\n\t\t\tvalidate.schema = sch.schema;\n\t\t\tvalidate.schemaEnv = sch;\n\t\t\tif (sch.$async) validate.$async = true;\n\t\t\tif (this.opts.code.source === true) validate.source = {\n\t\t\t\tvalidateName,\n\t\t\t\tvalidateCode,\n\t\t\t\tscopeValues: gen._values\n\t\t\t};\n\t\t\tif (this.opts.unevaluated) {\n\t\t\t\tconst { props, items } = schemaCxt;\n\t\t\t\tvalidate.evaluated = {\n\t\t\t\t\tprops: props instanceof codegen_1.Name ? void 0 : props,\n\t\t\t\t\titems: items instanceof codegen_1.Name ? void 0 : items,\n\t\t\t\t\tdynamicProps: props instanceof codegen_1.Name,\n\t\t\t\t\tdynamicItems: items instanceof codegen_1.Name\n\t\t\t\t};\n\t\t\t\tif (validate.source) validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n\t\t\t}\n\t\t\tsch.validate = validate;\n\t\t\treturn sch;\n\t\t} catch (e) {\n\t\t\tdelete sch.validate;\n\t\t\tdelete sch.validateName;\n\t\t\tif (sourceCode) this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tthis._compilations.delete(sch);\n\t\t}\n\t}\n\texports.compileSchema = compileSchema;\n\tfunction resolveRef(root, baseId, ref) {\n\t\tvar _a;\n\t\tref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n\t\tconst schOrFunc = root.refs[ref];\n\t\tif (schOrFunc) return schOrFunc;\n\t\tlet _sch = resolve.call(this, root, ref);\n\t\tif (_sch === void 0) {\n\t\t\tconst schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tif (schema) _sch = new SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\troot,\n\t\t\t\tbaseId\n\t\t\t});\n\t\t}\n\t\tif (_sch === void 0) return;\n\t\treturn root.refs[ref] = inlineOrCompile.call(this, _sch);\n\t}\n\texports.resolveRef = resolveRef;\n\tfunction inlineOrCompile(sch) {\n\t\tif ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) return sch.schema;\n\t\treturn sch.validate ? sch : compileSchema.call(this, sch);\n\t}\n\tfunction getCompilingSchema(schEnv) {\n\t\tfor (const sch of this._compilations) if (sameSchemaEnv(sch, schEnv)) return sch;\n\t}\n\texports.getCompilingSchema = getCompilingSchema;\n\tfunction sameSchemaEnv(s1, s2) {\n\t\treturn s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n\t}\n\tfunction resolve(root, ref) {\n\t\tlet sch;\n\t\twhile (typeof (sch = this.refs[ref]) == \"string\") ref = sch;\n\t\treturn sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n\t}\n\tfunction resolveSchema(root, ref) {\n\t\tconst p = this.opts.uriResolver.parse(ref);\n\t\tconst refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n\t\tlet baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);\n\t\tif (Object.keys(root.schema).length > 0 && refPath === baseId) return getJsonPointer.call(this, p, root);\n\t\tconst id = (0, resolve_1.normalizeId)(refPath);\n\t\tconst schOrRef = this.refs[id] || this.schemas[id];\n\t\tif (typeof schOrRef == \"string\") {\n\t\t\tconst sch = resolveSchema.call(this, root, schOrRef);\n\t\t\tif (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\") return;\n\t\t\treturn getJsonPointer.call(this, p, sch);\n\t\t}\n\t\tif (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\") return;\n\t\tif (!schOrRef.validate) compileSchema.call(this, schOrRef);\n\t\tif (id === (0, resolve_1.normalizeId)(ref)) {\n\t\t\tconst { schema } = schOrRef;\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tconst schId = schema[schemaId];\n\t\t\tif (schId) baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n\t\t\treturn new SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\troot,\n\t\t\t\tbaseId\n\t\t\t});\n\t\t}\n\t\treturn getJsonPointer.call(this, p, schOrRef);\n\t}\n\texports.resolveSchema = resolveSchema;\n\tconst PREVENT_SCOPE_CHANGE = new Set([\n\t\t\"properties\",\n\t\t\"patternProperties\",\n\t\t\"enum\",\n\t\t\"dependencies\",\n\t\t\"definitions\"\n\t]);\n\tfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n\t\tvar _a;\n\t\tif (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\") return;\n\t\tfor (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n\t\t\tif (typeof schema === \"boolean\") return;\n\t\t\tconst partSchema = schema[(0, util_1.unescapeFragment)(part)];\n\t\t\tif (partSchema === void 0) return;\n\t\t\tschema = partSchema;\n\t\t\tconst schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n\t\t\tif (!PREVENT_SCOPE_CHANGE.has(part) && schId) baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n\t\t}\n\t\tlet env;\n\t\tif (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n\t\t\tconst $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n\t\t\tenv = resolveSchema.call(this, root, $ref);\n\t\t}\n\t\tconst { schemaId } = this.opts;\n\t\tenv = env || new SchemaEnv({\n\t\t\tschema,\n\t\t\tschemaId,\n\t\t\troot,\n\t\t\tbaseId\n\t\t});\n\t\tif (env.schema !== env.root.schema) return env;\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json\nvar require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$id\": \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n\t\t\"description\": \"Meta-schema for $data reference (JSON AnySchema extension proposal)\",\n\t\t\"type\": \"object\",\n\t\t\"required\": [\"$data\"],\n\t\t\"properties\": { \"$data\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"anyOf\": [{ \"format\": \"relative-json-pointer\" }, { \"format\": \"json-pointer\" }]\n\t\t} },\n\t\t\"additionalProperties\": false\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js\nvar require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\t/** @type {(value: string) => boolean} */\n\tconst isUUID = RegExp.prototype.test.bind(/^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$/iu);\n\t/** @type {(value: string) => boolean} */\n\tconst isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)$/u);\n\t/**\n\t* @param {Array<string>} input\n\t* @returns {string}\n\t*/\n\tfunction stringArrayToHexStripped(input) {\n\t\tlet acc = \"\";\n\t\tlet code = 0;\n\t\tlet i = 0;\n\t\tfor (i = 0; i < input.length; i++) {\n\t\t\tcode = input[i].charCodeAt(0);\n\t\t\tif (code === 48) continue;\n\t\t\tif (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return \"\";\n\t\t\tacc += input[i];\n\t\t\tbreak;\n\t\t}\n\t\tfor (i += 1; i < input.length; i++) {\n\t\t\tcode = input[i].charCodeAt(0);\n\t\t\tif (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return \"\";\n\t\t\tacc += input[i];\n\t\t}\n\t\treturn acc;\n\t}\n\t/**\n\t* @typedef {Object} GetIPV6Result\n\t* @property {boolean} error - Indicates if there was an error parsing the IPv6 address.\n\t* @property {string} address - The parsed IPv6 address.\n\t* @property {string} [zone] - The zone identifier, if present.\n\t*/\n\t/**\n\t* @param {string} value\n\t* @returns {boolean}\n\t*/\n\tconst nonSimpleDomain = RegExp.prototype.test.bind(/[^!\"$&'()*+,\\-.;=_`a-z{}~]/u);\n\t/**\n\t* @param {Array<string>} buffer\n\t* @returns {boolean}\n\t*/\n\tfunction consumeIsZone(buffer) {\n\t\tbuffer.length = 0;\n\t\treturn true;\n\t}\n\t/**\n\t* @param {Array<string>} buffer\n\t* @param {Array<string>} address\n\t* @param {GetIPV6Result} output\n\t* @returns {boolean}\n\t*/\n\tfunction consumeHextets(buffer, address, output) {\n\t\tif (buffer.length) {\n\t\t\tconst hex = stringArrayToHexStripped(buffer);\n\t\t\tif (hex !== \"\") address.push(hex);\n\t\t\telse {\n\t\t\t\toutput.error = true;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbuffer.length = 0;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* @param {string} input\n\t* @returns {GetIPV6Result}\n\t*/\n\tfunction getIPV6(input) {\n\t\tlet tokenCount = 0;\n\t\tconst output = {\n\t\t\terror: false,\n\t\t\taddress: \"\",\n\t\t\tzone: \"\"\n\t\t};\n\t\t/** @type {Array<string>} */\n\t\tconst address = [];\n\t\t/** @type {Array<string>} */\n\t\tconst buffer = [];\n\t\tlet endipv6Encountered = false;\n\t\tlet endIpv6 = false;\n\t\tlet consume = consumeHextets;\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tconst cursor = input[i];\n\t\t\tif (cursor === \"[\" || cursor === \"]\") continue;\n\t\t\tif (cursor === \":\") {\n\t\t\t\tif (endipv6Encountered === true) endIpv6 = true;\n\t\t\t\tif (!consume(buffer, address, output)) break;\n\t\t\t\tif (++tokenCount > 7) {\n\t\t\t\t\toutput.error = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (i > 0 && input[i - 1] === \":\") endipv6Encountered = true;\n\t\t\t\taddress.push(\":\");\n\t\t\t\tcontinue;\n\t\t\t} else if (cursor === \"%\") {\n\t\t\t\tif (!consume(buffer, address, output)) break;\n\t\t\t\tconsume = consumeIsZone;\n\t\t\t} else {\n\t\t\t\tbuffer.push(cursor);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (buffer.length) if (consume === consumeIsZone) output.zone = buffer.join(\"\");\n\t\telse if (endIpv6) address.push(buffer.join(\"\"));\n\t\telse address.push(stringArrayToHexStripped(buffer));\n\t\toutput.address = address.join(\"\");\n\t\treturn output;\n\t}\n\t/**\n\t* @typedef {Object} NormalizeIPv6Result\n\t* @property {string} host - The normalized host.\n\t* @property {string} [escapedHost] - The escaped host.\n\t* @property {boolean} isIPV6 - Indicates if the host is an IPv6 address.\n\t*/\n\t/**\n\t* @param {string} host\n\t* @returns {NormalizeIPv6Result}\n\t*/\n\tfunction normalizeIPv6(host) {\n\t\tif (findToken(host, \":\") < 2) return {\n\t\t\thost,\n\t\t\tisIPV6: false\n\t\t};\n\t\tconst ipv6 = getIPV6(host);\n\t\tif (!ipv6.error) {\n\t\t\tlet newHost = ipv6.address;\n\t\t\tlet escapedHost = ipv6.address;\n\t\t\tif (ipv6.zone) {\n\t\t\t\tnewHost += \"%\" + ipv6.zone;\n\t\t\t\tescapedHost += \"%25\" + ipv6.zone;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\thost: newHost,\n\t\t\t\tisIPV6: true,\n\t\t\t\tescapedHost\n\t\t\t};\n\t\t} else return {\n\t\t\thost,\n\t\t\tisIPV6: false\n\t\t};\n\t}\n\t/**\n\t* @param {string} str\n\t* @param {string} token\n\t* @returns {number}\n\t*/\n\tfunction findToken(str, token) {\n\t\tlet ind = 0;\n\t\tfor (let i = 0; i < str.length; i++) if (str[i] === token) ind++;\n\t\treturn ind;\n\t}\n\t/**\n\t* @param {string} path\n\t* @returns {string}\n\t*\n\t* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n\t*/\n\tfunction removeDotSegments(path) {\n\t\tlet input = path;\n\t\tconst output = [];\n\t\tlet nextSlash = -1;\n\t\tlet len = 0;\n\t\twhile (len = input.length) {\n\t\t\tif (len === 1) if (input === \".\") break;\n\t\t\telse if (input === \"/\") {\n\t\t\t\toutput.push(\"/\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\toutput.push(input);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (len === 2) {\n\t\t\t\tif (input[0] === \".\") {\n\t\t\t\t\tif (input[1] === \".\") break;\n\t\t\t\t\telse if (input[1] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (input[0] === \"/\") {\n\t\t\t\t\tif (input[1] === \".\" || input[1] === \"/\") {\n\t\t\t\t\t\toutput.push(\"/\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (len === 3) {\n\t\t\t\tif (input === \"/..\") {\n\t\t\t\t\tif (output.length !== 0) output.pop();\n\t\t\t\t\toutput.push(\"/\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (input[0] === \".\") {\n\t\t\t\tif (input[1] === \".\") {\n\t\t\t\t\tif (input[2] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(3);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (input[1] === \"/\") {\n\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (input[0] === \"/\") {\n\t\t\t\tif (input[1] === \".\") {\n\t\t\t\t\tif (input[2] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (input[2] === \".\") {\n\t\t\t\t\t\tif (input[3] === \"/\") {\n\t\t\t\t\t\t\tinput = input.slice(3);\n\t\t\t\t\t\t\tif (output.length !== 0) output.pop();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((nextSlash = input.indexOf(\"/\", 1)) === -1) {\n\t\t\t\toutput.push(input);\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\toutput.push(input.slice(0, nextSlash));\n\t\t\t\tinput = input.slice(nextSlash);\n\t\t\t}\n\t\t}\n\t\treturn output.join(\"\");\n\t}\n\t/**\n\t* @param {import('../types/index').URIComponent} component\n\t* @param {boolean} esc\n\t* @returns {import('../types/index').URIComponent}\n\t*/\n\tfunction normalizeComponentEncoding(component, esc) {\n\t\tconst func = esc !== true ? escape : unescape;\n\t\tif (component.scheme !== void 0) component.scheme = func(component.scheme);\n\t\tif (component.userinfo !== void 0) component.userinfo = func(component.userinfo);\n\t\tif (component.host !== void 0) component.host = func(component.host);\n\t\tif (component.path !== void 0) component.path = func(component.path);\n\t\tif (component.query !== void 0) component.query = func(component.query);\n\t\tif (component.fragment !== void 0) component.fragment = func(component.fragment);\n\t\treturn component;\n\t}\n\t/**\n\t* @param {import('../types/index').URIComponent} component\n\t* @returns {string|undefined}\n\t*/\n\tfunction recomposeAuthority(component) {\n\t\tconst uriTokens = [];\n\t\tif (component.userinfo !== void 0) {\n\t\t\turiTokens.push(component.userinfo);\n\t\t\turiTokens.push(\"@\");\n\t\t}\n\t\tif (component.host !== void 0) {\n\t\t\tlet host = unescape(component.host);\n\t\t\tif (!isIPv4(host)) {\n\t\t\t\tconst ipV6res = normalizeIPv6(host);\n\t\t\t\tif (ipV6res.isIPV6 === true) host = `[${ipV6res.escapedHost}]`;\n\t\t\t\telse host = component.host;\n\t\t\t}\n\t\t\turiTokens.push(host);\n\t\t}\n\t\tif (typeof component.port === \"number\" || typeof component.port === \"string\") {\n\t\t\turiTokens.push(\":\");\n\t\t\turiTokens.push(String(component.port));\n\t\t}\n\t\treturn uriTokens.length ? uriTokens.join(\"\") : void 0;\n\t}\n\tmodule.exports = {\n\t\tnonSimpleDomain,\n\t\trecomposeAuthority,\n\t\tnormalizeComponentEncoding,\n\t\tremoveDotSegments,\n\t\tisIPv4,\n\t\tisUUID,\n\t\tnormalizeIPv6,\n\t\tstringArrayToHexStripped\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js\nvar require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { isUUID } = require_utils();\n\tconst URN_REG = /([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)/iu;\n\tconst supportedSchemeNames = [\n\t\t\"http\",\n\t\t\"https\",\n\t\t\"ws\",\n\t\t\"wss\",\n\t\t\"urn\",\n\t\t\"urn:uuid\"\n\t];\n\t/** @typedef {supportedSchemeNames[number]} SchemeName */\n\t/**\n\t* @param {string} name\n\t* @returns {name is SchemeName}\n\t*/\n\tfunction isValidSchemeName(name) {\n\t\treturn supportedSchemeNames.indexOf(name) !== -1;\n\t}\n\t/**\n\t* @callback SchemeFn\n\t* @param {import('../types/index').URIComponent} component\n\t* @param {import('../types/index').Options} options\n\t* @returns {import('../types/index').URIComponent}\n\t*/\n\t/**\n\t* @typedef {Object} SchemeHandler\n\t* @property {SchemeName} scheme - The scheme name.\n\t* @property {boolean} [domainHost] - Indicates if the scheme supports domain hosts.\n\t* @property {SchemeFn} parse - Function to parse the URI component for this scheme.\n\t* @property {SchemeFn} serialize - Function to serialize the URI component for this scheme.\n\t* @property {boolean} [skipNormalize] - Indicates if normalization should be skipped for this scheme.\n\t* @property {boolean} [absolutePath] - Indicates if the scheme uses absolute paths.\n\t* @property {boolean} [unicodeSupport] - Indicates if the scheme supports Unicode.\n\t*/\n\t/**\n\t* @param {import('../types/index').URIComponent} wsComponent\n\t* @returns {boolean}\n\t*/\n\tfunction wsIsSecure(wsComponent) {\n\t\tif (wsComponent.secure === true) return true;\n\t\telse if (wsComponent.secure === false) return false;\n\t\telse if (wsComponent.scheme) return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === \"w\" || wsComponent.scheme[0] === \"W\") && (wsComponent.scheme[1] === \"s\" || wsComponent.scheme[1] === \"S\") && (wsComponent.scheme[2] === \"s\" || wsComponent.scheme[2] === \"S\");\n\t\telse return false;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction httpParse(component) {\n\t\tif (!component.host) component.error = component.error || \"HTTP URIs must have a host.\";\n\t\treturn component;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction httpSerialize(component) {\n\t\tconst secure = String(component.scheme).toLowerCase() === \"https\";\n\t\tif (component.port === (secure ? 443 : 80) || component.port === \"\") component.port = void 0;\n\t\tif (!component.path) component.path = \"/\";\n\t\treturn component;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction wsParse(wsComponent) {\n\t\twsComponent.secure = wsIsSecure(wsComponent);\n\t\twsComponent.resourceName = (wsComponent.path || \"/\") + (wsComponent.query ? \"?\" + wsComponent.query : \"\");\n\t\twsComponent.path = void 0;\n\t\twsComponent.query = void 0;\n\t\treturn wsComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction wsSerialize(wsComponent) {\n\t\tif (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === \"\") wsComponent.port = void 0;\n\t\tif (typeof wsComponent.secure === \"boolean\") {\n\t\t\twsComponent.scheme = wsComponent.secure ? \"wss\" : \"ws\";\n\t\t\twsComponent.secure = void 0;\n\t\t}\n\t\tif (wsComponent.resourceName) {\n\t\t\tconst [path, query] = wsComponent.resourceName.split(\"?\");\n\t\t\twsComponent.path = path && path !== \"/\" ? path : void 0;\n\t\t\twsComponent.query = query;\n\t\t\twsComponent.resourceName = void 0;\n\t\t}\n\t\twsComponent.fragment = void 0;\n\t\treturn wsComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnParse(urnComponent, options) {\n\t\tif (!urnComponent.path) {\n\t\t\turnComponent.error = \"URN can not be parsed\";\n\t\t\treturn urnComponent;\n\t\t}\n\t\tconst matches = urnComponent.path.match(URN_REG);\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponent.scheme || \"urn\";\n\t\t\turnComponent.nid = matches[1].toLowerCase();\n\t\t\turnComponent.nss = matches[2];\n\t\t\tconst schemeHandler = getSchemeHandler(`${scheme}:${options.nid || urnComponent.nid}`);\n\t\t\turnComponent.path = void 0;\n\t\t\tif (schemeHandler) urnComponent = schemeHandler.parse(urnComponent, options);\n\t\t} else urnComponent.error = urnComponent.error || \"URN can not be parsed.\";\n\t\treturn urnComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnSerialize(urnComponent, options) {\n\t\tif (urnComponent.nid === void 0) throw new Error(\"URN without nid cannot be serialized\");\n\t\tconst scheme = options.scheme || urnComponent.scheme || \"urn\";\n\t\tconst nid = urnComponent.nid.toLowerCase();\n\t\tconst schemeHandler = getSchemeHandler(`${scheme}:${options.nid || nid}`);\n\t\tif (schemeHandler) urnComponent = schemeHandler.serialize(urnComponent, options);\n\t\tconst uriComponent = urnComponent;\n\t\tconst nss = urnComponent.nss;\n\t\turiComponent.path = `${nid || options.nid}:${nss}`;\n\t\toptions.skipEscape = true;\n\t\treturn uriComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnuuidParse(urnComponent, options) {\n\t\tconst uuidComponent = urnComponent;\n\t\tuuidComponent.uuid = uuidComponent.nss;\n\t\tuuidComponent.nss = void 0;\n\t\tif (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) uuidComponent.error = uuidComponent.error || \"UUID is not valid.\";\n\t\treturn uuidComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnuuidSerialize(uuidComponent) {\n\t\tconst urnComponent = uuidComponent;\n\t\turnComponent.nss = (uuidComponent.uuid || \"\").toLowerCase();\n\t\treturn urnComponent;\n\t}\n\tconst http = {\n\t\tscheme: \"http\",\n\t\tdomainHost: true,\n\t\tparse: httpParse,\n\t\tserialize: httpSerialize\n\t};\n\tconst https = {\n\t\tscheme: \"https\",\n\t\tdomainHost: http.domainHost,\n\t\tparse: httpParse,\n\t\tserialize: httpSerialize\n\t};\n\tconst ws = {\n\t\tscheme: \"ws\",\n\t\tdomainHost: true,\n\t\tparse: wsParse,\n\t\tserialize: wsSerialize\n\t};\n\tconst wss = {\n\t\tscheme: \"wss\",\n\t\tdomainHost: ws.domainHost,\n\t\tparse: ws.parse,\n\t\tserialize: ws.serialize\n\t};\n\tconst urn = {\n\t\tscheme: \"urn\",\n\t\tparse: urnParse,\n\t\tserialize: urnSerialize,\n\t\tskipNormalize: true\n\t};\n\tconst urnuuid = {\n\t\tscheme: \"urn:uuid\",\n\t\tparse: urnuuidParse,\n\t\tserialize: urnuuidSerialize,\n\t\tskipNormalize: true\n\t};\n\tconst SCHEMES = {\n\t\thttp,\n\t\thttps,\n\t\tws,\n\t\twss,\n\t\turn,\n\t\t\"urn:uuid\": urnuuid\n\t};\n\tObject.setPrototypeOf(SCHEMES, null);\n\t/**\n\t* @param {string|undefined} scheme\n\t* @returns {SchemeHandler|undefined}\n\t*/\n\tfunction getSchemeHandler(scheme) {\n\t\treturn scheme && (SCHEMES[scheme] || SCHEMES[scheme.toLowerCase()]) || void 0;\n\t}\n\tmodule.exports = {\n\t\twsIsSecure,\n\t\tSCHEMES,\n\t\tisValidSchemeName,\n\t\tgetSchemeHandler\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js\nvar require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();\n\tconst { SCHEMES, getSchemeHandler } = require_schemes();\n\t/**\n\t* @template {import('./types/index').URIComponent|string} T\n\t* @param {T} uri\n\t* @param {import('./types/index').Options} [options]\n\t* @returns {T}\n\t*/\n\tfunction normalize(uri, options) {\n\t\tif (typeof uri === \"string\") uri = serialize(parse(uri, options), options);\n\t\telse if (typeof uri === \"object\") uri = parse(serialize(uri, options), options);\n\t\treturn uri;\n\t}\n\t/**\n\t* @param {string} baseURI\n\t* @param {string} relativeURI\n\t* @param {import('./types/index').Options} [options]\n\t* @returns {string}\n\t*/\n\tfunction resolve(baseURI, relativeURI, options) {\n\t\tconst schemelessOptions = options ? Object.assign({ scheme: \"null\" }, options) : { scheme: \"null\" };\n\t\tconst resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);\n\t\tschemelessOptions.skipEscape = true;\n\t\treturn serialize(resolved, schemelessOptions);\n\t}\n\t/**\n\t* @param {import ('./types/index').URIComponent} base\n\t* @param {import ('./types/index').URIComponent} relative\n\t* @param {import('./types/index').Options} [options]\n\t* @param {boolean} [skipNormalization=false]\n\t* @returns {import ('./types/index').URIComponent}\n\t*/\n\tfunction resolveComponent(base, relative, options, skipNormalization) {\n\t\t/** @type {import('./types/index').URIComponent} */\n\t\tconst target = {};\n\t\tif (!skipNormalization) {\n\t\t\tbase = parse(serialize(base, options), options);\n\t\t\trelative = parse(serialize(relative, options), options);\n\t\t}\n\t\toptions = options || {};\n\t\tif (!options.tolerant && relative.scheme) {\n\t\t\ttarget.scheme = relative.scheme;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {\n\t\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\t\ttarget.host = relative.host;\n\t\t\t\ttarget.port = relative.port;\n\t\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\t\ttarget.query = relative.query;\n\t\t\t} else {\n\t\t\t\tif (!relative.path) {\n\t\t\t\t\ttarget.path = base.path;\n\t\t\t\t\tif (relative.query !== void 0) target.query = relative.query;\n\t\t\t\t\telse target.query = base.query;\n\t\t\t\t} else {\n\t\t\t\t\tif (relative.path[0] === \"/\") target.path = removeDotSegments(relative.path);\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = \"/\" + relative.path;\n\t\t\t\t\t\telse if (!base.path) target.path = relative.path;\n\t\t\t\t\t\telse target.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t\t}\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t}\n\t\t\t\ttarget.userinfo = base.userinfo;\n\t\t\t\ttarget.host = base.host;\n\t\t\t\ttarget.port = base.port;\n\t\t\t}\n\t\t\ttarget.scheme = base.scheme;\n\t\t}\n\t\ttarget.fragment = relative.fragment;\n\t\treturn target;\n\t}\n\t/**\n\t* @param {import ('./types/index').URIComponent|string} uriA\n\t* @param {import ('./types/index').URIComponent|string} uriB\n\t* @param {import ('./types/index').Options} options\n\t* @returns {boolean}\n\t*/\n\tfunction equal(uriA, uriB, options) {\n\t\tif (typeof uriA === \"string\") {\n\t\t\turiA = unescape(uriA);\n\t\t\turiA = serialize(normalizeComponentEncoding(parse(uriA, options), true), {\n\t\t\t\t...options,\n\t\t\t\tskipEscape: true\n\t\t\t});\n\t\t} else if (typeof uriA === \"object\") uriA = serialize(normalizeComponentEncoding(uriA, true), {\n\t\t\t...options,\n\t\t\tskipEscape: true\n\t\t});\n\t\tif (typeof uriB === \"string\") {\n\t\t\turiB = unescape(uriB);\n\t\t\turiB = serialize(normalizeComponentEncoding(parse(uriB, options), true), {\n\t\t\t\t...options,\n\t\t\t\tskipEscape: true\n\t\t\t});\n\t\t} else if (typeof uriB === \"object\") uriB = serialize(normalizeComponentEncoding(uriB, true), {\n\t\t\t...options,\n\t\t\tskipEscape: true\n\t\t});\n\t\treturn uriA.toLowerCase() === uriB.toLowerCase();\n\t}\n\t/**\n\t* @param {Readonly<import('./types/index').URIComponent>} cmpts\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns {string}\n\t*/\n\tfunction serialize(cmpts, opts) {\n\t\tconst component = {\n\t\t\thost: cmpts.host,\n\t\t\tscheme: cmpts.scheme,\n\t\t\tuserinfo: cmpts.userinfo,\n\t\t\tport: cmpts.port,\n\t\t\tpath: cmpts.path,\n\t\t\tquery: cmpts.query,\n\t\t\tnid: cmpts.nid,\n\t\t\tnss: cmpts.nss,\n\t\t\tuuid: cmpts.uuid,\n\t\t\tfragment: cmpts.fragment,\n\t\t\treference: cmpts.reference,\n\t\t\tresourceName: cmpts.resourceName,\n\t\t\tsecure: cmpts.secure,\n\t\t\terror: \"\"\n\t\t};\n\t\tconst options = Object.assign({}, opts);\n\t\tconst uriTokens = [];\n\t\tconst schemeHandler = getSchemeHandler(options.scheme || component.scheme);\n\t\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);\n\t\tif (component.path !== void 0) if (!options.skipEscape) {\n\t\t\tcomponent.path = escape(component.path);\n\t\t\tif (component.scheme !== void 0) component.path = component.path.split(\"%3A\").join(\":\");\n\t\t} else component.path = unescape(component.path);\n\t\tif (options.reference !== \"suffix\" && component.scheme) uriTokens.push(component.scheme, \":\");\n\t\tconst authority = recomposeAuthority(component);\n\t\tif (authority !== void 0) {\n\t\t\tif (options.reference !== \"suffix\") uriTokens.push(\"//\");\n\t\t\turiTokens.push(authority);\n\t\t\tif (component.path && component.path[0] !== \"/\") uriTokens.push(\"/\");\n\t\t}\n\t\tif (component.path !== void 0) {\n\t\t\tlet s = component.path;\n\t\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s);\n\t\t\tif (authority === void 0 && s[0] === \"/\" && s[1] === \"/\") s = \"/%2F\" + s.slice(2);\n\t\t\turiTokens.push(s);\n\t\t}\n\t\tif (component.query !== void 0) uriTokens.push(\"?\", component.query);\n\t\tif (component.fragment !== void 0) uriTokens.push(\"#\", component.fragment);\n\t\treturn uriTokens.join(\"\");\n\t}\n\tconst URI_PARSE = /^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?/u;\n\t/**\n\t* @param {string} uri\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns\n\t*/\n\tfunction parse(uri, opts) {\n\t\tconst options = Object.assign({}, opts);\n\t\t/** @type {import('./types/index').URIComponent} */\n\t\tconst parsed = {\n\t\t\tscheme: void 0,\n\t\t\tuserinfo: void 0,\n\t\t\thost: \"\",\n\t\t\tport: void 0,\n\t\t\tpath: \"\",\n\t\t\tquery: void 0,\n\t\t\tfragment: void 0\n\t\t};\n\t\tlet isIP = false;\n\t\tif (options.reference === \"suffix\") if (options.scheme) uri = options.scheme + \":\" + uri;\n\t\telse uri = \"//\" + uri;\n\t\tconst matches = uri.match(URI_PARSE);\n\t\tif (matches) {\n\t\t\tparsed.scheme = matches[1];\n\t\t\tparsed.userinfo = matches[3];\n\t\t\tparsed.host = matches[4];\n\t\t\tparsed.port = parseInt(matches[5], 10);\n\t\t\tparsed.path = matches[6] || \"\";\n\t\t\tparsed.query = matches[7];\n\t\t\tparsed.fragment = matches[8];\n\t\t\tif (isNaN(parsed.port)) parsed.port = matches[5];\n\t\t\tif (parsed.host) if (isIPv4(parsed.host) === false) {\n\t\t\t\tconst ipv6result = normalizeIPv6(parsed.host);\n\t\t\t\tparsed.host = ipv6result.host.toLowerCase();\n\t\t\t\tisIP = ipv6result.isIPV6;\n\t\t\t} else isIP = true;\n\t\t\tif (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) parsed.reference = \"same-document\";\n\t\t\telse if (parsed.scheme === void 0) parsed.reference = \"relative\";\n\t\t\telse if (parsed.fragment === void 0) parsed.reference = \"absolute\";\n\t\t\telse parsed.reference = \"uri\";\n\t\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== parsed.reference) parsed.error = parsed.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t\tconst schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);\n\t\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t\tif (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) try {\n\t\t\t\t\tparsed.host = URL.domainToASCII(parsed.host.toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tparsed.error = parsed.error || \"Host's domain name can not be converted to ASCII: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {\n\t\t\t\tif (uri.indexOf(\"%\") !== -1) {\n\t\t\t\t\tif (parsed.scheme !== void 0) parsed.scheme = unescape(parsed.scheme);\n\t\t\t\t\tif (parsed.host !== void 0) parsed.host = unescape(parsed.host);\n\t\t\t\t}\n\t\t\t\tif (parsed.path) parsed.path = escape(unescape(parsed.path));\n\t\t\t\tif (parsed.fragment) parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));\n\t\t\t}\n\t\t\tif (schemeHandler && schemeHandler.parse) schemeHandler.parse(parsed, options);\n\t\t} else parsed.error = parsed.error || \"URI can not be parsed.\";\n\t\treturn parsed;\n\t}\n\tconst fastUri = {\n\t\tSCHEMES,\n\t\tnormalize,\n\t\tresolve,\n\t\tresolveComponent,\n\t\tequal,\n\t\tserialize,\n\t\tparse\n\t};\n\tmodule.exports = fastUri;\n\tmodule.exports.default = fastUri;\n\tmodule.exports.fastUri = fastUri;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js\nvar require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst uri = require_fast_uri();\n\turi.code = \"require(\\\"ajv/dist/runtime/uri\\\").default\";\n\texports.default = uri;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js\nvar require_core$3 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tconst validation_error_1 = require_validation_error();\n\tconst ref_error_1 = require_ref_error();\n\tconst rules_1 = require_rules();\n\tconst compile_1 = require_compile();\n\tconst codegen_2 = require_codegen();\n\tconst resolve_1 = require_resolve();\n\tconst dataType_1 = require_dataType();\n\tconst util_1 = require_util();\n\tconst $dataRefSchema = require_data();\n\tconst uri_1 = require_uri();\n\tconst defaultRegExp = (str, flags) => new RegExp(str, flags);\n\tdefaultRegExp.code = \"new RegExp\";\n\tconst META_IGNORE_OPTIONS = [\n\t\t\"removeAdditional\",\n\t\t\"useDefaults\",\n\t\t\"coerceTypes\"\n\t];\n\tconst EXT_SCOPE_NAMES = new Set([\n\t\t\"validate\",\n\t\t\"serialize\",\n\t\t\"parse\",\n\t\t\"wrapper\",\n\t\t\"root\",\n\t\t\"schema\",\n\t\t\"keyword\",\n\t\t\"pattern\",\n\t\t\"formats\",\n\t\t\"validate$data\",\n\t\t\"func\",\n\t\t\"obj\",\n\t\t\"Error\"\n\t]);\n\tconst removedOptions = {\n\t\terrorDataPath: \"\",\n\t\tformat: \"`validateFormats: false` can be used instead.\",\n\t\tnullable: \"\\\"nullable\\\" keyword is supported by default.\",\n\t\tjsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n\t\textendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n\t\tmissingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n\t\tprocessCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n\t\tsourceCode: \"Use option `code: {source: true}`\",\n\t\tstrictDefaults: \"It is default now, see option `strict`.\",\n\t\tstrictKeywords: \"It is default now, see option `strict`.\",\n\t\tuniqueItems: \"\\\"uniqueItems\\\" keyword is always validated.\",\n\t\tunknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n\t\tcache: \"Map is used as cache, schema object as key.\",\n\t\tserialize: \"Map is used as cache, schema object as key.\",\n\t\tajvErrors: \"It is default now.\"\n\t};\n\tconst deprecatedOptions = {\n\t\tignoreKeywordsWithRef: \"\",\n\t\tjsPropertySyntax: \"\",\n\t\tunicode: \"\\\"minLength\\\"/\\\"maxLength\\\" account for unicode characters by default.\"\n\t};\n\tconst MAX_EXPRESSION = 200;\n\tfunction requiredOptions(o) {\n\t\tvar _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;\n\t\tconst s = o.strict;\n\t\tconst _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;\n\t\tconst optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;\n\t\tconst regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;\n\t\tconst uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;\n\t\treturn {\n\t\t\tstrictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,\n\t\t\tstrictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,\n\t\t\tstrictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : \"log\",\n\t\t\tstrictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : \"log\",\n\t\t\tstrictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,\n\t\t\tcode: o.code ? {\n\t\t\t\t...o.code,\n\t\t\t\toptimize,\n\t\t\t\tregExp\n\t\t\t} : {\n\t\t\t\toptimize,\n\t\t\t\tregExp\n\t\t\t},\n\t\t\tloopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,\n\t\t\tloopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,\n\t\t\tmeta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,\n\t\t\tmessages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,\n\t\t\tinlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,\n\t\t\tschemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : \"$id\",\n\t\t\taddUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,\n\t\t\tvalidateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,\n\t\t\tvalidateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,\n\t\t\tunicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,\n\t\t\tint32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,\n\t\t\turiResolver\n\t\t};\n\t}\n\tvar Ajv = class {\n\t\tconstructor(opts = {}) {\n\t\t\tthis.schemas = {};\n\t\t\tthis.refs = {};\n\t\t\tthis.formats = {};\n\t\t\tthis._compilations = /* @__PURE__ */ new Set();\n\t\t\tthis._loading = {};\n\t\t\tthis._cache = /* @__PURE__ */ new Map();\n\t\t\topts = this.opts = {\n\t\t\t\t...opts,\n\t\t\t\t...requiredOptions(opts)\n\t\t\t};\n\t\t\tconst { es5, lines } = this.opts.code;\n\t\t\tthis.scope = new codegen_2.ValueScope({\n\t\t\t\tscope: {},\n\t\t\t\tprefixes: EXT_SCOPE_NAMES,\n\t\t\t\tes5,\n\t\t\t\tlines\n\t\t\t});\n\t\t\tthis.logger = getLogger(opts.logger);\n\t\t\tconst formatOpt = opts.validateFormats;\n\t\t\topts.validateFormats = false;\n\t\t\tthis.RULES = (0, rules_1.getRules)();\n\t\t\tcheckOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\");\n\t\t\tcheckOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\");\n\t\t\tthis._metaOpts = getMetaSchemaOptions.call(this);\n\t\t\tif (opts.formats) addInitialFormats.call(this);\n\t\t\tthis._addVocabularies();\n\t\t\tthis._addDefaultMetaSchema();\n\t\t\tif (opts.keywords) addInitialKeywords.call(this, opts.keywords);\n\t\t\tif (typeof opts.meta == \"object\") this.addMetaSchema(opts.meta);\n\t\t\taddInitialSchemas.call(this);\n\t\t\topts.validateFormats = formatOpt;\n\t\t}\n\t\t_addVocabularies() {\n\t\t\tthis.addKeyword(\"$async\");\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tconst { $data, meta, schemaId } = this.opts;\n\t\t\tlet _dataRefSchema = $dataRefSchema;\n\t\t\tif (schemaId === \"id\") {\n\t\t\t\t_dataRefSchema = { ...$dataRefSchema };\n\t\t\t\t_dataRefSchema.id = _dataRefSchema.$id;\n\t\t\t\tdelete _dataRefSchema.$id;\n\t\t\t}\n\t\t\tif (meta && $data) this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);\n\t\t}\n\t\tdefaultMeta() {\n\t\t\tconst { meta, schemaId } = this.opts;\n\t\t\treturn this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : void 0;\n\t\t}\n\t\tvalidate(schemaKeyRef, data) {\n\t\t\tlet v;\n\t\t\tif (typeof schemaKeyRef == \"string\") {\n\t\t\t\tv = this.getSchema(schemaKeyRef);\n\t\t\t\tif (!v) throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`);\n\t\t\t} else v = this.compile(schemaKeyRef);\n\t\t\tconst valid = v(data);\n\t\t\tif (!(\"$async\" in v)) this.errors = v.errors;\n\t\t\treturn valid;\n\t\t}\n\t\tcompile(schema, _meta) {\n\t\t\tconst sch = this._addSchema(schema, _meta);\n\t\t\treturn sch.validate || this._compileSchemaEnv(sch);\n\t\t}\n\t\tcompileAsync(schema, meta) {\n\t\t\tif (typeof this.opts.loadSchema != \"function\") throw new Error(\"options.loadSchema should be a function\");\n\t\t\tconst { loadSchema } = this.opts;\n\t\t\treturn runCompileAsync.call(this, schema, meta);\n\t\t\tasync function runCompileAsync(_schema, _meta) {\n\t\t\t\tawait loadMetaSchema.call(this, _schema.$schema);\n\t\t\t\tconst sch = this._addSchema(_schema, _meta);\n\t\t\t\treturn sch.validate || _compileAsync.call(this, sch);\n\t\t\t}\n\t\t\tasync function loadMetaSchema($ref) {\n\t\t\t\tif ($ref && !this.getSchema($ref)) await runCompileAsync.call(this, { $ref }, true);\n\t\t\t}\n\t\t\tasync function _compileAsync(sch) {\n\t\t\t\ttry {\n\t\t\t\t\treturn this._compileSchemaEnv(sch);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (!(e instanceof ref_error_1.default)) throw e;\n\t\t\t\t\tcheckLoaded.call(this, e);\n\t\t\t\t\tawait loadMissingSchema.call(this, e.missingSchema);\n\t\t\t\t\treturn _compileAsync.call(this, sch);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction checkLoaded({ missingSchema: ref, missingRef }) {\n\t\t\t\tif (this.refs[ref]) throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);\n\t\t\t}\n\t\t\tasync function loadMissingSchema(ref) {\n\t\t\t\tconst _schema = await _loadSchema.call(this, ref);\n\t\t\t\tif (!this.refs[ref]) await loadMetaSchema.call(this, _schema.$schema);\n\t\t\t\tif (!this.refs[ref]) this.addSchema(_schema, ref, meta);\n\t\t\t}\n\t\t\tasync function _loadSchema(ref) {\n\t\t\t\tconst p = this._loading[ref];\n\t\t\t\tif (p) return p;\n\t\t\t\ttry {\n\t\t\t\t\treturn await (this._loading[ref] = loadSchema(ref));\n\t\t\t\t} finally {\n\t\t\t\t\tdelete this._loading[ref];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\taddSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {\n\t\t\tif (Array.isArray(schema)) {\n\t\t\t\tfor (const sch of schema) this.addSchema(sch, void 0, _meta, _validateSchema);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tlet id;\n\t\t\tif (typeof schema === \"object\") {\n\t\t\t\tconst { schemaId } = this.opts;\n\t\t\t\tid = schema[schemaId];\n\t\t\t\tif (id !== void 0 && typeof id != \"string\") throw new Error(`schema ${schemaId} must be string`);\n\t\t\t}\n\t\t\tkey = (0, resolve_1.normalizeId)(key || id);\n\t\t\tthis._checkUnique(key);\n\t\t\tthis.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);\n\t\t\treturn this;\n\t\t}\n\t\taddMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {\n\t\t\tthis.addSchema(schema, key, true, _validateSchema);\n\t\t\treturn this;\n\t\t}\n\t\tvalidateSchema(schema, throwOrLogError) {\n\t\t\tif (typeof schema == \"boolean\") return true;\n\t\t\tlet $schema;\n\t\t\t$schema = schema.$schema;\n\t\t\tif ($schema !== void 0 && typeof $schema != \"string\") throw new Error(\"$schema must be a string\");\n\t\t\t$schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n\t\t\tif (!$schema) {\n\t\t\t\tthis.logger.warn(\"meta-schema not available\");\n\t\t\t\tthis.errors = null;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst valid = this.validate($schema, schema);\n\t\t\tif (!valid && throwOrLogError) {\n\t\t\t\tconst message = \"schema is invalid: \" + this.errorsText();\n\t\t\t\tif (this.opts.validateSchema === \"log\") this.logger.error(message);\n\t\t\t\telse throw new Error(message);\n\t\t\t}\n\t\t\treturn valid;\n\t\t}\n\t\tgetSchema(keyRef) {\n\t\t\tlet sch;\n\t\t\twhile (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\") keyRef = sch;\n\t\t\tif (sch === void 0) {\n\t\t\t\tconst { schemaId } = this.opts;\n\t\t\t\tconst root = new compile_1.SchemaEnv({\n\t\t\t\t\tschema: {},\n\t\t\t\t\tschemaId\n\t\t\t\t});\n\t\t\t\tsch = compile_1.resolveSchema.call(this, root, keyRef);\n\t\t\t\tif (!sch) return;\n\t\t\t\tthis.refs[keyRef] = sch;\n\t\t\t}\n\t\t\treturn sch.validate || this._compileSchemaEnv(sch);\n\t\t}\n\t\tremoveSchema(schemaKeyRef) {\n\t\t\tif (schemaKeyRef instanceof RegExp) {\n\t\t\t\tthis._removeAllSchemas(this.schemas, schemaKeyRef);\n\t\t\t\tthis._removeAllSchemas(this.refs, schemaKeyRef);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tswitch (typeof schemaKeyRef) {\n\t\t\t\tcase \"undefined\":\n\t\t\t\t\tthis._removeAllSchemas(this.schemas);\n\t\t\t\t\tthis._removeAllSchemas(this.refs);\n\t\t\t\t\tthis._cache.clear();\n\t\t\t\t\treturn this;\n\t\t\t\tcase \"string\": {\n\t\t\t\t\tconst sch = getSchEnv.call(this, schemaKeyRef);\n\t\t\t\t\tif (typeof sch == \"object\") this._cache.delete(sch.schema);\n\t\t\t\t\tdelete this.schemas[schemaKeyRef];\n\t\t\t\t\tdelete this.refs[schemaKeyRef];\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tcase \"object\": {\n\t\t\t\t\tconst cacheKey = schemaKeyRef;\n\t\t\t\t\tthis._cache.delete(cacheKey);\n\t\t\t\t\tlet id = schemaKeyRef[this.opts.schemaId];\n\t\t\t\t\tif (id) {\n\t\t\t\t\t\tid = (0, resolve_1.normalizeId)(id);\n\t\t\t\t\t\tdelete this.schemas[id];\n\t\t\t\t\t\tdelete this.refs[id];\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tdefault: throw new Error(\"ajv.removeSchema: invalid parameter\");\n\t\t\t}\n\t\t}\n\t\taddVocabulary(definitions) {\n\t\t\tfor (const def of definitions) this.addKeyword(def);\n\t\t\treturn this;\n\t\t}\n\t\taddKeyword(kwdOrDef, def) {\n\t\t\tlet keyword;\n\t\t\tif (typeof kwdOrDef == \"string\") {\n\t\t\t\tkeyword = kwdOrDef;\n\t\t\t\tif (typeof def == \"object\") {\n\t\t\t\t\tthis.logger.warn(\"these parameters are deprecated, see docs for addKeyword\");\n\t\t\t\t\tdef.keyword = keyword;\n\t\t\t\t}\n\t\t\t} else if (typeof kwdOrDef == \"object\" && def === void 0) {\n\t\t\t\tdef = kwdOrDef;\n\t\t\t\tkeyword = def.keyword;\n\t\t\t\tif (Array.isArray(keyword) && !keyword.length) throw new Error(\"addKeywords: keyword must be string or non-empty array\");\n\t\t\t} else throw new Error(\"invalid addKeywords parameters\");\n\t\t\tcheckKeyword.call(this, keyword, def);\n\t\t\tif (!def) {\n\t\t\t\t(0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tkeywordMetaschema.call(this, def);\n\t\t\tconst definition = {\n\t\t\t\t...def,\n\t\t\t\ttype: (0, dataType_1.getJSONTypes)(def.type),\n\t\t\t\tschemaType: (0, dataType_1.getJSONTypes)(def.schemaType)\n\t\t\t};\n\t\t\t(0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));\n\t\t\treturn this;\n\t\t}\n\t\tgetKeyword(keyword) {\n\t\t\tconst rule = this.RULES.all[keyword];\n\t\t\treturn typeof rule == \"object\" ? rule.definition : !!rule;\n\t\t}\n\t\tremoveKeyword(keyword) {\n\t\t\tconst { RULES } = this;\n\t\t\tdelete RULES.keywords[keyword];\n\t\t\tdelete RULES.all[keyword];\n\t\t\tfor (const group of RULES.rules) {\n\t\t\t\tconst i = group.rules.findIndex((rule) => rule.keyword === keyword);\n\t\t\t\tif (i >= 0) group.rules.splice(i, 1);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\taddFormat(name, format) {\n\t\t\tif (typeof format == \"string\") format = new RegExp(format);\n\t\t\tthis.formats[name] = format;\n\t\t\treturn this;\n\t\t}\n\t\terrorsText(errors = this.errors, { separator = \", \", dataVar = \"data\" } = {}) {\n\t\t\tif (!errors || errors.length === 0) return \"No errors\";\n\t\t\treturn errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);\n\t\t}\n\t\t$dataMetaSchema(metaSchema, keywordsJsonPointers) {\n\t\t\tconst rules = this.RULES.all;\n\t\t\tmetaSchema = JSON.parse(JSON.stringify(metaSchema));\n\t\t\tfor (const jsonPointer of keywordsJsonPointers) {\n\t\t\t\tconst segments = jsonPointer.split(\"/\").slice(1);\n\t\t\t\tlet keywords = metaSchema;\n\t\t\t\tfor (const seg of segments) keywords = keywords[seg];\n\t\t\t\tfor (const key in rules) {\n\t\t\t\t\tconst rule = rules[key];\n\t\t\t\t\tif (typeof rule != \"object\") continue;\n\t\t\t\t\tconst { $data } = rule.definition;\n\t\t\t\t\tconst schema = keywords[key];\n\t\t\t\t\tif ($data && schema) keywords[key] = schemaOrData(schema);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn metaSchema;\n\t\t}\n\t\t_removeAllSchemas(schemas, regex) {\n\t\t\tfor (const keyRef in schemas) {\n\t\t\t\tconst sch = schemas[keyRef];\n\t\t\t\tif (!regex || regex.test(keyRef)) {\n\t\t\t\t\tif (typeof sch == \"string\") delete schemas[keyRef];\n\t\t\t\t\telse if (sch && !sch.meta) {\n\t\t\t\t\t\tthis._cache.delete(sch.schema);\n\t\t\t\t\t\tdelete schemas[keyRef];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {\n\t\t\tlet id;\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tif (typeof schema == \"object\") id = schema[schemaId];\n\t\t\telse if (this.opts.jtd) throw new Error(\"schema must be object\");\n\t\t\telse if (typeof schema != \"boolean\") throw new Error(\"schema must be object or boolean\");\n\t\t\tlet sch = this._cache.get(schema);\n\t\t\tif (sch !== void 0) return sch;\n\t\t\tbaseId = (0, resolve_1.normalizeId)(id || baseId);\n\t\t\tconst localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);\n\t\t\tsch = new compile_1.SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\tmeta,\n\t\t\t\tbaseId,\n\t\t\t\tlocalRefs\n\t\t\t});\n\t\t\tthis._cache.set(sch.schema, sch);\n\t\t\tif (addSchema && !baseId.startsWith(\"#\")) {\n\t\t\t\tif (baseId) this._checkUnique(baseId);\n\t\t\t\tthis.refs[baseId] = sch;\n\t\t\t}\n\t\t\tif (validateSchema) this.validateSchema(schema, true);\n\t\t\treturn sch;\n\t\t}\n\t\t_checkUnique(id) {\n\t\t\tif (this.schemas[id] || this.refs[id]) throw new Error(`schema with key or id \"${id}\" already exists`);\n\t\t}\n\t\t_compileSchemaEnv(sch) {\n\t\t\tif (sch.meta) this._compileMetaSchema(sch);\n\t\t\telse compile_1.compileSchema.call(this, sch);\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!sch.validate) throw new Error(\"ajv implementation error\");\n\t\t\treturn sch.validate;\n\t\t}\n\t\t_compileMetaSchema(sch) {\n\t\t\tconst currentOpts = this.opts;\n\t\t\tthis.opts = this._metaOpts;\n\t\t\ttry {\n\t\t\t\tcompile_1.compileSchema.call(this, sch);\n\t\t\t} finally {\n\t\t\t\tthis.opts = currentOpts;\n\t\t\t}\n\t\t}\n\t};\n\tAjv.ValidationError = validation_error_1.default;\n\tAjv.MissingRefError = ref_error_1.default;\n\texports.default = Ajv;\n\tfunction checkOptions(checkOpts, options, msg, log = \"error\") {\n\t\tfor (const key in checkOpts) {\n\t\t\tconst opt = key;\n\t\t\tif (opt in options) this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);\n\t\t}\n\t}\n\tfunction getSchEnv(keyRef) {\n\t\tkeyRef = (0, resolve_1.normalizeId)(keyRef);\n\t\treturn this.schemas[keyRef] || this.refs[keyRef];\n\t}\n\tfunction addInitialSchemas() {\n\t\tconst optsSchemas = this.opts.schemas;\n\t\tif (!optsSchemas) return;\n\t\tif (Array.isArray(optsSchemas)) this.addSchema(optsSchemas);\n\t\telse for (const key in optsSchemas) this.addSchema(optsSchemas[key], key);\n\t}\n\tfunction addInitialFormats() {\n\t\tfor (const name in this.opts.formats) {\n\t\t\tconst format = this.opts.formats[name];\n\t\t\tif (format) this.addFormat(name, format);\n\t\t}\n\t}\n\tfunction addInitialKeywords(defs) {\n\t\tif (Array.isArray(defs)) {\n\t\t\tthis.addVocabulary(defs);\n\t\t\treturn;\n\t\t}\n\t\tthis.logger.warn(\"keywords option as map is deprecated, pass array\");\n\t\tfor (const keyword in defs) {\n\t\t\tconst def = defs[keyword];\n\t\t\tif (!def.keyword) def.keyword = keyword;\n\t\t\tthis.addKeyword(def);\n\t\t}\n\t}\n\tfunction getMetaSchemaOptions() {\n\t\tconst metaOpts = { ...this.opts };\n\t\tfor (const opt of META_IGNORE_OPTIONS) delete metaOpts[opt];\n\t\treturn metaOpts;\n\t}\n\tconst noLogs = {\n\t\tlog() {},\n\t\twarn() {},\n\t\terror() {}\n\t};\n\tfunction getLogger(logger) {\n\t\tif (logger === false) return noLogs;\n\t\tif (logger === void 0) return console;\n\t\tif (logger.log && logger.warn && logger.error) return logger;\n\t\tthrow new Error(\"logger must implement log, warn and error methods\");\n\t}\n\tconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;\n\tfunction checkKeyword(keyword, def) {\n\t\tconst { RULES } = this;\n\t\t(0, util_1.eachItem)(keyword, (kwd) => {\n\t\t\tif (RULES.keywords[kwd]) throw new Error(`Keyword ${kwd} is already defined`);\n\t\t\tif (!KEYWORD_NAME.test(kwd)) throw new Error(`Keyword ${kwd} has invalid name`);\n\t\t});\n\t\tif (!def) return;\n\t\tif (def.$data && !(\"code\" in def || \"validate\" in def)) throw new Error(\"$data keyword must have \\\"code\\\" or \\\"validate\\\" function\");\n\t}\n\tfunction addRule(keyword, definition, dataType) {\n\t\tvar _a;\n\t\tconst post = definition === null || definition === void 0 ? void 0 : definition.post;\n\t\tif (dataType && post) throw new Error(\"keyword with \\\"post\\\" flag cannot have \\\"type\\\"\");\n\t\tconst { RULES } = this;\n\t\tlet ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);\n\t\tif (!ruleGroup) {\n\t\t\truleGroup = {\n\t\t\t\ttype: dataType,\n\t\t\t\trules: []\n\t\t\t};\n\t\t\tRULES.rules.push(ruleGroup);\n\t\t}\n\t\tRULES.keywords[keyword] = true;\n\t\tif (!definition) return;\n\t\tconst rule = {\n\t\t\tkeyword,\n\t\t\tdefinition: {\n\t\t\t\t...definition,\n\t\t\t\ttype: (0, dataType_1.getJSONTypes)(definition.type),\n\t\t\t\tschemaType: (0, dataType_1.getJSONTypes)(definition.schemaType)\n\t\t\t}\n\t\t};\n\t\tif (definition.before) addBeforeRule.call(this, ruleGroup, rule, definition.before);\n\t\telse ruleGroup.rules.push(rule);\n\t\tRULES.all[keyword] = rule;\n\t\t(_a = definition.implements) === null || _a === void 0 || _a.forEach((kwd) => this.addKeyword(kwd));\n\t}\n\tfunction addBeforeRule(ruleGroup, rule, before) {\n\t\tconst i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);\n\t\tif (i >= 0) ruleGroup.rules.splice(i, 0, rule);\n\t\telse {\n\t\t\truleGroup.rules.push(rule);\n\t\t\tthis.logger.warn(`rule ${before} is not defined`);\n\t\t}\n\t}\n\tfunction keywordMetaschema(def) {\n\t\tlet { metaSchema } = def;\n\t\tif (metaSchema === void 0) return;\n\t\tif (def.$data && this.opts.$data) metaSchema = schemaOrData(metaSchema);\n\t\tdef.validateSchema = this.compile(metaSchema, true);\n\t}\n\tconst $dataRef = { $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\" };\n\tfunction schemaOrData(schema) {\n\t\treturn { anyOf: [schema, $dataRef] };\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js\nvar require_id = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst def = {\n\t\tkeyword: \"id\",\n\t\tcode() {\n\t\t\tthrow new Error(\"NOT SUPPORTED: keyword \\\"id\\\", use \\\"$id\\\" for schema ID\");\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js\nvar require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.callRef = exports.getValidate = void 0;\n\tconst ref_error_1 = require_ref_error();\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst compile_1 = require_compile();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"$ref\",\n\t\tschemaType: \"string\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema: $ref, it } = cxt;\n\t\t\tconst { baseId, schemaEnv: env, validateName, opts, self } = it;\n\t\t\tconst { root } = env;\n\t\t\tif (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId) return callRootRef();\n\t\t\tconst schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n\t\t\tif (schOrEnv === void 0) throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n\t\t\tif (schOrEnv instanceof compile_1.SchemaEnv) return callValidate(schOrEnv);\n\t\t\treturn inlineRefSchema(schOrEnv);\n\t\t\tfunction callRootRef() {\n\t\t\t\tif (env === root) return callRef(cxt, validateName, env, env.$async);\n\t\t\t\tconst rootName = gen.scopeValue(\"root\", { ref: root });\n\t\t\t\treturn callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);\n\t\t\t}\n\t\t\tfunction callValidate(sch) {\n\t\t\t\tcallRef(cxt, getValidate(cxt, sch), sch, sch.$async);\n\t\t\t}\n\t\t\tfunction inlineRefSchema(sch) {\n\t\t\t\tconst schName = gen.scopeValue(\"schema\", opts.code.source === true ? {\n\t\t\t\t\tref: sch,\n\t\t\t\t\tcode: (0, codegen_1.stringify)(sch)\n\t\t\t\t} : { ref: sch });\n\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tschema: sch,\n\t\t\t\t\tdataTypes: [],\n\t\t\t\t\tschemaPath: codegen_1.nil,\n\t\t\t\t\ttopSchemaRef: schName,\n\t\t\t\t\terrSchemaPath: $ref\n\t\t\t\t}, valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t}\n\t};\n\tfunction getValidate(cxt, sch) {\n\t\tconst { gen } = cxt;\n\t\treturn sch.validate ? gen.scopeValue(\"validate\", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n\t}\n\texports.getValidate = getValidate;\n\tfunction callRef(cxt, v, sch, $async) {\n\t\tconst { gen, it } = cxt;\n\t\tconst { allErrors, schemaEnv: env, opts } = it;\n\t\tconst passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n\t\tif ($async) callAsyncRef();\n\t\telse callSyncRef();\n\t\tfunction callAsyncRef() {\n\t\t\tif (!env.$async) throw new Error(\"async schema referenced by sync schema\");\n\t\t\tconst valid = gen.let(\"valid\");\n\t\t\tgen.try(() => {\n\t\t\t\tgen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n\t\t\t\taddEvaluatedFrom(v);\n\t\t\t\tif (!allErrors) gen.assign(valid, true);\n\t\t\t}, (e) => {\n\t\t\t\tgen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n\t\t\t\taddErrorsFrom(e);\n\t\t\t\tif (!allErrors) gen.assign(valid, false);\n\t\t\t});\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction callSyncRef() {\n\t\t\tcxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n\t\t}\n\t\tfunction addErrorsFrom(source) {\n\t\t\tconst errs = (0, codegen_1._)`${source}.errors`;\n\t\t\tgen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);\n\t\t\tgen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);\n\t\t}\n\t\tfunction addEvaluatedFrom(source) {\n\t\t\tvar _a;\n\t\t\tif (!it.opts.unevaluated) return;\n\t\t\tconst schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n\t\t\tif (it.props !== true) if (schEvaluated && !schEvaluated.dynamicProps) {\n\t\t\t\tif (schEvaluated.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n\t\t\t} else {\n\t\t\t\tconst props = gen.var(\"props\", (0, codegen_1._)`${source}.evaluated.props`);\n\t\t\t\tit.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n\t\t\t}\n\t\t\tif (it.items !== true) if (schEvaluated && !schEvaluated.dynamicItems) {\n\t\t\t\tif (schEvaluated.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n\t\t\t} else {\n\t\t\t\tconst items = gen.var(\"items\", (0, codegen_1._)`${source}.evaluated.items`);\n\t\t\t\tit.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n\t\t\t}\n\t\t}\n\t}\n\texports.callRef = callRef;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js\nvar require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst id_1 = require_id();\n\tconst ref_1 = require_ref();\n\tconst core = [\n\t\t\"$schema\",\n\t\t\"$id\",\n\t\t\"$defs\",\n\t\t\"$vocabulary\",\n\t\t{ keyword: \"$comment\" },\n\t\t\"definitions\",\n\t\tid_1.default,\n\t\tref_1.default\n\t];\n\texports.default = core;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js\nvar require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst ops = codegen_1.operators;\n\tconst KWDs = {\n\t\tmaximum: {\n\t\t\tokStr: \"<=\",\n\t\t\tok: ops.LTE,\n\t\t\tfail: ops.GT\n\t\t},\n\t\tminimum: {\n\t\t\tokStr: \">=\",\n\t\t\tok: ops.GTE,\n\t\t\tfail: ops.LT\n\t\t},\n\t\texclusiveMaximum: {\n\t\t\tokStr: \"<\",\n\t\t\tok: ops.LT,\n\t\t\tfail: ops.GTE\n\t\t},\n\t\texclusiveMinimum: {\n\t\t\tokStr: \">\",\n\t\t\tok: ops.GT,\n\t\t\tfail: ops.LTE\n\t\t}\n\t};\n\tconst def = {\n\t\tkeyword: Object.keys(KWDs),\n\t\ttype: \"number\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,\n\t\t\tparams: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tcxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js\nvar require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: \"multipleOf\",\n\t\ttype: \"number\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, schemaCode, it } = cxt;\n\t\t\tconst prec = it.opts.multipleOfPrecision;\n\t\t\tconst res = gen.let(\"res\");\n\t\t\tconst invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;\n\t\t\tcxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js\nvar require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tfunction ucs2length(str) {\n\t\tconst len = str.length;\n\t\tlet length = 0;\n\t\tlet pos = 0;\n\t\tlet value;\n\t\twhile (pos < len) {\n\t\t\tlength++;\n\t\t\tvalue = str.charCodeAt(pos++);\n\t\t\tif (value >= 55296 && value <= 56319 && pos < len) {\n\t\t\t\tvalue = str.charCodeAt(pos);\n\t\t\t\tif ((value & 64512) === 56320) pos++;\n\t\t\t}\n\t\t}\n\t\treturn length;\n\t}\n\texports.default = ucs2length;\n\tucs2length.code = \"require(\\\"ajv/dist/runtime/ucs2length\\\").default\";\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js\nvar require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst ucs2length_1 = require_ucs2length();\n\tconst def = {\n\t\tkeyword: [\"maxLength\", \"minLength\"],\n\t\ttype: \"string\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxLength\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode, it } = cxt;\n\t\t\tconst op = keyword === \"maxLength\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tconst len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;\n\t\t\tcxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js\nvar require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst util_1 = require_util();\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: \"pattern\",\n\t\ttype: \"string\",\n\t\tschemaType: \"string\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must match pattern \"${schemaCode}\"`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tconst u = it.opts.unicodeRegExp ? \"u\" : \"\";\n\t\t\tif ($data) {\n\t\t\t\tconst { regExp } = it.opts.code;\n\t\t\t\tconst regExpCode = regExp.code === \"new RegExp\" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);\n\t\t\t\tconst valid = gen.let(\"valid\");\n\t\t\t\tgen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));\n\t\t\t\tcxt.fail$data((0, codegen_1._)`!${valid}`);\n\t\t\t} else {\n\t\t\t\tconst regExp = (0, code_1.usePattern)(cxt, schema);\n\t\t\t\tcxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js\nvar require_limitProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: [\"maxProperties\", \"minProperties\"],\n\t\ttype: \"object\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tconst op = keyword === \"maxProperties\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tcxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js\nvar require_required = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"required\",\n\t\ttype: \"object\",\n\t\tschemaType: \"array\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,\n\t\t\tparams: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, schemaCode, data, $data, it } = cxt;\n\t\t\tconst { opts } = it;\n\t\t\tif (!$data && schema.length === 0) return;\n\t\t\tconst useLoop = schema.length >= opts.loopRequired;\n\t\t\tif (it.allErrors) allErrorsMode();\n\t\t\telse exitOnErrorMode();\n\t\t\tif (opts.strictRequired) {\n\t\t\t\tconst props = cxt.parentSchema.properties;\n\t\t\t\tconst { definedProperties } = cxt.it;\n\t\t\t\tfor (const requiredKey of schema) if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {\n\t\t\t\t\tconst msg = `required property \"${requiredKey}\" is not defined at \"${it.schemaEnv.baseId + it.errSchemaPath}\" (strictRequired)`;\n\t\t\t\t\t(0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction allErrorsMode() {\n\t\t\t\tif (useLoop || $data) cxt.block$data(codegen_1.nil, loopAllRequired);\n\t\t\t\telse for (const prop of schema) (0, code_1.checkReportMissingProp)(cxt, prop);\n\t\t\t}\n\t\t\tfunction exitOnErrorMode() {\n\t\t\t\tconst missing = gen.let(\"missing\");\n\t\t\t\tif (useLoop || $data) {\n\t\t\t\t\tconst valid = gen.let(\"valid\", true);\n\t\t\t\t\tcxt.block$data(valid, () => loopUntilMissing(missing, valid));\n\t\t\t\t\tcxt.ok(valid);\n\t\t\t\t} else {\n\t\t\t\t\tgen.if((0, code_1.checkMissingProp)(cxt, schema, missing));\n\t\t\t\t\t(0, code_1.reportMissingProp)(cxt, missing);\n\t\t\t\t\tgen.else();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction loopAllRequired() {\n\t\t\t\tgen.forOf(\"prop\", schemaCode, (prop) => {\n\t\t\t\t\tcxt.setParams({ missingProperty: prop });\n\t\t\t\t\tgen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction loopUntilMissing(missing, valid) {\n\t\t\t\tcxt.setParams({ missingProperty: missing });\n\t\t\t\tgen.forOf(missing, schemaCode, () => {\n\t\t\t\t\tgen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));\n\t\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\t\tcxt.error();\n\t\t\t\t\t\tgen.break();\n\t\t\t\t\t});\n\t\t\t\t}, codegen_1.nil);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js\nvar require_limitItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: [\"maxItems\", \"minItems\"],\n\t\ttype: \"array\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxItems\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tconst op = keyword === \"maxItems\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tcxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js\nvar require_equal = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst equal = require_fast_deep_equal();\n\tequal.code = \"require(\\\"ajv/dist/runtime/equal\\\").default\";\n\texports.default = equal;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js\nvar require_uniqueItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dataType_1 = require_dataType();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\tconst def = {\n\t\tkeyword: \"uniqueItems\",\n\t\ttype: \"array\",\n\t\tschemaType: \"boolean\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n\t\t\tparams: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;\n\t\t\tif (!$data && !schema) return;\n\t\t\tconst valid = gen.let(\"valid\");\n\t\t\tconst itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];\n\t\t\tcxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);\n\t\t\tcxt.ok(valid);\n\t\t\tfunction validateUniqueItems() {\n\t\t\t\tconst i = gen.let(\"i\", (0, codegen_1._)`${data}.length`);\n\t\t\t\tconst j = gen.let(\"j\");\n\t\t\t\tcxt.setParams({\n\t\t\t\t\ti,\n\t\t\t\t\tj\n\t\t\t\t});\n\t\t\t\tgen.assign(valid, true);\n\t\t\t\tgen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));\n\t\t\t}\n\t\t\tfunction canOptimize() {\n\t\t\t\treturn itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\");\n\t\t\t}\n\t\t\tfunction loopN(i, j) {\n\t\t\t\tconst item = gen.name(\"item\");\n\t\t\t\tconst wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);\n\t\t\t\tconst indices = gen.const(\"indices\", (0, codegen_1._)`{}`);\n\t\t\t\tgen.for((0, codegen_1._)`;${i}--;`, () => {\n\t\t\t\t\tgen.let(item, (0, codegen_1._)`${data}[${i}]`);\n\t\t\t\t\tgen.if(wrongType, (0, codegen_1._)`continue`);\n\t\t\t\t\tif (itemTypes.length > 1) gen.if((0, codegen_1._)`typeof ${item} == \"string\"`, (0, codegen_1._)`${item} += \"_\"`);\n\t\t\t\t\tgen.if((0, codegen_1._)`typeof ${indices}[${item}] == \"number\"`, () => {\n\t\t\t\t\t\tgen.assign(j, (0, codegen_1._)`${indices}[${item}]`);\n\t\t\t\t\t\tcxt.error();\n\t\t\t\t\t\tgen.assign(valid, false).break();\n\t\t\t\t\t}).code((0, codegen_1._)`${indices}[${item}] = ${i}`);\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction loopN2(i, j) {\n\t\t\t\tconst eql = (0, util_1.useFunc)(gen, equal_1.default);\n\t\t\t\tconst outer = gen.name(\"outer\");\n\t\t\t\tgen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => {\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tgen.assign(valid, false).break(outer);\n\t\t\t\t})));\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js\nvar require_const = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\tconst def = {\n\t\tkeyword: \"const\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: \"must be equal to constant\",\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schemaCode, schema } = cxt;\n\t\t\tif ($data || schema && typeof schema == \"object\") cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);\n\t\t\telse cxt.fail((0, codegen_1._)`${schema} !== ${data}`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js\nvar require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\tconst def = {\n\t\tkeyword: \"enum\",\n\t\tschemaType: \"array\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: \"must be equal to one of the allowed values\",\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tif (!$data && schema.length === 0) throw new Error(\"enum must have non-empty array\");\n\t\t\tconst useLoop = schema.length >= it.opts.loopEnum;\n\t\t\tlet eql;\n\t\t\tconst getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);\n\t\t\tlet valid;\n\t\t\tif (useLoop || $data) {\n\t\t\t\tvalid = gen.let(\"valid\");\n\t\t\t\tcxt.block$data(valid, loopEnum);\n\t\t\t} else {\n\t\t\t\t/* istanbul ignore if */\n\t\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\t\tconst vSchema = gen.const(\"vSchema\", schemaCode);\n\t\t\t\tvalid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));\n\t\t\t}\n\t\t\tcxt.pass(valid);\n\t\t\tfunction loopEnum() {\n\t\t\t\tgen.assign(valid, false);\n\t\t\t\tgen.forOf(\"v\", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));\n\t\t\t}\n\t\t\tfunction equalCode(vSchema, i) {\n\t\t\t\tconst sch = schema[i];\n\t\t\t\treturn typeof sch === \"object\" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js\nvar require_validation$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst limitNumber_1 = require_limitNumber();\n\tconst multipleOf_1 = require_multipleOf();\n\tconst limitLength_1 = require_limitLength();\n\tconst pattern_1 = require_pattern();\n\tconst limitProperties_1 = require_limitProperties();\n\tconst required_1 = require_required();\n\tconst limitItems_1 = require_limitItems();\n\tconst uniqueItems_1 = require_uniqueItems();\n\tconst const_1 = require_const();\n\tconst enum_1 = require_enum();\n\tconst validation = [\n\t\tlimitNumber_1.default,\n\t\tmultipleOf_1.default,\n\t\tlimitLength_1.default,\n\t\tpattern_1.default,\n\t\tlimitProperties_1.default,\n\t\trequired_1.default,\n\t\tlimitItems_1.default,\n\t\tuniqueItems_1.default,\n\t\t{\n\t\t\tkeyword: \"type\",\n\t\t\tschemaType: [\"string\", \"array\"]\n\t\t},\n\t\t{\n\t\t\tkeyword: \"nullable\",\n\t\t\tschemaType: \"boolean\"\n\t\t},\n\t\tconst_1.default,\n\t\tenum_1.default\n\t];\n\texports.default = validation;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js\nvar require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateAdditionalItems = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"additionalItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\tbefore: \"uniqueItems\",\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { parentSchema, it } = cxt;\n\t\t\tconst { items } = parentSchema;\n\t\t\tif (!Array.isArray(items)) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, \"\\\"additionalItems\\\" is ignored when \\\"items\\\" is not an array of schemas\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvalidateAdditionalItems(cxt, items);\n\t\t}\n\t};\n\tfunction validateAdditionalItems(cxt, items) {\n\t\tconst { gen, schema, data, keyword, it } = cxt;\n\t\tit.items = true;\n\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\tif (schema === false) {\n\t\t\tcxt.setParams({ len: items.length });\n\t\t\tcxt.pass((0, codegen_1._)`${len} <= ${items.length}`);\n\t\t} else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\tconst valid = gen.var(\"valid\", (0, codegen_1._)`${len} <= ${items.length}`);\n\t\t\tgen.if((0, codegen_1.not)(valid), () => validateItems(valid));\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction validateItems(valid) {\n\t\t\tgen.forRange(\"i\", items.length, len, (i) => {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tdataProp: i,\n\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t}, valid);\n\t\t\t\tif (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t});\n\t\t}\n\t}\n\texports.validateAdditionalItems = validateAdditionalItems;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js\nvar require_items = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateTuple = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\tconst def = {\n\t\tkeyword: \"items\",\n\t\ttype: \"array\",\n\t\tschemaType: [\n\t\t\t\"object\",\n\t\t\t\"array\",\n\t\t\t\"boolean\"\n\t\t],\n\t\tbefore: \"uniqueItems\",\n\t\tcode(cxt) {\n\t\t\tconst { schema, it } = cxt;\n\t\t\tif (Array.isArray(schema)) return validateTuple(cxt, \"additionalItems\", schema);\n\t\t\tit.items = true;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tcxt.ok((0, code_1.validateArray)(cxt));\n\t\t}\n\t};\n\tfunction validateTuple(cxt, extraItems, schArr = cxt.schema) {\n\t\tconst { gen, parentSchema, data, keyword, it } = cxt;\n\t\tcheckStrictTuple(parentSchema);\n\t\tif (it.opts.unevaluated && schArr.length && it.items !== true) it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);\n\t\tconst valid = gen.name(\"valid\");\n\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\tschArr.forEach((sch, i) => {\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) return;\n\t\t\tgen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({\n\t\t\t\tkeyword,\n\t\t\t\tschemaProp: i,\n\t\t\t\tdataProp: i\n\t\t\t}, valid));\n\t\t\tcxt.ok(valid);\n\t\t});\n\t\tfunction checkStrictTuple(sch) {\n\t\t\tconst { opts, errSchemaPath } = it;\n\t\t\tconst l = schArr.length;\n\t\t\tconst fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);\n\t\t\tif (opts.strictTuples && !fullTuple) {\n\t\t\t\tconst msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`;\n\t\t\t\t(0, util_1.checkStrictMode)(it, msg, opts.strictTuples);\n\t\t\t}\n\t\t}\n\t}\n\texports.validateTuple = validateTuple;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js\nvar require_prefixItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst items_1 = require_items();\n\tconst def = {\n\t\tkeyword: \"prefixItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"array\"],\n\t\tbefore: \"uniqueItems\",\n\t\tcode: (cxt) => (0, items_1.validateTuple)(cxt, \"items\")\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js\nvar require_items2020 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\tconst additionalItems_1 = require_additionalItems();\n\tconst def = {\n\t\tkeyword: \"items\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tbefore: \"uniqueItems\",\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { schema, parentSchema, it } = cxt;\n\t\t\tconst { prefixItems } = parentSchema;\n\t\t\tit.items = true;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tif (prefixItems) (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);\n\t\t\telse cxt.ok((0, code_1.validateArray)(cxt));\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js\nvar require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"contains\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tbefore: \"uniqueItems\",\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,\n\t\t\tparams: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, it } = cxt;\n\t\t\tlet min;\n\t\t\tlet max;\n\t\t\tconst { minContains, maxContains } = parentSchema;\n\t\t\tif (it.opts.next) {\n\t\t\t\tmin = minContains === void 0 ? 1 : minContains;\n\t\t\t\tmax = maxContains;\n\t\t\t} else min = 1;\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tcxt.setParams({\n\t\t\t\tmin,\n\t\t\t\tmax\n\t\t\t});\n\t\t\tif (max === void 0 && min === 0) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (max !== void 0 && min > max) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, `\"minContains\" > \"maxContains\" is always invalid`);\n\t\t\t\tcxt.fail();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tlet cond = (0, codegen_1._)`${len} >= ${min}`;\n\t\t\t\tif (max !== void 0) cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;\n\t\t\t\tcxt.pass(cond);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tit.items = true;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tif (max === void 0 && min === 1) validateItems(valid, () => gen.if(valid, () => gen.break()));\n\t\t\telse if (min === 0) {\n\t\t\t\tgen.let(valid, true);\n\t\t\t\tif (max !== void 0) gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);\n\t\t\t} else {\n\t\t\t\tgen.let(valid, false);\n\t\t\t\tvalidateItemsWithCount();\n\t\t\t}\n\t\t\tcxt.result(valid, () => cxt.reset());\n\t\t\tfunction validateItemsWithCount() {\n\t\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\t\tconst count = gen.let(\"count\", 0);\n\t\t\t\tvalidateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));\n\t\t\t}\n\t\t\tfunction validateItems(_valid, block) {\n\t\t\t\tgen.forRange(\"i\", 0, len, (i) => {\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"contains\",\n\t\t\t\t\t\tdataProp: i,\n\t\t\t\t\t\tdataPropType: util_1.Type.Num,\n\t\t\t\t\t\tcompositeRule: true\n\t\t\t\t\t}, _valid);\n\t\t\t\t\tblock();\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction checkLimits(count) {\n\t\t\t\tgen.code((0, codegen_1._)`${count}++`);\n\t\t\t\tif (max === void 0) gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());\n\t\t\t\telse {\n\t\t\t\t\tgen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());\n\t\t\t\t\tif (min === 1) gen.assign(valid, true);\n\t\t\t\t\telse gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js\nvar require_dependencies = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\texports.error = {\n\t\tmessage: ({ params: { property, depsCount, deps } }) => {\n\t\t\tconst property_ies = depsCount === 1 ? \"property\" : \"properties\";\n\t\t\treturn (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;\n\t\t},\n\t\tparams: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},\n    missingProperty: ${missingProperty},\n    depsCount: ${depsCount},\n    deps: ${deps}}`\n\t};\n\tconst def = {\n\t\tkeyword: \"dependencies\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: exports.error,\n\t\tcode(cxt) {\n\t\t\tconst [propDeps, schDeps] = splitDependencies(cxt);\n\t\t\tvalidatePropertyDeps(cxt, propDeps);\n\t\t\tvalidateSchemaDeps(cxt, schDeps);\n\t\t}\n\t};\n\tfunction splitDependencies({ schema }) {\n\t\tconst propertyDeps = {};\n\t\tconst schemaDeps = {};\n\t\tfor (const key in schema) {\n\t\t\tif (key === \"__proto__\") continue;\n\t\t\tconst deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;\n\t\t\tdeps[key] = schema[key];\n\t\t}\n\t\treturn [propertyDeps, schemaDeps];\n\t}\n\tfunction validatePropertyDeps(cxt, propertyDeps = cxt.schema) {\n\t\tconst { gen, data, it } = cxt;\n\t\tif (Object.keys(propertyDeps).length === 0) return;\n\t\tconst missing = gen.let(\"missing\");\n\t\tfor (const prop in propertyDeps) {\n\t\t\tconst deps = propertyDeps[prop];\n\t\t\tif (deps.length === 0) continue;\n\t\t\tconst hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);\n\t\t\tcxt.setParams({\n\t\t\t\tproperty: prop,\n\t\t\t\tdepsCount: deps.length,\n\t\t\t\tdeps: deps.join(\", \")\n\t\t\t});\n\t\t\tif (it.allErrors) gen.if(hasProperty, () => {\n\t\t\t\tfor (const depProp of deps) (0, code_1.checkReportMissingProp)(cxt, depProp);\n\t\t\t});\n\t\t\telse {\n\t\t\t\tgen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);\n\t\t\t\t(0, code_1.reportMissingProp)(cxt, missing);\n\t\t\t\tgen.else();\n\t\t\t}\n\t\t}\n\t}\n\texports.validatePropertyDeps = validatePropertyDeps;\n\tfunction validateSchemaDeps(cxt, schemaDeps = cxt.schema) {\n\t\tconst { gen, data, keyword, it } = cxt;\n\t\tconst valid = gen.name(\"valid\");\n\t\tfor (const prop in schemaDeps) {\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) continue;\n\t\t\tgen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => {\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tschemaProp: prop\n\t\t\t\t}, valid);\n\t\t\t\tcxt.mergeValidEvaluated(schCxt, valid);\n\t\t\t}, () => gen.var(valid, true));\n\t\t\tcxt.ok(valid);\n\t\t}\n\t}\n\texports.validateSchemaDeps = validateSchemaDeps;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js\nvar require_propertyNames = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"propertyNames\",\n\t\ttype: \"object\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\terror: {\n\t\t\tmessage: \"property name must be valid\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, it } = cxt;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\tcxt.setParams({ propertyName: key });\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword: \"propertyNames\",\n\t\t\t\t\tdata: key,\n\t\t\t\t\tdataTypes: [\"string\"],\n\t\t\t\t\tpropertyName: key,\n\t\t\t\t\tcompositeRule: true\n\t\t\t\t}, valid);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\tcxt.error(true);\n\t\t\t\t\tif (!it.allErrors) gen.break();\n\t\t\t\t});\n\t\t\t});\n\t\t\tcxt.ok(valid);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js\nvar require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"additionalProperties\",\n\t\ttype: [\"object\"],\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\tallowUndefined: true,\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must NOT have additional properties\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, errsCount, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!errsCount) throw new Error(\"ajv implementation error\");\n\t\t\tconst { allErrors, opts } = it;\n\t\t\tit.props = true;\n\t\t\tif (opts.removeAdditional !== \"all\" && (0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tconst props = (0, code_1.allSchemaProperties)(parentSchema.properties);\n\t\t\tconst patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);\n\t\t\tcheckAdditionalProperties();\n\t\t\tcxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t\t\tfunction checkAdditionalProperties() {\n\t\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\t\tif (!props.length && !patProps.length) additionalPropertyCode(key);\n\t\t\t\t\telse gen.if(isAdditional(key), () => additionalPropertyCode(key));\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction isAdditional(key) {\n\t\t\t\tlet definedProp;\n\t\t\t\tif (props.length > 8) {\n\t\t\t\t\tconst propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, \"properties\");\n\t\t\t\t\tdefinedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);\n\t\t\t\t} else if (props.length) definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));\n\t\t\t\telse definedProp = codegen_1.nil;\n\t\t\t\tif (patProps.length) definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));\n\t\t\t\treturn (0, codegen_1.not)(definedProp);\n\t\t\t}\n\t\t\tfunction deleteAdditional(key) {\n\t\t\t\tgen.code((0, codegen_1._)`delete ${data}[${key}]`);\n\t\t\t}\n\t\t\tfunction additionalPropertyCode(key) {\n\t\t\t\tif (opts.removeAdditional === \"all\" || opts.removeAdditional && schema === false) {\n\t\t\t\t\tdeleteAdditional(key);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (schema === false) {\n\t\t\t\t\tcxt.setParams({ additionalProperty: key });\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tif (!allErrors) gen.break();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\t\tif (opts.removeAdditional === \"failing\") {\n\t\t\t\t\t\tapplyAdditionalSchema(key, valid, false);\n\t\t\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\t\t\tcxt.reset();\n\t\t\t\t\t\t\tdeleteAdditional(key);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyAdditionalSchema(key, valid);\n\t\t\t\t\t\tif (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction applyAdditionalSchema(key, valid, errors) {\n\t\t\t\tconst subschema = {\n\t\t\t\t\tkeyword: \"additionalProperties\",\n\t\t\t\t\tdataProp: key,\n\t\t\t\t\tdataPropType: util_1.Type.Str\n\t\t\t\t};\n\t\t\t\tif (errors === false) Object.assign(subschema, {\n\t\t\t\t\tcompositeRule: true,\n\t\t\t\t\tcreateErrors: false,\n\t\t\t\t\tallErrors: false\n\t\t\t\t});\n\t\t\t\tcxt.subschema(subschema, valid);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js\nvar require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst validate_1 = require_validate();\n\tconst code_1 = require_code();\n\tconst util_1 = require_util();\n\tconst additionalProperties_1 = require_additionalProperties();\n\tconst def = {\n\t\tkeyword: \"properties\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, it } = cxt;\n\t\t\tif (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === void 0) additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, \"additionalProperties\"));\n\t\t\tconst allProps = (0, code_1.allSchemaProperties)(schema);\n\t\t\tfor (const prop of allProps) it.definedProperties.add(prop);\n\t\t\tif (it.opts.unevaluated && allProps.length && it.props !== true) it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);\n\t\t\tconst properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));\n\t\t\tif (properties.length === 0) return;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tfor (const prop of properties) {\n\t\t\t\tif (hasDefault(prop)) applyPropertySchema(prop);\n\t\t\t\telse {\n\t\t\t\t\tgen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));\n\t\t\t\t\tapplyPropertySchema(prop);\n\t\t\t\t\tif (!it.allErrors) gen.else().var(valid, true);\n\t\t\t\t\tgen.endIf();\n\t\t\t\t}\n\t\t\t\tcxt.it.definedProperties.add(prop);\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t\tfunction hasDefault(prop) {\n\t\t\t\treturn it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;\n\t\t\t}\n\t\t\tfunction applyPropertySchema(prop) {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword: \"properties\",\n\t\t\t\t\tschemaProp: prop,\n\t\t\t\t\tdataProp: prop\n\t\t\t\t}, valid);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js\nvar require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst util_2 = require_util();\n\tconst def = {\n\t\tkeyword: \"patternProperties\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, parentSchema, it } = cxt;\n\t\t\tconst { opts } = it;\n\t\t\tconst patterns = (0, code_1.allSchemaProperties)(schema);\n\t\t\tconst alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));\n\t\t\tif (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) return;\n\t\t\tconst checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tif (it.props !== true && !(it.props instanceof codegen_1.Name)) it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);\n\t\t\tconst { props } = it;\n\t\t\tvalidatePatternProperties();\n\t\t\tfunction validatePatternProperties() {\n\t\t\t\tfor (const pat of patterns) {\n\t\t\t\t\tif (checkProperties) checkMatchingProperties(pat);\n\t\t\t\t\tif (it.allErrors) validateProperties(pat);\n\t\t\t\t\telse {\n\t\t\t\t\t\tgen.var(valid, true);\n\t\t\t\t\t\tvalidateProperties(pat);\n\t\t\t\t\t\tgen.if(valid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction checkMatchingProperties(pat) {\n\t\t\t\tfor (const prop in checkProperties) if (new RegExp(pat).test(prop)) (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);\n\t\t\t}\n\t\t\tfunction validateProperties(pat) {\n\t\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\t\tgen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {\n\t\t\t\t\t\tconst alwaysValid = alwaysValidPatterns.includes(pat);\n\t\t\t\t\t\tif (!alwaysValid) cxt.subschema({\n\t\t\t\t\t\t\tkeyword: \"patternProperties\",\n\t\t\t\t\t\t\tschemaProp: pat,\n\t\t\t\t\t\t\tdataProp: key,\n\t\t\t\t\t\t\tdataPropType: util_2.Type.Str\n\t\t\t\t\t\t}, valid);\n\t\t\t\t\t\tif (it.opts.unevaluated && props !== true) gen.assign((0, codegen_1._)`${props}[${key}]`, true);\n\t\t\t\t\t\telse if (!alwaysValid && !it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js\nvar require_not = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"not\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\ttrackErrors: true,\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, it } = cxt;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tcxt.fail();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tcxt.subschema({\n\t\t\t\tkeyword: \"not\",\n\t\t\t\tcompositeRule: true,\n\t\t\t\tcreateErrors: false,\n\t\t\t\tallErrors: false\n\t\t\t}, valid);\n\t\t\tcxt.failResult(valid, () => cxt.reset(), () => cxt.error());\n\t\t},\n\t\terror: { message: \"must NOT be valid\" }\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js\nvar require_anyOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst def = {\n\t\tkeyword: \"anyOf\",\n\t\tschemaType: \"array\",\n\t\ttrackErrors: true,\n\t\tcode: require_code().validateUnion,\n\t\terror: { message: \"must match a schema in anyOf\" }\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js\nvar require_oneOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"oneOf\",\n\t\tschemaType: \"array\",\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must match exactly one schema in oneOf\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\tif (it.opts.discriminator && parentSchema.discriminator) return;\n\t\t\tconst schArr = schema;\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\tconst passing = gen.let(\"passing\", null);\n\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\tcxt.setParams({ passing });\n\t\t\tgen.block(validateOneOf);\n\t\t\tcxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n\t\t\tfunction validateOneOf() {\n\t\t\t\tschArr.forEach((sch, i) => {\n\t\t\t\t\tlet schCxt;\n\t\t\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) gen.var(schValid, true);\n\t\t\t\t\telse schCxt = cxt.subschema({\n\t\t\t\t\t\tkeyword: \"oneOf\",\n\t\t\t\t\t\tschemaProp: i,\n\t\t\t\t\t\tcompositeRule: true\n\t\t\t\t\t}, schValid);\n\t\t\t\t\tif (i > 0) gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();\n\t\t\t\t\tgen.if(schValid, () => {\n\t\t\t\t\t\tgen.assign(valid, true);\n\t\t\t\t\t\tgen.assign(passing, i);\n\t\t\t\t\t\tif (schCxt) cxt.mergeEvaluated(schCxt, codegen_1.Name);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js\nvar require_allOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"allOf\",\n\t\tschemaType: \"array\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tschema.forEach((sch, i) => {\n\t\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) return;\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"allOf\",\n\t\t\t\t\tschemaProp: i\n\t\t\t\t}, valid);\n\t\t\t\tcxt.ok(valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t});\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js\nvar require_if = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"if\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: ({ params }) => (0, codegen_1.str)`must match \"${params.ifClause}\" schema`,\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, parentSchema, it } = cxt;\n\t\t\tif (parentSchema.then === void 0 && parentSchema.else === void 0) (0, util_1.checkStrictMode)(it, \"\\\"if\\\" without \\\"then\\\" and \\\"else\\\" is ignored\");\n\t\t\tconst hasThen = hasSchema(it, \"then\");\n\t\t\tconst hasElse = hasSchema(it, \"else\");\n\t\t\tif (!hasThen && !hasElse) return;\n\t\t\tconst valid = gen.let(\"valid\", true);\n\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\tvalidateIf();\n\t\t\tcxt.reset();\n\t\t\tif (hasThen && hasElse) {\n\t\t\t\tconst ifClause = gen.let(\"ifClause\");\n\t\t\t\tcxt.setParams({ ifClause });\n\t\t\t\tgen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause));\n\t\t\t} else if (hasThen) gen.if(schValid, validateClause(\"then\"));\n\t\t\telse gen.if((0, codegen_1.not)(schValid), validateClause(\"else\"));\n\t\t\tcxt.pass(valid, () => cxt.error(true));\n\t\t\tfunction validateIf() {\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"if\",\n\t\t\t\t\tcompositeRule: true,\n\t\t\t\t\tcreateErrors: false,\n\t\t\t\t\tallErrors: false\n\t\t\t\t}, schValid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t}\n\t\t\tfunction validateClause(keyword, ifClause) {\n\t\t\t\treturn () => {\n\t\t\t\t\tconst schCxt = cxt.subschema({ keyword }, schValid);\n\t\t\t\t\tgen.assign(valid, schValid);\n\t\t\t\t\tcxt.mergeValidEvaluated(schCxt, valid);\n\t\t\t\t\tif (ifClause) gen.assign(ifClause, (0, codegen_1._)`${keyword}`);\n\t\t\t\t\telse cxt.setParams({ ifClause: keyword });\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t};\n\tfunction hasSchema(it, keyword) {\n\t\tconst schema = it.schema[keyword];\n\t\treturn schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);\n\t}\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js\nvar require_thenElse = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: [\"then\", \"else\"],\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tcode({ keyword, parentSchema, it }) {\n\t\t\tif (parentSchema.if === void 0) (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"if\" is ignored`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js\nvar require_applicator$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst additionalItems_1 = require_additionalItems();\n\tconst prefixItems_1 = require_prefixItems();\n\tconst items_1 = require_items();\n\tconst items2020_1 = require_items2020();\n\tconst contains_1 = require_contains();\n\tconst dependencies_1 = require_dependencies();\n\tconst propertyNames_1 = require_propertyNames();\n\tconst additionalProperties_1 = require_additionalProperties();\n\tconst properties_1 = require_properties();\n\tconst patternProperties_1 = require_patternProperties();\n\tconst not_1 = require_not();\n\tconst anyOf_1 = require_anyOf();\n\tconst oneOf_1 = require_oneOf();\n\tconst allOf_1 = require_allOf();\n\tconst if_1 = require_if();\n\tconst thenElse_1 = require_thenElse();\n\tfunction getApplicator(draft2020 = false) {\n\t\tconst applicator = [\n\t\t\tnot_1.default,\n\t\t\tanyOf_1.default,\n\t\t\toneOf_1.default,\n\t\t\tallOf_1.default,\n\t\t\tif_1.default,\n\t\t\tthenElse_1.default,\n\t\t\tpropertyNames_1.default,\n\t\t\tadditionalProperties_1.default,\n\t\t\tdependencies_1.default,\n\t\t\tproperties_1.default,\n\t\t\tpatternProperties_1.default\n\t\t];\n\t\tif (draft2020) applicator.push(prefixItems_1.default, items2020_1.default);\n\t\telse applicator.push(additionalItems_1.default, items_1.default);\n\t\tapplicator.push(contains_1.default);\n\t\treturn applicator;\n\t}\n\texports.default = getApplicator;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js\nvar require_format$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: \"format\",\n\t\ttype: [\"number\", \"string\"],\n\t\tschemaType: \"string\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must match format \"${schemaCode}\"`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt, ruleType) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tconst { opts, errSchemaPath, schemaEnv, self } = it;\n\t\t\tif (!opts.validateFormats) return;\n\t\t\tif ($data) validate$DataFormat();\n\t\t\telse validateFormat();\n\t\t\tfunction validate$DataFormat() {\n\t\t\t\tconst fmts = gen.scopeValue(\"formats\", {\n\t\t\t\t\tref: self.formats,\n\t\t\t\t\tcode: opts.code.formats\n\t\t\t\t});\n\t\t\t\tconst fDef = gen.const(\"fDef\", (0, codegen_1._)`${fmts}[${schemaCode}]`);\n\t\t\t\tconst fType = gen.let(\"fType\");\n\t\t\t\tconst format = gen.let(\"format\");\n\t\t\t\tgen.if((0, codegen_1._)`typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || \"string\"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`\"string\"`).assign(format, fDef));\n\t\t\t\tcxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));\n\t\t\t\tfunction unknownFmt() {\n\t\t\t\t\tif (opts.strictSchema === false) return codegen_1.nil;\n\t\t\t\t\treturn (0, codegen_1._)`${schemaCode} && !${format}`;\n\t\t\t\t}\n\t\t\t\tfunction invalidFmt() {\n\t\t\t\t\tconst callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;\n\t\t\t\t\tconst validData = (0, codegen_1._)`(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`;\n\t\t\t\t\treturn (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction validateFormat() {\n\t\t\t\tconst formatDef = self.formats[schema];\n\t\t\t\tif (!formatDef) {\n\t\t\t\t\tunknownFormat();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (formatDef === true) return;\n\t\t\t\tconst [fmtType, format, fmtRef] = getFormat(formatDef);\n\t\t\t\tif (fmtType === ruleType) cxt.pass(validCondition());\n\t\t\t\tfunction unknownFormat() {\n\t\t\t\t\tif (opts.strictSchema === false) {\n\t\t\t\t\t\tself.logger.warn(unknownMsg());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Error(unknownMsg());\n\t\t\t\t\tfunction unknownMsg() {\n\t\t\t\t\t\treturn `unknown format \"${schema}\" ignored in schema at path \"${errSchemaPath}\"`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction getFormat(fmtDef) {\n\t\t\t\t\tconst code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;\n\t\t\t\t\tconst fmt = gen.scopeValue(\"formats\", {\n\t\t\t\t\t\tkey: schema,\n\t\t\t\t\t\tref: fmtDef,\n\t\t\t\t\t\tcode\n\t\t\t\t\t});\n\t\t\t\t\tif (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) return [\n\t\t\t\t\t\tfmtDef.type || \"string\",\n\t\t\t\t\t\tfmtDef.validate,\n\t\t\t\t\t\t(0, codegen_1._)`${fmt}.validate`\n\t\t\t\t\t];\n\t\t\t\t\treturn [\n\t\t\t\t\t\t\"string\",\n\t\t\t\t\t\tfmtDef,\n\t\t\t\t\t\tfmt\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tfunction validCondition() {\n\t\t\t\t\tif (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n\t\t\t\t\t\tif (!schemaEnv.$async) throw new Error(\"async format in sync schema\");\n\t\t\t\t\t\treturn (0, codegen_1._)`await ${fmtRef}(${data})`;\n\t\t\t\t\t}\n\t\t\t\t\treturn typeof format == \"function\" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js\nvar require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst format = [require_format$2().default];\n\texports.default = format;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js\nvar require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.contentVocabulary = exports.metadataVocabulary = void 0;\n\texports.metadataVocabulary = [\n\t\t\"title\",\n\t\t\"description\",\n\t\t\"default\",\n\t\t\"deprecated\",\n\t\t\"readOnly\",\n\t\t\"writeOnly\",\n\t\t\"examples\"\n\t];\n\texports.contentVocabulary = [\n\t\t\"contentMediaType\",\n\t\t\"contentEncoding\",\n\t\t\"contentSchema\"\n\t];\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js\nvar require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst core_1 = require_core$2();\n\tconst validation_1 = require_validation$2();\n\tconst applicator_1 = require_applicator$2();\n\tconst format_1 = require_format$1();\n\tconst metadata_1 = require_metadata();\n\tconst draft7Vocabularies = [\n\t\tcore_1.default,\n\t\tvalidation_1.default,\n\t\t(0, applicator_1.default)(),\n\t\tformat_1.default,\n\t\tmetadata_1.metadataVocabulary,\n\t\tmetadata_1.contentVocabulary\n\t];\n\texports.default = draft7Vocabularies;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js\nvar require_types = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.DiscrError = void 0;\n\tvar DiscrError;\n\t(function(DiscrError) {\n\t\tDiscrError[\"Tag\"] = \"tag\";\n\t\tDiscrError[\"Mapping\"] = \"mapping\";\n\t})(DiscrError || (exports.DiscrError = DiscrError = {}));\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js\nvar require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst types_1 = require_types();\n\tconst compile_1 = require_compile();\n\tconst ref_error_1 = require_ref_error();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"discriminator\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: {\n\t\t\tmessage: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag \"${tagName}\" must be string` : `value of tag \"${tagName}\" must be in oneOf`,\n\t\t\tparams: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, schema, parentSchema, it } = cxt;\n\t\t\tconst { oneOf } = parentSchema;\n\t\t\tif (!it.opts.discriminator) throw new Error(\"discriminator: requires discriminator option\");\n\t\t\tconst tagName = schema.propertyName;\n\t\t\tif (typeof tagName != \"string\") throw new Error(\"discriminator: requires propertyName\");\n\t\t\tif (schema.mapping) throw new Error(\"discriminator: mapping is not supported\");\n\t\t\tif (!oneOf) throw new Error(\"discriminator: requires oneOf keyword\");\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\tconst tag = gen.const(\"tag\", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);\n\t\t\tgen.if((0, codegen_1._)`typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, {\n\t\t\t\tdiscrError: types_1.DiscrError.Tag,\n\t\t\t\ttag,\n\t\t\t\ttagName\n\t\t\t}));\n\t\t\tcxt.ok(valid);\n\t\t\tfunction validateMapping() {\n\t\t\t\tconst mapping = getMapping();\n\t\t\t\tgen.if(false);\n\t\t\t\tfor (const tagValue in mapping) {\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);\n\t\t\t\t\tgen.assign(valid, applyTagSchema(mapping[tagValue]));\n\t\t\t\t}\n\t\t\t\tgen.else();\n\t\t\t\tcxt.error(false, {\n\t\t\t\t\tdiscrError: types_1.DiscrError.Mapping,\n\t\t\t\t\ttag,\n\t\t\t\t\ttagName\n\t\t\t\t});\n\t\t\t\tgen.endIf();\n\t\t\t}\n\t\t\tfunction applyTagSchema(schemaProp) {\n\t\t\t\tconst _valid = gen.name(\"valid\");\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"oneOf\",\n\t\t\t\t\tschemaProp\n\t\t\t\t}, _valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt, codegen_1.Name);\n\t\t\t\treturn _valid;\n\t\t\t}\n\t\t\tfunction getMapping() {\n\t\t\t\tvar _a;\n\t\t\t\tconst oneOfMapping = {};\n\t\t\t\tconst topRequired = hasRequired(parentSchema);\n\t\t\t\tlet tagRequired = true;\n\t\t\t\tfor (let i = 0; i < oneOf.length; i++) {\n\t\t\t\t\tlet sch = oneOf[i];\n\t\t\t\t\tif ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n\t\t\t\t\t\tconst ref = sch.$ref;\n\t\t\t\t\t\tsch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);\n\t\t\t\t\t\tif (sch instanceof compile_1.SchemaEnv) sch = sch.schema;\n\t\t\t\t\t\tif (sch === void 0) throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);\n\t\t\t\t\t}\n\t\t\t\t\tconst propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n\t\t\t\t\tif (typeof propSch != \"object\") throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n\t\t\t\t\ttagRequired = tagRequired && (topRequired || hasRequired(sch));\n\t\t\t\t\taddMappings(propSch, i);\n\t\t\t\t}\n\t\t\t\tif (!tagRequired) throw new Error(`discriminator: \"${tagName}\" must be required`);\n\t\t\t\treturn oneOfMapping;\n\t\t\t\tfunction hasRequired({ required }) {\n\t\t\t\t\treturn Array.isArray(required) && required.includes(tagName);\n\t\t\t\t}\n\t\t\t\tfunction addMappings(sch, i) {\n\t\t\t\t\tif (sch.const) addMapping(sch.const, i);\n\t\t\t\t\telse if (sch.enum) for (const tagValue of sch.enum) addMapping(tagValue, i);\n\t\t\t\t\telse throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n\t\t\t\t}\n\t\t\t\tfunction addMapping(tagValue, i) {\n\t\t\t\t\tif (typeof tagValue != \"string\" || tagValue in oneOfMapping) throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n\t\t\t\t\toneOfMapping[tagValue] = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json\nvar require_json_schema_draft_07 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"http://json-schema.org/draft-07/schema#\",\n\t\t\"$id\": \"http://json-schema.org/draft-07/schema#\",\n\t\t\"title\": \"Core schema meta-schema\",\n\t\t\"definitions\": {\n\t\t\t\"schemaArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"items\": { \"$ref\": \"#\" }\n\t\t\t},\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": { \"allOf\": [{ \"$ref\": \"#/definitions/nonNegativeInteger\" }, { \"default\": 0 }] },\n\t\t\t\"simpleTypes\": { \"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t] },\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t},\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$schema\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"$ref\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$comment\": { \"type\": \"string\" },\n\t\t\t\"title\": { \"type\": \"string\" },\n\t\t\t\"description\": { \"type\": \"string\" },\n\t\t\t\"default\": true,\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMaximum\": { \"type\": \"number\" },\n\t\t\t\"minimum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMinimum\": { \"type\": \"number\" },\n\t\t\t\"maxLength\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"additionalItems\": { \"$ref\": \"#\" },\n\t\t\t\"items\": {\n\t\t\t\t\"anyOf\": [{ \"$ref\": \"#\" }, { \"$ref\": \"#/definitions/schemaArray\" }],\n\t\t\t\t\"default\": true\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"contains\": { \"$ref\": \"#\" },\n\t\t\t\"maxProperties\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/definitions/stringArray\" },\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"definitions\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependencies\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"anyOf\": [{ \"$ref\": \"#\" }, { \"$ref\": \"#/definitions/stringArray\" }] }\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$ref\": \"#\" },\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true,\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t},\n\t\t\t\"type\": { \"anyOf\": [{ \"$ref\": \"#/definitions/simpleTypes\" }, {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t}] },\n\t\t\t\"format\": { \"type\": \"string\" },\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"if\": { \"$ref\": \"#\" },\n\t\t\t\"then\": { \"$ref\": \"#\" },\n\t\t\t\"else\": { \"$ref\": \"#\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"not\": { \"$ref\": \"#\" }\n\t\t},\n\t\t\"default\": true\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js\nvar require_ajv = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;\n\tconst core_1 = require_core$3();\n\tconst draft7_1 = require_draft7();\n\tconst discriminator_1 = require_discriminator();\n\tconst draft7MetaSchema = require_json_schema_draft_07();\n\tconst META_SUPPORT_DATA = [\"/properties\"];\n\tconst META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\";\n\tvar Ajv = class extends core_1.default {\n\t\t_addVocabularies() {\n\t\t\tsuper._addVocabularies();\n\t\t\tdraft7_1.default.forEach((v) => this.addVocabulary(v));\n\t\t\tif (this.opts.discriminator) this.addKeyword(discriminator_1.default);\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tsuper._addDefaultMetaSchema();\n\t\t\tif (!this.opts.meta) return;\n\t\t\tconst metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;\n\t\t\tthis.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n\t\t\tthis.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n\t\t}\n\t\tdefaultMeta() {\n\t\t\treturn this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n\t\t}\n\t};\n\texports.Ajv = Ajv;\n\tmodule.exports = exports = Ajv;\n\tmodule.exports.Ajv = Ajv;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = Ajv;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tvar validation_error_1 = require_validation_error();\n\tObject.defineProperty(exports, \"ValidationError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validation_error_1.default;\n\t\t}\n\t});\n\tvar ref_error_1 = require_ref_error();\n\tObject.defineProperty(exports, \"MissingRefError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn ref_error_1.default;\n\t\t}\n\t});\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js\nvar require_dynamicAnchor = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.dynamicAnchor = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst compile_1 = require_compile();\n\tconst ref_1 = require_ref();\n\tconst def = {\n\t\tkeyword: \"$dynamicAnchor\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => dynamicAnchor(cxt, cxt.schema)\n\t};\n\tfunction dynamicAnchor(cxt, anchor) {\n\t\tconst { gen, it } = cxt;\n\t\tit.schemaEnv.root.dynamicAnchors[anchor] = true;\n\t\tconst v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;\n\t\tconst validate = it.errSchemaPath === \"#\" ? it.validateName : _getValidate(cxt);\n\t\tgen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));\n\t}\n\texports.dynamicAnchor = dynamicAnchor;\n\tfunction _getValidate(cxt) {\n\t\tconst { schemaEnv, schema, self } = cxt.it;\n\t\tconst { root, baseId, localRefs, meta } = schemaEnv.root;\n\t\tconst { schemaId } = self.opts;\n\t\tconst sch = new compile_1.SchemaEnv({\n\t\t\tschema,\n\t\t\tschemaId,\n\t\t\troot,\n\t\t\tbaseId,\n\t\t\tlocalRefs,\n\t\t\tmeta\n\t\t});\n\t\tcompile_1.compileSchema.call(self, sch);\n\t\treturn (0, ref_1.getValidate)(cxt, sch);\n\t}\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js\nvar require_dynamicRef = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.dynamicRef = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst ref_1 = require_ref();\n\tconst def = {\n\t\tkeyword: \"$dynamicRef\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => dynamicRef(cxt, cxt.schema)\n\t};\n\tfunction dynamicRef(cxt, ref) {\n\t\tconst { gen, keyword, it } = cxt;\n\t\tif (ref[0] !== \"#\") throw new Error(`\"${keyword}\" only supports hash fragment reference`);\n\t\tconst anchor = ref.slice(1);\n\t\tif (it.allErrors) _dynamicRef();\n\t\telse {\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\t_dynamicRef(valid);\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction _dynamicRef(valid) {\n\t\t\tif (it.schemaEnv.root.dynamicAnchors[anchor]) {\n\t\t\t\tconst v = gen.let(\"_v\", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);\n\t\t\t\tgen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));\n\t\t\t} else _callRef(it.validateName, valid)();\n\t\t}\n\t\tfunction _callRef(validate, valid) {\n\t\t\treturn valid ? () => gen.block(() => {\n\t\t\t\t(0, ref_1.callRef)(cxt, validate);\n\t\t\t\tgen.let(valid, true);\n\t\t\t}) : () => (0, ref_1.callRef)(cxt, validate);\n\t\t}\n\t}\n\texports.dynamicRef = dynamicRef;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js\nvar require_recursiveAnchor = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicAnchor_1 = require_dynamicAnchor();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"$recursiveAnchor\",\n\t\tschemaType: \"boolean\",\n\t\tcode(cxt) {\n\t\t\tif (cxt.schema) (0, dynamicAnchor_1.dynamicAnchor)(cxt, \"\");\n\t\t\telse (0, util_1.checkStrictMode)(cxt.it, \"$recursiveAnchor: false is ignored\");\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js\nvar require_recursiveRef = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicRef_1 = require_dynamicRef();\n\tconst def = {\n\t\tkeyword: \"$recursiveRef\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/index.js\nvar require_dynamic = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicAnchor_1 = require_dynamicAnchor();\n\tconst dynamicRef_1 = require_dynamicRef();\n\tconst recursiveAnchor_1 = require_recursiveAnchor();\n\tconst recursiveRef_1 = require_recursiveRef();\n\tconst dynamic = [\n\t\tdynamicAnchor_1.default,\n\t\tdynamicRef_1.default,\n\t\trecursiveAnchor_1.default,\n\t\trecursiveRef_1.default\n\t];\n\texports.default = dynamic;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js\nvar require_dependentRequired = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependencies_1 = require_dependencies();\n\tconst def = {\n\t\tkeyword: \"dependentRequired\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: dependencies_1.error,\n\t\tcode: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js\nvar require_dependentSchemas = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependencies_1 = require_dependencies();\n\tconst def = {\n\t\tkeyword: \"dependentSchemas\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js\nvar require_limitContains = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: [\"maxContains\", \"minContains\"],\n\t\ttype: \"array\",\n\t\tschemaType: \"number\",\n\t\tcode({ keyword, parentSchema, it }) {\n\t\t\tif (parentSchema.contains === void 0) (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"contains\" is ignored`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/next.js\nvar require_next = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependentRequired_1 = require_dependentRequired();\n\tconst dependentSchemas_1 = require_dependentSchemas();\n\tconst limitContains_1 = require_limitContains();\n\tconst next = [\n\t\tdependentRequired_1.default,\n\t\tdependentSchemas_1.default,\n\t\tlimitContains_1.default\n\t];\n\texports.default = next;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js\nvar require_unevaluatedProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\tconst def = {\n\t\tkeyword: \"unevaluatedProperties\",\n\t\ttype: \"object\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must NOT have unevaluated properties\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, errsCount, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!errsCount) throw new Error(\"ajv implementation error\");\n\t\t\tconst { allErrors, props } = it;\n\t\t\tif (props instanceof codegen_1.Name) gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn(\"key\", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));\n\t\t\telse if (props !== true) gen.forIn(\"key\", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));\n\t\t\tit.props = true;\n\t\t\tcxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t\t\tfunction unevaluatedPropCode(key) {\n\t\t\t\tif (schema === false) {\n\t\t\t\t\tcxt.setParams({ unevaluatedProperty: key });\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tif (!allErrors) gen.break();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"unevaluatedProperties\",\n\t\t\t\t\t\tdataProp: key,\n\t\t\t\t\t\tdataPropType: util_1.Type.Str\n\t\t\t\t\t}, valid);\n\t\t\t\t\tif (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction unevaluatedDynamic(evaluatedProps, key) {\n\t\t\t\treturn (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;\n\t\t\t}\n\t\t\tfunction unevaluatedStatic(evaluatedProps, key) {\n\t\t\t\tconst ps = [];\n\t\t\t\tfor (const p in evaluatedProps) if (evaluatedProps[p] === true) ps.push((0, codegen_1._)`${key} !== ${p}`);\n\t\t\t\treturn (0, codegen_1.and)(...ps);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js\nvar require_unevaluatedItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"unevaluatedItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, it } = cxt;\n\t\t\tconst items = it.items || 0;\n\t\t\tif (items === true) return;\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tif (schema === false) {\n\t\t\t\tcxt.setParams({ len: items });\n\t\t\t\tcxt.fail((0, codegen_1._)`${len} > ${items}`);\n\t\t\t} else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tconst valid = gen.var(\"valid\", (0, codegen_1._)`${len} <= ${items}`);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t\tit.items = true;\n\t\t\tfunction validateItems(valid, from) {\n\t\t\t\tgen.forRange(\"i\", from, len, (i) => {\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"unevaluatedItems\",\n\t\t\t\t\t\tdataProp: i,\n\t\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t\t}, valid);\n\t\t\t\t\tif (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js\nvar require_unevaluated$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst unevaluatedProperties_1 = require_unevaluatedProperties();\n\tconst unevaluatedItems_1 = require_unevaluatedItems();\n\tconst unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];\n\texports.default = unevaluated;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json\nvar require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/core\": true,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/applicator\": true,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/validation\": true,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/meta-data\": true,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/format\": false,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/content\": true\n\t\t},\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Core and Validation specifications meta-schema\",\n\t\t\"allOf\": [\n\t\t\t{ \"$ref\": \"meta/core\" },\n\t\t\t{ \"$ref\": \"meta/applicator\" },\n\t\t\t{ \"$ref\": \"meta/validation\" },\n\t\t\t{ \"$ref\": \"meta/meta-data\" },\n\t\t\t{ \"$ref\": \"meta/format\" },\n\t\t\t{ \"$ref\": \"meta/content\" }\n\t\t],\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"definitions\": {\n\t\t\t\t\"$comment\": \"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependencies\": {\n\t\t\t\t\"$comment\": \"\\\"dependencies\\\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \\\"dependentSchemas\\\" and \\\"dependentRequired\\\"\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"anyOf\": [{ \"$recursiveRef\": \"#\" }, { \"$ref\": \"meta/validation#/$defs/stringArray\" }] }\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json\nvar require_applicator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/applicator\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/applicator\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"additionalItems\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"unevaluatedItems\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"items\": { \"anyOf\": [{ \"$recursiveRef\": \"#\" }, { \"$ref\": \"#/$defs/schemaArray\" }] },\n\t\t\t\"contains\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"unevaluatedProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependentSchemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" }\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"if\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"then\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"else\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"not\": { \"$recursiveRef\": \"#\" }\n\t\t},\n\t\t\"$defs\": { \"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$recursiveRef\": \"#\" }\n\t\t} }\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json\nvar require_content$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/content\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/content\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Content vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"contentSchema\": { \"$recursiveRef\": \"#\" }\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json\nvar require_core$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/core\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/core\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Core vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\",\n\t\t\t\t\"$comment\": \"Non-empty fragments not allowed.\",\n\t\t\t\t\"pattern\": \"^[^#]*#?$\"\n\t\t\t},\n\t\t\t\"$schema\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"$anchor\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"pattern\": \"^[A-Za-z][-A-Za-z0-9.:_]*$\"\n\t\t\t},\n\t\t\t\"$ref\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$recursiveRef\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$recursiveAnchor\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"$vocabulary\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"propertyNames\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"format\": \"uri\"\n\t\t\t\t},\n\t\t\t\t\"additionalProperties\": { \"type\": \"boolean\" }\n\t\t\t},\n\t\t\t\"$comment\": { \"type\": \"string\" },\n\t\t\t\"$defs\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json\nvar require_format = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/format\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/format\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Format vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": { \"format\": { \"type\": \"string\" } }\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json\nvar require_meta_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/meta-data\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/meta-data\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Meta-data vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"title\": { \"type\": \"string\" },\n\t\t\t\"description\": { \"type\": \"string\" },\n\t\t\t\"default\": true,\n\t\t\t\"deprecated\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"writeOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json\nvar require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/validation\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/validation\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Validation vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMaximum\": { \"type\": \"number\" },\n\t\t\t\"minimum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMinimum\": { \"type\": \"number\" },\n\t\t\t\"maxLength\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"maxContains\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minContains\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 1\n\t\t\t},\n\t\t\t\"maxProperties\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/$defs/stringArray\" },\n\t\t\t\"dependentRequired\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#/$defs/stringArray\" }\n\t\t\t},\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"type\": { \"anyOf\": [{ \"$ref\": \"#/$defs/simpleTypes\" }, {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t}] }\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 0\n\t\t\t},\n\t\t\t\"simpleTypes\": { \"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t] },\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/index.js\nvar require_json_schema_2019_09 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst metaSchema = require_schema$1();\n\tconst applicator = require_applicator$1();\n\tconst content = require_content$1();\n\tconst core = require_core$1();\n\tconst format = require_format();\n\tconst metadata = require_meta_data$1();\n\tconst validation = require_validation$1();\n\tconst META_SUPPORT_DATA = [\"/properties\"];\n\tfunction addMetaSchema2019($data) {\n\t\t[\n\t\t\tmetaSchema,\n\t\t\tapplicator,\n\t\t\tcontent,\n\t\t\tcore,\n\t\t\twith$data(this, format),\n\t\t\tmetadata,\n\t\t\twith$data(this, validation)\n\t\t].forEach((sch) => this.addMetaSchema(sch, void 0, false));\n\t\treturn this;\n\t\tfunction with$data(ajv, sch) {\n\t\t\treturn $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;\n\t\t}\n\t}\n\texports.default = addMetaSchema2019;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2019.js\nvar require__2019 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;\n\tconst core_1 = require_core$3();\n\tconst draft7_1 = require_draft7();\n\tconst dynamic_1 = require_dynamic();\n\tconst next_1 = require_next();\n\tconst unevaluated_1 = require_unevaluated$1();\n\tconst discriminator_1 = require_discriminator();\n\tconst json_schema_2019_09_1 = require_json_schema_2019_09();\n\tconst META_SCHEMA_ID = \"https://json-schema.org/draft/2019-09/schema\";\n\tvar Ajv2019 = class extends core_1.default {\n\t\tconstructor(opts = {}) {\n\t\t\tsuper({\n\t\t\t\t...opts,\n\t\t\t\tdynamicRef: true,\n\t\t\t\tnext: true,\n\t\t\t\tunevaluated: true\n\t\t\t});\n\t\t}\n\t\t_addVocabularies() {\n\t\t\tsuper._addVocabularies();\n\t\t\tthis.addVocabulary(dynamic_1.default);\n\t\t\tdraft7_1.default.forEach((v) => this.addVocabulary(v));\n\t\t\tthis.addVocabulary(next_1.default);\n\t\t\tthis.addVocabulary(unevaluated_1.default);\n\t\t\tif (this.opts.discriminator) this.addKeyword(discriminator_1.default);\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tsuper._addDefaultMetaSchema();\n\t\t\tconst { $data, meta } = this.opts;\n\t\t\tif (!meta) return;\n\t\t\tjson_schema_2019_09_1.default.call(this, $data);\n\t\t\tthis.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n\t\t}\n\t\tdefaultMeta() {\n\t\t\treturn this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n\t\t}\n\t};\n\texports.Ajv2019 = Ajv2019;\n\tmodule.exports = exports = Ajv2019;\n\tmodule.exports.Ajv2019 = Ajv2019;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = Ajv2019;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tvar validation_error_1 = require_validation_error();\n\tObject.defineProperty(exports, \"ValidationError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validation_error_1.default;\n\t\t}\n\t});\n\tvar ref_error_1 = require_ref_error();\n\tObject.defineProperty(exports, \"MissingRefError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn ref_error_1.default;\n\t\t}\n\t});\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft2020.js\nvar require_draft2020 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst core_1 = require_core$2();\n\tconst validation_1 = require_validation$2();\n\tconst applicator_1 = require_applicator$2();\n\tconst dynamic_1 = require_dynamic();\n\tconst next_1 = require_next();\n\tconst unevaluated_1 = require_unevaluated$1();\n\tconst format_1 = require_format$1();\n\tconst metadata_1 = require_metadata();\n\tconst draft2020Vocabularies = [\n\t\tdynamic_1.default,\n\t\tcore_1.default,\n\t\tvalidation_1.default,\n\t\t(0, applicator_1.default)(true),\n\t\tformat_1.default,\n\t\tmetadata_1.metadataVocabulary,\n\t\tmetadata_1.contentVocabulary,\n\t\tnext_1.default,\n\t\tunevaluated_1.default\n\t];\n\texports.default = draft2020Vocabularies;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json\nvar require_schema = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/core\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/applicator\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/validation\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/meta-data\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/content\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Core and Validation specifications meta-schema\",\n\t\t\"allOf\": [\n\t\t\t{ \"$ref\": \"meta/core\" },\n\t\t\t{ \"$ref\": \"meta/applicator\" },\n\t\t\t{ \"$ref\": \"meta/unevaluated\" },\n\t\t\t{ \"$ref\": \"meta/validation\" },\n\t\t\t{ \"$ref\": \"meta/meta-data\" },\n\t\t\t{ \"$ref\": \"meta/format-annotation\" },\n\t\t\t{ \"$ref\": \"meta/content\" }\n\t\t],\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"$comment\": \"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.\",\n\t\t\"properties\": {\n\t\t\t\"definitions\": {\n\t\t\t\t\"$comment\": \"\\\"definitions\\\" has been replaced by \\\"$defs\\\".\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"deprecated\": true,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependencies\": {\n\t\t\t\t\"$comment\": \"\\\"dependencies\\\" has been split and replaced by \\\"dependentSchemas\\\" and \\\"dependentRequired\\\" in order to serve their differing semantics.\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"anyOf\": [{ \"$dynamicRef\": \"#meta\" }, { \"$ref\": \"meta/validation#/$defs/stringArray\" }] },\n\t\t\t\t\"deprecated\": true,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"$recursiveAnchor\": {\n\t\t\t\t\"$comment\": \"\\\"$recursiveAnchor\\\" has been replaced by \\\"$dynamicAnchor\\\".\",\n\t\t\t\t\"$ref\": \"meta/core#/$defs/anchorString\",\n\t\t\t\t\"deprecated\": true\n\t\t\t},\n\t\t\t\"$recursiveRef\": {\n\t\t\t\t\"$comment\": \"\\\"$recursiveRef\\\" has been replaced by \\\"$dynamicRef\\\".\",\n\t\t\t\t\"$ref\": \"meta/core#/$defs/uriReferenceString\",\n\t\t\t\t\"deprecated\": true\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json\nvar require_applicator = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/applicator\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/applicator\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"prefixItems\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"items\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"contains\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependentSchemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"if\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"then\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"else\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"not\": { \"$dynamicRef\": \"#meta\" }\n\t\t},\n\t\t\"$defs\": { \"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$dynamicRef\": \"#meta\" }\n\t\t} }\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json\nvar require_unevaluated = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/unevaluated\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Unevaluated applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"unevaluatedItems\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"unevaluatedProperties\": { \"$dynamicRef\": \"#meta\" }\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json\nvar require_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/content\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/content\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Content vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentSchema\": { \"$dynamicRef\": \"#meta\" }\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json\nvar require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/core\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/core\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Core vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"$ref\": \"#/$defs/uriReferenceString\",\n\t\t\t\t\"$comment\": \"Non-empty fragments not allowed.\",\n\t\t\t\t\"pattern\": \"^[^#]*#?$\"\n\t\t\t},\n\t\t\t\"$schema\": { \"$ref\": \"#/$defs/uriString\" },\n\t\t\t\"$ref\": { \"$ref\": \"#/$defs/uriReferenceString\" },\n\t\t\t\"$anchor\": { \"$ref\": \"#/$defs/anchorString\" },\n\t\t\t\"$dynamicRef\": { \"$ref\": \"#/$defs/uriReferenceString\" },\n\t\t\t\"$dynamicAnchor\": { \"$ref\": \"#/$defs/anchorString\" },\n\t\t\t\"$vocabulary\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"propertyNames\": { \"$ref\": \"#/$defs/uriString\" },\n\t\t\t\t\"additionalProperties\": { \"type\": \"boolean\" }\n\t\t\t},\n\t\t\t\"$comment\": { \"type\": \"string\" },\n\t\t\t\"$defs\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" }\n\t\t\t}\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"anchorString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"pattern\": \"^[A-Za-z_][-A-Za-z0-9._]*$\"\n\t\t\t},\n\t\t\t\"uriString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"uriReferenceString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json\nvar require_format_annotation = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/format-annotation\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Format vocabulary meta-schema for annotation results\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": { \"format\": { \"type\": \"string\" } }\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json\nvar require_meta_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/meta-data\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/meta-data\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Meta-data vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"title\": { \"type\": \"string\" },\n\t\t\t\"description\": { \"type\": \"string\" },\n\t\t\t\"default\": true,\n\t\t\t\"deprecated\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"writeOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json\nvar require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/validation\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/validation\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Validation vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"type\": { \"anyOf\": [{ \"$ref\": \"#/$defs/simpleTypes\" }, {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t}] },\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMaximum\": { \"type\": \"number\" },\n\t\t\t\"minimum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMinimum\": { \"type\": \"number\" },\n\t\t\t\"maxLength\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"maxContains\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minContains\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 1\n\t\t\t},\n\t\t\t\"maxProperties\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/$defs/stringArray\" },\n\t\t\t\"dependentRequired\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#/$defs/stringArray\" }\n\t\t\t}\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 0\n\t\t\t},\n\t\t\t\"simpleTypes\": { \"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t] },\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js\nvar require_json_schema_2020_12 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst metaSchema = require_schema();\n\tconst applicator = require_applicator();\n\tconst unevaluated = require_unevaluated();\n\tconst content = require_content();\n\tconst core = require_core();\n\tconst format = require_format_annotation();\n\tconst metadata = require_meta_data();\n\tconst validation = require_validation();\n\tconst META_SUPPORT_DATA = [\"/properties\"];\n\tfunction addMetaSchema2020($data) {\n\t\t[\n\t\t\tmetaSchema,\n\t\t\tapplicator,\n\t\t\tunevaluated,\n\t\t\tcontent,\n\t\t\tcore,\n\t\t\twith$data(this, format),\n\t\t\tmetadata,\n\t\t\twith$data(this, validation)\n\t\t].forEach((sch) => this.addMetaSchema(sch, void 0, false));\n\t\treturn this;\n\t\tfunction with$data(ajv, sch) {\n\t\t\treturn $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;\n\t\t}\n\t}\n\texports.default = addMetaSchema2020;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2020.js\nvar require__2020 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;\n\tconst core_1 = require_core$3();\n\tconst draft2020_1 = require_draft2020();\n\tconst discriminator_1 = require_discriminator();\n\tconst json_schema_2020_12_1 = require_json_schema_2020_12();\n\tconst META_SCHEMA_ID = \"https://json-schema.org/draft/2020-12/schema\";\n\tvar Ajv2020 = class extends core_1.default {\n\t\tconstructor(opts = {}) {\n\t\t\tsuper({\n\t\t\t\t...opts,\n\t\t\t\tdynamicRef: true,\n\t\t\t\tnext: true,\n\t\t\t\tunevaluated: true\n\t\t\t});\n\t\t}\n\t\t_addVocabularies() {\n\t\t\tsuper._addVocabularies();\n\t\t\tdraft2020_1.default.forEach((v) => this.addVocabulary(v));\n\t\t\tif (this.opts.discriminator) this.addKeyword(discriminator_1.default);\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tsuper._addDefaultMetaSchema();\n\t\t\tconst { $data, meta } = this.opts;\n\t\t\tif (!meta) return;\n\t\t\tjson_schema_2020_12_1.default.call(this, $data);\n\t\t\tthis.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n\t\t}\n\t\tdefaultMeta() {\n\t\t\treturn this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n\t\t}\n\t};\n\texports.Ajv2020 = Ajv2020;\n\tmodule.exports = exports = Ajv2020;\n\tmodule.exports.Ajv2020 = Ajv2020;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = Ajv2020;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tvar validation_error_1 = require_validation_error();\n\tObject.defineProperty(exports, \"ValidationError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validation_error_1.default;\n\t\t}\n\t});\n\tvar ref_error_1 = require_ref_error();\n\tObject.defineProperty(exports, \"MissingRefError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn ref_error_1.default;\n\t\t}\n\t});\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js\nvar require_formats = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.formatNames = exports.fastFormats = exports.fullFormats = void 0;\n\tfunction fmtDef(validate, compare) {\n\t\treturn {\n\t\t\tvalidate,\n\t\t\tcompare\n\t\t};\n\t}\n\texports.fullFormats = {\n\t\tdate: fmtDef(date, compareDate),\n\t\ttime: fmtDef(getTime(true), compareTime),\n\t\t\"date-time\": fmtDef(getDateTime(true), compareDateTime),\n\t\t\"iso-time\": fmtDef(getTime(), compareIsoTime),\n\t\t\"iso-date-time\": fmtDef(getDateTime(), compareIsoDateTime),\n\t\tduration: /^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$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-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,\n\t\tregex,\n\t\tuuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,\n\t\t\"json-pointer\": /^(?:\\/(?:[^~/]|~0|~1)*)*$/,\n\t\t\"json-pointer-uri-fragment\": /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,\n\t\t\"relative-json-pointer\": /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,\n\t\tbyte,\n\t\tint32: {\n\t\t\ttype: \"number\",\n\t\t\tvalidate: validateInt32\n\t\t},\n\t\tint64: {\n\t\t\ttype: \"number\",\n\t\t\tvalidate: validateInt64\n\t\t},\n\t\tfloat: {\n\t\t\ttype: \"number\",\n\t\t\tvalidate: validateNumber\n\t\t},\n\t\tdouble: {\n\t\t\ttype: \"number\",\n\t\t\tvalidate: validateNumber\n\t\t},\n\t\tpassword: true,\n\t\tbinary: true\n\t};\n\texports.fastFormats = {\n\t\t...exports.fullFormats,\n\t\tdate: fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/, compareDate),\n\t\ttime: fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareTime),\n\t\t\"date-time\": fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\dt(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareDateTime),\n\t\t\"iso-time\": fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoTime),\n\t\t\"iso-date-time\": fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoDateTime),\n\t\turi: /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n\t\t\"uri-reference\": /^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n\t\temail: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i\n\t};\n\texports.formatNames = Object.keys(exports.fullFormats);\n\tfunction isLeapYear(year) {\n\t\treturn year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n\t}\n\tconst DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/;\n\tconst DAYS = [\n\t\t0,\n\t\t31,\n\t\t28,\n\t\t31,\n\t\t30,\n\t\t31,\n\t\t30,\n\t\t31,\n\t\t31,\n\t\t30,\n\t\t31,\n\t\t30,\n\t\t31\n\t];\n\tfunction date(str) {\n\t\tconst matches = DATE.exec(str);\n\t\tif (!matches) return false;\n\t\tconst year = +matches[1];\n\t\tconst month = +matches[2];\n\t\tconst day = +matches[3];\n\t\treturn month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);\n\t}\n\tfunction compareDate(d1, d2) {\n\t\tif (!(d1 && d2)) return void 0;\n\t\tif (d1 > d2) return 1;\n\t\tif (d1 < d2) return -1;\n\t\treturn 0;\n\t}\n\tconst TIME = /^(\\d\\d):(\\d\\d):(\\d\\d(?:\\.\\d+)?)(z|([+-])(\\d\\d)(?::?(\\d\\d))?)?$/i;\n\tfunction getTime(strictTimeZone) {\n\t\treturn function time(str) {\n\t\t\tconst matches = TIME.exec(str);\n\t\t\tif (!matches) return false;\n\t\t\tconst hr = +matches[1];\n\t\t\tconst min = +matches[2];\n\t\t\tconst sec = +matches[3];\n\t\t\tconst tz = matches[4];\n\t\t\tconst tzSign = matches[5] === \"-\" ? -1 : 1;\n\t\t\tconst tzH = +(matches[6] || 0);\n\t\t\tconst tzM = +(matches[7] || 0);\n\t\t\tif (tzH > 23 || tzM > 59 || strictTimeZone && !tz) return false;\n\t\t\tif (hr <= 23 && min <= 59 && sec < 60) return true;\n\t\t\tconst utcMin = min - tzM * tzSign;\n\t\t\tconst utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);\n\t\t\treturn (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;\n\t\t};\n\t}\n\tfunction compareTime(s1, s2) {\n\t\tif (!(s1 && s2)) return void 0;\n\t\tconst t1 = (/* @__PURE__ */ new Date(\"2020-01-01T\" + s1)).valueOf();\n\t\tconst t2 = (/* @__PURE__ */ new Date(\"2020-01-01T\" + s2)).valueOf();\n\t\tif (!(t1 && t2)) return void 0;\n\t\treturn t1 - t2;\n\t}\n\tfunction compareIsoTime(t1, t2) {\n\t\tif (!(t1 && t2)) return void 0;\n\t\tconst a1 = TIME.exec(t1);\n\t\tconst a2 = TIME.exec(t2);\n\t\tif (!(a1 && a2)) return void 0;\n\t\tt1 = a1[1] + a1[2] + a1[3];\n\t\tt2 = a2[1] + a2[2] + a2[3];\n\t\tif (t1 > t2) return 1;\n\t\tif (t1 < t2) return -1;\n\t\treturn 0;\n\t}\n\tconst DATE_TIME_SEPARATOR = /t|\\s/i;\n\tfunction getDateTime(strictTimeZone) {\n\t\tconst time = getTime(strictTimeZone);\n\t\treturn function date_time(str) {\n\t\t\tconst dateTime = str.split(DATE_TIME_SEPARATOR);\n\t\t\treturn dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);\n\t\t};\n\t}\n\tfunction compareDateTime(dt1, dt2) {\n\t\tif (!(dt1 && dt2)) return void 0;\n\t\tconst d1 = new Date(dt1).valueOf();\n\t\tconst d2 = new Date(dt2).valueOf();\n\t\tif (!(d1 && d2)) return void 0;\n\t\treturn d1 - d2;\n\t}\n\tfunction compareIsoDateTime(dt1, dt2) {\n\t\tif (!(dt1 && dt2)) return void 0;\n\t\tconst [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);\n\t\tconst [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);\n\t\tconst res = compareDate(d1, d2);\n\t\tif (res === void 0) return void 0;\n\t\treturn res || compareTime(t1, t2);\n\t}\n\tconst NOT_URI_FRAGMENT = /\\/|:/;\n\tconst URI = /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n\tfunction uri(str) {\n\t\treturn NOT_URI_FRAGMENT.test(str) && URI.test(str);\n\t}\n\tconst BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;\n\tfunction byte(str) {\n\t\tBYTE.lastIndex = 0;\n\t\treturn BYTE.test(str);\n\t}\n\tconst MIN_INT32 = -(2 ** 31);\n\tconst MAX_INT32 = 2 ** 31 - 1;\n\tfunction validateInt32(value) {\n\t\treturn Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;\n\t}\n\tfunction validateInt64(value) {\n\t\treturn Number.isInteger(value);\n\t}\n\tfunction validateNumber() {\n\t\treturn true;\n\t}\n\tconst Z_ANCHOR = /[^\\\\]\\\\Z/;\n\tfunction regex(str) {\n\t\tif (Z_ANCHOR.test(str)) return false;\n\t\ttry {\n\t\t\tnew RegExp(str);\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js\nvar require_limit = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.formatLimitDefinition = void 0;\n\tconst ajv_1 = require_ajv();\n\tconst codegen_1 = require_codegen();\n\tconst ops = codegen_1.operators;\n\tconst KWDs = {\n\t\tformatMaximum: {\n\t\t\tokStr: \"<=\",\n\t\t\tok: ops.LTE,\n\t\t\tfail: ops.GT\n\t\t},\n\t\tformatMinimum: {\n\t\t\tokStr: \">=\",\n\t\t\tok: ops.GTE,\n\t\t\tfail: ops.LT\n\t\t},\n\t\tformatExclusiveMaximum: {\n\t\t\tokStr: \"<\",\n\t\t\tok: ops.LT,\n\t\t\tfail: ops.GTE\n\t\t},\n\t\tformatExclusiveMinimum: {\n\t\t\tokStr: \">\",\n\t\t\tok: ops.GT,\n\t\t\tfail: ops.LTE\n\t\t}\n\t};\n\tconst error = {\n\t\tmessage: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,\n\t\tparams: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`\n\t};\n\texports.formatLimitDefinition = {\n\t\tkeyword: Object.keys(KWDs),\n\t\ttype: \"string\",\n\t\tschemaType: \"string\",\n\t\t$data: true,\n\t\terror,\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, schemaCode, keyword, it } = cxt;\n\t\t\tconst { opts, self } = it;\n\t\t\tif (!opts.validateFormats) return;\n\t\t\tconst fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, \"format\");\n\t\t\tif (fCxt.$data) validate$DataFormat();\n\t\t\telse validateFormat();\n\t\t\tfunction validate$DataFormat() {\n\t\t\t\tconst fmts = gen.scopeValue(\"formats\", {\n\t\t\t\t\tref: self.formats,\n\t\t\t\t\tcode: opts.code.formats\n\t\t\t\t});\n\t\t\t\tconst fmt = gen.const(\"fmt\", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);\n\t\t\t\tcxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != \"object\"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != \"function\"`, compareCode(fmt)));\n\t\t\t}\n\t\t\tfunction validateFormat() {\n\t\t\t\tconst format = fCxt.schema;\n\t\t\t\tconst fmtDef = self.formats[format];\n\t\t\t\tif (!fmtDef || fmtDef === true) return;\n\t\t\t\tif (typeof fmtDef != \"object\" || fmtDef instanceof RegExp || typeof fmtDef.compare != \"function\") throw new Error(`\"${keyword}\": format \"${format}\" does not define \"compare\" function`);\n\t\t\t\tconst fmt = gen.scopeValue(\"formats\", {\n\t\t\t\t\tkey: format,\n\t\t\t\t\tref: fmtDef,\n\t\t\t\t\tcode: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0\n\t\t\t\t});\n\t\t\t\tcxt.fail$data(compareCode(fmt));\n\t\t\t}\n\t\t\tfunction compareCode(fmt) {\n\t\t\t\treturn (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;\n\t\t\t}\n\t\t},\n\t\tdependencies: [\"format\"]\n\t};\n\tconst formatLimitPlugin = (ajv) => {\n\t\tajv.addKeyword(exports.formatLimitDefinition);\n\t\treturn ajv;\n\t};\n\texports.default = formatLimitPlugin;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js\nvar require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst formats_1 = require_formats();\n\tconst limit_1 = require_limit();\n\tconst codegen_1 = require_codegen();\n\tconst fullName = new codegen_1.Name(\"fullFormats\");\n\tconst fastName = new codegen_1.Name(\"fastFormats\");\n\tconst formatsPlugin = (ajv, opts = { keywords: true }) => {\n\t\tif (Array.isArray(opts)) {\n\t\t\taddFormats(ajv, opts, formats_1.fullFormats, fullName);\n\t\t\treturn ajv;\n\t\t}\n\t\tconst [formats, exportName] = opts.mode === \"fast\" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];\n\t\taddFormats(ajv, opts.formats || formats_1.formatNames, formats, exportName);\n\t\tif (opts.keywords) (0, limit_1.default)(ajv);\n\t\treturn ajv;\n\t};\n\tformatsPlugin.get = (name, mode = \"full\") => {\n\t\tconst f = (mode === \"fast\" ? formats_1.fastFormats : formats_1.fullFormats)[name];\n\t\tif (!f) throw new Error(`Unknown format \"${name}\"`);\n\t\treturn f;\n\t};\n\tfunction addFormats(ajv, list, fs, exportName) {\n\t\tvar _a;\n\t\tvar _b;\n\t\t(_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 || (_b.formats = (0, codegen_1._)`require(\"ajv-formats/dist/formats\").${exportName}`);\n\t\tfor (const f of list) ajv.addFormat(f, fs[f]);\n\t}\n\tmodule.exports = exports = formatsPlugin;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = formatsPlugin;\n}));\n\n//#endregion\n//#region ../core-internal/src/validators/ajvProvider.ts\nvar import_ajv = require_ajv();\nvar import__2019 = require__2019();\nvar import__2020 = require__2020();\nvar import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);\n/** `ajv-formats` default export, normalised through the CJS/ESM interop wrapper. */\nconst addFormats = import_dist.default;\nfunction createDefaultAjvInstance(engineClass) {\n\tconst ajv = new engineClass({\n\t\tstrict: false,\n\t\tvalidateFormats: true,\n\t\tvalidateSchema: false,\n\t\tallErrors: true\n\t});\n\taddFormats(ajv);\n\treturn ajv;\n}\n/**\n* AJV-backed JSON Schema validator. See `@modelcontextprotocol/{client,server}/validators/ajv`\n* for the customisation entry point (re-exports `Ajv` and `addFormats` from the bundled copy).\n*\n* Default dispatches on the schema's declared dialect: no `$schema` or 2020-12 → `Ajv2020`\n* (SEP-1613); 2019-09 → `Ajv2019`; draft-07 or draft-06 → the classic draft-07 `Ajv` class\n* (draft-07's changes over draft-06 are additive, so one engine covers both). Known draft-07 deviation: classic Ajv\n* evaluates keywords adjacent to `$ref` (stricter than draft-07's ignore-siblings rule, matching\n* v1's default engine), while the cfworker provider ignores them per spec.\n* Schemas declaring any other `$schema` are\n* rejected with a plain `Error`; pass a pre-configured Ajv instance to validate\n* other dialects. The SDK bundles ajv internally but does not re-export `Ajv2020` (its type\n* graph tips downstream declaration bundling — see #2339). To construct a custom 2020-12\n* instance, add `ajv` to your own dependencies (matching the SDK's pinned version) and\n* `import { Ajv2020 } from 'ajv/dist/2020.js'` — `new Ajv(...)` is the draft-07 class and would\n* silently downgrade dialect.\n*\n* @example Use with default configuration\n* ```ts source=\"./ajvProvider.examples.ts#AjvJsonSchemaValidator_default\"\n* const validator = new AjvJsonSchemaValidator();\n* ```\n*\n* @example Use with a custom AJV instance\n* ```ts source=\"./ajvProvider.examples.ts#AjvJsonSchemaValidator_customInstance\"\n* // import { Ajv2020 } from 'ajv/dist/2020.js';\n* const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true });\n* const validator = new AjvJsonSchemaValidator(ajv);\n* ```\n*\n* @example Register ajv-formats\n* ```ts source=\"./ajvProvider.examples.ts#AjvJsonSchemaValidator_withFormats\"\n* // import { Ajv2020 } from 'ajv/dist/2020.js';\n* const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true });\n* addFormats(ajv);\n* const validator = new AjvJsonSchemaValidator(ajv);\n* ```\n*/\nvar AjvJsonSchemaValidator = class {\n\t_ajv;\n\t/** Lazy classic (draft-07) engine, built on the first draft-07/draft-06-declared schema. */\n\t_ajvDraft7;\n\t/** Lazy 2019-09 engine, built on the first 2019-09-declared schema. */\n\t_ajv2019;\n\t/** True iff the constructor received a caller-supplied engine; the `$schema` dispatch is skipped. */\n\t_userAjv;\n\t/**\n\t* @param ajv - Optional pre-configured AJV-compatible instance. When supplied, this instance is\n\t* used for **every** schema regardless of its declared `$schema` (the caller owns dialect\n\t* choice). When omitted, the provider constructs per-dialect engines (`Ajv2020`, `Ajv2019`,\n\t* and the classic draft-07 `Ajv` for draft-07/06-declared schemas) with\n\t* `strict: false`, `validateFormats: true`, `validateSchema: false`, `allErrors: true`, and\n\t* `ajv-formats` registered — **lazily, on the first {@linkcode getValidator} call needing each**, so\n\t* constructing the provider (e.g. as the default validator of a `Client`/`Server` that never\n\t* validates a JSON Schema) does not pay the ajv + ajv-formats instantiation cost. The parameter\n\t* is typed structurally so consumers who don't pass an instance need not have `ajv` installed.\n\t*/\n\tconstructor(ajv) {\n\t\tthis._userAjv = ajv !== void 0;\n\t\tthis._ajv = ajv;\n\t}\n\t/** The underlying 2020-12 engine — the default instance is created on first use. */\n\tget ajv() {\n\t\treturn this._ajv ??= createDefaultAjvInstance(import__2020.Ajv2020);\n\t}\n\t/**\n\t* Pick the engine for a schema's declared dialect. A caller-supplied engine is used for\n\t* every schema — do not second-guess by `$schema` (bring-your-own-validator means\n\t* bring-your-own-dialect). Otherwise: no `$schema` or 2020-12 → `Ajv2020`; 2019-09 →\n\t* `Ajv2019`; draft-07 or draft-06 → classic `Ajv`; anything else → `Error`.\n\t*/\n\t_engineFor(schema) {\n\t\tif (this._userAjv) return this.ajv;\n\t\tconst dialect = declaredDialect(schema, \"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.\");\n\t\tif (dialect === \"2020-12\") return this.ajv;\n\t\tif (dialect === \"2019-09\") return this._ajv2019 ??= createDefaultAjvInstance(import__2019.Ajv2019);\n\t\treturn this._ajvDraft7 ??= createDefaultAjvInstance(import_ajv.Ajv);\n\t}\n\tgetValidator(schema) {\n\t\tconst engine = this._engineFor(schema);\n\t\tconst ajvValidator = \"$id\" in schema && typeof schema.$id === \"string\" ? engine.getSchema(schema.$id) ?? engine.compile(schema) : engine.compile(schema);\n\t\treturn (input) => {\n\t\t\treturn ajvValidator(input) ? {\n\t\t\t\tvalid: true,\n\t\t\t\tdata: input,\n\t\t\t\terrorMessage: void 0\n\t\t\t} : {\n\t\t\t\tvalid: false,\n\t\t\t\tdata: void 0,\n\t\t\t\terrorMessage: engine.errorsText(ajvValidator.errors)\n\t\t\t};\n\t\t};\n\t}\n};\n/**\n* Draft-07 AJV class, re-exported for consumers who need to opt back to the pre-SEP-1613 default.\n* The full v1-equivalent construction is:\n*\n* ```ts\n* const ajv = new Ajv({ strict: false, validateFormats: true, validateSchema: false, allErrors: true });\n* addFormats(ajv);\n* new AjvJsonSchemaValidator(ajv);\n* ```\n*\n* (omitting `validateSchema: false` makes a 2020-12-stamped `$schema` fail with an opaque\n* \"no schema with key or ref …\" engine error; omitting `addFormats` silently drops `format`\n* validation that the v1 default had).\n*\n* The SDK bundles ajv internally but does not re-export `Ajv2020` (its type graph tips downstream\n* declaration bundling — see #2339). To construct a custom 2020-12 instance, add `ajv` to your own\n* dependencies (matching the SDK's pinned version) and `import { Ajv2020 } from 'ajv/dist/2020.js'`.\n*/\nconst Ajv = import_ajv.Ajv;\n\n//#endregion\nexport { AjvJsonSchemaValidator as n, addFormats as r, Ajv as t };\n//# sourceMappingURL=ajvProvider-CEoC__sr.mjs.map","import { A as promptArgumentsFromStandardSchema, At as LATEST_PROTOCOL_VERSION, B as scanXMcpHeaderDeclarations, C as REQUEST_STATE_ONLY_LEG_PACING_MS, Ct as CLIENT_CAPABILITIES_META_KEY, E as sleep, H as assertCompleteRequestPrompt, Ht as requiredClientCapabilitiesForInputRequest, It as SERVER_INFO_META_KEY, Kt as SdkError, Lt as SUBSCRIPTION_ID_META_KEY, M as validateStandardSchema, N as parseSchema, T as linkedRoundAbort, U as assertCompleteRequestResourceTemplate, Vt as missingClientCapabilities, _ as mergeCapabilities, _t as normalizeContentlessToolResult, a as UriTemplate, b as withRequestStateValue, bt as legacyProtocolVersions, ct as codecForVersion, dt as ResourceNotFoundError, g as Protocol, gt as attachCacheHintFallback, ht as assertValidCacheHint, j as standardSchemaToJsonSchema, jt as LOG_LEVEL_META_KEY, lt as MissingRequiredClientCapabilityError, mt as ProtocolErrorCode, nt as LoggingLevelSchema, q as isInputRequiredResult, qt as SdkErrorCode, r as normalizeRawShapeSchema, s as validateAndWarnToolName, st as MODERN_WIRE_REVISION, ut as ProtocolError, v as requestStateAccessor, w as inputRequiredRoundsExceededMessage, xt as modernProtocolVersions, yt as isModernProtocolVersion } from \"./src-CX2iR2pK.mjs\";\nimport { DefaultJsonSchemaValidator } from \"@modelcontextprotocol/server/_shims\";\n\n//#region src/server/completable.ts\nconst COMPLETABLE_SYMBOL = Symbol.for(\"mcp.completable\");\n/**\n* Wraps a schema to provide autocompletion capabilities. Useful for, e.g., prompt arguments in MCP.\n*\n* @example\n* ```ts source=\"./completable.examples.ts#completable_basicUsage\"\n* server.registerPrompt(\n*     'review-code',\n*     {\n*         title: 'Code Review',\n*         argsSchema: z.object({\n*             language: completable(z.string().describe('Programming language'), value =>\n*                 ['typescript', 'javascript', 'python', 'rust', 'go'].filter(lang => lang.startsWith(value))\n*             )\n*         })\n*     },\n*     ({ language }) => ({\n*         messages: [\n*             {\n*                 role: 'user' as const,\n*                 content: {\n*                     type: 'text' as const,\n*                     text: `Review this ${language} code.`\n*                 }\n*             }\n*         ]\n*     })\n* );\n* ```\n*\n* @see {@linkcode server/mcp.McpServer.registerPrompt | McpServer.registerPrompt} for using completable schemas in prompt argument definitions\n*/\nfunction completable(schema, complete) {\n\tObject.defineProperty(schema, COMPLETABLE_SYMBOL, {\n\t\tvalue: { complete },\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tconfigurable: false\n\t});\n\treturn schema;\n}\n/**\n* Checks if a schema is completable (has completion metadata).\n*/\nfunction isCompletable(schema) {\n\treturn !!schema && typeof schema === \"object\" && COMPLETABLE_SYMBOL in schema;\n}\n/**\n* Gets the completer callback from a completable schema, if it exists.\n*/\nfunction getCompleter(schema) {\n\treturn schema[COMPLETABLE_SYMBOL]?.complete;\n}\n\n//#endregion\n//#region src/server/sseKeepAlive.ts\n/** Default interval between SSE keep-alive comment frames. */\nconst DEFAULT_SSE_KEEP_ALIVE_MS = 15e3;\nconst MAX_TIMER_DELAY_MS = 2 ** 31 - 1;\n/** Arms an unref'd timer, or disables keep-alive for invalid delays. */\nfunction armSseKeepAlive(intervalMs, onTick) {\n\tif (!Number.isFinite(intervalMs) || intervalMs < 1) return;\n\tconst timer = setInterval(onTick, Math.min(intervalMs, MAX_TIMER_DELAY_MS));\n\ttimer.unref?.();\n\treturn timer;\n}\n\n//#endregion\n//#region src/server/serverEventBus.ts\n/**\n* A `ServerEventBus` backed by an in-process listener set.\n*\n* `publish()` delivers synchronously to the live listener set (a listener\n* unsubscribing itself mid-dispatch is safe; the entry's listen-router\n* listeners never unsubscribe peers). A throwing listener does not stop\n* delivery to the others.\n*/\nvar InMemoryServerEventBus = class {\n\t_listeners = /* @__PURE__ */ new Set();\n\t/**\n\t* @param onerror - Optional callback for errors thrown by listeners\n\t*   during dispatch.\n\t*/\n\tconstructor(onerror) {\n\t\tthis.onerror = onerror;\n\t}\n\tpublish(event) {\n\t\tfor (const listener of this._listeners) try {\n\t\t\tlistener(event);\n\t\t} catch (error) {\n\t\t\tthis.onerror?.(error instanceof Error ? error : new Error(String(error)));\n\t\t}\n\t}\n\tsubscribe(listener) {\n\t\tthis._listeners.add(listener);\n\t\tlet live = true;\n\t\treturn () => {\n\t\t\tif (!live) return;\n\t\t\tlive = false;\n\t\t\tthis._listeners.delete(listener);\n\t\t};\n\t}\n\t/** The number of currently registered listeners (test/introspection only — the routers track capacity via their own open-subscription set). */\n\tget listenerCount() {\n\t\treturn this._listeners.size;\n\t}\n};\n/** Build a {@linkcode ServerNotifier} over a bus. */\nfunction createServerNotifier(bus) {\n\treturn {\n\t\ttoolsChanged: () => bus.publish({ kind: \"tools_list_changed\" }),\n\t\tpromptsChanged: () => bus.publish({ kind: \"prompts_list_changed\" }),\n\t\tresourcesChanged: () => bus.publish({ kind: \"resources_list_changed\" }),\n\t\tresourceUpdated: (uri) => bus.publish({\n\t\t\tkind: \"resource_updated\",\n\t\t\turi\n\t\t})\n\t};\n}\n/**\n* Whether a `subscriptions/listen` filter accepts a given change event.\n*\n* Pure: no I/O, no mutation. The filter governs ONLY the four\n* subscription-gated change types — non-gated notifications never reach the\n* bus and are not modeled here.\n*\n* `resource_updated` matches only when `resourceSubscriptions` is present and\n* contains the event's URI exactly (per the spec: \"for these resource URIs\").\n*/\nfunction listenFilterAccepts(filter, event) {\n\tswitch (event.kind) {\n\t\tcase \"tools_list_changed\": return filter.toolsListChanged === true;\n\t\tcase \"prompts_list_changed\": return filter.promptsListChanged === true;\n\t\tcase \"resources_list_changed\": return filter.resourcesListChanged === true;\n\t\tcase \"resource_updated\": return filter.resourceSubscriptions !== void 0 && filter.resourceSubscriptions.includes(event.uri);\n\t}\n}\n/**\n* The honored subset of a requested filter: keeps only the fields the client\n* explicitly opted in to (drops `false` and absent fields), narrowed against\n* the server's declared capabilities when supplied. The serving entry sends\n* this back in `notifications/subscriptions/acknowledged` so the ack reflects\n* what the server can actually deliver.\n*\n* - `toolsListChanged` is honored only when `capabilities.tools.listChanged`\n*   is advertised; likewise `promptsListChanged` / `resourcesListChanged`.\n* - `resourceSubscriptions` is honored only when\n*   `capabilities.resources.subscribe` is advertised.\n*\n* `capabilities` is optional on this pure helper for test convenience only —\n* both wired routers REQUIRE capabilities at the call site (the HTTP router's\n* `serve()` takes a required parameter; `StdioListenRouter.serve()` throws\n* before `setServerCapabilities()` was called), so the fail-open\n* `undefined → honor everything` branch is never reachable on a wired entry.\n*/\nfunction honoredSubset(requested, capabilities) {\n\tconst honored = {};\n\tconst allow = (bit) => capabilities === void 0 || bit === true;\n\tif (requested.toolsListChanged === true && allow(capabilities?.tools?.listChanged)) honored.toolsListChanged = true;\n\tif (requested.promptsListChanged === true && allow(capabilities?.prompts?.listChanged)) honored.promptsListChanged = true;\n\tif (requested.resourcesListChanged === true && allow(capabilities?.resources?.listChanged)) honored.resourcesListChanged = true;\n\tif (requested.resourceSubscriptions !== void 0 && requested.resourceSubscriptions.length > 0 && allow(capabilities?.resources?.subscribe)) honored.resourceSubscriptions = [...requested.resourceSubscriptions];\n\treturn honored;\n}\n/** Map a {@linkcode ServerEvent} onto its wire notification `{method, params}`. */\nfunction serverEventToNotification(event) {\n\tswitch (event.kind) {\n\t\tcase \"tools_list_changed\": return { method: \"notifications/tools/list_changed\" };\n\t\tcase \"prompts_list_changed\": return { method: \"notifications/prompts/list_changed\" };\n\t\tcase \"resources_list_changed\": return { method: \"notifications/resources/list_changed\" };\n\t\tcase \"resource_updated\": return {\n\t\t\tmethod: \"notifications/resources/updated\",\n\t\t\tparams: { uri: event.uri }\n\t\t};\n\t}\n}\n\n//#endregion\n//#region src/server/listenRouter.ts\n/** Default capacity guard: refuse a new subscription when this many are already open. */\nconst DEFAULT_MAX_SUBSCRIPTIONS = 1024;\nfunction jsonRpcError(id, code, message) {\n\treturn Response.json({\n\t\tjsonrpc: \"2.0\",\n\t\terror: {\n\t\t\tcode,\n\t\t\tmessage\n\t\t},\n\t\tid\n\t}, { status: 200 });\n}\n/** Stamp the subscription id onto a notification's `_meta`. Non-mutating. */\nfunction stampSubscriptionId(notification, subscriptionId) {\n\treturn {\n\t\tmethod: notification.method,\n\t\tparams: {\n\t\t\t...notification.params,\n\t\t\t_meta: {\n\t\t\t\t...notification.params?._meta,\n\t\t\t\t[SUBSCRIPTION_ID_META_KEY]: subscriptionId\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* Read the requested filter off a `subscriptions/listen` request body.\n* Returns the validated filter, or `undefined` when `params.notifications`\n* is absent or fails the schema (the caller answers `-32602` — the spec\n* marks `notifications` REQUIRED on the listen request).\n*/\nfunction parseListenFilter(message) {\n\tconst outcome = codecForVersion(MODERN_WIRE_REVISION).validateRequest(\"subscriptions/listen\", message);\n\treturn outcome.ok ? outcome.value.params?.notifications : void 0;\n}\nfunction createListenRouter(options) {\n\tconst { bus, onerror } = options;\n\tconst maxSubscriptions = options.maxSubscriptions ?? DEFAULT_MAX_SUBSCRIPTIONS;\n\tconst keepAliveMs = options.keepAliveMs ?? DEFAULT_SSE_KEEP_ALIVE_MS;\n\tconst open = /* @__PURE__ */ new Set();\n\tfunction serve(message, signal, capabilities, serverInfo) {\n\t\tif (open.size >= maxSubscriptions) {\n\t\t\tonerror?.(/* @__PURE__ */ new Error(`subscriptions/listen refused: subscription limit reached (${maxSubscriptions})`));\n\t\t\treturn jsonRpcError(message.id, -32603, \"Subscription limit reached\");\n\t\t}\n\t\tconst filter = parseListenFilter(message);\n\t\tif (filter === void 0) return jsonRpcError(message.id, -32602, \"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter\");\n\t\tconst honored = honoredSubset(filter, capabilities);\n\t\tconst subscriptionId = message.id;\n\t\tconst encoder = new TextEncoder();\n\t\tlet controller;\n\t\tlet closed = false;\n\t\tlet unsubscribe;\n\t\tlet keepAliveTimer;\n\t\tlet abortCleanup;\n\t\tconst writeFrame = (frame) => {\n\t\t\tif (closed) return;\n\t\t\ttry {\n\t\t\t\tcontroller.enqueue(encoder.encode(frame));\n\t\t\t} catch (error) {\n\t\t\t\tonerror?.(error instanceof Error ? error : new Error(String(error)));\n\t\t\t}\n\t\t};\n\t\tconst writeNotification = (method, params) => {\n\t\t\twriteFrame(`event: message\\ndata: ${JSON.stringify({\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tmethod,\n\t\t\t\tparams\n\t\t\t})}\\n\\n`);\n\t\t};\n\t\tconst teardown = (graceful) => {\n\t\t\tif (closed) return;\n\t\t\tif (graceful) writeFrame(`event: message\\ndata: ${JSON.stringify({\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: subscriptionId,\n\t\t\t\tresult: {\n\t\t\t\t\tresultType: \"complete\",\n\t\t\t\t\t_meta: {\n\t\t\t\t\t\t[SUBSCRIPTION_ID_META_KEY]: subscriptionId,\n\t\t\t\t\t\t[SERVER_INFO_META_KEY]: serverInfo\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})}\\n\\n`);\n\t\t\tclosed = true;\n\t\t\ttry {\n\t\t\t\tunsubscribe?.();\n\t\t\t} catch (error) {\n\t\t\t\tonerror?.(error instanceof Error ? error : new Error(String(error)));\n\t\t\t}\n\t\t\tif (keepAliveTimer !== void 0) clearInterval(keepAliveTimer);\n\t\t\tabortCleanup?.();\n\t\t\topen.delete(teardown);\n\t\t\ttry {\n\t\t\t\tcontroller.close();\n\t\t\t} catch {}\n\t\t};\n\t\tconst readable = new ReadableStream({\n\t\t\tstart(streamController) {\n\t\t\t\tcontroller = streamController;\n\t\t\t\tconst ack = stampSubscriptionId({\n\t\t\t\t\tmethod: \"notifications/subscriptions/acknowledged\",\n\t\t\t\t\tparams: { notifications: honored }\n\t\t\t\t}, subscriptionId);\n\t\t\t\twriteNotification(ack.method, ack.params);\n\t\t\t\tunsubscribe = bus.subscribe((event) => {\n\t\t\t\t\tif (closed || !listenFilterAccepts(honored, event)) return;\n\t\t\t\t\tconst note = stampSubscriptionId(serverEventToNotification(event), subscriptionId);\n\t\t\t\t\twriteNotification(note.method, note.params);\n\t\t\t\t});\n\t\t\t\tkeepAliveTimer = armSseKeepAlive(keepAliveMs, () => writeFrame(\": keepalive\\n\\n\"));\n\t\t\t\topen.add(teardown);\n\t\t\t},\n\t\t\tcancel() {\n\t\t\t\tteardown(false);\n\t\t\t}\n\t\t});\n\t\tif (signal !== void 0) if (signal.aborted) teardown(false);\n\t\telse {\n\t\t\tconst onAbort = () => teardown(false);\n\t\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\tabortCleanup = () => signal.removeEventListener(\"abort\", onAbort);\n\t\t}\n\t\treturn new Response(readable, {\n\t\t\tstatus: 200,\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"text/event-stream\",\n\t\t\t\t\"Cache-Control\": \"no-cache, no-transform\",\n\t\t\t\tConnection: \"keep-alive\",\n\t\t\t\t\"X-Accel-Buffering\": \"no\"\n\t\t\t}\n\t\t});\n\t}\n\treturn {\n\t\tserve,\n\t\tcloseAll() {\n\t\t\tfor (const teardown of open) teardown(true);\n\t\t},\n\t\tget openCount() {\n\t\t\treturn open.size;\n\t\t}\n\t};\n}\nconst CHANGE_NOTIFICATION_METHODS = new Set([\n\t\"notifications/tools/list_changed\",\n\t\"notifications/prompts/list_changed\",\n\t\"notifications/resources/list_changed\",\n\t\"notifications/resources/updated\"\n]);\n/**\n* Per-connection listen state for the stdio entry. One instance is held by\n* `serveStdio` for the connection lifetime; it routes inbound\n* `subscriptions/listen` / `notifications/cancelled` and rewrites outbound\n* change notifications onto the active subscriptions. No bus — the long-lived\n* pinned instance's existing `send*ListChanged()` calls feed straight into\n* `routeOutbound()`.\n*/\nvar StdioListenRouter = class {\n\t/** Active subscriptions, keyed by the listen request's JSON-RPC id verbatim. */\n\t_subs = /* @__PURE__ */ new Map();\n\t/**\n\t* The serving instance's declared capabilities. Filled in by the entry\n\t* once the modern instance is constructed (the router is created before\n\t* the instance exists), so the acknowledged filter is narrowed against\n\t* what the server can actually deliver.\n\t*/\n\t_serverCapabilities;\n\t/**\n\t* The serving instance's identity, stamped onto the graceful-close\n\t* results' `_meta` (the spec's `SubscriptionsListenResultMeta` extends\n\t* `ResultMetaObject`). Handed over together with the capabilities.\n\t*/\n\t_serverInfo;\n\tconstructor(_maxSubscriptions = DEFAULT_MAX_SUBSCRIPTIONS, serverCapabilities, serverInfo) {\n\t\tthis._maxSubscriptions = _maxSubscriptions;\n\t\tthis._serverCapabilities = serverCapabilities;\n\t\tthis._serverInfo = serverInfo;\n\t}\n\t/**\n\t* Record the serving instance's declared capabilities and identity once\n\t* it has been constructed. Called by `serveStdio`'s connect path;\n\t* subsequent `serve()` calls narrow the honored filter against the\n\t* capabilities, and `teardownAll()` stamps the identity.\n\t*/\n\tsetServerCapabilities(capabilities, serverInfo) {\n\t\tthis._serverCapabilities = capabilities;\n\t\tif (serverInfo !== void 0) this._serverInfo = serverInfo;\n\t}\n\t/** Whether `id` is an active listen subscription on this connection. */\n\thas(id) {\n\t\treturn this._subs.has(id);\n\t}\n\t/**\n\t* Serve one inbound `subscriptions/listen` request: registers the\n\t* subscription and returns the stamped acknowledged notification (or, on\n\t* capacity / params rejection, the in-band JSON-RPC error response).\n\t*\n\t* @throws when called before {@linkcode setServerCapabilities} (or the\n\t* constructor) has supplied the serving instance's capabilities. Honoring a\n\t* filter without knowing the server's advertised capabilities would fail\n\t* open (deliver unadvertised types); the entry guarantees capabilities are\n\t* set before any listen request is routed here.\n\t*/\n\tserve(message) {\n\t\tif (this._serverCapabilities === void 0) throw new Error(\"StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities\");\n\t\tif (this._subs.size >= this._maxSubscriptions) return {\n\t\t\tjsonrpc: \"2.0\",\n\t\t\tid: message.id,\n\t\t\terror: {\n\t\t\t\tcode: -32603,\n\t\t\t\tmessage: \"Subscription limit reached\"\n\t\t\t}\n\t\t};\n\t\tconst filter = parseListenFilter(message);\n\t\tif (filter === void 0) return {\n\t\t\tjsonrpc: \"2.0\",\n\t\t\tid: message.id,\n\t\t\terror: {\n\t\t\t\tcode: -32602,\n\t\t\t\tmessage: \"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter\"\n\t\t\t}\n\t\t};\n\t\tconst honored = honoredSubset(filter, this._serverCapabilities);\n\t\tthis._subs.set(message.id, honored);\n\t\treturn stampSubscriptionId({\n\t\t\tmethod: \"notifications/subscriptions/acknowledged\",\n\t\t\tparams: { notifications: honored }\n\t\t}, message.id);\n\t}\n\t/**\n\t* Tear down one subscription (inbound `notifications/cancelled`). Returns\n\t* `true` when a subscription was removed. After this call NOTHING further\n\t* is delivered for that subscription id (the post-cancel hardening).\n\t*/\n\tcancel(id) {\n\t\treturn this._subs.delete(id);\n\t}\n\t/**\n\t* Route an outbound notification through the active subscriptions.\n\t*\n\t* - For a subscription-gated change notification, returns one stamped copy\n\t*   per subscription that opted in to it (an empty array means it is\n\t*   dropped — the modern era never delivers an un-requested change type).\n\t* - For any other outbound message, returns `'passthrough'` (the entry\n\t*   forwards it as-is).\n\t*/\n\trouteOutbound(message) {\n\t\tif (!CHANGE_NOTIFICATION_METHODS.has(message.method)) return \"passthrough\";\n\t\tconst uriParam = message.params?.[\"uri\"];\n\t\tconst uri = typeof uriParam === \"string\" ? uriParam : void 0;\n\t\tconst event = notificationToServerEvent(message.method, uri);\n\t\tconst out = [];\n\t\tfor (const [subscriptionId, filter] of this._subs) if (listenFilterAccepts(filter, event)) out.push(stampSubscriptionId({\n\t\t\tmethod: message.method,\n\t\t\tparams: message.params ?? {}\n\t\t}, subscriptionId));\n\t\treturn out;\n\t}\n\t/**\n\t* Server-side graceful teardown of every active subscription: returns the\n\t* empty `subscriptions/listen` JSON-RPC result for each subscription id —\n\t* the spec's graceful-close signal, `_meta` carrying the subscription id\n\t* and the serving instance's identity — for the entry to emit before\n\t* closing the wire. Clears the set so nothing further is delivered.\n\t*/\n\tteardownAll() {\n\t\tconst out = [];\n\t\tfor (const id of this._subs.keys()) out.push({\n\t\t\tjsonrpc: \"2.0\",\n\t\t\tid,\n\t\t\tresult: {\n\t\t\t\tresultType: \"complete\",\n\t\t\t\t_meta: {\n\t\t\t\t\t[SUBSCRIPTION_ID_META_KEY]: id,\n\t\t\t\t\t...this._serverInfo !== void 0 && { [SERVER_INFO_META_KEY]: this._serverInfo }\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis._subs.clear();\n\t\treturn out;\n\t}\n};\nfunction notificationToServerEvent(method, uri) {\n\tswitch (method) {\n\t\tcase \"notifications/tools/list_changed\": return { kind: \"tools_list_changed\" };\n\t\tcase \"notifications/prompts/list_changed\": return { kind: \"prompts_list_changed\" };\n\t\tcase \"notifications/resources/list_changed\": return { kind: \"resources_list_changed\" };\n\t\tdefault: return {\n\t\t\tkind: \"resource_updated\",\n\t\t\turi: uri ?? \"\"\n\t\t};\n\t}\n}\n\n//#endregion\n//#region src/server/legacyInputRequiredShim.ts\n/**\n* Default handler re-entries per originating request — tighter than the\n* client driver's 10 because the shim holds a live wire request open.\n*/\nconst DEFAULT_LEGACY_SHIM_MAX_ROUNDS = 8;\n/** Default per-leg timeout: legs are human-paced, so the 60s protocol default is wrong. */\nconst DEFAULT_LEGACY_SHIM_ROUND_TIMEOUT_MS = 6e5;\n/** Resolves and validates `ServerOptions.inputRequired`, failing loudly at construction time. */\nfunction resolveLegacyShimOptions(options) {\n\tif (options?.maxRounds !== void 0 && (!Number.isInteger(options.maxRounds) || options.maxRounds < 1)) throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${options.maxRounds})`);\n\tif (options?.roundTimeoutMs !== void 0 && (!Number.isFinite(options.roundTimeoutMs) || options.roundTimeoutMs <= 0)) throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${options.roundTimeoutMs})`);\n\treturn {\n\t\tmaxRounds: options?.maxRounds ?? DEFAULT_LEGACY_SHIM_MAX_ROUNDS,\n\t\troundTimeoutMs: options?.roundTimeoutMs ?? DEFAULT_LEGACY_SHIM_ROUND_TIMEOUT_MS,\n\t\tlegacyShim: options?.legacyShim ?? true\n\t};\n}\n/**\n* Validates one `inputRequests` entry: malformed or unknown kinds are server\n* bugs and fail loudly on both eras. Shared by the modern seam's capability\n* check and the shim's gate.\n*/\nfunction coerceEmbeddedInputRequest(method, key, entry) {\n\tif (entry === null || typeof entry !== \"object\" || typeof entry.method !== \"string\") throw new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned an invalid input request '${key}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);\n\tconst embedded = entry;\n\tconst required = requiredClientCapabilitiesForInputRequest(embedded);\n\tif (required === void 0) throw new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned an input request '${key}' of kind '${embedded.method}', which is not an embedded request the 2026-07-28 revision defines`);\n\treturn {\n\t\tembedded,\n\t\trequired\n\t};\n}\n/**\n* The 2025-11-25 URL-mode wire shape requires an `elicitationId`; the 2026\n* in-band shape has none, so URL legs mint one (CSPRNG-backed, with a\n* getRandomValues fallback for runtimes without `randomUUID`).\n*/\nfunction syntheticElicitationId() {\n\tconst webCrypto = globalThis.crypto;\n\tif (webCrypto?.randomUUID !== void 0) return webCrypto.randomUUID();\n\tconst bytes = new Uint8Array(16);\n\twebCrypto.getRandomValues(bytes);\n\tbytes[6] = bytes[6] & 15 | 64;\n\tbytes[8] = bytes[8] & 63 | 128;\n\tconst hex = [...bytes].map((byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n\treturn `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n/** Per-family surfacing: tools/call → isError result (the 2025 idiom); prompts/resources → JSON-RPC error. */\nfunction legacyShimFailure(method, message) {\n\tif (method === \"tools/call\") return {\n\t\tcontent: [{\n\t\t\ttype: \"text\",\n\t\t\ttext: message\n\t\t}],\n\t\tisError: true\n\t};\n\tthrow new ProtocolError(ProtocolErrorCode.InternalError, message);\n}\n/** The fulfilment loop — see the module doc for the contract. */\nvar LegacyInputRequiredShim = class {\n\tconstructor(_host) {\n\t\tthis._host = _host;\n\t}\n\tasync fulfill(method, handler, request, ctx, firstResult) {\n\t\tconst { maxRounds, roundTimeoutMs } = this._host;\n\t\tconst outerSignal = ctx.mcpReq.signal;\n\t\tlet current = firstResult;\n\t\tlet round = 0;\n\t\twhile (true) {\n\t\t\tround += 1;\n\t\t\tif (round > maxRounds) return legacyShimFailure(method, inputRequiredRoundsExceededMessage(method, maxRounds));\n\t\t\tconst inputRequests = current.inputRequests;\n\t\t\tconst hasInputRequests = inputRequests != null && Object.keys(inputRequests).length > 0;\n\t\t\tconst requestState = typeof current.requestState === \"string\" ? current.requestState : void 0;\n\t\t\tif (!hasInputRequests && requestState === void 0) throw new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);\n\t\t\tlet responses;\n\t\t\tif (hasInputRequests) {\n\t\t\t\tconst declared = this._host.resolvedClientCapabilities(ctx);\n\t\t\t\tconst coerced = [];\n\t\t\t\tfor (const [key, entry] of Object.entries(inputRequests)) {\n\t\t\t\t\tconst { embedded, required } = coerceEmbeddedInputRequest(method, key, entry);\n\t\t\t\t\tif (embedded.method !== \"roots/list\" && embedded.params === void 0) throw new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned an input request '${key}' of kind '${embedded.method}' without params`);\n\t\t\t\t\tif (missingClientCapabilities(required, declared) !== void 0) return legacyShimFailure(method, `Cannot request input '${key}' (${embedded.method}): the client on this 2025-era connection did not declare the required capability${declared === void 0 ? \" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)\" : \"\"}`);\n\t\t\t\t\tcoerced.push([key, embedded]);\n\t\t\t\t}\n\t\t\t\tconst roundAbort = linkedRoundAbort(outerSignal);\n\t\t\t\ttry {\n\t\t\t\t\tconst legOptions = {\n\t\t\t\t\t\trelatedRequestId: ctx.mcpReq.id,\n\t\t\t\t\t\ttimeout: roundTimeoutMs,\n\t\t\t\t\t\tresetTimeoutOnProgress: true,\n\t\t\t\t\t\tonprogress: () => {},\n\t\t\t\t\t\tsignal: roundAbort.signal\n\t\t\t\t\t};\n\t\t\t\t\tconst fulfilled = await Promise.all(coerced.map(async ([key, embedded]) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn [key, await this._dispatchLeg(embedded, legOptions)];\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\troundAbort.abort(error);\n\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t\tresponses = Object.fromEntries(fulfilled);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (outerSignal.aborted) throw error;\n\t\t\t\t\treturn legacyShimFailure(method, `Fulfilling input required by '${method}' failed: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\t\t} finally {\n\t\t\t\t\troundAbort.dispose();\n\t\t\t\t}\n\t\t\t} else await sleep(REQUEST_STATE_ONLY_LEG_PACING_MS, outerSignal);\n\t\t\tlet ctxNext = {\n\t\t\t\t...ctx,\n\t\t\t\tmcpReq: {\n\t\t\t\t\t...ctx.mcpReq,\n\t\t\t\t\tinputResponses: responses,\n\t\t\t\t\tdroppedInputResponseKeys: void 0,\n\t\t\t\t\trequestState: requestStateAccessor(requestState)\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (requestState !== void 0) {\n\t\t\t\tconst decoded = await this._host.verifyRequestState(requestState, ctxNext, method);\n\t\t\t\tif (decoded !== void 0) ctxNext = withRequestStateValue(ctxNext, decoded);\n\t\t\t}\n\t\t\tconst next = await handler(request, ctxNext);\n\t\t\tif (!isInputRequiredResult(next)) return next;\n\t\t\tcurrent = next;\n\t\t}\n\t}\n\t/** Routes one embedded request through the host's existing 2025-era senders (gate already ran). */\n\tasync _dispatchLeg(embedded, options) {\n\t\tswitch (embedded.method) {\n\t\t\tcase \"elicitation/create\": {\n\t\t\t\tlet params = embedded.params;\n\t\t\t\tif (params.mode === \"url\" && params.elicitationId === void 0) params = {\n\t\t\t\t\t...params,\n\t\t\t\t\telicitationId: syntheticElicitationId()\n\t\t\t\t};\n\t\t\t\treturn await this._host.sendElicitation(params, options);\n\t\t\t}\n\t\t\tcase \"sampling/createMessage\": return await this._host.sendSampling(embedded.params, options);\n\t\t\tcase \"roots/list\": return await this._host.listRoots(embedded.params, options);\n\t\t}\n\t}\n};\n\n//#endregion\n//#region src/server/server.ts\n/**\n* The request methods whose 2026-07-28 result vocabulary includes\n* `input_required` (the multi round-trip methods). Returning an\n* input-required result from any other handler is a server bug.\n*/\nconst INPUT_REQUIRED_CAPABLE_METHODS = new Set([\n\t\"tools/call\",\n\t\"prompts/get\",\n\t\"resources/read\"\n]);\nlet writeClientIdentity;\nlet installDiscoverHandler;\nlet readServerIdentity;\n/**\n* Package-internal: backfills the connection-scoped client-identity fields of a\n* per-request server instance from the request's validated `_meta` envelope, so the\n* (deprecated) {@linkcode Server.getClientCapabilities} / {@linkcode Server.getClientVersion}\n* accessors keep answering on instances that never see an `initialize` handshake.\n* Not public API.\n*/\nfunction seedClientIdentityFromEnvelope(server, identity) {\n\twriteClientIdentity(server, identity);\n}\n/**\n* Package-internal: installs the modern-only `server/discover` handler on an instance\n* the HTTP entry has marked as serving the 2026-07-28 era, and makes sure the modern\n* revisions the entry serves appear in the instance's supported-versions list (so the\n* discover advertisement and version-mismatch errors name them). Idempotent.\n* Hand-constructed instances are unaffected: nothing else calls this, so they keep\n* answering `-32601` unless their own supported-versions list opts into a modern\n* revision. Not public API.\n*/\nfunction installModernOnlyHandlers(server, servedModernVersions) {\n\tinstallDiscoverHandler(server, servedModernVersions);\n}\n/**\n* Package-internal: the instance's implementation identity, for the serving\n* entries to stamp onto entry-built results (the `subscriptions/listen`\n* graceful-close result — built outside the encode seam, but the spec's\n* `SubscriptionsListenResultMeta` extends `ResultMetaObject`, so it carries\n* the serverInfo SHOULD like every other result). Not public API.\n*/\nfunction serverIdentityOf(server) {\n\treturn readServerIdentity(server);\n}\n/**\n* An MCP server on top of a pluggable transport.\n*\n* This server will automatically respond to the initialization flow as initiated from the client.\n*\n* @deprecated Use {@linkcode server/mcp.McpServer | McpServer} instead for the high-level API. Only use `Server` for advanced use cases.\n*/\nvar Server = class extends Protocol {\n\t_clientCapabilities;\n\t_clientVersion;\n\tstatic {\n\t\twriteClientIdentity = (server, identity) => {\n\t\t\tif (identity.clientCapabilities !== void 0) server._clientCapabilities = identity.clientCapabilities;\n\t\t\tif (identity.clientInfo !== void 0) server._clientVersion = identity.clientInfo;\n\t\t};\n\t\tinstallDiscoverHandler = (server, servedModernVersions) => {\n\t\t\tconst missing = servedModernVersions.filter((version) => !server._supportedProtocolVersions.includes(version));\n\t\t\tif (missing.length > 0) server._supportedProtocolVersions = [...server._supportedProtocolVersions, ...missing];\n\t\t\tserver.setRequestHandler(\"server/discover\", () => server._ondiscover());\n\t\t};\n\t\treadServerIdentity = (server) => server._serverInfo;\n\t}\n\t_capabilities;\n\t_instructions;\n\t_jsonSchemaValidator;\n\t_cacheHints;\n\t_requestStateVerify;\n\t_inputRequiredServing;\n\t_legacyShim;\n\t/** Lazily-built legacy shim; the loop lives in legacyInputRequiredShim.ts behind a narrow host contract. */\n\t_legacyInputRequiredShim() {\n\t\treturn this._legacyShim ??= new LegacyInputRequiredShim({\n\t\t\tmaxRounds: this._inputRequiredServing.maxRounds,\n\t\t\troundTimeoutMs: this._inputRequiredServing.roundTimeoutMs,\n\t\t\tresolvedClientCapabilities: (ctx) => this._inputRequestCapabilityView(ctx),\n\t\t\tverifyRequestState: (state, ctx, method) => this._verifyRequestState(state, ctx, method),\n\t\t\tsendElicitation: (params, options) => this._sendElicitationLeg(params, options, { validateAcceptedContent: false }),\n\t\t\tsendSampling: (params, options) => this.createMessage(params, options),\n\t\t\tlistRoots: (params, options) => this.listRoots(params, options)\n\t\t});\n\t}\n\t/**\n\t* Callback for when initialization has fully completed (i.e., the client has sent an `notifications/initialized` notification).\n\t*/\n\toninitialized;\n\t/**\n\t* Initializes this server with the given name and version information.\n\t*/\n\tconstructor(_serverInfo, options) {\n\t\tsuper(options);\n\t\tthis._serverInfo = _serverInfo;\n\t\tthis._capabilities = options?.capabilities ? { ...options.capabilities } : {};\n\t\tthis._instructions = options?.instructions;\n\t\tthis._jsonSchemaValidator = options?.jsonSchemaValidator ?? new DefaultJsonSchemaValidator();\n\t\tthis._requestStateVerify = options?.requestState?.verify;\n\t\tthis._inputRequiredServing = resolveLegacyShimOptions(options?.inputRequired);\n\t\tif (options?.cacheHints !== void 0) {\n\t\t\tfor (const [operation, hint] of Object.entries(options.cacheHints)) if (hint !== void 0) assertValidCacheHint(hint, `cacheHints['${operation}']`);\n\t\t\tthis._cacheHints = options.cacheHints;\n\t\t}\n\t\tthis.setRequestHandler(\"initialize\", (request) => this._oninitialize(request));\n\t\tthis.setNotificationHandler(\"notifications/initialized\", () => this.oninitialized?.());\n\t\tif (modernProtocolVersions(this._supportedProtocolVersions).length > 0) this.setRequestHandler(\"server/discover\", () => this._ondiscover());\n\t\tif (this._capabilities.logging) this._registerLoggingHandler();\n\t}\n\t/**\n\t* Registers the built-in `logging/setLevel` request handler.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n\t* Remains functional during the deprecation window (at least twelve months).\n\t* Migrate to stderr logging (STDIO servers) or OpenTelemetry.\n\t*/\n\t_registerLoggingHandler() {\n\t\tthis.setRequestHandler(\"logging/setLevel\", async (request, ctx) => {\n\t\t\tconst transportSessionId = ctx.sessionId || ctx.http?.req?.headers.get(\"mcp-session-id\") || void 0;\n\t\t\tconst { level } = request.params;\n\t\t\tconst parseResult = parseSchema(LoggingLevelSchema, level);\n\t\t\tif (parseResult.success) this._loggingLevels.set(transportSessionId, parseResult.data);\n\t\t\treturn {};\n\t\t});\n\t}\n\tbuildContext(ctx, transportInfo) {\n\t\tconst hasHttpInfo = ctx.http || transportInfo?.request || transportInfo?.closeSSEStream || transportInfo?.closeStandaloneSSEStream;\n\t\treturn {\n\t\t\t...ctx,\n\t\t\tmcpReq: {\n\t\t\t\t...ctx.mcpReq,\n\t\t\t\tlog: (level, data, logger) => {\n\t\t\t\t\tif (!this._capabilities.logging) return Promise.resolve();\n\t\t\t\t\tlet threshold;\n\t\t\t\t\tif (this._servedModernEra()) {\n\t\t\t\t\t\tthreshold = ctx.mcpReq.envelope?.[LOG_LEVEL_META_KEY];\n\t\t\t\t\t\tif (threshold === void 0) return Promise.resolve();\n\t\t\t\t\t} else threshold = this._loggingLevels.get(ctx.sessionId) ?? this._loggingLevels.get(void 0);\n\t\t\t\t\tif (threshold !== void 0 && this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(threshold)) return Promise.resolve();\n\t\t\t\t\treturn ctx.mcpReq.notify({\n\t\t\t\t\t\tmethod: \"notifications/message\",\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\tlevel,\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\tlogger\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\telicitInput: (params, options) => this.elicitInput(params, options),\n\t\t\t\trequestSampling: (params, options) => this.createMessage(params, options)\n\t\t\t},\n\t\t\thttp: hasHttpInfo ? {\n\t\t\t\t...ctx.http,\n\t\t\t\treq: transportInfo?.request,\n\t\t\t\tcloseSSE: transportInfo?.closeSSEStream,\n\t\t\t\tcloseStandaloneSSE: transportInfo?.closeStandaloneSSEStream\n\t\t\t} : void 0\n\t\t};\n\t}\n\t_loggingLevels = /* @__PURE__ */ new Map();\n\tLOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index) => [level, index]));\n\tisMessageIgnored = (level, sessionId) => {\n\t\tconst currentLevel = this._loggingLevels.get(sessionId);\n\t\treturn currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;\n\t};\n\t/**\n\t* Registers new capabilities. This can only be called before connecting to a transport.\n\t*\n\t* The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).\n\t*/\n\tregisterCapabilities(capabilities) {\n\t\tif (this.transport) throw new SdkError(SdkErrorCode.AlreadyConnected, \"Cannot register capabilities after connecting to transport\");\n\t\tconst hadLogging = !!this._capabilities.logging;\n\t\tthis._capabilities = mergeCapabilities(this._capabilities, capabilities);\n\t\tif (!hadLogging && this._capabilities.logging) this._registerLoggingHandler();\n\t}\n\t/**\n\t* Enforces server-side validation for `tools/call` results regardless of how the\n\t* handler was registered, attaches the configured per-operation cache hint\n\t* (when one exists) so the 2026-07-28 encode seam can fill `ttlMs`/`cacheScope`\n\t* for results that do not provide their own, and owns the multi-round-trip\n\t* seam: on the methods whose 2026-07-28 result vocabulary includes\n\t* `input_required` (`tools/call`, `prompts/get`, `resources/read`) an\n\t* input-required return skips result-schema validation and is checked\n\t* against the served era, the at-least-one rule, and the request's own\n\t* declared client capabilities; on every other method an input-required\n\t* return is a server bug and fails loudly. The hint rides a symbol-keyed\n\t* property that is never serialized, so 2025-era responses are unaffected.\n\t*/\n\t_wrapHandler(method, handler) {\n\t\tif (method !== \"tools/call\") {\n\t\t\tconst cacheHint = this._cacheHints?.[method];\n\t\t\tconst isInputRequiredCapable = INPUT_REQUIRED_CAPABLE_METHODS.has(method);\n\t\t\tif (cacheHint === void 0 && !isInputRequiredCapable) return async (request, ctx) => {\n\t\t\t\tconst result = await handler(request, ctx);\n\t\t\t\tif (isInputRequiredResult(result)) throw new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);\n\t\t\t\treturn result;\n\t\t\t};\n\t\t\treturn async (request, ctx) => {\n\t\t\t\tconst result = isInputRequiredCapable ? await this._invokeInputRequiredCapableHandler(method, handler, request, ctx) : await handler(request, ctx);\n\t\t\t\tif (isInputRequiredResult(result)) {\n\t\t\t\t\tif (!isInputRequiredCapable) throw new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\treturn cacheHint === void 0 ? result : attachCacheHintFallback(result, cacheHint);\n\t\t\t};\n\t\t}\n\t\treturn async (request, ctx) => {\n\t\t\tconst codec = codecForVersion(this._negotiatedProtocolVersion);\n\t\t\tconst validatedRequest = codec.validateRequest(\"tools/call\", request);\n\t\t\tif (!validatedRequest.ok) throw new ProtocolError(validatedRequest.reason === \"not-in-era\" ? ProtocolErrorCode.InternalError : ProtocolErrorCode.InvalidParams, validatedRequest.reason === \"not-in-era\" ? \"No wire schema for tools/call in the resolved era\" : `Invalid tools/call request: ${validatedRequest.message}`);\n\t\t\tconst result = await this._invokeInputRequiredCapableHandler(\"tools/call\", handler, request, ctx);\n\t\t\tif (isInputRequiredResult(result)) return result;\n\t\t\tconst normalizedResult = normalizeContentlessToolResult(result);\n\t\t\tconst validationResult = codec.validateResult(\"tools/call\", normalizedResult);\n\t\t\tif (!validationResult.ok) throw new ProtocolError(validationResult.reason === \"not-in-era\" ? ProtocolErrorCode.InternalError : ProtocolErrorCode.InvalidParams, validationResult.reason === \"not-in-era\" ? \"No wire schema for tools/call in the resolved era\" : `Invalid tools/call result: ${validationResult.message}`);\n\t\t\treturn validationResult.value;\n\t\t};\n\t}\n\t/**\n\t* Whether this instance is bound to a 2026-07-28-or-later protocol\n\t* revision. Era is instance state — a serving entry (`createMcpHandler`,\n\t* `serveStdio`) marks the instance modern at construction; a 2025-era\n\t* `initialize` handshake binds it legacy. The multi-round-trip seam reads\n\t* this directly: there is no per-request era consult.\n\t*/\n\t_servedModernEra() {\n\t\treturn this._negotiatedProtocolVersion !== void 0 && isModernProtocolVersion(this._negotiatedProtocolVersion);\n\t}\n\t/**\n\t* Invokes a handler for one of the multi-round-trip methods and applies\n\t* the input-required seam:\n\t*\n\t* - a `UrlElicitationRequiredError` (or any 2025-style server→client\n\t*   request idiom) escaping the handler on a request served on the\n\t*   2026-07-28 era fails LOUDLY with a clear steer to\n\t*   `inputRequired.elicitUrl(...)` — the `-32042` error never reaches the\n\t*   2026-07-28 wire and the throw is not silently converted. Requests\n\t*   served on the 2025 era keep today's `-32042` behavior byte-exact (the\n\t*   error is rethrown unchanged).\n\t* - an input-required RETURN toward a 2026-07-28 request must satisfy\n\t*   the at-least-one rule, and every embedded request must be covered by\n\t*   the capabilities declared on the request's envelope (violations\n\t*   answer the typed `-32021` error). Toward a 2025-era request the\n\t*   return is fulfilled by the default-on legacy shim, whose own gate\n\t*   consults the initialize-declared capabilities and surfaces\n\t*   violations per family; `inputRequired.legacyShim: false` restores\n\t*   the pre-shim loud failure.\n\t*/\n\tasync _invokeInputRequiredCapableHandler(method, handler, request, ctx) {\n\t\tconst servedModern = this._servedModernEra();\n\t\tconst rawRequestState = ctx.mcpReq.requestState();\n\t\tif (rawRequestState !== void 0 && typeof rawRequestState !== \"string\") throw new ProtocolError(ProtocolErrorCode.InvalidParams, \"Invalid or expired requestState\", { reason: \"invalid_request_state\" });\n\t\tlet ctxForHandler = ctx;\n\t\tif (typeof rawRequestState === \"string\") {\n\t\t\tconst decoded = await this._verifyRequestState(rawRequestState, ctx, method);\n\t\t\tif (decoded !== void 0) ctxForHandler = withRequestStateValue(ctx, decoded);\n\t\t}\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await handler(request, ctxForHandler);\n\t\t} catch (error) {\n\t\t\tif (error instanceof ProtocolError && error.code === ProtocolErrorCode.UrlElicitationRequired) {\n\t\t\t\tif (!servedModern) throw error;\n\t\t\t\tthrow new ProtocolError(ProtocolErrorCode.InternalError, `URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (!isInputRequiredResult(result)) return result;\n\t\tif (!servedModern) {\n\t\t\tif (!this._inputRequiredServing.legacyShim) throw new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion ?? LATEST_PROTOCOL_VERSION}, which has no input_required vocabulary`);\n\t\t\treturn await this._legacyInputRequiredShim().fulfill(method, handler, request, ctxForHandler, result);\n\t\t}\n\t\tconst inputRequests = result.inputRequests;\n\t\tconst hasInputRequests = inputRequests != null && Object.keys(inputRequests).length > 0;\n\t\tconst hasRequestState = typeof result.requestState === \"string\";\n\t\tif (!hasInputRequests && !hasRequestState) throw new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);\n\t\tif (hasInputRequests) {\n\t\t\tconst declared = this._inputRequestCapabilityView(ctx);\n\t\t\tfor (const [key, entry] of Object.entries(inputRequests)) {\n\t\t\t\tconst { embedded, required } = coerceEmbeddedInputRequest(method, key, entry);\n\t\t\t\tconst missing = missingClientCapabilities(required, declared);\n\t\t\t\tif (missing !== void 0) throw new MissingRequiredClientCapabilityError({ requiredCapabilities: missing }, `Cannot request input '${key}' (${embedded.method}): the request's client capabilities do not declare the required capability`);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Runs the configured `requestState.verify` hook and returns its\n\t* resolved value (`undefined` when unconfigured or the hook returns\n\t* nothing). Deny-on-error: any hook failure answers the frozen `-32602`;\n\t* the reason goes to `onerror` only.\n\t*/\n\tasync _verifyRequestState(state, ctx, method) {\n\t\tif (this._requestStateVerify === void 0) return;\n\t\ttry {\n\t\t\treturn await this._requestStateVerify(state, ctx);\n\t\t} catch (error) {\n\t\t\tthis.onerror?.(/* @__PURE__ */ new Error(`requestState verification rejected ${method}: ${error instanceof Error ? error.message : String(error)}`));\n\t\t\tthrow new ProtocolError(ProtocolErrorCode.InvalidParams, \"Invalid or expired requestState\", { reason: \"invalid_request_state\" });\n\t\t}\n\t}\n\t/**\n\t* The per-request resolved client-capabilities view: the request's own\n\t* `_meta` envelope on the 2026 era; the `initialize`-declared state on a\n\t* 2025-era connection. Per-request instances that never saw an\n\t* initialize (stateless legacy) hold nothing, so gates refuse there.\n\t*/\n\t_inputRequestCapabilityView(ctx) {\n\t\treturn this._servedModernEra() ? ctx.mcpReq.envelope?.[CLIENT_CAPABILITIES_META_KEY] : this._clientCapabilities;\n\t}\n\t/**\n\t* Guard for the push-style server→client request APIs ({@linkcode createMessage},\n\t* {@linkcode elicitInput}, {@linkcode listRoots}, {@linkcode ping}) on a\n\t* modern-era instance: the 2026-07-28 revision has no server→client request\n\t* channel, so the call fails before any wire traffic with a typed error\n\t* whose message steers to `inputRequired(...)`. The base era gate would\n\t* also reject it; this guard runs first to carry the steer.\n\t*/\n\t_assertPushApiInServedEra(method) {\n\t\tif (this._servedModernEra()) throw new SdkError(SdkErrorCode.MethodNotSupportedByProtocolVersion, `Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${method}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`, {\n\t\t\tmethod,\n\t\t\tera: \"2026-07-28\"\n\t\t});\n\t}\n\tassertCapabilityForMethod(method) {\n\t\tswitch (method) {\n\t\t\tcase \"sampling/createMessage\":\n\t\t\t\tif (!this._clientCapabilities?.sampling) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support sampling (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"elicitation/create\":\n\t\t\t\tif (!this._clientCapabilities?.elicitation) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support elicitation (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"roots/list\":\n\t\t\t\tif (!this._clientCapabilities?.roots) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support listing roots (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"ping\": break;\n\t\t}\n\t}\n\tassertNotificationCapability(method) {\n\t\tswitch (method) {\n\t\t\tcase \"notifications/message\":\n\t\t\t\tif (!this._capabilities.logging) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support logging (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"notifications/resources/updated\":\n\t\t\tcase \"notifications/resources/list_changed\":\n\t\t\t\tif (!this._capabilities.resources) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support notifying about resources (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"notifications/tools/list_changed\":\n\t\t\t\tif (!this._capabilities.tools) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support notifying of tool list changes (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"notifications/prompts/list_changed\":\n\t\t\t\tif (!this._capabilities.prompts) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support notifying of prompt list changes (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"notifications/elicitation/complete\":\n\t\t\t\tif (!this._clientCapabilities?.elicitation?.url) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support URL elicitation (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"notifications/cancelled\": break;\n\t\t\tcase \"notifications/progress\": break;\n\t\t}\n\t}\n\tassertRequestHandlerCapability(method) {\n\t\tswitch (method) {\n\t\t\tcase \"completion/complete\":\n\t\t\t\tif (!this._capabilities.completions) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support completions (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"logging/setLevel\":\n\t\t\t\tif (!this._capabilities.logging) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support logging (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"prompts/get\":\n\t\t\tcase \"prompts/list\":\n\t\t\t\tif (!this._capabilities.prompts) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support prompts (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"resources/list\":\n\t\t\tcase \"resources/templates/list\":\n\t\t\tcase \"resources/read\":\n\t\t\t\tif (!this._capabilities.resources) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support resources (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"tools/call\":\n\t\t\tcase \"tools/list\":\n\t\t\t\tif (!this._capabilities.tools) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support tools (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"ping\":\n\t\t\tcase \"initialize\": break;\n\t\t}\n\t}\n\tasync _oninitialize(request) {\n\t\tconst requestedVersion = request.params.protocolVersion;\n\t\tthis._clientCapabilities = request.params.capabilities;\n\t\tthis._clientVersion = request.params.clientInfo;\n\t\tconst legacyVersions = legacyProtocolVersions(this._supportedProtocolVersions);\n\t\tconst protocolVersion = legacyVersions.includes(requestedVersion) ? requestedVersion : legacyVersions[0] ?? LATEST_PROTOCOL_VERSION;\n\t\tthis._negotiatedProtocolVersion = protocolVersion;\n\t\tthis.transport?.setProtocolVersion?.(protocolVersion);\n\t\treturn {\n\t\t\tprotocolVersion,\n\t\t\tcapabilities: this.getCapabilities(),\n\t\t\tserverInfo: this._serverInfo,\n\t\t\t...this._instructions && { instructions: this._instructions }\n\t\t};\n\t}\n\t/**\n\t* Answers `server/discover` (protocol revision 2026-07-28). `supportedVersions`\n\t* lists only modern revisions (2025-era versions are negotiated via `initialize`);\n\t* the capabilities are advertised as-is, listChanged/subscribe bits included\n\t* (see {@linkcode discoverAdvertisedCapabilities}).\n\t*/\n\t_ondiscover() {\n\t\treturn {\n\t\t\tsupportedVersions: modernProtocolVersions(this._supportedProtocolVersions),\n\t\t\tcapabilities: discoverAdvertisedCapabilities(this.getCapabilities()),\n\t\t\t...this._instructions && { instructions: this._instructions }\n\t\t};\n\t}\n\t/**\n\t* The identity the 2026-era encode seam stamps into every outbound\n\t* result's `_meta` under `io.modelcontextprotocol/serverInfo` (spec PR\n\t* #3002: servers SHOULD identify themselves on every response).\n\t*/\n\t_outboundServerInfo() {\n\t\treturn this._serverInfo;\n\t}\n\t/**\n\t* After initialization has completed, this will be populated with the client's reported capabilities.\n\t*\n\t* @deprecated Read client identity from the per-request handler context instead: on\n\t* 2026-07-28 (per-request envelope) requests `ctx.mcpReq.envelope` carries the client's\n\t* declared capabilities, while on 2025-era connections this accessor keeps returning the\n\t* `initialize`-scoped value. The accessor remains functional — instances serving the\n\t* 2026-07-28 era are backfilled per request from the validated envelope.\n\t*/\n\tgetClientCapabilities() {\n\t\treturn this._clientCapabilities;\n\t}\n\t/**\n\t* After initialization has completed, this will be populated with information about the client's name and version.\n\t*\n\t* @deprecated Read client identity from the per-request handler context instead: on\n\t* 2026-07-28 (per-request envelope) requests `ctx.mcpReq.envelope` carries the client's\n\t* name and version, while on 2025-era connections this accessor keeps returning the\n\t* `initialize`-scoped value. The accessor remains functional — instances serving the\n\t* 2026-07-28 era are backfilled per request from the validated envelope.\n\t*/\n\tgetClientVersion() {\n\t\treturn this._clientVersion;\n\t}\n\t/**\n\t* After initialization has completed, this will be populated with the protocol version negotiated\n\t* with the client (the version the server responded with during the initialize handshake), or\n\t* `undefined` before initialization.\n\t*\n\t* @deprecated Read the protocol revision from the per-request handler context instead: on\n\t* 2026-07-28 (per-request envelope) requests `ctx.mcpReq.envelope` names the revision the\n\t* request was sent for, while on 2025-era connections this accessor keeps returning the\n\t* `initialize`-negotiated version. The accessor remains functional — instances serving the\n\t* 2026-07-28 era report that revision.\n\t*/\n\tgetNegotiatedProtocolVersion() {\n\t\treturn this._negotiatedProtocolVersion;\n\t}\n\t/**\n\t* Project a `tools/call` result through this instance's negotiated wire\n\t* codec — the era-agnostic SEP-2106 §4.3 TextContent auto-append, plus on\n\t* the 2025 era the `{result:…}` wrap when `structuredContent` is a\n\t* non-object value or the advertised `outputSchema` had a non-object root.\n\t* Identity for object-shaped `structuredContent` on the 2026 era.\n\t*\n\t* `McpServer`'s built-in `tools/call` handler routes through this method.\n\t* Low-level `setRequestHandler('tools/call', …)` authors call it\n\t* themselves so the projection lives in one place (the codec) and the\n\t* server-side handler stays era-blind.\n\t*\n\t* This is the only codec function exposed on `Server` — the full\n\t* `WireCodec` is intentionally not part of the public surface.\n\t*/\n\tprojectCallToolResult(result, advertisedOutputSchema) {\n\t\treturn this._wireCodec().projectCallToolResult(result, advertisedOutputSchema);\n\t}\n\t/**\n\t* Returns the current server capabilities.\n\t*/\n\tgetCapabilities() {\n\t\treturn this._capabilities;\n\t}\n\t/**\n\t* Sends a `ping` request to the connected client.\n\t*\n\t* @deprecated The 2026-07-28 protocol removed ping; it throws on a 2026-07-28-era instance.\n\t* If your factory serves both eras, this only works on the legacy path.\n\t*/\n\tasync ping() {\n\t\tthis._assertPushApiInServedEra(\"ping\");\n\t\treturn this.request({ method: \"ping\" });\n\t}\n\tasync createMessage(params, options) {\n\t\tthis._assertPushApiInServedEra(\"sampling/createMessage\");\n\t\tif ((params.tools || params.toolChoice) && !this._clientCapabilities?.sampling?.tools) throw new SdkError(SdkErrorCode.CapabilityNotSupported, \"Client does not support sampling tools capability.\");\n\t\tif (params.messages.length > 0) {\n\t\t\tconst lastMessage = params.messages.at(-1);\n\t\t\tconst lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];\n\t\t\tconst hasToolResults = lastContent.some((c) => c.type === \"tool_result\");\n\t\t\tconst previousMessage = params.messages.length > 1 ? params.messages.at(-2) : void 0;\n\t\t\tconst previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];\n\t\t\tconst hasPreviousToolUse = previousContent.some((c) => c.type === \"tool_use\");\n\t\t\tif (hasToolResults) {\n\t\t\t\tif (lastContent.some((c) => c.type !== \"tool_result\")) throw new ProtocolError(ProtocolErrorCode.InvalidParams, \"The last message must contain only tool_result content if any is present\");\n\t\t\t\tif (!hasPreviousToolUse) throw new ProtocolError(ProtocolErrorCode.InvalidParams, \"tool_result blocks are not matching any tool_use from the previous message\");\n\t\t\t}\n\t\t\tif (hasPreviousToolUse) {\n\t\t\t\tconst toolUseIds = new Set(previousContent.filter((c) => c.type === \"tool_use\").map((c) => c.id));\n\t\t\t\tconst toolResultIds = new Set(lastContent.filter((c) => c.type === \"tool_result\").map((c) => c.toolUseId));\n\t\t\t\tif (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) throw new ProtocolError(ProtocolErrorCode.InvalidParams, \"ids of tool_result blocks and tool_use blocks from previous message do not match\");\n\t\t\t}\n\t\t}\n\t\tconst hasTools = Boolean(params.tools || params.toolChoice);\n\t\tconst wide = await this.request({\n\t\t\tmethod: \"sampling/createMessage\",\n\t\t\tparams\n\t\t}, options);\n\t\tconst outcome = this._wireCodec().samplingResultVariant(hasTools, wide);\n\t\tif (!outcome.ok) throw new SdkError(SdkErrorCode.InvalidResult, `Invalid sampling/createMessage result: ${outcome.reason === \"invalid\" ? outcome.message : outcome.reason}`);\n\t\treturn outcome.value;\n\t}\n\t/**\n\t* Creates an elicitation request for the given parameters.\n\t* For backwards compatibility, `mode` may be omitted for form requests and will default to `\"form\"`.\n\t* @param params The parameters for the elicitation request.\n\t* @param options Optional request options.\n\t* @returns The result of the elicitation request.\n\t*\n\t* @deprecated Throws on a 2026-07-28-era request — use {@link index.inputRequired | inputRequired} (multi-round-trip)\n\t* instead. The 2025 push-style server-to-client request model is replaced by input_required\n\t* results in the 2026-07-28 protocol. If your factory serves both eras, this only works on the\n\t* legacy path.\n\t*/\n\tasync elicitInput(params, options) {\n\t\tthis._assertPushApiInServedEra(\"elicitation/create\");\n\t\tswitch (params.mode ?? \"form\") {\n\t\t\tcase \"url\":\n\t\t\t\tif (!this._clientCapabilities?.elicitation?.url) throw new SdkError(SdkErrorCode.CapabilityNotSupported, \"Client does not support url elicitation.\");\n\t\t\t\tbreak;\n\t\t\tcase \"form\":\n\t\t\t\tif (!this._clientCapabilities?.elicitation?.form) throw new SdkError(SdkErrorCode.CapabilityNotSupported, \"Client does not support form elicitation.\");\n\t\t\t\tbreak;\n\t\t}\n\t\treturn this._sendElicitationLeg(params, options);\n\t}\n\t/**\n\t* The capability-check-free core of {@linkcode elicitInput}. The shim\n\t* uses it because its gate differs from the public checks: a bare\n\t* `elicitation: {}` counts as form support (the pre-mode rule), and\n\t* accepted content passes through unvalidated for parity with the\n\t* modern client driver (handlers validate via the schema-aware\n\t* `acceptedContent` overload and can re-ask).\n\t*/\n\tasync _sendElicitationLeg(params, options, behavior) {\n\t\tconst mode = params.mode ?? \"form\";\n\t\tconst validateAcceptedContent = behavior?.validateAcceptedContent ?? true;\n\t\tswitch (mode) {\n\t\t\tcase \"url\": {\n\t\t\t\tconst urlParams = params;\n\t\t\t\treturn this.request({\n\t\t\t\t\tmethod: \"elicitation/create\",\n\t\t\t\t\tparams: urlParams\n\t\t\t\t}, options);\n\t\t\t}\n\t\t\tcase \"form\": {\n\t\t\t\tconst formParams = params.mode === \"form\" ? params : {\n\t\t\t\t\t...params,\n\t\t\t\t\tmode: \"form\"\n\t\t\t\t};\n\t\t\t\tconst result = await this.request({\n\t\t\t\t\tmethod: \"elicitation/create\",\n\t\t\t\t\tparams: formParams\n\t\t\t\t}, options);\n\t\t\t\tif (validateAcceptedContent && result.action === \"accept\" && result.content && formParams.requestedSchema) try {\n\t\t\t\t\tconst validationResult = this._jsonSchemaValidator.getValidator(formParams.requestedSchema)(result.content);\n\t\t\t\t\tif (!validationResult.valid) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (error instanceof ProtocolError) throw error;\n\t\t\t\t\tthrow new ProtocolError(ProtocolErrorCode.InternalError, `Error validating elicitation response: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Creates a reusable callback that, when invoked, will send a `notifications/elicitation/complete`\n\t* notification for the specified elicitation ID.\n\t*\n\t* The notification (and the `elicitationId` it references) exists only on protocol revision\n\t* 2025-11-25 — the 2026-07-28 revision removed both. On a connection negotiated at 2026-07-28 the\n\t* returned callback rejects with a typed local error before anything reaches the transport\n\t* (the method is not part of that revision's wire registry).\n\t*\n\t* @param elicitationId The ID of the elicitation to mark as complete.\n\t* @param options Optional notification options. Useful when the completion notification should be related to a prior request.\n\t* @returns A function that emits the completion notification when awaited.\n\t*/\n\tcreateElicitationCompletionNotifier(elicitationId, options) {\n\t\tif (!this._clientCapabilities?.elicitation?.url) throw new SdkError(SdkErrorCode.CapabilityNotSupported, \"Client does not support URL elicitation (required for notifications/elicitation/complete)\");\n\t\treturn () => this.notification({\n\t\t\tmethod: \"notifications/elicitation/complete\",\n\t\t\tparams: { elicitationId }\n\t\t}, options);\n\t}\n\t/**\n\t* Requests the list of roots from the client.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n\t* Throws on a 2026-07-28-era request — use {@link index.inputRequired | inputRequired} (multi-round-trip) instead,\n\t* or migrate to passing paths via tool parameters, resource URIs, or configuration. The 2025\n\t* push-style server-to-client request model is replaced by input_required results in the\n\t* 2026-07-28 protocol. If your factory serves both eras, this only works on the legacy path.\n\t*/\n\tasync listRoots(params, options) {\n\t\tthis._assertPushApiInServedEra(\"roots/list\");\n\t\treturn this.request({\n\t\t\tmethod: \"roots/list\",\n\t\t\tparams\n\t\t}, options);\n\t}\n\t/**\n\t* Sends a logging message to the client, if connected.\n\t* Note: You only need to send the parameters object, not the entire JSON-RPC message.\n\t* @see {@linkcode LoggingMessageNotification}\n\t* @param params\n\t* @param sessionId Optional for stateless transports and backward compatibility.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n\t* Remains functional during the deprecation window (at least twelve months).\n\t* Migrate to stderr logging (STDIO servers) or OpenTelemetry.\n\t*/\n\tasync sendLoggingMessage(params, sessionId) {\n\t\tif (this._capabilities.logging && !this.isMessageIgnored(params.level, sessionId)) return this.notification({\n\t\t\tmethod: \"notifications/message\",\n\t\t\tparams\n\t\t});\n\t}\n\tasync sendResourceUpdated(params) {\n\t\treturn this.notification({\n\t\t\tmethod: \"notifications/resources/updated\",\n\t\t\tparams\n\t\t});\n\t}\n\tasync sendResourceListChanged() {\n\t\treturn this.notification({ method: \"notifications/resources/list_changed\" });\n\t}\n\tasync sendToolListChanged() {\n\t\treturn this.notification({ method: \"notifications/tools/list_changed\" });\n\t}\n\tasync sendPromptListChanged() {\n\t\treturn this.notification({ method: \"notifications/prompts/list_changed\" });\n\t}\n};\n/**\n* The capability set a server advertises on `server/discover`. Pure — never\n* mutates the input; the legacy `initialize` advertisement is untouched.\n*\n* The serving entries serve `subscriptions/listen` themselves, so the\n* `listChanged` and `resources.subscribe` capability bits are advertised\n* as-is: a modern-era client uses them to decide which notification types to\n* request on its listen filter.\n*/\nfunction discoverAdvertisedCapabilities(capabilities) {\n\treturn { ...capabilities };\n}\n\n//#endregion\n//#region src/server/mcp.ts\n/**\n* High-level MCP server that provides a simpler API for working with resources, tools, and prompts.\n* For advanced usage (like sending notifications or setting custom request handlers), use the underlying\n* {@linkcode Server} instance available via the {@linkcode McpServer.server | server} property.\n*\n* @example\n* ```ts source=\"./mcp.examples.ts#McpServer_basicUsage\"\n* const server = new McpServer({\n*     name: 'my-server',\n*     version: '1.0.0'\n* });\n* ```\n*/\nvar McpServer = class {\n\t/**\n\t* The underlying {@linkcode Server} instance, useful for advanced operations like sending notifications.\n\t*/\n\tserver;\n\t_registeredResources = {};\n\t_registeredResourceTemplates = {};\n\t_registeredTools = {};\n\t_registeredPrompts = {};\n\t/**\n\t* Per-tool JSON-converted `inputSchema`, memoized so the SEP-2243\n\t* registration-time scan and the pre-dispatch validation step share one\n\t* conversion instead of paying it twice per request under the\n\t* per-request-factory `createMcpHandler` model.\n\t*/\n\t_toolInputSchemaJson = {};\n\t/**\n\t* The JSON-serialized `inputSchema` of a registered tool, or `undefined`\n\t* when no such tool is registered. Used by the HTTP entry's pre-dispatch\n\t* SEP-2243 `Mcp-Param-*` validation step (which needs the same JSON Schema\n\t* `tools/list` would emit, before dispatch reaches the handler).\n\t*\n\t* @internal\n\t*/\n\ttoolInputSchemaJson(name) {\n\t\tconst tool = this._registeredTools[name];\n\t\tif (tool === void 0 || !tool.enabled) return void 0;\n\t\tif (Object.hasOwn(this._toolInputSchemaJson, name)) return this._toolInputSchemaJson[name];\n\t\tif (tool.inputSchema === void 0) return EMPTY_OBJECT_JSON_SCHEMA;\n\t\ttry {\n\t\t\tconst json = standardSchemaToJsonSchema(tool.inputSchema, \"input\");\n\t\t\tthis._toolInputSchemaJson[name] = json;\n\t\t\treturn json;\n\t\t} catch {\n\t\t\treturn;\n\t\t}\n\t}\n\tconstructor(serverInfo, options) {\n\t\tthis.server = new Server(serverInfo, options);\n\t\tif (options?.capabilities?.tools) this.setToolRequestHandlers();\n\t\tif (options?.capabilities?.resources) this.setResourceRequestHandlers();\n\t\tif (options?.capabilities?.prompts) this.setPromptRequestHandlers();\n\t}\n\t/**\n\t* Attaches to the given transport, starts it, and starts listening for messages.\n\t*\n\t* The `server` object assumes ownership of the {@linkcode Transport}, replacing any callbacks that have already been set, and expects that it is the only user of the {@linkcode Transport} instance going forward.\n\t*\n\t* @example\n\t* ```ts source=\"./mcp.examples.ts#McpServer_connect_stdio\"\n\t* const server = new McpServer({ name: 'my-server', version: '1.0.0' });\n\t* const transport = new StdioServerTransport();\n\t* await server.connect(transport);\n\t* ```\n\t*/\n\tasync connect(transport) {\n\t\treturn await this.server.connect(transport);\n\t}\n\t/**\n\t* Closes the connection.\n\t*/\n\tasync close() {\n\t\tawait this.server.close();\n\t}\n\t_toolHandlersInitialized = false;\n\tsetToolRequestHandlers() {\n\t\tif (this._toolHandlersInitialized) return;\n\t\tthis.server.assertCanSetRequestHandler(\"tools/list\");\n\t\tthis.server.assertCanSetRequestHandler(\"tools/call\");\n\t\tthis.server.registerCapabilities({ tools: { listChanged: this.server.getCapabilities().tools?.listChanged ?? true } });\n\t\tthis.server.setRequestHandler(\"tools/list\", () => ({ tools: Object.entries(this._registeredTools).filter(([, tool]) => tool.enabled).map(([name, tool]) => {\n\t\t\tconst toolDefinition = {\n\t\t\t\tname,\n\t\t\t\ttitle: tool.title,\n\t\t\t\tdescription: tool.description,\n\t\t\t\tinputSchema: tool.inputSchema ? standardSchemaToJsonSchema(tool.inputSchema, \"input\") : EMPTY_OBJECT_JSON_SCHEMA,\n\t\t\t\tannotations: tool.annotations,\n\t\t\t\ticons: tool.icons,\n\t\t\t\texecution: tool.execution,\n\t\t\t\t_meta: tool._meta\n\t\t\t};\n\t\t\tif (tool.outputSchema) toolDefinition.outputSchema = standardSchemaToJsonSchema(tool.outputSchema, \"output\");\n\t\t\treturn toolDefinition;\n\t\t}) }));\n\t\tthis.server.setRequestHandler(\"tools/call\", async (request, ctx) => {\n\t\t\tconst tool = this._registeredTools[request.params.name];\n\t\t\tif (!tool) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Tool ${request.params.name} not found`);\n\t\t\tif (!tool.enabled) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Tool ${request.params.name} disabled`);\n\t\t\ttry {\n\t\t\t\tconst args = await this.validateToolInput(tool, request.params.arguments, request.params.name);\n\t\t\t\tconst result = await this.executeToolHandler(tool, args, ctx);\n\t\t\t\tawait this.validateToolOutput(tool, result, request.params.name);\n\t\t\t\tif (isInputRequiredResult(result)) return result;\n\t\t\t\treturn this.server.projectCallToolResult(result, tool.outputSchemaJson);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof ProtocolError && error.code === ProtocolErrorCode.UrlElicitationRequired) throw error;\n\t\t\t\treturn this.createToolError(error instanceof Error ? error.message : String(error));\n\t\t\t}\n\t\t});\n\t\tthis._toolHandlersInitialized = true;\n\t}\n\t/**\n\t* Creates a tool error result.\n\t*\n\t* @param errorMessage - The error message.\n\t* @returns The tool error result.\n\t*/\n\tcreateToolError(errorMessage) {\n\t\treturn {\n\t\t\tcontent: [{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: errorMessage\n\t\t\t}],\n\t\t\tisError: true\n\t\t};\n\t}\n\t/**\n\t* Validates tool input arguments against the tool's input schema.\n\t*/\n\tasync validateToolInput(tool, args, toolName) {\n\t\tif (!tool.inputSchema) return;\n\t\tconst parseResult = await validateStandardSchema(tool.inputSchema, args ?? {});\n\t\tif (!parseResult.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${parseResult.error}`);\n\t\treturn parseResult.data;\n\t}\n\t/**\n\t* Validates tool output against the tool's output schema.\n\t*/\n\tasync validateToolOutput(tool, result, toolName) {\n\t\tif (!tool.outputSchema) return;\n\t\tif (isInputRequiredResult(result)) return;\n\t\tif (result.isError) return;\n\t\tif (result.structuredContent === void 0) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Output validation error: Tool ${toolName} has an output schema but no structured content was provided`);\n\t\tconst parseResult = await validateStandardSchema(tool.outputSchema, result.structuredContent);\n\t\tif (!parseResult.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${parseResult.error}`);\n\t}\n\t/**\n\t* Executes a tool handler.\n\t*/\n\tasync executeToolHandler(tool, args, ctx) {\n\t\treturn tool.executor(args, ctx);\n\t}\n\t_completionHandlerInitialized = false;\n\tsetCompletionRequestHandler() {\n\t\tif (this._completionHandlerInitialized) return;\n\t\tthis.server.assertCanSetRequestHandler(\"completion/complete\");\n\t\tthis.server.registerCapabilities({ completions: {} });\n\t\tthis.server.setRequestHandler(\"completion/complete\", async (request) => {\n\t\t\tswitch (request.params.ref.type) {\n\t\t\t\tcase \"ref/prompt\":\n\t\t\t\t\tassertCompleteRequestPrompt(request);\n\t\t\t\t\treturn this.handlePromptCompletion(request, request.params.ref);\n\t\t\t\tcase \"ref/resource\":\n\t\t\t\t\tassertCompleteRequestResourceTemplate(request);\n\t\t\t\t\treturn this.handleResourceCompletion(request, request.params.ref);\n\t\t\t\tdefault: throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid completion reference: ${request.params.ref}`);\n\t\t\t}\n\t\t});\n\t\tthis._completionHandlerInitialized = true;\n\t}\n\tasync handlePromptCompletion(request, ref) {\n\t\tconst prompt = this._registeredPrompts[ref.name];\n\t\tif (!prompt) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt ${ref.name} not found`);\n\t\tif (!prompt.enabled) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt ${ref.name} disabled`);\n\t\tif (!prompt.argsSchema) return EMPTY_COMPLETION_RESULT;\n\t\tconst field = unwrapOptionalSchema(getSchemaShape(prompt.argsSchema)?.[request.params.argument.name]);\n\t\tif (!isCompletable(field)) return EMPTY_COMPLETION_RESULT;\n\t\tconst completer = getCompleter(field);\n\t\tif (!completer) return EMPTY_COMPLETION_RESULT;\n\t\treturn createCompletionResult(await completer(request.params.argument.value, request.params.context));\n\t}\n\tasync handleResourceCompletion(request, ref) {\n\t\tconst template = Object.values(this._registeredResourceTemplates).find((t) => t.resourceTemplate.uriTemplate.toString() === ref.uri);\n\t\tif (!template) {\n\t\t\tif (this._registeredResources[ref.uri]) return EMPTY_COMPLETION_RESULT;\n\t\t\tthrow new ProtocolError(ProtocolErrorCode.InvalidParams, `Resource template ${request.params.ref.uri} not found`);\n\t\t}\n\t\tconst completer = template.resourceTemplate.completeCallback(request.params.argument.name);\n\t\tif (!completer) return EMPTY_COMPLETION_RESULT;\n\t\treturn createCompletionResult(await completer(request.params.argument.value, request.params.context));\n\t}\n\t_resourceHandlersInitialized = false;\n\tsetResourceRequestHandlers() {\n\t\tif (this._resourceHandlersInitialized) return;\n\t\tthis.server.assertCanSetRequestHandler(\"resources/list\");\n\t\tthis.server.assertCanSetRequestHandler(\"resources/templates/list\");\n\t\tthis.server.assertCanSetRequestHandler(\"resources/read\");\n\t\tthis.server.registerCapabilities({ resources: { listChanged: this.server.getCapabilities().resources?.listChanged ?? true } });\n\t\tthis.server.setRequestHandler(\"resources/list\", async (_request, ctx) => {\n\t\t\tconst resources = Object.entries(this._registeredResources).filter(([_, resource]) => resource.enabled).map(([uri, resource]) => ({\n\t\t\t\turi,\n\t\t\t\tname: resource.name,\n\t\t\t\t...resource.metadata\n\t\t\t}));\n\t\t\tconst templateResources = [];\n\t\t\tfor (const template of Object.values(this._registeredResourceTemplates)) {\n\t\t\t\tif (!template.resourceTemplate.listCallback) continue;\n\t\t\t\tconst result = await template.resourceTemplate.listCallback(ctx);\n\t\t\t\tfor (const resource of result.resources) templateResources.push({\n\t\t\t\t\t...template.metadata,\n\t\t\t\t\t...resource\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn { resources: [...resources, ...templateResources] };\n\t\t});\n\t\tthis.server.setRequestHandler(\"resources/templates/list\", async () => {\n\t\t\treturn { resourceTemplates: Object.entries(this._registeredResourceTemplates).map(([name, template]) => ({\n\t\t\t\tname,\n\t\t\t\turiTemplate: template.resourceTemplate.uriTemplate.toString(),\n\t\t\t\t...template.metadata\n\t\t\t})) };\n\t\t});\n\t\tthis.server.setRequestHandler(\"resources/read\", async (request, ctx) => {\n\t\t\tlet uri;\n\t\t\ttry {\n\t\t\t\turi = new URL(request.params.uri);\n\t\t\t} catch {\n\t\t\t\tthrow new ProtocolError(ProtocolErrorCode.InvalidParams, `Resource URI ${request.params.uri} is invalid`, {\n\t\t\t\t\turi: request.params.uri,\n\t\t\t\t\treason: \"invalid_uri\"\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst resource = this._registeredResources[uri.toString()];\n\t\t\tif (resource) {\n\t\t\t\tif (!resource.enabled) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Resource ${uri} disabled`);\n\t\t\t\treturn attachCacheHintFallback(await resource.readCallback(uri, ctx), resource.cacheHint);\n\t\t\t}\n\t\t\tfor (const template of Object.values(this._registeredResourceTemplates)) {\n\t\t\t\tconst variables = template.resourceTemplate.uriTemplate.match(uri.toString());\n\t\t\t\tif (variables) return attachCacheHintFallback(await template.readCallback(uri, variables, ctx), template.cacheHint);\n\t\t\t}\n\t\t\tthrow new ResourceNotFoundError(request.params.uri);\n\t\t});\n\t\tthis._resourceHandlersInitialized = true;\n\t}\n\t_promptHandlersInitialized = false;\n\tsetPromptRequestHandlers() {\n\t\tif (this._promptHandlersInitialized) return;\n\t\tthis.server.assertCanSetRequestHandler(\"prompts/list\");\n\t\tthis.server.assertCanSetRequestHandler(\"prompts/get\");\n\t\tthis.server.registerCapabilities({ prompts: { listChanged: this.server.getCapabilities().prompts?.listChanged ?? true } });\n\t\tthis.server.setRequestHandler(\"prompts/list\", () => ({ prompts: Object.entries(this._registeredPrompts).filter(([, prompt]) => prompt.enabled).map(([name, prompt]) => {\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\ttitle: prompt.title,\n\t\t\t\tdescription: prompt.description,\n\t\t\t\targuments: prompt.argsSchema ? promptArgumentsFromStandardSchema(prompt.argsSchema) : void 0,\n\t\t\t\ticons: prompt.icons,\n\t\t\t\t_meta: prompt._meta\n\t\t\t};\n\t\t}) }));\n\t\tthis.server.setRequestHandler(\"prompts/get\", async (request, ctx) => {\n\t\t\tconst prompt = this._registeredPrompts[request.params.name];\n\t\t\tif (!prompt) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt ${request.params.name} not found`);\n\t\t\tif (!prompt.enabled) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt ${request.params.name} disabled`);\n\t\t\treturn prompt.handler(request.params.arguments, ctx);\n\t\t});\n\t\tthis._promptHandlersInitialized = true;\n\t}\n\tregisterResource(name, uriOrTemplate, config, readCallback) {\n\t\tconst cacheHint = config.cacheHint;\n\t\tlet metadata = config;\n\t\tif (cacheHint !== void 0) {\n\t\t\tassertValidCacheHint(cacheHint, `resource ${name}`);\n\t\t\tconst rest = { ...config };\n\t\t\tdelete rest.cacheHint;\n\t\t\tmetadata = rest;\n\t\t}\n\t\tif (typeof uriOrTemplate === \"string\") {\n\t\t\tif (this._registeredResources[uriOrTemplate]) throw new Error(`Resource ${uriOrTemplate} is already registered`);\n\t\t\tconst registeredResource = this._createRegisteredResource(name, config.title, uriOrTemplate, metadata, readCallback);\n\t\t\tif (cacheHint !== void 0) registeredResource.cacheHint = cacheHint;\n\t\t\tthis.setResourceRequestHandlers();\n\t\t\tthis.sendResourceListChanged();\n\t\t\treturn registeredResource;\n\t\t} else {\n\t\t\tif (this._registeredResourceTemplates[name]) throw new Error(`Resource template ${name} is already registered`);\n\t\t\tconst registeredResourceTemplate = this._createRegisteredResourceTemplate(name, config.title, uriOrTemplate, metadata, readCallback);\n\t\t\tif (cacheHint !== void 0) registeredResourceTemplate.cacheHint = cacheHint;\n\t\t\tthis.setResourceRequestHandlers();\n\t\t\tthis.sendResourceListChanged();\n\t\t\treturn registeredResourceTemplate;\n\t\t}\n\t}\n\t_createRegisteredResource(name, title, uri, metadata, readCallback) {\n\t\tconst registeredResource = {\n\t\t\tname,\n\t\t\ttitle,\n\t\t\tmetadata,\n\t\t\treadCallback,\n\t\t\tenabled: true,\n\t\t\tdisable: () => registeredResource.update({ enabled: false }),\n\t\t\tenable: () => registeredResource.update({ enabled: true }),\n\t\t\tremove: () => registeredResource.update({ uri: null }),\n\t\t\tupdate: (updates) => {\n\t\t\t\tif (updates.uri !== void 0 && updates.uri !== uri) {\n\t\t\t\t\tdelete this._registeredResources[uri];\n\t\t\t\t\tif (updates.uri) this._registeredResources[updates.uri] = registeredResource;\n\t\t\t\t}\n\t\t\t\tif (updates.name !== void 0) registeredResource.name = updates.name;\n\t\t\t\tif (updates.title !== void 0) registeredResource.title = updates.title;\n\t\t\t\tif (updates.metadata !== void 0) registeredResource.metadata = updates.metadata;\n\t\t\t\tif (updates.callback !== void 0) registeredResource.readCallback = updates.callback;\n\t\t\t\tif (updates.enabled !== void 0) registeredResource.enabled = updates.enabled;\n\t\t\t\tthis.sendResourceListChanged();\n\t\t\t}\n\t\t};\n\t\tthis._registeredResources[uri] = registeredResource;\n\t\treturn registeredResource;\n\t}\n\t_createRegisteredResourceTemplate(name, title, template, metadata, readCallback) {\n\t\tconst registeredResourceTemplate = {\n\t\t\tresourceTemplate: template,\n\t\t\ttitle,\n\t\t\tmetadata,\n\t\t\treadCallback,\n\t\t\tenabled: true,\n\t\t\tdisable: () => registeredResourceTemplate.update({ enabled: false }),\n\t\t\tenable: () => registeredResourceTemplate.update({ enabled: true }),\n\t\t\tremove: () => registeredResourceTemplate.update({ name: null }),\n\t\t\tupdate: (updates) => {\n\t\t\t\tif (updates.name !== void 0 && updates.name !== name) {\n\t\t\t\t\tdelete this._registeredResourceTemplates[name];\n\t\t\t\t\tif (updates.name) this._registeredResourceTemplates[updates.name] = registeredResourceTemplate;\n\t\t\t\t}\n\t\t\t\tif (updates.title !== void 0) registeredResourceTemplate.title = updates.title;\n\t\t\t\tif (updates.template !== void 0) registeredResourceTemplate.resourceTemplate = updates.template;\n\t\t\t\tif (updates.metadata !== void 0) registeredResourceTemplate.metadata = updates.metadata;\n\t\t\t\tif (updates.callback !== void 0) registeredResourceTemplate.readCallback = updates.callback;\n\t\t\t\tif (updates.enabled !== void 0) registeredResourceTemplate.enabled = updates.enabled;\n\t\t\t\tthis.sendResourceListChanged();\n\t\t\t}\n\t\t};\n\t\tthis._registeredResourceTemplates[name] = registeredResourceTemplate;\n\t\tconst variableNames = template.uriTemplate.variableNames;\n\t\tif (Array.isArray(variableNames) && variableNames.some((v) => !!template.completeCallback(v))) this.setCompletionRequestHandler();\n\t\treturn registeredResourceTemplate;\n\t}\n\t_createRegisteredPrompt(name, title, description, argsSchema, callback, icons, _meta) {\n\t\tlet currentArgsSchema = argsSchema;\n\t\tlet currentCallback = callback;\n\t\tconst registeredPrompt = {\n\t\t\ttitle,\n\t\t\tdescription,\n\t\t\targsSchema,\n\t\t\ticons,\n\t\t\t_meta,\n\t\t\thandler: createPromptHandler(name, argsSchema, callback),\n\t\t\tenabled: true,\n\t\t\tdisable: () => registeredPrompt.update({ enabled: false }),\n\t\t\tenable: () => registeredPrompt.update({ enabled: true }),\n\t\t\tremove: () => registeredPrompt.update({ name: null }),\n\t\t\tupdate: (updates) => {\n\t\t\t\tif (updates.name !== void 0 && updates.name !== name) {\n\t\t\t\t\tdelete this._registeredPrompts[name];\n\t\t\t\t\tif (updates.name) this._registeredPrompts[updates.name] = registeredPrompt;\n\t\t\t\t}\n\t\t\t\tif (updates.title !== void 0) registeredPrompt.title = updates.title;\n\t\t\t\tif (updates.description !== void 0) registeredPrompt.description = updates.description;\n\t\t\t\tif (updates.icons !== void 0) registeredPrompt.icons = updates.icons;\n\t\t\t\tif (updates._meta !== void 0) registeredPrompt._meta = updates._meta;\n\t\t\t\tlet needsHandlerRegen = false;\n\t\t\t\tif (updates.argsSchema !== void 0) {\n\t\t\t\t\tregisteredPrompt.argsSchema = updates.argsSchema;\n\t\t\t\t\tcurrentArgsSchema = updates.argsSchema;\n\t\t\t\t\tneedsHandlerRegen = true;\n\t\t\t\t}\n\t\t\t\tif (updates.callback !== void 0) {\n\t\t\t\t\tcurrentCallback = updates.callback;\n\t\t\t\t\tneedsHandlerRegen = true;\n\t\t\t\t}\n\t\t\t\tif (needsHandlerRegen) registeredPrompt.handler = createPromptHandler(name, currentArgsSchema, currentCallback);\n\t\t\t\tif (updates.enabled !== void 0) registeredPrompt.enabled = updates.enabled;\n\t\t\t\tthis.sendPromptListChanged();\n\t\t\t}\n\t\t};\n\t\tthis._registeredPrompts[name] = registeredPrompt;\n\t\tif (argsSchema) {\n\t\t\tconst shape = getSchemaShape(argsSchema);\n\t\t\tif (shape) {\n\t\t\t\tif (Object.values(shape).some((field) => {\n\t\t\t\t\treturn isCompletable(unwrapOptionalSchema(field));\n\t\t\t\t})) this.setCompletionRequestHandler();\n\t\t\t}\n\t\t}\n\t\treturn registeredPrompt;\n\t}\n\t_createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, icons, execution, _meta, handler) {\n\t\tvalidateAndWarnToolName(name);\n\t\tif (inputSchema !== void 0) try {\n\t\t\tconst json = standardSchemaToJsonSchema(inputSchema, \"input\");\n\t\t\tthis._toolInputSchemaJson[name] = json;\n\t\t\tconst scan = scanXMcpHeaderDeclarations(json);\n\t\t\tif (!scan.valid) console.warn(`[mcp-sdk] tool '${name}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${scan.reason}`);\n\t\t} catch {}\n\t\tlet currentHandler = handler;\n\t\tconst registeredTool = {\n\t\t\ttitle,\n\t\t\tdescription,\n\t\t\tinputSchema,\n\t\t\toutputSchema,\n\t\t\toutputSchemaJson: convertOutputSchemaJson(outputSchema),\n\t\t\tannotations,\n\t\t\ticons,\n\t\t\texecution,\n\t\t\t_meta,\n\t\t\thandler,\n\t\t\texecutor: createToolExecutor(inputSchema, handler),\n\t\t\tenabled: true,\n\t\t\tdisable: () => registeredTool.update({ enabled: false }),\n\t\t\tenable: () => registeredTool.update({ enabled: true }),\n\t\t\tremove: () => registeredTool.update({ name: null }),\n\t\t\tupdate: (updates) => {\n\t\t\t\tif (updates.name !== void 0 && updates.name !== name) {\n\t\t\t\t\tif (typeof updates.name === \"string\") validateAndWarnToolName(updates.name);\n\t\t\t\t\tdelete this._registeredTools[name];\n\t\t\t\t\tdelete this._toolInputSchemaJson[name];\n\t\t\t\t\tif (updates.name) {\n\t\t\t\t\t\tdelete this._toolInputSchemaJson[updates.name];\n\t\t\t\t\t\tthis._registeredTools[updates.name] = registeredTool;\n\t\t\t\t\t\tname = updates.name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (updates.title !== void 0) registeredTool.title = updates.title;\n\t\t\t\tif (updates.description !== void 0) registeredTool.description = updates.description;\n\t\t\t\tlet needsExecutorRegen = false;\n\t\t\t\tif (updates.paramsSchema !== void 0) {\n\t\t\t\t\tregisteredTool.inputSchema = updates.paramsSchema;\n\t\t\t\t\tdelete this._toolInputSchemaJson[name];\n\t\t\t\t\tneedsExecutorRegen = true;\n\t\t\t\t}\n\t\t\t\tif (updates.callback !== void 0) {\n\t\t\t\t\tregisteredTool.handler = updates.callback;\n\t\t\t\t\tcurrentHandler = updates.callback;\n\t\t\t\t\tneedsExecutorRegen = true;\n\t\t\t\t}\n\t\t\t\tif (needsExecutorRegen) registeredTool.executor = createToolExecutor(registeredTool.inputSchema, currentHandler);\n\t\t\t\tif (updates.outputSchema !== void 0) {\n\t\t\t\t\tregisteredTool.outputSchema = updates.outputSchema;\n\t\t\t\t\tregisteredTool.outputSchemaJson = convertOutputSchemaJson(updates.outputSchema);\n\t\t\t\t}\n\t\t\t\tif (updates.annotations !== void 0) registeredTool.annotations = updates.annotations;\n\t\t\t\tif (updates.icons !== void 0) registeredTool.icons = updates.icons;\n\t\t\t\tif (updates._meta !== void 0) registeredTool._meta = updates._meta;\n\t\t\t\tif (updates.enabled !== void 0) registeredTool.enabled = updates.enabled;\n\t\t\t\tthis.sendToolListChanged();\n\t\t\t}\n\t\t};\n\t\tthis._registeredTools[name] = registeredTool;\n\t\tthis.setToolRequestHandlers();\n\t\tthis.sendToolListChanged();\n\t\treturn registeredTool;\n\t}\n\tregisterTool(name, config, cb) {\n\t\tif (this._registeredTools[name]) throw new Error(`Tool ${name} is already registered`);\n\t\tconst { title, description, inputSchema, outputSchema, annotations, icons, _meta } = config;\n\t\treturn this._createRegisteredTool(name, title, description, normalizeRawShapeSchema(inputSchema), normalizeRawShapeSchema(outputSchema), annotations, icons, void 0, _meta, cb);\n\t}\n\tregisterPrompt(name, config, cb) {\n\t\tif (this._registeredPrompts[name]) throw new Error(`Prompt ${name} is already registered`);\n\t\tconst { title, description, argsSchema, icons, _meta } = config;\n\t\tconst registeredPrompt = this._createRegisteredPrompt(name, title, description, normalizeRawShapeSchema(argsSchema), cb, icons, _meta);\n\t\tthis.setPromptRequestHandlers();\n\t\tthis.sendPromptListChanged();\n\t\treturn registeredPrompt;\n\t}\n\t/**\n\t* Checks if the server is connected to a transport.\n\t* @returns `true` if the server is connected\n\t*/\n\tisConnected() {\n\t\treturn this.server.transport !== void 0;\n\t}\n\t/**\n\t* Sends a logging message to the client, if connected.\n\t* Note: You only need to send the parameters object, not the entire JSON-RPC message.\n\t* @see {@linkcode LoggingMessageNotification}\n\t* @param params\n\t* @param sessionId Optional for stateless transports and backward compatibility.\n\t*\n\t* @example\n\t* ```ts source=\"./mcp.examples.ts#McpServer_sendLoggingMessage_basic\"\n\t* await server.sendLoggingMessage({\n\t*     level: 'info',\n\t*     data: 'Processing complete'\n\t* });\n\t* ```\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n\t* Remains functional during the deprecation window (at least twelve months).\n\t* Migrate to stderr logging (STDIO servers) or OpenTelemetry.\n\t*/\n\tasync sendLoggingMessage(params, sessionId) {\n\t\treturn this.server.sendLoggingMessage(params, sessionId);\n\t}\n\t/**\n\t* Sends a resource list changed event to the client, if connected.\n\t*/\n\tsendResourceListChanged() {\n\t\tif (this.isConnected()) this.server.sendResourceListChanged();\n\t}\n\t/**\n\t* Sends a tool list changed event to the client, if connected.\n\t*/\n\tsendToolListChanged() {\n\t\tif (this.isConnected()) this.server.sendToolListChanged();\n\t}\n\t/**\n\t* Sends a prompt list changed event to the client, if connected.\n\t*/\n\tsendPromptListChanged() {\n\t\tif (this.isConnected()) this.server.sendPromptListChanged();\n\t}\n};\n/**\n* A resource template combines a URI pattern with optional functionality to enumerate\n* all resources matching that pattern.\n*/\nvar ResourceTemplate = class {\n\t_uriTemplate;\n\tconstructor(uriTemplate, _callbacks) {\n\t\tthis._callbacks = _callbacks;\n\t\tthis._uriTemplate = typeof uriTemplate === \"string\" ? new UriTemplate(uriTemplate) : uriTemplate;\n\t}\n\t/**\n\t* Gets the URI template pattern.\n\t*/\n\tget uriTemplate() {\n\t\treturn this._uriTemplate;\n\t}\n\t/**\n\t* Gets the list callback, if one was provided.\n\t*/\n\tget listCallback() {\n\t\treturn this._callbacks.list;\n\t}\n\t/**\n\t* Gets the callback for completing a specific URI template variable, if one was provided.\n\t*/\n\tcompleteCallback(variable) {\n\t\treturn this._callbacks.complete?.[variable];\n\t}\n};\n/**\n* Creates an executor that invokes the handler with the appropriate arguments.\n* When `inputSchema` is defined, the handler is called with `(args, ctx)`.\n* When `inputSchema` is undefined, the handler is called with just `(ctx)`.\n*/\nfunction createToolExecutor(inputSchema, handler) {\n\tif (inputSchema) {\n\t\tconst callback$1 = handler;\n\t\treturn async (args, ctx) => callback$1(args, ctx);\n\t}\n\tconst callback = handler;\n\treturn async (_args, ctx) => callback(ctx);\n}\nconst EMPTY_OBJECT_JSON_SCHEMA = {\n\ttype: \"object\",\n\tproperties: {}\n};\n/**\n* Convert a registered `outputSchema` to JSON Schema, memoised on {@link RegisteredTool.outputSchemaJson}\n* so `tools/call` passes the SAME advertised schema to the wire codec's `projectCallToolResult` that\n* `tools/list` emits (and that the 2025 codec's `encodeResult('tools/list', …)` may wrap). A conversion\n* failure yields `undefined` so the failure surfaces where it always has (`tools/list`).\n*/\nfunction convertOutputSchemaJson(outputSchema) {\n\tif (outputSchema === void 0) return void 0;\n\ttry {\n\t\treturn standardSchemaToJsonSchema(outputSchema, \"output\");\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* Creates a type-safe prompt handler that captures the schema and callback in a closure.\n* This eliminates the need for type assertions at the call site.\n*/\nfunction createPromptHandler(name, argsSchema, callback) {\n\tif (argsSchema) {\n\t\tconst typedCallback = callback;\n\t\treturn async (args, ctx) => {\n\t\t\tconst parseResult = await validateStandardSchema(argsSchema, args);\n\t\t\tif (!parseResult.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid arguments for prompt ${name}: ${parseResult.error}`);\n\t\t\treturn typedCallback(parseResult.data, ctx);\n\t\t};\n\t} else {\n\t\tconst typedCallback = callback;\n\t\treturn async (_args, ctx) => {\n\t\t\treturn typedCallback(ctx);\n\t\t};\n\t}\n}\nfunction createCompletionResult(suggestions) {\n\treturn { completion: {\n\t\tvalues: suggestions.map(String).slice(0, 100),\n\t\ttotal: suggestions.length,\n\t\thasMore: suggestions.length > 100\n\t} };\n}\nconst EMPTY_COMPLETION_RESULT = { completion: {\n\tvalues: [],\n\thasMore: false\n} };\n/** @internal Gets the shape of a Zod object schema */\nfunction getSchemaShape(schema) {\n\tconst candidate = schema;\n\tif (candidate.shape && typeof candidate.shape === \"object\") return candidate.shape;\n}\n/** @internal Checks if a Zod schema is optional */\nfunction isOptionalSchema(schema) {\n\treturn schema?.type === \"optional\";\n}\n/** @internal Unwraps an optional Zod schema */\nfunction unwrapOptionalSchema(schema) {\n\tif (!isOptionalSchema(schema)) return schema;\n\treturn schema.def?.innerType ?? schema;\n}\n\n//#endregion\nexport { seedClientIdentityFromEnvelope as a, StdioListenRouter as c, createServerNotifier as d, DEFAULT_SSE_KEEP_ALIVE_MS as f, isCompletable as h, installModernOnlyHandlers as i, createListenRouter as l, completable as m, ResourceTemplate as n, serverIdentityOf as o, armSseKeepAlive as p, Server as r, DEFAULT_MAX_SUBSCRIPTIONS as s, McpServer as t, InMemoryServerEventBus as u };\n//# sourceMappingURL=mcp-DXXb3Vv3.mjs.map","import \"./skills-Dj4T8Duc.js\";\nimport { MCP_SERVER_NAME } from \"./constants-CEZaLsGe.js\";\nimport \"./errors-CEDWDXew.js\";\nimport \"./slug-validation-MJ3jU0Hd.js\";\nimport \"./schema-DKEjeVqP.js\";\nimport { logIssue } from \"./logging-B7X3yL0T.js\";\nimport \"./events-datasets-Cu37u43g.js\";\nimport \"./url-utils-CYEhmNHi.js\";\nimport { LIB_VERSION } from \"./version-Dl3bNTAd.js\";\nimport \"./api-path-BQDQ2sHi.js\";\nimport { isApiAuthenticationErrorDeep } from \"./errors-DG2FreDU.js\";\nimport \"./schema-BYZYkgA1.js\";\nimport \"./client-IUNQkit5.js\";\nimport \"./types-Brcky9_F.js\";\nimport \"./api-client-SsChedgx.js\";\nimport { formatErrorForUser, isExpectedToolError } from \"./error-handling-BsZo3KBt.js\";\nimport \"./constraint-helpers-C-VlK4t-.js\";\nimport \"./surfaces-B1_F0pzt.js\";\nimport \"./types-DGnYE-i7.js\";\nimport { executeToolHandler, getAvailableTools, getFilteredInputSchema, injectConstraintParams, resolveToolDescription } from \"./availability-zLnbaxcD.js\";\nimport \"./define-SD6AQa4b.js\";\nimport \"./validate-region-url-C2aYIha9.js\";\nimport \"./api-EaEPyKlQ.js\";\nimport \"./results-NF1RJbDZ.js\";\nimport \"./whoami-Bz6QKirR.js\";\nimport \"./find-organizations-CXTZEMsb.js\";\nimport \"./find-teams-ZsyAWNb7.js\";\nimport \"./find-projects-BYeZfQDF.js\";\nimport \"./find-releases-fkgr4qqZ.js\";\nimport \"./type-guards-DHLAzjf2.js\";\nimport \"./api-formatting-nIGXUFdx.js\";\nimport \"./project-constraints-DlfcU4mm.js\";\nimport \"./get-release-details-0bKoH-Gv.js\";\nimport \"./dashboards-BCwvH2V2.js\";\nimport \"./find-dashboards-DE0x5cIv.js\";\nimport \"./get-dashboard-details-7tf-4Q_F.js\";\nimport \"./find-monitors-DOaVdrCU.js\";\nimport \"./get-monitor-details-CP_Cj6P3.js\";\nimport \"./uptime-monitors-DdMrkrKy.js\";\nimport \"./find-uptime-monitors-NZjkNLjM.js\";\nimport \"./get-uptime-monitor-details-DfFRiDqD.js\";\nimport \"./create-uptime-monitor-fo-rIhsm.js\";\nimport \"./update-uptime-monitor-CXyi5lFD.js\";\nimport \"./delete-uptime-monitor-CHj4Cluv.js\";\nimport \"./find-alert-rules-Co9XjMKY.js\";\nimport \"./alerts-CVOIE5iC.js\";\nimport \"./get-alert-rule-WfTdEa_v.js\";\nimport \"./tool-call-formatting-ALc98KqF.js\";\nimport \"./ai-conversation-actions-rbKawWyG.js\";\nimport \"./enhance-error-BDXGhe5E.js\";\nimport \"./url-scope-CRM5sNo7.js\";\nimport \"./issue-helpers-0Dnme3Ym.js\";\nimport \"./code-location-DW_YNpMG.js\";\nimport \"./seer-BoTKAK7k.js\";\nimport \"./user-formatting-BrX0Xi05.js\";\nimport \"./formatting-Cviy8-dX.js\";\nimport \"./issue-D65xI0F7.js\";\nimport \"./code-location-C0fIXD0V.js\";\nimport \"./get-issue-details-DHDUffp5.js\";\nimport \"./event-stacktrace-DNVGqkZt.js\";\nimport \"./get-event-stacktrace-ODRk7GSR.js\";\nimport \"./get-issue-activity-CKhQWy99.js\";\nimport \"./breadcrumbs-BltIlpas.js\";\nimport \"./get-issue-breadcrumbs-D5AeF8Vm.js\";\nimport \"./get-issue-tag-values-DtJZnl37.js\";\nimport \"./get-issue-user-reports-D73TLuX2.js\";\nimport \"./anthropic-provider-CRd6GA4E.js\";\nimport \"./azure-openai-provider-BNAjkBmg.js\";\nimport \"./openai-provider-DK3FdwQ_.js\";\nimport \"./openrouter-provider-JT8w8qQ6.js\";\nimport \"./provider-factory-Cs_2DBhe.js\";\nimport \"./resolve-region-url-DutLwiPb.js\";\nimport \"./semantic-display-Zyyjp_BY.js\";\nimport \"./get-trace-details-D7U8b5_V.js\";\nimport \"./get-span-details-DfXIT1v_.js\";\nimport \"./url-helpers-CcAcmPuu.js\";\nimport \"./get-replay-details-BWeEKq_j.js\";\nimport \"./blob-utils-CdbE_jsd.js\";\nimport \"./get-event-attachment-h8oTTPZt.js\";\nimport \"./formatting-Dh3LlFmw.js\";\nimport \"./update-issue-q9a5YNJb.js\";\nimport \"./provider-fallback-L61Pbfxx.js\";\nimport \"./callEmbeddedAgent-ffwEeqdP.js\";\nimport \"./utils-DHwF0RI3.js\";\nimport \"./dataset-fields-CBauoBBr.js\";\nimport \"./otel-semantics-DGeu0HI-.js\";\nimport \"./whoami-DU_KhHDm.js\";\nimport \"./config-BqCCImAX.js\";\nimport \"./utils-Dg2aeBEb.js\";\nimport \"./agent-BCH9XRWB.js\";\nimport \"./analyzer-CtmUqCwO.js\";\nimport \"./formatters-Cuh2gD9M.js\";\nimport \"./replays-Dg9Syytd.js\";\nimport \"./search-events-C8aVtdIY.js\";\nimport \"./create-team-Bz1tSDLQ.js\";\nimport \"./create-project-CTQakq9G.js\";\nimport \"./update-project-BYY10KTt.js\";\nimport \"./add-team-to-project-DrTGc_T9.js\";\nimport \"./remove-team-from-project-CT7eqBf7.js\";\nimport \"./create-dsn-C-kIpqG7.js\";\nimport \"./find-dsns-DCUQXIHr.js\";\nimport \"./update-dsn-Ce0IWsRx.js\";\nimport \"./fetch-utils-By3YW-Mv.js\";\nimport \"./analyze-issue-with-seer-Dy01BWPf.js\";\nimport \"./search-docs-DVVQKCxP.js\";\nimport \"./get-doc-CnSvhrTG.js\";\nimport \"./config-lLg5qzu0.js\";\nimport \"./agent-BIAUd2t1.js\";\nimport \"./formatters-3Z1cdvzp.js\";\nimport \"./search-issues-CQ0efOru.js\";\nimport \"./config-ChOUIglS.js\";\nimport \"./utils-_4r1K2PE.js\";\nimport \"./agent-Bbb5dUlD.js\";\nimport \"./search-issue-events-fYjr_r6r.js\";\nimport \"./formatter-UsEdX-DU.js\";\nimport \"./get-profile-CilEVKTg.js\";\nimport \"./get-profile-details-B7TCia0B.js\";\nimport \"./get-agent-conversation-details-DTJR8hFg.js\";\nimport \"./formatting-C_fxwUSt.js\";\nimport \"./handlers-CCIzlp0E.js\";\nimport \"./get-snapshot-Ce1Z98WR.js\";\nimport \"./get-snapshot-image-CWtW-DQz.js\";\nimport \"./get-sentry-resource-DAx17Rhc.js\";\nimport \"./get-latest-base-snapshot-KoSAQyLF.js\";\nimport \"./search-agent-conversations-CUhIOq09.js\";\nimport \"./add-issue-note-DqTid9mJ.js\";\nimport \"./onboarding-status-update-ZaTsL300.js\";\nimport \"./catalog-DaTB1cy-.js\";\nimport \"./schema-BuKqZlvC.js\";\nimport \"./search-CX6pdulw.js\";\nimport \"./search-tools-CbtWC7w4.js\";\nimport \"./execute-tool-B_06lhoJ.js\";\nimport { tools_default } from \"./tools-fGO-TOBm.js\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { McpServer as McpServer$1 } from \"@modelcontextprotocol/server\";\nimport { getActiveSpan, setTag, setUser, wrapMcpServerWithSentry } from \"@sentry/core\";\n\n//#region src/server.ts\nfunction getSkillGrantedAttributeName(skill) {\n\treturn `app.consent.skill.${skill.replaceAll(\"-\", \"_\")}.granted`;\n}\nfunction isCallToolResult(output) {\n\treturn !!output && typeof output === \"object\" && !Array.isArray(output) && Array.isArray(output.content);\n}\n/**\n* Detects structured-only tool output. Full CallToolResult objects are excluded\n* so compatibility text generation stays centralized in server.ts.\n*/\nfunction isStructuredToolOutput(output) {\n\treturn !!output && typeof output === \"object\" && !Array.isArray(output) && \"structuredContent\" in output && !(\"content\" in output) && !!output.structuredContent && typeof output.structuredContent === \"object\" && !Array.isArray(output.structuredContent);\n}\n/**\n* Wraps structured-only output in an MCP CallToolResult with generated JSON\n* text for clients that do not read structuredContent yet.\n*/\nfunction structuredOutputToCallToolResult(output) {\n\treturn {\n\t\tcontent: [{\n\t\t\ttype: \"text\",\n\t\t\ttext: JSON.stringify(output.structuredContent, null, 2)\n\t\t}],\n\t\tstructuredContent: output.structuredContent\n\t};\n}\nfunction buildServer({ context, experimentalMode = false, tools: customTools, sdkVersion = \"v1\" }) {\n\tconst contextWithModes = {\n\t\t...context,\n\t\texperimentalMode\n\t};\n\tconst serverInfo = {\n\t\tname: MCP_SERVER_NAME,\n\t\tversion: LIB_VERSION\n\t};\n\tif (sdkVersion === \"v2\") {\n\t\tconst server$1 = new McpServer$1(serverInfo);\n\t\tconst registrations$1 = configureServer({\n\t\t\tserver: server$1,\n\t\t\tcontext: contextWithModes,\n\t\t\texperimentalMode,\n\t\t\ttools: customTools\n\t\t});\n\t\tfor (const { name, config, handler } of registrations$1) server$1.registerTool(name, config, handler);\n\t\treturn wrapMcpServerWithSentry(server$1);\n\t}\n\tconst server = new McpServer(serverInfo);\n\tconst registrations = configureServer({\n\t\tserver,\n\t\tcontext: contextWithModes,\n\t\texperimentalMode,\n\t\ttools: customTools\n\t});\n\tfor (const { name, config, handler } of registrations) server.registerTool(name, config, handler);\n\treturn wrapMcpServerWithSentry(server);\n}\n/**\n* Configures an MCP server with tools filtered by granted skills.\n*\n* Internal function used by buildServer(). Use buildServer() instead for most cases.\n* Tools are filtered at registration time based on grantedSkills, and context is\n* captured in closures for tool handler execution.\n*/\nfunction configureServer({ server, context, experimentalMode = false, tools: customTools }) {\n\tconst registrations = [];\n\tconst registry = customTools ?? tools_default;\n\tconst grantedSkills = context.grantedSkills ? new Set(context.grantedSkills) : void 0;\n\tconst grantedSkillIds = grantedSkills ? Array.from(grantedSkills).sort() : void 0;\n\tconst availableTools = getAvailableTools({\n\t\ttools: registry,\n\t\tcontext,\n\t\texperimentalMode,\n\t\tuseDefaultSurfacePolicy: !customTools\n\t});\n\tconst toolsToRegister = availableTools.filter(({ isTopLevel }) => isTopLevel);\n\tconst contextWithToolAvailability = {\n\t\t...context,\n\t\tavailableToolNames: new Set(availableTools.flatMap(({ key, tool }) => [key, tool.name])),\n\t\tdirectToolNames: new Set(toolsToRegister.flatMap(({ key, tool }) => [key, tool.name]))\n\t};\n\tserver.server.onerror = (error) => {\n\t\tconst transportLogOptions = {\n\t\t\tloggerScope: [\"server\", \"transport\"],\n\t\t\tcontexts: { transport: { phase: \"server.onerror\" } }\n\t\t};\n\t\tlogIssue(error, transportLogOptions);\n\t};\n\tfor (const { tool } of toolsToRegister) {\n\t\tconst filteredInputSchema = getFilteredInputSchema(tool, contextWithToolAvailability);\n\t\tconst resolvedDescription = resolveToolDescription(tool, {\n\t\t\texperimentalMode,\n\t\t\tavailableToolNames: contextWithToolAvailability.availableToolNames,\n\t\t\tdirectToolNames: contextWithToolAvailability.directToolNames\n\t\t});\n\t\tconst toolRegistration = {\n\t\t\tdescription: resolvedDescription,\n\t\t\tinputSchema: filteredInputSchema,\n\t\t\toutputSchema: tool.outputSchema,\n\t\t\tannotations: tool.annotations\n\t\t};\n\t\tconst handleToolCall = async (params) => {\n\t\t\tconst activeSpan = getActiveSpan();\n\t\t\tif (activeSpan) {\n\t\t\t\tactiveSpan.setAttribute(\"app.server.mode.experimental\", experimentalMode);\n\t\t\t\tif (context.transport) activeSpan.setAttribute(\"app.transport\", context.transport);\n\t\t\t\tif (context.clientFamily) activeSpan.setAttribute(\"app.client.family\", context.clientFamily);\n\t\t\t\tif (context.constraints.organizationSlug) activeSpan.setAttribute(\"app.constraint.organization_slug\", context.constraints.organizationSlug);\n\t\t\t\tif (context.constraints.projectSlug) activeSpan.setAttribute(\"app.constraint.project_slug\", context.constraints.projectSlug);\n\t\t\t\tif (grantedSkillIds?.length) for (const skill of grantedSkillIds) activeSpan.setAttribute(getSkillGrantedAttributeName(skill), true);\n\t\t\t}\n\t\t\tif (context.userId) {\n\t\t\t\tconst user = {\n\t\t\t\t\tid: context.userId,\n\t\t\t\t\t...context.userIpAddress ? { ip_address: context.userIpAddress } : {}\n\t\t\t\t};\n\t\t\t\tsetUser(user);\n\t\t\t}\n\t\t\tif (context.clientId) setTag(\"client.id\", context.clientId);\n\t\t\tif (context.clientFamily) setTag(\"app.client.family\", context.clientFamily);\n\t\t\tif (context.transport) setTag(\"app.transport\", context.transport);\n\t\t\tsetTag(\"app.server.mode.experimental\", experimentalMode);\n\t\t\ttry {\n\t\t\t\tconst rawParams = params && typeof params === \"object\" && !Array.isArray(params) ? params : {};\n\t\t\t\tconst paramsWithConstraints = injectConstraintParams(rawParams, tool, contextWithToolAvailability);\n\t\t\t\tif (activeSpan) for (const [key, value] of Object.entries(paramsWithConstraints)) {\n\t\t\t\t\tconst attributeValue = value == null || typeof value === \"object\" ? JSON.stringify(value) : value;\n\t\t\t\t\tactiveSpan.setAttribute(`gen_ai.tool.call.arguments.${key}`, attributeValue);\n\t\t\t\t}\n\t\t\t\tconst output = await executeToolHandler({\n\t\t\t\t\ttool,\n\t\t\t\t\tparams: rawParams,\n\t\t\t\t\tcontext: contextWithToolAvailability\n\t\t\t\t});\n\t\t\t\tif (activeSpan) activeSpan.setStatus({ code: 1 });\n\t\t\t\tif (typeof output === \"string\") return { content: [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: output\n\t\t\t\t}] };\n\t\t\t\tif (Array.isArray(output)) return { content: output };\n\t\t\t\tif (isCallToolResult(output)) return output;\n\t\t\t\tif (isStructuredToolOutput(output)) return structuredOutputToCallToolResult(output);\n\t\t\t\tthrow new Error(`Invalid tool output: ${output}`);\n\t\t\t} catch (error) {\n\t\t\t\tif (activeSpan) {\n\t\t\t\t\tactiveSpan.setStatus({ code: 2 });\n\t\t\t\t\tif (!isExpectedToolError(error)) activeSpan.recordException(error);\n\t\t\t\t}\n\t\t\t\tif (isApiAuthenticationErrorDeep(error) && context.onUpstreamUnauthorized) try {\n\t\t\t\t\tawait context.onUpstreamUnauthorized();\n\t\t\t\t} catch {}\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: await formatErrorForUser(error, { transport: context.transport })\n\t\t\t\t\t}],\n\t\t\t\t\tisError: true\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tregistrations.push({\n\t\t\tname: tool.name,\n\t\t\tconfig: toolRegistration,\n\t\t\thandler: handleToolCall\n\t\t});\n\t}\n\treturn registrations;\n}\n\n//#endregion\nexport { buildServer };\n//# sourceMappingURL=server.js.map","//#region src/telem/sentry.ts\nconst SCRUB_PATTERNS = [\n\t{\n\t\tpattern: /\\bsk-[a-zA-Z0-9]{48}\\b/g,\n\t\treplacement: \"[REDACTED_OPENAI_KEY]\",\n\t\tdescription: \"OpenAI API key\"\n\t},\n\t{\n\t\tpattern: /\\bBearer\\s+[a-zA-Z0-9\\-._~+/]+={0,}/g,\n\t\treplacement: \"Bearer [REDACTED_TOKEN]\",\n\t\tdescription: \"Bearer token\"\n\t},\n\t{\n\t\tpattern: /\\bsntrys_[a-zA-Z0-9_]+\\b/g,\n\t\treplacement: \"[REDACTED_SENTRY_TOKEN]\",\n\t\tdescription: \"Sentry access token\"\n\t}\n];\nconst MAX_SCRUB_DEPTH = 20;\n/**\n* Recursively scrub sensitive data from any value.\n* Returns tuple of [scrubbedValue, didScrub, descriptionsOfMatchedPatterns]\n*/\nfunction scrubValue(value, depth = 0) {\n\tif (depth >= MAX_SCRUB_DEPTH) return [\n\t\t\"[MAX_DEPTH_EXCEEDED]\",\n\t\tfalse,\n\t\t[]\n\t];\n\tif (typeof value === \"string\") {\n\t\tlet scrubbed = value;\n\t\tlet didScrub = false;\n\t\tconst matchedDescriptions = [];\n\t\tfor (const { pattern, replacement, description } of SCRUB_PATTERNS) {\n\t\t\tpattern.lastIndex = 0;\n\t\t\tif (pattern.test(scrubbed)) {\n\t\t\t\tdidScrub = true;\n\t\t\t\tmatchedDescriptions.push(description);\n\t\t\t\tpattern.lastIndex = 0;\n\t\t\t\tscrubbed = scrubbed.replace(pattern, replacement);\n\t\t\t}\n\t\t}\n\t\treturn [\n\t\t\tscrubbed,\n\t\t\tdidScrub,\n\t\t\tmatchedDescriptions\n\t\t];\n\t}\n\tif (Array.isArray(value)) {\n\t\tlet arrayDidScrub = false;\n\t\tconst arrayDescriptions = [];\n\t\tconst scrubbedArray = value.map((item) => {\n\t\t\tconst [scrubbed, didScrub, descriptions] = scrubValue(item, depth + 1);\n\t\t\tif (didScrub) {\n\t\t\t\tarrayDidScrub = true;\n\t\t\t\tarrayDescriptions.push(...descriptions);\n\t\t\t}\n\t\t\treturn scrubbed;\n\t\t});\n\t\treturn [\n\t\t\tscrubbedArray,\n\t\t\tarrayDidScrub,\n\t\t\tarrayDescriptions\n\t\t];\n\t}\n\tif (value && typeof value === \"object\") {\n\t\tlet objectDidScrub = false;\n\t\tconst objectDescriptions = [];\n\t\tconst scrubbed = {};\n\t\tfor (const [key, val] of Object.entries(value)) {\n\t\t\tconst [scrubbedVal, didScrub, descriptions] = scrubValue(val, depth + 1);\n\t\t\tif (didScrub) {\n\t\t\t\tobjectDidScrub = true;\n\t\t\t\tobjectDescriptions.push(...descriptions);\n\t\t\t}\n\t\t\tscrubbed[key] = scrubbedVal;\n\t\t}\n\t\treturn [\n\t\t\tscrubbed,\n\t\t\tobjectDidScrub,\n\t\t\tobjectDescriptions\n\t\t];\n\t}\n\treturn [\n\t\tvalue,\n\t\tfalse,\n\t\t[]\n\t];\n}\n/**\n* Sentry beforeSend hook that scrubs sensitive data from events\n* and applies custom fingerprinting for specific error types.\n*/\nfunction sentryBeforeSend(event, hint) {\n\tconst firstException = event?.exception?.values?.[0];\n\tif (firstException?.type === \"AI_APICallError\" && firstException.value) event.fingerprint = [\"AI_APICallError\", firstException.value];\n\tconst [scrubbedEvent, didScrub, descriptions] = scrubValue(event);\n\tif (didScrub) {\n\t\tconst uniqueDescriptions = [...new Set(descriptions)];\n\t\tconsole.warn(`[Sentry] Event contained sensitive data: ${uniqueDescriptions.join(\", \")}`);\n\t}\n\treturn scrubbedEvent;\n}\n\n//#endregion\nexport { sentryBeforeSend };\n//# sourceMappingURL=sentry-D99fvngC.js.map","#!/usr/bin/env node\n\n/**\n * Main CLI entry point for the Sentry MCP server.\n *\n * Handles command-line argument parsing, environment configuration, Sentry\n * initialization, and starts the MCP server with stdio transport. Supports\n * device code authentication for sentry.io when no access token is provided.\n *\n * Subcommands:\n *   auth [login]   — Force device code authentication\n *   auth logout    — Clear cached authentication\n *   auth status    — Show current authentication state\n *\n * @example CLI Usage\n * ```bash\n * npx @sentry/mcp-server --access-token=TOKEN --host=sentry.io\n * npx @sentry/mcp-server auth login\n * npx @sentry/mcp-server auth logout\n * ```\n */\n\nimport { buildServer } from \"@sentry/mcp-core/server\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport { buildUsage } from \"./cli/usage\";\nimport { printCliLine } from \"./cli/output\";\nimport { parseArgv, parseEnv, merge } from \"./cli/parse\";\nimport { finalize } from \"./cli/resolve\";\nimport { resolveAccessToken } from \"./auth/resolve-token\";\nimport { authCommand } from \"./cli/commands/auth\";\nimport { sentryBeforeSend } from \"@sentry/mcp-core/telem/sentry\";\nimport { SKILLS } from \"@sentry/mcp-core/skills\";\nimport {\n  getAgentProvider,\n  setAgentProvider,\n  setProviderBaseUrls,\n  getResolvedProviderType,\n} from \"@sentry/mcp-core/internal/agents/provider-factory\";\n\nconst packageName = \"@sentry/mcp-server\";\nconst allSkills = Object.keys(SKILLS) as ReadonlyArray<\n  (typeof SKILLS)[keyof typeof SKILLS][\"id\"]\n>;\nconst usageText = buildUsage(packageName, allSkills);\n\nfunction die(message: string): never {\n  console.error(message);\n  console.error(usageText);\n  process.exit(1);\n}\n\nasync function main() {\n  const rawArgs = process.argv.slice(2);\n\n  // Handle subcommands before normal server parsing\n  if (rawArgs[0] === \"auth\") {\n    await authCommand(rawArgs.slice(1));\n    return;\n  }\n\n  const cli = parseArgv(rawArgs);\n  if (cli.help) {\n    printCliLine(usageText);\n    process.exit(0);\n  }\n  if (cli.version) {\n    printCliLine(`${packageName} ${LIB_VERSION}`);\n    process.exit(0);\n  }\n  if (cli.unknownArgs.length > 0) {\n    console.error(\"Error: Invalid argument(s):\", cli.unknownArgs.join(\", \"));\n    console.error(usageText);\n    process.exit(1);\n  }\n\n  const env = parseEnv(process.env);\n  const partialCfg = (() => {\n    try {\n      return finalize(merge(cli, env));\n    } catch (err) {\n      die(err instanceof Error ? err.message : String(err));\n    }\n  })();\n\n  // Resolve access token before starting the transport.\n  // For sentry.io without a token, this blocks on device code flow —\n  // the client won't connect until the user has authenticated.\n  const cfg = await resolveAccessToken(partialCfg).catch((err) => {\n    die(err instanceof Error ? err.message : String(err));\n  });\n\n  // Configure embedded agent provider\n  if (cfg.agentProvider) {\n    setAgentProvider(cfg.agentProvider);\n  }\n  setProviderBaseUrls({\n    openaiBaseUrl: cfg.openaiBaseUrl,\n    anthropicBaseUrl: cfg.anthropicBaseUrl,\n  });\n  if (cfg.openaiModel) {\n    process.env.OPENAI_MODEL = cfg.openaiModel;\n  }\n  if (cfg.anthropicModel) {\n    process.env.ANTHROPIC_MODEL = cfg.anthropicModel;\n  }\n\n  // Helper functions for provider status messages\n  function hasProviderConflict(): boolean {\n    const providerKeyCount = [\n      process.env.ANTHROPIC_API_KEY,\n      process.env.OPENAI_API_KEY,\n      process.env.OPENROUTER_API_KEY,\n    ].filter(Boolean).length;\n    const hasExplicitProvider =\n      cfg.agentProvider || process.env.EMBEDDED_AGENT_PROVIDER;\n    return providerKeyCount > 1 && !hasExplicitProvider;\n  }\n\n  function getConfiguredProvider(): string | undefined {\n    return (\n      cfg.agentProvider || process.env.EMBEDDED_AGENT_PROVIDER?.toLowerCase()\n    );\n  }\n\n  function hasProviderMismatch(): {\n    mismatch: boolean;\n    configured?: string;\n    availableKey?: string;\n  } {\n    const configured = getConfiguredProvider();\n    if (!configured) return { mismatch: false };\n\n    const hasAnthropic = Boolean(process.env.ANTHROPIC_API_KEY);\n    const hasOpenAI = Boolean(process.env.OPENAI_API_KEY);\n    const hasOpenRouter = Boolean(process.env.OPENROUTER_API_KEY);\n\n    // Check if configured provider's key is missing but other key is present\n    if (\n      (configured === \"openai\" || configured === \"azure-openai\") &&\n      !hasOpenAI &&\n      (hasAnthropic || hasOpenRouter)\n    ) {\n      return {\n        mismatch: true,\n        configured,\n        availableKey: hasOpenRouter\n          ? \"OPENROUTER_API_KEY\"\n          : \"ANTHROPIC_API_KEY\",\n      };\n    }\n    if (\n      configured === \"anthropic\" &&\n      !hasAnthropic &&\n      (hasOpenAI || hasOpenRouter)\n    ) {\n      return {\n        mismatch: true,\n        configured: \"anthropic\",\n        availableKey: hasOpenRouter ? \"OPENROUTER_API_KEY\" : \"OPENAI_API_KEY\",\n      };\n    }\n    if (\n      configured === \"openrouter\" &&\n      !hasOpenRouter &&\n      (hasOpenAI || hasAnthropic)\n    ) {\n      return {\n        mismatch: true,\n        configured: \"openrouter\",\n        availableKey: hasOpenAI ? \"OPENAI_API_KEY\" : \"ANTHROPIC_API_KEY\",\n      };\n    }\n\n    return { mismatch: false };\n  }\n\n  function getProviderSource(): string {\n    // Check CLI flag first (cli.agentProvider is only set by --agent-provider flag)\n    if (cli.agentProvider) return \"explicitly configured\";\n    // Then check env var (process.env takes precedence over cfg since cfg merges both)\n    if (process.env.EMBEDDED_AGENT_PROVIDER)\n      return \"from EMBEDDED_AGENT_PROVIDER\";\n    return \"auto-detected\";\n  }\n\n  // Check for LLM API keys and warn if none available\n  const resolvedProvider = getResolvedProviderType() as\n    | \"openai\"\n    | \"azure-openai\"\n    | \"anthropic\"\n    | \"openrouter\"\n    | undefined;\n\n  if (!resolvedProvider) {\n    const mismatchInfo = hasProviderMismatch();\n    let providerConfigError: string | undefined;\n    try {\n      getAgentProvider();\n    } catch (error) {\n      providerConfigError =\n        error instanceof Error ? error.message : String(error);\n    }\n\n    if (hasProviderConflict()) {\n      console.warn(\n        \"Warning: Multiple LLM API keys are set, but no provider is explicitly configured.\",\n      );\n      console.warn(\n        \"Please set EMBEDDED_AGENT_PROVIDER='openai', 'azure-openai', 'anthropic', or 'openrouter' to specify which provider to use.\",\n      );\n      console.warn(\n        \"AI-powered search tools will be unavailable until a provider is selected.\",\n      );\n    } else if (mismatchInfo.mismatch) {\n      const expectedKey =\n        mismatchInfo.configured === \"openai\" ||\n        mismatchInfo.configured === \"azure-openai\"\n          ? \"OPENAI_API_KEY\"\n          : mismatchInfo.configured === \"openrouter\"\n            ? \"OPENROUTER_API_KEY\"\n            : \"ANTHROPIC_API_KEY\";\n      const configuredViaCliFlag = Boolean(cli.agentProvider);\n      const providerSetting = configuredViaCliFlag\n        ? `--agent-provider=${mismatchInfo.configured}`\n        : `EMBEDDED_AGENT_PROVIDER='${mismatchInfo.configured}'`;\n      const changeProviderHint = configuredViaCliFlag\n        ? \"Change --agent-provider to match your available API key\"\n        : \"Change EMBEDDED_AGENT_PROVIDER to match your available API key\";\n      console.warn(\n        `Warning: ${providerSetting} but ${expectedKey} is not set.`,\n      );\n      console.warn(`Found ${mismatchInfo.availableKey} instead. Either:`);\n      console.warn(\n        `  - Set ${expectedKey} to use the ${mismatchInfo.configured} provider, or`,\n      );\n      console.warn(`  - ${changeProviderHint}`);\n      console.warn(\n        \"AI-powered search tools will be unavailable until this is resolved.\",\n      );\n    } else if (\n      providerConfigError &&\n      !providerConfigError.startsWith(\"No embedded agent provider configured\")\n    ) {\n      console.warn(`Warning: ${providerConfigError}`);\n      console.warn(\n        \"AI-powered search tools will be unavailable until this is resolved.\",\n      );\n    } else {\n      console.warn(\n        \"Warning: No LLM API key found (OPENAI_API_KEY, ANTHROPIC_API_KEY, or OPENROUTER_API_KEY).\",\n      );\n      console.warn(\"AI-powered search tools will be unavailable.\");\n      console.warn(\n        \"Search tools still work with direct Sentry query syntax via the 'query' parameter.\",\n      );\n    }\n    console.warn(\"\");\n  } else {\n    const providerSource = getProviderSource();\n    const providerLabel = getAgentProvider().label;\n    console.warn(\n      `Using ${providerLabel} for AI-powered search tools (${providerSource}).`,\n    );\n    // Warn about auto-detection deprecation\n    if (providerSource === \"auto-detected\") {\n      console.warn(\n        \"Deprecation warning: Auto-detection of LLM provider is deprecated.\",\n      );\n      console.warn(\n        `Please set EMBEDDED_AGENT_PROVIDER='${resolvedProvider}' explicitly.`,\n      );\n      console.warn(\"Auto-detection will be removed in a future release.\");\n    }\n    console.warn(\"\");\n  }\n\n  Sentry.init({\n    dsn: cfg.sentryDsn,\n    sendDefaultPii: true,\n    tracesSampleRate: 1,\n    beforeSend: sentryBeforeSend,\n    initialScope: {\n      tags: {\n        \"app.server.version\": LIB_VERSION,\n        \"app.transport\": \"stdio\",\n        \"app.server.mode.experimental\": cli.experimental ? \"true\" : \"false\",\n        \"app.upstream.host\": cfg.sentryHost,\n        \"app.url.full\": cfg.mcpUrl,\n      },\n    },\n    release: process.env.SENTRY_RELEASE,\n    integrations: [\n      Sentry.consoleLoggingIntegration(),\n      Sentry.zodErrorsIntegration(),\n      Sentry.vercelAIIntegration({\n        recordInputs: true,\n        recordOutputs: true,\n      }),\n    ],\n    environment:\n      process.env.SENTRY_ENVIRONMENT ??\n      (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n  });\n\n  // Log experimental mode status\n  if (cli.experimental) {\n    console.warn(\n      \"Experimental mode enabled: Forward-looking tool variants and experimental features are available.\",\n    );\n    console.warn(\"\");\n  }\n\n  const SENTRY_TIMEOUT = 5000; // 5 seconds\n\n  // Graceful shutdown handlers\n  async function shutdown(signal: string) {\n    console.error(`${signal} received, shutting down...`);\n    await Sentry.flush(SENTRY_TIMEOUT);\n    process.exit(0);\n  }\n\n  process.on(\"SIGTERM\", () => shutdown(\"SIGTERM\"));\n  process.on(\"SIGINT\", () => shutdown(\"SIGINT\"));\n\n  // Uncaught error handlers\n  process.on(\"uncaughtException\", async (error) => {\n    console.error(\"Uncaught exception:\", error);\n    Sentry.captureException(error);\n    await Sentry.flush(SENTRY_TIMEOUT);\n    process.exit(1);\n  });\n\n  process.on(\"unhandledRejection\", async (reason) => {\n    console.error(\"Unhandled rejection:\", reason);\n    Sentry.captureException(reason);\n    await Sentry.flush(SENTRY_TIMEOUT);\n    process.exit(1);\n  });\n\n  const context = {\n    accessToken: cfg.accessToken,\n    grantedSkills: cfg.finalSkills,\n    constraints: {\n      organizationSlug: cfg.organizationSlug ?? null,\n      projectSlug: cfg.projectSlug ?? null,\n      regionUrl: null,\n    },\n    sentryHost: cfg.sentryHost,\n    sentryProtocol: cfg.sentryProtocol,\n    mcpUrl: cfg.mcpUrl,\n    openaiBaseUrl: cfg.openaiBaseUrl,\n    experimentalMode: cli.experimental,\n    transport: \"stdio\" as const,\n  };\n\n  // Build server with context to filter tools based on granted skills\n  // Use experimentalMode when --experimental flag is set (enables forward-looking variants)\n  const server = buildServer({\n    context,\n    experimentalMode: cli.experimental,\n  });\n\n  startStdio(server, context).catch(async (err) => {\n    console.error(\"Server error:\", err);\n    Sentry.captureException(err);\n    await Sentry.flush(SENTRY_TIMEOUT);\n    process.exit(1);\n  });\n}\n\nmain().catch((err) => {\n  console.error(\"Fatal error:\", err);\n  process.exit(1);\n});\n"],"x_google_ignoreList":[4,5,6,7,8,9,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,100,102,167,168,169,170,171,172],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,kBAAkB;;;;;AAKxB,MAAM,8BAA8B;CACnC;CACA;CACA;CACA;CACA;AACA;;;;;;AAMD,MAAM,+BAA+B;;;;;;AAMrC,MAAM,gCAAgC,IAAI,IAAI;CAC7C;CACA;CACA;AACA;;;;AAID,MAAM,wBAAwB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACA;;;;AAID,MAAM,oBAAoB;CACzB,YAAY;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACA;CACD,QAAQ;EACP;E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ACD,IAAI;GACH;GACA;GACA;GACA;GACA;GACA;GACA;EACA;EACD,kBAAkB;GACjB;GACA;GACA;EACA;EACD,kBAAkB;GACjB;GACA;GACA;EACA;CACD;CACD,MAAM,gBAAgB;EACrB,GAAG;EACH,eAAe;GACd;GACA;GACA;GACA;EACA;EACD,oBAAoB;GACnB;GACA;GACA;EACA;EACD,aAAa;GACZ;GACA;GACA;EACA;CACD;CACD,MAAM,iBAAiB;EACtB,GAAG;EACH,UAAU;GACT;GACA;GACA;EACA;EACD,gBAAgB;GACf;GACA;GACA;EACA;EACD,mBAAmB;GAClB;GACA;GACA;EACA;EACD,UAAU;GACT;GACA;GACA;EACA;EACD,cAAc;GACb;GACA;GACA;EACA;EACD,aAAa;GACZ;GACA;GACA;EACA;EACD,mBAAmB;GAClB;GACA;GACA;EACA;EACD,mBAAmB;GAClB;GACA;GACA;EACA;EACD,eAAe;GACd;GACA;GACA;EACA;EACD,gBAAgB;GACf;GACA;GACA;EACA;EACD,cAAc;GACb;GACA;GACA;EACA;EACD,YAAY;GACX;GACA;GACA;EACA;EACD,gBAAgB;GACf;GACA;GACA;EACA;EACD,gBAAgB;GACf;GACA;GACA;EACA;EACD,iBAAiB;GAChB;GACA;GACA;EACA;EACD,mBAAmB,CAAC,cAAc,SAAU;EAC5C,eAAe;GACd;GACA;GACA;EACA;EACD,MAAM,CAAC,MAAM,qBAAsB;EACnC,WAAW,CAAC,kCAAmC;EAC/C,IAAI,CAAC,sCAAuC;EAC5C,aAAa,CAAC,QAAQ,OAAQ;EAC9B,WAAW;GACV;GACA;GACA;GACA;EACA;EACD,cAAc;GACb;GACA;GACA;EACA;EACD,UAAU;GACT;GACA;GACA;EACA;EACD,aAAa,CAAC,WAAW,QAAS;EAClC,cAAc,CAAC,QAAQ,OAAQ;EAC/B,YAAY,CAAC,QAAQ,OAAQ;EAC7B,KAAK;GACJ;GACA;GACA;EACA;EACD,MAAM;GACL;GACA;GACA;EACA;EACD,QAAQ;GACP;GACA;GACA;EAC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;EACpB,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;AACD;AACD,IAAI,kBAAkB;CACrB,WAAW;CACX,aAAa;CACb,YAAY;AACZ;AAID,IAAI,eAAe;AACnB,IAAI,SAAS;AACb,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;CACnB,yBAAyB;EACxB,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,+BAA+B;EAC9B,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,4BAA4B;EAC3B,eAAe;EACf,QAAQ;EACR,YAAY,CAAC,UAAW;CACxB;CACD,mCAAmC;EAClC,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,0BAA0B;EACzB,eAAe;EACf,QAAQ;EACR,YAAY,CAAC,aAAc;CAC3B;CACD,qBAAqB;EACpB,eAAe;EACf,QAAQ;EACR,YAAY,CAAC,aAAa,eAAgB;CAC1C;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,gCAAgC;EAC/B,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,8BAA8B;EAC7B,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,mCAAmC;EAClC,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;GACA;EACA;CACD;CACD,yCAAyC;EACxC,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,qBAAqB;EACpB,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,YAAY;GACX;GACA;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ACD;AACD,IAAI,oBAAoB;CACvB,WAAW;CACX,aAAa;CACb,YAAY;AACZ;AAID,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;CACnB,sBAAsB;EACrB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,wBAAwB;EACvB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,QAAS;CACtB;CACD,8BAA8B;EAC7B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,wFAAyF;CACtG;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,6BAA6B;EAC5B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,OAAQ;CACrB;CACD,mCAAmC;EAClC,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,wGAAyG;CACtH;CACD,iCAAiC;EAChC,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,wBAAwB;EACvB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,6BAA6B;EAC5B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,kBAAkB;EACjB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,oBAAoB;EACnB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD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;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,WAAW,IAAK;CAC7B;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,6BAA6B;EAC5B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,kBAAkB;EACjB,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,8BAA8B;EAC7B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,QAAQ,MAAO;CAC5B;CACD,kCAAkC;EACjC,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,cAAe;CAC5B;AACD;AACD,IAAI,mBAAmB;CACtB,WAAW;CACX,aAAa;CACb,YAAY;AACZ;AAID,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;CACnB,kBAAkB;EACjB,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,sBAAsB;EACrB,eAAe;EACf,QAAQ;CACR;CACD,gBAAgB;EACf,eAAe;EACf,QAAQ;CACR;CACD,qBAAqB;EACpB,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ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GACR,MAAM;GACN,WAAW,EAAE,aAAa,KAAM;EAChC;CACD;CACD;EACC,aAAa;EACb,QAAQ;GACP,OAAO;GACP,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;GACA;GACD,MAAM;GACN,WAAW,EAAE,aAAa,KAAM;EAChC;CACD;CACD;EACC,aAAa;EACb,QAAQ;GACP,OAAO;GACP,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;GACA;GACD,MAAM;GACN,WAAW,EAAE,aAAa,MAAO;EACjC;CACD;CACD;EACC,aAAa;EACb,QAAQ;GACP,OAAO;GACP,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;GACA;GACD,MAAM;GACN,WAAW,EAAE,aAAa,MAAO;EACjC;CACD;CACD;EACC,aAAa;EACb,QAAQ;GACP,OAAO;GACP,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;GACA;GACD,MAAM;GACN,WAAW,EAAE,aAAa,KAAM;EAChC;CACD;CACD;EACC,aAAa;EACb,QAAQ;GACP,OAAO;GACP,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;GACA;GACD,MAAM;GACN,WAAW,EAAE,aAAa,MAAO;EACjC;CACD;CACD;EACC,aAAa;EACb,QAAQ;GACP,OAAO;GACP,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACA;GACD,MAAM;GACN,WAAW,EAAE,aAAa,KAAM;EAChC;CACD;CACD;EACC,aAAa;EACb,QAAQ;GACP,OAAO;GACP,QAAQ;IACP;IACA;IACA;IACA;IACA;IACA;GACA;GACD,MAAM;GACN,WAAW,EAAE,aAAa,KAAM;EAChC;CACD;AACD;;;;;;;;AC/TD,SAAS,2BAA2B,SAAS;CAC5C,MAAM,EAAE,YAAY,kBAAkB,WAAW,GAAG;AACpD,QAAO,UAAU;EAChB,aAAa;EACb,YAAY,MAAE,OAAO,CAAE,EAAC;EACxB,SAAS,YAAY;GACpB,MAAM,eAAe,MAAM,WAAW,SAAS;IAC9C;IACA,SAAS;IACT,SAAS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MAAM,UAAU,MAAM;AACrB,gBAAa,MAAM;AACnB,UAAO,QAAQ,kBAAkB,WAAW,OAAO,SAAS,IAAI,SAAS,aAAa,gBAAgB,OAAO,QAAQ,OAAO,EAAE;EAC9H;AACD,UAAQ,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAM,EAAC;CAC1D;AACD;;;;;;;AAOD,SAAS,iBAAiB,OAAO;CAChC,MAAM,aAAa,IAAI;CACvB,MAAM,eAAe,MAAM,WAAW,MAAM,OAAO,OAAO;AAC1D,QAAO,iBAAiB,SAAS,cAAc,EAAE,MAAM,KAAM,EAAC;AAC9D,KAAI,OAAO,QAAS,YAAW,MAAM,MAAM,OAAO;AAClD,QAAO;EACN,QAAQ,WAAW;EACnB,OAAO,CAAC,WAAW,WAAW,MAAM,OAAO;EAC3C,SAAS,MAAM,OAAO,oBAAoB,SAAS,aAAa;CAChE;AACD;;;;;;;;;;;;;;;AAkBD,MAAM,mBAAmB;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;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