@tradejs/node 1.0.9 → 1.0.11
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 +1 -1
- package/dist/ai.d.mts +4 -1
- package/dist/ai.d.ts +4 -1
- package/dist/ai.js +601 -93
- package/dist/ai.mjs +5 -3
- package/dist/backtest.d.mts +26 -2
- package/dist/backtest.d.ts +26 -2
- package/dist/backtest.js +3367 -481
- package/dist/backtest.mjs +1845 -269
- package/dist/chunk-37VNDZVX.mjs +1040 -0
- package/dist/chunk-IUZML4RK.mjs +1136 -0
- package/dist/{chunk-WGOYR6AB.mjs → chunk-QVSMINLG.mjs} +1 -1
- package/dist/{chunk-JMDYEKIO.mjs → chunk-V3YMKE4I.mjs} +1 -1
- package/dist/{chunk-JU77QVJ3.mjs → chunk-WS5DYEVZ.mjs} +59 -5
- package/dist/cli.d.mts +13 -3
- package/dist/cli.d.ts +13 -3
- package/dist/cli.js +1016 -234
- package/dist/cli.mjs +338 -65
- package/dist/connectors.js +59 -5
- package/dist/connectors.mjs +2 -2
- package/dist/registry.js +59 -5
- package/dist/registry.mjs +2 -2
- package/dist/strategies.d.mts +29 -8
- package/dist/strategies.d.ts +29 -8
- package/dist/strategies.js +3428 -1285
- package/dist/strategies.mjs +904 -112
- package/package.json +7 -7
- package/dist/chunk-2JKX3DM7.mjs +0 -619
- package/dist/chunk-JRRG3YQG.mjs +0 -154
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ export default defineConfig(basePreset);
|
|
|
41
41
|
- strategy runtime execution
|
|
42
42
|
- connector/plugin registries
|
|
43
43
|
- backtest orchestration helpers
|
|
44
|
-
- Pine loading/runtime helpers
|
|
44
|
+
- Pine-backed strategy loading/runtime helpers
|
|
45
45
|
- runtime-side operational helpers used by CLI/app
|
|
46
46
|
|
|
47
47
|
## Public Surface
|
package/dist/ai.d.mts
CHANGED
|
@@ -2,11 +2,14 @@ import { Signal, AiPayload, SignalAnalysis, AiPromptPair } from '@tradejs/types'
|
|
|
2
2
|
|
|
3
3
|
declare const MAX_AI_SERIES_POINTS = 5;
|
|
4
4
|
declare const trimSeriesDeep: (value: any) => any;
|
|
5
|
+
declare const buildCompactAiIndicatorsSnapshot: (value: any) => any;
|
|
5
6
|
|
|
6
7
|
type DeterministicAiGateContext = {
|
|
7
8
|
approvalAllowedNow?: boolean;
|
|
8
9
|
deterministicQuality?: number;
|
|
9
10
|
maxAllowedQuality?: number;
|
|
11
|
+
approvalBlockReasons?: string[];
|
|
12
|
+
riskAnnotations?: string[];
|
|
10
13
|
structuralHardBlockReasons?: string[];
|
|
11
14
|
};
|
|
12
15
|
declare const buildAiSystemPrompt: (signal?: Signal) => string;
|
|
@@ -28,4 +31,4 @@ declare const runAiPrompt: ({ systemPrompt, humanPrompt }: AiPromptPair, options
|
|
|
28
31
|
declare const runAiPromptLocal: (signal: Signal, options?: Omit<AiRequestOptions, "model" | "userName">) => Promise<Partial<SignalAnalysis>>;
|
|
29
32
|
declare const askAI: (signal: Signal, options?: AiRequestOptions) => Promise<Partial<SignalAnalysis>>;
|
|
30
33
|
|
|
31
|
-
export { DEFAULT_AI_MODEL, MAX_AI_SERIES_POINTS, askAI, buildAiHumanPrompt, buildAiPayload, buildAiPrompts, buildAiSystemPrompt, ensureAiStrategyPluginsLoaded, getDeterministicAiGateContext, getOpenRouterModelKwargs, resetAiRuntimeCache, runAiPrompt, runAiPromptLocal, trimSeriesDeep };
|
|
34
|
+
export { DEFAULT_AI_MODEL, MAX_AI_SERIES_POINTS, askAI, buildAiHumanPrompt, buildAiPayload, buildAiPrompts, buildAiSystemPrompt, buildCompactAiIndicatorsSnapshot, ensureAiStrategyPluginsLoaded, getDeterministicAiGateContext, getOpenRouterModelKwargs, resetAiRuntimeCache, runAiPrompt, runAiPromptLocal, trimSeriesDeep };
|
package/dist/ai.d.ts
CHANGED
|
@@ -2,11 +2,14 @@ import { Signal, AiPayload, SignalAnalysis, AiPromptPair } from '@tradejs/types'
|
|
|
2
2
|
|
|
3
3
|
declare const MAX_AI_SERIES_POINTS = 5;
|
|
4
4
|
declare const trimSeriesDeep: (value: any) => any;
|
|
5
|
+
declare const buildCompactAiIndicatorsSnapshot: (value: any) => any;
|
|
5
6
|
|
|
6
7
|
type DeterministicAiGateContext = {
|
|
7
8
|
approvalAllowedNow?: boolean;
|
|
8
9
|
deterministicQuality?: number;
|
|
9
10
|
maxAllowedQuality?: number;
|
|
11
|
+
approvalBlockReasons?: string[];
|
|
12
|
+
riskAnnotations?: string[];
|
|
10
13
|
structuralHardBlockReasons?: string[];
|
|
11
14
|
};
|
|
12
15
|
declare const buildAiSystemPrompt: (signal?: Signal) => string;
|
|
@@ -28,4 +31,4 @@ declare const runAiPrompt: ({ systemPrompt, humanPrompt }: AiPromptPair, options
|
|
|
28
31
|
declare const runAiPromptLocal: (signal: Signal, options?: Omit<AiRequestOptions, "model" | "userName">) => Promise<Partial<SignalAnalysis>>;
|
|
29
32
|
declare const askAI: (signal: Signal, options?: AiRequestOptions) => Promise<Partial<SignalAnalysis>>;
|
|
30
33
|
|
|
31
|
-
export { DEFAULT_AI_MODEL, MAX_AI_SERIES_POINTS, askAI, buildAiHumanPrompt, buildAiPayload, buildAiPrompts, buildAiSystemPrompt, ensureAiStrategyPluginsLoaded, getDeterministicAiGateContext, getOpenRouterModelKwargs, resetAiRuntimeCache, runAiPrompt, runAiPromptLocal, trimSeriesDeep };
|
|
34
|
+
export { DEFAULT_AI_MODEL, MAX_AI_SERIES_POINTS, askAI, buildAiHumanPrompt, buildAiPayload, buildAiPrompts, buildAiSystemPrompt, buildCompactAiIndicatorsSnapshot, ensureAiStrategyPluginsLoaded, getDeterministicAiGateContext, getOpenRouterModelKwargs, resetAiRuntimeCache, runAiPrompt, runAiPromptLocal, trimSeriesDeep };
|