@exagent/agent 0.1.23 → 0.1.24

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
@@ -1834,7 +1834,9 @@ var RiskManager = class {
1834
1834
  dailyNetPnL: this.dailyPnL - this.dailyFees,
1835
1835
  dailyLossLimit: maxLossUSD,
1836
1836
  // Only market PnL triggers the limit — fees are excluded
1837
- isLimitHit: pv > 0 ? this.dailyPnL < -maxLossUSD : false
1837
+ isLimitHit: pv > 0 ? this.dailyPnL < -maxLossUSD : false,
1838
+ maxPositionSizeBps: this.config.maxPositionSizeBps,
1839
+ maxDailyLossBps: this.config.maxDailyLossBps
1838
1840
  };
1839
1841
  }
1840
1842
  // ============================================================
@@ -3702,7 +3704,7 @@ function loadSecureEnv(basePath, passphrase) {
3702
3704
  }
3703
3705
 
3704
3706
  // src/index.ts
3705
- var AGENT_VERSION = "0.1.23";
3707
+ var AGENT_VERSION = "0.1.24";
3706
3708
 
3707
3709
  // src/relay.ts
3708
3710
  var RelayClient = class {
@@ -4807,7 +4809,9 @@ var AgentRuntime = class {
4807
4809
  risk: this.riskManager?.getStatus(this.lastPortfolioValue) || {
4808
4810
  dailyPnL: 0,
4809
4811
  dailyLossLimit: 0,
4810
- isLimitHit: false
4812
+ isLimitHit: false,
4813
+ maxPositionSizeBps: this.config.trading.maxPositionSizeBps,
4814
+ maxDailyLossBps: this.config.trading.maxDailyLossBps
4811
4815
  },
4812
4816
  vault: {
4813
4817
  policy: vaultConfig.policy,
@@ -5193,7 +5197,13 @@ var AgentRuntime = class {
5193
5197
  model: this.config.llm.model || "default"
5194
5198
  },
5195
5199
  configHash: this.configHash || "not initialized",
5196
- risk: this.riskManager?.getStatus(this.lastPortfolioValue) || { dailyPnL: 0, dailyLossLimit: 0, isLimitHit: false },
5200
+ risk: this.riskManager?.getStatus(this.lastPortfolioValue) || {
5201
+ dailyPnL: 0,
5202
+ dailyLossLimit: 0,
5203
+ isLimitHit: false,
5204
+ maxPositionSizeBps: this.config.trading.maxPositionSizeBps,
5205
+ maxDailyLossBps: this.config.trading.maxDailyLossBps
5206
+ },
5197
5207
  vault: {
5198
5208
  policy: vaultConfig.policy,
5199
5209
  hasVault: false,
package/dist/cli.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  loadConfig,
7
7
  loadSecureEnv,
8
8
  validateConfig
9
- } from "./chunk-NENK6U55.mjs";
9
+ } from "./chunk-IBU6T6U7.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;
343
342
  name: string;
344
343
  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
- agentId: string | number;
392
391
  name: string;
392
+ agentId: string | number;
393
393
  llm: {
394
394
  provider: "custom" | "openai" | "anthropic" | "google" | "deepseek" | "mistral" | "groq" | "together" | "ollama";
395
395
  model?: string | undefined;
@@ -710,6 +710,8 @@ interface AgentStatusPayload {
710
710
  dailyPnL: number;
711
711
  dailyLossLimit: number;
712
712
  isLimitHit: boolean;
713
+ maxPositionSizeBps?: number;
714
+ maxDailyLossBps?: number;
713
715
  };
714
716
  vault?: {
715
717
  policy: string;
@@ -1392,6 +1394,8 @@ declare class RiskManager {
1392
1394
  dailyNetPnL: number;
1393
1395
  dailyLossLimit: number;
1394
1396
  isLimitHit: boolean;
1397
+ maxPositionSizeBps: number;
1398
+ maxDailyLossBps: number;
1395
1399
  };
1396
1400
  /**
1397
1401
  * Filter perp trade signals through risk checks.
@@ -2103,6 +2107,6 @@ declare function decryptEnvFile(encPath: string, passphrase: string): Record<str
2103
2107
  declare function loadSecureEnv(basePath: string, passphrase?: string): boolean;
2104
2108
 
2105
2109
  /** @exagent/agent package version — update alongside package.json */
2106
- declare const AGENT_VERSION = "0.1.23";
2110
+ declare const AGENT_VERSION = "0.1.24";
2107
2111
 
2108
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;
343
342
  name: string;
344
343
  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
- agentId: string | number;
392
391
  name: string;
392
+ agentId: string | number;
393
393
  llm: {
394
394
  provider: "custom" | "openai" | "anthropic" | "google" | "deepseek" | "mistral" | "groq" | "together" | "ollama";
395
395
  model?: string | undefined;
@@ -710,6 +710,8 @@ interface AgentStatusPayload {
710
710
  dailyPnL: number;
711
711
  dailyLossLimit: number;
712
712
  isLimitHit: boolean;
713
+ maxPositionSizeBps?: number;
714
+ maxDailyLossBps?: number;
713
715
  };
714
716
  vault?: {
715
717
  policy: string;
@@ -1392,6 +1394,8 @@ declare class RiskManager {
1392
1394
  dailyNetPnL: number;
1393
1395
  dailyLossLimit: number;
1394
1396
  isLimitHit: boolean;
1397
+ maxPositionSizeBps: number;
1398
+ maxDailyLossBps: number;
1395
1399
  };
1396
1400
  /**
1397
1401
  * Filter perp trade signals through risk checks.
@@ -2103,6 +2107,6 @@ declare function decryptEnvFile(encPath: string, passphrase: string): Record<str
2103
2107
  declare function loadSecureEnv(basePath: string, passphrase?: string): boolean;
2104
2108
 
2105
2109
  /** @exagent/agent package version — update alongside package.json */
2106
- declare const AGENT_VERSION = "0.1.23";
2110
+ declare const AGENT_VERSION = "0.1.24";
2107
2111
 
2108
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
@@ -1922,7 +1922,9 @@ var RiskManager = class {
1922
1922
  dailyNetPnL: this.dailyPnL - this.dailyFees,
1923
1923
  dailyLossLimit: maxLossUSD,
1924
1924
  // Only market PnL triggers the limit — fees are excluded
1925
- isLimitHit: pv > 0 ? this.dailyPnL < -maxLossUSD : false
1925
+ isLimitHit: pv > 0 ? this.dailyPnL < -maxLossUSD : false,
1926
+ maxPositionSizeBps: this.config.maxPositionSizeBps,
1927
+ maxDailyLossBps: this.config.maxDailyLossBps
1926
1928
  };
1927
1929
  }
1928
1930
  // ============================================================
@@ -4709,7 +4711,9 @@ var AgentRuntime = class {
4709
4711
  risk: this.riskManager?.getStatus(this.lastPortfolioValue) || {
4710
4712
  dailyPnL: 0,
4711
4713
  dailyLossLimit: 0,
4712
- isLimitHit: false
4714
+ isLimitHit: false,
4715
+ maxPositionSizeBps: this.config.trading.maxPositionSizeBps,
4716
+ maxDailyLossBps: this.config.trading.maxDailyLossBps
4713
4717
  },
4714
4718
  vault: {
4715
4719
  policy: vaultConfig.policy,
@@ -5095,7 +5099,13 @@ var AgentRuntime = class {
5095
5099
  model: this.config.llm.model || "default"
5096
5100
  },
5097
5101
  configHash: this.configHash || "not initialized",
5098
- risk: this.riskManager?.getStatus(this.lastPortfolioValue) || { dailyPnL: 0, dailyLossLimit: 0, isLimitHit: false },
5102
+ risk: this.riskManager?.getStatus(this.lastPortfolioValue) || {
5103
+ dailyPnL: 0,
5104
+ dailyLossLimit: 0,
5105
+ isLimitHit: false,
5106
+ maxPositionSizeBps: this.config.trading.maxPositionSizeBps,
5107
+ maxDailyLossBps: this.config.trading.maxDailyLossBps
5108
+ },
5099
5109
  vault: {
5100
5110
  policy: vaultConfig.policy,
5101
5111
  hasVault: false,
@@ -5317,7 +5327,7 @@ function loadSecureEnv(basePath, passphrase) {
5317
5327
  }
5318
5328
 
5319
5329
  // src/index.ts
5320
- var AGENT_VERSION = "0.1.23";
5330
+ var AGENT_VERSION = "0.1.24";
5321
5331
  // Annotate the CommonJS export names for ESM import in node:
5322
5332
  0 && (module.exports = {
5323
5333
  AGENT_VERSION,
package/dist/index.mjs CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  loadStrategy,
50
50
  validateConfig,
51
51
  validateStrategy
52
- } from "./chunk-NENK6U55.mjs";
52
+ } from "./chunk-IBU6T6U7.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.23",
3
+ "version": "0.1.24",
4
4
  "description": "Autonomous trading agent runtime for Exagent",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",