@tradejs/cli 3.1.28-beta.251 → 3.1.28-beta.253

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
@@ -39293,9 +39293,10 @@ var init_configuredScopes = __esm({
39293
39293
  return (strategy, symbol) => {
39294
39294
  if (!strategy.selection) return true;
39295
39295
  const normalizedSymbol = normalizeSymbol(symbol);
39296
- return strategy.selection.tickers.some(
39297
- (ticker) => normalizeSymbol(ticker) === normalizedSymbol
39298
- ) || activeStrategySymbols.has(
39296
+ return strategy.selection.tickers.some((ticker) => {
39297
+ const normalizedTicker = normalizeSymbol(ticker);
39298
+ return normalizedTicker === normalizedSymbol || universe === "crypto" && `${normalizedTicker}USDT` === normalizedSymbol;
39299
+ }) || activeStrategySymbols.has(
39299
39300
  `${strategy.strategyName}\0${normalizedSymbol}`
39300
39301
  );
39301
39302
  };
@@ -39359,7 +39360,7 @@ var init_configuredScopes = __esm({
39359
39360
  });
39360
39361
 
39361
39362
  // src/lib/signals/runner.ts
39362
- var import_progress12, import_chalk53, import_connectors17, import_cli13, import_async5, import_strategies14, import_constants20, import_time14, import_logger11, import_runtimeHeartbeats, import_runtimeStrategies8, SLOW_SIGNALS_WARNING_MS, formatDuration3, resolvePositiveInteger2, resolveNonNegativeInteger, createSignalsRunner;
39363
+ var import_progress12, import_chalk53, import_connectors17, import_cli13, import_async5, import_strategies14, import_constants20, import_time14, import_logger11, import_runtimeDeploymentEvents, import_runtimeHeartbeats, import_runtimeStrategies8, SLOW_SIGNALS_WARNING_MS, formatDuration3, resolvePositiveInteger2, resolveNonNegativeInteger, createSignalsRunner;
39363
39364
  var init_runner = __esm({
39364
39365
  "src/lib/signals/runner.ts"() {
39365
39366
  "use strict";
@@ -39372,6 +39373,7 @@ var init_runner = __esm({
39372
39373
  import_constants20 = require("@tradejs/core/constants");
39373
39374
  import_time14 = require("@tradejs/core/time");
39374
39375
  import_logger11 = require("@tradejs/infra/logger");
39376
+ import_runtimeDeploymentEvents = require("@tradejs/infra/runtimeDeploymentEvents");
39375
39377
  import_runtimeHeartbeats = require("@tradejs/infra/runtimeHeartbeats");
39376
39378
  import_runtimeStrategies8 = require("@tradejs/node/runtimeStrategies");
39377
39379
  init_windows();
@@ -40045,6 +40047,18 @@ var init_runner = __esm({
40045
40047
  if (!currentDeployment) {
40046
40048
  throw new Error(`Runtime deployment not found: ${deploymentId}`);
40047
40049
  }
40050
+ try {
40051
+ await (0, import_runtimeDeploymentEvents.observeRuntimeDeploymentComposition)({
40052
+ userName: config2.userName,
40053
+ deployment: currentDeployment
40054
+ });
40055
+ } catch (error) {
40056
+ import_logger11.logger.warn(
40057
+ "runtime deployment composition event unavailable; trading continues and the next cycle will retry (composition=%s): %s",
40058
+ currentDeployment.deploymentCompositionId,
40059
+ error instanceof Error ? error.message : String(error)
40060
+ );
40061
+ }
40048
40062
  compositionSnapshotRecorder?.observe(
40049
40063
  currentDeployment.deploymentCompositionId
40050
40064
  );
@@ -50,6 +50,7 @@ var import_strategies4 = require("@tradejs/core/strategies");
50
50
  var import_constants3 = require("@tradejs/core/constants");
51
51
  var import_time3 = require("@tradejs/core/time");
52
52
  var import_logger4 = require("@tradejs/infra/logger");
53
+ var import_runtimeDeploymentEvents = require("@tradejs/infra/runtimeDeploymentEvents");
53
54
  var import_runtimeHeartbeats = require("@tradejs/infra/runtimeHeartbeats");
54
55
  var import_runtimeStrategies3 = require("@tradejs/node/runtimeStrategies");
55
56
 
@@ -4931,9 +4932,10 @@ var createConfiguredStrategySymbolMatcher = ({
4931
4932
  return (strategy, symbol) => {
4932
4933
  if (!strategy.selection) return true;
4933
4934
  const normalizedSymbol = normalizeSymbol(symbol);
4934
- return strategy.selection.tickers.some(
4935
- (ticker) => normalizeSymbol(ticker) === normalizedSymbol
4936
- ) || activeStrategySymbols.has(
4935
+ return strategy.selection.tickers.some((ticker) => {
4936
+ const normalizedTicker = normalizeSymbol(ticker);
4937
+ return normalizedTicker === normalizedSymbol || universe === "crypto" && `${normalizedTicker}USDT` === normalizedSymbol;
4938
+ }) || activeStrategySymbols.has(
4937
4939
  `${strategy.strategyName}\0${normalizedSymbol}`
4938
4940
  );
4939
4941
  };
@@ -6012,6 +6014,18 @@ var createSignalsRunner = (config2) => {
6012
6014
  if (!currentDeployment) {
6013
6015
  throw new Error(`Runtime deployment not found: ${deploymentId}`);
6014
6016
  }
6017
+ try {
6018
+ await (0, import_runtimeDeploymentEvents.observeRuntimeDeploymentComposition)({
6019
+ userName: config2.userName,
6020
+ deployment: currentDeployment
6021
+ });
6022
+ } catch (error) {
6023
+ import_logger4.logger.warn(
6024
+ "runtime deployment composition event unavailable; trading continues and the next cycle will retry (composition=%s): %s",
6025
+ currentDeployment.deploymentCompositionId,
6026
+ error instanceof Error ? error.message : String(error)
6027
+ );
6028
+ }
6015
6029
  compositionSnapshotRecorder?.observe(
6016
6030
  currentDeployment.deploymentCompositionId
6017
6031
  );
@@ -48,6 +48,7 @@ var import_strategies4 = require("@tradejs/core/strategies");
48
48
  var import_constants3 = require("@tradejs/core/constants");
49
49
  var import_time3 = require("@tradejs/core/time");
50
50
  var import_logger4 = require("@tradejs/infra/logger");
51
+ var import_runtimeDeploymentEvents = require("@tradejs/infra/runtimeDeploymentEvents");
51
52
  var import_runtimeHeartbeats = require("@tradejs/infra/runtimeHeartbeats");
52
53
  var import_runtimeStrategies3 = require("@tradejs/node/runtimeStrategies");
53
54
 
@@ -4929,9 +4930,10 @@ var createConfiguredStrategySymbolMatcher = ({
4929
4930
  return (strategy, symbol) => {
4930
4931
  if (!strategy.selection) return true;
4931
4932
  const normalizedSymbol = normalizeSymbol(symbol);
4932
- return strategy.selection.tickers.some(
4933
- (ticker) => normalizeSymbol(ticker) === normalizedSymbol
4934
- ) || activeStrategySymbols.has(
4933
+ return strategy.selection.tickers.some((ticker) => {
4934
+ const normalizedTicker = normalizeSymbol(ticker);
4935
+ return normalizedTicker === normalizedSymbol || universe === "crypto" && `${normalizedTicker}USDT` === normalizedSymbol;
4936
+ }) || activeStrategySymbols.has(
4935
4937
  `${strategy.strategyName}\0${normalizedSymbol}`
4936
4938
  );
4937
4939
  };
@@ -6010,6 +6012,18 @@ var createSignalsRunner = (config2) => {
6010
6012
  if (!currentDeployment) {
6011
6013
  throw new Error(`Runtime deployment not found: ${deploymentId}`);
6012
6014
  }
6015
+ try {
6016
+ await (0, import_runtimeDeploymentEvents.observeRuntimeDeploymentComposition)({
6017
+ userName: config2.userName,
6018
+ deployment: currentDeployment
6019
+ });
6020
+ } catch (error) {
6021
+ import_logger4.logger.warn(
6022
+ "runtime deployment composition event unavailable; trading continues and the next cycle will retry (composition=%s): %s",
6023
+ currentDeployment.deploymentCompositionId,
6024
+ error instanceof Error ? error.message : String(error)
6025
+ );
6026
+ }
6013
6027
  compositionSnapshotRecorder?.observe(
6014
6028
  currentDeployment.deploymentCompositionId
6015
6029
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/cli",
3
- "version": "3.1.28-beta.251",
3
+ "version": "3.1.28-beta.253",
4
4
  "description": "Official CLI for the TradeJS TypeScript framework: infra setup, backtests, signals, bots, and ML workflows.",
5
5
  "keywords": [
6
6
  "tradejs",
@@ -36,13 +36,13 @@
36
36
  "tradejs": "dist/cli.js"
37
37
  },
38
38
  "dependencies": {
39
- "@tradejs/connectors": "^3.1.28-beta.251",
40
- "@tradejs/core": "^3.1.28-beta.251",
41
- "@tradejs/indicators": "^3.1.28-beta.251",
42
- "@tradejs/infra": "^3.1.28-beta.251",
43
- "@tradejs/node": "^3.1.28-beta.251",
39
+ "@tradejs/connectors": "^3.1.28-beta.253",
40
+ "@tradejs/core": "^3.1.28-beta.253",
41
+ "@tradejs/indicators": "^3.1.28-beta.253",
42
+ "@tradejs/infra": "^3.1.28-beta.253",
43
+ "@tradejs/node": "^3.1.28-beta.253",
44
44
  "@tradejs/strategy-kit": "3.0.4",
45
- "@tradejs/types": "^3.1.28-beta.251",
45
+ "@tradejs/types": "^3.1.28-beta.253",
46
46
  "args": "^5.0.3",
47
47
  "bcryptjs": "^2.4.3",
48
48
  "chalk": "4.1.2",