/**
 * Webhook processing pipeline.
 *
 * Splits the historic 1339-line `processWebhook` into typed phase helpers so
 * each piece can be reasoned about independently. The main exported function
 * is a narrative orchestrator that threads the typed results through the
 * pipeline:
 *
 *   dedup -> provider -> normalize -> (cross-source dispatch | per-repo path)
 *   per-repo path: extract repo + creds -> trust resolution -> lock file fetch
 *     -> (no lock file: global dispatch & return)
 *     -> security hold + workflow modifications -> default-branch registration
 *     -> match triggers -> dispatch matched same-source -> dispatch globals
 *     -> forward traces & event log
 *
 * Internal helpers are pure phase functions returning typed results; the only
 * top-level export is `processWebhook`, callable from server.ts / app.ts.
 */
import type { SimulatedEvent } from '@kici-dev/engine';
import type { WebhookInfo } from '../webhook/handler.js';
import type { ProviderBundle } from '../provider-registry.js';
import type { TrustResolution } from '../security/trust-resolver.js';
import { type ProcessingDeps } from './processor.js';
interface TrustOutcome {
    trustResolution: TrustResolution | undefined;
    /** Default 'base' for PR events; trust resolution may override to 'head'. */
    lockFileSource: 'head' | 'base';
}
export declare function resolveTrustForPR(args: {
    info: WebhookInfo;
    deps: ProcessingDeps;
    bundle: ProviderBundle;
    event: SimulatedEvent;
    payload: Record<string, unknown>;
    resolvedOrgId: string;
    repoIdentifier: string;
    credentials: Record<string, unknown>;
}): Promise<TrustOutcome>;
/**
 * Process a webhook through the complete pipeline.
 *
 * Flow:
 *   1. Dedup + provider lookup -> contributor cache invalidation -> normalize
 *   2. Cross-source dispatch (generic webhook fan-out, optional)
 *   3. Extract repo + credentials, handle /kici approval comments
 *   4. Trust resolution for PR events
 *   5. Lock file fetch (with multi-provider fallback)
 *      - No lock file: dispatch global workflows for this event (same org) and return
 *   6. Workflow modification detection + security hold check status
 *   7. Default-branch registration
 *   8. Match triggers + dispatch matched same-source workflows
 *   9. Match + dispatch global workflows for OTHER repos
 *  10. Forward Platform trace + record event log
 */
export declare function processWebhook(info: WebhookInfo, deps: ProcessingDeps): Promise<void>;
export {};
//# sourceMappingURL=process-webhook.d.ts.map