@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
44 lines • 1.98 kB
JavaScript
/** `{name}` placeholders: `{company}`, `{link}`, `{code}`, `{tool}`. */
export const DEFAULT_POPPY_CONNECTIONS_TEXTS = {
pageTitle: 'Connect your account',
connectTitle: 'Connect your {company} account',
connectBody: 'Your assistant asked to act on your {company} account. Sign in there to allow it.',
direct: 'Sign in to {company}',
device: 'Approve with a code instead',
deviceBody: 'Open {link} and enter the code {code}. Then come back here.',
deviceCheck: 'I approved it',
mediatedTitle: 'Or sign in here',
mediatedSubmit: 'Continue',
codeTitle: 'Enter the code',
codeLabel: 'Code sent to {sentTo}',
codeSubmit: 'Confirm',
connectedTitle: 'Connected to {company}',
connectedBody: 'You can go back to the conversation.',
failedTitle: 'Could not connect',
failedBody: 'The sign-in did not go through. Go back to the conversation and try again.',
expiredTitle: 'This link expired',
expiredBody: 'Ask your assistant for a new one.',
pendingBody: 'Not approved yet. Approve it and try again.',
confirmConnectTitle: 'Connect your {company} account',
confirmConnectVerb: 'I connected',
confirmConnectDetail: 'Open this link and sign in to {company}: {link}',
continueAfterConnect: 'I connected my account at {company}. Please go on with what I asked.',
confirmWriteTitle: '{company}: {tool}',
confirmRequestTitle: 'Ask {company} to act',
confirmDisconnectTitle: 'Disconnect your {company} account',
confirmVerb: 'Confirm',
};
export function definePoppyConnectionsConfig(config) {
return config;
}
/** `https://Acme.com/` → `acme.com`; `localhost:3333` stays. */
export function normalizeDomain(value) {
const trimmed = value.trim().toLowerCase().replace(/\/+$/, '');
try {
if (/^[a-z]+:\/\//.test(trimmed))
return new URL(trimmed).host;
}
catch { }
return trimmed.replace(/^www\./, '');
}
//# sourceMappingURL=config.js.map