From aa4a76352fba7610ce7e0af4fcc8fd100dce8ce5 Mon Sep 17 00:00:00 2001 From: David Snelling Date: Wed, 28 May 2025 11:48:24 -0700 Subject: [PATCH] feat: refactor augmentation interface exports for improved structure Replaced type aliases with interface extensions to enhance type compatibility and readability. Reorganized exports in `index.ts` to streamline imports. --- src/index.ts | 7 +++++-- src/types/augmentations.ts | 14 +++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index bb9a6284..285068e2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -109,7 +109,11 @@ import { AugmentationType, BrainyAugmentations } from './types/augmentations.js' export type { IAugmentation, AugmentationResponse, - IWebSocketSupport, + IWebSocketSupport +} +export { + AugmentationType, + BrainyAugmentations, ISenseAugmentation, IConduitAugmentation, ICognitionAugmentation, @@ -118,7 +122,6 @@ export type { IDialogAugmentation, IActivationAugmentation } -export { AugmentationType, BrainyAugmentations } // Export combined WebSocket augmentation interfaces export type { diff --git a/src/types/augmentations.ts b/src/types/augmentations.ts index bb1f1689..630b98a1 100644 --- a/src/types/augmentations.ts +++ b/src/types/augmentations.ts @@ -349,13 +349,13 @@ export namespace BrainyAugmentations { } /** Direct exports of augmentation interfaces for easier imports */ -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 interface ISenseAugmentation extends BrainyAugmentations.ISenseAugmentation {} +export interface IConduitAugmentation extends BrainyAugmentations.IConduitAugmentation {} +export interface ICognitionAugmentation extends BrainyAugmentations.ICognitionAugmentation {} +export interface IMemoryAugmentation extends BrainyAugmentations.IMemoryAugmentation {} +export interface IPerceptionAugmentation extends BrainyAugmentations.IPerceptionAugmentation {} +export interface IDialogAugmentation extends BrainyAugmentations.IDialogAugmentation {} +export interface IActivationAugmentation extends BrainyAugmentations.IActivationAugmentation {} /** WebSocket-enabled augmentation interfaces */ export type IWebSocketSenseAugmentation = BrainyAugmentations.ISenseAugmentation & IWebSocketSupport