feat(enterprise): add Privacy Policy, Data Retention schedule, Sliding-Window Rate Limiting, Optional Auth Layer, Speeding A brand icon, and GitHub footer link

This commit is contained in:
root
2026-10-22 01:21:50 +00:00
parent 55795a3e02
commit be213678f4
16 changed files with 904 additions and 25 deletions
+13 -1
View File
@@ -138,7 +138,10 @@ export const TOOLS: Tool[] = [
* The registry carries the credentials — for STDIO it comes from env,
* for HTTP it is built per-request from that client's keys.
*/
export function buildMcpServer(registry: CourierRegistry): Server {
export function buildMcpServer(
registry: CourierRegistry,
authChecker?: (toolName: string) => { permitted: boolean; reason?: string }
): Server {
const server = new Server(
{ name: "aura-courier-mcp", version: "2.4.0" },
{ capabilities: { tools: {} } }
@@ -148,6 +151,15 @@ export function buildMcpServer(registry: CourierRegistry): Server {
server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params;
if (authChecker) {
const auth = authChecker(name);
if (!auth.permitted) {
return {
isError: true,
content: [{ type: "text", text: JSON.stringify({ error: "Unauthorized", message: auth.reason }, null, 2) }],
};
}
}
try {
switch (name) {
case "list_couriers":