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

Function writeNativeHostManifest

bin/cli.js:301–313  ·  view source on GitHub ↗
(dir, extensionId, hostPath)

Source from the content-addressed store, hash-verified

299}
300
301function writeNativeHostManifest(dir, extensionId, hostPath) {
302 ensureDir(dir);
303
304 const manifest = {
305 name: NATIVE_HOST_NAME,
306 description: "OpenCode Browser native messaging host",
307 path: hostPath || NATIVE_HOST_DST,
308 type: "stdio",
309 allowed_origins: [`chrome-extension://${extensionId}/`],
310 };
311
312 writeFileSync(nativeHostManifestPath(dir), JSON.stringify(manifest, null, 2) + "\n");
313}
314
315function loadConfig() {
316 try {

Callers 2

installFunction · 0.85
updateFunction · 0.85

Calls 2

ensureDirFunction · 0.85
nativeHostManifestPathFunction · 0.85

Tested by

no test coverage detected