fix: make abstract class constructors protected

Marks FlowProcessor and EmbeddingsService constructors as protected
since these classes should only be instantiated via subclasses.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
elpresidank 2026-04-06 21:52:00 -05:00
parent 25d4227cb5
commit 8f9de7604e
3 changed files with 5 additions and 2 deletions

View file

@ -23,7 +23,7 @@ export abstract class FlowProcessor extends AsyncProcessor {
private flows = new Map<string, Flow>(); private flows = new Map<string, Flow>();
private configConsumer: BackendConsumer<ConfigPush> | null = null; private configConsumer: BackendConsumer<ConfigPush> | null = null;
constructor(config: ProcessorConfig) { protected constructor(config: ProcessorConfig) {
super(config); super(config);
} }

View file

@ -13,7 +13,7 @@ import type { FlowContext } from "../messaging/consumer.js";
import type { EmbeddingsRequest, EmbeddingsResponse } from "../schema/messages.js"; import type { EmbeddingsRequest, EmbeddingsResponse } from "../schema/messages.js";
export abstract class EmbeddingsService extends FlowProcessor { export abstract class EmbeddingsService extends FlowProcessor {
constructor(config: ProcessorConfig) { protected constructor(config: ProcessorConfig) {
super(config); super(config);
this.registerSpecification( this.registerSpecification(

3
ts/pnpm-lock.yaml generated
View file

@ -8,6 +8,9 @@ importers:
.: .:
devDependencies: devDependencies:
nats:
specifier: ^2.29.0
version: 2.29.3
tsx: tsx:
specifier: ^4.21.0 specifier: ^4.21.0
version: 4.21.0 version: 4.21.0