@exagent/agent 0.1.34 → 0.1.35
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-46HZKJLU.mjs +5869 -0
- package/dist/cli.js +17 -2
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +17 -2
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -882,6 +882,9 @@ var PositionTracker = class {
|
|
|
882
882
|
existing.totalCostBasis = newTotalCost;
|
|
883
883
|
existing.totalAmountAcquired = newTotalAmount;
|
|
884
884
|
existing.lastUpdateTimestamp = Date.now();
|
|
885
|
+
if (!existing.symbol) {
|
|
886
|
+
existing.symbol = TOKEN_SYMBOLS[token] || getTokenSymbol(token);
|
|
887
|
+
}
|
|
885
888
|
if (txHash) {
|
|
886
889
|
existing.txHashes.push(txHash);
|
|
887
890
|
if (existing.txHashes.length > 10) existing.txHashes.shift();
|
|
@@ -938,6 +941,13 @@ var PositionTracker = class {
|
|
|
938
941
|
this.positions[token].lastUpdateTimestamp = Date.now();
|
|
939
942
|
changed = true;
|
|
940
943
|
}
|
|
944
|
+
if (!this.positions[token].symbol) {
|
|
945
|
+
const resolved = TOKEN_SYMBOLS[token] || getTokenSymbol(token);
|
|
946
|
+
if (resolved) {
|
|
947
|
+
this.positions[token].symbol = resolved;
|
|
948
|
+
changed = true;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
941
951
|
} else {
|
|
942
952
|
const price = prices[token] || 0;
|
|
943
953
|
this.positions[token] = {
|
|
@@ -969,8 +979,13 @@ var PositionTracker = class {
|
|
|
969
979
|
// ============================================================
|
|
970
980
|
// QUERY METHODS (for strategies)
|
|
971
981
|
// ============================================================
|
|
972
|
-
/** Get all tracked positions */
|
|
982
|
+
/** Get all tracked positions (backfills missing symbols from resolver) */
|
|
973
983
|
getPositions() {
|
|
984
|
+
for (const pos of Object.values(this.positions)) {
|
|
985
|
+
if (!pos.symbol) {
|
|
986
|
+
pos.symbol = TOKEN_SYMBOLS[pos.token] || getTokenSymbol(pos.token);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
974
989
|
return Object.values(this.positions);
|
|
975
990
|
}
|
|
976
991
|
/** Get a single position by token address */
|
|
@@ -4180,7 +4195,7 @@ function loadSecureEnv(basePath, passphrase) {
|
|
|
4180
4195
|
}
|
|
4181
4196
|
|
|
4182
4197
|
// src/index.ts
|
|
4183
|
-
var AGENT_VERSION = "0.1.
|
|
4198
|
+
var AGENT_VERSION = "0.1.35";
|
|
4184
4199
|
|
|
4185
4200
|
// src/relay.ts
|
|
4186
4201
|
var RelayClient = class {
|
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -57,7 +57,7 @@ declare class PositionTracker {
|
|
|
57
57
|
* Updates currentAmount, detects new tokens (airdrops), removes zeroed positions.
|
|
58
58
|
*/
|
|
59
59
|
syncBalances(balances: Record<string, bigint>, prices: Record<string, number>): void;
|
|
60
|
-
/** Get all tracked positions */
|
|
60
|
+
/** Get all tracked positions (backfills missing symbols from resolver) */
|
|
61
61
|
getPositions(): TrackedPosition[];
|
|
62
62
|
/** Get a single position by token address */
|
|
63
63
|
getPosition(token: string): TrackedPosition | undefined;
|
|
@@ -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;
|
|
@@ -2191,6 +2191,6 @@ declare function decryptEnvFile(encPath: string, passphrase: string): Record<str
|
|
|
2191
2191
|
declare function loadSecureEnv(basePath: string, passphrase?: string): boolean;
|
|
2192
2192
|
|
|
2193
2193
|
/** @exagent/agent package version — update alongside package.json */
|
|
2194
|
-
declare const AGENT_VERSION = "0.1.
|
|
2194
|
+
declare const AGENT_VERSION = "0.1.35";
|
|
2195
2195
|
|
|
2196
2196
|
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
|
@@ -57,7 +57,7 @@ declare class PositionTracker {
|
|
|
57
57
|
* Updates currentAmount, detects new tokens (airdrops), removes zeroed positions.
|
|
58
58
|
*/
|
|
59
59
|
syncBalances(balances: Record<string, bigint>, prices: Record<string, number>): void;
|
|
60
|
-
/** Get all tracked positions */
|
|
60
|
+
/** Get all tracked positions (backfills missing symbols from resolver) */
|
|
61
61
|
getPositions(): TrackedPosition[];
|
|
62
62
|
/** Get a single position by token address */
|
|
63
63
|
getPosition(token: string): TrackedPosition | undefined;
|
|
@@ -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;
|
|
@@ -2191,6 +2191,6 @@ declare function decryptEnvFile(encPath: string, passphrase: string): Record<str
|
|
|
2191
2191
|
declare function loadSecureEnv(basePath: string, passphrase?: string): boolean;
|
|
2192
2192
|
|
|
2193
2193
|
/** @exagent/agent package version — update alongside package.json */
|
|
2194
|
-
declare const AGENT_VERSION = "0.1.
|
|
2194
|
+
declare const AGENT_VERSION = "0.1.35";
|
|
2195
2195
|
|
|
2196
2196
|
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
|
@@ -935,6 +935,9 @@ var PositionTracker = class {
|
|
|
935
935
|
existing.totalCostBasis = newTotalCost;
|
|
936
936
|
existing.totalAmountAcquired = newTotalAmount;
|
|
937
937
|
existing.lastUpdateTimestamp = Date.now();
|
|
938
|
+
if (!existing.symbol) {
|
|
939
|
+
existing.symbol = TOKEN_SYMBOLS[token] || getTokenSymbol(token);
|
|
940
|
+
}
|
|
938
941
|
if (txHash) {
|
|
939
942
|
existing.txHashes.push(txHash);
|
|
940
943
|
if (existing.txHashes.length > 10) existing.txHashes.shift();
|
|
@@ -991,6 +994,13 @@ var PositionTracker = class {
|
|
|
991
994
|
this.positions[token].lastUpdateTimestamp = Date.now();
|
|
992
995
|
changed = true;
|
|
993
996
|
}
|
|
997
|
+
if (!this.positions[token].symbol) {
|
|
998
|
+
const resolved = TOKEN_SYMBOLS[token] || getTokenSymbol(token);
|
|
999
|
+
if (resolved) {
|
|
1000
|
+
this.positions[token].symbol = resolved;
|
|
1001
|
+
changed = true;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
994
1004
|
} else {
|
|
995
1005
|
const price = prices[token] || 0;
|
|
996
1006
|
this.positions[token] = {
|
|
@@ -1022,8 +1032,13 @@ var PositionTracker = class {
|
|
|
1022
1032
|
// ============================================================
|
|
1023
1033
|
// QUERY METHODS (for strategies)
|
|
1024
1034
|
// ============================================================
|
|
1025
|
-
/** Get all tracked positions */
|
|
1035
|
+
/** Get all tracked positions (backfills missing symbols from resolver) */
|
|
1026
1036
|
getPositions() {
|
|
1037
|
+
for (const pos of Object.values(this.positions)) {
|
|
1038
|
+
if (!pos.symbol) {
|
|
1039
|
+
pos.symbol = TOKEN_SYMBOLS[pos.token] || getTokenSymbol(pos.token);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1027
1042
|
return Object.values(this.positions);
|
|
1028
1043
|
}
|
|
1029
1044
|
/** Get a single position by token address */
|
|
@@ -5866,7 +5881,7 @@ function loadSecureEnv(basePath, passphrase) {
|
|
|
5866
5881
|
}
|
|
5867
5882
|
|
|
5868
5883
|
// src/index.ts
|
|
5869
|
-
var AGENT_VERSION = "0.1.
|
|
5884
|
+
var AGENT_VERSION = "0.1.35";
|
|
5870
5885
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5871
5886
|
0 && (module.exports = {
|
|
5872
5887
|
AGENT_VERSION,
|
package/dist/index.mjs
CHANGED