/** * OpenAI-safe profile for the Frihet MCP server. * * Activated by FRIHET_OPENAI_MODE=true (env var or Worker binding). * * Applies transformations to every tool registration to comply with * OpenAI's ChatGPT Apps submission requirements: * * 1. Excludes tools that return highly sensitive fiscal data * 2. Corrects openWorldHint for tools that trigger external communication * 3. Removes government IDs and credentials from input schemas * 4. Redacts sensitive fields from all tool outputs * 5. Updates descriptions to reflect modified behavior + openWorldHint justifications * * The full MCP server (157 business tools + MCP extras) remains available for Claude, Cursor, * Windsurf, Cline, Codex, and all other MCP clients. * * OpenAI-safe mode: 33 reviewed business tools, 0 prompts, 0 resources, and no * dedicated government-ID fields in I/O. * The full MCP surface remains available outside FRIHET_OPENAI_MODE. * * @see https://developers.openai.com/apps-sdk/app-submission-guidelines */ /** OAuth requirement advertised on every reviewed business tool. */ export declare const OPENAI_OAUTH_SECURITY_SCHEMES: readonly [{ readonly type: "oauth2"; readonly scopes: readonly ["frihet:workspace.manage"]; }]; export declare const OPENAI_WORKSPACE_WEBHOOK_EVENT_TOOLS: ReadonlySet; export declare const OPENAI_REVIEW_CONFIRM_REQUIRED_TOOLS: ReadonlySet; /** Strictly necessary row fields for reviewed collection/search responses. */ export declare const OPENAI_REVIEW_LIST_OUTPUT_FIELDS: Readonly>; export declare const OPENAI_REVIEW_LIST_LIMIT_MAX = 50; export declare const OPENAI_REVIEW_OFFSET_MAX = 10000; export declare const OPENAI_REVIEW_PAGINATION_DEFAULT = 20; export declare const OPENAI_REVIEW_DOCUMENT_LINE_ITEM_MAX = 100; export declare const OPENAI_REVIEW_BUSINESS_CONTEXT_TOP_CLIENTS_MAX = 5; export declare const OPENAI_REVIEW_FREE_TEXT_WARNING = "Do not include passwords, credentials, payment-card data, health data, or official/government identifiers in this free-text field / No incluyas contrasenas, credenciales, datos de tarjetas, datos de salud ni identificadores oficiales en este campo de texto libre"; /** Dot paths whose persisted or query text needs an explicit model-facing warning. */ export declare const OPENAI_REVIEW_FREE_TEXT_WARNING_PATHS: Readonly>; export declare const OPENAI_REVIEW_PAGINATION_LIMITS: Readonly>; export declare const OPENAI_REVIEW_TEXT_INPUT_LIMITS: Readonly>>>; /** * Content-Security-Policy for the OpenAI-safe MCP endpoint. * OpenAI requires CSP specifying the exact domains the app fetches from. */ export declare const OPENAI_CSP: string; /** * Applies the OpenAI-safe profile to an MCP server. * * Must be called BEFORE registerAllTools() and registerAllResources(). * Intercepts both registerTool() and registerResource() to apply * the profile transformations. * * @example * ```ts * const server = new McpServer({ name: "Frihet", version: "1.5.4" }); * if (process.env.FRIHET_OPENAI_MODE === "true") { * applyOpenAIProfile(server); * } * registerAllTools(server, client); * registerAllResources(server, client); * ``` */ export declare function applyOpenAIProfile(server: any): void; /** Number of tools excluded in OpenAI mode (for logging). */ export declare const OPENAI_EXCLUDED_COUNT: number; /** Number of tools explicitly allowed in OpenAI mode. */ export declare const OPENAI_ALLOWED_TOOL_COUNT: number; /** The exact 33-tool allow-list reviewed for the OpenAI connector. */ export declare const OPENAI_REVIEWED_TOOL_ALLOWLIST: ReadonlySet; /** * Backwards-compatible helper for tests and gates that capture the exact * ChatGPT review profile. The reviewed host deliberately uses full tool * descriptions and exposes no grouped discovery meta-tools. */ export declare function applyOpenAIReviewProfiles(server: any): void; /** Number of resources excluded in OpenAI mode (for logging). */ export declare const OPENAI_EXCLUDED_RESOURCE_COUNT: number; //# sourceMappingURL=openai-profile.d.ts.map