@tradejs/node 3.1.28-beta.255 → 3.1.28-beta.257

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.
@@ -8160,6 +8160,16 @@ var MIN_HOURS = 6;
8160
8160
  var MAX_HOURS = 24 * 90;
8161
8161
  var BYBIT_MAX_TIME_RANGE_MS = 7 * 24 * 60 * 60 * 1e3 - 1e3;
8162
8162
  var EXCHANGE_REQUEST_TIMEOUT_MS = 15e3;
8163
+ var ENABLED_BOOLEAN_ENV_VALUES = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
8164
+ var getSignalsDaemonExecution = (deploymentId) => {
8165
+ const deploymentIds = String(process.env.SIGNALS_DAEMON_DEPLOYMENT_ID ?? "").split(",").map((value) => value.trim()).filter(Boolean);
8166
+ const managedByDaemon = deploymentIds.includes(deploymentId);
8167
+ const configuredMakeOrders = process.env.SIGNALS_DAEMON_MAKE_ORDERS ?? "true";
8168
+ return {
8169
+ runtimeMode: managedByDaemon ? "CRON" : null,
8170
+ makeOrders: managedByDaemon && ENABLED_BOOLEAN_ENV_VALUES.has(configuredMakeOrders.toLowerCase())
8171
+ };
8172
+ };
8163
8173
  var groupRuntimeTradesByIdentity = (trades, identities) => {
8164
8174
  const grouped = /* @__PURE__ */ new Map();
8165
8175
  for (const trade of trades) {
@@ -8620,7 +8630,7 @@ var loadRuntimeDashboard = async ({
8620
8630
  ...resolvedStrategy.generation ? { generation: resolvedStrategy.generation } : {},
8621
8631
  policyProfileId: strategyPolicyProfileId,
8622
8632
  enabled: resolvedStrategy.controlState !== "entries_paused",
8623
- config: resolvedStrategy.strategyConfig,
8633
+ config: resolvedStrategy.sourceStrategyConfig,
8624
8634
  connected: deployment.enabled,
8625
8635
  ...resolvedStrategy.selection ? { selection: resolvedStrategy.selection } : {}
8626
8636
  });
@@ -8646,7 +8656,8 @@ var loadRuntimeDashboard = async ({
8646
8656
  startTime,
8647
8657
  endTime
8648
8658
  });
8649
- const effectiveStrategyConfig = identity.config;
8659
+ const committedStrategyConfig = identity.config;
8660
+ const daemonExecution = getSignalsDaemonExecution(identity.deploymentId);
8650
8661
  return {
8651
8662
  runtimeKey,
8652
8663
  strategyName,
@@ -8665,9 +8676,10 @@ var loadRuntimeDashboard = async ({
8665
8676
  deploymentLabel: identity.deploymentLabel,
8666
8677
  ...identity.selection ? { selection: identity.selection } : {},
8667
8678
  policyProfileId: identity.policyProfileId,
8679
+ ...daemonExecution,
8668
8680
  connected: identity.connected,
8669
8681
  enabled: identity.enabled,
8670
- config: effectiveStrategyConfig,
8682
+ config: committedStrategyConfig,
8671
8683
  symbols: [...new Set(strategyTrades.map((trade) => trade.symbol))],
8672
8684
  stat: analytics.stat,
8673
8685
  summary: analytics.summary,
@@ -250,6 +250,16 @@ var MIN_HOURS = 6;
250
250
  var MAX_HOURS = 24 * 90;
251
251
  var BYBIT_MAX_TIME_RANGE_MS = 7 * 24 * 60 * 60 * 1e3 - 1e3;
252
252
  var EXCHANGE_REQUEST_TIMEOUT_MS = 15e3;
253
+ var ENABLED_BOOLEAN_ENV_VALUES = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
254
+ var getSignalsDaemonExecution = (deploymentId) => {
255
+ const deploymentIds = String(process.env.SIGNALS_DAEMON_DEPLOYMENT_ID ?? "").split(",").map((value) => value.trim()).filter(Boolean);
256
+ const managedByDaemon = deploymentIds.includes(deploymentId);
257
+ const configuredMakeOrders = process.env.SIGNALS_DAEMON_MAKE_ORDERS ?? "true";
258
+ return {
259
+ runtimeMode: managedByDaemon ? "CRON" : null,
260
+ makeOrders: managedByDaemon && ENABLED_BOOLEAN_ENV_VALUES.has(configuredMakeOrders.toLowerCase())
261
+ };
262
+ };
253
263
  var groupRuntimeTradesByIdentity = (trades, identities) => {
254
264
  const grouped = /* @__PURE__ */ new Map();
255
265
  for (const trade of trades) {
@@ -710,7 +720,7 @@ var loadRuntimeDashboard = async ({
710
720
  ...resolvedStrategy.generation ? { generation: resolvedStrategy.generation } : {},
711
721
  policyProfileId: strategyPolicyProfileId,
712
722
  enabled: resolvedStrategy.controlState !== "entries_paused",
713
- config: resolvedStrategy.strategyConfig,
723
+ config: resolvedStrategy.sourceStrategyConfig,
714
724
  connected: deployment.enabled,
715
725
  ...resolvedStrategy.selection ? { selection: resolvedStrategy.selection } : {}
716
726
  });
@@ -736,7 +746,8 @@ var loadRuntimeDashboard = async ({
736
746
  startTime,
737
747
  endTime
738
748
  });
739
- const effectiveStrategyConfig = identity.config;
749
+ const committedStrategyConfig = identity.config;
750
+ const daemonExecution = getSignalsDaemonExecution(identity.deploymentId);
740
751
  return {
741
752
  runtimeKey,
742
753
  strategyName,
@@ -755,9 +766,10 @@ var loadRuntimeDashboard = async ({
755
766
  deploymentLabel: identity.deploymentLabel,
756
767
  ...identity.selection ? { selection: identity.selection } : {},
757
768
  policyProfileId: identity.policyProfileId,
769
+ ...daemonExecution,
758
770
  connected: identity.connected,
759
771
  enabled: identity.enabled,
760
- config: effectiveStrategyConfig,
772
+ config: committedStrategyConfig,
761
773
  symbols: [...new Set(strategyTrades.map((trade) => trade.symbol))],
762
774
  stat: analytics.stat,
763
775
  summary: analytics.summary,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/node",
3
- "version": "3.1.28-beta.255",
3
+ "version": "3.1.28-beta.257",
4
4
  "description": "Node-only runtime for the TradeJS TypeScript framework: strategies, backtests, Pine strategy loading, and plugin registries.",
5
5
  "keywords": [
6
6
  "tradejs",
@@ -89,9 +89,9 @@
89
89
  "dependencies": {
90
90
  "@langchain/core": "^1.2.3",
91
91
  "@langchain/openai": "^1.5.5",
92
- "@tradejs/core": "^3.1.28-beta.255",
93
- "@tradejs/infra": "^3.1.28-beta.255",
94
- "@tradejs/types": "^3.1.28-beta.255",
92
+ "@tradejs/core": "^3.1.28-beta.257",
93
+ "@tradejs/infra": "^3.1.28-beta.257",
94
+ "@tradejs/types": "^3.1.28-beta.257",
95
95
  "@types/node": "^24",
96
96
  "chalk": "4.1.2",
97
97
  "ioredis": "5.11.1",
@@ -104,10 +104,10 @@
104
104
  "typescript": "^5.9"
105
105
  },
106
106
  "devDependencies": {
107
- "@tradejs/indicators": "^3.1.28-beta.255",
107
+ "@tradejs/indicators": "^3.1.28-beta.257",
108
108
  "@tradejs/strategy-adaptive-momentum-ribbon": "3.0.2",
109
109
  "@tradejs/strategy-hyperliquid-consensus": "3.0.2",
110
- "@tradejs/strategy-kit": "3.0.5",
110
+ "@tradejs/strategy-kit": "3.0.6",
111
111
  "@tradejs/strategy-trend-line": "3.0.2",
112
112
  "@tradejs/strategy-volume-divergence": "3.0.2",
113
113
  "tsup": "^8.5.1"