UNPKG

@adonis-agora/agent

Version:

Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.

49 lines • 1.28 kB
/** * Guardrails: detectors that look at text on its way to or from a model — prompts, answers, tool * arguments, tool results, tool descriptions — and rules that decide what to do when they fire. * * Nothing in this module depends on the agent loop, on NestJS or on a runtime API beyond the * language itself. A process that proxies raw provider traffic uses the detectors, `scan`, `Vault` * and `StreamGuard` directly; `createGuardrails` is the adapter onto the loop's processor seams. */ export const GUARDRAIL_STAGES = [ 'llm_request', 'llm_response', 'tool_args', 'tool_result', 'tool_description', ]; /** Severity order used to combine several rules: the most severe wins. */ export const ACTION_SEVERITY = { allow: 0, log: 1, redact: 2, approve: 3, block: 4, }; export const PII_TYPES = [ 'email', 'phone', 'cpf', 'cnpj', 'ssn', 'credit_card', 'iban', 'ip_address', ]; export const SECRET_TYPES = [ 'openai_key', 'anthropic_key', 'aws_access_key', 'aws_secret_key', 'github_token', 'gitlab_token', 'slack_token', 'google_api_key', 'stripe_key', 'jwt', 'bearer_token', 'private_key', 'generic_secret', ]; //# sourceMappingURL=types.js.map