@tradejs/node 1.0.0

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 ADDED
@@ -0,0 +1,72 @@
1
+ # @tradejs/node
2
+
3
+ Node-only TradeJS runtime package.
4
+
5
+ - Homepage: https://tradejs.dev
6
+ - Documentation: https://docs.tradejs.dev
7
+ - Quickstart: https://docs.tradejs.dev/getting-started/quickstart
8
+
9
+ ## Where It Fits
10
+
11
+ `@tradejs/node` is the server/runtime half of TradeJS.
12
+
13
+ Use it together with:
14
+
15
+ - `@tradejs/core` for browser-safe/public authoring helpers
16
+ - `@tradejs/types` for shared contracts
17
+ - `@tradejs/cli` for operational commands
18
+ - `@tradejs/app` if you want the installable web UI
19
+
20
+ ## Standard External Install Flow
21
+
22
+ In a normal external TradeJS project you usually install the full runtime set:
23
+
24
+ ```bash
25
+ npm i @tradejs/app @tradejs/core @tradejs/node @tradejs/types @tradejs/base @tradejs/cli
26
+ ```
27
+
28
+ And create `tradejs.config.ts` in project root:
29
+
30
+ ```ts
31
+ import { defineConfig } from '@tradejs/core/config';
32
+ import { basePreset } from '@tradejs/base';
33
+
34
+ export default defineConfig(basePreset);
35
+ ```
36
+
37
+ ## What It Provides
38
+
39
+ `@tradejs/node` contains server-only runtime helpers that do not belong in browser-safe `@tradejs/core`:
40
+
41
+ - strategy runtime execution
42
+ - connector/plugin registries
43
+ - backtest orchestration helpers
44
+ - Pine loading/runtime helpers
45
+ - runtime-side operational helpers used by CLI/app
46
+
47
+ ## Public Surface
48
+
49
+ Import only explicit subpaths:
50
+
51
+ - `@tradejs/node/strategies`
52
+ - `@tradejs/node/backtest`
53
+ - `@tradejs/node/pine`
54
+ - `@tradejs/node/registry`
55
+ - `@tradejs/node/connectors`
56
+ - `@tradejs/node/cli`
57
+ - `@tradejs/node/constants`
58
+
59
+ There is no root `@tradejs/node` import surface.
60
+
61
+ ## Minimal Example
62
+
63
+ ```ts
64
+ import { createStrategyRuntime } from '@tradejs/node/strategies';
65
+ ```
66
+
67
+ ## Notes
68
+
69
+ - `@tradejs/node` is server-only.
70
+ - Do not import it into browser/client bundles.
71
+ - For plugin/config declaration and browser-safe helpers, use `@tradejs/core`.
72
+ - For shared contracts, use `@tradejs/types`.
@@ -0,0 +1,19 @@
1
+ import {
2
+ MAX_AI_SERIES_POINTS,
3
+ askAI,
4
+ buildAiHumanPrompt,
5
+ buildAiPayload,
6
+ buildAiSystemPrompt,
7
+ trimSeriesDeep
8
+ } from "./chunk-ZIMX3JX2.mjs";
9
+ import "./chunk-MHCXPD2B.mjs";
10
+ import "./chunk-DE7ADBIR.mjs";
11
+ import "./chunk-6DZX6EAA.mjs";
12
+ export {
13
+ MAX_AI_SERIES_POINTS,
14
+ askAI,
15
+ buildAiHumanPrompt,
16
+ buildAiPayload,
17
+ buildAiSystemPrompt,
18
+ trimSeriesDeep
19
+ };
@@ -0,0 +1,9 @@
1
+ export * from '@tradejs/core/backtest';
2
+ import { TestingBox, TestConnectorCreator } from '@tradejs/types';
3
+
4
+ declare const resetTestingKlineCache: () => void;
5
+ declare const testing: TestingBox;
6
+
7
+ declare const createTestConnector: TestConnectorCreator;
8
+
9
+ export { createTestConnector, resetTestingKlineCache, testing };
@@ -0,0 +1,9 @@
1
+ export * from '@tradejs/core/backtest';
2
+ import { TestingBox, TestConnectorCreator } from '@tradejs/types';
3
+
4
+ declare const resetTestingKlineCache: () => void;
5
+ declare const testing: TestingBox;
6
+
7
+ declare const createTestConnector: TestConnectorCreator;
8
+
9
+ export { createTestConnector, resetTestingKlineCache, testing };