{
  "schema": "masidyn-chromeos-native-bridge/v1",
  "target": "ChromeOS Native (Browser Side-Panel + Crostini penguin.linux.test:11460 Bridge)",
  "piped_seats": [
    "masidyn",
    "white",
    "purple",
    "blue",
    "green",
    "yellow",
    "red",
    "orange",
    "pink"
  ],
  "manifest": {
    "manifest_version": 3,
    "name": "MasiDyn Native ChromeOS & Crostini Bridge",
    "version": "1.0.0",
    "description": "Pipes all MasiDyn Praetors natively into ChromeOS via Crostini (http://penguin.linux.test:11460), Home LAN (192.168.1.10), and On-the-Go Tunnel (masidyn.com).",
    "permissions": [
      "sidePanel",
      "storage",
      "activeTab"
    ],
    "host_permissions": [
      "http://penguin.linux.test:11460/*",
      "http://127.0.0.1:11460/*",
      "http://127.0.0.1:11435/*",
      "http://192.168.1.10:11460/*",
      "http://192.168.1.10:11435/*",
      "https://masidyn.com/*",
      "https://masidyn.dev/*"
    ],
    "background": {
      "service_worker": "service_worker.js"
    },
    "side_panel": {
      "default_path": "sidepanel.html"
    },
    "action": {
      "default_title": "Open MasiDyn ChromeOS Side Panel"
    }
  },
  "files": {
    "manifest.json": "{\n  \"manifest_version\": 3,\n  \"name\": \"MasiDyn Native ChromeOS & Crostini Bridge\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Pipes all MasiDyn Praetors natively into ChromeOS via Crostini (http://penguin.linux.test:11460), Home LAN (192.168.1.10), and On-the-Go Tunnel (masidyn.com).\",\n  \"permissions\": [\n    \"sidePanel\",\n    \"storage\",\n    \"activeTab\"\n  ],\n  \"host_permissions\": [\n    \"http://penguin.linux.test:11460/*\",\n    \"http://127.0.0.1:11460/*\",\n    \"http://127.0.0.1:11435/*\",\n    \"http://192.168.1.10:11460/*\",\n    \"http://192.168.1.10:11435/*\",\n    \"https://masidyn.com/*\",\n    \"https://masidyn.dev/*\"\n  ],\n  \"background\": {\n    \"service_worker\": \"service_worker.js\"\n  },\n  \"side_panel\": {\n    \"default_path\": \"sidepanel.html\"\n  },\n  \"action\": {\n    \"default_title\": \"Open MasiDyn ChromeOS Side Panel\"\n  }\n}",
    "service_worker.js": "const ROUTES = [\n  'http://penguin.linux.test:11460',\n  'http://127.0.0.1:11460',\n  'http://192.168.1.10:11460',\n  'https://masidyn.com'\n];\nchrome.sidePanel.setPanelBehavior({ openPanelOnActionClick: true }).catch(() => {});\nasync function resolveActiveRoute() {\n  for (const base of ROUTES) {\n    try {\n      const r = await fetch(base + '/api/health', { method: 'GET' });\n      if (r.ok) return { base, onTheGo: base.startsWith('https://') };\n    } catch (e) {}\n  }\n  return { base: 'https://masidyn.com', onTheGo: true };\n}\nchrome.runtime.onMessage.addListener((msg, _sender, sendResponse) => {\n  if (msg && msg.type === 'MASIDYN_RESOLVE_ROUTE') {\n    resolveActiveRoute().then(sendResponse);\n    return true;\n  }\n});\n",
    "sidepanel.html": "<!doctype html><html><head><meta charset='utf-8'><title>MasiDyn \u00b7 Native ChromeOS Pipe</title></head><body style='margin:0;background:#0b0d12;color:#e8e6df;font:14px system-ui'><div id='status' style='padding:8px 12px;border-bottom:1px solid #222;color:#ffd23f'>Connecting to penguin.linux.test:11460 / On-the-Go pipe...</div><iframe id='stage' style='border:0;width:100%;height:calc(100vh - 36px)' src='https://masidyn.com/personas'></iframe><script src='sidepanel.js'></script></body></html>",
    "sidepanel.js": "chrome.runtime.sendMessage({ type: 'MASIDYN_RESOLVE_ROUTE' }, (res) => {\n  const st = document.getElementById('status');\n  const stg = document.getElementById('stage');\n  if (res && res.base) {\n    st.textContent = 'Pipe: ' + res.base + (res.onTheGo ? ' (On-the-Go)' : ' (Crostini / LAN)');\n    stg.src = res.base + '/personas';\n  }\n});\n"
  }
}
