@exagent/agent 0.1.2 → 0.1.4
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-KJJGA46E.mjs → chunk-3JJNKVB6.mjs} +17 -10
- package/dist/cli.js +17 -10
- package/dist/cli.mjs +1 -1
- package/dist/index.js +17 -10
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-5PQNJMLK.mjs +0 -1816
- package/dist/chunk-6LDEQK7Q.mjs +0 -986
- package/dist/chunk-7WZIS3RL.mjs +0 -1841
- package/dist/chunk-DRHO56RO.mjs +0 -986
- package/dist/chunk-GO5SB4LS.mjs +0 -986
- package/dist/chunk-HXDTXMNM.mjs +0 -1828
- package/dist/chunk-JHXVT7PE.mjs +0 -1090
- package/dist/chunk-JKVX2ZE2.mjs +0 -2593
- package/dist/chunk-JMDWVGDG.mjs +0 -986
- package/dist/chunk-JS7RJORF.mjs +0 -1548
- package/dist/chunk-NTGO2FIV.mjs +0 -1121
- package/dist/chunk-S43QPE3R.mjs +0 -1615
- package/dist/chunk-WDT62ZH4.mjs +0 -1615
- package/dist/chunk-XCTKJAV6.mjs +0 -1061
- package/dist/chunk-YNSV3HXM.mjs +0 -2667
- package/dist/chunk-ZJ7JS4V6.mjs +0 -986
|
@@ -1750,15 +1750,25 @@ var AgentRuntime = class {
|
|
|
1750
1750
|
const agent = await this.client.registry.getAgent(agentId);
|
|
1751
1751
|
if (agent?.owner.toLowerCase() !== address.toLowerCase()) {
|
|
1752
1752
|
const ccUrl = `https://exagent.io/agents/${encodeURIComponent(this.config.name)}/command-center`;
|
|
1753
|
+
const nonce = await this.client.registry.getNonce(address);
|
|
1754
|
+
const linkMessage = ExagentRegistry.generateLinkMessage(
|
|
1755
|
+
address,
|
|
1756
|
+
agentId,
|
|
1757
|
+
nonce
|
|
1758
|
+
);
|
|
1759
|
+
const linkSignature = await this.client.signMessage(linkMessage);
|
|
1753
1760
|
console.log("");
|
|
1754
1761
|
console.log("=== WALLET LINKING REQUIRED ===");
|
|
1755
1762
|
console.log("");
|
|
1756
|
-
console.log(` Agent owner: ${agent?.owner}`);
|
|
1757
|
-
console.log(` Trading wallet: ${address}`);
|
|
1758
|
-
console.log("");
|
|
1759
1763
|
console.log(" Your trading wallet needs to be linked to your agent.");
|
|
1760
|
-
console.log("
|
|
1761
|
-
console.log(
|
|
1764
|
+
console.log(" Open the command center and paste the values below.");
|
|
1765
|
+
console.log("");
|
|
1766
|
+
console.log(` Command Center: ${ccUrl}`);
|
|
1767
|
+
console.log("");
|
|
1768
|
+
console.log(" \u2500\u2500 Copy these two values \u2500\u2500");
|
|
1769
|
+
console.log("");
|
|
1770
|
+
console.log(` Wallet: ${address}`);
|
|
1771
|
+
console.log(` Signature: ${linkSignature}`);
|
|
1762
1772
|
console.log("");
|
|
1763
1773
|
openBrowser(ccUrl);
|
|
1764
1774
|
console.log(" Waiting for wallet to be linked... (checking every 15s)");
|
|
@@ -2356,10 +2366,7 @@ function loadConfig(configPath) {
|
|
|
2356
2366
|
const rawConfig = JSON.parse(readFileSync(fullPath, "utf-8"));
|
|
2357
2367
|
const config = AgentConfigSchema.parse(rawConfig);
|
|
2358
2368
|
const privateKey = process.env.EXAGENT_PRIVATE_KEY;
|
|
2359
|
-
if (!privateKey) {
|
|
2360
|
-
throw new Error("EXAGENT_PRIVATE_KEY not set in environment");
|
|
2361
|
-
}
|
|
2362
|
-
if (!privateKey.startsWith("0x") || privateKey.length !== 66) {
|
|
2369
|
+
if (privateKey && (!privateKey.startsWith("0x") || privateKey.length !== 66)) {
|
|
2363
2370
|
throw new Error("EXAGENT_PRIVATE_KEY must be a valid 32-byte hex string starting with 0x");
|
|
2364
2371
|
}
|
|
2365
2372
|
const llmConfig = { ...config.llm };
|
|
@@ -2395,7 +2402,7 @@ function loadConfig(configPath) {
|
|
|
2395
2402
|
...config,
|
|
2396
2403
|
llm: llmConfig,
|
|
2397
2404
|
network,
|
|
2398
|
-
privateKey
|
|
2405
|
+
privateKey: privateKey || ""
|
|
2399
2406
|
};
|
|
2400
2407
|
}
|
|
2401
2408
|
function validateConfig(config) {
|
package/dist/cli.js
CHANGED
|
@@ -1771,15 +1771,25 @@ var AgentRuntime = class {
|
|
|
1771
1771
|
const agent = await this.client.registry.getAgent(agentId);
|
|
1772
1772
|
if (agent?.owner.toLowerCase() !== address.toLowerCase()) {
|
|
1773
1773
|
const ccUrl = `https://exagent.io/agents/${encodeURIComponent(this.config.name)}/command-center`;
|
|
1774
|
+
const nonce = await this.client.registry.getNonce(address);
|
|
1775
|
+
const linkMessage = import_sdk.ExagentRegistry.generateLinkMessage(
|
|
1776
|
+
address,
|
|
1777
|
+
agentId,
|
|
1778
|
+
nonce
|
|
1779
|
+
);
|
|
1780
|
+
const linkSignature = await this.client.signMessage(linkMessage);
|
|
1774
1781
|
console.log("");
|
|
1775
1782
|
console.log("=== WALLET LINKING REQUIRED ===");
|
|
1776
1783
|
console.log("");
|
|
1777
|
-
console.log(` Agent owner: ${agent?.owner}`);
|
|
1778
|
-
console.log(` Trading wallet: ${address}`);
|
|
1779
|
-
console.log("");
|
|
1780
1784
|
console.log(" Your trading wallet needs to be linked to your agent.");
|
|
1781
|
-
console.log("
|
|
1782
|
-
console.log(
|
|
1785
|
+
console.log(" Open the command center and paste the values below.");
|
|
1786
|
+
console.log("");
|
|
1787
|
+
console.log(` Command Center: ${ccUrl}`);
|
|
1788
|
+
console.log("");
|
|
1789
|
+
console.log(" \u2500\u2500 Copy these two values \u2500\u2500");
|
|
1790
|
+
console.log("");
|
|
1791
|
+
console.log(` Wallet: ${address}`);
|
|
1792
|
+
console.log(` Signature: ${linkSignature}`);
|
|
1783
1793
|
console.log("");
|
|
1784
1794
|
openBrowser(ccUrl);
|
|
1785
1795
|
console.log(" Waiting for wallet to be linked... (checking every 15s)");
|
|
@@ -2379,10 +2389,7 @@ function loadConfig(configPath) {
|
|
|
2379
2389
|
const rawConfig = JSON.parse((0, import_fs2.readFileSync)(fullPath, "utf-8"));
|
|
2380
2390
|
const config = AgentConfigSchema.parse(rawConfig);
|
|
2381
2391
|
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) {
|
|
2392
|
+
if (privateKey && (!privateKey.startsWith("0x") || privateKey.length !== 66)) {
|
|
2386
2393
|
throw new Error("EXAGENT_PRIVATE_KEY must be a valid 32-byte hex string starting with 0x");
|
|
2387
2394
|
}
|
|
2388
2395
|
const llmConfig = { ...config.llm };
|
|
@@ -2418,7 +2425,7 @@ function loadConfig(configPath) {
|
|
|
2418
2425
|
...config,
|
|
2419
2426
|
llm: llmConfig,
|
|
2420
2427
|
network,
|
|
2421
|
-
privateKey
|
|
2428
|
+
privateKey: privateKey || ""
|
|
2422
2429
|
};
|
|
2423
2430
|
}
|
|
2424
2431
|
function validateConfig(config) {
|
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1815,15 +1815,25 @@ var AgentRuntime = class {
|
|
|
1815
1815
|
const agent = await this.client.registry.getAgent(agentId);
|
|
1816
1816
|
if (agent?.owner.toLowerCase() !== address.toLowerCase()) {
|
|
1817
1817
|
const ccUrl = `https://exagent.io/agents/${encodeURIComponent(this.config.name)}/command-center`;
|
|
1818
|
+
const nonce = await this.client.registry.getNonce(address);
|
|
1819
|
+
const linkMessage = import_sdk.ExagentRegistry.generateLinkMessage(
|
|
1820
|
+
address,
|
|
1821
|
+
agentId,
|
|
1822
|
+
nonce
|
|
1823
|
+
);
|
|
1824
|
+
const linkSignature = await this.client.signMessage(linkMessage);
|
|
1818
1825
|
console.log("");
|
|
1819
1826
|
console.log("=== WALLET LINKING REQUIRED ===");
|
|
1820
1827
|
console.log("");
|
|
1821
|
-
console.log(` Agent owner: ${agent?.owner}`);
|
|
1822
|
-
console.log(` Trading wallet: ${address}`);
|
|
1823
|
-
console.log("");
|
|
1824
1828
|
console.log(" Your trading wallet needs to be linked to your agent.");
|
|
1825
|
-
console.log("
|
|
1826
|
-
console.log(
|
|
1829
|
+
console.log(" Open the command center and paste the values below.");
|
|
1830
|
+
console.log("");
|
|
1831
|
+
console.log(` Command Center: ${ccUrl}`);
|
|
1832
|
+
console.log("");
|
|
1833
|
+
console.log(" \u2500\u2500 Copy these two values \u2500\u2500");
|
|
1834
|
+
console.log("");
|
|
1835
|
+
console.log(` Wallet: ${address}`);
|
|
1836
|
+
console.log(` Signature: ${linkSignature}`);
|
|
1827
1837
|
console.log("");
|
|
1828
1838
|
openBrowser(ccUrl);
|
|
1829
1839
|
console.log(" Waiting for wallet to be linked... (checking every 15s)");
|
|
@@ -2423,10 +2433,7 @@ function loadConfig(configPath) {
|
|
|
2423
2433
|
const rawConfig = JSON.parse((0, import_fs2.readFileSync)(fullPath, "utf-8"));
|
|
2424
2434
|
const config = AgentConfigSchema.parse(rawConfig);
|
|
2425
2435
|
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) {
|
|
2436
|
+
if (privateKey && (!privateKey.startsWith("0x") || privateKey.length !== 66)) {
|
|
2430
2437
|
throw new Error("EXAGENT_PRIVATE_KEY must be a valid 32-byte hex string starting with 0x");
|
|
2431
2438
|
}
|
|
2432
2439
|
const llmConfig = { ...config.llm };
|
|
@@ -2462,7 +2469,7 @@ function loadConfig(configPath) {
|
|
|
2462
2469
|
...config,
|
|
2463
2470
|
llm: llmConfig,
|
|
2464
2471
|
network,
|
|
2465
|
-
privateKey
|
|
2472
|
+
privateKey: privateKey || ""
|
|
2466
2473
|
};
|
|
2467
2474
|
}
|
|
2468
2475
|
function validateConfig(config) {
|
package/dist/index.mjs
CHANGED