TtsrScope class final

The streams a rule monitors (omp's parsed TtsrScope).

Parsed from scope tokens: text, thinking, tool/toolcall (any tool), tool:<name> or a bare <name> (that tool only). omp's tool(name)(pathGlob) path scoping is not ported. The default scope (omp's DEFAULT_SCOPE) watches text and all tools but not thinking.

Constructors

TtsrScope({bool allowText = true, bool allowThinking = false, bool allowAnyTool = true, Set<String> toolNames = const {}})
Creates a scope with explicit flags.
const

Properties

allowAnyTool bool
Whether every tool's argument stream is matched.
final
allowText bool
Whether assistant prose is matched.
final
allowThinking bool
Whether thinking deltas are matched.
final
hashCode int
The hash code for this object.
no setterinherited
isReachable bool
Whether any stream can match (omp's hasReachableScope).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toolNames Set<String>
Named tools whose argument streams are matched (lower-case), used when allowAnyTool is false.
final

Methods

matches(TtsrMatchContext context) bool
Whether this scope admits context (omp's matchesScope).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

parse(List<String>? tokens, {required String ruleName, required List<String> warnings}) TtsrScope
Parses scope tokens (omp's buildScope, without path globs).

Constants

defaultScope → const TtsrScope
omp's default scope when a rule declares none.