/** * DomainAccessChecker — 知识域访问控制检查器 * * FR-X01: * - AC1: 检索请求携带 callerRole,仅返回有权访问的域内条目 * - AC2: 域-角色映射通过配置静态定义 * - AC3: 规则分发遵循订阅范围约束 * - AC4: 调研任务仅访问有权限的信息源 */ import type { Role } from '../auth/auth-types.js'; import type { KnowledgeEntry } from '../types/index.js'; import type { DomainAccessConfig, DomainAccessRule } from './access-control-types.js'; export declare class DomainAccessChecker { private config; private ruleMap; constructor(config?: DomainAccessConfig); /** 更新访问控制配置 */ updateConfig(config: DomainAccessConfig): void; /** * AC1: 检查角色是否有权访问指定域 */ canAccess(role: Role, domainId: string): boolean; /** * AC1: 过滤知识条目,仅返回 callerRole 有权访问的域内条目 */ filterEntries(entries: KnowledgeEntry[], callerRole: Role): KnowledgeEntry[]; /** * AC3: 获取角色可访问的域列表(用于规则分发范围约束) */ getAccessibleDomains(role: Role): string[]; /** * AC4: 检查调研任务是否有权访问指定信息源域 */ canResearch(callerRole: Role, targetDomainId: string): boolean; /** 获取当前配置 */ getConfig(): DomainAccessConfig; /** 列出所有已配置的域规则 */ listRules(): DomainAccessRule[]; private rebuildIndex; } //# sourceMappingURL=domain-access-checker.d.ts.map