@langwatch/server 3.1.0-beta.21 → 3.1.0-beta.22

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 (171) hide show
  1. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/__init__.py +36 -0
  2. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/_logger.py +165 -0
  3. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/batch_clustering.py +153 -0
  4. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/build_response.py +77 -0
  5. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/constants.py +7 -0
  6. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/incremental_clustering.py +325 -0
  7. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/topic_naming.py +432 -0
  8. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/types.py +42 -0
  9. package/langevals/evaluators/topic_clustering/langevals_topic_clustering/utils.py +191 -0
  10. package/langevals/evaluators/topic_clustering/pyproject.toml +52 -0
  11. package/langevals/evaluators/topic_clustering/tests/test_topic_clustering.py +239 -0
  12. package/langevals/evaluators/topic_clustering/tests/test_topic_clustering_integration.py +97 -0
  13. package/langevals/evaluators/topic_clustering/tests/test_topic_naming.py +72 -0
  14. package/langevals/langevals/pytest_plugins/pass_rate_plugin.py +7 -1
  15. package/langevals/langevals/server.py +28 -0
  16. package/langevals/pyproject.toml +3 -0
  17. package/langevals/uv.lock +119 -20
  18. package/langwatch/dist/client/assets/{AnnotationsTable-BDAkYaz6.js → AnnotationsTable-uS_9SQ-g.js} +2 -2
  19. package/langwatch/dist/client/assets/{BatchEvaluationSummary-DMaQM_VB.js → BatchEvaluationSummary-DtFd8yKJ.js} +2 -2
  20. package/langwatch/dist/client/assets/{BudgetEditDrawer-CHaqmdIl.js → BudgetEditDrawer-CHEPz0hH.js} +2 -2
  21. package/langwatch/dist/client/assets/{ChartCard-D14PUg_d.js → ChartCard-s5fMPo7b.js} +2 -2
  22. package/langwatch/dist/client/assets/{ChatWindow-CRDnlP-Q.js → ChatWindow-C0XSteVJ.js} +2 -2
  23. package/langwatch/dist/client/assets/ChatWindow-DFEmNXQL.js +1 -0
  24. package/langwatch/dist/client/assets/{ConfirmDialog-CXIhncvW.js → ConfirmDialog-M94yLNvP.js} +2 -2
  25. package/langwatch/dist/client/assets/{ContactSalesBlock-CijLBwRC.js → ContactSalesBlock-CnnuZ8iI.js} +2 -2
  26. package/langwatch/dist/client/assets/{DSPyExperiment-B1YOL2m8.js → DSPyExperiment-CMA6lrlx.js} +2 -2
  27. package/langwatch/dist/client/assets/{FilterDisplay-BB0xWrLn.js → FilterDisplay-0S3NqCkq.js} +2 -2
  28. package/langwatch/dist/client/assets/{FormatMoney-w9vr_h0X.js → FormatMoney-CCygtAHg.js} +2 -2
  29. package/langwatch/dist/client/assets/{FoundryDrawer-CdJDXtpz.js → FoundryDrawer-B35xZ26C.js} +2 -2
  30. package/langwatch/dist/client/assets/{GatewayErrorPanel-DvE9U2dS.js → GatewayErrorPanel-BsaYQEie.js} +2 -2
  31. package/langwatch/dist/client/assets/{GatewayLayout-lv1p_6B5.js → GatewayLayout-LvwwrwMf.js} +2 -2
  32. package/langwatch/dist/client/assets/{GraphsLayout-BJ68J9e-.js → GraphsLayout-DJ-HI9N1.js} +2 -2
  33. package/langwatch/dist/client/assets/{GroupBindingInputRow-DebZBCnD.js → GroupBindingInputRow-CV-fBkX9.js} +2 -2
  34. package/langwatch/dist/client/assets/{MessagesTable-B6lYde-x.js → MessagesTable-9taaKCOZ.js} +2 -2
  35. package/langwatch/dist/client/assets/{NavigationFooter-CiOVzDUh.js → NavigationFooter-Dzvauw3l.js} +2 -2
  36. package/langwatch/dist/client/assets/{NoDataInfoBlock-quSW_MRm.js → NoDataInfoBlock-CLKl_wlX.js} +2 -2
  37. package/langwatch/dist/client/assets/{OpsPageShell-DJ1WlI6-.js → OpsPageShell-C_mTziRS.js} +2 -2
  38. package/langwatch/dist/client/assets/{OptimizationStudio-BlozXjcN.js → OptimizationStudio-D2zpsmJj.js} +8 -12
  39. package/langwatch/dist/client/assets/{PreconditionsField-BOfcWvmZ.js → PreconditionsField-WXB8kcTK.js} +2 -2
  40. package/langwatch/dist/client/assets/{SettingsLayout-CLCGxMAe.js → SettingsLayout--1gdEuhv.js} +2 -2
  41. package/langwatch/dist/client/assets/{SubscriptionPage-J8b2Zaj6.js → SubscriptionPage-B0ox_4kM.js} +2 -2
  42. package/langwatch/dist/client/assets/{VirtualKeySecretReveal-DR1VDLy7.js → VirtualKeySecretReveal-CRbI1dKQ.js} +2 -2
  43. package/langwatch/dist/client/assets/{WithPermissionGuard-DD8uo3UK.js → WithPermissionGuard-B4Jo8E5-.js} +2 -2
  44. package/langwatch/dist/client/assets/{__...path__-BZVaIayJ.js → __...path__-BF2zkD84.js} +2 -2
  45. package/langwatch/dist/client/assets/{_experiment_-B1aT-wS3.js → _experiment_-D02aoVQk.js} +2 -2
  46. package/langwatch/dist/client/assets/{_id_-oI_eq-I_.js → _id_-Ch8YmTiM.js} +2 -2
  47. package/langwatch/dist/client/assets/{_id_-DAqPuO73.js → _id_-D6ZvwHpH.js} +2 -2
  48. package/langwatch/dist/client/assets/{_id_-DUngklVb.js → _id_-DOC1ZkBm.js} +2 -2
  49. package/langwatch/dist/client/assets/{_id_-jFDAfbob.js → _id_-DfWwW6_N.js} +2 -2
  50. package/langwatch/dist/client/assets/{_id_-BKBrWGG0.js → _id_-DxUo4W7J.js} +2 -2
  51. package/langwatch/dist/client/assets/_not-found-DDh108-i.js +1 -0
  52. package/langwatch/dist/client/assets/{_project_-Bt1tayHB.js → _project_-_UUt5Ar9.js} +2 -2
  53. package/langwatch/dist/client/assets/{_runId_-CfvnDt5H.js → _runId_-Dimwzp48.js} +2 -2
  54. package/langwatch/dist/client/assets/_slug_-BMvKBwS_.js +2 -0
  55. package/langwatch/dist/client/assets/{_slug_-DZAdl0QS.js → _slug_-CE6VoDSC.js} +2 -2
  56. package/langwatch/dist/client/assets/{_slug_-DmoWXjKT.js → _slug_-OiOLG1Mv.js} +2 -2
  57. package/langwatch/dist/client/assets/{_team_-DL_wKSWK.js → _team_-DKvmwO_5.js} +2 -2
  58. package/langwatch/dist/client/assets/{_workflow_-DcMXLPUe.js → _workflow_-FkilKiB-.js} +3 -3
  59. package/langwatch/dist/client/assets/{_workflow_-NI9bac7d.js → _workflow_-gJZppg3h.js} +2 -2
  60. package/langwatch/dist/client/assets/{access-audit-CFwNwusI.js → access-audit-xcUVYMMT.js} +2 -2
  61. package/langwatch/dist/client/assets/{agents-Di4XRwcn.js → agents-D32g91cu.js} +2 -2
  62. package/langwatch/dist/client/assets/{all-C273mlDB.js → all-vnREzDZj.js} +2 -2
  63. package/langwatch/dist/client/assets/{analytics-CEAcSf6B.js → analytics-DP6Y4Feh.js} +2 -2
  64. package/langwatch/dist/client/assets/{annotation-scores-CHfn4LQp.js → annotation-scores-CjD4CEB6.js} +2 -2
  65. package/langwatch/dist/client/assets/{annotations-CHZQrha6.js → annotations-1rVXiDRQ.js} +2 -2
  66. package/langwatch/dist/client/assets/{api-keys-BT7HExHM.js → api-keys-BJpKyuaz.js} +2 -2
  67. package/langwatch/dist/client/assets/{audit-log-BGk-51Dt.js → audit-log-BdUdZjxp.js} +2 -2
  68. package/langwatch/dist/client/assets/{authentication-DvwXfkp-.js → authentication-8mQB00CC.js} +2 -2
  69. package/langwatch/dist/client/assets/{authorize-tXpHrWyw.js → authorize-BpUueMNW.js} +2 -2
  70. package/langwatch/dist/client/assets/{authorize-CRu9xlpU.js → authorize-CbNBtmxW.js} +2 -2
  71. package/langwatch/dist/client/assets/{automations-CjDvz9Ak.js → automations-34KMkRxd.js} +2 -2
  72. package/langwatch/dist/client/assets/{billing-plans-FUqEPN62.js → billing-plans-BUQp08MI.js} +2 -2
  73. package/langwatch/dist/client/assets/{budgets-BV6_RHrs.js → budgets-CdelE8Hv.js} +2 -2
  74. package/langwatch/dist/client/assets/{cache-rules-CtYA79E_.js → cache-rules-D2m1QlNJ.js} +2 -2
  75. package/langwatch/dist/client/assets/choose-C0LdeUiH.js +2 -0
  76. package/langwatch/dist/client/assets/{command-bar-CaJygoez.js → command-bar-DUK45yin.js} +7 -9
  77. package/langwatch/dist/client/assets/custom-hBq2K4FJ.js +1 -0
  78. package/langwatch/dist/client/assets/{datasets-vLWpH84_.js → datasets-ErNNhmjg.js} +2 -2
  79. package/langwatch/dist/client/assets/{dejaview-DwVR3RGg.js → dejaview-BaD4_v90.js} +2 -2
  80. package/langwatch/dist/client/assets/{dist-SwV3YZv3.js → dist-Cds4Mqhj.js} +4 -6
  81. package/langwatch/dist/client/assets/{edit-CyxsmQmW.js → edit-DpT8ejBV.js} +2 -2
  82. package/langwatch/dist/client/assets/{evaluations-BfgeZMph.js → evaluations-BdQ2Dm2r.js} +2 -2
  83. package/langwatch/dist/client/assets/{evaluations-HSQIMvbX.js → evaluations-C90I4VAr.js} +2 -2
  84. package/langwatch/dist/client/assets/{evaluators-DLHVvnrh.js → evaluators-ig_ugRLt.js} +2 -2
  85. package/langwatch/dist/client/assets/{foundry-Ckq0WjPU.js → foundry-B-X_80pD.js} +2 -2
  86. package/langwatch/dist/client/assets/{gateway-CDSYPZ6w.js → gateway-CS_mtJx-.js} +2 -2
  87. package/langwatch/dist/client/assets/{groups-CCCRUqPj.js → groups-Bp90ChP3.js} +2 -2
  88. package/langwatch/dist/client/assets/{index-Bm6z2fM9.js → index-TNQ6uyis.js} +4 -4
  89. package/langwatch/dist/client/assets/{license-CHOarGWr.js → license-CgnlvyuI.js} +2 -2
  90. package/langwatch/dist/client/assets/{me-CBya_vXs.js → me-DEqhm_KC.js} +2 -2
  91. package/langwatch/dist/client/assets/{members-lIFLh-rh.js → members-CUJANDtH.js} +2 -2
  92. package/langwatch/dist/client/assets/{messages-CG9j8Dz8.js → messages-fQBfCjvp.js} +2 -2
  93. package/langwatch/dist/client/assets/{metrics-C9pzeaI6.js → metrics-DeIxebpD.js} +2 -2
  94. package/langwatch/dist/client/assets/{model-costs-Bc5uqjkl.js → model-costs-C1RbgK--.js} +2 -2
  95. package/langwatch/dist/client/assets/{model-providers-B5UjRgS_.js → model-providers-Pv3ML_-t.js} +2 -2
  96. package/langwatch/dist/client/assets/{my-queue-BkEfiWyR.js → my-queue-BLre2NMr.js} +2 -2
  97. package/langwatch/dist/client/assets/{ops-Cc-g-CMn.js → ops-CCw-FJaT.js} +2 -2
  98. package/langwatch/dist/client/assets/{organization-features-CoIKKHkQ.js → organization-features-rqg-75mI.js} +2 -2
  99. package/langwatch/dist/client/assets/{organizations-DWcQUTzi.js → organizations-DjCzIHVx.js} +2 -2
  100. package/langwatch/dist/client/assets/{persistence-CTQ44vGL.js → persistence-BPvHS0F6.js} +2 -2
  101. package/langwatch/dist/client/assets/{plans-Dq3eFg5K.js → plans-Ch2Ol-Fd.js} +2 -2
  102. package/langwatch/dist/client/assets/{projections-CTNj1QBM.js → projections-it4FOVjm.js} +2 -2
  103. package/langwatch/dist/client/assets/{projects-BxM7C87h.js → projects-CjWZFLfn.js} +2 -2
  104. package/langwatch/dist/client/assets/{prompts-DhXnJT6e.js → prompts-DilmFH_s.js} +2 -2
  105. package/langwatch/dist/client/assets/{providers-DW7VWdqq.js → providers-tlLT_lTF.js} +2 -2
  106. package/langwatch/dist/client/assets/{reports-D3QFKhNP.js → reports-vlrcTrLs.js} +2 -2
  107. package/langwatch/dist/client/assets/{roles-B_0t5DWA.js → roles-DNgi-NQ9.js} +2 -2
  108. package/langwatch/dist/client/assets/{scenarios-BX3XslU0.js → scenarios-BmG_wDkR.js} +2 -2
  109. package/langwatch/dist/client/assets/{scim-DDsLO39r.js → scim-BKr1_FHt.js} +2 -2
  110. package/langwatch/dist/client/assets/{secrets-BvEGwDCy.js → secrets-CU8ocTGv.js} +2 -2
  111. package/langwatch/dist/client/assets/{settings-9giNiAQQ.js → settings-CDzdoYVK.js} +2 -2
  112. package/langwatch/dist/client/assets/{setup-HxXKoVKG.js → setup-nEvn2rjN.js} +2 -2
  113. package/langwatch/dist/client/assets/{subscription-DhyswDze.js → subscription-BPNl_6jF.js} +3 -3
  114. package/langwatch/dist/client/assets/{subscriptions-Dyyau22a.js → subscriptions-D0G-OE5C.js} +2 -2
  115. package/langwatch/dist/client/assets/{teams-DRmeAxzf.js → teams-DThgDQvB.js} +2 -2
  116. package/langwatch/dist/client/assets/{textOverflowHeuristic-JibhpzDV.js → textOverflowHeuristic-DTC8-Ffx.js} +2 -2
  117. package/langwatch/dist/client/assets/{topic-clustering-Bllfw5rZ.js → topic-clustering-BR2Mbpao.js} +2 -2
  118. package/langwatch/dist/client/assets/{topics-CpiGYxqb.js → topics-CI8GoNqp.js} +2 -2
  119. package/langwatch/dist/client/assets/{traceExecutor-CiHXJB0V.js → traceExecutor-CDUGyUaw.js} +2 -2
  120. package/langwatch/dist/client/assets/{usage-BnsstwBY.js → usage-B4mR7ut_.js} +2 -2
  121. package/langwatch/dist/client/assets/{usage-CoyGtJoI.js → usage-C8fbffYi.js} +2 -2
  122. package/langwatch/dist/client/assets/{useAdminResource-SPC5iBHM.js → useAdminResource-SmnnHro6.js} +2 -2
  123. package/langwatch/dist/client/assets/{useAnnotationQueues-2DKZTC7r.js → useAnnotationQueues-CA6Vk--V.js} +2 -2
  124. package/langwatch/dist/client/assets/{useAvailableEvaluators-HndTl2LV.js → useAvailableEvaluators-hmbmcRQr.js} +2 -2
  125. package/langwatch/dist/client/assets/{useDeleteDatasetConfirmation-BgWN6Qqb.js → useDeleteDatasetConfirmation-BCK_zUUe.js} +2 -2
  126. package/langwatch/dist/client/assets/{useWorkflowStore-e1wFCvo2.js → useWorkflowStore-QUJ3J8X9.js} +2 -2
  127. package/langwatch/dist/client/assets/{users-C6wjliCC.js → users-CfhanCfR.js} +2 -2
  128. package/langwatch/dist/client/assets/{users-tF6ZKeV1.js → users-HjuN3o6k.js} +2 -2
  129. package/langwatch/dist/client/assets/{virtual-keys-BL-65S0B.js → virtual-keys-Bj-MhW66.js} +2 -2
  130. package/langwatch/dist/client/assets/{wizard-faGkpZDT.js → wizard-dRWCVVx6.js} +2 -2
  131. package/langwatch/dist/client/assets/{workbench-Oj0s_YR-.js → workbench-CuixH3G1.js} +2 -2
  132. package/langwatch/dist/client/assets/{workflows-Cu9k-Twu.js → workflows-BT6m4Yu9.js} +2 -2
  133. package/langwatch/dist/client/index.html +3 -3
  134. package/langwatch/scripts/seed-dogfood-password.ts +163 -0
  135. package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-evaluator.integration.test.ts +458 -0
  136. package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-routing.test.ts +180 -0
  137. package/langwatch/src/app/api/workflows/post_event/__tests__/post-event.integration.test.ts +274 -0
  138. package/langwatch/src/app/api/workflows/post_event/post-event.ts +29 -1
  139. package/langwatch/src/components/agents/AgentCodeEditorDrawer.tsx +4 -5
  140. package/langwatch/src/components/agents/__tests__/AgentCodeEditorDrawer.integration.test.tsx +40 -0
  141. package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/__tests__/code-execution-node.factory.unit.test.ts +47 -0
  142. package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/code-execution-node.factory.ts +2 -4
  143. package/langwatch/src/components/experiments/BatchEvaluationV2/BatchEvaluationV2EvaluationResults.tsx +6 -1
  144. package/langwatch/src/optimization_studio/__tests__/registry.test.ts +29 -1
  145. package/langwatch/src/optimization_studio/components/Optimize.tsx +17 -3
  146. package/langwatch/src/optimization_studio/components/properties/AgentPropertiesPanel.tsx +4 -5
  147. package/langwatch/src/optimization_studio/hooks/workflowStoreCore.ts +17 -6
  148. package/langwatch/src/optimization_studio/hooks/workflowStoreCore.unit.test.ts +42 -0
  149. package/langwatch/src/optimization_studio/registry.ts +2 -4
  150. package/langwatch/src/optimization_studio/server/lambda/index.ts +12 -2
  151. package/langwatch/src/server/api/routers/workflows.ts +18 -0
  152. package/langwatch/src/server/evaluations-v3/execution/workflowBuilder.ts +3 -2
  153. package/langwatch/src/server/evaluations-v3/services/__tests__/experiment-run.service.getRun-null.unit.test.ts +71 -0
  154. package/langwatch/src/server/evaluations-v3/services/experiment-run.service.ts +18 -9
  155. package/langwatch/src/server/modelProviders/utils.ts +11 -1
  156. package/langwatch/src/server/nlpgo/__tests__/nlpgoFetch.integration.test.ts +248 -0
  157. package/langwatch/src/server/nlpgo/nlpgoFetch.ts +142 -0
  158. package/langwatch/src/server/routes/__tests__/playground-proxy.integration.test.ts +242 -0
  159. package/langwatch/src/server/routes/playground.ts +11 -1
  160. package/langwatch/src/server/routes/workflows.ts +17 -0
  161. package/langwatch/src/server/topicClustering/topicClustering.ts +33 -8
  162. package/langwatch/src/server/workflows/runWorkflow.ts +10 -13
  163. package/langwatch_nlp/langwatch_nlp/topic_clustering/topic_naming.py +39 -32
  164. package/langwatch_nlp/scripts/entrypoint.sh +67 -0
  165. package/package.json +1 -1
  166. package/packages/server/dist/cli.cjs +67 -94
  167. package/langwatch/dist/client/assets/ChatWindow-DzB-tNlQ.js +0 -1
  168. package/langwatch/dist/client/assets/_not-found-PEUaWdF3.js +0 -1
  169. package/langwatch/dist/client/assets/_slug_-C-8AjsjC.js +0 -2
  170. package/langwatch/dist/client/assets/choose--PBky27o.js +0 -2
  171. package/langwatch/dist/client/assets/custom-CSiS1liN.js +0 -1
@@ -22052,7 +22052,7 @@ function allocatePorts(base = PORT_BASE_DEFAULT) {
22052
22052
  function portsToCheck(alloc) {
22053
22053
  return [
22054
22054
  { port: alloc.langwatch, label: "langwatch" },
22055
- { port: alloc.nlp, label: "langwatch_nlp" },
22055
+ { port: alloc.nlp, label: "nlpgo" },
22056
22056
  { port: alloc.langevals, label: "langevals" },
22057
22057
  { port: alloc.aigateway, label: "ai gateway" },
22058
22058
  { port: alloc.postgres, label: "postgres" },
@@ -22191,6 +22191,8 @@ function buildEnv({ ports, baseHost, overrides = {} }) {
22191
22191
  set("LW_GATEWAY_BASE_URL", host);
22192
22192
  sectionBreak("ENVIRONMENT");
22193
22193
  set("ENVIRONMENT", "local");
22194
+ sectionBreak("FEATURE FLAGS");
22195
+ set("FEATURE_FLAG_FORCE_ENABLE", "release_nlp_go_engine_enabled");
22194
22196
  sectionBreak("MODELS \u2014 fill in any provider you want to evaluate against");
22195
22197
  set("OPENAI_API_KEY", "");
22196
22198
  set("ANTHROPIC_API_KEY", "");
@@ -23085,71 +23087,49 @@ var init_langwatch_workers = __esm({
23085
23087
  }
23086
23088
  });
23087
23089
 
23088
- // src/services/langwatch-nlp.ts
23089
- async function startLangwatchNlp(ctx, bus, envFromFile) {
23090
- bus.emit({ type: "starting", service: "langwatch_nlp" });
23090
+ // src/services/nlpgo.ts
23091
+ async function startNlpgo(ctx, bus, envFromFile) {
23092
+ bus.emit({ type: "starting", service: "nlpgo" });
23091
23093
  const start = Date.now();
23092
- const uvBin = ctx.predeps.uv?.resolvedPath;
23093
- if (!uvBin) throw new Error("uv predep not resolved");
23094
+ const binary = ctx.predeps.aigateway?.resolvedPath;
23095
+ if (!binary) throw new Error("aigateway/nlpgo monobinary predep not resolved");
23094
23096
  const sp = servicePaths(ctx.paths);
23095
- const venvDir = sp.venv("langwatch_nlp");
23096
- const projectDir = locateProject2("langwatch_nlp");
23097
- if (!projectDir) throw new Error("langwatch_nlp project dir not found");
23098
23097
  const handle = supervise({
23099
23098
  spec: {
23100
- name: "langwatch_nlp",
23101
- command: uvBin,
23102
- args: [
23103
- "run",
23104
- "--project",
23105
- projectDir,
23106
- "--no-sync",
23107
- "uvicorn",
23108
- "langwatch_nlp.main:app",
23109
- "--host",
23110
- "127.0.0.1",
23111
- "--port",
23112
- String(ctx.ports.nlp),
23113
- "--timeout-keep-alive",
23114
- "70"
23115
- ],
23099
+ name: "nlpgo",
23100
+ command: binary,
23101
+ args: ["nlpgo"],
23116
23102
  env: {
23117
23103
  ...process.env,
23118
23104
  ...envFromFile,
23119
- UV_PROJECT_ENVIRONMENT: venvDir,
23120
- PORT: String(ctx.ports.nlp)
23121
- },
23122
- cwd: projectDir
23105
+ SERVER_ADDR: `:${ctx.ports.nlp}`,
23106
+ // Go-only mode: no Python child, no proxy fallback.
23107
+ NLPGO_CHILD_BYPASS: "true",
23108
+ NLPGO_CHILD_UPSTREAM_URL: "",
23109
+ // Engine pointer back to the langwatch app for evaluator +
23110
+ // agent-workflow callbacks. /api/* routes terminate inside the
23111
+ // langwatch process.
23112
+ NLPGO_ENGINE_LANGWATCH_BASE_URL: `http://127.0.0.1:${ctx.ports.langwatch}`,
23113
+ LOG_FORMAT: "pretty"
23114
+ }
23123
23115
  },
23124
23116
  paths: sp,
23125
23117
  bus
23126
23118
  });
23127
23119
  const ready = await pollUntilHealthy({
23128
- // 120s — uvicorn boot + LiteLLM proxy init + 4-worker ProcessPool spawn
23129
- // can hit ~50-60s on a cold cache, and a parallel dogfood run pushed
23130
- // it past the previous 60s ceiling. langevals already polls a similar
23131
- // service, but its app surface is smaller and starts faster.
23132
- check: httpGetCheck(`http://127.0.0.1:${ctx.ports.nlp}/health`),
23133
- timeoutMs: 12e4
23120
+ check: httpGetCheck(`http://127.0.0.1:${ctx.ports.nlp}/healthz`),
23121
+ timeoutMs: 3e4
23134
23122
  });
23135
23123
  if (!ready.ok) {
23136
23124
  await handle.stop();
23137
- throw new Error(`langwatch_nlp did not become healthy: ${ready.reason}`);
23125
+ throw new Error(`nlpgo did not become healthy: ${ready.reason}`);
23138
23126
  }
23139
- bus.emit({ type: "healthy", service: "langwatch_nlp", durationMs: Date.now() - start });
23127
+ bus.emit({ type: "healthy", service: "nlpgo", durationMs: Date.now() - start });
23140
23128
  return handle;
23141
23129
  }
23142
- function locateProject2(name) {
23143
- const dir = (0, import_node_path31.join)(appRoot(), name);
23144
- return (0, import_node_fs29.existsSync)((0, import_node_path31.join)(dir, "pyproject.toml")) ? dir : null;
23145
- }
23146
- var import_node_fs29, import_node_path31;
23147
- var init_langwatch_nlp = __esm({
23148
- "src/services/langwatch-nlp.ts"() {
23130
+ var init_nlpgo = __esm({
23131
+ "src/services/nlpgo.ts"() {
23149
23132
  "use strict";
23150
- import_node_fs29 = require("node:fs");
23151
- import_node_path31 = require("node:path");
23152
- init_app_dir();
23153
23133
  init_health();
23154
23134
  init_paths2();
23155
23135
  init_spawn();
@@ -23195,18 +23175,18 @@ var init_migrate = __esm({
23195
23175
 
23196
23176
  // src/services/postgres.ts
23197
23177
  function postgresLayout(postgresBinPath) {
23198
- const binDir = (0, import_node_path32.dirname)(postgresBinPath);
23178
+ const binDir = (0, import_node_path31.dirname)(postgresBinPath);
23199
23179
  return {
23200
23180
  postgresBin: postgresBinPath,
23201
- initdb: (0, import_node_path32.join)(binDir, "initdb"),
23202
- pgCtl: (0, import_node_path32.join)(binDir, "pg_ctl"),
23203
- psql: (0, import_node_path32.join)(binDir, "psql"),
23204
- createdb: (0, import_node_path32.join)(binDir, "createdb")
23181
+ initdb: (0, import_node_path31.join)(binDir, "initdb"),
23182
+ pgCtl: (0, import_node_path31.join)(binDir, "pg_ctl"),
23183
+ psql: (0, import_node_path31.join)(binDir, "psql"),
23184
+ createdb: (0, import_node_path31.join)(binDir, "createdb")
23205
23185
  };
23206
23186
  }
23207
23187
  function pgEnv(resolvedPath, base = process.env) {
23208
- const libDir = (0, import_node_path32.join)((0, import_node_path32.dirname)((0, import_node_path32.dirname)(resolvedPath)), "lib");
23209
- if (!(0, import_node_fs30.existsSync)(libDir)) return base;
23188
+ const libDir = (0, import_node_path31.join)((0, import_node_path31.dirname)((0, import_node_path31.dirname)(resolvedPath)), "lib");
23189
+ if (!(0, import_node_fs29.existsSync)(libDir)) return base;
23210
23190
  const var_ = process.platform === "darwin" ? "DYLD_LIBRARY_PATH" : "LD_LIBRARY_PATH";
23211
23191
  const existing = base[var_];
23212
23192
  return {
@@ -23223,7 +23203,7 @@ async function startPostgres(ctx, bus) {
23223
23203
  const env3 = pgEnv(resolvedPath);
23224
23204
  const dataDir = ctx.paths.postgresData;
23225
23205
  const sp = servicePaths(ctx.paths);
23226
- if (!(0, import_node_fs30.existsSync)((0, import_node_path32.join)(dataDir, "PG_VERSION"))) {
23206
+ if (!(0, import_node_fs29.existsSync)((0, import_node_path31.join)(dataDir, "PG_VERSION"))) {
23227
23207
  await initdb(layout, dataDir, env3);
23228
23208
  }
23229
23209
  const handle = supervise({
@@ -23238,7 +23218,7 @@ async function startPostgres(ctx, bus) {
23238
23218
  "-h",
23239
23219
  "127.0.0.1",
23240
23220
  "-c",
23241
- "unix_socket_directories=" + (0, import_node_path32.dirname)(sp.pid("postgres")),
23221
+ "unix_socket_directories=" + (0, import_node_path31.dirname)(sp.pid("postgres")),
23242
23222
  "-c",
23243
23223
  "log_destination=stderr",
23244
23224
  "-c",
@@ -23266,7 +23246,7 @@ async function startPostgres(ctx, bus) {
23266
23246
  return handle;
23267
23247
  }
23268
23248
  async function initdb(layout, dataDir, env3) {
23269
- (0, import_node_fs30.mkdirSync)(dataDir, { recursive: true });
23249
+ (0, import_node_fs29.mkdirSync)(dataDir, { recursive: true });
23270
23250
  await execa(
23271
23251
  layout.initdb,
23272
23252
  ["-D", dataDir, "-U", DB_USER, "-A", "trust", "--no-locale", "--encoding=UTF8"],
@@ -23294,13 +23274,13 @@ async function ensureDatabase2(layout, port, env3) {
23294
23274
  { stdio: "ignore", env: env3 }
23295
23275
  );
23296
23276
  }
23297
- var import_node_fs30, import_node_path32, DB_USER, DB_NAME2;
23277
+ var import_node_fs29, import_node_path31, DB_USER, DB_NAME2;
23298
23278
  var init_postgres = __esm({
23299
23279
  "src/services/postgres.ts"() {
23300
23280
  "use strict";
23301
23281
  init_execa();
23302
- import_node_fs30 = require("node:fs");
23303
- import_node_path32 = require("node:path");
23282
+ import_node_fs29 = require("node:fs");
23283
+ import_node_path31 = require("node:path");
23304
23284
  init_health();
23305
23285
  init_paths2();
23306
23286
  init_spawn();
@@ -23317,7 +23297,7 @@ async function startRedis(ctx, bus) {
23317
23297
  if (!resolvedPath) throw new Error("redis predep not resolved \u2014 run install first");
23318
23298
  const sp = servicePaths(ctx.paths);
23319
23299
  const conf = sp.redisConf;
23320
- if (!(0, import_node_fs31.existsSync)(conf)) writeRedisConf(conf, ctx.ports.redis, ctx.paths.redisData);
23300
+ if (!(0, import_node_fs30.existsSync)(conf)) writeRedisConf(conf, ctx.ports.redis, ctx.paths.redisData);
23321
23301
  const handle = supervise({
23322
23302
  spec: {
23323
23303
  name: "redis",
@@ -23346,8 +23326,8 @@ async function startRedis(ctx, bus) {
23346
23326
  return handle;
23347
23327
  }
23348
23328
  function writeRedisConf(path6, port, dataDir) {
23349
- (0, import_node_fs31.mkdirSync)((0, import_node_path33.dirname)(path6), { recursive: true });
23350
- (0, import_node_fs31.mkdirSync)(dataDir, { recursive: true });
23329
+ (0, import_node_fs30.mkdirSync)((0, import_node_path32.dirname)(path6), { recursive: true });
23330
+ (0, import_node_fs30.mkdirSync)(dataDir, { recursive: true });
23351
23331
  const lines = [
23352
23332
  `port ${port}`,
23353
23333
  "bind 127.0.0.1",
@@ -23361,14 +23341,14 @@ function writeRedisConf(path6, port, dataDir) {
23361
23341
  "maxmemory-policy allkeys-lru",
23362
23342
  ""
23363
23343
  ];
23364
- (0, import_node_fs31.writeFileSync)(path6, lines.join("\n"));
23344
+ (0, import_node_fs30.writeFileSync)(path6, lines.join("\n"));
23365
23345
  }
23366
- var import_node_fs31, import_node_path33;
23346
+ var import_node_fs30, import_node_path32;
23367
23347
  var init_redis = __esm({
23368
23348
  "src/services/redis.ts"() {
23369
23349
  "use strict";
23370
- import_node_fs31 = require("node:fs");
23371
- import_node_path33 = require("node:path");
23350
+ import_node_fs30 = require("node:fs");
23351
+ import_node_path32 = require("node:path");
23372
23352
  init_health();
23373
23353
  init_paths2();
23374
23354
  init_spawn();
@@ -23384,12 +23364,12 @@ async function syncVenvs(ctx, bus) {
23384
23364
  await Promise.all(
23385
23365
  specs.map(async (spec) => {
23386
23366
  const venvDir = sp.venv(spec.name);
23387
- const hashFile = (0, import_node_path34.join)(venvDir, ".lock-hash");
23367
+ const hashFile = (0, import_node_path33.join)(venvDir, ".lock-hash");
23388
23368
  const expected = `${hashFileSafely(spec.lockFile)}|extras=${(spec.extras ?? []).slice().sort().join(",")}`;
23389
- if ((0, import_node_fs32.existsSync)(venvDir) && readFileSafely(hashFile) === expected) return;
23369
+ if ((0, import_node_fs31.existsSync)(venvDir) && readFileSafely(hashFile) === expected) return;
23390
23370
  bus.emit({ type: "starting", service: `prepare:${spec.name}` });
23391
23371
  const start = Date.now();
23392
- (0, import_node_fs32.mkdirSync)(venvDir, { recursive: true });
23372
+ (0, import_node_fs31.mkdirSync)(venvDir, { recursive: true });
23393
23373
  const extraArgs = (spec.extras ?? []).flatMap((e) => ["--extra", e]);
23394
23374
  await execAndPipe(
23395
23375
  bus,
@@ -23403,7 +23383,7 @@ async function syncVenvs(ctx, bus) {
23403
23383
  }
23404
23384
  }
23405
23385
  );
23406
- (0, import_node_fs32.writeFileSync)(hashFile, expected);
23386
+ (0, import_node_fs31.writeFileSync)(hashFile, expected);
23407
23387
  bus.emit({ type: "healthy", service: `prepare:${spec.name}`, durationMs: Date.now() - start });
23408
23388
  })
23409
23389
  );
@@ -23411,15 +23391,10 @@ async function syncVenvs(ctx, bus) {
23411
23391
  function resolveVenvSpecs() {
23412
23392
  const root2 = appRoot();
23413
23393
  return [
23414
- {
23415
- name: "langwatch_nlp",
23416
- projectDir: (0, import_node_path34.join)(root2, "langwatch_nlp"),
23417
- lockFile: (0, import_node_path34.join)(root2, "langwatch_nlp", "uv.lock")
23418
- },
23419
23394
  {
23420
23395
  name: "langevals",
23421
- projectDir: (0, import_node_path34.join)(root2, "langevals"),
23422
- lockFile: (0, import_node_path34.join)(root2, "langevals", "uv.lock"),
23396
+ projectDir: (0, import_node_path33.join)(root2, "langevals"),
23397
+ lockFile: (0, import_node_path33.join)(root2, "langevals", "uv.lock"),
23423
23398
  // langevals's evaluator routes (ROUGE Score, exact match, llm-as-judge,
23424
23399
  // etc.) live in subpackages declared as optional dependencies in
23425
23400
  // langevals/pyproject.toml: langevals-ragas, langevals-openai,
@@ -23439,20 +23414,20 @@ function resolveVenvSpecs() {
23439
23414
  ];
23440
23415
  }
23441
23416
  function hashFileSafely(file) {
23442
- if (!(0, import_node_fs32.existsSync)(file)) return "missing";
23443
- return (0, import_node_crypto6.createHash)("sha256").update((0, import_node_fs32.readFileSync)(file)).digest("hex");
23417
+ if (!(0, import_node_fs31.existsSync)(file)) return "missing";
23418
+ return (0, import_node_crypto6.createHash)("sha256").update((0, import_node_fs31.readFileSync)(file)).digest("hex");
23444
23419
  }
23445
23420
  function readFileSafely(file) {
23446
- if (!(0, import_node_fs32.existsSync)(file)) return null;
23447
- return (0, import_node_fs32.readFileSync)(file, "utf8").trim();
23421
+ if (!(0, import_node_fs31.existsSync)(file)) return null;
23422
+ return (0, import_node_fs31.readFileSync)(file, "utf8").trim();
23448
23423
  }
23449
- var import_node_fs32, import_node_crypto6, import_node_path34;
23424
+ var import_node_fs31, import_node_crypto6, import_node_path33;
23450
23425
  var init_venvs = __esm({
23451
23426
  "src/services/venvs.ts"() {
23452
23427
  "use strict";
23453
- import_node_fs32 = require("node:fs");
23428
+ import_node_fs31 = require("node:fs");
23454
23429
  import_node_crypto6 = require("node:crypto");
23455
- import_node_path34 = require("node:path");
23430
+ import_node_path33 = require("node:path");
23456
23431
  init_app_dir();
23457
23432
  init_paths2();
23458
23433
  init_pipe_to_bus();
@@ -23496,7 +23471,7 @@ var init_runtime = __esm({
23496
23471
  init_langevals();
23497
23472
  init_langwatch();
23498
23473
  init_langwatch_workers();
23499
- init_langwatch_nlp();
23474
+ init_nlpgo();
23500
23475
  init_migrate();
23501
23476
  init_node_deps();
23502
23477
  init_postgres();
@@ -23534,7 +23509,7 @@ var init_runtime = __esm({
23534
23509
  const childEnv = { ...envFromFile, ...ctx.userEnv };
23535
23510
  try {
23536
23511
  const [nlp, langevals, gw, lw] = await Promise.all([
23537
- startLangwatchNlp(ctx, bus, childEnv),
23512
+ startNlpgo(ctx, bus, childEnv),
23538
23513
  startLangevals(ctx, bus, childEnv),
23539
23514
  startAigateway(ctx, bus, envFromFile),
23540
23515
  startLangwatch(ctx, bus, childEnv)
@@ -24074,7 +24049,7 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
24074
24049
  var source_default = chalk;
24075
24050
 
24076
24051
  // src/cli.ts
24077
- var import_node_fs33 = require("node:fs");
24052
+ var import_node_fs32 = require("node:fs");
24078
24053
  var import_prompts3 = __toESM(require_prompts3(), 1);
24079
24054
 
24080
24055
  // src/animation/banner.ts
@@ -24153,8 +24128,7 @@ async function openBrowser(url) {
24153
24128
  var COLORS2 = {
24154
24129
  langwatch: source_default.green,
24155
24130
  workers: source_default.bold.green,
24156
- langwatch_nlp: source_default.cyan,
24157
- nlp: source_default.cyan,
24131
+ nlpgo: source_default.cyan,
24158
24132
  langevals: source_default.magenta,
24159
24133
  aigateway: source_default.yellow,
24160
24134
  postgres: source_default.dim,
@@ -24163,7 +24137,6 @@ var COLORS2 = {
24163
24137
  bullboard: source_default.gray,
24164
24138
  "prepare:app": source_default.blue,
24165
24139
  "prepare:langwatch": source_default.green,
24166
- "prepare:langwatch_nlp": source_default.cyan,
24167
24140
  "prepare:langevals": source_default.magenta,
24168
24141
  "migrate:prisma": source_default.dim,
24169
24142
  "migrate:clickhouse": source_default.dim
@@ -26820,7 +26793,7 @@ async function confirmUvInstallPrompt() {
26820
26793
  { onCancel: () => process.exit(130) }
26821
26794
  );
26822
26795
  if (!ok) {
26823
- console.error(source_default.red("Aborted \u2014 `uv` is required to run langwatch_nlp + langevals."));
26796
+ console.error(source_default.red("Aborted \u2014 `uv` is required to run langevals."));
26824
26797
  process.exit(1);
26825
26798
  }
26826
26799
  }
@@ -27027,7 +27000,7 @@ var placeholderRuntime = {
27027
27000
  };
27028
27001
 
27029
27002
  // src/cli.ts
27030
- var VERSION = true ? "3.1.0-beta.21" : "0.0.0-dev";
27003
+ var VERSION = true ? "3.1.0-beta.22" : "0.0.0-dev";
27031
27004
  async function loadRuntime() {
27032
27005
  try {
27033
27006
  const real = await Promise.resolve().then(() => (init_runtime(), runtime_exports));
@@ -27066,7 +27039,7 @@ program2.command("start", { isDefault: true }).description("install missing pred
27066
27039
  const base = Number.parseInt(opts.portBase, 10);
27067
27040
  const { base: resolvedBase } = await resolvePortConflicts({ base, yes: opts.yes });
27068
27041
  const ports = allocatePorts(resolvedBase);
27069
- if (!(0, import_node_fs33.existsSync)(paths.bin) && !(0, import_node_fs33.existsSync)(paths.installManifest)) {
27042
+ if (!(0, import_node_fs32.existsSync)(paths.bin) && !(0, import_node_fs32.existsSync)(paths.installManifest)) {
27070
27043
  console.log("");
27071
27044
  console.log(source_default.dim("Setting up ~/.langwatch for the first time, this may take a few minutes."));
27072
27045
  console.log(source_default.dim("Next runs will be much faster."));
@@ -1 +0,0 @@
1
- import{t as e}from"./ChatWindow-CRDnlP-Q.js";export{e as ChatBox};
@@ -1 +0,0 @@
1
- import{t as e}from"./index-Bm6z2fM9.js";export{e as default};
@@ -1,2 +0,0 @@
1
- import e from"./wizard-faGkpZDT.js";var t=e;export{t as default};
2
- //# sourceMappingURL=_slug_-C-8AjsjC.js.map
@@ -1,2 +0,0 @@
1
- import e from"./edit-CyxsmQmW.js";var t=e;export{t as default};
2
- //# sourceMappingURL=choose--PBky27o.js.map
@@ -1 +0,0 @@
1
- import{cn as e,ln as t,sn as n}from"./command-bar-CaJygoez.js";export{e as customGraphFormToCustomGraphInput,t as customGraphInputToFormData,n as default};