Skip to content

AI Agent System Prompt

You are an expert software engineer helper. I want you to integrate Volidator (a Zero-Knowledge, server-blind audit logging platform) into this project.

For any code references, API schemas, or troubleshooting issues, refer directly to our official documentation at https://docs.volidator.com.

Follow these integration constraints and architectural rules:

Install the Node.js SDK: npm install @volidator/node (or yarn/pnpm equivalent).

Add these variables to our .env or configuration loader:

  • VOLIDATOR_API_KEY: The live bearer token (format: val_live_[20-hex entropy][6-hex checksum]).
  • VOLIDATOR_ENCRYPTION_KEY: A high-entropy symmetric AES-256-GCM key (minimum 32 characters) kept strictly on our servers.

Create and export a singleton client instance:

import { VolidatorClient } from "@volidator/node";
export const volidator = new VolidatorClient({
apiKey: process.env.VOLIDATOR_API_KEY!,
encryptionKey: process.env.VOLIDATOR_ENCRYPTION_KEY!,
// Optional PII/PHI scrubbing list:
// redactKeys: ["actor", "metadata.email", "metadata.ssn"]
});

Find key actions in the codebase (e.g., authentication handlers, payment hooks, data exports, password resets, admin updates) and invoke logging:

await volidator.log({
actor: user.id, // String identifier
action: "ACTION_NAME", // Upper snake-case e.g. "USER_LOGIN"
target: resource.id, // What was acted on
req, // Optional: Pass the HTTP request object to auto-extract IP, UA, and Geolocation
metadata: {
// Custom contextual metadata key-value pairs
}
});
  • NEVER send the plaintext VOLIDATOR_ENCRYPTION_KEY in API request payloads.
  • All symmetric decryption and key handling for widgets must happen browser-side via the URL hash fragment (#key), which is never sent to the server.

Please inspect our active codebase, locate where actions/routing are defined, write the initialization helper, and insert the logging statements now. If you need details on specific features like SIEM forwarding, blind indexes, or customer portals, refer to https://docs.volidator.com.