@langwatch/server 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/langwatch/.env.example +7 -0
  2. package/langwatch/dist/client/assets/OptimizationStudio-vCR-uGTm.js +62 -0
  3. package/langwatch/dist/client/assets/_not-found-Dv8tdtNM.js +1 -0
  4. package/langwatch/dist/client/assets/_slug_-CMsn7wx1.js +2 -0
  5. package/langwatch/dist/client/assets/{_workflow_-TEGyCfw0.js → _workflow_-f70BEhXP.js} +2 -2
  6. package/langwatch/dist/client/assets/{index-C3Ph7QLU.js → index-dGagDk3A.js} +3 -3
  7. package/langwatch/dist/client/assets/{wizard-D-JZyqZ3.js → wizard-DG1p4X8m.js} +2 -2
  8. package/langwatch/dist/client/index.html +1 -1
  9. package/langwatch/ee/billing/nurturing/hooks/index.ts +1 -0
  10. package/langwatch/ee/billing/nurturing/hooks/inviteAcceptance.ts +55 -0
  11. package/langwatch/ee/billing/nurturing/types.ts +2 -1
  12. package/langwatch/package.json +4 -2
  13. package/langwatch/pnpm-lock.yaml +306 -333
  14. package/langwatch/scripts/check-feature-parity.ts +17 -0
  15. package/langwatch/src/optimization_studio/components/Publish.tsx +27 -75
  16. package/langwatch/src/optimization_studio/components/__tests__/Publish.gate-removed.integration.test.tsx +301 -0
  17. package/langwatch/src/optimization_studio/server/__tests__/loadDatasets.test.ts +164 -0
  18. package/langwatch/src/optimization_studio/server/loadDatasets.ts +9 -5
  19. package/langwatch/src/server/api/routers/__tests__/organization.acceptInvite.unit.test.ts +9 -0
  20. package/langwatch/src/server/api/routers/organization.ts +17 -0
  21. package/langwatch/src/server/auth0/__tests__/passwordService.integration.test.ts +1 -1
  22. package/langwatch/src/server/sdk-radar/sdk-versions.json +1 -1
  23. package/mcp-server/dist/{chunk-KRE2ON65.js → chunk-ZYZJY5W7.js} +6 -1
  24. package/mcp-server/dist/create-mcp-server.js +1 -1
  25. package/mcp-server/dist/{http-server-WUOH7ASX.js → http-server-C7HT6RPO.js} +2 -2
  26. package/mcp-server/dist/index.js +5 -0
  27. package/mcp-server/package.json +5 -0
  28. package/mcp-server/pnpm-lock.yaml +30 -21
  29. package/package.json +1 -1
  30. package/packages/server/dist/cli.cjs +146 -44
  31. package/langwatch/dist/client/assets/OptimizationStudio-CjZwjRfx.js +0 -62
  32. package/langwatch/dist/client/assets/_not-found-C5bT8cI3.js +0 -1
  33. package/langwatch/dist/client/assets/_slug_-Bk9ghwH9.js +0 -2
@@ -22152,7 +22152,7 @@ var init_detect = __esm({
22152
22152
  });
22153
22153
 
22154
22154
  // src/shared/env.ts
22155
- function buildEnv({ ports, baseHost, overrides = {} }) {
22155
+ function buildEnv({ ports, baseHost, nlpMode = "go", overrides = {} }) {
22156
22156
  const host = baseHost ?? `http://localhost:${ports.langwatch}`;
22157
22157
  const lines = [];
22158
22158
  const set = (key, value) => {
@@ -22192,7 +22192,10 @@ function buildEnv({ ports, baseHost, overrides = {} }) {
22192
22192
  sectionBreak("ENVIRONMENT");
22193
22193
  set("ENVIRONMENT", "local");
22194
22194
  sectionBreak("FEATURE FLAGS");
22195
- set("FEATURE_FLAG_FORCE_ENABLE", "release_nlp_go_engine_enabled");
22195
+ set("LANGWATCH_NPX_NLP", nlpMode);
22196
+ if (nlpMode === "go") {
22197
+ set("FEATURE_FLAG_FORCE_ENABLE", "release_nlp_go_engine_enabled");
22198
+ }
22196
22199
  sectionBreak("MODELS \u2014 fill in any provider you want to evaluate against");
22197
22200
  set("OPENAI_API_KEY", "");
22198
22201
  set("ANTHROPIC_API_KEY", "");
@@ -23071,6 +23074,77 @@ var init_langwatch = __esm({
23071
23074
  }
23072
23075
  });
23073
23076
 
23077
+ // src/services/langwatch-nlp.ts
23078
+ async function startLangwatchNlp(ctx, bus, envFromFile) {
23079
+ bus.emit({ type: "starting", service: "langwatch_nlp" });
23080
+ const start = Date.now();
23081
+ const uvBin = ctx.predeps.uv?.resolvedPath;
23082
+ if (!uvBin) throw new Error("uv predep not resolved");
23083
+ const sp = servicePaths(ctx.paths);
23084
+ const venvDir = sp.venv("langwatch_nlp");
23085
+ const projectDir = locateProject2("langwatch_nlp");
23086
+ if (!projectDir) throw new Error("langwatch_nlp project dir not found");
23087
+ const handle = supervise({
23088
+ spec: {
23089
+ name: "langwatch_nlp",
23090
+ command: uvBin,
23091
+ args: [
23092
+ "run",
23093
+ "--project",
23094
+ projectDir,
23095
+ "--no-sync",
23096
+ "uvicorn",
23097
+ "langwatch_nlp.main:app",
23098
+ "--host",
23099
+ "127.0.0.1",
23100
+ "--port",
23101
+ String(ctx.ports.nlp),
23102
+ "--timeout-keep-alive",
23103
+ "70"
23104
+ ],
23105
+ env: {
23106
+ ...process.env,
23107
+ ...envFromFile,
23108
+ UV_PROJECT_ENVIRONMENT: venvDir,
23109
+ PORT: String(ctx.ports.nlp)
23110
+ },
23111
+ cwd: projectDir
23112
+ },
23113
+ paths: sp,
23114
+ bus
23115
+ });
23116
+ const ready = await pollUntilHealthy({
23117
+ // 120s — uvicorn boot + LiteLLM proxy init + 4-worker ProcessPool spawn
23118
+ // can hit ~50-60s on a cold cache, and a parallel dogfood run pushed
23119
+ // it past the previous 60s ceiling. langevals already polls a similar
23120
+ // service, but its app surface is smaller and starts faster.
23121
+ check: httpGetCheck(`http://127.0.0.1:${ctx.ports.nlp}/health`),
23122
+ timeoutMs: 12e4
23123
+ });
23124
+ if (!ready.ok) {
23125
+ await handle.stop();
23126
+ throw new Error(`langwatch_nlp did not become healthy: ${ready.reason}`);
23127
+ }
23128
+ bus.emit({ type: "healthy", service: "langwatch_nlp", durationMs: Date.now() - start });
23129
+ return handle;
23130
+ }
23131
+ function locateProject2(name) {
23132
+ const dir = (0, import_node_path31.join)(appRoot(), name);
23133
+ return (0, import_node_fs29.existsSync)((0, import_node_path31.join)(dir, "pyproject.toml")) ? dir : null;
23134
+ }
23135
+ var import_node_fs29, import_node_path31;
23136
+ var init_langwatch_nlp = __esm({
23137
+ "src/services/langwatch-nlp.ts"() {
23138
+ "use strict";
23139
+ import_node_fs29 = require("node:fs");
23140
+ import_node_path31 = require("node:path");
23141
+ init_app_dir();
23142
+ init_health();
23143
+ init_paths2();
23144
+ init_spawn();
23145
+ }
23146
+ });
23147
+
23074
23148
  // src/services/langwatch-workers.ts
23075
23149
  async function startLangwatchWorkers(ctx, bus, envFromFile) {
23076
23150
  bus.emit({ type: "starting", service: "workers" });
@@ -23220,18 +23294,18 @@ var init_migrate = __esm({
23220
23294
 
23221
23295
  // src/services/postgres.ts
23222
23296
  function postgresLayout(postgresBinPath) {
23223
- const binDir = (0, import_node_path31.dirname)(postgresBinPath);
23297
+ const binDir = (0, import_node_path32.dirname)(postgresBinPath);
23224
23298
  return {
23225
23299
  postgresBin: postgresBinPath,
23226
- initdb: (0, import_node_path31.join)(binDir, "initdb"),
23227
- pgCtl: (0, import_node_path31.join)(binDir, "pg_ctl"),
23228
- psql: (0, import_node_path31.join)(binDir, "psql"),
23229
- createdb: (0, import_node_path31.join)(binDir, "createdb")
23300
+ initdb: (0, import_node_path32.join)(binDir, "initdb"),
23301
+ pgCtl: (0, import_node_path32.join)(binDir, "pg_ctl"),
23302
+ psql: (0, import_node_path32.join)(binDir, "psql"),
23303
+ createdb: (0, import_node_path32.join)(binDir, "createdb")
23230
23304
  };
23231
23305
  }
23232
23306
  function pgEnv(resolvedPath, base = process.env) {
23233
- const libDir = (0, import_node_path31.join)((0, import_node_path31.dirname)((0, import_node_path31.dirname)(resolvedPath)), "lib");
23234
- if (!(0, import_node_fs29.existsSync)(libDir)) return base;
23307
+ const libDir = (0, import_node_path32.join)((0, import_node_path32.dirname)((0, import_node_path32.dirname)(resolvedPath)), "lib");
23308
+ if (!(0, import_node_fs30.existsSync)(libDir)) return base;
23235
23309
  const var_ = process.platform === "darwin" ? "DYLD_LIBRARY_PATH" : "LD_LIBRARY_PATH";
23236
23310
  const existing = base[var_];
23237
23311
  return {
@@ -23248,7 +23322,7 @@ async function startPostgres(ctx, bus) {
23248
23322
  const env3 = pgEnv(resolvedPath);
23249
23323
  const dataDir = ctx.paths.postgresData;
23250
23324
  const sp = servicePaths(ctx.paths);
23251
- if (!(0, import_node_fs29.existsSync)((0, import_node_path31.join)(dataDir, "PG_VERSION"))) {
23325
+ if (!(0, import_node_fs30.existsSync)((0, import_node_path32.join)(dataDir, "PG_VERSION"))) {
23252
23326
  await initdb(layout, dataDir, env3);
23253
23327
  }
23254
23328
  const handle = supervise({
@@ -23263,7 +23337,7 @@ async function startPostgres(ctx, bus) {
23263
23337
  "-h",
23264
23338
  "127.0.0.1",
23265
23339
  "-c",
23266
- "unix_socket_directories=" + (0, import_node_path31.dirname)(sp.pid("postgres")),
23340
+ "unix_socket_directories=" + (0, import_node_path32.dirname)(sp.pid("postgres")),
23267
23341
  "-c",
23268
23342
  "log_destination=stderr",
23269
23343
  "-c",
@@ -23291,7 +23365,7 @@ async function startPostgres(ctx, bus) {
23291
23365
  return handle;
23292
23366
  }
23293
23367
  async function initdb(layout, dataDir, env3) {
23294
- (0, import_node_fs29.mkdirSync)(dataDir, { recursive: true });
23368
+ (0, import_node_fs30.mkdirSync)(dataDir, { recursive: true });
23295
23369
  await execa(
23296
23370
  layout.initdb,
23297
23371
  ["-D", dataDir, "-U", DB_USER, "-A", "trust", "--no-locale", "--encoding=UTF8"],
@@ -23319,13 +23393,13 @@ async function ensureDatabase2(layout, port, env3) {
23319
23393
  { stdio: "ignore", env: env3 }
23320
23394
  );
23321
23395
  }
23322
- var import_node_fs29, import_node_path31, DB_USER, DB_NAME2;
23396
+ var import_node_fs30, import_node_path32, DB_USER, DB_NAME2;
23323
23397
  var init_postgres = __esm({
23324
23398
  "src/services/postgres.ts"() {
23325
23399
  "use strict";
23326
23400
  init_execa();
23327
- import_node_fs29 = require("node:fs");
23328
- import_node_path31 = require("node:path");
23401
+ import_node_fs30 = require("node:fs");
23402
+ import_node_path32 = require("node:path");
23329
23403
  init_health();
23330
23404
  init_paths2();
23331
23405
  init_spawn();
@@ -23371,8 +23445,8 @@ async function startRedis(ctx, bus) {
23371
23445
  return handle;
23372
23446
  }
23373
23447
  function writeRedisConf(path6, port, dataDir) {
23374
- (0, import_node_fs30.mkdirSync)((0, import_node_path32.dirname)(path6), { recursive: true });
23375
- (0, import_node_fs30.mkdirSync)(dataDir, { recursive: true });
23448
+ (0, import_node_fs31.mkdirSync)((0, import_node_path33.dirname)(path6), { recursive: true });
23449
+ (0, import_node_fs31.mkdirSync)(dataDir, { recursive: true });
23376
23450
  const lines = [
23377
23451
  `port ${port}`,
23378
23452
  "bind 127.0.0.1",
@@ -23386,14 +23460,14 @@ function writeRedisConf(path6, port, dataDir) {
23386
23460
  "maxmemory-policy allkeys-lru",
23387
23461
  ""
23388
23462
  ];
23389
- (0, import_node_fs30.writeFileSync)(path6, lines.join("\n"));
23463
+ (0, import_node_fs31.writeFileSync)(path6, lines.join("\n"));
23390
23464
  }
23391
- var import_node_fs30, import_node_path32;
23465
+ var import_node_fs31, import_node_path33;
23392
23466
  var init_redis = __esm({
23393
23467
  "src/services/redis.ts"() {
23394
23468
  "use strict";
23395
- import_node_fs30 = require("node:fs");
23396
- import_node_path32 = require("node:path");
23469
+ import_node_fs31 = require("node:fs");
23470
+ import_node_path33 = require("node:path");
23397
23471
  init_health();
23398
23472
  init_paths2();
23399
23473
  init_spawn();
@@ -23405,16 +23479,16 @@ async function syncVenvs(ctx, bus) {
23405
23479
  const uvBin = ctx.predeps.uv?.resolvedPath;
23406
23480
  if (!uvBin) throw new Error("uv predep not resolved \u2014 run install first");
23407
23481
  const sp = servicePaths(ctx.paths);
23408
- const specs = resolveVenvSpecs();
23482
+ const specs = resolveVenvSpecs(ctx);
23409
23483
  await Promise.all(
23410
23484
  specs.map(async (spec) => {
23411
23485
  const venvDir = sp.venv(spec.name);
23412
- const hashFile = (0, import_node_path33.join)(venvDir, ".lock-hash");
23486
+ const hashFile = (0, import_node_path34.join)(venvDir, ".lock-hash");
23413
23487
  const expected = `${hashFileSafely(spec.lockFile)}|extras=${(spec.extras ?? []).slice().sort().join(",")}`;
23414
- if ((0, import_node_fs31.existsSync)(venvDir) && readFileSafely(hashFile) === expected) return;
23488
+ if ((0, import_node_fs32.existsSync)(venvDir) && readFileSafely(hashFile) === expected) return;
23415
23489
  bus.emit({ type: "starting", service: `prepare:${spec.name}` });
23416
23490
  const start = Date.now();
23417
- (0, import_node_fs31.mkdirSync)(venvDir, { recursive: true });
23491
+ (0, import_node_fs32.mkdirSync)(venvDir, { recursive: true });
23418
23492
  const extraArgs = (spec.extras ?? []).flatMap((e) => ["--extra", e]);
23419
23493
  await execAndPipe(
23420
23494
  bus,
@@ -23428,18 +23502,18 @@ async function syncVenvs(ctx, bus) {
23428
23502
  }
23429
23503
  }
23430
23504
  );
23431
- (0, import_node_fs31.writeFileSync)(hashFile, expected);
23505
+ (0, import_node_fs32.writeFileSync)(hashFile, expected);
23432
23506
  bus.emit({ type: "healthy", service: `prepare:${spec.name}`, durationMs: Date.now() - start });
23433
23507
  })
23434
23508
  );
23435
23509
  }
23436
- function resolveVenvSpecs() {
23510
+ function resolveVenvSpecs(ctx) {
23437
23511
  const root2 = appRoot();
23438
- return [
23512
+ const specs = [
23439
23513
  {
23440
23514
  name: "langevals",
23441
- projectDir: (0, import_node_path33.join)(root2, "langevals"),
23442
- lockFile: (0, import_node_path33.join)(root2, "langevals", "uv.lock"),
23515
+ projectDir: (0, import_node_path34.join)(root2, "langevals"),
23516
+ lockFile: (0, import_node_path34.join)(root2, "langevals", "uv.lock"),
23443
23517
  // langevals's evaluator routes (ROUGE Score, exact match, llm-as-judge,
23444
23518
  // etc.) live in subpackages declared as optional dependencies in
23445
23519
  // langevals/pyproject.toml: langevals-ragas, langevals-openai,
@@ -23457,22 +23531,30 @@ function resolveVenvSpecs() {
23457
23531
  extras: ["all"]
23458
23532
  }
23459
23533
  ];
23534
+ if (ctx.nlpMode === "python") {
23535
+ specs.push({
23536
+ name: "langwatch_nlp",
23537
+ projectDir: (0, import_node_path34.join)(root2, "langwatch_nlp"),
23538
+ lockFile: (0, import_node_path34.join)(root2, "langwatch_nlp", "uv.lock")
23539
+ });
23540
+ }
23541
+ return specs;
23460
23542
  }
23461
23543
  function hashFileSafely(file) {
23462
- if (!(0, import_node_fs31.existsSync)(file)) return "missing";
23463
- return (0, import_node_crypto6.createHash)("sha256").update((0, import_node_fs31.readFileSync)(file)).digest("hex");
23544
+ if (!(0, import_node_fs32.existsSync)(file)) return "missing";
23545
+ return (0, import_node_crypto6.createHash)("sha256").update((0, import_node_fs32.readFileSync)(file)).digest("hex");
23464
23546
  }
23465
23547
  function readFileSafely(file) {
23466
- if (!(0, import_node_fs31.existsSync)(file)) return null;
23467
- return (0, import_node_fs31.readFileSync)(file, "utf8").trim();
23548
+ if (!(0, import_node_fs32.existsSync)(file)) return null;
23549
+ return (0, import_node_fs32.readFileSync)(file, "utf8").trim();
23468
23550
  }
23469
- var import_node_fs31, import_node_crypto6, import_node_path33;
23551
+ var import_node_fs32, import_node_crypto6, import_node_path34;
23470
23552
  var init_venvs = __esm({
23471
23553
  "src/services/venvs.ts"() {
23472
23554
  "use strict";
23473
- import_node_fs31 = require("node:fs");
23555
+ import_node_fs32 = require("node:fs");
23474
23556
  import_node_crypto6 = require("node:crypto");
23475
- import_node_path33 = require("node:path");
23557
+ import_node_path34 = require("node:path");
23476
23558
  init_app_dir();
23477
23559
  init_paths2();
23478
23560
  init_pipe_to_bus();
@@ -23515,6 +23597,7 @@ var init_runtime = __esm({
23515
23597
  init_event_bus();
23516
23598
  init_langevals();
23517
23599
  init_langwatch();
23600
+ init_langwatch_nlp();
23518
23601
  init_langwatch_workers();
23519
23602
  init_nlpgo();
23520
23603
  init_migrate();
@@ -23553,8 +23636,9 @@ var init_runtime = __esm({
23553
23636
  }
23554
23637
  const childEnv = { ...envFromFile, ...ctx.userEnv };
23555
23638
  try {
23639
+ const startNlp = ctx.nlpMode === "python" ? startLangwatchNlp : startNlpgo;
23556
23640
  const [nlp, langevals, gw, lw] = await Promise.all([
23557
- startNlpgo(ctx, bus, childEnv),
23641
+ startNlp(ctx, bus, childEnv),
23558
23642
  startLangevals(ctx, bus, childEnv),
23559
23643
  startAigateway(ctx, bus, envFromFile),
23560
23644
  startLangwatch(ctx, bus, childEnv)
@@ -24094,7 +24178,7 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
24094
24178
  var source_default = chalk;
24095
24179
 
24096
24180
  // src/cli.ts
24097
- var import_node_fs32 = require("node:fs");
24181
+ var import_node_fs33 = require("node:fs");
24098
24182
  var import_prompts3 = __toESM(require_prompts3(), 1);
24099
24183
 
24100
24184
  // src/animation/banner.ts
@@ -27049,7 +27133,7 @@ var placeholderRuntime = {
27049
27133
  };
27050
27134
 
27051
27135
  // src/cli.ts
27052
- var VERSION = true ? "3.2.0" : "0.0.0-dev";
27136
+ var VERSION = true ? "3.2.1" : "0.0.0-dev";
27053
27137
  async function loadRuntime() {
27054
27138
  try {
27055
27139
  const real = await Promise.resolve().then(() => (init_runtime(), runtime_exports));
@@ -27062,13 +27146,24 @@ async function loadRuntime() {
27062
27146
  }
27063
27147
  }
27064
27148
  function ensureEnvFile(ctx) {
27065
- return scaffoldEnvFile({ ports: ctx.ports, path: ctx.paths.envFile });
27149
+ return scaffoldEnvFile({ ports: ctx.ports, path: ctx.paths.envFile, nlpMode: ctx.nlpMode });
27150
+ }
27151
+ function parseNlpMode(raw) {
27152
+ if (raw === void 0 || raw === null || raw === "go") return "go";
27153
+ if (raw === "python") return "python";
27154
+ console.error(source_default.red(`\u2717 --nlp must be 'python' or 'go' (got: ${String(raw)})`));
27155
+ process.exit(2);
27066
27156
  }
27067
27157
  var program2 = new Command();
27068
27158
  program2.name("langwatch-server").description("Run LangWatch locally \u2014 postgres, redis, clickhouse, langwatch app, langwatch_nlp, langevals, ai-gateway").version(VERSION, "-v, --version");
27069
- program2.command("start", { isDefault: true }).description("install missing predeps, scaffold .env, start every service, open the browser").option("--port-base <n>", "first port slot to use", String(PORT_BASE_DEFAULT)).option("-y, --yes", "skip every confirmation prompt", false).option("--no-open", "do not auto-open the browser when ready").option("--bullboard", "expose the BullMQ dashboard on the bullboard infra slot", false).option("--dry-run", "print what would be done and exit (no installs, no env, no services)", false).action(async (opts) => {
27159
+ program2.command("start", { isDefault: true }).description("install missing predeps, scaffold .env, start every service, open the browser").option("--port-base <n>", "first port slot to use", String(PORT_BASE_DEFAULT)).option("-y, --yes", "skip every confirmation prompt", false).option("--no-open", "do not auto-open the browser when ready").option("--bullboard", "expose the BullMQ dashboard on the bullboard infra slot", false).option(
27160
+ "--nlp <runtime>",
27161
+ "NLP backend: 'go' (default, bundled monobinary) or 'python' (legacy langwatch_nlp via uv)",
27162
+ "go"
27163
+ ).option("--dry-run", "print what would be done and exit (no installs, no env, no services)", false).action(async (opts) => {
27070
27164
  detectPlatform();
27071
27165
  printBanner(VERSION);
27166
+ const nlpMode = parseNlpMode(opts.nlp);
27072
27167
  if (opts.dryRun) {
27073
27168
  const base2 = Number.parseInt(opts.portBase, 10);
27074
27169
  const ports2 = allocatePorts(base2);
@@ -27088,7 +27183,7 @@ program2.command("start", { isDefault: true }).description("install missing pred
27088
27183
  const base = Number.parseInt(opts.portBase, 10);
27089
27184
  const { base: resolvedBase } = await resolvePortConflicts({ base, yes: opts.yes });
27090
27185
  const ports = allocatePorts(resolvedBase);
27091
- if (!(0, import_node_fs32.existsSync)(paths.bin) && !(0, import_node_fs32.existsSync)(paths.installManifest)) {
27186
+ if (!(0, import_node_fs33.existsSync)(paths.bin) && !(0, import_node_fs33.existsSync)(paths.installManifest)) {
27092
27187
  console.log("");
27093
27188
  console.log(source_default.dim("Setting up ~/.langwatch for the first time, this may take a few minutes."));
27094
27189
  console.log(source_default.dim("Next runs will be much faster."));
@@ -27103,6 +27198,7 @@ program2.command("start", { isDefault: true }).description("install missing pred
27103
27198
  envFile: paths.envFile,
27104
27199
  version: VERSION,
27105
27200
  bullboard: Boolean(opts.bullboard),
27201
+ nlpMode,
27106
27202
  userEnv: captureUserEnv()
27107
27203
  };
27108
27204
  ensureEnvFile(ctx);
@@ -27166,9 +27262,14 @@ program2.command("doctor").description("check which predeps and services are ins
27166
27262
  const exitCode = missing === 0 && conflicts.conflicts.length === 0 ? 0 : 1;
27167
27263
  process.exit(exitCode);
27168
27264
  });
27169
- program2.command("install").description("install missing predeps and services without starting anything").option("-y, --yes", "skip confirmation", false).action(async (opts) => {
27265
+ program2.command("install").description("install missing predeps and services without starting anything").option("-y, --yes", "skip confirmation", false).option(
27266
+ "--nlp <runtime>",
27267
+ "NLP backend: 'go' (default, bundled monobinary) or 'python' (legacy langwatch_nlp via uv)",
27268
+ "go"
27269
+ ).action(async (opts) => {
27170
27270
  detectPlatform();
27171
27271
  printBanner(VERSION);
27272
+ const nlpMode = parseNlpMode(opts.nlp);
27172
27273
  await runPredeps({ yes: opts.yes, version: VERSION });
27173
27274
  const runtime2 = await loadRuntime();
27174
27275
  const base = PORT_BASE_DEFAULT;
@@ -27180,6 +27281,7 @@ program2.command("install").description("install missing predeps and services wi
27180
27281
  envFile: paths.envFile,
27181
27282
  version: VERSION,
27182
27283
  bullboard: false,
27284
+ nlpMode,
27183
27285
  userEnv: captureUserEnv()
27184
27286
  };
27185
27287
  ensureEnvFile(ctx);