@elizaos/core 1.6.2-alpha.13 → 1.6.2-alpha.14
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/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,gBAAgB,CAAC;AAI/B,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,eAAO,MAAM,SAAS,SAG+B,CAAC;AACtD,eAAO,MAAM,MAAM,SAG2B,CAAC;AAG/C,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,gBAAgB,CAAC;AAI/B,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,eAAO,MAAM,SAAS,SAG+B,CAAC;AACtD,eAAO,MAAM,MAAM,SAG2B,CAAC;AAG/C,cAAc,uBAAuB,CAAC"}
|
package/dist/node/index.node.js
CHANGED
|
@@ -25992,7 +25992,7 @@ var getDefaultProjectName = () => {
|
|
|
25992
25992
|
};
|
|
25993
25993
|
|
|
25994
25994
|
// ../../node_modules/langsmith/dist/index.js
|
|
25995
|
-
var __version__ = "0.3.
|
|
25995
|
+
var __version__ = "0.3.73";
|
|
25996
25996
|
|
|
25997
25997
|
// ../../node_modules/langsmith/dist/utils/env.js
|
|
25998
25998
|
var globalEnv;
|
|
@@ -26037,8 +26037,8 @@ function getRuntimeEnvironment() {
|
|
|
26037
26037
|
}
|
|
26038
26038
|
return runtimeEnvironment;
|
|
26039
26039
|
}
|
|
26040
|
-
function
|
|
26041
|
-
const allEnvVars =
|
|
26040
|
+
function getLangSmithEnvVarsMetadata() {
|
|
26041
|
+
const allEnvVars = getLangSmithEnvironmentVariables();
|
|
26042
26042
|
const envVars = {};
|
|
26043
26043
|
const excluded = [
|
|
26044
26044
|
"LANGCHAIN_API_KEY",
|
|
@@ -26053,7 +26053,7 @@ function getLangChainEnvVarsMetadata() {
|
|
|
26053
26053
|
"LANGSMITH_SESSION"
|
|
26054
26054
|
];
|
|
26055
26055
|
for (const [key, value] of Object.entries(allEnvVars)) {
|
|
26056
|
-
if (
|
|
26056
|
+
if (typeof value === "string" && !excluded.includes(key) && !key.toLowerCase().includes("key") && !key.toLowerCase().includes("secret") && !key.toLowerCase().includes("token")) {
|
|
26057
26057
|
if (key === "LANGCHAIN_REVISION_ID") {
|
|
26058
26058
|
envVars["revision_id"] = value;
|
|
26059
26059
|
} else {
|
|
@@ -26063,18 +26063,22 @@ function getLangChainEnvVarsMetadata() {
|
|
|
26063
26063
|
}
|
|
26064
26064
|
return envVars;
|
|
26065
26065
|
}
|
|
26066
|
-
function
|
|
26066
|
+
function getLangSmithEnvironmentVariables() {
|
|
26067
|
+
const envVars = {};
|
|
26067
26068
|
try {
|
|
26068
26069
|
if (typeof process !== "undefined" && process.env) {
|
|
26069
|
-
|
|
26070
|
-
|
|
26071
|
-
|
|
26072
|
-
|
|
26070
|
+
for (const [key, value] of Object.entries(process.env)) {
|
|
26071
|
+
if ((key.startsWith("LANGCHAIN_") || key.startsWith("LANGSMITH_")) && value != null) {
|
|
26072
|
+
if ((key.toLowerCase().includes("key") || key.toLowerCase().includes("secret") || key.toLowerCase().includes("token")) && typeof value === "string") {
|
|
26073
|
+
envVars[key] = value.slice(0, 2) + "*".repeat(value.length - 4) + value.slice(-2);
|
|
26074
|
+
} else {
|
|
26075
|
+
envVars[key] = value;
|
|
26076
|
+
}
|
|
26077
|
+
}
|
|
26078
|
+
}
|
|
26073
26079
|
}
|
|
26074
|
-
|
|
26075
|
-
|
|
26076
|
-
return;
|
|
26077
|
-
}
|
|
26080
|
+
} catch (e) {}
|
|
26081
|
+
return envVars;
|
|
26078
26082
|
}
|
|
26079
26083
|
function getEnvironmentVariable(name) {
|
|
26080
26084
|
try {
|
|
@@ -26949,9 +26953,9 @@ function replaceGetterValues(replacer) {
|
|
|
26949
26953
|
}
|
|
26950
26954
|
|
|
26951
26955
|
// ../../node_modules/langsmith/dist/client.js
|
|
26952
|
-
function mergeRuntimeEnvIntoRun(run) {
|
|
26956
|
+
function mergeRuntimeEnvIntoRun(run, cachedEnvVars) {
|
|
26953
26957
|
const runtimeEnv = getRuntimeEnvironment();
|
|
26954
|
-
const envVars =
|
|
26958
|
+
const envVars = cachedEnvVars ?? getLangSmithEnvVarsMetadata();
|
|
26955
26959
|
const extra = run.extra ?? {};
|
|
26956
26960
|
const metadata = extra.metadata;
|
|
26957
26961
|
run.extra = {
|
|
@@ -27257,6 +27261,12 @@ class Client {
|
|
|
27257
27261
|
writable: true,
|
|
27258
27262
|
value: undefined
|
|
27259
27263
|
});
|
|
27264
|
+
Object.defineProperty(this, "cachedLSEnvVarsForMetadata", {
|
|
27265
|
+
enumerable: true,
|
|
27266
|
+
configurable: true,
|
|
27267
|
+
writable: true,
|
|
27268
|
+
value: undefined
|
|
27269
|
+
});
|
|
27260
27270
|
Object.defineProperty(this, "multipartStreamingDisabled", {
|
|
27261
27271
|
enumerable: true,
|
|
27262
27272
|
configurable: true,
|
|
@@ -27311,6 +27321,7 @@ class Client {
|
|
|
27311
27321
|
if (getOtelEnabled()) {
|
|
27312
27322
|
this.langSmithToOTELTranslator = new LangSmithToOTELTranslator;
|
|
27313
27323
|
}
|
|
27324
|
+
this.cachedLSEnvVarsForMetadata = getLangSmithEnvVarsMetadata();
|
|
27314
27325
|
}
|
|
27315
27326
|
static getDefaultClientConfig() {
|
|
27316
27327
|
const apiKey = getLangSmithEnvironmentVariable("API_KEY");
|
|
@@ -27622,7 +27633,7 @@ class Client {
|
|
|
27622
27633
|
async processRunOperation(item) {
|
|
27623
27634
|
clearTimeout(this.autoBatchTimeout);
|
|
27624
27635
|
this.autoBatchTimeout = undefined;
|
|
27625
|
-
item.item = mergeRuntimeEnvIntoRun(item.item);
|
|
27636
|
+
item.item = mergeRuntimeEnvIntoRun(item.item, this.cachedLSEnvVarsForMetadata);
|
|
27626
27637
|
const itemPromise = this.autoBatchQueue.push(item);
|
|
27627
27638
|
if (this.manualFlushMode) {
|
|
27628
27639
|
return itemPromise;
|
|
@@ -27737,7 +27748,7 @@ class Client {
|
|
|
27737
27748
|
}).catch(console.error);
|
|
27738
27749
|
return;
|
|
27739
27750
|
}
|
|
27740
|
-
const mergedRunCreateParam = mergeRuntimeEnvIntoRun(runCreate);
|
|
27751
|
+
const mergedRunCreateParam = mergeRuntimeEnvIntoRun(runCreate, this.cachedLSEnvVarsForMetadata);
|
|
27741
27752
|
if (options?.apiKey !== undefined) {
|
|
27742
27753
|
headers["x-api-key"] = options.apiKey;
|
|
27743
27754
|
}
|
|
@@ -45645,6 +45656,41 @@ class AgentRuntime {
|
|
|
45645
45656
|
}
|
|
45646
45657
|
}
|
|
45647
45658
|
|
|
45659
|
+
// src/secrets.ts
|
|
45660
|
+
init_environment();
|
|
45661
|
+
function hasCharacterSecrets(character) {
|
|
45662
|
+
return Boolean(character?.settings?.secrets && Object.keys(character.settings.secrets).length > 0);
|
|
45663
|
+
}
|
|
45664
|
+
async function loadSecretsNodeImpl(character) {
|
|
45665
|
+
const fs = await import("node:fs");
|
|
45666
|
+
const dotenv = await import("dotenv");
|
|
45667
|
+
const { findEnvFile: findEnvFile2 } = await Promise.resolve().then(() => (init_environment(), exports_environment));
|
|
45668
|
+
if (hasCharacterSecrets(character)) {
|
|
45669
|
+
return false;
|
|
45670
|
+
}
|
|
45671
|
+
const envPath = findEnvFile2();
|
|
45672
|
+
if (!envPath)
|
|
45673
|
+
return false;
|
|
45674
|
+
try {
|
|
45675
|
+
const buf = fs.readFileSync(envPath);
|
|
45676
|
+
const envSecrets = dotenv.parse(buf);
|
|
45677
|
+
if (!character.settings) {
|
|
45678
|
+
character.settings = {};
|
|
45679
|
+
}
|
|
45680
|
+
character.settings.secrets = envSecrets;
|
|
45681
|
+
return true;
|
|
45682
|
+
} catch {
|
|
45683
|
+
return false;
|
|
45684
|
+
}
|
|
45685
|
+
}
|
|
45686
|
+
async function setDefaultSecretsFromEnv(character) {
|
|
45687
|
+
const env2 = detectEnvironment();
|
|
45688
|
+
if (env2 !== "node") {
|
|
45689
|
+
return false;
|
|
45690
|
+
}
|
|
45691
|
+
return loadSecretsNodeImpl(character);
|
|
45692
|
+
}
|
|
45693
|
+
|
|
45648
45694
|
// src/settings.ts
|
|
45649
45695
|
var import_crypto_browserify = __toESM(require_crypto_browserify(), 1);
|
|
45650
45696
|
init_environment();
|
|
@@ -45924,41 +45970,6 @@ function defineService(definition) {
|
|
|
45924
45970
|
return createService(definition.serviceType).withDescription(definition.description).withStart(definition.start).withStop(definition.stop || (() => Promise.resolve())).build();
|
|
45925
45971
|
}
|
|
45926
45972
|
|
|
45927
|
-
// src/secrets.ts
|
|
45928
|
-
init_environment();
|
|
45929
|
-
function hasCharacterSecrets(character) {
|
|
45930
|
-
return Boolean(character?.settings?.secrets && Object.keys(character.settings.secrets).length > 0);
|
|
45931
|
-
}
|
|
45932
|
-
async function loadSecretsNodeImpl(character) {
|
|
45933
|
-
const fs = await import("node:fs");
|
|
45934
|
-
const dotenv = await import("dotenv");
|
|
45935
|
-
const { findEnvFile: findEnvFile2 } = await Promise.resolve().then(() => (init_environment(), exports_environment));
|
|
45936
|
-
if (hasCharacterSecrets(character)) {
|
|
45937
|
-
return false;
|
|
45938
|
-
}
|
|
45939
|
-
const envPath = findEnvFile2();
|
|
45940
|
-
if (!envPath)
|
|
45941
|
-
return false;
|
|
45942
|
-
try {
|
|
45943
|
-
const buf = fs.readFileSync(envPath);
|
|
45944
|
-
const envSecrets = dotenv.parse(buf);
|
|
45945
|
-
if (!character.settings) {
|
|
45946
|
-
character.settings = {};
|
|
45947
|
-
}
|
|
45948
|
-
character.settings.secrets = envSecrets;
|
|
45949
|
-
return true;
|
|
45950
|
-
} catch {
|
|
45951
|
-
return false;
|
|
45952
|
-
}
|
|
45953
|
-
}
|
|
45954
|
-
async function setDefaultSecretsFromEnv(character) {
|
|
45955
|
-
const env2 = detectEnvironment();
|
|
45956
|
-
if (env2 !== "node") {
|
|
45957
|
-
return false;
|
|
45958
|
-
}
|
|
45959
|
-
return loadSecretsNodeImpl(character);
|
|
45960
|
-
}
|
|
45961
|
-
|
|
45962
45973
|
// src/plugin.ts
|
|
45963
45974
|
init_environment();
|
|
45964
45975
|
var attemptedInstalls = new Set;
|
|
@@ -46854,5 +46865,5 @@ export {
|
|
|
46854
46865
|
AgentRuntime
|
|
46855
46866
|
};
|
|
46856
46867
|
|
|
46857
|
-
//# debugId=
|
|
46868
|
+
//# debugId=1077A0FAB3209A6F64756E2164756E21
|
|
46858
46869
|
//# sourceMappingURL=index.node.js.map
|