chore(8.0)!: drop browser support, cloud SDKs, legacy pipeline, dead threading
Brainy 8.0 is server-only. This commit takes the consequences seriously and
removes everything that was only there to keep browser/cloud/threading
surfaces alive.
Browser support drop (per the @deprecated notes in environment.ts):
- isBrowser, isWebWorker, areWebWorkersAvailable, navigator.deviceMemory
paths, window/document/self.onmessage code.
- browser console.log in unified.ts, the 'browser' branch in
autoConfiguration.ts (env enum + scaleUp cases), 'browser-cache' model
path, MCP service environment value.
- package.json browser field.
- src/worker.ts (Web Worker entrypoint) deleted.
Cloud SDK removal (the four adapters were dropped in Phase 7; the SDKs
were the lingering tax):
- @aws-sdk/client-s3, @azure/identity, @azure/storage-blob, and
@google-cloud/storage removed from package.json. Lockfile drops the
entire @aws/@azure/@google-cloud/@smithy transitive tree.
- EnhancedS3Clear class deleted from enhancedClearOperations.ts (the
only @aws-sdk/client-s3 consumer; the dynamic import sites went with
it). EnhancedFileSystemClear stays.
- src/utils/adaptiveSocketManager.ts deleted entirely (474 LOC of HTTPS
socket-pool management for the dropped cloud HTTP handler).
performanceMonitor.ts no longer reports a socketConfig; socket
utilization is fixed at 0.
Dead threading subsystem:
- executeInThread was imported by distance.ts and hnswIndex.ts but
never called. It was scaffolding for a future "off-main-thread
distance batch" optimization that never shipped.
- src/utils/workerUtils.ts deleted (Web Worker code path + an
unreachable Node Worker Threads code path).
- environment.ts loses isThreadingAvailable, isThreadingAvailableAsync,
areWorkerThreadsAvailable, areWorkerThreadsAvailableSync. All exports
purged from index.ts and unified.ts.
- autoConfiguration.ts drops AutoConfigResult.threadingAvailable.
Legacy plugin/augmentation pipeline:
- src/pipeline.ts deleted. The whole file was a no-op stub for
backwards compat — Pipeline class had no methods, no lifecycle hooks,
no before/after callbacks. AugmentationPipeline, augmentationPipeline,
createPipeline, createStreamingPipeline, StreamlinedPipelineOptions,
StreamlinedPipelineResult, StreamlinedExecutionMode were all aliases
for the same stub.
- src/mcp/mcpAugmentationToolset.ts deleted. executePipeline always
threw "deprecated", isValidAugmentationType always returned false,
getAvailableTools always returned []. Dead surface.
- BrainyMCPService no longer instantiates a toolset. TOOL_EXECUTION
requests now return the standard UNSUPPORTED_REQUEST_TYPE error.
'availableTools' system-info returns [] (was the same in practice).
Net: 22 files changed, ~6400 LOC deleted (including legacy code +
mechanical lockfile churn). Build clean, 1409/1409 tests pass.
This commit is contained in:
parent
adda1570f3
commit
266715aeee
22 changed files with 134 additions and 4648 deletions
63
src/index.ts
63
src/index.ts
|
|
@ -138,9 +138,6 @@ import {
|
|||
embeddingFunctions
|
||||
} from './utils/embedding.js'
|
||||
|
||||
// Export worker utilities
|
||||
import { executeInThread, cleanupWorkerPools } from './utils/workerUtils.js'
|
||||
|
||||
// Export logging utilities
|
||||
import {
|
||||
logger,
|
||||
|
|
@ -153,11 +150,6 @@ import {
|
|||
|
||||
|
||||
// Export performance and optimization utilities
|
||||
import {
|
||||
getGlobalSocketManager,
|
||||
AdaptiveSocketManager
|
||||
} from './utils/adaptiveSocketManager.js'
|
||||
|
||||
import {
|
||||
getGlobalBackpressure,
|
||||
AdaptiveBackpressure
|
||||
|
|
@ -169,16 +161,7 @@ import {
|
|||
} from './utils/performanceMonitor.js'
|
||||
|
||||
// Export environment utilities
|
||||
import {
|
||||
isBrowser,
|
||||
isNode,
|
||||
isWebWorker,
|
||||
areWebWorkersAvailable,
|
||||
areWorkerThreadsAvailable,
|
||||
areWorkerThreadsAvailableSync,
|
||||
isThreadingAvailable,
|
||||
isThreadingAvailableAsync
|
||||
} from './utils/environment.js'
|
||||
import { isNode } from './utils/environment.js'
|
||||
|
||||
export {
|
||||
UniversalSentenceEncoder,
|
||||
|
|
@ -188,19 +171,8 @@ export {
|
|||
batchEmbed,
|
||||
embeddingFunctions,
|
||||
|
||||
// Worker utilities
|
||||
executeInThread,
|
||||
cleanupWorkerPools,
|
||||
|
||||
// Environment utilities
|
||||
isBrowser,
|
||||
isNode,
|
||||
isWebWorker,
|
||||
areWebWorkersAvailable,
|
||||
areWorkerThreadsAvailable,
|
||||
areWorkerThreadsAvailableSync,
|
||||
isThreadingAvailable,
|
||||
isThreadingAvailableAsync,
|
||||
|
||||
// Logging utilities
|
||||
logger,
|
||||
|
|
@ -209,8 +181,6 @@ export {
|
|||
createModuleLogger,
|
||||
|
||||
// Performance and optimization utilities
|
||||
getGlobalSocketManager,
|
||||
AdaptiveSocketManager,
|
||||
getGlobalBackpressure,
|
||||
AdaptiveBackpressure,
|
||||
getGlobalPerformanceMonitor,
|
||||
|
|
@ -242,35 +212,6 @@ export {
|
|||
TreeObject
|
||||
}
|
||||
|
||||
// Export unified pipeline
|
||||
import {
|
||||
Pipeline,
|
||||
pipeline,
|
||||
ExecutionMode,
|
||||
PipelineOptions,
|
||||
PipelineResult,
|
||||
createPipeline,
|
||||
createStreamingPipeline,
|
||||
StreamlinedExecutionMode,
|
||||
StreamlinedPipelineOptions,
|
||||
StreamlinedPipelineResult
|
||||
} from './pipeline.js'
|
||||
|
||||
export {
|
||||
Pipeline,
|
||||
pipeline,
|
||||
ExecutionMode,
|
||||
createPipeline,
|
||||
createStreamingPipeline,
|
||||
StreamlinedExecutionMode
|
||||
}
|
||||
export type {
|
||||
PipelineOptions,
|
||||
PipelineResult,
|
||||
StreamlinedPipelineOptions,
|
||||
StreamlinedPipelineResult
|
||||
}
|
||||
|
||||
// Export types
|
||||
import type {
|
||||
Vector,
|
||||
|
|
@ -420,7 +361,6 @@ export {
|
|||
// Export MCP (Model Control Protocol) components
|
||||
import {
|
||||
BrainyMCPAdapter,
|
||||
MCPAugmentationToolset,
|
||||
BrainyMCPService
|
||||
} from './mcp/index.js' // Import from mcp/index.js
|
||||
import {
|
||||
|
|
@ -439,7 +379,6 @@ import {
|
|||
export {
|
||||
// MCP classes
|
||||
BrainyMCPAdapter,
|
||||
MCPAugmentationToolset,
|
||||
BrainyMCPService,
|
||||
|
||||
// MCP types
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue