@exagent/agent 0.1.2 → 0.1.3
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/chunk-JIXMEAUD.mjs +2663 -0
- package/dist/cli.js +2 -5
- package/dist/cli.mjs +1 -1
- package/dist/index.js +2 -5
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2379,10 +2379,7 @@ function loadConfig(configPath) {
|
|
|
2379
2379
|
const rawConfig = JSON.parse((0, import_fs2.readFileSync)(fullPath, "utf-8"));
|
|
2380
2380
|
const config = AgentConfigSchema.parse(rawConfig);
|
|
2381
2381
|
const privateKey = process.env.EXAGENT_PRIVATE_KEY;
|
|
2382
|
-
if (!privateKey) {
|
|
2383
|
-
throw new Error("EXAGENT_PRIVATE_KEY not set in environment");
|
|
2384
|
-
}
|
|
2385
|
-
if (!privateKey.startsWith("0x") || privateKey.length !== 66) {
|
|
2382
|
+
if (privateKey && (!privateKey.startsWith("0x") || privateKey.length !== 66)) {
|
|
2386
2383
|
throw new Error("EXAGENT_PRIVATE_KEY must be a valid 32-byte hex string starting with 0x");
|
|
2387
2384
|
}
|
|
2388
2385
|
const llmConfig = { ...config.llm };
|
|
@@ -2418,7 +2415,7 @@ function loadConfig(configPath) {
|
|
|
2418
2415
|
...config,
|
|
2419
2416
|
llm: llmConfig,
|
|
2420
2417
|
network,
|
|
2421
|
-
privateKey
|
|
2418
|
+
privateKey: privateKey || ""
|
|
2422
2419
|
};
|
|
2423
2420
|
}
|
|
2424
2421
|
function validateConfig(config) {
|
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -2423,10 +2423,7 @@ function loadConfig(configPath) {
|
|
|
2423
2423
|
const rawConfig = JSON.parse((0, import_fs2.readFileSync)(fullPath, "utf-8"));
|
|
2424
2424
|
const config = AgentConfigSchema.parse(rawConfig);
|
|
2425
2425
|
const privateKey = process.env.EXAGENT_PRIVATE_KEY;
|
|
2426
|
-
if (!privateKey) {
|
|
2427
|
-
throw new Error("EXAGENT_PRIVATE_KEY not set in environment");
|
|
2428
|
-
}
|
|
2429
|
-
if (!privateKey.startsWith("0x") || privateKey.length !== 66) {
|
|
2426
|
+
if (privateKey && (!privateKey.startsWith("0x") || privateKey.length !== 66)) {
|
|
2430
2427
|
throw new Error("EXAGENT_PRIVATE_KEY must be a valid 32-byte hex string starting with 0x");
|
|
2431
2428
|
}
|
|
2432
2429
|
const llmConfig = { ...config.llm };
|
|
@@ -2462,7 +2459,7 @@ function loadConfig(configPath) {
|
|
|
2462
2459
|
...config,
|
|
2463
2460
|
llm: llmConfig,
|
|
2464
2461
|
network,
|
|
2465
|
-
privateKey
|
|
2462
|
+
privateKey: privateKey || ""
|
|
2466
2463
|
};
|
|
2467
2464
|
}
|
|
2468
2465
|
function validateConfig(config) {
|
package/dist/index.mjs
CHANGED