@exagent/agent 0.1.7 → 0.1.8

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
@@ -1388,6 +1388,7 @@ var RelayClient = class {
1388
1388
  config;
1389
1389
  ws = null;
1390
1390
  authenticated = false;
1391
+ authRejected = false;
1391
1392
  reconnectAttempts = 0;
1392
1393
  maxReconnectAttempts = 50;
1393
1394
  reconnectTimer = null;
@@ -1420,8 +1421,8 @@ var RelayClient = class {
1420
1421
  }
1421
1422
  }, 15e3);
1422
1423
  this.ws.on("open", async () => {
1424
+ this.authRejected = false;
1423
1425
  console.log("Relay: Connected, authenticating...");
1424
- this.reconnectAttempts = 0;
1425
1426
  try {
1426
1427
  await this.authenticate();
1427
1428
  } catch (error) {
@@ -1438,11 +1439,13 @@ var RelayClient = class {
1438
1439
  if (data.type === "auth_success") {
1439
1440
  clearTimeout(connectTimeout);
1440
1441
  this.authenticated = true;
1442
+ this.reconnectAttempts = 0;
1441
1443
  this.startHeartbeat();
1442
1444
  console.log("Relay: Authenticated successfully");
1443
1445
  resolve();
1444
1446
  } else if (data.type === "auth_error") {
1445
1447
  clearTimeout(connectTimeout);
1448
+ this.authRejected = true;
1446
1449
  console.error(`Relay: Auth rejected: ${data.message}`);
1447
1450
  reject(new Error(data.message));
1448
1451
  }
@@ -1454,7 +1457,9 @@ var RelayClient = class {
1454
1457
  this.authenticated = false;
1455
1458
  this.stopHeartbeat();
1456
1459
  if (!this.stopped) {
1457
- console.log(`Relay: Disconnected (${code}: ${reason.toString() || "unknown"})`);
1460
+ if (!this.authRejected) {
1461
+ console.log(`Relay: Disconnected (${code}: ${reason.toString() || "unknown"})`);
1462
+ }
1458
1463
  this.scheduleReconnect();
1459
1464
  }
1460
1465
  });
package/dist/cli.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  loadConfig,
7
7
  loadSecureEnv,
8
8
  validateConfig
9
- } from "./chunk-OFKK5XSF.mjs";
9
+ } from "./chunk-ONWRXGJG.mjs";
10
10
 
11
11
  // src/cli.ts
12
12
  import { Command } from "commander";
package/dist/index.d.mts CHANGED
@@ -862,6 +862,7 @@ declare class RelayClient {
862
862
  private config;
863
863
  private ws;
864
864
  private authenticated;
865
+ private authRejected;
865
866
  private reconnectAttempts;
866
867
  private maxReconnectAttempts;
867
868
  private reconnectTimer;
package/dist/index.d.ts CHANGED
@@ -862,6 +862,7 @@ declare class RelayClient {
862
862
  private config;
863
863
  private ws;
864
864
  private authenticated;
865
+ private authRejected;
865
866
  private reconnectAttempts;
866
867
  private maxReconnectAttempts;
867
868
  private reconnectTimer;
package/dist/index.js CHANGED
@@ -1432,6 +1432,7 @@ var RelayClient = class {
1432
1432
  config;
1433
1433
  ws = null;
1434
1434
  authenticated = false;
1435
+ authRejected = false;
1435
1436
  reconnectAttempts = 0;
1436
1437
  maxReconnectAttempts = 50;
1437
1438
  reconnectTimer = null;
@@ -1464,8 +1465,8 @@ var RelayClient = class {
1464
1465
  }
1465
1466
  }, 15e3);
1466
1467
  this.ws.on("open", async () => {
1468
+ this.authRejected = false;
1467
1469
  console.log("Relay: Connected, authenticating...");
1468
- this.reconnectAttempts = 0;
1469
1470
  try {
1470
1471
  await this.authenticate();
1471
1472
  } catch (error) {
@@ -1482,11 +1483,13 @@ var RelayClient = class {
1482
1483
  if (data.type === "auth_success") {
1483
1484
  clearTimeout(connectTimeout);
1484
1485
  this.authenticated = true;
1486
+ this.reconnectAttempts = 0;
1485
1487
  this.startHeartbeat();
1486
1488
  console.log("Relay: Authenticated successfully");
1487
1489
  resolve();
1488
1490
  } else if (data.type === "auth_error") {
1489
1491
  clearTimeout(connectTimeout);
1492
+ this.authRejected = true;
1490
1493
  console.error(`Relay: Auth rejected: ${data.message}`);
1491
1494
  reject(new Error(data.message));
1492
1495
  }
@@ -1498,7 +1501,9 @@ var RelayClient = class {
1498
1501
  this.authenticated = false;
1499
1502
  this.stopHeartbeat();
1500
1503
  if (!this.stopped) {
1501
- console.log(`Relay: Disconnected (${code}: ${reason.toString() || "unknown"})`);
1504
+ if (!this.authRejected) {
1505
+ console.log(`Relay: Disconnected (${code}: ${reason.toString() || "unknown"})`);
1506
+ }
1502
1507
  this.scheduleReconnect();
1503
1508
  }
1504
1509
  });
package/dist/index.mjs CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  loadStrategy,
35
35
  validateConfig,
36
36
  validateStrategy
37
- } from "./chunk-OFKK5XSF.mjs";
37
+ } from "./chunk-ONWRXGJG.mjs";
38
38
  export {
39
39
  AgentConfigSchema,
40
40
  AgentRuntime,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exagent/agent",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Autonomous trading agent runtime for Exagent",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",