@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
16 lines • 763 B
JavaScript
/**
* Announce a protected resource to an authorization server running in the same process —
* `@adonis-agora/authkit-server`'s `mcp` option reads this registry when a client asks for a token
* (RFC 8707 `resource`), so the MCP URL never has to be repeated in its config. The contract is the
* global symbol, not a module: neither package imports the other.
*/
const REGISTRY = Symbol.for('@adonis-agora/oauth:resources');
export function registerOAuthResource(resource) {
const slot = globalThis;
if (!Array.isArray(slot[REGISTRY]))
slot[REGISTRY] = [];
const list = slot[REGISTRY];
if (!list.some((r) => r.url === resource.url && r.path === resource.path))
list.push(resource);
}
//# sourceMappingURL=oauth-resource.js.map