/**
 * Auto-Pack Generator (W2.3 of F-NEW-PRODUCT-AGENT-VISIBILITY-CLUSTER-2026-05-12).
 *
 * Closes the loop between W1.7 (OWASP Agentic scanner) and W1.5 (capability-
 * class company packs). Customer scans an agent manifest -> auto-pack
 * generator proposes a company pack -> customer accepts / edits / rejects
 * each rule inline -> resulting pack is publishable.
 *
 * Customer flow:
 *   const manifest = ... ;                                // from W2.1/W2.2 discovery
 *   const { pack, scanReport, proposedRules } =
 *     autoGenerateCompanyPack(manifest, { packIdPrefix: 'agent-mailer' });
 *   // Customer reviews scanReport.findings + proposedRules in the dashboard,
 *   // selects which rules to accept, optionally edits actions:
 *   const acceptedRules = customerSelection;
 *   const final = autoGenerateCompanyPack(manifest, {
 *     packIdPrefix: 'agent-mailer',
 *     acceptedRules,
 *   }).pack;
 *   // final is a CompliancePackWithClassifiers ready to publish via
 *   // PackVersionStore.publishVersion().
 *
 * HITL Phase 2b (2026-05-21): perRuleActions baking.
 *   Pass options.perRuleActions (keyed {packId: {findingId: {action, notify_hitl?}}})
 *   and options.scanFindings (the raw OwaspFinding[] from the scan) to bake
 *   customer-selected per-rule actions AND notify_hitl flags into the generated
 *   pack's categoryActions and categoryHitl maps. The categoryHitl map is then
 *   read at runtime by evaluateAgentBoundPacks() to trigger HITL dispatch.
 *
 * @connexum/ai-governance  F-NEW-PRODUCT-AUTO-PACK-GENERATOR
 */
import { type AgentManifest, type ScanReport, type OwaspFinding } from './owasp-agentic-scanner.js';
import { type CapabilityRule } from './company-pack-builder.js';
import type { CompliancePackWithClassifiers } from '../classification/pack-driven-classifier.js';
export interface AutoPackOptions {
    /** Prefix for the generated pack id. Default: 'auto-pack'. */
    packIdPrefix?: string;
    /** Override the resulting pack version (semver). Default: '0.1.0'. */
    version?: string;
    /**
     * When true, every suggested rule from the scan is accepted into the pack
     * without customer review. When false (default), the caller must pass
     * `acceptedRules` explicitly.
     */
    acceptAllSuggestedRules?: boolean;
    /**
     * Customer-curated rule list. Replaces / overrides the scan's suggestions.
     * When set, `acceptAllSuggestedRules` is ignored.
     */
    acceptedRules?: CapabilityRule[];
    /** Optional isolation override for the generated pack. */
    isolation?: 'none' | 'sourced-only' | 'strict';
    /**
     * HITL Phase 2b: per-rule action overrides for a SINGLE agent.
     * Keyed { packId: { findingId: { action, notify_hitl? } } }.
     * Sourced from OnboardingRecord.perRuleActions[agentId].
     * When set alongside scanFindings, the action + notify_hitl values
     * are baked into the generated pack's categoryActions and categoryHitl maps.
     */
    perRuleActions?: Record<string, Record<string, {
        action: string;
        notify_hitl?: boolean;
    }>>;
    /**
     * HITL Phase 2b: the raw OwaspFinding[] from the scan for this agent.
     * Required for findingId → capability resolution when perRuleActions is set.
     * Typically passes scanReport.findings from the same scan call.
     */
    scanFindings?: OwaspFinding[];
}
export interface AutoPackResult {
    pack: CompliancePackWithClassifiers;
    scanReport: ScanReport;
    proposedRules: CapabilityRule[];
    acceptedRules: CapabilityRule[];
    /** Risk classes the scan flagged that have NO suggested-rule remediation. */
    reviewRequiredRisks: string[];
    /**
     * HITL Phase 2b: map of capability → notify_hitl baked into the pack.
     * Only populated when perRuleActions + scanFindings were supplied and at
     * least one finding had notify_hitl=true. Callers can inspect this to
     * confirm HITL flags were baked correctly.
     */
    categoryHitl: Record<string, boolean>;
}
export declare function autoGenerateCompanyPack(manifest: AgentManifest, options?: AutoPackOptions): AutoPackResult;
//# sourceMappingURL=auto-pack-generator.d.ts.map