import type React from "react"; import type { VectorCortexPolicyView } from "../api/vector-cortex"; import { Card, CardContent, CardHeader, CardTitle } from "../components/ui/card"; import { Metric } from "./VectorCortexMetric"; import { VcStatusBadge } from "./VcStatusBadge"; export function VectorCortexPolicyCard({ view }: { view: VectorCortexPolicyView | null }): React.ReactElement { return (
Shadow Adaptive Policy (VC8B)
{!view?.enabled ? (
Shadow adaptive policy disabled (VC8B off) — no shadow decisions are reported, so the live path uses the predecessor thresholds (mode C). The policy, shadow, and M7 migration arithmetic still run; only this reporting seam is suppressed.
) : ( <>
Reader-only shadow adaptive policy — aggregate counts and POL_/M7_ codes only. Policy actions are from a finite set chosen deterministically by the canonical pressure level; budgets are clamped into a configured window after the pressure factor. Unknown pressure labels are rejected as POL_PRESSURE_UNKNOWN, never coerced. The shadow engine is structurally incapable of affecting the live path — inputs are deep-copied and the prompt digest is pinned before and after — so liveMutations is always zero. M7 migrates legacy pressure labels to the v2 canonical five by copy/validate/switch; an unknown label blocks the switch (M7_PRESSURE_UNKNOWN). No prompt bytes, session content, or free-text ever reaches the client.
{view?.status === "awaiting_data" && (
Awaiting first event. Data will appear after the next pipeline run.
)} {view?.status === "deferred" && view?.deferredReason && (
Deferred: {view.deferredReason.replace(/_/g, " ")}
)} )}
); }