@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
16 lines • 857 B
JavaScript
/**
* The contract with the authorization server is this global symbol, not a module: neither package
* imports the other (like `Symbol.for('@adonis-agora/oauth:resources')` for MCP).
*/
export const POPPY_AUTHENTICATE_SLOT = Symbol.for('@adonis-agora/poppy:authenticate');
/** The resolver installed in the global slot, if any — read per request, so install order is free. */
export function globalPoppyAuthenticate() {
const value = globalThis[POPPY_AUTHENTICATE_SLOT];
return typeof value === 'function' ? value : undefined;
}
/** The Poppy issuer authkit announces (`Symbol.for('@adonis-agora/poppy:issuer')`), if any. */
export function globalPoppyIssuer() {
const value = globalThis[Symbol.for('@adonis-agora/poppy:issuer')];
return typeof value === 'string' && value !== '' ? value : undefined;
}
//# sourceMappingURL=auth.js.map