/* global window */
/* Icons + Menu + Endpoints data
   All icons are inline SVG factories returning React elements.
*/
const svg = (props, children) => React.createElement('svg', Object.assign({
  width: 14, height: 14, viewBox: '0 0 24 24', fill: 'none',
  stroke: 'currentColor', strokeWidth: 1.6, strokeLinecap: 'round', strokeLinejoin: 'round'
}, props), children);

const path = (d, extra={}) => React.createElement('path', Object.assign({ d }, extra));
const circle = (cx,cy,r,extra={}) => React.createElement('circle', Object.assign({cx,cy,r}, extra));
const rect = (x,y,w,h,extra={}) => React.createElement('rect', Object.assign({x,y,width:w,height:h,rx:2}, extra));
const line = (x1,y1,x2,y2,extra={}) => React.createElement('line', Object.assign({x1,y1,x2,y2}, extra));
const poly = (points,extra={}) => React.createElement('polyline', Object.assign({points}, extra));

const Ico = {
  dot:       (p={}) => svg(p, [circle(12,12,3,{fill:'currentColor',stroke:'none',key:1})]),
  menu:      (p={}) => svg(p, [line(3,6,21,6,{key:1}),line(3,12,21,12,{key:2}),line(3,18,21,18,{key:3})]),
  dashboard: (p={}) => svg(p, [rect(3,3,7,9,{key:1}),rect(14,3,7,5,{key:2}),rect(14,12,7,9,{key:3}),rect(3,16,7,5,{key:4})]),
  robot:     (p={}) => svg(p, [rect(4,8,16,12,{key:1}),circle(9,14,1.5,{fill:'currentColor',key:2}),circle(15,14,1.5,{fill:'currentColor',key:3}),line(12,4,12,8,{key:4}),circle(12,3,1,{fill:'currentColor',key:5}),line(2,14,4,14,{key:6}),line(20,14,22,14,{key:7})]),
  heart:     (p={}) => svg(p, [path('M12 21s-7-5-7-11a4 4 0 0 1 7-2.5A4 4 0 0 1 19 10c0 6-7 11-7 11z',{key:1})]),
  scales:    (p={}) => svg(p, [line(12,3,12,21,{key:1}),line(5,7,19,7,{key:2}),path('M5 7l-3 7h6z',{key:3}),path('M19 7l-3 7h6z',{key:4}),line(8,21,16,21,{key:5})]),
  swarm:     (p={}) => svg(p, [circle(6,6,2,{key:1}),circle(18,6,2,{key:2}),circle(12,18,2,{key:3}),line(8,7,10,17,{key:4}),line(16,7,14,17,{key:5}),line(8,6,16,6,{key:6})]),
  key:       (p={}) => svg(p, [circle(7,17,3,{key:1}),path('M9 15l10-10 3 3-3 3-2-2-2 2-2-2',{key:2})]),
  mav:       (p={}) => svg(p, [path('M3 12h3l3-8 3 16 3-12 3 4h3',{key:1})]),
  terminal:  (p={}) => svg(p, [rect(3,4,18,16,{key:1}),poly('6,9 9,12 6,15',{key:2,fill:'none'}),line(12,15,17,15,{key:3})]),
  bird:      (p={}) => svg(p, [path('M2 12c3-6 9-7 12-4 2-3 5-3 8-1-2 2-2 5-3 7-2 3-6 5-10 4-3 0-5-2-7-6z',{key:1}),circle(16,8,0.8,{fill:'currentColor',key:2})]),
  envelope:  (p={}) => svg(p, [rect(3,5,18,14,{key:1}),poly('3,7 12,13 21,7',{key:2,fill:'none'})]),
  x:         (p={}) => svg(p, [line(5,5,19,19,{key:1}),line(19,5,5,19,{key:2})]),
  lock:      (p={}) => svg(p, [rect(5,11,14,10,{key:1}),path('M8 11V8a4 4 0 0 1 8 0v3',{key:2})]),
  unlock:    (p={}) => svg(p, [rect(5,11,14,10,{key:1}),path('M8 11V8a4 4 0 0 1 7-2',{key:2})]),
  wallet:    (p={}) => svg(p, [rect(3,6,18,13,{key:1}),path('M3 10h18',{key:2}),circle(17,14,1.2,{fill:'currentColor',key:3})]),
  plus:      (p={}) => svg(p, [line(12,5,12,19,{key:1}),line(5,12,19,12,{key:2})]),
  cli:       (p={}) => svg(p, [rect(3,4,18,16,{key:1}),poly('7,9 10,12 7,15',{key:2,fill:'none'})]),
  api:       (p={}) => svg(p, [rect(3,6,18,12,{key:1}),line(7,10,7,14,{key:2}),line(11,10,11,14,{key:3}),line(15,10,15,14,{key:4}),line(19,10,19,14,{key:5})]),
  doc:       (p={}) => svg(p, [path('M6 3h9l4 4v14H6z',{key:1}),line(9,9,15,9,{key:2}),line(9,13,15,13,{key:3}),line(9,17,13,17,{key:4})]),
  github:    (p={}) => svg(p, [path('M12 2a10 10 0 0 0-3 19.5c.5.1.7-.2.7-.5v-2c-3 .7-3.5-1.3-3.5-1.3-.5-1-1-1.3-1-1.3-1-.5 0-.5 0-.5 1 0 1.5 1 1.5 1 1 1.5 2.5 1 3 .8 0-.7.3-1 .5-1.3-2-.2-4-1-4-4.5 0-1 .3-1.8 1-2.5 0-.3-.5-1.3 0-2.5 0 0 .8-.2 2.5 1a9 9 0 0 1 5 0c2-1.2 2.5-1 2.5-1 .5 1.3 0 2.3 0 2.5.6.7 1 1.5 1 2.5 0 3.5-2 4.3-4 4.5.3.3.6.8.6 1.7V22c0 .3.2.6.7.5A10 10 0 0 0 12 2z',{key:1})]),
  iot:       (p={}) => svg(p, [circle(12,12,2,{fill:'currentColor',key:1}),path('M7 12a5 5 0 0 1 10 0',{key:2}),path('M4 12a8 8 0 0 1 16 0',{key:3}),path('M1 12a11 11 0 0 1 22 0',{key:4})]),
  sim:       (p={}) => svg(p, [circle(12,12,9,{key:1}),path('M3 12h18',{key:2}),path('M12 3a14 14 0 0 1 0 18',{key:3}),path('M12 3a14 14 0 0 0 0 18',{key:4})]),
  billing:   (p={}) => svg(p, [rect(3,6,18,13,{key:1}),line(3,10,21,10,{key:2}),line(7,15,11,15,{key:3})]),
  integration:(p={}) => svg(p, [circle(6,6,3,{key:1}),circle(18,18,3,{key:2}),line(8,8,16,16,{key:3})]),
  router:    (p={}) => svg(p, [rect(3,13,18,6,{key:1}),line(7,17,7,17.01,{key:2}),line(11,17,11,17.01,{key:3}),line(15,17,15,17.01,{key:4}),line(8,13,8,8,{key:5}),line(12,13,12,5,{key:6}),line(16,13,16,9,{key:7})]),
  apocalypse:(p={}) => svg(p, [path('M12 2L2 21h20L12 2z',{key:1}),line(12,9,12,14,{key:2}),circle(12,17,0.8,{fill:'currentColor',key:3})]),
  zeropoint: (p={}) => svg(p, [circle(12,12,9,{key:1}),circle(12,12,5,{key:2}),circle(12,12,1.5,{fill:'currentColor',stroke:'none',key:3})]),
};

const MENU = [
  { group: 'MISSION CONTROL' },
  { id:'landing',    label:'Home',           icon:'dot' },
  { id:'dashboard',  label:'Dashboard',      icon:'dashboard', private:true },
  { id:'tracking',   label:'Robot Tracking', icon:'robot',     private:true },
  { group: 'OPERATIONS' },
  { id:'chat',       label:'Chat Terminal',  icon:'terminal',  private:true },
  { id:'router',     label:'Model Router',   icon:'router',    private:true },
  { id:'api-keys',   label:'API Keys',       icon:'key',       private:true },
  { id:'iot',        label:'IoT Networks',   icon:'iot',       private:true },
  { group: 'PRODUCTS' },
  { id:'ethics',     label:'Ethics Engine',  icon:'scales' },
  { id:'cardiac',    label:'NWO Cardiac',    icon:'heart' },
  { id:'autobot',    label:'NWO Autobot',    icon:'mav' },
  { id:'own-robot',  label:'NWO OWN Robot',  icon:'robot' },
  { id:'bot-market', label:'NWO BOT Market', icon:'swarm' },
  { id:'agent-graph',label:'NWO Agent Graph',icon:'integration' },
  { id:'apocalypse', label:'NWO Apocalypse', icon:'apocalypse' },
  { id:'zeropoint',  label:'NWO ZeroPoint',  icon:'zeropoint' },
  { group: 'API' },
  { id:'endpoints',  label:'API Endpoints',  icon:'api' },
  { id:'api-docs',   label:'API Docs',       icon:'doc' },
  { id:'hf-demo',    label:'HF Demo',        icon:'cli' },
  { group: 'DOCS' },
  { id:'whitepaper', label:'Whitepaper',     icon:'doc' },
];

/* =============================================================
 * NWO_ENDPOINTS — full reconciliation
 *
 *   live    = still on PHP at nwo.capital (requires GPU or deferred)
 *   render  = on Render (nwo-capital-api / ros2-bridge / oracle / relayer)
 *   roadmap = GPU-dependent port placeholders
 *
 * After Tier-A migration:
 *   live:    ~20 endpoints   (GPU-dependent + streaming)
 *   render:  ~54 endpoints   (all CRUD + identity + ROS2)
 *   roadmap:   3 endpoints   (GPU compute placeholders)
 * ============================================================= */
const NWO_ENDPOINTS = [
  // -------------------- 1. Inference & Models --------------------
  // Inference itself stays on PHP/Workers (GPU required).
  { group:'1. Inference & Models', m:'POST', p:'/api-robotics.php?action=inference',
    host:'nwo.capital', desc:'Standard VLA inference. Body: instruction, images, model_id.', status:'live' },
  { group:'1. Inference & Models', m:'POST', p:'/api/inference',
    host:'nwo-robotics-api-edge.ciprianpater.workers.dev', desc:'Edge inference (CF Workers). Ultra-low latency.', status:'live' },
  { group:'1. Inference & Models', m:'POST', p:'/api-robotics.php?action=inference&use_model_router=true',
    host:'nwo.capital', desc:'Intelligent model router (auto-selects VLA/OCR/etc).', status:'live' },
  // Model registry CRUD moves to Render
  { group:'1. Inference & Models', m:'GET',  p:'/api/models',
    host:'nwo-capital-api.onrender.com', desc:'List available VLA models with capabilities + status.', status:'render' },
  { group:'1. Inference & Models', m:'GET',  p:'/api/models/{model_id}',
    host:'nwo-capital-api.onrender.com', desc:'Get model details + performance metrics.', status:'render' },

  // -------------------- 2. Robot Control --------------------
  { group:'2. Robot Control', m:'GET',  p:'/api-robotics.php?action=query_state&agent_id=robot_001',
    host:'nwo.capital', desc:'Query robot pose, joint positions, sensors.', status:'live' },
  { group:'2. Robot Control', m:'POST', p:'/api-robotics.php?action=execute',
    host:'nwo.capital', desc:'Execute action sequence with safety checks.', status:'live' },
  { group:'2. Robot Control', m:'POST', p:'/api-robotics.php?action=sensor_fusion',
    host:'nwo.capital', desc:'IoT + AERIS-10 + camera multi-sensor fusion.', status:'live' },
  { group:'2. Robot Control', m:'POST', p:'/api-robotics.php?action=robot_query',
    host:'nwo.capital', desc:'Natural-language robot status query.', status:'live' },
  { group:'2. Robot Control', m:'POST', p:'/api-robotics.php?action=get_agent_status',
    host:'nwo.capital', desc:'Detailed agent status + telemetry.', status:'live' },

  // -------------------- 3. Task Planning & Learning --------------------
  { group:'3. Task Planning & Learning', m:'POST', p:'/api-robotics.php?action=task_planner',
    host:'nwo.capital', desc:'Decompose high-level goal into action subtasks.', status:'live' },
  { group:'3. Task Planning & Learning', m:'POST', p:'/api-robotics.php?action=execute_subtask',
    host:'nwo.capital', desc:'Execute a planned subtask.', status:'live' },
  { group:'3. Task Planning & Learning', m:'POST', p:'/api-robotics.php?action=learning&subaction=recommend',
    host:'nwo.capital', desc:'Get strategy recommendations from history.', status:'live' },
  { group:'3. Task Planning & Learning', m:'POST', p:'/api-robotics.php?action=learning&subaction=log',
    host:'nwo.capital', desc:'Log execution outcome for future learning.', status:'live' },

  // -------------------- 4. Agent Management — ALL ON RENDER --------------------
  { group:'4. Agent Management', m:'POST', p:'/api/agents',
    host:'nwo-capital-api.onrender.com', desc:'Self-registration: agent claims rootTokenId.', status:'render' },
  { group:'4. Agent Management', m:'POST', p:'/api/agents/{id}/pay',
    host:'nwo-capital-api.onrender.com', desc:'Autonomous payment / tier upgrade via wallet.', status:'render' },
  { group:'4. Agent Management', m:'GET',  p:'/api/agents/{id}/balance',
    host:'nwo-capital-api.onrender.com', desc:'Get agent ETH balance + spending history.', status:'render' },
  { group:'4. Agent Management', m:'GET',  p:'/api/agents/{id}',
    host:'nwo-capital-api.onrender.com', desc:'Fetch agent record by agent_id.', status:'render' },
  { group:'4. Agent Management', m:'PUT',  p:'/api/agents/{id}',
    host:'nwo-capital-api.onrender.com', desc:'Update agent metadata or capabilities.', status:'render' },
  { group:'4. Agent Management', m:'POST', p:'/api/agents/{id}/register',
    host:'nwo-capital-api.onrender.com', desc:'Register agent with capabilities + signature.', status:'render' },

  // -------------------- 5. Agent Discovery — ALL ON RENDER --------------------
  { group:'5. Agent Discovery', m:'GET',  p:'/api/discovery/health',
    host:'nwo-capital-api.onrender.com', desc:'Service health probe.', status:'render' },
  { group:'5. Agent Discovery', m:'GET',  p:'/api/discovery/whoami',
    host:'nwo-capital-api.onrender.com', desc:'Resolve wallet → agents owned, tier, balance.', status:'render' },
  { group:'5. Agent Discovery', m:'GET',  p:'/api/discovery/capabilities',
    host:'nwo-capital-api.onrender.com', desc:'Discover available actions for current tier.', status:'render' },
  { group:'5. Agent Discovery', m:'POST', p:'/api/discovery/dry-run',
    host:'nwo-capital-api.onrender.com', desc:'Validate request without executing.', status:'render' },
  { group:'5. Agent Discovery', m:'POST', p:'/api/discovery/plan',
    host:'nwo-capital-api.onrender.com', desc:'Get execution plan for a high-level intent.', status:'render' },

  // -------------------- 6. ROS2 Bridge (already on Render) --------------------
  { group:'6. ROS2 Bridge', m:'GET',  p:'/api/v1/robots',
    host:'nwo-ros2-bridge.onrender.com', desc:'List physical robots on ROS2 bridge.', status:'render' },
  { group:'6. ROS2 Bridge', m:'GET',  p:'/api/v1/robots/{robot_id}/status',
    host:'nwo-ros2-bridge.onrender.com', desc:'Robot connection + sensor status.', status:'render' },
  { group:'6. ROS2 Bridge', m:'POST', p:'/api/v1/robots/{robot_id}/command',
    host:'nwo-ros2-bridge.onrender.com', desc:'Send ROS2 command to a robot.', status:'render' },
  { group:'6. ROS2 Bridge', m:'POST', p:'/api/v1/action',
    host:'nwo-ros2-bridge.onrender.com', desc:'Generic ROS2 action publish.', status:'render' },
  { group:'6. ROS2 Bridge', m:'POST', p:'/api/v1/robots/{robot_id}/emergency_stop',
    host:'nwo-ros2-bridge.onrender.com', desc:'Emergency stop one robot.', status:'render' },
  { group:'6. ROS2 Bridge', m:'POST', p:'/api/v1/robots/emergency_stop_all',
    host:'nwo-ros2-bridge.onrender.com', desc:'Emergency stop all connected robots.', status:'render' },
  { group:'6. ROS2 Bridge', m:'GET',  p:'/api/v1/config/robot-types',
    host:'nwo-ros2-bridge.onrender.com', desc:'List supported robot type configs.', status:'render' },
  { group:'6. ROS2 Bridge', m:'WS',   p:'/ws/robot/{robot_id}',
    host:'nwo-ros2-bridge.onrender.com', desc:'WebSocket bidirectional ROS2 channel.', status:'render' },

  // -------------------- 7. WebSocket & Streaming (stays on PHP, GPU-dependent) --------------------
  { group:'7. WebSocket & Streaming', m:'WS',  p:'/ws/stream',
    host:'nwo.capital', desc:'WebSocket inference + telemetry streaming.', status:'live' },
  { group:'7. WebSocket & Streaming', m:'GET', p:'/api-robotics.php?action=inference_stream&format=sse',
    host:'nwo.capital', desc:'Server-Sent Events inference stream.', status:'live' },
  { group:'7. WebSocket & Streaming', m:'GET', p:'/api-robotics.php?action=streaming_config',
    host:'nwo.capital', desc:'Get WS/SSE config + auth params.', status:'live' },

  // -------------------- 8. Physics & Simulation (stays on PHP — CPU/GPU-heavy) --------------------
  { group:'8. Physics & Simulation', m:'POST', p:'/api-simulation.php?action=simulate_trajectory',
    host:'nwo.capital', desc:'Simulate a planned trajectory (PyBullet).', status:'live' },
  { group:'8. Physics & Simulation', m:'POST', p:'/api-simulation.php?action=check_collision',
    host:'nwo.capital', desc:'Static collision check on robot pose.', status:'live' },
  { group:'8. Physics & Simulation', m:'POST', p:'/api-simulation.php?action=estimate_torques',
    host:'nwo.capital', desc:'Estimate required joint torques.', status:'live' },
  { group:'8. Physics & Simulation', m:'POST', p:'/api-simulation.php?action=validate_grasp',
    host:'nwo.capital', desc:'Validate grasp pose before execution.', status:'live' },
  { group:'8. Physics & Simulation', m:'POST', p:'/api-simulation.php?action=plan_motion',
    host:'nwo.capital', desc:'RRT* / motion planning given start + goal.', status:'live' },
  { group:'8. Physics & Simulation', m:'GET',  p:'/api-simulation.php?action=get_scene_library',
    host:'nwo.capital', desc:'List available simulation scenes.', status:'live' },
  { group:'8. Physics & Simulation', m:'POST', p:'/api-cosmos.php?action=generate_scene',
    host:'nwo.capital', desc:'Generate Cosmos synthetic training scene.', status:'live' },

  // -------------------- 9. Embodiment & Calibration — ALL ON RENDER --------------------
  { group:'9. Embodiment & Calibration', m:'GET',  p:'/api/embodiment',
    host:'nwo-capital-api.onrender.com', desc:'List supported robot embodiments.', status:'render' },
  { group:'9. Embodiment & Calibration', m:'GET',  p:'/api/embodiment/{robot_type}',
    host:'nwo-capital-api.onrender.com', desc:'Robot embodiment details + URDF link.', status:'render' },
  { group:'9. Embodiment & Calibration', m:'GET',  p:'/api/embodiment/{robot_type}/normalization',
    host:'nwo-capital-api.onrender.com', desc:'Action-space normalization params.', status:'render' },
  { group:'9. Embodiment & Calibration', m:'GET',  p:'/api/embodiment/{robot_type}/urdf',
    host:'nwo-capital-api.onrender.com', desc:'Download URDF for a robot type.', status:'render' },
  { group:'9. Embodiment & Calibration', m:'GET',  p:'/api/embodiment/{robot_type}/test-results',
    host:'nwo-capital-api.onrender.com', desc:'Embodiment validation test results.', status:'render' },
  { group:'9. Embodiment & Calibration', m:'POST', p:'/api/embodiment/compare',
    host:'nwo-capital-api.onrender.com', desc:'Compare two robot embodiments.', status:'render' },
  { group:'9. Embodiment & Calibration', m:'POST', p:'/api/calibration/run',
    host:'nwo-capital-api.onrender.com', desc:'Run vision-to-base calibration.', status:'render' },
  { group:'9. Embodiment & Calibration', m:'POST', p:'/api/calibration',
    host:'nwo-capital-api.onrender.com', desc:'Save calibration results.', status:'render' },

  // -------------------- 10. Online RL & Fine-Tuning (session CRUD on Render; training on PHP) --------------------
  { group:'10. Online RL & Fine-Tuning', m:'POST', p:'/api/rl/sessions',
    host:'nwo-capital-api.onrender.com', desc:'Start online RL training session.', status:'render' },
  { group:'10. Online RL & Fine-Tuning', m:'POST', p:'/api/rl/sessions/{id}/telemetry',
    host:'nwo-capital-api.onrender.com', desc:'Submit episode telemetry for RL update.', status:'render' },
  { group:'10. Online RL & Fine-Tuning', m:'POST', p:'/api-fine-tune.php?action=create_dataset',
    host:'nwo.capital', desc:'Create fine-tuning dataset from sessions.', status:'live' },
  { group:'10. Online RL & Fine-Tuning', m:'POST', p:'/api-fine-tune.php?action=start_job',
    host:'nwo.capital', desc:'Start fine-tune job (LoRA adapter, GPU required).', status:'live' },

  // -------------------- 11. Tactile Sensing (read on Render; processing stays on PHP) --------------------
  { group:'11. Tactile Sensing', m:'GET',  p:'/api/tactile/orca',
    host:'nwo-capital-api.onrender.com', desc:'Read tactile sensors (256 taxels per finger).', status:'render' },
  { group:'11. Tactile Sensing', m:'POST', p:'/api-tactile.php?action=process_input',
    host:'nwo.capital', desc:'Process tactile data → grip quality.', status:'live' },
  { group:'11. Tactile Sensing', m:'POST', p:'/api-tactile.php?action=slip_detection',
    host:'nwo.capital', desc:'Detect grip slip from tactile time-series.', status:'live' },

  // -------------------- 12. Dataset Hub — MOVED TO RENDER --------------------
  { group:'12. Dataset Hub', m:'GET',  p:'/api/datasets',
    host:'nwo-capital-api.onrender.com', desc:'List Unitree-format training datasets.', status:'render' },

  // -------------------- Render Platform API (wallet-mediated CRUD) --------------------
  { group:'Render Platform API', m:'GET',    p:'/api/health',
    host:'nwo-capital-api.onrender.com', desc:'Service health probe (no auth).', status:'render' },
  { group:'Render Platform API', m:'GET',    p:'/api/auth/echo',
    host:'nwo-capital-api.onrender.com', desc:'Echo signed-session for debugging.', status:'render' },
  { group:'Render Platform API', m:'POST',   p:'/api/api-keys',
    host:'nwo-capital-api.onrender.com', desc:'Create wallet-mediated API key.', status:'render' },
  { group:'Render Platform API', m:'GET',    p:'/api/api-keys',
    host:'nwo-capital-api.onrender.com', desc:'List your API keys.', status:'render' },
  { group:'Render Platform API', m:'DELETE', p:'/api/api-keys/{id}',
    host:'nwo-capital-api.onrender.com', desc:'Revoke an API key.', status:'render' },
  { group:'Render Platform API', m:'POST',   p:'/api/chat',
    host:'nwo-capital-api.onrender.com', desc:'Wallet-mediated chat command (echo for now).', status:'render' },
  { group:'Render Platform API', m:'GET',    p:'/api/model-usage',
    host:'nwo-capital-api.onrender.com', desc:'Model usage statistics for caller.', status:'render' },
  { group:'Render Platform API', m:'GET',    p:'/api/iot-networks',
    host:'nwo-capital-api.onrender.com', desc:'List IoT networks for wallet.', status:'render' },
  { group:'Render Platform API', m:'POST',   p:'/api/iot-networks',
    host:'nwo-capital-api.onrender.com', desc:'Create IoT network.', status:'render' },
  { group:'Render Platform API', m:'GET',    p:'/api/robots',
    host:'nwo-capital-api.onrender.com', desc:'List wallet-tracked robots.', status:'render' },
  { group:'Render Platform API', m:'POST',   p:'/api/robots',
    host:'nwo-capital-api.onrender.com', desc:'Register a robot.', status:'render' },
  { group:'Render Platform API', m:'GET',    p:'/api/missions',
    host:'nwo-capital-api.onrender.com', desc:'List missions for wallet.', status:'render' },
  { group:'Render Platform API', m:'POST',   p:'/api/missions',
    host:'nwo-capital-api.onrender.com', desc:'Deploy a mission.', status:'render' },

  // -------------------- Cardiac Identity (separate Render services) --------------------
  { group:'Cardiac Identity', m:'POST', p:'/oracle/validate',
    host:'nwo-oracle.onrender.com', desc:'Validate ECG → return cardiacHash.', status:'render' },
  { group:'Cardiac Identity', m:'POST', p:'/relay/selfRegisterHuman',
    host:'nwo-relayer.onrender.com', desc:'Gasless human registration via meta-tx.', status:'render' },
  { group:'Cardiac Identity', m:'POST', p:'/relay/registerAgent',
    host:'nwo-relayer.onrender.com', desc:'Register AI agent identity.', status:'render' },
  { group:'Cardiac Identity', m:'POST', p:'/access/check',
    host:'nwo-relayer.onrender.com', desc:'Check access credentials for location.', status:'render' },
  { group:'Cardiac Identity', m:'POST', p:'/read/identifyByCardiac',
    host:'nwo-relayer.onrender.com', desc:'Lookup identity by cardiac hash.', status:'render' },

  // -------------------- Future / Roadmap (GPU-dependent ports) --------------------
  { group:'Future / Roadmap', m:'POST', p:'/api/v1/inference',
    host:'nwo-capital-api.onrender.com', desc:'VLA inference port to Render (needs GPU instance).', status:'roadmap' },
  { group:'Future / Roadmap', m:'POST', p:'/api/v1/simulation',
    host:'nwo-capital-api.onrender.com', desc:'Physics sim port to Render (CPU-heavy).', status:'roadmap' },
  { group:'Future / Roadmap', m:'POST', p:'/api/v1/cosmos',
    host:'nwo-capital-api.onrender.com', desc:'Cosmos synthetic scene gen (GPU).', status:'roadmap' },
];

window.Ico = Ico;
window.MENU = MENU;
window.NWO_ENDPOINTS = NWO_ENDPOINTS;
