langsmith 0.8.11 → 0.9.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/_openapi_client/resources/issues.d.ts +6 -0
- package/dist/_openapi_client/resources/online-evaluators.cjs +2 -2
- package/dist/_openapi_client/resources/online-evaluators.d.ts +7 -2
- package/dist/_openapi_client/resources/online-evaluators.js +2 -2
- package/dist/_openapi_client/resources/public/runs.d.ts +1 -1
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +2 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +25 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.js +2 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +7 -2
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +1 -1
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +12 -2
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +25 -3
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +12 -2
- package/dist/_openapi_client/resources/threads.cjs +1 -1
- package/dist/_openapi_client/resources/threads.d.ts +26 -1
- package/dist/_openapi_client/resources/threads.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/run_trees.cjs +19 -2
- package/dist/run_trees.d.ts +12 -0
- package/dist/run_trees.js +19 -2
- package/dist/sandbox/client.cjs +55 -7
- package/dist/sandbox/client.d.ts +27 -1
- package/dist/sandbox/client.js +55 -7
- package/dist/sandbox/errors.cjs +17 -6
- package/dist/sandbox/errors.d.ts +12 -5
- package/dist/sandbox/errors.js +15 -5
- package/dist/sandbox/index.cjs +2 -1
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/sandbox.cjs +27 -1
- package/dist/sandbox/sandbox.d.ts +25 -1
- package/dist/sandbox/sandbox.js +28 -2
- package/dist/sandbox/types.d.ts +35 -0
- package/dist/sandbox/ws_execute.cjs +7 -3
- package/dist/sandbox/ws_execute.js +8 -4
- package/dist/utils/env.cjs +18 -7
- package/dist/utils/env.js +18 -7
- package/dist/wrappers/openai_agents.cjs +2 -1
- package/dist/wrappers/openai_agents.js +2 -1
- package/package.json +1 -1
package/dist/utils/env.js
CHANGED
|
@@ -58,6 +58,22 @@ export function getRuntimeEnvironment() {
|
|
|
58
58
|
}
|
|
59
59
|
return runtimeEnvironment;
|
|
60
60
|
}
|
|
61
|
+
// Substrings marking a variable as secret-bearing or personal; matched
|
|
62
|
+
// case-insensitively against the variable name.
|
|
63
|
+
const EXCLUDED_SUBSTRINGS = [
|
|
64
|
+
"key",
|
|
65
|
+
"secret",
|
|
66
|
+
"token",
|
|
67
|
+
"password",
|
|
68
|
+
"passwd",
|
|
69
|
+
"pwd",
|
|
70
|
+
"credential",
|
|
71
|
+
"email",
|
|
72
|
+
];
|
|
73
|
+
function isSensitiveEnvVarName(key) {
|
|
74
|
+
const lowered = key.toLowerCase();
|
|
75
|
+
return EXCLUDED_SUBSTRINGS.some((sub) => lowered.includes(sub));
|
|
76
|
+
}
|
|
61
77
|
/**
|
|
62
78
|
* Retrieves the LangSmith-specific metadata from the current runtime environment.
|
|
63
79
|
*
|
|
@@ -83,9 +99,7 @@ export function getLangSmithEnvVarsMetadata() {
|
|
|
83
99
|
for (const [key, value] of Object.entries(allEnvVars)) {
|
|
84
100
|
if (typeof value === "string" &&
|
|
85
101
|
!excluded.includes(key) &&
|
|
86
|
-
!
|
|
87
|
-
!key.toLowerCase().includes("secret") &&
|
|
88
|
-
!key.toLowerCase().includes("token")) {
|
|
102
|
+
!isSensitiveEnvVarName(key)) {
|
|
89
103
|
if (key === "LANGCHAIN_REVISION_ID") {
|
|
90
104
|
envVars["revision_id"] = value;
|
|
91
105
|
}
|
|
@@ -113,10 +127,7 @@ export function getLangSmithEnvironmentVariables() {
|
|
|
113
127
|
for (const [key, value] of Object.entries(process.env)) {
|
|
114
128
|
if ((key.startsWith("LANGCHAIN_") || key.startsWith("LANGSMITH_")) &&
|
|
115
129
|
value != null) {
|
|
116
|
-
if ((key
|
|
117
|
-
key.toLowerCase().includes("secret") ||
|
|
118
|
-
key.toLowerCase().includes("token")) &&
|
|
119
|
-
typeof value === "string") {
|
|
130
|
+
if (isSensitiveEnvVarName(key) && typeof value === "string") {
|
|
120
131
|
envVars[key] =
|
|
121
132
|
value.slice(0, 2) +
|
|
122
133
|
"*".repeat(value.length - 4) +
|
|
@@ -717,6 +717,7 @@ class OpenAIAgentsTracingProcessor {
|
|
|
717
717
|
// available at start.
|
|
718
718
|
if (spanData.type === "generation" ||
|
|
719
719
|
spanData.type === "response" ||
|
|
720
|
+
spanData.type === "agent" ||
|
|
720
721
|
spanData.type === "function" ||
|
|
721
722
|
spanData.type === "handoff") {
|
|
722
723
|
this._unpostedSpans.add(span.spanId);
|
|
@@ -818,7 +819,7 @@ class OpenAIAgentsTracingProcessor {
|
|
|
818
819
|
await run.postRun();
|
|
819
820
|
}
|
|
820
821
|
else {
|
|
821
|
-
await run.patchRun(
|
|
822
|
+
await run.patchRun({ excludeInputs: true });
|
|
822
823
|
}
|
|
823
824
|
}
|
|
824
825
|
catch (e) {
|
|
@@ -714,6 +714,7 @@ export class OpenAIAgentsTracingProcessor {
|
|
|
714
714
|
// available at start.
|
|
715
715
|
if (spanData.type === "generation" ||
|
|
716
716
|
spanData.type === "response" ||
|
|
717
|
+
spanData.type === "agent" ||
|
|
717
718
|
spanData.type === "function" ||
|
|
718
719
|
spanData.type === "handoff") {
|
|
719
720
|
this._unpostedSpans.add(span.spanId);
|
|
@@ -815,7 +816,7 @@ export class OpenAIAgentsTracingProcessor {
|
|
|
815
816
|
await run.postRun();
|
|
816
817
|
}
|
|
817
818
|
else {
|
|
818
|
-
await run.patchRun(
|
|
819
|
+
await run.patchRun({ excludeInputs: true });
|
|
819
820
|
}
|
|
820
821
|
}
|
|
821
822
|
catch (e) {
|