fix: add backwards compatibility exports for augmentation system

- Added deprecated augmentation type exports for compatibility
- Added WebRTCConduitAugmentation stub (deprecated)
- Fixed createConduitAugmentation export
- Maintained backwards compatibility while using new unified system
This commit is contained in:
David Snelling 2025-08-25 10:20:50 -07:00
parent 994276f09f
commit a0dca5651f
4 changed files with 67 additions and 3 deletions

View file

@ -46,6 +46,31 @@ abstract class BaseConduitAugmentation extends BaseAugmentation {
): Promise<WebSocketConnection | null>
}
/**
* WebRTC Conduit Augmentation (placeholder for backwards compatibility)
* @deprecated Use WebSocketConduitAugmentation instead
*/
export class WebRTCConduitAugmentation extends BaseConduitAugmentation {
readonly name = 'webrtc-conduit'
async execute<T = any>(
operation: string,
params: any,
context?: AugmentationContext
): Promise<T | void> {
// Placeholder - WebRTC not yet implemented
this.log('WebRTC conduit not yet implemented, use WebSocket instead', 'warn')
}
async establishConnection(
targetSystemId: string,
config?: Record<string, unknown>
): Promise<WebSocketConnection | null> {
this.log('WebRTC conduit not yet implemented, use WebSocket instead', 'warn')
return null
}
}
/**
* WebSocket Conduit Augmentation
* Syncs data between Brainy instances using WebSockets

View file

@ -189,6 +189,27 @@ import {
AugmentationOptions
} from './augmentationFactory.js'
// Export factory functions for creating augmentations
import {
createSenseAugmentation,
createConduitAugmentation,
createCognitionAugmentation,
createMemoryAugmentation,
createPerceptionAugmentation,
createDialogAugmentation,
createActivationAugmentation
} from './augmentationFactory.js'
export {
createSenseAugmentation,
createConduitAugmentation,
createCognitionAugmentation,
createMemoryAugmentation,
createPerceptionAugmentation,
createDialogAugmentation,
createActivationAugmentation
}
export {
// Unified pipeline exports
Pipeline,
@ -268,8 +289,7 @@ import {
} from './augmentations/storageAugmentations.js'
import {
WebSocketConduitAugmentation,
WebRTCConduitAugmentation,
createConduitAugmentation
WebRTCConduitAugmentation
} from './augmentations/conduitAugmentations.js'
import {
ServerSearchConduitAugmentation,

View file

@ -2,7 +2,7 @@
* 🧠 BRAINY EMBEDDED PATTERNS
*
* AUTO-GENERATED - DO NOT EDIT
* Generated: 2025-08-25T16:40:29.940Z
* Generated: 2025-08-25T17:15:55.893Z
* Patterns: 220
* Coverage: 94-98% of all queries
*

View file

@ -80,6 +80,25 @@ export namespace BrainyAugmentations {
export interface ISynapseAugmentation extends BrainyAugmentation {}
}
// Export deprecated interfaces directly for compatibility
export type ISenseAugmentation = BrainyAugmentations.ISenseAugmentation
export type IConduitAugmentation = BrainyAugmentations.IConduitAugmentation
export type ICognitionAugmentation = BrainyAugmentations.ICognitionAugmentation
export type IMemoryAugmentation = BrainyAugmentations.IMemoryAugmentation
export type IPerceptionAugmentation = BrainyAugmentations.IPerceptionAugmentation
export type IDialogAugmentation = BrainyAugmentations.IDialogAugmentation
export type IActivationAugmentation = BrainyAugmentations.IActivationAugmentation
export type ISynapseAugmentation = BrainyAugmentations.ISynapseAugmentation
// WebSocket types for compatibility
export type IWebSocketCognitionAugmentation = ICognitionAugmentation & IWebSocketSupport
export type IWebSocketSenseAugmentation = ISenseAugmentation & IWebSocketSupport
export type IWebSocketPerceptionAugmentation = IPerceptionAugmentation & IWebSocketSupport
export type IWebSocketActivationAugmentation = IActivationAugmentation & IWebSocketSupport
export type IWebSocketDialogAugmentation = IDialogAugmentation & IWebSocketSupport
export type IWebSocketConduitAugmentation = IConduitAugmentation & IWebSocketSupport
export type IWebSocketMemoryAugmentation = IMemoryAugmentation & IWebSocketSupport
/**
* @deprecated Use BrainyAugmentation instead
*/