Remove the entire augmentation pipeline infrastructure (52 files, ~15,000 lines) and the semantic type matching system. These were unused middleware layers adding complexity without value. What was removed: - src/augmentations/ directory (all augmentation implementations) - src/augmentationManager.ts (pipeline orchestrator) - src/types/augmentations.ts, src/types/pipelineTypes.ts - src/shared/default-augmentations.ts - Semantic type suggestion (BrainyTypes.suggestNoun/suggestVerb) - src/utils/typeMatching/ (embedding-based type matcher) What was preserved by relocating: - Import handlers (CSV, PDF, Excel) -> src/importers/handlers/ - NeuralImportAugmentation -> src/cortex/neuralImportAugmentation.ts - Type matching utilities -> heuristic inference in consumers What was simplified: - brainy.ts: operations call storage directly (no execute() wrapper) - IntegrationBase: standalone class (no BaseAugmentation parent) - BrainyTypes: validation-only (nouns, verbs, isValid*, get*) - Pipeline: direct execution (no augmentation interception) - index.ts: removed TypeSuggestion, suggestType exports - package.json: removed stale types/augmentations export Build passes, 1176 tests pass, 0 failures.
65 lines
1.5 KiB
TypeScript
65 lines
1.5 KiB
TypeScript
/**
|
|
* Pipeline - Execution pipeline
|
|
*
|
|
* Provides Pipeline class, execution modes, and factory functions.
|
|
*/
|
|
|
|
/**
|
|
* Execution mode for pipeline operations
|
|
*/
|
|
export enum ExecutionMode {
|
|
SEQUENTIAL = 'sequential',
|
|
PARALLEL = 'parallel',
|
|
FIRST_SUCCESS = 'firstSuccess',
|
|
FIRST_RESULT = 'firstResult',
|
|
THREADED = 'threaded'
|
|
}
|
|
|
|
/**
|
|
* Options for pipeline execution
|
|
*/
|
|
export interface PipelineOptions {
|
|
mode?: ExecutionMode
|
|
timeout?: number
|
|
retries?: number
|
|
throwOnError?: boolean
|
|
}
|
|
|
|
/**
|
|
* Minimal Pipeline class for backward compatibility.
|
|
*/
|
|
export class Pipeline {
|
|
private static instance?: Pipeline
|
|
|
|
constructor() {
|
|
if (Pipeline.instance) {
|
|
return Pipeline.instance
|
|
}
|
|
Pipeline.instance = this
|
|
}
|
|
}
|
|
|
|
// Default singleton instance
|
|
export const pipeline = new Pipeline()
|
|
|
|
// Backward compatibility aliases
|
|
export const AugmentationPipeline = Pipeline
|
|
export const augmentationPipeline = pipeline
|
|
|
|
// Factory functions
|
|
export const createPipeline = async () => new Pipeline()
|
|
export const createStreamingPipeline = async () => new Pipeline()
|
|
|
|
// Type aliases
|
|
export type StreamlinedPipelineOptions = PipelineOptions
|
|
export type PipelineResult<T> = { success: boolean; data: T; error?: string }
|
|
export type StreamlinedPipelineResult<T> = PipelineResult<T>
|
|
|
|
// Execution mode alias
|
|
export enum StreamlinedExecutionMode {
|
|
SEQUENTIAL = 'sequential',
|
|
PARALLEL = 'parallel',
|
|
FIRST_SUCCESS = 'firstSuccess',
|
|
FIRST_RESULT = 'firstResult',
|
|
THREADED = 'threaded'
|
|
}
|