Skip to main content
POST
Preview composed protection (dry run)

Authorizations

Authorization
string
header
required

Supabase JWT token in Authorization: Bearer header

Path Parameters

scope_id
enum<string>
required

Always default — the platform scope is a singleton; any other value returns 400 with care-framed guidance pointing at default.

Available options:
default

Body

Unified protection card (ADR-037). Safe House thresholds + trusted-source policy for a single agent. Shape matches src/composition/types.ts::UnifiedProtectionCard (canonical) and what the runtime validator at src/composition/validate.ts accepts. The customer-facing docs at /concepts/protection-card and /specifications/protection-card-schema document this same shape.

card_version
string
required
agent_id
string
required
mode
enum<string>
required

Strictest-wins composition: enforce > nudge > observe > off.

Available options:
off,
observe,
nudge,
enforce
thresholds
object
required

Score bands. Must satisfy warn <= quarantine <= block; each value in [0, 1].

screen_surfaces
object
required

Which request surfaces Safe House inspects. Composed across scopes by OR-per-field (any scope requiring inspection wins).

trusted_sources
object
required

Sources for which detectors short-circuit (each match logged in the trace). Composed as platform->agent intersection (compliance ceiling) with org+agent union inside that ceiling — an agent cannot widen trust beyond what the platform allows.

card_id
string
issued_at
string<date-time>
expires_at
string<date-time> | null
protected_surface
object

Org-declared protected surface policy (MNE-830). Strengthen-only UNION across platform → org → team → agent: each scope may add entries; none may remove. The composer always emits this block; callers omit it to inherit the composed floor. See ADR-037 §protected_surface.

review
object

Review-hold policy (Safe House Review, Slice 2a — MNE-920 design). gate_on is the minimum verdict band per surface that escalates to a review-hold. Composition is strictest-wins; on_timeout defaults to 'reject' (fail-closed). reviewer.kind 'endpoint' is designed for MNE-1650 and not consumed yet.

extensions
object

Free-form extension slot for non-canonical fields. Ignored by the composer; preserved on read for tooling that needs an audit-tail metadata bag.

_composition
object

System-managed block describing which scope sources merged into the canonical card. Only returned when ?include_composition=true.

content_hash
string

Response-only: content hash of the composed card (sha256:<hex>), injected by the GET/PUT response. Server-assigned — do not send on a PUT.

version
integer

Response-only: monotonic card version, injected by the GET/PUT response. Server-assigned — do not send on a PUT.

Response

Preview-compose result: composed card + conflicts + coherence violations.

ok
boolean

Always true on a 200 (the dry-run completed).

composed
object

Unified protection card (ADR-037). Safe House thresholds + trusted-source policy for a single agent. Shape matches src/composition/types.ts::UnifiedProtectionCard (canonical) and what the runtime validator at src/composition/validate.ts accepts. The customer-facing docs at /concepts/protection-card and /specifications/protection-card-schema document this same shape.

conflicts
object[]
coherence_violations
object[]