«Peppa FACTORY» → «FORGE» в экранах, сообщениях, словарях en/kk, шаблоне и тестах; «Пеппа» → «FORGE» в подсказках агентам и правилах; логотип, значок, версия кэша service worker; в словаре старые названия — в «Нельзя». Внутренние имена (CLI peppa, PEPPA_*, MCP-сервер peppa, ключи PEP-N) не меняются. Второй адрес — в mac-route.sh. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import { publicOrigin } from "./auth";
|
|
|
|
export async function authServerMetadata() {
|
|
const o = await publicOrigin();
|
|
return {
|
|
issuer: o,
|
|
authorization_endpoint: `${o}/oauth/authorize`,
|
|
token_endpoint: `${o}/oauth/token`,
|
|
registration_endpoint: `${o}/oauth/register`,
|
|
response_types_supported: ["code"],
|
|
grant_types_supported: ["authorization_code", "refresh_token"],
|
|
code_challenge_methods_supported: ["S256"],
|
|
token_endpoint_auth_methods_supported: ["none"],
|
|
scopes_supported: ["peppa"],
|
|
};
|
|
}
|
|
|
|
export async function resourceMetadata() {
|
|
const o = await publicOrigin();
|
|
return { resource: `${o}/mcp`, authorization_servers: [o], scopes_supported: ["peppa"], bearer_methods_supported: ["header"], resource_name: "FORGE" };
|
|
}
|
|
|
|
export const json = (body: unknown, status = 200, headers: Record<string, string> = {}) =>
|
|
new Response(JSON.stringify(body), {
|
|
status,
|
|
headers: { "Content-Type": "application/json", "Cache-Control": "no-store", "Access-Control-Allow-Origin": "*", ...headers },
|
|
});
|
|
|
|
export const preflight = () =>
|
|
new Response(null, {
|
|
status: 204,
|
|
headers: { "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "GET, POST, OPTIONS", "Access-Control-Allow-Headers": "Authorization, Content-Type, Mcp-Protocol-Version" },
|
|
});
|