/**
 * Session key parsing helpers for `agent:{agentId}:{rest}` keys.
 *
 * Re-exports the OpenClaw-aligned builder/parser surface from agent-session-key.ts.
 */
import { defaultMainSessionKey } from './agent-session-key.js';
export * from './agent-session-key.js';
export * from './session-key-utils.js';
export declare function sanitizeSegment(value: string | undefined | null, options?: {
    allowLeadingDash?: boolean;
}): string;
export declare function isValidSegment(value: string | undefined | null): boolean;
/** Structured view of an agent session key rest segment. */
export interface ParsedSessionKey {
    agentId: string;
    source: string;
    accountId: string;
    peerKind: string;
    peerId: string;
    threadId?: string;
    scopeId?: string;
}
export interface BuildSessionKeyParams {
    agentId: string;
    source: string;
    accountId: string;
    peerKind: string;
    peerId: string;
    threadId?: string | null;
    scopeId?: string | null;
    mainKey?: string;
    dmScope?: 'main' | 'per-peer' | 'per-channel-peer' | 'per-account-channel-peer';
    identityLinks?: Record<string, string[]>;
}
/** Build an OpenClaw-style agent session key from routing segments. */
export declare function buildSessionKey(params: BuildSessionKeyParams): string;
/** Parse `agent:{agentId}:{rest}` into routing segments. Returns null for invalid keys. */
export declare function parseSessionKey(sessionKey: string | undefined | null): ParsedSessionKey | null;
export interface BuildSubagentSessionKeyParams extends BuildSessionKeyParams {
    parentSessionKey: string;
}
export declare function buildSubagentSessionKey(params: BuildSubagentSessionKeyParams): string;
export declare function getParentSessionKey(sessionKey: string | undefined | null): string | null;
export { defaultMainSessionKey };
