/**
 * Trust passport surface for @connexum/ai-governance.
 *
 * Closes CR-CRIT-01 SDK piece (`docs/audits/2026-05-12-client-ready-integration-audit.md`):
 * before this module, the trust-api package + daemon existed but `grep -rn
 * 'AgentPassport|/v1/agents/register' --include='*.ts' packages apps src |
 * grep -v '/trust-api/'` returned zero matches — no customer-installable code
 * path called the daemon. This module bridges that gap.
 *
 * Two operations:
 *   - `issuePassport(opts)` — HTTP POST to the daemon's /v1/agents/register
 *     endpoint. Returns the SignedPassport. Requires daemon to be reachable.
 *   - `verifyInboundPassport(passport, platformCaPublicKey)` — Locked
 *     Invariant 4 offline verifier. Uses the org public key embedded in the
 *     passport claims; no daemon contact required.
 *
 * Locked Architectural Invariant binding (see CLAUDE.md):
 *   - 1 (self-sovereign) — daemon issues passports; relying party verifies
 *     offline against the cached platform CA public key.
 *   - 2 (advisory) — verifyInboundPassport never throws on a malformed
 *     passport; returns a discriminated union. SDK callers branch on
 *     `result.valid` and apply their own policy on `valid:false`.
 *   - 3 (graceful degradation) — issuePassport accepts a `timeoutMs` (default
 *     5000) and rejects with a structured error if the daemon is unreachable
 *     so callers can apply their own fallback policy (cache the last
 *     passport, retry, surface to operator, etc.).
 *   - 4 (offline-verifiable) — verifyInboundPassport calls verifyPassportOffline
 *     from @connexum/trust-api which extracts the org public key from
 *     `passport.public_key_b64` (signed-in field; tampering invalidates the
 *     signature).
 *   - 5 (structured response) — verifyInboundPassport returns a
 *     VerificationResult discriminated union; never throws.
 *
 * @connexum/ai-governance — F-NEW-SDK-PASSPORT-SURFACE-2026-05-12
 */
import { type SignedPassport, type VerificationResult, type RevocationListEntry } from './_vendored/passport-signer.js';
/**
 * Options for the customer's passport-issuance call.
 */
export interface IssuePassportOptions {
    /** Daemon URL (default http://127.0.0.1:4200). Include scheme + host + port. */
    daemonUrl?: string;
    /** Bearer token for the daemon's auth layer. Required. */
    bearerToken: string;
    /** Display name shown to operators in the audit chain. */
    displayName: string;
    /** SHA-256 hex of the model + system prompt at issuance time. */
    modelLineageHash: string;
    /** Free-form versioning of the org's governance policy at issuance. */
    governancePolicyVersion: string;
    /** Default-deny shape; see @connexum/trust-api AgentScope. */
    authorizedScope: {
        read_data: boolean;
        write_data: boolean;
        trigger_workflows: boolean;
        call_external_apis: boolean;
        max_concurrent_actions: number;
        allowed_domains: string[];
    };
    /** Non-empty per packBinding-primacy invariant. */
    packBinding: string[];
    /** Passport TTL in seconds (max 90 days enforced by daemon). */
    ttlSeconds?: number;
    /** HTTP request timeout. Default 5000 ms (Invariant 3 graceful degradation). */
    timeoutMs?: number;
}
/**
 * Discriminated result type for `issuePassport()`. Never throws on a daemon
 * failure — returns a structured error so callers can apply their own policy.
 */
export type IssuePassportResult = {
    ok: true;
    passport: SignedPassport;
} | {
    ok: false;
    reason: 'network' | 'timeout' | 'unauthorized' | 'bad_request' | 'server_error' | 'malformed_response';
    detail?: string;
    statusCode?: number;
};
/**
 * Issue a passport for an agent by calling the trust-api daemon's
 * POST /v1/agents/register endpoint. The org keypair is generated daemon-side
 * (Locked Invariant 1 self-sovereign); both signatures are returned in the
 * response.
 *
 * Customers cache the returned passport locally and present it to relying
 * parties. Offline verification uses `verifyInboundPassport()` below.
 */
export declare function issuePassport(opts: IssuePassportOptions): Promise<IssuePassportResult>;
/**
 * Verify a passport using ONLY the platform CA public key (Locked Invariant 4
 * offline path). Suitable for relying parties who have cached the CA pub key
 * out-of-band and want to verify inbound passports with no daemon contact.
 *
 * `platformCaPublicKey` is the raw 32-byte Ed25519 public key. Operators
 * fetch + cache it from the daemon at deployment time; rotation is rare and
 * communicated through the platform's regular channels.
 *
 * Returns a structured VerificationResult — never throws (Invariant 5).
 */
export declare function verifyInboundPassport(passport: unknown, platformCaPublicKey: Uint8Array, options?: {
    requireCountersignature?: boolean;
    now?: Date;
    /**
     * A-5: optional signed revocation list fetched from GET /v1/revocation-list.
     * When provided, passport_id present in the list returns
     * `{ valid: false, reason: 'revoked' }`.
     * When absent, falls back to TTL-only behavior (Invariant 3 graceful degradation).
     */
    revocationList?: RevocationListEntry[];
}): VerificationResult;
export type { SignedPassport, VerificationResult, RevocationListEntry } from './_vendored/passport-signer.js';
//# sourceMappingURL=index.d.ts.map