Namespace Kuestenlogik.Bowire.Semantics.Detectors

Classes

AudioBytesDetector

Detects string-typed leaves whose base64 prefix decodes to bytes matching a known audio magic-number: WAV (RIFF + WAVE), Ogg (OggS), FLAC (fLaC), MP3 (ID3 tag or MPEG sync byte). Only the first 12 bytes are decoded — same bounded-work principle as ImageBytesDetector.

FrameProber

Default IFrameProber implementation — composes every registered IBowireFieldDetector with the AutoDetectorLayer and tracks the set of probed triples in a ConcurrentDictionary<TKey, TValue>.

GeoJsonPointDetector

Detects GeoJSON Point geometries — an object with type == "Point" and a 2- or 3-element coordinates array of numbers. GeoJSON pins coordinate order as [longitude, latitude] (and optional altitude), so the emitted tags go on coordinates[0] as longitude and coordinates[1] as latitude.

ImageBytesDetector

Detects string-typed leaves whose base64 prefix decodes to bytes matching a known image magic-number: PNG, JPEG, GIF87a / 89a, WebP, AVIF. Only the first 12 bytes are decoded so the cost is bounded regardless of the payload size.

TimestampDetector

Detects fields that carry timestamps — either an ISO-8601 string parsed via TryParse(string, IFormatProvider, DateTimeStyles, out DateTimeOffset) with RoundtripKind, or a numeric epoch (seconds or milliseconds since 1970) within ±20 years of "now".

Wgs84CoordinateDetector

Detects paired latitude/longitude fields at the same parent object path. Requires both name patterns to match — the range-only fallback the ADR mentions for the future is deliberately not enabled in v1 so a coordinate-shaped pair of pixel offsets (e.g. {x: 5.2, y: 9.1} or {u: -45.0, v: 87.3}) cannot drag the map widget onto a non-geographic field pair.

Structs

DetectionContext

Addressing context handed to every IBowireFieldDetector invocation: identifies which (service, method, message-type) triple this frame belongs to and carries the decoded JSON payload rooted at the frame body.

DetectionResult

One proposed annotation produced by a detector — the addressing half (Key) plus the semantic claim (Semantic). Always lands in the Auto layer; the LayeredAnnotationStore resolver does the priority arithmetic at lookup time.

Interfaces

IBowireFieldDetector

Server-side rule that proposes one or more Annotations on a sample frame.

IFrameProber

The "learn-as-new-types-arrive" hook that connects the SSE / invoke stream to the auto-detector layer. Wire the prober into the frame pipeline; it decides whether the current DetectionContext triple is novel and, if so, runs every registered IBowireFieldDetector once against the frame and writes the proposals to the Auto layer.