@exagent/agent 0.1.24 → 0.1.26

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/cli.js CHANGED
@@ -1735,7 +1735,7 @@ var RiskManager = class {
1735
1735
  const maxPositionValue = marketData.portfolioValue * this.config.maxPositionSizeBps / 1e4;
1736
1736
  if (signalValue > maxPositionValue) {
1737
1737
  console.warn(
1738
- `Signal exceeds position limit: ${signalValue.toFixed(2)} > ${maxPositionValue.toFixed(2)}`
1738
+ `Signal exceeds position limit: $${signalValue.toFixed(2)} USD > $${maxPositionValue.toFixed(2)} USD max (${this.config.maxPositionSizeBps / 100}% of $${marketData.portfolioValue.toFixed(2)} portfolio). Check that amountIn is denominated in token wei, not USD.`
1739
1739
  );
1740
1740
  return false;
1741
1741
  }
@@ -3704,7 +3704,7 @@ function loadSecureEnv(basePath, passphrase) {
3704
3704
  }
3705
3705
 
3706
3706
  // src/index.ts
3707
- var AGENT_VERSION = "0.1.24";
3707
+ var AGENT_VERSION = "0.1.26";
3708
3708
 
3709
3709
  // src/relay.ts
3710
3710
  var RelayClient = class {
@@ -4296,6 +4296,13 @@ var AgentRuntime = class {
4296
4296
  try {
4297
4297
  this.riskUniverse = await this.client.registry.getRiskUniverse(agentId);
4298
4298
  console.log(`Risk universe: ${RISK_UNIVERSE_NAMES[this.riskUniverse] || this.riskUniverse}`);
4299
+ if (this.riskUniverse === 4) {
4300
+ this.allowedTokens.clear();
4301
+ this.config.allowedTokens = void 0;
4302
+ console.log("Frontier risk universe: all tokens allowed (no restrictions)");
4303
+ console.log("Frontier risk universe: vault creation is disabled");
4304
+ return;
4305
+ }
4299
4306
  const configTokens = this.config.allowedTokens || this.getDefaultTokens();
4300
4307
  const verified = [];
4301
4308
  for (const token of configTokens) {
@@ -4318,10 +4325,7 @@ var AgentRuntime = class {
4318
4325
  }
4319
4326
  }
4320
4327
  this.config.allowedTokens = verified;
4321
- console.log(`Allowed tokens loaded: ${verified.length} tokens verified`);
4322
- if (this.riskUniverse === 4) {
4323
- console.warn("Frontier risk universe: vault creation is disabled");
4324
- }
4328
+ console.log(`Allowed tokens loaded: ${verified.length} verified`);
4325
4329
  } catch (error) {
4326
4330
  console.warn(
4327
4331
  "Could not load trading restrictions from registry (using defaults):",
package/dist/cli.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  loadConfig,
7
7
  loadSecureEnv,
8
8
  validateConfig
9
- } from "./chunk-IBU6T6U7.mjs";
9
+ } from "./chunk-AWBQDPZ6.mjs";
10
10
 
11
11
  // src/cli.ts
12
12
  import { Command } from "commander";
package/dist/index.d.mts CHANGED
@@ -339,9 +339,9 @@ declare const AgentConfigSchema: z.ZodObject<{
339
339
  }>>;
340
340
  allowedTokens: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
341
341
  }, "strip", z.ZodTypeAny, {
342
+ agentId: string | number;
342
343
  name: string;
343
344
  network: "mainnet";
344
- agentId: string | number;
345
345
  llm: {
346
346
  provider: "custom" | "openai" | "anthropic" | "google" | "deepseek" | "mistral" | "groq" | "together" | "ollama";
347
347
  temperature: number;
@@ -388,8 +388,8 @@ declare const AgentConfigSchema: z.ZodObject<{
388
388
  } | undefined;
389
389
  allowedTokens?: string[] | undefined;
390
390
  }, {
391
- name: string;
392
391
  agentId: string | number;
392
+ name: string;
393
393
  llm: {
394
394
  provider: "custom" | "openai" | "anthropic" | "google" | "deepseek" | "mistral" | "groq" | "together" | "ollama";
395
395
  model?: string | undefined;
@@ -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.24";
2110
+ declare const AGENT_VERSION = "0.1.26";
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
@@ -339,9 +339,9 @@ declare const AgentConfigSchema: z.ZodObject<{
339
339
  }>>;
340
340
  allowedTokens: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
341
341
  }, "strip", z.ZodTypeAny, {
342
+ agentId: string | number;
342
343
  name: string;
343
344
  network: "mainnet";
344
- agentId: string | number;
345
345
  llm: {
346
346
  provider: "custom" | "openai" | "anthropic" | "google" | "deepseek" | "mistral" | "groq" | "together" | "ollama";
347
347
  temperature: number;
@@ -388,8 +388,8 @@ declare const AgentConfigSchema: z.ZodObject<{
388
388
  } | undefined;
389
389
  allowedTokens?: string[] | undefined;
390
390
  }, {
391
- name: string;
392
391
  agentId: string | number;
392
+ name: string;
393
393
  llm: {
394
394
  provider: "custom" | "openai" | "anthropic" | "google" | "deepseek" | "mistral" | "groq" | "together" | "ollama";
395
395
  model?: string | undefined;
@@ -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.24";
2110
+ declare const AGENT_VERSION = "0.1.26";
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
@@ -1823,7 +1823,7 @@ var RiskManager = class {
1823
1823
  const maxPositionValue = marketData.portfolioValue * this.config.maxPositionSizeBps / 1e4;
1824
1824
  if (signalValue > maxPositionValue) {
1825
1825
  console.warn(
1826
- `Signal exceeds position limit: ${signalValue.toFixed(2)} > ${maxPositionValue.toFixed(2)}`
1826
+ `Signal exceeds position limit: $${signalValue.toFixed(2)} USD > $${maxPositionValue.toFixed(2)} USD max (${this.config.maxPositionSizeBps / 100}% of $${marketData.portfolioValue.toFixed(2)} portfolio). Check that amountIn is denominated in token wei, not USD.`
1827
1827
  );
1828
1828
  return false;
1829
1829
  }
@@ -4198,6 +4198,13 @@ var AgentRuntime = class {
4198
4198
  try {
4199
4199
  this.riskUniverse = await this.client.registry.getRiskUniverse(agentId);
4200
4200
  console.log(`Risk universe: ${RISK_UNIVERSE_NAMES[this.riskUniverse] || this.riskUniverse}`);
4201
+ if (this.riskUniverse === 4) {
4202
+ this.allowedTokens.clear();
4203
+ this.config.allowedTokens = void 0;
4204
+ console.log("Frontier risk universe: all tokens allowed (no restrictions)");
4205
+ console.log("Frontier risk universe: vault creation is disabled");
4206
+ return;
4207
+ }
4201
4208
  const configTokens = this.config.allowedTokens || this.getDefaultTokens();
4202
4209
  const verified = [];
4203
4210
  for (const token of configTokens) {
@@ -4220,10 +4227,7 @@ var AgentRuntime = class {
4220
4227
  }
4221
4228
  }
4222
4229
  this.config.allowedTokens = verified;
4223
- console.log(`Allowed tokens loaded: ${verified.length} tokens verified`);
4224
- if (this.riskUniverse === 4) {
4225
- console.warn("Frontier risk universe: vault creation is disabled");
4226
- }
4230
+ console.log(`Allowed tokens loaded: ${verified.length} verified`);
4227
4231
  } catch (error) {
4228
4232
  console.warn(
4229
4233
  "Could not load trading restrictions from registry (using defaults):",
@@ -5327,7 +5331,7 @@ function loadSecureEnv(basePath, passphrase) {
5327
5331
  }
5328
5332
 
5329
5333
  // src/index.ts
5330
- var AGENT_VERSION = "0.1.24";
5334
+ var AGENT_VERSION = "0.1.26";
5331
5335
  // Annotate the CommonJS export names for ESM import in node:
5332
5336
  0 && (module.exports = {
5333
5337
  AGENT_VERSION,
package/dist/index.mjs CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  loadStrategy,
50
50
  validateConfig,
51
51
  validateStrategy
52
- } from "./chunk-IBU6T6U7.mjs";
52
+ } from "./chunk-AWBQDPZ6.mjs";
53
53
  export {
54
54
  AGENT_VERSION,
55
55
  AgentConfigSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exagent/agent",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "Autonomous trading agent runtime for Exagent",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",