UNPKG

@ithena-one/mcp-governance

Version:

Governance layer (Identity, RBAC, Credentials, Audit, Logging, Tracing) for Model Context Protocol (MCP) servers.

41 lines 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultAuditStore = exports.ConsoleAuditLogStore = exports.NoOpAuditLogStore = void 0; /** * An AuditLogStore that does nothing. Used as the default if no store is provided. */ class NoOpAuditLogStore { async initialize() { // Do nothing } async log(_record) { // Do nothing } async shutdown() { // Do nothing } } exports.NoOpAuditLogStore = NoOpAuditLogStore; /** * An AuditLogStore that logs audit records as JSON to the console. * Suitable for development and debugging. */ class ConsoleAuditLogStore { async initialize() { console.log("ConsoleAuditLogStore initialized"); } async log(record) { try { console.log(JSON.stringify(record)); } catch (error) { console.error("Failed to serialize or log audit record:", error, record); } } async shutdown() { console.log("ConsoleAuditLogStore shutting down"); } } exports.ConsoleAuditLogStore = ConsoleAuditLogStore; exports.defaultAuditStore = new NoOpAuditLogStore(); //# sourceMappingURL=audit.js.map