@bonginkan/maria
Version:
MARIA OS v5.9.5 – Self-Evolving Organizational Intelligence OS | Speed Improvement Phase 3: LLM Optimization + Command Refactoring | Performance Measurement + Run Evidence System | Zero ESLint/TypeScript Errors | 人とAIが役割を持ち、学び、進化し続けるための仕事のOS | GraphRAG ×
57 lines (56 loc) • 2.24 kB
TypeScript
/**
* Enterprise Security - Public Facade
*
* Compatibility barrel module to stabilize exports referenced from `src/index.ts`.
* Internal implementations are delegated to each subsystem.
*/
import { EventEmitter } from "node:events";
import type { AccessControlManager } from "./memory-system/enterprise/access-control-manager";
import { type PermissionSet, type User } from "./memory-system/enterprise/access-control-manager";
import type { SecurityEnhancementSuite } from "./memory-system/phase4/security/SecurityEnhancementSuite";
import { type SecurityMetrics as EnhancementSecurityMetrics } from "./memory-system/phase4/security/SecurityEnhancementSuite";
export type AuthenticatedUser = User;
export type { PermissionSet };
export type SecurityMetrics = EnhancementSecurityMetrics;
export interface SecurityReport {
generatedAt: Date;
metrics: SecurityMetrics;
notes?: string[];
}
export interface SecurityIntegrationConfig {
accessControl?: AccessControlManager;
enhancementSuite?: SecurityEnhancementSuite;
}
/**
* RBAC guard for slash commands (deterministic, fail-closed when configured)
*/
export declare class RBACCommandGuard {
private accessControl?;
constructor(accessControl?: AccessControlManager);
assertCanExecute(user: AuthenticatedUser, commandId: string, context?: Record<string, unknown>): Promise<void>;
}
/**
* Minimal adapter to enforce RBAC before running a handler.
*/
export declare class SecureSlashCommandAdapter {
private guard;
constructor(guard: RBACCommandGuard);
run<T>(params: {
user: AuthenticatedUser;
commandId: string;
handler: () => Promise<T>;
context?: Record<string, unknown>;
}): Promise<T>;
}
/**
* Enterprise Security Integration facade.
*/
export declare class EnterpriseSecurityIntegration extends EventEmitter {
private accessControl?;
private enhancementSuite?;
constructor(config: SecurityIntegrationConfig);
getRBACGuard(): RBACCommandGuard;
getSlashCommandAdapter(): SecureSlashCommandAdapter;
generateSecurityReport(): Promise<SecurityReport>;
}
export declare function createEnterpriseSecurityIntegration(config: SecurityIntegrationConfig): EnterpriseSecurityIntegration;