(dir, extensionId, hostPath)
| 299 | } |
| 300 | |
| 301 | function 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 | |
| 315 | function loadConfig() { |
| 316 | try { |
no test coverage detected