/**
 * User context propagation for the multi-tenant gateway.
 *
 * Provides resolved user identity to the agent runtime so that:
 * - System prompts include user context (configurable per agent)
 * - Memory and credential paths resolve to user-scoped directories
 * - Subagents inherit the parent conversation's user context
 *
 * ## Memory Scopes
 *
 * Three fixed memory scopes exist in the multi-tenant model:
 *
 * 1. **Universal (agent-owned):** `~/.minion/agents/{agentId}/memory/`
 *    Shared across all users interacting with the agent.
 *    Contains agent-level memory (SOUL.md, MEMORY.md, etc.).
 *
 * 2. **Per-user (user-owned):** `~/.minion/users/{userId}/memory/`
 *    Visible to all agents assigned to the user (cross-agent consistency).
 *    Contains user preferences, personal notes, per-user context.
 *
 * 3. **Per-session (inline):** Lives in session context, not persisted separately.
 *    Ephemeral context valid only for the duration of a conversation session.
 */
import type { UserRole } from "../../users/types.js";
/** Resolved user context for the current conversation. */
export type UserContext = {
    userId: string;
    displayName?: string;
    role: UserRole;
    orgId: string;
    /** Path to the user's memory directory: {stateDir}/users/{userId}/memory */
    memoryPath: string;
    /** Path to the user's credentials directory: {stateDir}/users/{userId}/credentials */
    credentialsPath: string;
};
/**
 * Controls how much user information is injected into the system prompt.
 * - 'full': Include userId, displayName, role, orgId, memory/credentials paths
 * - 'id-only': Include only userId
 * - 'none': Skip user section entirely
 */
export type SystemPromptUserAwareness = "full" | "id-only" | "none";
/**
 * Resolve user context from authentication claims and state directory.
 *
 * Returns null when no userId is available (unauthenticated/guest).
 */
export declare function resolveUserContext(params: {
    userId?: string;
    role?: UserRole;
    orgId?: string;
    stateDir: string;
    displayName?: string;
}): UserContext | null;
/**
 * Build a system prompt section describing the current user.
 *
 * Used by buildAgentSystemPrompt when user context is available
 * and systemPromptUserAwareness is not 'none'.
 */
export declare function buildUserContextSection(ctx: UserContext, awareness?: SystemPromptUserAwareness): string;
