import { b as OperationContextSummary, O as OperationOperatorType, I as InvocationTarget, T as TinyCloudPosture } from './contract-xMIIMtpF.js';

type SafeInvocationContext = OperationContextSummary & {
    operatorType: OperationOperatorType;
};
type InvocationContextResolution = {
    ok: true;
    context: SafeInvocationContext;
} | {
    ok: false;
    error: {
        code: "PROFILE_NOT_FOUND";
        message: string;
        retryable: false;
    };
};
/** Validated profile material retained only inside runtime resolution. */
type StoredProfile = {
    name: string;
    host: string;
    chainId: number;
    spaceName: string;
    did: string;
    createdAt: string;
    sessionDid?: unknown;
    ownerDid?: unknown;
    spaceId?: unknown;
    posture?: unknown;
    operatorType?: unknown;
    authMethod?: unknown;
    defaultSpace?: unknown;
    privateKey?: unknown;
    address?: unknown;
    openkeyHost?: unknown;
};
/** Profile snapshot plus its derived safe invocation context. */
type InvocationProfileResolution = {
    ok: true;
    profile: StoredProfile;
    context: SafeInvocationContext;
} | Extract<InvocationContextResolution, {
    ok: false;
}>;
/**
 * Resolves one selected profile to safe identity data. Resolution is deliberately
 * one-way: after selecting a name, any missing, malformed, or unreadable
 * profile is PROFILE_NOT_FOUND rather than a reason to choose another profile.
 */
declare function resolveInvocationContext(target?: InvocationTarget): Promise<InvocationContextResolution>;
/** Resolves the selected profile and its safe context from one profile read. */
declare function resolveInvocationProfile(target?: InvocationTarget): Promise<InvocationProfileResolution>;
/**
 * Selects the profile name once for a long-lived projection process. The
 * selected name is safe identity data; profile material is read only by the
 * invocation runtime after the projection pins this value.
 */
declare function resolveInvocationProfileName(explicitProfile?: string): Promise<string>;
/** Derives the effective posture without consulting any later profile read. */
declare function resolvePosture(profile: Pick<StoredProfile, "posture" | "authMethod">): TinyCloudPosture;

export { type InvocationContextResolution, type InvocationProfileResolution, type SafeInvocationContext, type StoredProfile, resolveInvocationContext, resolveInvocationProfile, resolveInvocationProfileName, resolvePosture };
