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

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 (179) 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-COI3ShsR.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-BEjGS0kI.js} +5 -5
  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/dist/scenario-child-process.js +20 -10
  135. package/langwatch/package.json +2 -2
  136. package/langwatch/pnpm-lock.yaml +329 -328
  137. package/langwatch/scripts/seed-dogfood-password.ts +163 -0
  138. package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-evaluator.integration.test.ts +458 -0
  139. package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-routing.test.ts +188 -0
  140. package/langwatch/src/app/api/workflows/post_event/__tests__/post-event.integration.test.ts +274 -0
  141. package/langwatch/src/app/api/workflows/post_event/post-event.ts +29 -1
  142. package/langwatch/src/components/agents/AgentCodeEditorDrawer.tsx +4 -5
  143. package/langwatch/src/components/agents/__tests__/AgentCodeEditorDrawer.integration.test.tsx +40 -0
  144. package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/__tests__/code-execution-node.factory.unit.test.ts +47 -0
  145. package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/code-execution-node.factory.ts +2 -4
  146. package/langwatch/src/components/experiments/BatchEvaluationV2/BatchEvaluationV2EvaluationResults.tsx +6 -1
  147. package/langwatch/src/hooks/usePostHog.ts +11 -0
  148. package/langwatch/src/optimization_studio/__tests__/registry.test.ts +29 -1
  149. package/langwatch/src/optimization_studio/components/Optimize.tsx +17 -3
  150. package/langwatch/src/optimization_studio/components/properties/AgentPropertiesPanel.tsx +4 -5
  151. package/langwatch/src/optimization_studio/hooks/workflowStoreCore.ts +17 -6
  152. package/langwatch/src/optimization_studio/hooks/workflowStoreCore.unit.test.ts +42 -0
  153. package/langwatch/src/optimization_studio/registry.ts +2 -4
  154. package/langwatch/src/optimization_studio/server/lambda/index.ts +12 -2
  155. package/langwatch/src/server/api/routers/workflows.ts +18 -0
  156. package/langwatch/src/server/evaluations-v3/execution/workflowBuilder.ts +3 -2
  157. package/langwatch/src/server/evaluations-v3/services/__tests__/experiment-run.service.getRun-null.unit.test.ts +71 -0
  158. package/langwatch/src/server/evaluations-v3/services/experiment-run.service.ts +18 -9
  159. package/langwatch/src/server/modelProviders/utils.ts +11 -1
  160. package/langwatch/src/server/nlpgo/__tests__/nlpgoFetch.integration.test.ts +248 -0
  161. package/langwatch/src/server/nlpgo/nlpgoFetch.ts +155 -0
  162. package/langwatch/src/server/routes/__tests__/playground-proxy.integration.test.ts +242 -0
  163. package/langwatch/src/server/routes/playground.ts +11 -1
  164. package/langwatch/src/server/routes/workflows.ts +17 -0
  165. package/langwatch/src/server/topicClustering/topicClustering.ts +33 -8
  166. package/langwatch/src/server/workflows/runWorkflow.ts +10 -13
  167. package/langwatch_nlp/langwatch_nlp/studio/execute/execute_component.py +25 -1
  168. package/langwatch_nlp/langwatch_nlp/studio/parser.py +121 -16
  169. package/langwatch_nlp/langwatch_nlp/topic_clustering/topic_naming.py +39 -32
  170. package/langwatch_nlp/scripts/entrypoint.sh +67 -0
  171. package/langwatch_nlp/tests/studio/test_parse.py +198 -0
  172. package/mcp-server/pnpm-lock.yaml +15 -21
  173. package/package.json +1 -1
  174. package/packages/server/dist/cli.cjs +78 -94
  175. package/langwatch/dist/client/assets/ChatWindow-DzB-tNlQ.js +0 -1
  176. package/langwatch/dist/client/assets/_not-found-PEUaWdF3.js +0 -1
  177. package/langwatch/dist/client/assets/_slug_-C-8AjsjC.js +0 -2
  178. package/langwatch/dist/client/assets/choose--PBky27o.js +0 -2
  179. 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,60 @@ 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
+ // OTel exporter target — nlpgo's configureNLPGoOTel reads this
23114
+ // (preferred) or OTEL_OTLP_ENDPOINT (fallback) and appends
23115
+ // /api/otel/v1/traces. With MultiTenant=true (hardcoded in
23116
+ // nlpgo's deps.go), the per-tenant tenant_router pulls
23117
+ // workflow.api_key from the request context and authenticates
23118
+ // each batch as the right project — no static auth header
23119
+ // needed from this side. envFromFile already carries this var
23120
+ // (see shared/env.ts), but we set it explicitly here so an
23121
+ // older ~/.langwatch/.env that pre-dates the variable still
23122
+ // gets the right value at boot.
23123
+ LANGWATCH_ENDPOINT: `http://127.0.0.1:${ctx.ports.langwatch}`,
23124
+ LOG_FORMAT: "pretty"
23125
+ }
23123
23126
  },
23124
23127
  paths: sp,
23125
23128
  bus
23126
23129
  });
23127
23130
  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
23131
+ check: httpGetCheck(`http://127.0.0.1:${ctx.ports.nlp}/healthz`),
23132
+ timeoutMs: 3e4
23134
23133
  });
23135
23134
  if (!ready.ok) {
23136
23135
  await handle.stop();
23137
- throw new Error(`langwatch_nlp did not become healthy: ${ready.reason}`);
23136
+ throw new Error(`nlpgo did not become healthy: ${ready.reason}`);
23138
23137
  }
23139
- bus.emit({ type: "healthy", service: "langwatch_nlp", durationMs: Date.now() - start });
23138
+ bus.emit({ type: "healthy", service: "nlpgo", durationMs: Date.now() - start });
23140
23139
  return handle;
23141
23140
  }
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"() {
23141
+ var init_nlpgo = __esm({
23142
+ "src/services/nlpgo.ts"() {
23149
23143
  "use strict";
23150
- import_node_fs29 = require("node:fs");
23151
- import_node_path31 = require("node:path");
23152
- init_app_dir();
23153
23144
  init_health();
23154
23145
  init_paths2();
23155
23146
  init_spawn();
@@ -23195,18 +23186,18 @@ var init_migrate = __esm({
23195
23186
 
23196
23187
  // src/services/postgres.ts
23197
23188
  function postgresLayout(postgresBinPath) {
23198
- const binDir = (0, import_node_path32.dirname)(postgresBinPath);
23189
+ const binDir = (0, import_node_path31.dirname)(postgresBinPath);
23199
23190
  return {
23200
23191
  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")
23192
+ initdb: (0, import_node_path31.join)(binDir, "initdb"),
23193
+ pgCtl: (0, import_node_path31.join)(binDir, "pg_ctl"),
23194
+ psql: (0, import_node_path31.join)(binDir, "psql"),
23195
+ createdb: (0, import_node_path31.join)(binDir, "createdb")
23205
23196
  };
23206
23197
  }
23207
23198
  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;
23199
+ const libDir = (0, import_node_path31.join)((0, import_node_path31.dirname)((0, import_node_path31.dirname)(resolvedPath)), "lib");
23200
+ if (!(0, import_node_fs29.existsSync)(libDir)) return base;
23210
23201
  const var_ = process.platform === "darwin" ? "DYLD_LIBRARY_PATH" : "LD_LIBRARY_PATH";
23211
23202
  const existing = base[var_];
23212
23203
  return {
@@ -23223,7 +23214,7 @@ async function startPostgres(ctx, bus) {
23223
23214
  const env3 = pgEnv(resolvedPath);
23224
23215
  const dataDir = ctx.paths.postgresData;
23225
23216
  const sp = servicePaths(ctx.paths);
23226
- if (!(0, import_node_fs30.existsSync)((0, import_node_path32.join)(dataDir, "PG_VERSION"))) {
23217
+ if (!(0, import_node_fs29.existsSync)((0, import_node_path31.join)(dataDir, "PG_VERSION"))) {
23227
23218
  await initdb(layout, dataDir, env3);
23228
23219
  }
23229
23220
  const handle = supervise({
@@ -23238,7 +23229,7 @@ async function startPostgres(ctx, bus) {
23238
23229
  "-h",
23239
23230
  "127.0.0.1",
23240
23231
  "-c",
23241
- "unix_socket_directories=" + (0, import_node_path32.dirname)(sp.pid("postgres")),
23232
+ "unix_socket_directories=" + (0, import_node_path31.dirname)(sp.pid("postgres")),
23242
23233
  "-c",
23243
23234
  "log_destination=stderr",
23244
23235
  "-c",
@@ -23266,7 +23257,7 @@ async function startPostgres(ctx, bus) {
23266
23257
  return handle;
23267
23258
  }
23268
23259
  async function initdb(layout, dataDir, env3) {
23269
- (0, import_node_fs30.mkdirSync)(dataDir, { recursive: true });
23260
+ (0, import_node_fs29.mkdirSync)(dataDir, { recursive: true });
23270
23261
  await execa(
23271
23262
  layout.initdb,
23272
23263
  ["-D", dataDir, "-U", DB_USER, "-A", "trust", "--no-locale", "--encoding=UTF8"],
@@ -23294,13 +23285,13 @@ async function ensureDatabase2(layout, port, env3) {
23294
23285
  { stdio: "ignore", env: env3 }
23295
23286
  );
23296
23287
  }
23297
- var import_node_fs30, import_node_path32, DB_USER, DB_NAME2;
23288
+ var import_node_fs29, import_node_path31, DB_USER, DB_NAME2;
23298
23289
  var init_postgres = __esm({
23299
23290
  "src/services/postgres.ts"() {
23300
23291
  "use strict";
23301
23292
  init_execa();
23302
- import_node_fs30 = require("node:fs");
23303
- import_node_path32 = require("node:path");
23293
+ import_node_fs29 = require("node:fs");
23294
+ import_node_path31 = require("node:path");
23304
23295
  init_health();
23305
23296
  init_paths2();
23306
23297
  init_spawn();
@@ -23317,7 +23308,7 @@ async function startRedis(ctx, bus) {
23317
23308
  if (!resolvedPath) throw new Error("redis predep not resolved \u2014 run install first");
23318
23309
  const sp = servicePaths(ctx.paths);
23319
23310
  const conf = sp.redisConf;
23320
- if (!(0, import_node_fs31.existsSync)(conf)) writeRedisConf(conf, ctx.ports.redis, ctx.paths.redisData);
23311
+ if (!(0, import_node_fs30.existsSync)(conf)) writeRedisConf(conf, ctx.ports.redis, ctx.paths.redisData);
23321
23312
  const handle = supervise({
23322
23313
  spec: {
23323
23314
  name: "redis",
@@ -23346,8 +23337,8 @@ async function startRedis(ctx, bus) {
23346
23337
  return handle;
23347
23338
  }
23348
23339
  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 });
23340
+ (0, import_node_fs30.mkdirSync)((0, import_node_path32.dirname)(path6), { recursive: true });
23341
+ (0, import_node_fs30.mkdirSync)(dataDir, { recursive: true });
23351
23342
  const lines = [
23352
23343
  `port ${port}`,
23353
23344
  "bind 127.0.0.1",
@@ -23361,14 +23352,14 @@ function writeRedisConf(path6, port, dataDir) {
23361
23352
  "maxmemory-policy allkeys-lru",
23362
23353
  ""
23363
23354
  ];
23364
- (0, import_node_fs31.writeFileSync)(path6, lines.join("\n"));
23355
+ (0, import_node_fs30.writeFileSync)(path6, lines.join("\n"));
23365
23356
  }
23366
- var import_node_fs31, import_node_path33;
23357
+ var import_node_fs30, import_node_path32;
23367
23358
  var init_redis = __esm({
23368
23359
  "src/services/redis.ts"() {
23369
23360
  "use strict";
23370
- import_node_fs31 = require("node:fs");
23371
- import_node_path33 = require("node:path");
23361
+ import_node_fs30 = require("node:fs");
23362
+ import_node_path32 = require("node:path");
23372
23363
  init_health();
23373
23364
  init_paths2();
23374
23365
  init_spawn();
@@ -23384,12 +23375,12 @@ async function syncVenvs(ctx, bus) {
23384
23375
  await Promise.all(
23385
23376
  specs.map(async (spec) => {
23386
23377
  const venvDir = sp.venv(spec.name);
23387
- const hashFile = (0, import_node_path34.join)(venvDir, ".lock-hash");
23378
+ const hashFile = (0, import_node_path33.join)(venvDir, ".lock-hash");
23388
23379
  const expected = `${hashFileSafely(spec.lockFile)}|extras=${(spec.extras ?? []).slice().sort().join(",")}`;
23389
- if ((0, import_node_fs32.existsSync)(venvDir) && readFileSafely(hashFile) === expected) return;
23380
+ if ((0, import_node_fs31.existsSync)(venvDir) && readFileSafely(hashFile) === expected) return;
23390
23381
  bus.emit({ type: "starting", service: `prepare:${spec.name}` });
23391
23382
  const start = Date.now();
23392
- (0, import_node_fs32.mkdirSync)(venvDir, { recursive: true });
23383
+ (0, import_node_fs31.mkdirSync)(venvDir, { recursive: true });
23393
23384
  const extraArgs = (spec.extras ?? []).flatMap((e) => ["--extra", e]);
23394
23385
  await execAndPipe(
23395
23386
  bus,
@@ -23403,7 +23394,7 @@ async function syncVenvs(ctx, bus) {
23403
23394
  }
23404
23395
  }
23405
23396
  );
23406
- (0, import_node_fs32.writeFileSync)(hashFile, expected);
23397
+ (0, import_node_fs31.writeFileSync)(hashFile, expected);
23407
23398
  bus.emit({ type: "healthy", service: `prepare:${spec.name}`, durationMs: Date.now() - start });
23408
23399
  })
23409
23400
  );
@@ -23411,15 +23402,10 @@ async function syncVenvs(ctx, bus) {
23411
23402
  function resolveVenvSpecs() {
23412
23403
  const root2 = appRoot();
23413
23404
  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
23405
  {
23420
23406
  name: "langevals",
23421
- projectDir: (0, import_node_path34.join)(root2, "langevals"),
23422
- lockFile: (0, import_node_path34.join)(root2, "langevals", "uv.lock"),
23407
+ projectDir: (0, import_node_path33.join)(root2, "langevals"),
23408
+ lockFile: (0, import_node_path33.join)(root2, "langevals", "uv.lock"),
23423
23409
  // langevals's evaluator routes (ROUGE Score, exact match, llm-as-judge,
23424
23410
  // etc.) live in subpackages declared as optional dependencies in
23425
23411
  // langevals/pyproject.toml: langevals-ragas, langevals-openai,
@@ -23439,20 +23425,20 @@ function resolveVenvSpecs() {
23439
23425
  ];
23440
23426
  }
23441
23427
  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");
23428
+ if (!(0, import_node_fs31.existsSync)(file)) return "missing";
23429
+ return (0, import_node_crypto6.createHash)("sha256").update((0, import_node_fs31.readFileSync)(file)).digest("hex");
23444
23430
  }
23445
23431
  function readFileSafely(file) {
23446
- if (!(0, import_node_fs32.existsSync)(file)) return null;
23447
- return (0, import_node_fs32.readFileSync)(file, "utf8").trim();
23432
+ if (!(0, import_node_fs31.existsSync)(file)) return null;
23433
+ return (0, import_node_fs31.readFileSync)(file, "utf8").trim();
23448
23434
  }
23449
- var import_node_fs32, import_node_crypto6, import_node_path34;
23435
+ var import_node_fs31, import_node_crypto6, import_node_path33;
23450
23436
  var init_venvs = __esm({
23451
23437
  "src/services/venvs.ts"() {
23452
23438
  "use strict";
23453
- import_node_fs32 = require("node:fs");
23439
+ import_node_fs31 = require("node:fs");
23454
23440
  import_node_crypto6 = require("node:crypto");
23455
- import_node_path34 = require("node:path");
23441
+ import_node_path33 = require("node:path");
23456
23442
  init_app_dir();
23457
23443
  init_paths2();
23458
23444
  init_pipe_to_bus();
@@ -23496,7 +23482,7 @@ var init_runtime = __esm({
23496
23482
  init_langevals();
23497
23483
  init_langwatch();
23498
23484
  init_langwatch_workers();
23499
- init_langwatch_nlp();
23485
+ init_nlpgo();
23500
23486
  init_migrate();
23501
23487
  init_node_deps();
23502
23488
  init_postgres();
@@ -23534,7 +23520,7 @@ var init_runtime = __esm({
23534
23520
  const childEnv = { ...envFromFile, ...ctx.userEnv };
23535
23521
  try {
23536
23522
  const [nlp, langevals, gw, lw] = await Promise.all([
23537
- startLangwatchNlp(ctx, bus, childEnv),
23523
+ startNlpgo(ctx, bus, childEnv),
23538
23524
  startLangevals(ctx, bus, childEnv),
23539
23525
  startAigateway(ctx, bus, envFromFile),
23540
23526
  startLangwatch(ctx, bus, childEnv)
@@ -24074,7 +24060,7 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
24074
24060
  var source_default = chalk;
24075
24061
 
24076
24062
  // src/cli.ts
24077
- var import_node_fs33 = require("node:fs");
24063
+ var import_node_fs32 = require("node:fs");
24078
24064
  var import_prompts3 = __toESM(require_prompts3(), 1);
24079
24065
 
24080
24066
  // src/animation/banner.ts
@@ -24153,8 +24139,7 @@ async function openBrowser(url) {
24153
24139
  var COLORS2 = {
24154
24140
  langwatch: source_default.green,
24155
24141
  workers: source_default.bold.green,
24156
- langwatch_nlp: source_default.cyan,
24157
- nlp: source_default.cyan,
24142
+ nlpgo: source_default.cyan,
24158
24143
  langevals: source_default.magenta,
24159
24144
  aigateway: source_default.yellow,
24160
24145
  postgres: source_default.dim,
@@ -24163,7 +24148,6 @@ var COLORS2 = {
24163
24148
  bullboard: source_default.gray,
24164
24149
  "prepare:app": source_default.blue,
24165
24150
  "prepare:langwatch": source_default.green,
24166
- "prepare:langwatch_nlp": source_default.cyan,
24167
24151
  "prepare:langevals": source_default.magenta,
24168
24152
  "migrate:prisma": source_default.dim,
24169
24153
  "migrate:clickhouse": source_default.dim
@@ -26820,7 +26804,7 @@ async function confirmUvInstallPrompt() {
26820
26804
  { onCancel: () => process.exit(130) }
26821
26805
  );
26822
26806
  if (!ok) {
26823
- console.error(source_default.red("Aborted \u2014 `uv` is required to run langwatch_nlp + langevals."));
26807
+ console.error(source_default.red("Aborted \u2014 `uv` is required to run langevals."));
26824
26808
  process.exit(1);
26825
26809
  }
26826
26810
  }
@@ -27027,7 +27011,7 @@ var placeholderRuntime = {
27027
27011
  };
27028
27012
 
27029
27013
  // src/cli.ts
27030
- var VERSION = true ? "3.1.0-beta.21" : "0.0.0-dev";
27014
+ var VERSION = true ? "3.1.0-beta.23" : "0.0.0-dev";
27031
27015
  async function loadRuntime() {
27032
27016
  try {
27033
27017
  const real = await Promise.resolve().then(() => (init_runtime(), runtime_exports));
@@ -27066,7 +27050,7 @@ program2.command("start", { isDefault: true }).description("install missing pred
27066
27050
  const base = Number.parseInt(opts.portBase, 10);
27067
27051
  const { base: resolvedBase } = await resolvePortConflicts({ base, yes: opts.yes });
27068
27052
  const ports = allocatePorts(resolvedBase);
27069
- if (!(0, import_node_fs33.existsSync)(paths.bin) && !(0, import_node_fs33.existsSync)(paths.installManifest)) {
27053
+ if (!(0, import_node_fs32.existsSync)(paths.bin) && !(0, import_node_fs32.existsSync)(paths.installManifest)) {
27070
27054
  console.log("");
27071
27055
  console.log(source_default.dim("Setting up ~/.langwatch for the first time, this may take a few minutes."));
27072
27056
  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};