import { type Program } from "@typespec/compiler"; import type { HttpOperation } from "@typespec/http"; import type { EmittedRoute, RouteSchemaNames } from "typespec-http-zod"; export type Refusal = { readonly kind: "shared-input-key"; readonly types: string; } | { readonly kind: "binary-tool-input"; readonly types: string; } | { readonly kind: "non-json-request"; readonly types: string; } | { readonly kind: "non-object-body"; readonly types: string; } | { readonly kind: "streamed-tool-output"; readonly types: string; }; /** * Why this operation cannot be a tool, or `undefined` where it can. * * **Not a refusal: a reserved-expansion path parameter.** That is a ROUTING fact -- it decides how a * router matches a URL. MCP has no URI template, and the handler receives the same string either * way. The sibling server emitter refuses it and should; that the two emitters have different * refusal sets from one intermediate representation is by design, not a gap. */ export declare function refusalFor(program: Program, route: EmittedRoute, operation: HttpOperation): Refusal | undefined; /** A quality warning, with what its message names. */ export type Warning = { readonly code: "headers-only-success" | "tool-without-description"; readonly format: object; } | { readonly code: "unvalidated-response-media-type"; readonly format: { readonly status: string; readonly types: string; }; }; /** * Quality warnings: the tool is still emitted. * * `headers-only-success` fires where a 2xx or 3xx response carries headers and no body, so everything * that response produces lands in `_meta` -- which a model does not read. Read off each declared * response, ranges included, because a `2XX` with a header and no body answers the same way. * * `unvalidated-response-media-type` fires once per status whose body under some media type is a model * no serialisation derives from -- an `Item` as `application/xml`. The handler supplies that text and * the tool answers it unvalidated. The sibling server emitter raises the same warning, under the same * code, for the same responses. */ export declare function warningsFor(route: EmittedRoute, names: RouteSchemaNames, described: boolean): readonly Warning[];