@tradejs/core 3.1.0 → 3.1.2
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/README.md +2 -0
- package/dist/runtimeTrades.js +2 -1
- package/dist/runtimeTrades.mjs +2 -1
- package/package.json +6 -3
package/README.md
CHANGED
package/dist/runtimeTrades.js
CHANGED
|
@@ -516,7 +516,7 @@ var isRuntimeStrategyLineageScope = (value) => {
|
|
|
516
516
|
if (!value || typeof value !== "object") return false;
|
|
517
517
|
const record = value;
|
|
518
518
|
const lineage = record.lineage;
|
|
519
|
-
return typeof record.strategy === "string" && typeof record.symbol === "string" && typeof record.firstTimestamp === "number" && Number.isFinite(record.firstTimestamp) && typeof record.lastTimestamp === "number" && Number.isFinite(record.lastTimestamp) && lineage != null && typeof lineage.gateFingerprint === "string" && lineage.gateFingerprint.trim().length > 0;
|
|
519
|
+
return typeof record.strategy === "string" && typeof record.symbol === "string" && typeof record.firstTimestamp === "number" && Number.isFinite(record.firstTimestamp) && typeof record.lastTimestamp === "number" && Number.isFinite(record.lastTimestamp) && lineage != null && lineage.schemaVersion === 1 && typeof lineage.gateFingerprint === "string" && lineage.gateFingerprint.trim().length > 0;
|
|
520
520
|
};
|
|
521
521
|
var buildRuntimeStrategyAiGateChanges = ({
|
|
522
522
|
scopes,
|
|
@@ -531,6 +531,7 @@ var buildRuntimeStrategyAiGateChanges = ({
|
|
|
531
531
|
if (scope.strategy !== strategyName || (scope.runtimeConfigId ?? "config") !== normalizedConfigId || scope.firstTimestamp > endTime) {
|
|
532
532
|
continue;
|
|
533
533
|
}
|
|
534
|
+
if (scope.lineage.schemaVersion !== 1) continue;
|
|
534
535
|
const fingerprint = scope.lineage.gateFingerprint.trim();
|
|
535
536
|
const existing = observationsByTimestamp.get(scope.firstTimestamp);
|
|
536
537
|
if (!existing || scope.lastTimestamp > existing.lastTimestamp || scope.lastTimestamp === existing.lastTimestamp && fingerprint > existing.fingerprint) {
|
package/dist/runtimeTrades.mjs
CHANGED
|
@@ -418,7 +418,7 @@ var isRuntimeStrategyLineageScope = (value) => {
|
|
|
418
418
|
if (!value || typeof value !== "object") return false;
|
|
419
419
|
const record = value;
|
|
420
420
|
const lineage = record.lineage;
|
|
421
|
-
return typeof record.strategy === "string" && typeof record.symbol === "string" && typeof record.firstTimestamp === "number" && Number.isFinite(record.firstTimestamp) && typeof record.lastTimestamp === "number" && Number.isFinite(record.lastTimestamp) && lineage != null && typeof lineage.gateFingerprint === "string" && lineage.gateFingerprint.trim().length > 0;
|
|
421
|
+
return typeof record.strategy === "string" && typeof record.symbol === "string" && typeof record.firstTimestamp === "number" && Number.isFinite(record.firstTimestamp) && typeof record.lastTimestamp === "number" && Number.isFinite(record.lastTimestamp) && lineage != null && lineage.schemaVersion === 1 && typeof lineage.gateFingerprint === "string" && lineage.gateFingerprint.trim().length > 0;
|
|
422
422
|
};
|
|
423
423
|
var buildRuntimeStrategyAiGateChanges = ({
|
|
424
424
|
scopes,
|
|
@@ -433,6 +433,7 @@ var buildRuntimeStrategyAiGateChanges = ({
|
|
|
433
433
|
if (scope.strategy !== strategyName || (scope.runtimeConfigId ?? "config") !== normalizedConfigId || scope.firstTimestamp > endTime) {
|
|
434
434
|
continue;
|
|
435
435
|
}
|
|
436
|
+
if (scope.lineage.schemaVersion !== 1) continue;
|
|
436
437
|
const fingerprint = scope.lineage.gateFingerprint.trim();
|
|
437
438
|
const existing = observationsByTimestamp.get(scope.firstTimestamp);
|
|
438
439
|
if (!existing || scope.lastTimestamp > existing.lastTimestamp || scope.lastTimestamp === existing.lastTimestamp && fingerprint > existing.fingerprint) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradejs/core",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "MIT-licensed browser-safe API for TradeJS config, strategy authoring, figures, and shared helpers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tradejs",
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"strategy",
|
|
11
11
|
"indicators",
|
|
12
|
-
"pine-script"
|
|
12
|
+
"pine-script",
|
|
13
|
+
"ai",
|
|
14
|
+
"claude",
|
|
15
|
+
"codex"
|
|
13
16
|
],
|
|
14
17
|
"homepage": "https://tradejs.dev",
|
|
15
18
|
"repository": {
|
|
@@ -125,7 +128,7 @@
|
|
|
125
128
|
}
|
|
126
129
|
},
|
|
127
130
|
"dependencies": {
|
|
128
|
-
"@tradejs/types": "^3.1.
|
|
131
|
+
"@tradejs/types": "^3.1.2",
|
|
129
132
|
"date-fns": "^3.6.0",
|
|
130
133
|
"fast-technical-indicators": "^1.1.4",
|
|
131
134
|
"klinecharts": "10.0.0-alpha9",
|