export declare const A2A_PROTOCOL_BINDING = "JSONRPC"; export declare const A2A_PROTOCOL_VERSION = "1.0"; /** The three FAF-family media types, in family order. */ export declare const FAF_MEDIA_TYPES: readonly ["application/vnd.faf+yaml", "application/vnd.fafm+yaml", "application/vnd.fafa+yaml"]; /** The only `$schema` a Server Card may carry (modelcontextprotocol/ext-server-card). */ export declare const SERVER_CARD_SCHEMA = "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json"; /** The dated registry schema a `server.json` declares (latest release 2025-12-11). */ export declare const SERVER_JSON_SCHEMA = "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json"; export declare const AI_CATALOG_SPEC_VERSION = "1.0"; export declare const FAFA_SPEC_VERSION = "1.0"; /** Media types a catalog entry uses for each card it lists (AI Catalog's own list). */ export declare const CARD_MEDIA_TYPES: { readonly a2a: "application/a2a-agent-card+json"; readonly server_card: "application/mcp-server-card+json"; readonly fafa: "application/vnd.fafa+yaml"; }; export interface FafaAgent { name?: string; displayName?: string; id?: string; vendor?: string; version?: string; description?: string; homepage?: string; license?: string; } export interface FafaCapability { name?: string; type?: string; description?: string; tags?: unknown; /** MIME type this capability reads, when it's one of the FAF family — drives the skill's `inputModes` and the card's `defaultInputModes`. */ cites_spec?: string; } export interface FafaEndpoint { protocol?: string; transport?: string; location?: string; version?: string; } /** Facts only some cards carry, kept in the `.fafa` under `metadata.cards` so the file stays the one source. */ export interface PackExtras { domain?: string; repository?: string; icon?: string; organizationUrl?: string; keywords?: string[]; examples?: string[]; packages?: PackPackage[]; } export interface PackPackage { registryType: string; identifier: string; version?: string; } export interface FafaDoc { /** `.fafa` spec version this document is authored against, e.g. `"1.0"` — not `agent.version`. */ version?: string; agent?: FafaAgent; capabilities?: FafaCapability[]; endpoints?: FafaEndpoint[]; provenance?: Record; metadata?: { persona?: string; cards?: PackExtras; [key: string]: unknown; }; [key: string]: unknown; } export interface A2AExtension { uri: string; description: string; required: boolean; params: Record; } export interface ProjectedA2A { name: string; description: string; supportedInterfaces: Array<{ url: string; protocolBinding: string; protocolVersion: string; }>; /** Omitted entirely when `agent.vendor` or `agent.homepage` is absent — A2A optional, never a guessed org name. */ provider?: { organization: string; url: string; }; version: string; capabilities: { streaming: boolean; pushNotifications: boolean; extendedAgentCard: boolean; extensions: A2AExtension[]; }; defaultInputModes: string[]; defaultOutputModes: string[]; skills: Array<{ id: string; name: string; description: string; tags: string[]; inputModes?: string[]; }>; } export declare function a2aEndpoints(fafa: FafaDoc): FafaEndpoint[]; /** Authored A2A endpoints, else a single `doorUrl`. Never invents a door. */ export declare function a2aDoors(fafa: FafaDoc, opts?: { doorUrl?: string; }): FafaEndpoint[]; /** * The A2A Agent Card from a `.fafa`: every field comes from the document, and * `capabilities.extensions` holds exactly the extensions passed (none by default). */ export declare function projectA2ACard(fafa: FafaDoc, opts?: { doorUrl?: string; extensions?: A2AExtension[]; }): ProjectedA2A; /** What someone tells the front door. Keys match the crosswalk's slot ids. */ export interface PackAnswers { display_name: string; handle: string; domain: string; description: string; version: string; endpoints?: Array<{ protocol: string; url: string; }>; skills?: Array<{ name: string; description?: string; type?: string; }>; organization?: string; organization_url?: string; homepage?: string; icon?: string; repository?: string; license?: string; tags?: string[]; example_requests?: string[]; packages?: PackPackage[]; } /** Write the `.fafa` a set of answers describes. Throws, naming the answer, when one is missing or malformed. */ export declare function answersToFafa(a: PackAnswers): FafaDoc; /** The `.fafa` as the YAML document people keep. */ export declare function fafaYaml(fafa: FafaDoc): string; /** Where the `.fafa` says it is published: `agent.id` (urn:air), else metadata, else the homepage host. */ export declare function fafaDomain(fafa: FafaDoc): string; /** The stable short name a card is filed under: `agent.name`, lowercased and * reduced to the characters an identifier may carry. The `{name}` of * `urn:air:{publisher}:{namespace}:{name}` — never a display string. */ export declare function fafaHandle(fafa: FafaDoc): string; /** MCP names are reverse-DNS: example.com + weather → com.example/weather. */ export declare function mcpName(fafa: FafaDoc): string; /** The MCP Server Card for a remote MCP server. */ export declare function projectServerCard(fafa: FafaDoc): Record; /** The MCP Registry `server.json` (publishing it stays the owner's step). */ export declare function projectServerJson(fafa: FafaDoc): Record; export type PackCard = 'a2a' | 'server_card' | 'server_json' | 'ai_catalog' | 'ard' | 'fafa'; export interface CatalogRow { identifier: string; displayName: string; type: string; description: string; url: string; version?: string; updatedAt: string; } /** One row per card the domain serves: the A2A card, the Server Card, and the `.fafa` only when asked. */ export declare function catalogRows(fafa: FafaDoc, cards: PackCard[], opts?: { now?: string; listFafa?: boolean; }): CatalogRow[]; /** Who publishes a catalog: AI Catalog's `host` object. */ export interface CatalogHost { displayName: string; identifier?: string; } /** * The catalog's `host` — who publishes these entries. Naming one is what * lifts a catalog from Level 1 "minimal" to Level 2 "discoverable", and * `displayName` is the field that does it: the validator takes an empty one * as *invalid*, not as minimal. So a `.fafa` that names nobody gets no host * at all — a minimal catalog that validates beats a discoverable one that * does not. `identifier` rides along whenever the `.fafa` says where it * lives, and is left off when it does not. */ export declare function catalogHost(fafa: FafaDoc): CatalogHost | undefined; /** The AI Catalog for the domain: every row above, with the host named. */ export declare function projectAiCatalog(fafa: FafaDoc, cards: PackCard[], opts?: { now?: string; listFafa?: boolean; }): Record; /** * The search hints ARD reads, from the `.fafa`: `metadata.cards.keywords` and * `metadata.cards.examples`. An entry with no `representativeQueries` is, in * the conformance CLI's own words, "a valid catalog entry but not a * discoverable ARD entry" — the semantic index is built from that term. */ export declare function ardHints(fafa: FafaDoc): { tags?: string[]; representativeQueries?: string[]; }; /** The ARD manifest: the catalog, plus the search hints ARD reads. ARD builds * on ai-catalog (spec §4), so the document is the same shape — the entries * carry more. */ export declare function projectArd(fafa: FafaDoc, cards: PackCard[], opts?: { now?: string; listFafa?: boolean; }): Record; export interface PackOptions { /** Which cards to build; the `.fafa` is always written. */ cards: PackCard[]; /** `updatedAt` for catalog rows (tests); otherwise now. */ now?: string; /** List the `.fafa` itself in the catalog and ARD manifest (it is then served at /.well-known/fafa). */ listFafa?: boolean; /** Extensions to put on the A2A card; none by default. */ a2aExtensions?: A2AExtension[]; } export interface Pack { fafa: FafaDoc; fafaText: string; a2a?: ProjectedA2A; server_card?: Record; server_json?: Record; ai_catalog?: Record; ard?: Record; } /** Every card a `.fafa` can feed, for the cards asked. */ export declare function projectPack(fafa: FafaDoc, opts: PackOptions): Pack; /** Answers in, the `.fafa` and every card asked for out. */ export declare function buildPack(answers: PackAnswers, opts: PackOptions): Pack;