Expand description
Time-Traveling Stream Rules engine. TTSR (Time-Traveling Stream Rules) engine.
Monitors streaming model output against project rules. When a rule is violated, the stream is aborted and the rule is injected as a system reminder so the model can correct itself.
Ported from omp packages/coding-agent/src/export/ttsr.ts (TtsrManager).
Only regex-based matching is implemented in the default build.
AST-based matching (astCondition) requires an additional parser dependency
and is deferred to a future feature gate.
Structs§
- Rule
- A single TTSR rule.
- Ttsr
Engine - TTSR engine that buffers streaming deltas and checks them against registered rules.
- Ttsr
Match Context - Context passed to
TtsrEngine::check_deltadescribing what is being generated right now. - Ttsr
Settings - Knobs for the TTSR engine.
Enums§
- Interrupt
Mode - Interrupt mode controlling which stream sources TTSR inspects.
- Match
Source - Which stream source produced a delta.
- Rule
Source - Where a rule originated.
- Scope
Token - Which source produced a TTSR match.
Traits§
- Rule
Registry - Registry of TTSR rules (supplied by the host).