UNPKG

@adonis-agora/agent

Version:

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

20 lines • 1.56 kB
/** * `@adonis-agora/agent/guardrails` — PII, secret, prompt-injection and tool-poisoning detection, a * rule engine with reversible redaction, and the adapter onto the agent loop's processor seams. * * A port of `@dudousxd/nestjs-agent-core/guardrails` (the reference implementation, see PARITY.md): * the detectors and the engine are the same code. The provider wire-format helpers and the SSE * `StreamGuard` live only there, since nothing in this package proxies raw provider traffic. */ export { createGuardrails, GuardrailBlockedError, Guardrails, InMemoryVaultStore, screenToolDefinition, shorthandRules, } from './agent.js'; export { compileGuardPattern, detectKeywords, detectRegex, fold } from './detectors/custom.js'; export { decodeTagChars, INJECTION_SIGNALS, scoreInjection, } from './detectors/injection.js'; export { cardBrand, cnpjValid, cpfValid, detectPii, ibanValid, isIPv4, luhnValid, phoneValid, ssnValid, } from './detectors/pii.js'; export { detectSecrets, entropy } from './detectors/secrets.js'; export { scoreToolText, toolText, } from './detectors/tool-poisoning.js'; export { applyRedactions, DEFAULT_APPROVAL_MESSAGE, DEFAULT_MESSAGES, INJECTION_REPLACEMENT, orderRules, resolveOverlaps, ruleApplies, runDetector, scan, spanLocator, } from './engine.js'; export { globToRegExp, matchesAny } from './glob.js'; export { jsonSlots } from './segments.js'; export { ACTION_SEVERITY, GUARDRAIL_STAGES, PII_TYPES, SECRET_TYPES, } from './types.js'; export { labelFor, Vault } from './vault.js'; //# sourceMappingURL=index.js.map