Mission SDKMission events and telemetry

Mission events and telemetry

Use typed Mission notifications and Track streams with independently checked authority.

Use TrackDetected to notify consumers of an observation of a locally saved Track. Use TrackTelemetryV1 for continuing samples. A detection's optional stream reference lets each authorized consumer open its own telemetry subscription.

Mission defines payload meaning and domain access. Platform events defines envelope identity, publication outcomes, and subscription lifetime. Platform streams defines discovery, buffering, freshness, and cancellation.

Detection payload

FieldMission meaning
entity_refStable reference to the locally saved Track
stream_refOptional reference to advertised Track telemetry
observationBounded initial context usable before durable state arrives

The Platform envelope carries event identity, verified producer identity, schema identity, and observation metadata. Mission binds the event to the selected organization's scope and applicable Group authority. Never accept a payload's self-asserted producer as authentication.

Telemetry association

mission.tracks.telemetry.advertise(entity, schema, options) associates a producer's typed stream with a saved Track. Its returned publisher owns the advertisement and publication lifetime. stream.reference can appear in a detection.

mission.tracks.telemetry.subscribe(stream_ref, options) opens a new authorized subscription for the requesting consumer. Two consumers do not share a handle or cancellation state. Neither the reference nor its schema grants access.

TrackTelemetryV1 uses these fields:

FieldType and unitsConsumer check
session_idStringMatches the advertised producer session
sequenceIncreasing integerRejects duplicates and older samples within this session
observed_atTimestampSatisfies the configured freshness policy
entity_refMission entity referenceMatches the associated Track
positionPositionFinite latitude and longitude in decimal degrees, optional altitude in meters
speed_mpsOptional number, meters per secondNonnegative when present
heading_degreesOptional number, degreesIn the range [0, 360) when present

Keep samples small and versioned, without unbounded history or credentials. Use the Mission reference for full fields and results.

Distinguish domain operations

A live detection is not a permanent activity history entry. An event delivered through the local Rust-to-Flutter application event bridge is also not proof that remote peers observed a distributed notification.

A saved position, a detection observation, and a live position sample can differ temporarily. Present each with its origin and age. Do not rewrite one as another to conceal synchronization delay.

Authority and lifecycle

The publisher needs permission to save the Track, publish its detection, and publish telemetry. The consumer needs permission to observe the detection, read the entity, and subscribe to telemetry. Evaluate each decision independently.

A missing stream reference means that this event does not announce a stream. It does not revoke a subscription opened from an earlier detection. Explicit termination, descriptor replacement, revocation, or consumer cancellation governs that subscription.

Entity synchronization, event publication, and live streaming have separate results. A stream failure leaves locally committed entity state intact. Gateway Fabric supplies an allowed route when configured, not a prerequisite for direct peer delivery.

The Mission reference defines operation signatures and result types.