Dashboard › opencode › Distillation
12ce3e6a-0dea-4da7-8727-a33d6b0bcd79["lore_tm_v1_8dzHdwBgXn2CMa_aQ72PtbbtUROYpDRe42XmjxQd6tc","lore_tm_v1_R-NDXCyViMrbTOxGmI7V7rdrUmEolaDXs4K7C2cn304","lore_tm_v1_9zU3pOjOe4UDT3Jkn0PCJFVR10ViHXH6rMWJX2B4qyU"]
/home/byk/Code/opencode-lore/packages/gateway/script/bundle.ts lines 440–527 generate dist/index.d.cts; its generated StartOptions currently exposes only port?: number, hosts?: string[], debug?: boolean, and quiet?: boolean, omitting source-level options including remoteUrl, local, allowRemoteManagement, bg, and processBoundary.GatewayHandle declaration in /home/byk/Code/opencode-lore/packages/gateway/script/bundle.ts currently exposes config, port, owned, and shutdown, but omits source-level managementToken and processShutdown.DEFAULT_PORTS: readonly [3207, 5673], DEFAULT_PORT: 3207, loadConfig(), startServer(config), startGateway(opts?), probeGateway(baseURL, timeoutMs?), readPortFile(), resetPipelineState(), and _cli() in dist/index.d.cts./home/byk/Code/opencode-lore/packages/gateway/script/bundle.ts reports these bundle outputs in order: dist/index.cjs, dist/index.bun.js, dist/embedding-worker.cjs, dist/embedding-worker.js, dist/vector-worker.cjs, dist/vector-worker.js, dist/ort-wasm-simd-threaded.{mjs,wasm}, dist/bin.cjs, and dist/index.d.cts.StartOptions in /home/byk/Code/opencode-lore/packages/gateway/src/cli/start.ts: remoteUrl?: string overrides LORE_REMOTE_URL; local?: boolean corresponds to --local / -l and disables hosted mode even for lore start; allowRemoteManagement?: boolean allows non-loopback peers to access the dashboard and management API; bg?: boolean corresponds to --bg / --daemon, re-spawns detached, polls until healthy, prints address/PID/log path, and exits 0; processBoundary?: boolean is an internal CLI-owned process boundary.processBoundary is never set by in-process plugins.GatewayHandle includes owner-only managementToken: string for gateway-control authentication and optional internal processShutdown?: ProcessShutdownController, a one-shot CLI process shutdown shared by signals and control./home/byk/Code/opencode-lore/packages/gateway/src/cli/start.ts: GatewayHealthIdentity contains pid: number; GatewayIdentityProbe variants are { kind: "authenticated"; identity }, { kind: "rejected" }, { kind: "unavailable" }, and { kind: "timeout" }; GatewayShutdownRequestResult is "accepted" | "unsupported" | "failed".StartGatewayIO defines readProcess, authenticate, writePort, removePort, writeProcess, removeProcess, startServer, resetPipelineState, and createProcessShutdownController; realStartGatewayIO maps these to readGatewayProcessFile, probeGatewayProcessHost, writePortFile, removePortFile, writeGatewayProcessFile, conditional removeGatewayProcessFile, startServer, resetPipelineState, and makeProcessShutdownController.VECTOR_POOL_SHUTDOWN_DEADLINE_MS is bounded by Math.max(Math.min(DEFAULT_VECTOR_POOL_SHUTDOWN_DEADLINE_MS, SHUTDOWN_DEADLINE_MS - 500), 500), preserving a 500ms safety floor even with an aggressive LORE_SHUTDOWN_TIMEOUT_MS such as 1000ms.globalThis.fetch-related matches in /home/byk/Code/opencode-lore/packages/core/src/fetch-interceptor.ts; the interceptor stores the original fetch in the process-global Symbol.for("lore.fetchInterceptor.originalFetch") slot via readOriginalFetchSlot() and writeOriginalFetchSlot(), preventing later module copies from patching an already-patched fetch./home/byk/Code/opencode-lore/packages/core/src/fetch-interceptor.ts captures const originalFetch = globalThis.fetch, installs the interceptor with globalThis.fetch = Object.assign(interceptor, originalFetch), routes passthrough and rewritten requests through originalFetch, and returns cleanup that restores globalThis.fetch = originalFetch.