@langwatch/server 3.24.0 → 3.26.0
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/dist/cli.cjs +129 -11
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -44747,6 +44747,11 @@ var registry2 = {
|
|
|
44747
44747
|
]
|
|
44748
44748
|
},
|
|
44749
44749
|
// ---- dataset storage ----
|
|
44750
|
+
stored_object_write_conflict: {
|
|
44751
|
+
tips: [
|
|
44752
|
+
"Another change to the same file landed while this one was written; send the request again"
|
|
44753
|
+
]
|
|
44754
|
+
},
|
|
44750
44755
|
private_dataplane_unavailable: {
|
|
44751
44756
|
tips: [
|
|
44752
44757
|
"Set the variable this error names (CLICKHOUSE_URL__<label>__<orgId> or DATAPLANE_S3__<label>__<orgId>) and restart the api and worker",
|
|
@@ -44798,11 +44803,19 @@ var registry2 = {
|
|
|
44798
44803
|
// ---- traces ----
|
|
44799
44804
|
trace_not_found: {
|
|
44800
44805
|
tips: [
|
|
44801
|
-
"
|
|
44802
|
-
"
|
|
44806
|
+
"If you just sent this trace, retry in a few seconds; ingestion is asynchronous",
|
|
44807
|
+
"The id was looked up as a trace id, a trace id prefix, a span id and a scenario run id, in this project and every project of the organisation you can read",
|
|
44808
|
+
'Find it by what it contained instead: `langwatch trace search -q "<text>" --since 30d`',
|
|
44809
|
+
"Traces are deleted after the project's retention window"
|
|
44803
44810
|
],
|
|
44804
44811
|
docsPath: "/platform/data-retention"
|
|
44805
44812
|
},
|
|
44813
|
+
scenario_run_has_many_traces: {
|
|
44814
|
+
tips: [
|
|
44815
|
+
"Open one of the listed traces: `langwatch trace get <traceId>`",
|
|
44816
|
+
'List them all: `langwatch trace search --filter "scenarioRun:<scenarioRunId>" --since 30d`'
|
|
44817
|
+
]
|
|
44818
|
+
},
|
|
44806
44819
|
trace_withheld_over_plan: {
|
|
44807
44820
|
tips: [
|
|
44808
44821
|
"Upgrade the plan on Settings > Subscription to show every held trace again",
|
|
@@ -44841,7 +44854,12 @@ var registry2 = {
|
|
|
44841
44854
|
]
|
|
44842
44855
|
},
|
|
44843
44856
|
filter_field_unknown: {
|
|
44844
|
-
tips: [
|
|
44857
|
+
tips: [
|
|
44858
|
+
"Use one of the fields listed in meta.knownFields; meta.hint names the likely one",
|
|
44859
|
+
"Field names are case-sensitive",
|
|
44860
|
+
"Text in the trace input or output has no field: search it with a quoted phrase and no field, or -q",
|
|
44861
|
+
"`label:<name>` matches the trace's metadata labels"
|
|
44862
|
+
]
|
|
44845
44863
|
},
|
|
44846
44864
|
filter_value_refused: {
|
|
44847
44865
|
tips: [
|
|
@@ -45193,9 +45211,16 @@ var registry2 = {
|
|
|
45193
45211
|
braids_not_enabled: {
|
|
45194
45212
|
tips: [
|
|
45195
45213
|
"Braid management is not switched on for this organisation yet; retrying will not help",
|
|
45196
|
-
"
|
|
45214
|
+
"Removing a braid and revoking a signing key still work; ask LangWatch to switch braids on to create or change them"
|
|
45197
45215
|
]
|
|
45198
45216
|
},
|
|
45217
|
+
braids_turned_off: {
|
|
45218
|
+
tips: [
|
|
45219
|
+
"On the Enterprise plan, an organisation admin can turn Braids on in the organisation's Braids settings",
|
|
45220
|
+
"While Braids is off, existing braids are paused and kept; removing a braid and revoking a signing key still work"
|
|
45221
|
+
],
|
|
45222
|
+
docsPath: "/features/braids"
|
|
45223
|
+
},
|
|
45199
45224
|
// ---- personal workspace reads ----
|
|
45200
45225
|
// Both are hit almost entirely by agents and CLIs, which have no UI to fall
|
|
45201
45226
|
// back on, so the tips have to name the key to swap in rather than restate
|
|
@@ -45271,6 +45296,74 @@ var registry2 = {
|
|
|
45271
45296
|
],
|
|
45272
45297
|
docsPath: "/governance/agent-registry"
|
|
45273
45298
|
},
|
|
45299
|
+
agent_stop_already_open: {
|
|
45300
|
+
tips: [
|
|
45301
|
+
"Read the open stop with GET /api/governance/agents/{agentId}/stop",
|
|
45302
|
+
"Approve, deny or restore it before requesting a new stop"
|
|
45303
|
+
],
|
|
45304
|
+
docsPath: "/governance/kill-switch"
|
|
45305
|
+
},
|
|
45306
|
+
agent_stop_not_found: {
|
|
45307
|
+
tips: ["List stops with GET /api/governance/agent-stops and use an `id` from that list"],
|
|
45308
|
+
docsPath: "/governance/kill-switch"
|
|
45309
|
+
},
|
|
45310
|
+
agent_stop_not_pending: {
|
|
45311
|
+
tips: ["Only a stop whose status is `pending_approval` takes an approval or a denial"],
|
|
45312
|
+
docsPath: "/governance/kill-switch"
|
|
45313
|
+
},
|
|
45314
|
+
agent_stop_not_restorable: {
|
|
45315
|
+
tips: ["Restore a stop whose status is `quarantined`, `stop_failed` or `restore_failed`"],
|
|
45316
|
+
docsPath: "/governance/kill-switch"
|
|
45317
|
+
},
|
|
45318
|
+
agent_stop_not_retryable: {
|
|
45319
|
+
tips: ["Retry a stop whose status is `quarantined`, `stop_failed` or `restore_failed`"],
|
|
45320
|
+
docsPath: "/governance/kill-switch"
|
|
45321
|
+
},
|
|
45322
|
+
agent_stop_plan_changed: {
|
|
45323
|
+
tips: [
|
|
45324
|
+
"Read the plan again with GET /api/governance/agents/{agentId}/stop-plan and confirm its targets"
|
|
45325
|
+
],
|
|
45326
|
+
docsPath: "/governance/kill-switch"
|
|
45327
|
+
},
|
|
45328
|
+
agent_stop_plan_conflict: {
|
|
45329
|
+
tips: [
|
|
45330
|
+
"Read the plan again with GET /api/governance/agents/{agentId}/stop-plan, apply your change to it and send its `version` as `expectedVersion`"
|
|
45331
|
+
],
|
|
45332
|
+
docsPath: "/governance/kill-switch"
|
|
45333
|
+
},
|
|
45334
|
+
agent_stop_plan_empty: {
|
|
45335
|
+
tips: ["Set the agent's targets with PUT /api/governance/agents/{agentId}/stop-plan"],
|
|
45336
|
+
docsPath: "/governance/kill-switch"
|
|
45337
|
+
},
|
|
45338
|
+
agent_stop_self_approval: {
|
|
45339
|
+
tips: ["Approve with a different API key, or have a person approve it in the Agents page"],
|
|
45340
|
+
docsPath: "/governance/kill-switch"
|
|
45341
|
+
},
|
|
45342
|
+
agent_stop_target_invalid: {
|
|
45343
|
+
tips: [
|
|
45344
|
+
"A serving endpoint target names a Databricks Genie governance source of this organisation",
|
|
45345
|
+
"A Bedrock target names an AWS connection of this organisation",
|
|
45346
|
+
"A virtual key target names a virtual key of this organisation"
|
|
45347
|
+
],
|
|
45348
|
+
docsPath: "/governance/kill-switch"
|
|
45349
|
+
},
|
|
45350
|
+
agent_stop_target_not_found: {
|
|
45351
|
+
tips: [
|
|
45352
|
+
"A Bedrock target names the alias's region, agent id and alias id as the AWS console shows them",
|
|
45353
|
+
"A serving endpoint target names an endpoint of the source's Databricks workspace"
|
|
45354
|
+
],
|
|
45355
|
+
docsPath: "/governance/kill-switch"
|
|
45356
|
+
},
|
|
45357
|
+
governance_aws_connection_in_use: {
|
|
45358
|
+
tips: [
|
|
45359
|
+
"Remove the Bedrock targets that use it from every stop plan, and restore the stops that still hold it"
|
|
45360
|
+
],
|
|
45361
|
+
docsPath: "/governance/kill-switch"
|
|
45362
|
+
},
|
|
45363
|
+
governance_aws_connection_not_found: {
|
|
45364
|
+
tips: ["Create the AWS connection on the Agents page before naming it in a stop plan"],
|
|
45365
|
+
docsPath: "/governance/kill-switch"
|
|
45366
|
+
},
|
|
45274
45367
|
agent_offline: {
|
|
45275
45368
|
tips: [
|
|
45276
45369
|
"Start the process that runs the decorated function; the agent shows Online in the agents list once it connects",
|
|
@@ -45741,6 +45834,12 @@ var registry2 = {
|
|
|
45741
45834
|
"Retry shortly; if it persists, the judgements can be made later by running the same statement as a job"
|
|
45742
45835
|
]
|
|
45743
45836
|
},
|
|
45837
|
+
instant_eval_decision_model_key_invalid: {
|
|
45838
|
+
tips: [
|
|
45839
|
+
"Every row of the run was refused for the key of the project's own Instant Evals model",
|
|
45840
|
+
"Check the key, and that the provider row is switched on, in Settings > Model Providers"
|
|
45841
|
+
]
|
|
45842
|
+
},
|
|
45744
45843
|
instant_eval_estimate_unavailable: {
|
|
45745
45844
|
tips: [
|
|
45746
45845
|
"The statement was accepted; working out how many rows it matches is what failed",
|
|
@@ -56525,7 +56624,7 @@ function collectResult(predeps, detection, installResults) {
|
|
|
56525
56624
|
}
|
|
56526
56625
|
|
|
56527
56626
|
// src/shared/version.ts
|
|
56528
|
-
var CLI_VERSION = true ? "3.
|
|
56627
|
+
var CLI_VERSION = true ? "3.26.0" : "0.0.0-dev";
|
|
56529
56628
|
|
|
56530
56629
|
// src/services/app-dir.ts
|
|
56531
56630
|
function appRoot() {
|
|
@@ -56557,6 +56656,9 @@ function redactedRequestHead(raw) {
|
|
|
56557
56656
|
var NOT_HANDLED_HEADER = "x-langwatch-not-handled";
|
|
56558
56657
|
var NOT_HANDLED_DRAINING = "draining";
|
|
56559
56658
|
|
|
56659
|
+
// ../../packages/process/src/lifecycle/request-body-deadline.ts
|
|
56660
|
+
var REQUEST_BODY_TIMEOUT_MS = 3e5;
|
|
56661
|
+
|
|
56560
56662
|
// ../../packages/process/src/lifecycle/liveness-thread.ts
|
|
56561
56663
|
var LIVENESS_PATH = "/healthz";
|
|
56562
56664
|
var READINESS_PATH = "/readyz";
|
|
@@ -56567,9 +56669,10 @@ var PUBLIC_LISTENER_TIMEOUTS = {
|
|
|
56567
56669
|
/** Above the 60s idle reuse of ALB and nginx, so Node never closes a socket a proxy reuses. */
|
|
56568
56670
|
keepAliveTimeout: 65e3,
|
|
56569
56671
|
headersTimeout: 66e3,
|
|
56570
|
-
/**
|
|
56571
|
-
requestTimeout:
|
|
56672
|
+
/** Node's 300s; a listener whose routes declare a longer body allowance raises it to theirs. */
|
|
56673
|
+
requestTimeout: REQUEST_BODY_TIMEOUT_MS
|
|
56572
56674
|
};
|
|
56675
|
+
var PROXY_DOOR_REQUEST_TIMEOUT_MS = 2 * 60 * 6e4;
|
|
56573
56676
|
var BIND_HANDOVER_MS = 1e4;
|
|
56574
56677
|
var HOP_BY_HOP_HEADERS = [
|
|
56575
56678
|
"connection",
|
|
@@ -56742,7 +56845,19 @@ const unavailable = (res, body) => {
|
|
|
56742
56845
|
if (res.headersSent) return res.destroy();
|
|
56743
56846
|
res.writeHead(503, { "Content-Type": "text/plain" }).end(body);
|
|
56744
56847
|
};
|
|
56848
|
+
// A declared body still arriving when an answer is written: Node would read the rest up to the
|
|
56849
|
+
// ceiling, so the answer closes the connection instead (a bodiless request is never pending).
|
|
56850
|
+
const bodyPending = (req) =>
|
|
56851
|
+
!req.complete && (req.headers["transfer-encoding"] !== undefined || Number(req.headers["content-length"] || 0) > 0);
|
|
56852
|
+
const closeWhenBodyPending = (req, res) => {
|
|
56853
|
+
const writeHead = res.writeHead;
|
|
56854
|
+
res.writeHead = function (...args) {
|
|
56855
|
+
if (bodyPending(req)) this.setHeader("connection", "close");
|
|
56856
|
+
return writeHead.apply(this, args);
|
|
56857
|
+
};
|
|
56858
|
+
};
|
|
56745
56859
|
const server = http.createServer((req, res) => {
|
|
56860
|
+
closeWhenBodyPending(req, res);
|
|
56746
56861
|
if (req.url === workerData.livenessPath && !proxiesLiveness) {
|
|
56747
56862
|
const stalled = stalledMs();
|
|
56748
56863
|
if (stalled > workerData.stallBudgetMs) {
|
|
@@ -56774,7 +56889,7 @@ server.on("clientError", (error, socket) => {
|
|
|
56774
56889
|
}
|
|
56775
56890
|
if (!socket.writable) return socket.destroy();
|
|
56776
56891
|
const status = workerData.clientErrorStatusLines[code] || "400 Bad Request";
|
|
56777
|
-
socket.end("HTTP/1.1 " + status + "\\r\\nConnection: close\\r\\n\\r\\n");
|
|
56892
|
+
socket.end("HTTP/1.1 " + status + "\\r\\nConnection: close\\r\\n\\r\\n", () => socket.destroy());
|
|
56778
56893
|
});
|
|
56779
56894
|
// The thread owns its client's connection, so the main thread's hop-by-hop headers stay behind.
|
|
56780
56895
|
const endToEnd = (headers) =>
|
|
@@ -56825,7 +56940,7 @@ server.on("upgrade", (req, socket, head) => {
|
|
|
56825
56940
|
upstream.on("error", () => socket.destroy());
|
|
56826
56941
|
socket.on("error", () => upstream.destroy());
|
|
56827
56942
|
});
|
|
56828
|
-
// PUBLIC_LISTENER_TIMEOUTS: a proxy's idle reuse outlived
|
|
56943
|
+
// PUBLIC_LISTENER_TIMEOUTS: a proxy's idle reuse outlived; the request body bound is the caller's.
|
|
56829
56944
|
Object.assign(server, workerData.listenerTimeouts);
|
|
56830
56945
|
const deadline = Date.now() + workerData.handoverMs;
|
|
56831
56946
|
const bind = () => server.listen(workerData.port);
|
|
@@ -56894,7 +57009,8 @@ async function startLivenessThread({
|
|
|
56894
57009
|
proxyPort,
|
|
56895
57010
|
logger,
|
|
56896
57011
|
stallBudgetMs = HEARTBEAT_STALL_BUDGET_MS,
|
|
56897
|
-
proxyTimeoutMs = MAIN_THREAD_PROXY_TIMEOUT_MS
|
|
57012
|
+
proxyTimeoutMs = MAIN_THREAD_PROXY_TIMEOUT_MS,
|
|
57013
|
+
requestTimeoutMs
|
|
56898
57014
|
}) {
|
|
56899
57015
|
const thread = new import_node_worker_threads.Worker(LIVENESS_THREAD_SOURCE, {
|
|
56900
57016
|
eval: true,
|
|
@@ -56919,7 +57035,7 @@ async function startLivenessThread({
|
|
|
56919
57035
|
hopByHopHeaders: HOP_BY_HOP_HEADERS,
|
|
56920
57036
|
notHandledHeader: NOT_HANDLED_HEADER,
|
|
56921
57037
|
notHandledDraining: NOT_HANDLED_DRAINING,
|
|
56922
|
-
listenerTimeouts: PUBLIC_LISTENER_TIMEOUTS
|
|
57038
|
+
listenerTimeouts: { ...PUBLIC_LISTENER_TIMEOUTS, requestTimeout: requestTimeoutMs }
|
|
56923
57039
|
}
|
|
56924
57040
|
});
|
|
56925
57041
|
thread.unref();
|
|
@@ -57179,6 +57295,8 @@ async function openBootDoor({
|
|
|
57179
57295
|
port,
|
|
57180
57296
|
heartbeat: heartbeat.buffer,
|
|
57181
57297
|
proxyPort: page.address().port,
|
|
57298
|
+
// The api behind this door holds each route's body to its own bound.
|
|
57299
|
+
requestTimeoutMs: PROXY_DOOR_REQUEST_TIMEOUT_MS,
|
|
57182
57300
|
logger: {
|
|
57183
57301
|
info: () => void 0,
|
|
57184
57302
|
error: (_fields, message) => report(`boot page: ${message}`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langwatch/server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.0",
|
|
4
4
|
"description": "Run LangWatch locally with one command — `npx @langwatch/server`. Complete LangWatch stack: observability, evaluations, AI gateway, agent simulations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|