()
| 762 | |
| 763 | |
| 764 | async function status() { |
| 765 | |
| 766 | header("Status"); |
| 767 | |
| 768 | success(`Base dir: ${BASE_DIR}`); |
| 769 | success(`Extension dir present: ${existsSync(EXTENSION_DIR)}`); |
| 770 | success(`Broker installed: ${existsSync(BROKER_DST)}`); |
| 771 | success(`Native host installed: ${existsSync(NATIVE_HOST_DST)}`); |
| 772 | success(`Host wrapper installed: ${existsSync(NATIVE_HOST_WRAPPER)}`); |
| 773 | |
| 774 | const cfg = loadConfig(); |
| 775 | if (cfg?.extensionId) { |
| 776 | success(`Configured extension ID: ${cfg.extensionId}`); |
| 777 | } else { |
| 778 | warn("No config.json found (run install)"); |
| 779 | } |
| 780 | |
| 781 | const manifestId = getExtensionIdFromManifest(); |
| 782 | if (manifestId) { |
| 783 | success(`Fixed extension ID (manifest): ${manifestId}`); |
| 784 | } |
| 785 | |
| 786 | if (cfg?.nodePath) { |
| 787 | success(`Node path: ${cfg.nodePath}`); |
| 788 | } |
| 789 | |
| 790 | const osName = platform(); |
| 791 | const hostDirs = getNativeHostDirs(osName); |
| 792 | let foundAny = false; |
| 793 | for (const dir of hostDirs) { |
| 794 | const p = nativeHostManifestPath(dir); |
| 795 | if (existsSync(p)) { |
| 796 | foundAny = true; |
| 797 | success(`Native host manifest: ${p}`); |
| 798 | } |
| 799 | } |
| 800 | if (!foundAny) { |
| 801 | warn("No native host manifest found. Run: npx @different-ai/opencode-browser install"); |
| 802 | } |
| 803 | } |
| 804 | |
| 805 | async function agentInstall() { |
| 806 | header("Agent Browser Install"); |
no test coverage detected