/**
 * src/mesh/attenuation.ts
 *
 * Biscuit-style capability attenuation for mesh.delegate().
 *
 * @experimental — sprint-585. Public API may change before v1.x freeze.
 *
 * Implements capability INTERSECTION (child ⊆ parent) without the actual
 * Biscuit token format — keeps the SDK dependency-free. Production deployments
 * should swap `buildToken` / `parseToken` for a real Biscuit issuer in CC.
 *
 * Invariants:
 *  - Child actions = INTERSECTION(parent.actions, requested.actions)
 *  - Child budget  = MIN(parent.budgetEur, requested.budgetEur)
 *  - Child expiry  = MIN(parent.expiresAt, requested.expiresAt) when both present
 *  - Wildcard support: "*" or "ns:*" in parent grants any matching action.
 *
 * No `any` — strict types per craft-standards.
 */
/**
 * MeshCapabilityScope — bounded capability declaration for mesh dispatch.
 *
 * Renamed from `CapabilityScope` to avoid clash with `ports/delegation.ts`
 * which models a different (DelegationClaim) shape.
 */
export interface MeshCapabilityScope {
    /** Actions permitted, e.g. ["brain:read", "vault:read", "hitl:trigger"]. */
    readonly actions: ReadonlyArray<string>;
    /** Max EUR the holder may spend under this scope. */
    readonly budgetEur: number;
    /** Hard expiry — past this date, scope MUST be rejected by callers. */
    readonly expiresAt?: Date;
}
/** Backwards-compatible alias for the spec name `CapabilityScope`. */
export type CapabilityScope = MeshCapabilityScope;
/**
 * AttenuatedToken — opaque transport for a scope across an agent boundary.
 *
 * Phase MVP : plain object (no signature). Phase 2+ : swap with Biscuit token
 * (the encoded `token` field becomes the Biscuit hex / base64 form).
 */
export interface AttenuatedToken {
    /** Allowed actions (post-attenuation). */
    readonly scope: ReadonlyArray<string>;
    /** Remaining EUR allowance. */
    readonly budgetEur: number;
    /** Parent agent identifier — caller of the delegation step. */
    readonly parentId: string;
    /** Optional expiry, ISO 8601 — propagated from MeshCapabilityScope.expiresAt. */
    readonly expiresAt?: string;
}
/**
 * Attenuate a parent scope by a requested scope.
 *
 * Returns a NEW scope (immutable input semantics).
 * Guarantees `child ⊆ parent` (capability intersection invariant).
 */
export declare function attenuateScope(parent: MeshCapabilityScope, requested: MeshCapabilityScope): MeshCapabilityScope;
/**
 * Check whether a scope permits a specific action.
 * Supports wildcards (`"*"`, `"ns:*"`). Returns false if scope is expired.
 */
export declare function scopeAllows(scope: MeshCapabilityScope, action: string): boolean;
/**
 * Encode a scope as an opaque token bound to a parent identifier.
 *
 * Phase MVP : plain structural copy. Phase 2+ : replace with Biscuit-signed token
 * (the `parentId` becomes the issuer public key, `scope`/`budgetEur` become
 * Biscuit facts, `expiresAt` becomes a Biscuit check).
 */
export declare function buildToken(scope: MeshCapabilityScope, parentId: string): AttenuatedToken;
/**
 * Decode a token back to a MeshCapabilityScope.
 *
 * Inverse of `buildToken` modulo identity loss (parentId not part of scope).
 */
export declare function parseToken(token: AttenuatedToken): MeshCapabilityScope;
//# sourceMappingURL=attenuation.d.ts.map