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
AstBuilder<LessonsNode<TIn>>
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TIn | unknown | Input payload type of actors querying this lesson subsystem. |
Methods
distillWith()
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
| Parameter | Type | Description |
|---|---|---|
model | MaybeBuilder< | ModelASTNode | PoolNode<ModelASTNode>> | Distiller model or pool. |
configure | ($d) => LessonDistillationBuilder | Distillation configurator callback. |
Returns
LessonsBuilder<TIn>
New immutable lessons builder.
emitSignalWhen()
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 Parameter | Description |
|---|---|
TPayload | Signal payload type validated by signal.schema. |
Parameters
| Parameter | Type | Description |
|---|---|---|
signal | MaybeBuilder<SignalNode<TPayload>> | Target signal node or builder. |
configure | ($t) => LessonSignalTriggerBuilder | Trigger threshold configurator. |
mapPayload | (lesson) => TPayload | Lesson-to-signal payload projector. |
Returns
LessonsBuilder<TIn>
New immutable lessons builder.
queryFrom()
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 Parameter | Description |
|---|---|
TNextIn | Actor input payload type validated by schema. |
Parameters
| Parameter | Type | Description |
|---|---|---|
schema | ZodType<TNextIn> | Zod schema for the query input. |
mapper | (input) => string | Synchronous query string projector. |
Returns
LessonsBuilder<TNextIn>
New immutable lessons builder narrowed to TNextIn.
retireAfter()
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
| Parameter | Type | Description |
|---|---|---|
configure | ($r) => LessonRetirementBuilder | Retirement configurator callback. |
Returns
LessonsBuilder<TIn>
New immutable lessons builder.
scoring()
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
| Parameter | Type | Description |
|---|---|---|
configure | ($s) => LessonScoringBuilder | Scoring configurator callback. |
Returns
LessonsBuilder<TIn>
New immutable lessons builder.
store()
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
| Parameter | Type | Description |
|---|---|---|
lessonStore | MaybeBuilder<LessonStoreASTNode> | Backing lesson store AST node or builder. |
Returns
LessonsBuilder<TIn>
New immutable lessons builder.
toAST()
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
Deeply frozen passive AST node.
Inherited from
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
id | readonly | string | Unique identifier of the lessons subsystem. | builders/lessons-builder.ts:24 |