Implementation:AIScientists Dev WorldSeed HighlightScanner scan
| Knowledge Sources | |
|---|---|
| Domains | Simulation |
| Last Updated | 2026-10-26 18:00 GMT |
Overview
Concrete highlight trigger scanner that mirrors ConsequenceScanner's trigger logic but emits admin-scoped highlight events instead of executing effects, for dashboard and narrator observation.
Description
The HighlightScanner.scan() method evaluates config-defined highlight triggers each tick. It uses the same trigger logic as `ConsequenceScanner` (on_change / every_tick, entity vs global) but produces highlight events (admin-scoped, dashboard-only) instead of executing effects.
Highlights surface important world events to the dashboard and narrator without affecting regular agent perception. They are recorded to the stream for replay.
Usage
Import this class to scan for highlights. In production, it's created by `TickEngine.__init__()` and called during `_post_actions()` each tick.
Code Reference
Source Location
- Repository: WorldSeed
- File: src/worldseed/engine/highlight_scanner.py
Signature
class HighlightScanner:
def __init__(
self,
config: SceneConfig,
store: StateStore,
event_log: EventLog,
recorder: RunRecorder | NullRecorder | None = None,
) -> None: ...
def scan(self, tick: int) -> None:
"""Evaluate config-defined highlight triggers each tick."""
Import
from worldseed.engine.highlight_scanner import HighlightScanner
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| tick | int | Yes | Current tick number |
Outputs
| Name | Type | Description |
|---|---|---|
| (mutation) | EventLog | Highlight events appended (admin scope) |
Usage Examples
from worldseed.engine.highlight_scanner import HighlightScanner
scanner = HighlightScanner(config, store, event_log, recorder=recorder)
# Scan each tick
scanner.scan(tick=5)