Lines 183-223javascript
185 while (Date.now() < deadline) {
186 if (exited) throw new Error("Lelu engine exited during startup \u2014 see log lines above.");
188 const res = await fetch(`${url}/healthz`, { signal: AbortSignal.timeout(1e3) });
192 await new Promise((r) => setTimeout(r, 250));
194 throw new Error(`Lelu engine did not become healthy within ${timeoutMs / 1e3}s`);
196async function startLocalEngine() {
197 const [bin, policyPath, apiKey] = await Promise.all([
202 const home = leluHome();
203 const port = await freePort();
204 const url = `http://127.0.0.1:${port}`;
205 const child = spawn(bin, [], {
207 // Dev-mode confidence defaults: MCP hosts cannot produce verified
208 // provider signals (logprobs/entropy), so accept self-reported
209 // confidence and route signal-less requests to human review instead of
210 // hard-denying. Listed before the spread so your env vars override them.
211 CONFIDENCE_ALLOW_UNVERIFIED: "true",
212 CONFIDENCE_MISSING_MODE: "review",
214 LISTEN_ADDR: `127.0.0.1:${port}`,
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/cli.jsView on unpkg · L203 215 POLICY_PATH: policyPath,
217 DATABASE_PATH: path.join(home, "lelu.db"),
218 LELU_RSA_KEY_PATH: path.join(home, "signing.key.pem")
220 stdio: ["ignore", "pipe", "pipe"]
222 const forward = (chunk) => {
223 for (const line of chunk.toString().split("\n")) {