feat: Integration Hub for external tool connectivity

- Add native config option: `new Brainy({ integrations: true })`
- OData integration for Excel Power Query and Power BI
- Google Sheets integration with Apps Script
- Server-Sent Events (SSE) for real-time streaming
- Webhooks for push notifications
- Zero-config with sensible defaults
- Full tree-shaking when disabled
This commit is contained in:
David Snelling 2026-01-20 16:21:11 -08:00
parent 24039e8a1a
commit b5bc9000cf
28 changed files with 8186 additions and 1 deletions

View file

@ -0,0 +1,64 @@
/**
* Integration Hub - Core Infrastructure
*
* Shared foundation for all integrations:
* - EventBus: Real-time change notifications
* - TabularExporter: Entity to rows/columns conversion
* - IntegrationBase: Base class for integrations
* - IntegrationHub: Zero-config integration manager
*/
// Event system
export { EventBus } from './EventBus.js'
// Tabular export
export { TabularExporter } from './TabularExporter.js'
// Base class
export {
IntegrationBase,
type HTTPIntegration,
type StreamingIntegration
} from './IntegrationBase.js'
// Integration loader
export {
IntegrationLoader,
createIntegrationLoader,
detectEnvironment,
INTEGRATION_CATALOG,
type IntegrationType,
type RuntimeEnvironment,
type IntegrationInfo,
type IntegrationLoaderConfig
} from './IntegrationLoader.js'
// Zero-config hub
export {
IntegrationHub,
createIntegrationHub,
type IntegrationHubConfig,
type IntegrationRequest,
type IntegrationResponse
} from './IntegrationHub.js'
// Types
export type {
// Events
BrainyEvent,
EventFilter,
EventHandler,
EventSubscription,
// Tabular
TabularRow,
RelationTabularRow,
TabularExporterConfig,
// Config
IntegrationConfig,
IntegrationHealthStatus,
// OData
ODataQueryOptions,
// Webhooks
WebhookRegistration,
WebhookDeliveryResult
} from './types.js'