Lines 26-68javascript
28 return function (mod) {
29 if (mod && mod.__esModule) return mod;
31 if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32 __setModuleDefault(result, mod);
36var __importDefault = (this && this.__importDefault) || function (mod) {
37 return (mod && mod.__esModule) ? mod : { "default": mod };
39Object.defineProperty(exports, "__esModule", { value: true });
40exports.runConnect = runConnect;
41const chalk_1 = __importDefault(require("chalk"));
42const commander_1 = require("commander");
43const dotenv_1 = __importDefault(require("dotenv"));
44const fs_1 = require("fs");
45const ora_1 = __importDefault(require("ora"));
46const path_1 = require("path");
47const http = __importStar(require("http"));
48const os = __importStar(require("os"));
49const child_process_1 = require("child_process");
50const ws_1 = __importDefault(require("ws"));
51const playwright_1 = require("playwright");
52const mcp_executor_js_1 = require("./mcp-executor.js");
53const AGENT_VERSION = "1.0.0";
54// First-run browser bootstrap. Playwright ships its driver via npm but the
55// browser binaries are downloaded separately (~300MB for chromium). Without
56// this, the first `connect` from a fresh `npx @cutleryapp/agent` install fails
57// with "Executable doesn't exist" the moment it tries to launch a test.
HighRuntime Package Install
Package source invokes a package manager install command at runtime.
dist/cli.jsView on unpkg · L48 58async function ensureBrowsersInstalled() {
59 if (process.env.CUTLERY_SKIP_BROWSER_INSTALL === "1")
60 return;
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 · L46 61 // Containers (our Docker image) bake browsers into the layer — skip the check.
62 if ((0, fs_1.existsSync)("/.dockerenv"))
65 if ((0, fs_1.existsSync)(playwright_1.chromium.executablePath()))
68 catch { /* path lookup failed — fall through to install */ }