Class SafeInterruptTelemetry

java.lang.Object
com.valhalla.sdk.SafeInterruptTelemetry

public final class SafeInterruptTelemetry extends Object
Runtime-owned serializer for the safe-interrupt telemetry contract.
  • Field Details

    • MODE_DEFER_UNTIL_SAFE

      public static final String MODE_DEFER_UNTIL_SAFE
      Stable policy mode consumed by Command Center.
      See Also:
  • Method Details

    • snapshot

      public static SafeInterruptTelemetry.Snapshot snapshot(InterruptGate gate, boolean requested)
      Samples one interrupt gate exactly once and returns its normalized state. A faulty gate is treated as unsafe so it can never authorize a mid-work platform pause.
      Parameters:
      gate - script-owned gate, or null when unavailable
      requested - whether Command Center has requested a safe boundary
      Returns:
      a fail-closed policy snapshot
    • breakPolicyJson

      public static String breakPolicyJson(InterruptGate gate, boolean requested)
      Serializes the standard breakPolicy object. Script authors do not call this method; the injected runtime attaches it to each telemetry frame for scripts that override AbstractScript.interruptGate().