import type { AgentConstraints } from '../types/agent.types.js'; export interface EffectivePermissions { delegationDepth: number; forbidden_paths: string[]; requires_approval_for: string[]; } export declare class PermissionPropagationService { /** * Derive the effective permissions for a child agent given its parent's constraints. * * Intersection rule: a child can never gain scope the parent forbids. * Forbidden paths are UNIONED (child can never write what parent can't write). * Approval requirements are UNIONED (child inherits all parent approval gates). */ derive(parent: AgentConstraints, child: AgentConstraints, parentDelegationDepth?: number): EffectivePermissions; /** * Returns true if the given file path falls under any forbidden path prefix. * * Both sides are resolved to their real (symlink-free, `..`-collapsed) form * before comparing — a lexical-only comparison can be defeated by an * unnormalized ".." segment, or by a mismatch between a caller's * already-symlink-resolved path and a `forbidden_paths` entry configured * using an unresolved symlink pointing at the same real location. * * A relative `forbidden_paths` entry (the form real agent personas actually * use, e.g. `.valora/`, `data/`) is resolved against `baseDir` — pass the * caller's actual working directory (which can legitimately differ from * `process.cwd()`, e.g. in exploration contexts) rather than relying on the * default. */ isForbidden(filePath: string, forbiddenPaths: string[], baseDir?: string): boolean; /** * Returns true if the given file path matches any approval-required pattern. * Supports simple glob wildcards (*) in patterns. */ requiresApproval(filePath: string, patterns: string[]): boolean; } export declare function getPermissionPropagationService(): PermissionPropagationService; //# sourceMappingURL=permission-propagation.service.d.ts.map