MCPcopy Create free account
hub / github.com/different-ai/opencode-browser / status

Function status

bin/cli.js:764–803  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

762
763
764async 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
805async function agentInstall() {
806 header("Agent Browser Install");

Callers 1

mainFunction · 0.70

Calls 7

headerFunction · 0.85
successFunction · 0.85
loadConfigFunction · 0.85
warnFunction · 0.85
getNativeHostDirsFunction · 0.85
nativeHostManifestPathFunction · 0.85

Tested by

no test coverage detected