Class TypedNetworkObserver

The 6-step extractor. Stateless aside from its constructor options; safe to share across concurrent extractions.

Constructors

Methods

Constructors

Methods

  • Extract typed facts from a conversation block.

    Resulting facts have stable IDs of the form <sessionId>-fact-<index>, where <index> is the sequential POST-DROP position so dropped facts produce contiguous IDs in the returned array.

    Never throws on extractable input. Catastrophic outer parse failures (invalid JSON, primitive value, missing facts key) get one retry; persistent failure returns []. Bad individual facts are dropped silently via per-fact safeParse.

    Parameters

    • sessionText: string

      Full conversation text. Will be wrapped in the user prompt's delimiters automatically.

    • sessionId: string

      Stable identifier used to namespace the resulting fact IDs.

    Returns Promise<TypedFact[]>

    Array of TypedFacts, possibly empty.