/** * Session Hierarchy - Parent-child session relationships * * Enables session inheritance and scoping for multi-agent workflows. */ /** * Hierarchical session configuration */ export interface HierarchicalSessionConfig { /** Session ID */ id?: string; /** Session name */ name?: string; /** Parent session */ parent?: HierarchicalSession; /** Inherit parent context */ inheritContext?: boolean; /** Session data */ data?: Record; } /** * Session scope type */ export type SessionScope = 'local' | 'inherited' | 'global'; /** * HierarchicalSession - Session with parent-child relationships */ export declare class HierarchicalSession { readonly id: string; readonly name: string; readonly parent?: HierarchicalSession; readonly children: Set; readonly createdAt: number; private data; private inheritContext; constructor(config?: HierarchicalSessionConfig); /** * Create a child session */ createChild(config?: Omit): HierarchicalSession; /** * Set a value with scope */ set(key: string, value: any, scope?: SessionScope): void; /** * Get a value (with inheritance) */ get(key: string): any; /** * Get value with scope info */ getWithScope(key: string): { value: any; scope: SessionScope; source: string; } | undefined; /** * Check if key exists (locally or inherited) */ has(key: string): boolean; /** * Delete a local value */ delete(key: string): boolean; /** * Get all local keys */ localKeys(): string[]; /** * Get all keys (including inherited) */ allKeys(): string[]; /** * Get depth in hierarchy */ getDepth(): number; /** * Get root session */ getRoot(): HierarchicalSession; /** * Get path from root */ getPath(): string[]; /** * Fork session (create copy with same data) */ fork(name?: string): HierarchicalSession; /** * Detach from parent */ detach(): void; /** * Get session info */ getInfo(): { id: string; name: string; parentId?: string; childCount: number; depth: number; localKeys: number; allKeys: number; }; } /** * Create hierarchical session */ export declare function createHierarchicalSession(config?: HierarchicalSessionConfig): HierarchicalSession; export default HierarchicalSession;