import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; import type { DomainName } from "../constants.js"; import { type AccessPolicy } from "../config/access-policy.js"; export interface PromptDefinition { name: string; title: string; description: string; argsSchema: z.ZodRawShape; /** * Business domains this prompt's runbook orchestrates. Used by the access * policy: the prompt (and its mirror workflow tool in `tools/workflows.ts`) * is cut when ANY of these domains is filtered out, so a surfaced runbook * never points the model at tools that aren't registered. Optional * name-resolution helpers (e.g. resolving a manager name via * `boond_resources_search`) are intentionally NOT listed: if their domain * is filtered, the user simply passes a numeric id instead. */ domains: readonly DomainName[]; /** * Render the runbook. `now` is the reference date for relative periods * ("cette semaine", "D → D+H"): the server resolves them to literal ISO * dates (issue #260, `./periods.ts`) instead of leaving the arithmetic to * the model. Injected by tests; defaults to the wall clock. */ build: (args: Record, now?: Date) => string; } /** * Pour chaque prompt, l'utilisateur peut passer soit un ID numérique (rapide, * sans ambiguïté), soit un libellé textuel (« Jean Dupont », « ACME », * « Refonte SI »…). Le runbook renvoyé au modèle contient alors une étape * préalable qui résout le libellé via le `*_search` adéquat avant de l'utiliser * comme filtre. Cela évite à l'utilisateur de chercher l'ID en amont — la * majorité des appels passent en une seule formulation naturelle. */ type EntityKind = "resource" | "society" | "opportunity" | "agency" | "project" | "candidate" | "contact"; export declare const PROMPTS: PromptDefinition[]; /** Search the entity by the typed prefix; empty on any failure (no credentials, API down). */ export declare function completeEntityArgument(kind: EntityKind, value: string): Promise; export declare function registerAllPrompts(server: McpServer, policy?: AccessPolicy): void; /** Exposed for tests so we can assert names/coverage without instantiating a server. */ export declare const REGISTERED_PROMPTS: { name: string; title: string; description: string; argKeys: string[]; }[]; export {}; //# sourceMappingURL=index.d.ts.map