@backtest-kit/cli 9.0.0 → 9.1.1

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 CHANGED
@@ -298,7 +298,7 @@ import {
298
298
  addFrameSchema,
299
299
  addStrategySchema,
300
300
  Backtest,
301
- Cache,
301
+ warmCandles,
302
302
  } from "backtest-kit";
303
303
  import ccxt from "ccxt";
304
304
 
@@ -336,12 +336,14 @@ for (const symbol of symbols) {
336
336
  //
337
337
  // Optional
338
338
  //
339
- // await Cache.warmup(["1m", "15m", "1h"], {
340
- // exchangeName: "binance",
341
- // frameName: "feb-2026",
339
+ // await warmCandles({
340
+ // exchangeName: "binance,
341
+ // from: new Date("2026-01-01T00:00:00Z"),
342
+ // to: new Date("2026-01-31T23:59:59Z"),
343
+ // interval: "1m",
342
344
  // symbol,
343
- // });
344
- //
345
+ // })
346
+
345
347
 
346
348
  Backtest.background(symbol, {
347
349
  strategyName: "my-strategy",
package/build/index.cjs CHANGED
@@ -335,6 +335,23 @@ class ResolveService {
335
335
  }
336
336
  _is_launched = true;
337
337
  };
338
+ this.attachEntry = async (jsPath) => {
339
+ this.loggerService.log("resolveService attachEntry", {
340
+ jsPath
341
+ });
342
+ if (_is_launched) {
343
+ throw new Error("Entry point is already attached. Multiple entry points are not allowed.");
344
+ }
345
+ const absolutePath = path.resolve(jsPath);
346
+ const cwd = process.cwd();
347
+ await fs$1.access(absolutePath, fs.constants.F_OK | fs.constants.R_OK);
348
+ dotenv.config({ path: path.join(cwd, '.env'), override: true, quiet: true });
349
+ {
350
+ this.loaderService.import(absolutePath);
351
+ await entrySubject.next(absolutePath);
352
+ }
353
+ _is_launched = true;
354
+ };
338
355
  }
339
356
  }
340
357
 
@@ -3034,7 +3051,7 @@ const main$g = async () => {
3034
3051
  if (MODES.some((mode) => values[mode])) {
3035
3052
  return;
3036
3053
  }
3037
- process.stdout.write(`@backtest-kit/cli ${"9.0.0"}\n`);
3054
+ process.stdout.write(`@backtest-kit/cli ${"9.1.1"}\n`);
3038
3055
  process.stdout.write("\n");
3039
3056
  process.stdout.write(`Run with --help to see available commands.\n`);
3040
3057
  process.stdout.write("\n");
@@ -3329,7 +3346,7 @@ const main$a = async () => {
3329
3346
  await cli.moduleConnectionService.loadModule(MODE_MODULE[mode]);
3330
3347
  listenFinish();
3331
3348
  createGracefulShutdown(mode)();
3332
- await cli.resolveService.attachJavascript(entryPoint);
3349
+ await cli.resolveService.attachEntry(entryPoint);
3333
3350
  };
3334
3351
  main$a();
3335
3352
 
@@ -4037,7 +4054,7 @@ const main$1 = async () => {
4037
4054
  if (!values.help) {
4038
4055
  return;
4039
4056
  }
4040
- process.stdout.write(`@backtest-kit/cli ${"9.0.0"}\n\n`);
4057
+ process.stdout.write(`@backtest-kit/cli ${"9.1.1"}\n\n`);
4041
4058
  process.stdout.write(HELP_TEXT);
4042
4059
  process.exit(0);
4043
4060
  };
@@ -4051,7 +4068,7 @@ const main = async () => {
4051
4068
  if (!values.version) {
4052
4069
  return;
4053
4070
  }
4054
- process.stdout.write(`@backtest-kit/cli ${"9.0.0"}\n`);
4071
+ process.stdout.write(`@backtest-kit/cli ${"9.1.1"}\n`);
4055
4072
  process.exit(0);
4056
4073
  };
4057
4074
  main();
package/build/index.mjs CHANGED
@@ -310,6 +310,23 @@ class ResolveService {
310
310
  }
311
311
  _is_launched = true;
312
312
  };
313
+ this.attachEntry = async (jsPath) => {
314
+ this.loggerService.log("resolveService attachEntry", {
315
+ jsPath
316
+ });
317
+ if (_is_launched) {
318
+ throw new Error("Entry point is already attached. Multiple entry points are not allowed.");
319
+ }
320
+ const absolutePath = path.resolve(jsPath);
321
+ const cwd = process.cwd();
322
+ await access(absolutePath, constants.F_OK | constants.R_OK);
323
+ dotenv.config({ path: path.join(cwd, '.env'), override: true, quiet: true });
324
+ {
325
+ this.loaderService.import(absolutePath);
326
+ await entrySubject.next(absolutePath);
327
+ }
328
+ _is_launched = true;
329
+ };
313
330
  }
314
331
  }
315
332
 
@@ -3005,7 +3022,7 @@ const main$g = async () => {
3005
3022
  if (MODES.some((mode) => values[mode])) {
3006
3023
  return;
3007
3024
  }
3008
- process.stdout.write(`@backtest-kit/cli ${"9.0.0"}\n`);
3025
+ process.stdout.write(`@backtest-kit/cli ${"9.1.1"}\n`);
3009
3026
  process.stdout.write("\n");
3010
3027
  process.stdout.write(`Run with --help to see available commands.\n`);
3011
3028
  process.stdout.write("\n");
@@ -3300,7 +3317,7 @@ const main$a = async () => {
3300
3317
  await cli.moduleConnectionService.loadModule(MODE_MODULE[mode]);
3301
3318
  listenFinish();
3302
3319
  createGracefulShutdown(mode)();
3303
- await cli.resolveService.attachJavascript(entryPoint);
3320
+ await cli.resolveService.attachEntry(entryPoint);
3304
3321
  };
3305
3322
  main$a();
3306
3323
 
@@ -4008,7 +4025,7 @@ const main$1 = async () => {
4008
4025
  if (!values.help) {
4009
4026
  return;
4010
4027
  }
4011
- process.stdout.write(`@backtest-kit/cli ${"9.0.0"}\n\n`);
4028
+ process.stdout.write(`@backtest-kit/cli ${"9.1.1"}\n\n`);
4012
4029
  process.stdout.write(HELP_TEXT);
4013
4030
  process.exit(0);
4014
4031
  };
@@ -4022,7 +4039,7 @@ const main = async () => {
4022
4039
  if (!values.version) {
4023
4040
  return;
4024
4041
  }
4025
- process.stdout.write(`@backtest-kit/cli ${"9.0.0"}\n`);
4042
+ process.stdout.write(`@backtest-kit/cli ${"9.1.1"}\n`);
4026
4043
  process.exit(0);
4027
4044
  };
4028
4045
  main();
@@ -3,6 +3,7 @@ version: '3.8'
3
3
  services:
4
4
  backtest:
5
5
  image: tripolskypetr/backtest-kit
6
+ platform: linux/amd64
6
7
  # network_mode: host
7
8
  extra_hosts:
8
9
  - "host.docker.internal:host-gateway"
@@ -15,17 +15,17 @@
15
15
  "@types/node": "25.6.0"
16
16
  },
17
17
  "dependencies": {
18
- "@backtest-kit/cli": "9.0.0",
19
- "@backtest-kit/graph": "9.0.0",
20
- "@backtest-kit/pinets": "9.0.0",
21
- "@backtest-kit/signals": "9.0.0",
22
- "@backtest-kit/ui": "9.0.0",
18
+ "@backtest-kit/cli": "9.1.1",
19
+ "@backtest-kit/graph": "9.1.0",
20
+ "@backtest-kit/pinets": "9.1.0",
21
+ "@backtest-kit/signals": "9.1.0",
22
+ "@backtest-kit/ui": "9.1.0",
23
23
  "@tavily/core": "0.7.2",
24
24
  "@tensorflow/tfjs": "4.22.0",
25
25
  "@tensorflow/tfjs-backend-wasm": "4.22.0",
26
26
  "@tensorflow/tfjs-core": "4.22.0",
27
27
  "agent-swarm-kit": "2.6.0",
28
- "backtest-kit": "9.0.0",
28
+ "backtest-kit": "9.1.0",
29
29
  "dayjs": "1.11.20",
30
30
  "functools-kit": "2.3.0",
31
31
  "garch": "1.2.3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backtest-kit/cli",
3
- "version": "9.0.0",
3
+ "version": "9.1.1",
4
4
  "description": "Zero-boilerplate CLI runner for backtest-kit strategies. Run backtests, paper trading, and live bots with candle cache warming, web dashboard, and Telegram notifications — no setup code required.",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
@@ -63,11 +63,11 @@
63
63
  "devDependencies": {
64
64
  "@babel/plugin-transform-modules-umd": "7.27.1",
65
65
  "@babel/standalone": "7.29.1",
66
- "@backtest-kit/graph": "9.0.0",
67
- "@backtest-kit/ollama": "9.0.0",
68
- "@backtest-kit/pinets": "9.0.0",
69
- "@backtest-kit/signals": "9.0.0",
70
- "@backtest-kit/ui": "9.0.0",
66
+ "@backtest-kit/graph": "9.1.0",
67
+ "@backtest-kit/ollama": "9.1.0",
68
+ "@backtest-kit/pinets": "9.1.0",
69
+ "@backtest-kit/signals": "9.1.0",
70
+ "@backtest-kit/ui": "9.1.0",
71
71
  "@rollup/plugin-replace": "6.0.3",
72
72
  "@rollup/plugin-typescript": "11.1.6",
73
73
  "@types/image-size": "0.7.0",
@@ -75,7 +75,7 @@
75
75
  "@types/mustache": "4.2.6",
76
76
  "@types/node": "22.9.0",
77
77
  "@types/stack-trace": "0.0.33",
78
- "backtest-kit": "9.0.0",
78
+ "backtest-kit": "9.1.0",
79
79
  "glob": "11.0.1",
80
80
  "markdown-it": "14.1.1",
81
81
  "rimraf": "6.0.1",
@@ -90,12 +90,12 @@
90
90
  "peerDependencies": {
91
91
  "@babel/plugin-transform-modules-umd": "^7.27.1",
92
92
  "@babel/standalone": "^7.29.1",
93
- "@backtest-kit/graph": "^9.0.0",
94
- "@backtest-kit/ollama": "^9.0.0",
95
- "@backtest-kit/pinets": "^9.0.0",
96
- "@backtest-kit/signals": "^9.0.0",
97
- "@backtest-kit/ui": "^9.0.0",
98
- "backtest-kit": "^9.0.0",
93
+ "@backtest-kit/graph": "^9.1.0",
94
+ "@backtest-kit/ollama": "^9.1.0",
95
+ "@backtest-kit/pinets": "^9.1.0",
96
+ "@backtest-kit/signals": "^9.1.0",
97
+ "@backtest-kit/ui": "^9.1.0",
98
+ "backtest-kit": "^9.1.0",
99
99
  "markdown-it": "^14.1.1",
100
100
  "typescript": "^5.0.0"
101
101
  },
@@ -13,12 +13,12 @@
13
13
  "license": "ISC",
14
14
  "type": "commonjs",
15
15
  "dependencies": {
16
- "@backtest-kit/cli": "^9.0.0",
17
- "@backtest-kit/graph": "^9.0.0",
18
- "@backtest-kit/pinets": "^9.0.0",
19
- "@backtest-kit/ui": "^9.0.0",
16
+ "@backtest-kit/cli": "^9.1.1",
17
+ "@backtest-kit/graph": "^9.1.0",
18
+ "@backtest-kit/pinets": "^9.1.0",
19
+ "@backtest-kit/ui": "^9.1.0",
20
20
  "agent-swarm-kit": "^2.6.0",
21
- "backtest-kit": "^9.0.0",
21
+ "backtest-kit": "^9.1.0",
22
22
  "functools-kit": "^2.3.0",
23
23
  "garch": "^1.2.3",
24
24
  "get-moment-stamp": "^1.1.2",
package/types.d.ts CHANGED
@@ -222,6 +222,7 @@ declare class ResolveService implements IResolve {
222
222
  attachPine: (pinePath: string) => Promise<string>;
223
223
  attachStrategy: (jsPath: string) => Promise<void>;
224
224
  attachJavascript: (jsPath: string) => Promise<void>;
225
+ attachEntry: (jsPath: string) => Promise<void>;
225
226
  }
226
227
 
227
228
  declare class ErrorService {