@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.
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/__init__.py +36 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/_logger.py +165 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/batch_clustering.py +153 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/build_response.py +77 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/constants.py +7 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/incremental_clustering.py +325 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/topic_naming.py +432 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/types.py +42 -0
- package/langevals/evaluators/topic_clustering/langevals_topic_clustering/utils.py +191 -0
- package/langevals/evaluators/topic_clustering/pyproject.toml +52 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_clustering.py +239 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_clustering_integration.py +97 -0
- package/langevals/evaluators/topic_clustering/tests/test_topic_naming.py +72 -0
- package/langevals/langevals/pytest_plugins/pass_rate_plugin.py +7 -1
- package/langevals/langevals/server.py +28 -0
- package/langevals/pyproject.toml +3 -0
- package/langevals/uv.lock +119 -20
- package/langwatch/dist/client/assets/{AnnotationsTable-BDAkYaz6.js → AnnotationsTable-uS_9SQ-g.js} +2 -2
- package/langwatch/dist/client/assets/{BatchEvaluationSummary-DMaQM_VB.js → BatchEvaluationSummary-DtFd8yKJ.js} +2 -2
- package/langwatch/dist/client/assets/{BudgetEditDrawer-CHaqmdIl.js → BudgetEditDrawer-CHEPz0hH.js} +2 -2
- package/langwatch/dist/client/assets/{ChartCard-D14PUg_d.js → ChartCard-s5fMPo7b.js} +2 -2
- package/langwatch/dist/client/assets/{ChatWindow-CRDnlP-Q.js → ChatWindow-C0XSteVJ.js} +2 -2
- package/langwatch/dist/client/assets/ChatWindow-DFEmNXQL.js +1 -0
- package/langwatch/dist/client/assets/{ConfirmDialog-CXIhncvW.js → ConfirmDialog-M94yLNvP.js} +2 -2
- package/langwatch/dist/client/assets/{ContactSalesBlock-CijLBwRC.js → ContactSalesBlock-CnnuZ8iI.js} +2 -2
- package/langwatch/dist/client/assets/{DSPyExperiment-B1YOL2m8.js → DSPyExperiment-CMA6lrlx.js} +2 -2
- package/langwatch/dist/client/assets/{FilterDisplay-BB0xWrLn.js → FilterDisplay-0S3NqCkq.js} +2 -2
- package/langwatch/dist/client/assets/{FormatMoney-w9vr_h0X.js → FormatMoney-CCygtAHg.js} +2 -2
- package/langwatch/dist/client/assets/{FoundryDrawer-CdJDXtpz.js → FoundryDrawer-B35xZ26C.js} +2 -2
- package/langwatch/dist/client/assets/{GatewayErrorPanel-DvE9U2dS.js → GatewayErrorPanel-BsaYQEie.js} +2 -2
- package/langwatch/dist/client/assets/{GatewayLayout-lv1p_6B5.js → GatewayLayout-LvwwrwMf.js} +2 -2
- package/langwatch/dist/client/assets/{GraphsLayout-BJ68J9e-.js → GraphsLayout-DJ-HI9N1.js} +2 -2
- package/langwatch/dist/client/assets/{GroupBindingInputRow-DebZBCnD.js → GroupBindingInputRow-CV-fBkX9.js} +2 -2
- package/langwatch/dist/client/assets/{MessagesTable-B6lYde-x.js → MessagesTable-9taaKCOZ.js} +2 -2
- package/langwatch/dist/client/assets/{NavigationFooter-CiOVzDUh.js → NavigationFooter-Dzvauw3l.js} +2 -2
- package/langwatch/dist/client/assets/{NoDataInfoBlock-quSW_MRm.js → NoDataInfoBlock-CLKl_wlX.js} +2 -2
- package/langwatch/dist/client/assets/{OpsPageShell-DJ1WlI6-.js → OpsPageShell-C_mTziRS.js} +2 -2
- package/langwatch/dist/client/assets/{OptimizationStudio-BlozXjcN.js → OptimizationStudio-D2zpsmJj.js} +8 -12
- package/langwatch/dist/client/assets/{PreconditionsField-BOfcWvmZ.js → PreconditionsField-WXB8kcTK.js} +2 -2
- package/langwatch/dist/client/assets/{SettingsLayout-CLCGxMAe.js → SettingsLayout--1gdEuhv.js} +2 -2
- package/langwatch/dist/client/assets/{SubscriptionPage-J8b2Zaj6.js → SubscriptionPage-B0ox_4kM.js} +2 -2
- package/langwatch/dist/client/assets/{VirtualKeySecretReveal-DR1VDLy7.js → VirtualKeySecretReveal-CRbI1dKQ.js} +2 -2
- package/langwatch/dist/client/assets/{WithPermissionGuard-DD8uo3UK.js → WithPermissionGuard-B4Jo8E5-.js} +2 -2
- package/langwatch/dist/client/assets/{__...path__-BZVaIayJ.js → __...path__-BF2zkD84.js} +2 -2
- package/langwatch/dist/client/assets/{_experiment_-B1aT-wS3.js → _experiment_-D02aoVQk.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-oI_eq-I_.js → _id_-Ch8YmTiM.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-DAqPuO73.js → _id_-D6ZvwHpH.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-DUngklVb.js → _id_-DOC1ZkBm.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-jFDAfbob.js → _id_-DfWwW6_N.js} +2 -2
- package/langwatch/dist/client/assets/{_id_-BKBrWGG0.js → _id_-DxUo4W7J.js} +2 -2
- package/langwatch/dist/client/assets/_not-found-DDh108-i.js +1 -0
- package/langwatch/dist/client/assets/{_project_-Bt1tayHB.js → _project_-_UUt5Ar9.js} +2 -2
- package/langwatch/dist/client/assets/{_runId_-CfvnDt5H.js → _runId_-Dimwzp48.js} +2 -2
- package/langwatch/dist/client/assets/_slug_-BMvKBwS_.js +2 -0
- package/langwatch/dist/client/assets/{_slug_-DZAdl0QS.js → _slug_-CE6VoDSC.js} +2 -2
- package/langwatch/dist/client/assets/{_slug_-DmoWXjKT.js → _slug_-OiOLG1Mv.js} +2 -2
- package/langwatch/dist/client/assets/{_team_-DL_wKSWK.js → _team_-DKvmwO_5.js} +2 -2
- package/langwatch/dist/client/assets/{_workflow_-DcMXLPUe.js → _workflow_-FkilKiB-.js} +3 -3
- package/langwatch/dist/client/assets/{_workflow_-NI9bac7d.js → _workflow_-gJZppg3h.js} +2 -2
- package/langwatch/dist/client/assets/{access-audit-CFwNwusI.js → access-audit-xcUVYMMT.js} +2 -2
- package/langwatch/dist/client/assets/{agents-Di4XRwcn.js → agents-D32g91cu.js} +2 -2
- package/langwatch/dist/client/assets/{all-C273mlDB.js → all-vnREzDZj.js} +2 -2
- package/langwatch/dist/client/assets/{analytics-CEAcSf6B.js → analytics-DP6Y4Feh.js} +2 -2
- package/langwatch/dist/client/assets/{annotation-scores-CHfn4LQp.js → annotation-scores-CjD4CEB6.js} +2 -2
- package/langwatch/dist/client/assets/{annotations-CHZQrha6.js → annotations-1rVXiDRQ.js} +2 -2
- package/langwatch/dist/client/assets/{api-keys-BT7HExHM.js → api-keys-BJpKyuaz.js} +2 -2
- package/langwatch/dist/client/assets/{audit-log-BGk-51Dt.js → audit-log-BdUdZjxp.js} +2 -2
- package/langwatch/dist/client/assets/{authentication-DvwXfkp-.js → authentication-8mQB00CC.js} +2 -2
- package/langwatch/dist/client/assets/{authorize-tXpHrWyw.js → authorize-BpUueMNW.js} +2 -2
- package/langwatch/dist/client/assets/{authorize-CRu9xlpU.js → authorize-CbNBtmxW.js} +2 -2
- package/langwatch/dist/client/assets/{automations-CjDvz9Ak.js → automations-34KMkRxd.js} +2 -2
- package/langwatch/dist/client/assets/{billing-plans-FUqEPN62.js → billing-plans-BUQp08MI.js} +2 -2
- package/langwatch/dist/client/assets/{budgets-BV6_RHrs.js → budgets-CdelE8Hv.js} +2 -2
- package/langwatch/dist/client/assets/{cache-rules-CtYA79E_.js → cache-rules-D2m1QlNJ.js} +2 -2
- package/langwatch/dist/client/assets/choose-C0LdeUiH.js +2 -0
- package/langwatch/dist/client/assets/{command-bar-CaJygoez.js → command-bar-DUK45yin.js} +7 -9
- package/langwatch/dist/client/assets/custom-hBq2K4FJ.js +1 -0
- package/langwatch/dist/client/assets/{datasets-vLWpH84_.js → datasets-ErNNhmjg.js} +2 -2
- package/langwatch/dist/client/assets/{dejaview-DwVR3RGg.js → dejaview-BaD4_v90.js} +2 -2
- package/langwatch/dist/client/assets/{dist-SwV3YZv3.js → dist-Cds4Mqhj.js} +4 -6
- package/langwatch/dist/client/assets/{edit-CyxsmQmW.js → edit-DpT8ejBV.js} +2 -2
- package/langwatch/dist/client/assets/{evaluations-BfgeZMph.js → evaluations-BdQ2Dm2r.js} +2 -2
- package/langwatch/dist/client/assets/{evaluations-HSQIMvbX.js → evaluations-C90I4VAr.js} +2 -2
- package/langwatch/dist/client/assets/{evaluators-DLHVvnrh.js → evaluators-ig_ugRLt.js} +2 -2
- package/langwatch/dist/client/assets/{foundry-Ckq0WjPU.js → foundry-B-X_80pD.js} +2 -2
- package/langwatch/dist/client/assets/{gateway-CDSYPZ6w.js → gateway-CS_mtJx-.js} +2 -2
- package/langwatch/dist/client/assets/{groups-CCCRUqPj.js → groups-Bp90ChP3.js} +2 -2
- package/langwatch/dist/client/assets/{index-Bm6z2fM9.js → index-TNQ6uyis.js} +4 -4
- package/langwatch/dist/client/assets/{license-CHOarGWr.js → license-CgnlvyuI.js} +2 -2
- package/langwatch/dist/client/assets/{me-CBya_vXs.js → me-DEqhm_KC.js} +2 -2
- package/langwatch/dist/client/assets/{members-lIFLh-rh.js → members-CUJANDtH.js} +2 -2
- package/langwatch/dist/client/assets/{messages-CG9j8Dz8.js → messages-fQBfCjvp.js} +2 -2
- package/langwatch/dist/client/assets/{metrics-C9pzeaI6.js → metrics-DeIxebpD.js} +2 -2
- package/langwatch/dist/client/assets/{model-costs-Bc5uqjkl.js → model-costs-C1RbgK--.js} +2 -2
- package/langwatch/dist/client/assets/{model-providers-B5UjRgS_.js → model-providers-Pv3ML_-t.js} +2 -2
- package/langwatch/dist/client/assets/{my-queue-BkEfiWyR.js → my-queue-BLre2NMr.js} +2 -2
- package/langwatch/dist/client/assets/{ops-Cc-g-CMn.js → ops-CCw-FJaT.js} +2 -2
- package/langwatch/dist/client/assets/{organization-features-CoIKKHkQ.js → organization-features-rqg-75mI.js} +2 -2
- package/langwatch/dist/client/assets/{organizations-DWcQUTzi.js → organizations-DjCzIHVx.js} +2 -2
- package/langwatch/dist/client/assets/{persistence-CTQ44vGL.js → persistence-BPvHS0F6.js} +2 -2
- package/langwatch/dist/client/assets/{plans-Dq3eFg5K.js → plans-Ch2Ol-Fd.js} +2 -2
- package/langwatch/dist/client/assets/{projections-CTNj1QBM.js → projections-it4FOVjm.js} +2 -2
- package/langwatch/dist/client/assets/{projects-BxM7C87h.js → projects-CjWZFLfn.js} +2 -2
- package/langwatch/dist/client/assets/{prompts-DhXnJT6e.js → prompts-DilmFH_s.js} +2 -2
- package/langwatch/dist/client/assets/{providers-DW7VWdqq.js → providers-tlLT_lTF.js} +2 -2
- package/langwatch/dist/client/assets/{reports-D3QFKhNP.js → reports-vlrcTrLs.js} +2 -2
- package/langwatch/dist/client/assets/{roles-B_0t5DWA.js → roles-DNgi-NQ9.js} +2 -2
- package/langwatch/dist/client/assets/{scenarios-BX3XslU0.js → scenarios-BmG_wDkR.js} +2 -2
- package/langwatch/dist/client/assets/{scim-DDsLO39r.js → scim-BKr1_FHt.js} +2 -2
- package/langwatch/dist/client/assets/{secrets-BvEGwDCy.js → secrets-CU8ocTGv.js} +2 -2
- package/langwatch/dist/client/assets/{settings-9giNiAQQ.js → settings-CDzdoYVK.js} +2 -2
- package/langwatch/dist/client/assets/{setup-HxXKoVKG.js → setup-nEvn2rjN.js} +2 -2
- package/langwatch/dist/client/assets/{subscription-DhyswDze.js → subscription-BPNl_6jF.js} +3 -3
- package/langwatch/dist/client/assets/{subscriptions-Dyyau22a.js → subscriptions-D0G-OE5C.js} +2 -2
- package/langwatch/dist/client/assets/{teams-DRmeAxzf.js → teams-DThgDQvB.js} +2 -2
- package/langwatch/dist/client/assets/{textOverflowHeuristic-JibhpzDV.js → textOverflowHeuristic-DTC8-Ffx.js} +2 -2
- package/langwatch/dist/client/assets/{topic-clustering-Bllfw5rZ.js → topic-clustering-BR2Mbpao.js} +2 -2
- package/langwatch/dist/client/assets/{topics-CpiGYxqb.js → topics-CI8GoNqp.js} +2 -2
- package/langwatch/dist/client/assets/{traceExecutor-CiHXJB0V.js → traceExecutor-CDUGyUaw.js} +2 -2
- package/langwatch/dist/client/assets/{usage-BnsstwBY.js → usage-B4mR7ut_.js} +2 -2
- package/langwatch/dist/client/assets/{usage-CoyGtJoI.js → usage-C8fbffYi.js} +2 -2
- package/langwatch/dist/client/assets/{useAdminResource-SPC5iBHM.js → useAdminResource-SmnnHro6.js} +2 -2
- package/langwatch/dist/client/assets/{useAnnotationQueues-2DKZTC7r.js → useAnnotationQueues-CA6Vk--V.js} +2 -2
- package/langwatch/dist/client/assets/{useAvailableEvaluators-HndTl2LV.js → useAvailableEvaluators-hmbmcRQr.js} +2 -2
- package/langwatch/dist/client/assets/{useDeleteDatasetConfirmation-BgWN6Qqb.js → useDeleteDatasetConfirmation-BCK_zUUe.js} +2 -2
- package/langwatch/dist/client/assets/{useWorkflowStore-e1wFCvo2.js → useWorkflowStore-QUJ3J8X9.js} +2 -2
- package/langwatch/dist/client/assets/{users-C6wjliCC.js → users-CfhanCfR.js} +2 -2
- package/langwatch/dist/client/assets/{users-tF6ZKeV1.js → users-HjuN3o6k.js} +2 -2
- package/langwatch/dist/client/assets/{virtual-keys-BL-65S0B.js → virtual-keys-Bj-MhW66.js} +2 -2
- package/langwatch/dist/client/assets/{wizard-faGkpZDT.js → wizard-dRWCVVx6.js} +2 -2
- package/langwatch/dist/client/assets/{workbench-Oj0s_YR-.js → workbench-CuixH3G1.js} +2 -2
- package/langwatch/dist/client/assets/{workflows-Cu9k-Twu.js → workflows-BT6m4Yu9.js} +2 -2
- package/langwatch/dist/client/index.html +3 -3
- package/langwatch/scripts/seed-dogfood-password.ts +163 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-evaluator.integration.test.ts +458 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event-routing.test.ts +180 -0
- package/langwatch/src/app/api/workflows/post_event/__tests__/post-event.integration.test.ts +274 -0
- package/langwatch/src/app/api/workflows/post_event/post-event.ts +29 -1
- package/langwatch/src/components/agents/AgentCodeEditorDrawer.tsx +4 -5
- package/langwatch/src/components/agents/__tests__/AgentCodeEditorDrawer.integration.test.tsx +40 -0
- package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/__tests__/code-execution-node.factory.unit.test.ts +47 -0
- package/langwatch/src/components/evaluations/wizard/hooks/evaluation-wizard-store/slices/factories/code-execution-node.factory.ts +2 -4
- package/langwatch/src/components/experiments/BatchEvaluationV2/BatchEvaluationV2EvaluationResults.tsx +6 -1
- package/langwatch/src/optimization_studio/__tests__/registry.test.ts +29 -1
- package/langwatch/src/optimization_studio/components/Optimize.tsx +17 -3
- package/langwatch/src/optimization_studio/components/properties/AgentPropertiesPanel.tsx +4 -5
- package/langwatch/src/optimization_studio/hooks/workflowStoreCore.ts +17 -6
- package/langwatch/src/optimization_studio/hooks/workflowStoreCore.unit.test.ts +42 -0
- package/langwatch/src/optimization_studio/registry.ts +2 -4
- package/langwatch/src/optimization_studio/server/lambda/index.ts +12 -2
- package/langwatch/src/server/api/routers/workflows.ts +18 -0
- package/langwatch/src/server/evaluations-v3/execution/workflowBuilder.ts +3 -2
- package/langwatch/src/server/evaluations-v3/services/__tests__/experiment-run.service.getRun-null.unit.test.ts +71 -0
- package/langwatch/src/server/evaluations-v3/services/experiment-run.service.ts +18 -9
- package/langwatch/src/server/modelProviders/utils.ts +11 -1
- package/langwatch/src/server/nlpgo/__tests__/nlpgoFetch.integration.test.ts +248 -0
- package/langwatch/src/server/nlpgo/nlpgoFetch.ts +142 -0
- package/langwatch/src/server/routes/__tests__/playground-proxy.integration.test.ts +242 -0
- package/langwatch/src/server/routes/playground.ts +11 -1
- package/langwatch/src/server/routes/workflows.ts +17 -0
- package/langwatch/src/server/topicClustering/topicClustering.ts +33 -8
- package/langwatch/src/server/workflows/runWorkflow.ts +10 -13
- package/langwatch_nlp/langwatch_nlp/topic_clustering/topic_naming.py +39 -32
- package/langwatch_nlp/scripts/entrypoint.sh +67 -0
- package/package.json +1 -1
- package/packages/server/dist/cli.cjs +67 -94
- package/langwatch/dist/client/assets/ChatWindow-DzB-tNlQ.js +0 -1
- package/langwatch/dist/client/assets/_not-found-PEUaWdF3.js +0 -1
- package/langwatch/dist/client/assets/_slug_-C-8AjsjC.js +0 -2
- package/langwatch/dist/client/assets/choose--PBky27o.js +0 -2
- 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: "
|
|
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/
|
|
23089
|
-
async function
|
|
23090
|
-
bus.emit({ type: "starting", service: "
|
|
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
|
|
23093
|
-
if (!
|
|
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: "
|
|
23101
|
-
command:
|
|
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
|
-
|
|
23120
|
-
|
|
23121
|
-
|
|
23122
|
-
|
|
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
|
-
|
|
23129
|
-
|
|
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(`
|
|
23125
|
+
throw new Error(`nlpgo did not become healthy: ${ready.reason}`);
|
|
23138
23126
|
}
|
|
23139
|
-
bus.emit({ type: "healthy", service: "
|
|
23127
|
+
bus.emit({ type: "healthy", service: "nlpgo", durationMs: Date.now() - start });
|
|
23140
23128
|
return handle;
|
|
23141
23129
|
}
|
|
23142
|
-
|
|
23143
|
-
|
|
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,
|
|
23178
|
+
const binDir = (0, import_node_path31.dirname)(postgresBinPath);
|
|
23199
23179
|
return {
|
|
23200
23180
|
postgresBin: postgresBinPath,
|
|
23201
|
-
initdb: (0,
|
|
23202
|
-
pgCtl: (0,
|
|
23203
|
-
psql: (0,
|
|
23204
|
-
createdb: (0,
|
|
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,
|
|
23209
|
-
if (!(0,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
-
|
|
23303
|
-
|
|
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,
|
|
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,
|
|
23350
|
-
(0,
|
|
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,
|
|
23344
|
+
(0, import_node_fs30.writeFileSync)(path6, lines.join("\n"));
|
|
23365
23345
|
}
|
|
23366
|
-
var
|
|
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
|
-
|
|
23371
|
-
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
23422
|
-
lockFile: (0,
|
|
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,
|
|
23443
|
-
return (0, import_node_crypto6.createHash)("sha256").update((0,
|
|
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,
|
|
23447
|
-
return (0,
|
|
23421
|
+
if (!(0, import_node_fs31.existsSync)(file)) return null;
|
|
23422
|
+
return (0, import_node_fs31.readFileSync)(file, "utf8").trim();
|
|
23448
23423
|
}
|
|
23449
|
-
var
|
|
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
|
-
|
|
23428
|
+
import_node_fs31 = require("node:fs");
|
|
23454
23429
|
import_node_crypto6 = require("node:crypto");
|
|
23455
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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.
|
|
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,
|
|
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 +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};
|