/** * @holoscript/core/self-improvement — Self-Improvement Pipeline Type Declarations */ export interface PipelineConfig { [key: string]: any; } export interface PipelineStats { total: number; succeeded: number; failed: number; [key: string]: any; } export interface FailedGeneration { source: string; error: string; [key: string]: any; } export type FailureCategory = 'parse' | 'type' | 'runtime' | 'logic' | 'unknown'; export type DifficultyLevel = 'easy' | 'medium' | 'hard' | 'expert'; export interface TrainingExample { prompt: string; completion: string; [key: string]: any; } export class SelfImprovementPipeline { constructor(config?: PipelineConfig); process(failures: FailedGeneration[]): Promise; getStats(): PipelineStats; } export interface QualityMetrics { [key: string]: number; } export type QualityDimension = string; export interface QualityReport { score: number; dimensions: Record; [key: string]: any; } export declare const QUALITY_WEIGHTS: Record; export function calculateQualityScore(metrics: QualityMetrics): QualityReport; export interface ConvergenceConfig { windowSize?: number; threshold?: number; [key: string]: any; } export interface ConvergenceStatus { converged: boolean; delta: number; trend: string; } export interface ConvergenceSnapshot { values: number[]; status: ConvergenceStatus; } export class ConvergenceDetector { constructor(config?: ConvergenceConfig); addSample(value: number): ConvergenceStatus; getSnapshot(): ConvergenceSnapshot; reset(): void; } export interface SelfImproveIO { [key: string]: any; } export interface SelfImproveConfig { [key: string]: any; } export interface SelfImproveResult { iterations: IterationRecord[]; finalQuality: number; [key: string]: any; } export interface IterationRecord { [key: string]: any; } export interface AbsorbResult { [key: string]: any; } export interface UntestedTarget { [key: string]: any; } export interface GeneratedTest { [key: string]: any; } export interface VitestResult { passed: boolean; [key: string]: any; } export interface VitestSuiteResult { [key: string]: any; } export interface LintResult { [key: string]: any; } export class SelfImproveCommand { constructor(io: SelfImproveIO, config?: SelfImproveConfig); run(): Promise; } export interface HarvestEntry { [key: string]: any; } export interface HarvesterConfig { [key: string]: any; } export interface FileWriter { write(path: string, content: string): Promise; } export interface AcceptedExample { [key: string]: any; } export class SelfImproveHarvester { constructor(config?: HarvesterConfig); harvest(): Promise; } export function computeRougeL(reference: string, candidate: string): number; export interface ASTSegment { [key: string]: any; } export type SegmentKind = string; export interface DPOPair { chosen: string; rejected: string; [key: string]: any; } export interface DPOPairMetadata { [key: string]: any; } export type DegradationStrategy = string; export interface FocusedDPOConfig { [key: string]: any; } export interface SplitterStats { [key: string]: any; } export class FocusedDPOSplitter { constructor(config?: FocusedDPOConfig); split(source: string): DPOPair[]; getStats(): SplitterStats; } export interface GRPORewardFunction { (response: string, context: any): number; } export interface RewardFunctionOptions { [key: string]: any; } export interface RewardEvaluation { score: number; [key: string]: any; } export interface RewardToolRunner { [key: string]: any; } export declare const GRPO_REWARD_WEIGHTS: Record; export function createGRPORewardFunctions(options?: RewardFunctionOptions): Record; export interface GRPOOrchestratorConfig { [key: string]: any; } export interface RewardStatistics { [key: string]: any; } export interface RewardFunctionResult { [key: string]: any; } export interface OrchestratorResult { score: number; [key: string]: any; } export interface OrchestratorStats { [key: string]: any; } export class GRPORewardOrchestrator { constructor(config?: GRPOOrchestratorConfig); evaluate(response: string, context: any): Promise; getStats(): OrchestratorStats; } export interface GRPOTrainingConfig { [key: string]: any; } export interface GRPOHyperparameters { [key: string]: any; } export interface VLLMConfig { [key: string]: any; } export interface OPLoRAConfig { [key: string]: any; } export interface TrainingSchedule { [key: string]: any; } export interface HardwareConfig { [key: string]: any; } export declare const RECOMMENDED_GRPO_CONFIG: GRPOTrainingConfig; export function buildGRPOConfig(overrides?: Partial): GRPOTrainingConfig; export function exportGRPOConfigAsPython(config: GRPOTrainingConfig): string; export interface GRPOPrompt { [key: string]: any; } export interface TRLPromptRecord { [key: string]: any; } export interface PromptExtractorConfig { [key: string]: any; } export interface ExtractionStats { [key: string]: any; } export interface PromptExtractorFS { [key: string]: any; } export type PromptDifficulty = 'easy' | 'medium' | 'hard' | 'expert'; export type PromptSource = string; export type DomainTag = string; export class GRPOPromptExtractor { constructor(fs: PromptExtractorFS, config?: PromptExtractorConfig); extract(): Promise; getStats(): ExtractionStats; } export function createNodeFS(): PromptExtractorFS; export function inferDomainTags(source: string): DomainTag[]; export function estimateDifficulty(source: string): PromptDifficulty; export function extractPackageName(path: string): string; export interface ExtendedOPLoRAConfig { [key: string]: any; } export interface ValidatedOPLoRAConfig { [key: string]: any; } export interface OPLoRAValidationError { field: string; message: string; } export declare const DEFAULT_OPLORA_CONFIG: ExtendedOPLoRAConfig; export function validateOPLoRAConfig(config: any): OPLoRAValidationError[]; export function buildOPLoRAConfig(overrides?: Partial): ExtendedOPLoRAConfig; export function exportOPLoRAConfigAsPython(config: ExtendedOPLoRAConfig): string; export type BenchmarkName = string; export interface BenchmarkScore { [key: string]: any; } export interface ModuleWeightRatio { [key: string]: any; } export interface ConstraintSatisfaction { [key: string]: any; } export type AlertSeverity = 'info' | 'warning' | 'critical'; export interface MonitorAlert { severity: AlertSeverity; message: string; [key: string]: any; } export interface OPLoRAMonitorConfig { [key: string]: any; } export interface MonitorStats { [key: string]: any; } export interface MonitorSnapshot { [key: string]: any; } export class OPLoRAMonitor { constructor(config?: OPLoRAMonitorConfig); addScore(benchmark: BenchmarkName, score: number): void; getAlerts(): MonitorAlert[]; getStats(): MonitorStats; getSnapshot(): MonitorSnapshot; } export interface ForgettingDetectorConfig { [key: string]: any; } export type ForgettingSeverity = 'none' | 'mild' | 'moderate' | 'severe'; export interface ForgettingResult { severity: ForgettingSeverity; [key: string]: any; } export interface AggregateDetectionResult { [key: string]: any; } export class ForgettingDetector { constructor(config?: ForgettingDetectorConfig); addSample(benchmark: string, score: number): ForgettingResult; getAggregate(): AggregateDetectionResult; } // ============================================================================ // Pillar 2: Native Neural Streaming & Splat Transport // ============================================================================ export interface INeuralPacket { packetId: string; personaId: string; intent: string; spatialData: { origin: IVector3; focusPoint: IVector3 }; metrics: { confidence: number; latencyMs: number }; timestamp: number; } export interface INeuralSplatPacket { frameId: number; cameraState: { viewProjectionMatrix: number[]; cameraPosition: number[] }; splatCount: number; compressedSplatsBuffer: ArrayBuffer; sortedIndicesBuffer: ArrayBuffer; } export interface ExtractorOptions { maxSplats: number; } export class GaussianSplatExtractor { constructor(context: any, options: ExtractorOptions); extractFrame(sorter: any, camera: any, compressedSource: any, indicesSource: any): Promise; } export interface StreamingTransportConfig { useWebRTC: boolean; endpointUrl?: string; rtcConfiguration?: any; chunkSize?: number; } export interface NeuralSignalPayload { type: 'offer' | 'answer' | 'ice-candidate'; sdp?: any; candidate?: any; } export interface ISignalingBridge { targetPeerId: string; onReceiveSignal: (handler: (payload: NeuralSignalPayload) => void) => void; sendSignal: (payload: NeuralSignalPayload) => Promise; } export class WebSocketSignaler implements ISignalingBridge { targetPeerId: string; constructor(endpointUrl: string, localPeerId: string, targetPeerId: string); connect(): Promise; onReceiveSignal(handler: (payload: NeuralSignalPayload) => void): void; sendSignal(payload: NeuralSignalPayload): Promise; disconnect(): void; } export class NeuralStreamingTransport { constructor(config: StreamingTransportConfig); connect(signalingBridge?: ISignalingBridge): Promise; broadcastNeuralPacket(packet: INeuralPacket): void; broadcastSplatPacket(packet: INeuralSplatPacket): void; disconnect(): void; } export interface NeuralStreamingConfig extends StreamingTransportConfig { maxSplats: number; } export class NeuralStreamingService { constructor(config: NeuralStreamingConfig); initialize(signalingBridge?: ISignalingBridge): Promise; attachSplatExtractor(context: any): void; streamCognitiveTelemetry(packet: INeuralPacket): void; streamVisualTopology(sorter: any, camera: any, compressedSource: any, indicesSource: any): Promise; startStreaming(): void; stopStreaming(): void; shutdown(): void; } // ============================================================================ // Modality Transliteration // ============================================================================ export interface ModalitySelection { platform: any; category: any; embodiment: any; exportTarget: string; fallbackTarget: string | null; capabilities: any; canRenderSpatial: boolean; recommendStreaming: boolean; budget: { frameBudgetMs: number; agentBudgetMs: number; computeModel: 'edge-first' | 'cloud-first' | 'safety-critical'; }; reasoning: string[]; } export interface ModalitySelectorOptions { preferStreaming?: boolean; forceEmbodiment?: any; forceExportTarget?: any; spatialGpuThreshold?: boolean; } export function selectModality(platform: any, options?: ModalitySelectorOptions): ModalitySelection; export function selectModalityForAll(options?: ModalitySelectorOptions): Map; export function bestCategoryForTraits(requiredCapabilities: any): any[]; export function inferCapabilitiesFromGraph(graph: any): any; export function inferModalityFromGraph(graph: any, platform?: any, options?: ModalitySelectorOptions): ModalitySelection | null; // ============================================================================ // SNN Sparsity Monitoring (Self-Improvement) // ============================================================================ export interface SparsitySnapshot { [key: string]: any; } export interface SNNLayerMetrics { [key: string]: any; } export interface LayerActivityInput { [key: string]: any; } export interface SparsityQualityHistoryEntry { [key: string]: any; } export class SparsityMonitor { constructor(config?: any); recordLayerActivity(layerId: string, input: LayerActivityInput): SNNLayerMetrics; recordBatchActivity(layerInputs: any): SNNLayerMetrics[]; takeSnapshot(): SparsitySnapshot | null; getActiveViolations(): any[]; getViolationHistory(): any[]; getStats(): any; toQualityHistoryEntry(cycle: number): SparsityQualityHistoryEntry; getHarvesterMetrics(): Record; getSnapshots(): SparsitySnapshot[]; getLatestSnapshot(): SparsitySnapshot | null; getCurrentLayerMetrics(): Map; getLayerHistory(layerId: string): SNNLayerMetrics[]; getConfig(): any; reset(): void; [key: string]: any; } export function createSparsityMonitor(config?: any): SparsityMonitor;