Skip to content

Interface: LessonsBuilder<TIn> ​

Defined in: builders/lessons-builder.ts:22

Fluent builder for empirical lesson memory subsystems (P.lessons(id)).

Configures backing store binding, typed recall query extraction, contrastive distillation, 4-state empirical scoring, automatic retirement, and promotion signals.

Extends ​

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownInput payload type of actors querying this lesson subsystem.

Methods ​

distillWith() ​

ts
distillWith(model, configure): LessonsBuilder<TIn>;

Defined in: builders/lessons-builder.ts:64

Configures contrastive lesson distillation with a model or model pool.

Invokes configure with a fresh LessonDistillationBuilder bound to model.

Parameters ​

ParameterTypeDescription
modelMaybeBuilder< | ModelASTNode | PoolNode<ModelASTNode>>Distiller model or pool.
configure($d) => LessonDistillationBuilderDistillation configurator callback.

Returns ​

LessonsBuilder<TIn>

New immutable lessons builder.


emitSignalWhen() ​

ts
emitSignalWhen<TPayload>(
   signal, 
   configure, 
   mapPayload
): LessonsBuilder<TIn>;

Defined in: builders/lessons-builder.ts:106

Registers a promotion signal trigger emitted when a lesson crosses high-leverage thresholds.

Appends the compiled LessonEmitSignalTrigger<TPayload> to emitSignalTriggers.

Type Parameters ​

Type ParameterDescription
TPayloadSignal payload type validated by signal.schema.

Parameters ​

ParameterTypeDescription
signalMaybeBuilder<SignalNode<TPayload>>Target signal node or builder.
configure($t) => LessonSignalTriggerBuilderTrigger threshold configurator.
mapPayload(lesson) => TPayloadLesson-to-signal payload projector.

Returns ​

LessonsBuilder<TIn>

New immutable lessons builder.


queryFrom() ​

ts
queryFrom<TNextIn>(schema, mapper): LessonsBuilder<TNextIn>;

Defined in: builders/lessons-builder.ts:49

Configures typed search query extraction from the actor's validated input TNextIn.

Narrows the builder's TIn type parameter to TNextIn so actors mounting this subsystem are type-checked.

Type Parameters ​

Type ParameterDescription
TNextInActor input payload type validated by schema.

Parameters ​

ParameterTypeDescription
schemaZodType<TNextIn>Zod schema for the query input.
mapper(input) => stringSynchronous query string projector.

Returns ​

LessonsBuilder<TNextIn>

New immutable lessons builder narrowed to TNextIn.


retireAfter() ​

ts
retireAfter(configure): LessonsBuilder<TIn>;

Defined in: builders/lessons-builder.ts:89

Configures automatic retirement thresholds for violated or low-pass-rate lessons.

Invokes configure with a LessonRetirementBuilder and stores the compiled LessonRetirementConfig.

Parameters ​

ParameterTypeDescription
configure($r) => LessonRetirementBuilderRetirement configurator callback.

Returns ​

LessonsBuilder<TIn>

New immutable lessons builder.


scoring() ​

ts
scoring(configure): LessonsBuilder<TIn>;

Defined in: builders/lessons-builder.ts:78

Configures the 4-state empirical scoring and recall formula.

Invokes configure with a LessonScoringBuilder seeded from current or default scoring parameters.

Parameters ​

ParameterTypeDescription
configure($s) => LessonScoringBuilderScoring configurator callback.

Returns ​

LessonsBuilder<TIn>

New immutable lessons builder.


store() ​

ts
store(lessonStore): LessonsBuilder<TIn>;

Defined in: builders/lessons-builder.ts:35

Binds the backing LessonStoreASTNode (sqlite.lessonStore or postgres.lessonStore).

Required before .toAST() can compile a valid LessonsNode.

Parameters ​

ParameterTypeDescription
lessonStoreMaybeBuilder<LessonStoreASTNode>Backing lesson store AST node or builder.

Returns ​

LessonsBuilder<TIn>

New immutable lessons builder.


toAST() ​

ts
toAST(): LessonsNode;

Defined in: ast/ast-builder.ts:20

Compiles the current builder configuration into a deeply frozen passive AST node.

Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.

Returns ​

LessonsNode

Deeply frozen passive AST node.

Inherited from ​

AstBuilder.toAST

Properties ​

PropertyModifierTypeDescriptionDefined in
idreadonlystringUnique identifier of the lessons subsystem.builders/lessons-builder.ts:24

Released under the MIT License.