@exagent/agent 0.1.28 → 0.1.29
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-AEPTFRZ4.mjs +5441 -0
- package/dist/cli.js +8 -7
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -7
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -237,7 +237,7 @@ var MarketDataService = class {
|
|
|
237
237
|
constructor(rpcUrl) {
|
|
238
238
|
this.rpcUrl = rpcUrl;
|
|
239
239
|
this.client = (0, import_viem.createPublicClient)({
|
|
240
|
-
transport: (0, import_viem.http)(rpcUrl)
|
|
240
|
+
transport: (0, import_viem.http)(rpcUrl, { timeout: 6e4 })
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
/** Cached volume data */
|
|
@@ -2198,14 +2198,15 @@ var VaultManager = class {
|
|
|
2198
2198
|
this.account = (0, import_accounts.privateKeyToAccount)(config.walletKey);
|
|
2199
2199
|
this.chain = import_chains.base;
|
|
2200
2200
|
const rpcUrl = getRpcUrl();
|
|
2201
|
+
const transport = (0, import_viem2.http)(rpcUrl, { timeout: 6e4 });
|
|
2201
2202
|
this.publicClient = (0, import_viem2.createPublicClient)({
|
|
2202
2203
|
chain: this.chain,
|
|
2203
|
-
transport
|
|
2204
|
+
transport
|
|
2204
2205
|
});
|
|
2205
2206
|
this.walletClient = (0, import_viem2.createWalletClient)({
|
|
2206
2207
|
account: this.account,
|
|
2207
2208
|
chain: this.chain,
|
|
2208
|
-
transport
|
|
2209
|
+
transport
|
|
2209
2210
|
});
|
|
2210
2211
|
if (this.addresses.vaultFactory === "0x0000000000000000000000000000000000000000") {
|
|
2211
2212
|
console.warn("VaultFactory address is zero \u2014 vault operations will be disabled");
|
|
@@ -3307,7 +3308,7 @@ var PerpTradeRecorder = class {
|
|
|
3307
3308
|
this.configHash = opts.configHash;
|
|
3308
3309
|
this.account = (0, import_accounts2.privateKeyToAccount)(opts.privateKey);
|
|
3309
3310
|
const rpcUrl = opts.rpcUrl || "https://mainnet.base.org";
|
|
3310
|
-
const transport = (0, import_viem4.http)(rpcUrl);
|
|
3311
|
+
const transport = (0, import_viem4.http)(rpcUrl, { timeout: 6e4 });
|
|
3311
3312
|
this.publicClient = (0, import_viem4.createPublicClient)({
|
|
3312
3313
|
chain: import_chains2.base,
|
|
3313
3314
|
transport
|
|
@@ -3825,7 +3826,7 @@ function loadSecureEnv(basePath, passphrase) {
|
|
|
3825
3826
|
}
|
|
3826
3827
|
|
|
3827
3828
|
// src/index.ts
|
|
3828
|
-
var AGENT_VERSION = "0.1.
|
|
3829
|
+
var AGENT_VERSION = "0.1.29";
|
|
3829
3830
|
|
|
3830
3831
|
// src/relay.ts
|
|
3831
3832
|
var RelayClient = class {
|
|
@@ -4276,7 +4277,7 @@ var AgentRuntime = class {
|
|
|
4276
4277
|
const account = (0, import_accounts5.privateKeyToAccount)(perpKey);
|
|
4277
4278
|
const walletClient = (0, import_viem6.createWalletClient)({
|
|
4278
4279
|
chain: { id: 42161, name: "Arbitrum", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://arb1.arbitrum.io/rpc"] } } },
|
|
4279
|
-
transport: (0, import_viem6.http)("https://arb1.arbitrum.io/rpc"),
|
|
4280
|
+
transport: (0, import_viem6.http)("https://arb1.arbitrum.io/rpc", { timeout: 6e4 }),
|
|
4280
4281
|
account
|
|
4281
4282
|
});
|
|
4282
4283
|
this.perpSigner = new HyperliquidSigner(walletClient);
|
|
@@ -4514,7 +4515,7 @@ var AgentRuntime = class {
|
|
|
4514
4515
|
const ccUrl = `https://exagent.io/agents/${encodeURIComponent(this.config.name)}/command-center`;
|
|
4515
4516
|
const publicClientInstance = (0, import_viem6.createPublicClient)({
|
|
4516
4517
|
chain: import_chains4.base,
|
|
4517
|
-
transport: (0, import_viem6.http)(this.getRpcUrl())
|
|
4518
|
+
transport: (0, import_viem6.http)(this.getRpcUrl(), { timeout: 6e4 })
|
|
4518
4519
|
});
|
|
4519
4520
|
console.log("");
|
|
4520
4521
|
console.log("=== ETH NEEDED FOR GAS ===");
|
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -2107,6 +2107,6 @@ declare function decryptEnvFile(encPath: string, passphrase: string): Record<str
|
|
|
2107
2107
|
declare function loadSecureEnv(basePath: string, passphrase?: string): boolean;
|
|
2108
2108
|
|
|
2109
2109
|
/** @exagent/agent package version — update alongside package.json */
|
|
2110
|
-
declare const AGENT_VERSION = "0.1.
|
|
2110
|
+
declare const AGENT_VERSION = "0.1.29";
|
|
2111
2111
|
|
|
2112
2112
|
export { AGENT_VERSION, type AccountSummary, type AgentConfig, AgentConfigSchema, type AgentMode, AgentRuntime, type AgentStatusPayload, AnthropicAdapter, BaseLLMAdapter, type CommandType, DeepSeekAdapter, FileStore, type FillCallback, type FundingCallback, type FundingPayment, GoogleAdapter, GroqAdapter, HYPERLIQUID_DOMAIN, HyperliquidClient, HyperliquidSigner, HyperliquidWebSocket, type LLMAdapter, type LLMConfig, LLMConfigSchema, type LLMMessage, type LLMMetadata, type LLMProvider, LLMProviderSchema, type LLMResponse, type LiquidationCallback, type MarketData, MarketDataService, type MessageLevel, type MessageType, MistralAdapter, OllamaAdapter, type OnboardingStatus, OpenAIAdapter, OrderManager, type OrderResult, type PerpAction, type PerpConfig$1 as PerpConfig, PerpConfigSchema, type PerpFill, type PerpMarketData, PerpOnboarding, type PerpPosition, type PerpStrategyFunction, PerpTradeRecorder, type PerpTradeSignal, type PerpConfig as PerpTradingConfig, PositionManager, type PositionSummary, PositionTracker, type RecordPerpTradeParams, RelayClient, type RelayCommand, type RelayConfig$1 as RelayConfig, RelayConfigSchema, RiskManager, type RiskState, type RiskUniverse, RiskUniverseSchema, type RuntimeConfig, STRATEGY_TEMPLATES, type StrategyContext, type StrategyFunction, type StrategyStore, type StrategyTemplate, TogetherAdapter, type TrackedPosition, TradeExecutor, type TradeRecord, type TradeSignal, type TradingConfig, TradingConfigSchema, type VaultConfig, VaultConfigSchema, VaultManager, type VaultManagerConfig, type VaultPolicy, VaultPolicySchema, type VaultStatus, createLLMAdapter, createSampleConfig, decryptEnvFile, encryptEnvFile, fillHashToBytes32, fillOidToBytes32, getAllStrategyTemplates, getNextNonce, getStrategyTemplate, loadConfig, loadSecureEnv, loadStrategy, validateConfig, validateStrategy };
|
package/dist/index.d.ts
CHANGED
|
@@ -2107,6 +2107,6 @@ declare function decryptEnvFile(encPath: string, passphrase: string): Record<str
|
|
|
2107
2107
|
declare function loadSecureEnv(basePath: string, passphrase?: string): boolean;
|
|
2108
2108
|
|
|
2109
2109
|
/** @exagent/agent package version — update alongside package.json */
|
|
2110
|
-
declare const AGENT_VERSION = "0.1.
|
|
2110
|
+
declare const AGENT_VERSION = "0.1.29";
|
|
2111
2111
|
|
|
2112
2112
|
export { AGENT_VERSION, type AccountSummary, type AgentConfig, AgentConfigSchema, type AgentMode, AgentRuntime, type AgentStatusPayload, AnthropicAdapter, BaseLLMAdapter, type CommandType, DeepSeekAdapter, FileStore, type FillCallback, type FundingCallback, type FundingPayment, GoogleAdapter, GroqAdapter, HYPERLIQUID_DOMAIN, HyperliquidClient, HyperliquidSigner, HyperliquidWebSocket, type LLMAdapter, type LLMConfig, LLMConfigSchema, type LLMMessage, type LLMMetadata, type LLMProvider, LLMProviderSchema, type LLMResponse, type LiquidationCallback, type MarketData, MarketDataService, type MessageLevel, type MessageType, MistralAdapter, OllamaAdapter, type OnboardingStatus, OpenAIAdapter, OrderManager, type OrderResult, type PerpAction, type PerpConfig$1 as PerpConfig, PerpConfigSchema, type PerpFill, type PerpMarketData, PerpOnboarding, type PerpPosition, type PerpStrategyFunction, PerpTradeRecorder, type PerpTradeSignal, type PerpConfig as PerpTradingConfig, PositionManager, type PositionSummary, PositionTracker, type RecordPerpTradeParams, RelayClient, type RelayCommand, type RelayConfig$1 as RelayConfig, RelayConfigSchema, RiskManager, type RiskState, type RiskUniverse, RiskUniverseSchema, type RuntimeConfig, STRATEGY_TEMPLATES, type StrategyContext, type StrategyFunction, type StrategyStore, type StrategyTemplate, TogetherAdapter, type TrackedPosition, TradeExecutor, type TradeRecord, type TradeSignal, type TradingConfig, TradingConfigSchema, type VaultConfig, VaultConfigSchema, VaultManager, type VaultManagerConfig, type VaultPolicy, VaultPolicySchema, type VaultStatus, createLLMAdapter, createSampleConfig, decryptEnvFile, encryptEnvFile, fillHashToBytes32, fillOidToBytes32, getAllStrategyTemplates, getNextNonce, getStrategyTemplate, loadConfig, loadSecureEnv, loadStrategy, validateConfig, validateStrategy };
|
package/dist/index.js
CHANGED
|
@@ -290,7 +290,7 @@ var MarketDataService = class {
|
|
|
290
290
|
constructor(rpcUrl) {
|
|
291
291
|
this.rpcUrl = rpcUrl;
|
|
292
292
|
this.client = (0, import_viem.createPublicClient)({
|
|
293
|
-
transport: (0, import_viem.http)(rpcUrl)
|
|
293
|
+
transport: (0, import_viem.http)(rpcUrl, { timeout: 6e4 })
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
296
|
/** Cached volume data */
|
|
@@ -2286,14 +2286,15 @@ var VaultManager = class {
|
|
|
2286
2286
|
this.account = (0, import_accounts.privateKeyToAccount)(config.walletKey);
|
|
2287
2287
|
this.chain = import_chains.base;
|
|
2288
2288
|
const rpcUrl = getRpcUrl();
|
|
2289
|
+
const transport = (0, import_viem2.http)(rpcUrl, { timeout: 6e4 });
|
|
2289
2290
|
this.publicClient = (0, import_viem2.createPublicClient)({
|
|
2290
2291
|
chain: this.chain,
|
|
2291
|
-
transport
|
|
2292
|
+
transport
|
|
2292
2293
|
});
|
|
2293
2294
|
this.walletClient = (0, import_viem2.createWalletClient)({
|
|
2294
2295
|
account: this.account,
|
|
2295
2296
|
chain: this.chain,
|
|
2296
|
-
transport
|
|
2297
|
+
transport
|
|
2297
2298
|
});
|
|
2298
2299
|
if (this.addresses.vaultFactory === "0x0000000000000000000000000000000000000000") {
|
|
2299
2300
|
console.warn("VaultFactory address is zero \u2014 vault operations will be disabled");
|
|
@@ -3660,7 +3661,7 @@ var PerpTradeRecorder = class {
|
|
|
3660
3661
|
this.configHash = opts.configHash;
|
|
3661
3662
|
this.account = (0, import_accounts3.privateKeyToAccount)(opts.privateKey);
|
|
3662
3663
|
const rpcUrl = opts.rpcUrl || "https://mainnet.base.org";
|
|
3663
|
-
const transport = (0, import_viem4.http)(rpcUrl);
|
|
3664
|
+
const transport = (0, import_viem4.http)(rpcUrl, { timeout: 6e4 });
|
|
3664
3665
|
this.publicClient = (0, import_viem4.createPublicClient)({
|
|
3665
3666
|
chain: import_chains2.base,
|
|
3666
3667
|
transport
|
|
@@ -4178,7 +4179,7 @@ var AgentRuntime = class {
|
|
|
4178
4179
|
const account = (0, import_accounts5.privateKeyToAccount)(perpKey);
|
|
4179
4180
|
const walletClient = (0, import_viem6.createWalletClient)({
|
|
4180
4181
|
chain: { id: 42161, name: "Arbitrum", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://arb1.arbitrum.io/rpc"] } } },
|
|
4181
|
-
transport: (0, import_viem6.http)("https://arb1.arbitrum.io/rpc"),
|
|
4182
|
+
transport: (0, import_viem6.http)("https://arb1.arbitrum.io/rpc", { timeout: 6e4 }),
|
|
4182
4183
|
account
|
|
4183
4184
|
});
|
|
4184
4185
|
this.perpSigner = new HyperliquidSigner(walletClient);
|
|
@@ -4416,7 +4417,7 @@ var AgentRuntime = class {
|
|
|
4416
4417
|
const ccUrl = `https://exagent.io/agents/${encodeURIComponent(this.config.name)}/command-center`;
|
|
4417
4418
|
const publicClientInstance = (0, import_viem6.createPublicClient)({
|
|
4418
4419
|
chain: import_chains4.base,
|
|
4419
|
-
transport: (0, import_viem6.http)(this.getRpcUrl())
|
|
4420
|
+
transport: (0, import_viem6.http)(this.getRpcUrl(), { timeout: 6e4 })
|
|
4420
4421
|
});
|
|
4421
4422
|
console.log("");
|
|
4422
4423
|
console.log("=== ETH NEEDED FOR GAS ===");
|
|
@@ -5452,7 +5453,7 @@ function loadSecureEnv(basePath, passphrase) {
|
|
|
5452
5453
|
}
|
|
5453
5454
|
|
|
5454
5455
|
// src/index.ts
|
|
5455
|
-
var AGENT_VERSION = "0.1.
|
|
5456
|
+
var AGENT_VERSION = "0.1.29";
|
|
5456
5457
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5457
5458
|
0 && (module.exports = {
|
|
5458
5459
|
AGENT_VERSION,
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exagent/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"description": "Autonomous trading agent runtime for Exagent",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"clean": "rm -rf dist"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@exagent/sdk": "^0.1.
|
|
32
|
+
"@exagent/sdk": "^0.1.14",
|
|
33
33
|
"@nktkas/hyperliquid": "^0.31.0",
|
|
34
34
|
"chalk": "^5.3.0",
|
|
35
35
|
"commander": "^12.0.0",
|