/**
 * Pack Inheritance (W1.3 of F-NEW-PRODUCT-AGENT-VISIBILITY-CLUSTER-2026-05-12).
 *
 * Lets a customer declare org-wide rules ONCE at the org-baseline pack
 * (e.g. "no agent deletes a DB without approval", "no MCP across the
 * fleet") and inherit them into every per-agent company pack with optional
 * per-agent additions on top.
 *
 * Inheritance semantics:
 *   - Org-baseline rules apply to ALL agents in the org by default.
 *   - Per-agent pack adds agent-specific rules.
 *   - When the same capability class appears in both, STRICTEST-WINS.
 *   - Composed pack carries provenance pointers to both source pack IDs.
 *
 * Composition produces a single CompliancePackWithClassifiers that can be
 * activated per-agent in PackRegistry. Single-pack activation is intentional
 * — customers can stay with one pack-per-agent mental model while still
 * getting org-wide rule propagation under the hood.
 *
 * @connexum/ai-governance  F-NEW-PRODUCT-PACK-INHERITANCE
 */
import type { CompliancePack } from '../packs/index.js';
import type { CompliancePackWithClassifiers, GovernanceAction } from '../classification/pack-driven-classifier.js';
import { type CapabilityRule } from './company-pack-builder.js';
export interface OrgBaselinePackInput {
    orgId: string;
    /** Stable pack id for the baseline. */
    id?: string;
    /** Display name. */
    name?: string;
    /** Org-wide rules that apply to every agent in this org. */
    rules: CapabilityRule[];
    /** Optional isolation mode (forwarded to buildCompanyPack). */
    isolation?: 'none' | 'sourced-only' | 'strict';
}
/**
 * Build an org-baseline pack. Conceptually identical to a company pack except
 * that its rules apply to every agent in the org by inheritance.
 */
export declare function buildOrgBaselinePack(input: OrgBaselinePackInput): CompliancePackWithClassifiers;
/**
 * Per-agent override that RELAXES a baseline rule. Filed under
 * F-NEW-PRODUCT-PER-AGENT-OVERRIDE-AUTHORITY (W1.9) per Thomas directive
 * 2026-05-12: "individual agents can be overridden by the developer or CISO
 * to allow MCP usage or to delete a database... we're not going to restrict
 * them. We'll just notify them if they override it and an accident happens,
 * as long as we have the incident recorded and we have approval for an
 * employee to change the requirement".
 *
 * An override skips strictest-wins for the named capability. The override
 * itself is gated by employee approval at config time and emitted as a
 * tamper-evident audit event. If a relaxed action subsequently produces an
 * incident, the incident binds back to the override via its `overrideId`.
 */
export interface PerAgentOverride {
    /** Capability class being relaxed. */
    capability: string;
    /** The relaxed action that replaces the baseline rule for this agent. */
    action: GovernanceAction;
    /** Employee identity that approved the override (required, non-empty). */
    approver: string;
    /** Free-text justification recorded in the audit chain. */
    justification: string;
    /** ISO 8601 timestamp the approval was granted. */
    approvedAt: string;
    /** Stable id for binding subsequent incidents back to this override. */
    overrideId?: string;
}
/** Event emitted by composeAgentPack for each override applied. */
export interface OverrideEvent {
    overrideId: string;
    orgId: string;
    agentId: string;
    capability: string;
    baselineAction: GovernanceAction | undefined;
    relaxedAction: GovernanceAction;
    approver: string;
    justification: string;
    approvedAt: string;
    composedAt: string;
}
export interface AgentPackInput {
    /** Per-agent pack id (stable, agent-bound). */
    id: string;
    /** Display name. */
    name: string;
    orgId: string;
    agentId: string;
    /** Per-agent additions / overrides on top of the baseline. */
    rules: CapabilityRule[];
    /** Optional isolation override for this agent. */
    isolation?: 'none' | 'sourced-only' | 'strict';
    /**
     * W1.9 — explicit per-agent overrides that RELAX baseline rules.
     * Each override must carry approver + justification + approvedAt.
     * The composer emits an OverrideEvent and skips strictest-wins for the
     * named capability.
     */
    overrides?: PerAgentOverride[];
}
/**
 * Compose org-baseline + per-agent rules into one pack with strictest-wins
 * semantics on every category. Tracks provenance via `aliases` so audit tooling
 * can identify both sources.
 *
 * Per-agent overrides (W1.9) skip strictest-wins for the named capability:
 * the override's relaxed action replaces whatever strictest-wins would have
 * produced. Each override emits an OverrideEvent via the optional sink.
 */
export declare function composeAgentPack(baseline: CompliancePack, agentInput: AgentPackInput, options?: {
    onOverride?: (event: OverrideEvent) => void;
}): CompliancePackWithClassifiers;
/**
 * Convenience: build baseline + compose into per-agent pack in one call.
 */
export declare function buildInheritedAgentPack(baselineInput: OrgBaselinePackInput, agentInput: AgentPackInput): {
    baseline: CompliancePackWithClassifiers;
    composed: CompliancePackWithClassifiers;
};
export type { CapabilityRule, CompanyPackInput } from './company-pack-builder.js';
//# sourceMappingURL=pack-inheritance.d.ts.map