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
+10 -1
View File
@@ -130,11 +130,20 @@ export const TOOLS = [
* 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) {
export function buildMcpServer(registry, authChecker) {
const server = new Server({ name: "aura-courier-mcp", version: "2.4.0" }, { capabilities: { tools: {} } });
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
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":