XTend Documentation
Enable dark mode

XTend Developer Center

Build with XTend today

RMT Reference: Security and Policies

Executable language rules live in tools/rmt-language/vnext-security.js.

Security and hydration policies live in lifecycle operation policy blocks.

Syntax

OperatorFormAllowed contextsParametersFunctionDiagnosticsRelated operators
trust boundarytrust boundary "xtend.security.sanitizing-boundary.v1"Lifecycle policy, remote surfacestatic stringBinds rendering or remote surface to a trust boundary.Boundary must be a string.sanitize
hydration policyhydration policy visible-onlyLifecycle policypolicy identifierDocuments the hydration strategy.Hydration must use policy, mode or insular.hydrate
hydration modehydration mode eagerLifecycle policymode identifierSets the hydration mode.Wrong clause kind is reported.hydration policy
hydration insularhydration insular trueLifecycle policyboolean or identifierMarks isolated hydration.Value must be boolean or identifier.isolation boundary
isolation boundaryisolation boundary "docs.preview"Lifecycle policystring or identifierSets an isolation boundary.Isolation must use boundary or mode.trust boundary
isolation modeisolation mode strictLifecycle policymode identifierSets isolation mode.Wrong clause kind is reported.sanitize
sanitizesanitize htmlLifecycle policyformat identifierRequires sanitizing for rendered content.Format must be an identifier.trust boundary

Allowed contexts

These operators appear in the policy block after mount, hydrate, update, stream or other lifecycle operations. trust boundary also appears in remote surface.

Parameters

Trust boundaries are stable string identifiers. Hydration, isolation and sanitize values are static identifiers or booleans.

Description

Policies describe security and hydration boundaries without executing host code in the RMT source.

Examples

template reference.security {
  portal app.root root "#app" layer surface

  surface preview kind page component x-section {
    portal app.root
    lane visible weight 80 {
      mount preview.body from endpoint docs.preview {
        trust boundary "xtend.security.sanitizing-boundary.v1"
        hydration policy visible-only
        hydration mode eager
        hydration insular true
        isolation boundary "docs.preview"
        isolation mode strict
        sanitize html
      }
    }
  }
}

Diagnostics

Policy blocks allow only slots, event bindings, hydration, isolation and security policies. Other tokens are context errors.

mount, hydrate, stream, remote surface, origin, integrity sha256.

The RMT reference index distinguishes language-level policy records from host security policy. Related article

(c) 2026 - CCS Networks | Powered by XRouter PHP Extension