"use client" import { useEffect, useMemo, useState } from "react" type LandlockCompatibility = "best_effort" | "hard_requirement" type EndpointProtocol = "" | "rest" type EndpointTls = "" | "terminate" | "passthrough" type EndpointEnforcement = "" | "enforce" | "audit" type EndpointAccess = "" | "read-only" | "read-write" | "full" interface NetworkRule { method: string path: string } interface NetworkEndpoint { host: string port: string protocol: EndpointProtocol tls: EndpointTls enforcement: EndpointEnforcement access: EndpointAccess rules: NetworkRule[] } interface NetworkBinary { path: string } interface NetworkPolicyBlock { key: string name: string endpoints: NetworkEndpoint[] binaries: NetworkBinary[] } interface OpenShellPolicy { version: number filesystem_policy: { include_workdir: boolean read_only: string[] read_write: string[] } landlock: { compatibility: LandlockCompatibility } process: { run_as_user: string run_as_group: string } network_policies: Record }> binaries: Array<{ path: string }> }> } interface ConfigurationPanelProps { sandboxId: string } function FieldHelp({ text }: { text: string }) { return ( ? {text} ) } function Badge({ children, tone }: { children: React.ReactNode; tone: "dynamic" | "static" }) { const cls = tone === "dynamic" ? "bg-[rgba(118,185,0,0.12)] text-[var(--nvidia-green)] border-[rgba(118,185,0,0.35)]" : "bg-[rgba(245,158,11,0.10)] text-amber-400 border-[rgba(245,158,11,0.35)]" return {children} } function TextListEditor({ label, tooltipText, value, onChange, placeholder }: { label: string tooltipText: string value: string[] onChange: (v: string[]) => void placeholder: string }) { return (