@exagent/agent 0.1.27 → 0.1.28
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-62GBXQNP.mjs +5440 -0
- package/dist/chunk-DJSKKFTP.mjs +5440 -0
- package/dist/cli.js +30 -3
- package/dist/cli.mjs +29 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/templates/.env.template +11 -0
package/dist/cli.js
CHANGED
|
@@ -1661,7 +1661,7 @@ function validateConfig(config) {
|
|
|
1661
1661
|
throw new Error("Valid agent ID required");
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
|
-
var DEFAULT_RPC_URL = "https://base
|
|
1664
|
+
var DEFAULT_RPC_URL = "https://mainnet.base.org";
|
|
1665
1665
|
function getRpcUrl() {
|
|
1666
1666
|
return process.env.BASE_RPC_URL || process.env.EXAGENT_RPC_URL || DEFAULT_RPC_URL;
|
|
1667
1667
|
}
|
|
@@ -3825,7 +3825,7 @@ function loadSecureEnv(basePath, passphrase) {
|
|
|
3825
3825
|
}
|
|
3826
3826
|
|
|
3827
3827
|
// src/index.ts
|
|
3828
|
-
var AGENT_VERSION = "0.1.
|
|
3828
|
+
var AGENT_VERSION = "0.1.28";
|
|
3829
3829
|
|
|
3830
3830
|
// src/relay.ts
|
|
3831
3831
|
var RelayClient = class {
|
|
@@ -5558,6 +5558,33 @@ async function checkFirstRunSetup(configPath) {
|
|
|
5558
5558
|
llmEnvVar = `${provider.envVar}=${llmApiKey}
|
|
5559
5559
|
`;
|
|
5560
5560
|
}
|
|
5561
|
+
console.log("");
|
|
5562
|
+
console.log("[RPC] Base network RPC endpoint.");
|
|
5563
|
+
console.log("");
|
|
5564
|
+
console.log(" Your agent sends transactions through an RPC provider.");
|
|
5565
|
+
console.log(" The default (mainnet.base.org) works but has rate limits.");
|
|
5566
|
+
console.log(" A dedicated RPC gives faster transactions and fewer timeouts.");
|
|
5567
|
+
console.log("");
|
|
5568
|
+
console.log(" Free RPC providers:");
|
|
5569
|
+
console.log(" dRPC https://drpc.org (10.5M req/month free)");
|
|
5570
|
+
console.log(" Alchemy https://alchemy.com (30M compute units free)");
|
|
5571
|
+
console.log(" Infura https://infura.io (100K req/day free)");
|
|
5572
|
+
console.log(" Ankr https://ankr.com (generous free tier)");
|
|
5573
|
+
console.log("");
|
|
5574
|
+
console.log(" Sign up, create a Base mainnet endpoint, and paste the URL.");
|
|
5575
|
+
console.log("");
|
|
5576
|
+
const rpcUrl = await prompt(" RPC URL (or Enter for default): ");
|
|
5577
|
+
let rpcEnvVar = "";
|
|
5578
|
+
if (rpcUrl && rpcUrl.trim()) {
|
|
5579
|
+
rpcEnvVar = `BASE_RPC_URL=${rpcUrl.trim()}
|
|
5580
|
+
`;
|
|
5581
|
+
console.log("");
|
|
5582
|
+
console.log(` Using custom RPC: ${rpcUrl.trim()}`);
|
|
5583
|
+
} else {
|
|
5584
|
+
console.log("");
|
|
5585
|
+
console.log(" Using default: https://mainnet.base.org");
|
|
5586
|
+
console.log(" You can change this later by adding BASE_RPC_URL to your .env");
|
|
5587
|
+
}
|
|
5561
5588
|
const envContent = `# Exagent Agent Configuration
|
|
5562
5589
|
# Agent: ${config.name}
|
|
5563
5590
|
# Agent ID: ${config.agentId}
|
|
@@ -5569,7 +5596,7 @@ EXAGENT_PRIVATE_KEY=${privateKey}
|
|
|
5569
5596
|
|
|
5570
5597
|
# Network
|
|
5571
5598
|
EXAGENT_NETWORK=${config.network || "mainnet"}
|
|
5572
|
-
|
|
5599
|
+
${rpcEnvVar}
|
|
5573
5600
|
# LLM (${llmProvider})
|
|
5574
5601
|
${llmEnvVar}EXAGENT_LLM_MODEL=${config.llm?.model || ""}
|
|
5575
5602
|
`;
|
package/dist/cli.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
loadConfig,
|
|
7
7
|
loadSecureEnv,
|
|
8
8
|
validateConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-62GBXQNP.mjs";
|
|
10
10
|
|
|
11
11
|
// src/cli.ts
|
|
12
12
|
import { Command } from "commander";
|
|
@@ -206,6 +206,33 @@ async function checkFirstRunSetup(configPath) {
|
|
|
206
206
|
llmEnvVar = `${provider.envVar}=${llmApiKey}
|
|
207
207
|
`;
|
|
208
208
|
}
|
|
209
|
+
console.log("");
|
|
210
|
+
console.log("[RPC] Base network RPC endpoint.");
|
|
211
|
+
console.log("");
|
|
212
|
+
console.log(" Your agent sends transactions through an RPC provider.");
|
|
213
|
+
console.log(" The default (mainnet.base.org) works but has rate limits.");
|
|
214
|
+
console.log(" A dedicated RPC gives faster transactions and fewer timeouts.");
|
|
215
|
+
console.log("");
|
|
216
|
+
console.log(" Free RPC providers:");
|
|
217
|
+
console.log(" dRPC https://drpc.org (10.5M req/month free)");
|
|
218
|
+
console.log(" Alchemy https://alchemy.com (30M compute units free)");
|
|
219
|
+
console.log(" Infura https://infura.io (100K req/day free)");
|
|
220
|
+
console.log(" Ankr https://ankr.com (generous free tier)");
|
|
221
|
+
console.log("");
|
|
222
|
+
console.log(" Sign up, create a Base mainnet endpoint, and paste the URL.");
|
|
223
|
+
console.log("");
|
|
224
|
+
const rpcUrl = await prompt(" RPC URL (or Enter for default): ");
|
|
225
|
+
let rpcEnvVar = "";
|
|
226
|
+
if (rpcUrl && rpcUrl.trim()) {
|
|
227
|
+
rpcEnvVar = `BASE_RPC_URL=${rpcUrl.trim()}
|
|
228
|
+
`;
|
|
229
|
+
console.log("");
|
|
230
|
+
console.log(` Using custom RPC: ${rpcUrl.trim()}`);
|
|
231
|
+
} else {
|
|
232
|
+
console.log("");
|
|
233
|
+
console.log(" Using default: https://mainnet.base.org");
|
|
234
|
+
console.log(" You can change this later by adding BASE_RPC_URL to your .env");
|
|
235
|
+
}
|
|
209
236
|
const envContent = `# Exagent Agent Configuration
|
|
210
237
|
# Agent: ${config.name}
|
|
211
238
|
# Agent ID: ${config.agentId}
|
|
@@ -217,7 +244,7 @@ EXAGENT_PRIVATE_KEY=${privateKey}
|
|
|
217
244
|
|
|
218
245
|
# Network
|
|
219
246
|
EXAGENT_NETWORK=${config.network || "mainnet"}
|
|
220
|
-
|
|
247
|
+
${rpcEnvVar}
|
|
221
248
|
# LLM (${llmProvider})
|
|
222
249
|
${llmEnvVar}EXAGENT_LLM_MODEL=${config.llm?.model || ""}
|
|
223
250
|
`;
|
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.28";
|
|
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.28";
|
|
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
|
@@ -1720,7 +1720,7 @@ function validateConfig(config) {
|
|
|
1720
1720
|
throw new Error("Valid agent ID required");
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
|
-
var DEFAULT_RPC_URL = "https://base
|
|
1723
|
+
var DEFAULT_RPC_URL = "https://mainnet.base.org";
|
|
1724
1724
|
function getRpcUrl() {
|
|
1725
1725
|
return process.env.BASE_RPC_URL || process.env.EXAGENT_RPC_URL || DEFAULT_RPC_URL;
|
|
1726
1726
|
}
|
|
@@ -5452,7 +5452,7 @@ function loadSecureEnv(basePath, passphrase) {
|
|
|
5452
5452
|
}
|
|
5453
5453
|
|
|
5454
5454
|
// src/index.ts
|
|
5455
|
-
var AGENT_VERSION = "0.1.
|
|
5455
|
+
var AGENT_VERSION = "0.1.28";
|
|
5456
5456
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5457
5457
|
0 && (module.exports = {
|
|
5458
5458
|
AGENT_VERSION,
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
package/templates/.env.template
CHANGED
|
@@ -20,6 +20,17 @@ EXAGENT_PRIVATE_KEY=
|
|
|
20
20
|
# Base mainnet
|
|
21
21
|
EXAGENT_NETWORK=mainnet
|
|
22
22
|
|
|
23
|
+
# ============================================
|
|
24
|
+
# RPC Provider (recommended)
|
|
25
|
+
# ============================================
|
|
26
|
+
# Default: https://mainnet.base.org (Coinbase official, rate-limited)
|
|
27
|
+
# For better performance, use a dedicated RPC provider:
|
|
28
|
+
# dRPC: https://drpc.org (10.5M req/month free)
|
|
29
|
+
# Alchemy: https://alchemy.com (30M compute units free)
|
|
30
|
+
# Infura: https://infura.io (100K req/day free)
|
|
31
|
+
# Ankr: https://ankr.com (generous free tier)
|
|
32
|
+
# BASE_RPC_URL=https://lb.drpc.org/ogrpc?network=base&dkey=YOUR_KEY
|
|
33
|
+
|
|
23
34
|
# ============================================
|
|
24
35
|
# LLM API Keys (choose one based on your config)
|
|
25
36
|
# ============================================
|