Module turn_extractor

Module turn_extractor 

Source
Expand description

Memory as a first-class TurnExtractor.

This is the whole runtime integration. The Live runtime already has an out-of-band extraction pipeline that accumulates transcripts, segments them by turn boundary, fires extractors under a trigger policy, and promotes their fields into governed State. Memory is exactly that shape, so it rides that pipeline instead of running a second one beside it.

The promotion step is what makes memory useful to an application rather than merely present. A remembered fact projected into a State slot is read by everything the platform already has:

  • phase.needs(&["user:diet"]) — satisfied from memory, so a returning user is not asked again for something they already said last week;
  • phase.requires(&["user:diet"]) — a hard gate a memory can open;
  • Flow guards, done(captured(["user:diet"]));
  • P::show_state(&["user:diet"]) — the value in the phase instruction;
  • watchers and repair, which read the same keys.

Each turn the extractor does three things: ingest the finalized utterance, prepare the next turn’s retrieval snapshot, and project what memory knows into slots.

Structs§

MemorySlot
A mapping from a memory predicate to the governed State slot it fills.
MemoryTurnExtractor
Drives memory from the runtime’s turn-boundary extraction pipeline.

Enums§

MemorySlotError
Why a MemorySlot could not be built.

Constants§

MEMORY_EXTRACTOR_NAME
The State key the pipeline stores this extractor’s raw summary under.