@tradejs/node 1.0.0 → 1.0.3

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.
@@ -247,9 +247,24 @@ var loadTradejsConfig = async (cwd = getTradejsProjectCwd()) => {
247
247
  };
248
248
 
249
249
  // src/connectorsRegistry.ts
250
- var connectorCreators = /* @__PURE__ */ new Map();
251
- var providerToConnectorName = /* @__PURE__ */ new Map();
252
- var pluginsLoadPromise = null;
250
+ var createConnectorRegistryState = () => ({
251
+ connectorCreators: /* @__PURE__ */ new Map(),
252
+ providerToConnectorName: /* @__PURE__ */ new Map(),
253
+ pluginsLoadPromise: null
254
+ });
255
+ var registryStateByProjectRoot = /* @__PURE__ */ new Map();
256
+ var getConnectorRegistryState = (cwd = getTradejsProjectCwd()) => {
257
+ const projectRoot = getTradejsProjectCwd(cwd);
258
+ let state = registryStateByProjectRoot.get(projectRoot);
259
+ if (!state) {
260
+ state = createConnectorRegistryState();
261
+ registryStateByProjectRoot.set(projectRoot, state);
262
+ }
263
+ return {
264
+ projectRoot,
265
+ state
266
+ };
267
+ };
253
268
  var BUILTIN_CONNECTOR_NAMES = {
254
269
  ByBit: "ByBit",
255
270
  Binance: "Binance",
@@ -260,7 +275,7 @@ var normalizeProvider = (value) => String(value ?? "").trim().toLowerCase();
260
275
  var toUniqueModules = (modules = []) => [
261
276
  ...new Set(modules.map((moduleName) => moduleName.trim()).filter(Boolean))
262
277
  ];
263
- var findConnectorNameInsensitive = (name) => {
278
+ var findConnectorNameInsensitive = (name, connectorCreators) => {
264
279
  const normalized = name.trim().toLowerCase();
265
280
  if (!normalized) {
266
281
  return null;
@@ -280,7 +295,7 @@ var normalizeProviders = (providers, connectorName) => {
280
295
  }
281
296
  return [normalizeProvider(connectorName)];
282
297
  };
283
- var registerProvider = (provider, connectorName, source) => {
298
+ var registerProvider = (provider, connectorName, source, providerToConnectorName) => {
284
299
  const existing = providerToConnectorName.get(provider);
285
300
  if (existing && existing !== connectorName) {
286
301
  import_logger2.logger.warn(
@@ -293,7 +308,7 @@ var registerProvider = (provider, connectorName, source) => {
293
308
  }
294
309
  providerToConnectorName.set(provider, connectorName);
295
310
  };
296
- var registerEntry = (entry, source) => {
311
+ var registerEntry = (entry, source, state) => {
297
312
  const connectorName = String(entry?.name ?? "").trim();
298
313
  if (!connectorName) {
299
314
  import_logger2.logger.warn("Skip connector entry without name from %s", source);
@@ -307,7 +322,10 @@ var registerEntry = (entry, source) => {
307
322
  );
308
323
  return;
309
324
  }
310
- const existingByName = findConnectorNameInsensitive(connectorName);
325
+ const existingByName = findConnectorNameInsensitive(
326
+ connectorName,
327
+ state.connectorCreators
328
+ );
311
329
  if (existingByName) {
312
330
  import_logger2.logger.warn(
313
331
  'Skip duplicate connector "%s" from %s: already registered as %s',
@@ -317,15 +335,20 @@ var registerEntry = (entry, source) => {
317
335
  );
318
336
  return;
319
337
  }
320
- connectorCreators.set(connectorName, entry.creator);
338
+ state.connectorCreators.set(connectorName, entry.creator);
321
339
  const providers = normalizeProviders(entry.providers, connectorName);
322
340
  for (const provider of providers) {
323
- registerProvider(provider, connectorName, source);
341
+ registerProvider(
342
+ provider,
343
+ connectorName,
344
+ source,
345
+ state.providerToConnectorName
346
+ );
324
347
  }
325
348
  };
326
- var registerEntries = (entries, source) => {
349
+ var registerEntries = (entries, source, state) => {
327
350
  for (const entry of entries) {
328
- registerEntry(entry, source);
351
+ registerEntry(entry, source, state);
329
352
  }
330
353
  };
331
354
  var extractConnectorPluginDefinition = (moduleExport) => {
@@ -355,101 +378,118 @@ var importConnectorPluginModule = async (moduleName) => {
355
378
  moduleName
356
379
  );
357
380
  };
358
- var ensureConnectorPluginsLoaded = async () => {
359
- if (pluginsLoadPromise) {
360
- return pluginsLoadPromise;
361
- }
362
- pluginsLoadPromise = (async () => {
363
- const config = await loadTradejsConfig();
364
- const connectorModules = toUniqueModules(config.connectors);
365
- if (!connectorModules.length) {
366
- return;
367
- }
368
- for (const moduleName of connectorModules) {
369
- try {
370
- const resolvedModuleName = resolvePluginModuleSpecifier(moduleName);
371
- const moduleExport = await importConnectorPluginModule(resolvedModuleName);
372
- const pluginDefinition = extractConnectorPluginDefinition(moduleExport);
373
- if (!pluginDefinition) {
381
+ var ensureConnectorPluginsLoaded = async (cwd = getTradejsProjectCwd()) => {
382
+ const { projectRoot, state } = getConnectorRegistryState(cwd);
383
+ if (!state.pluginsLoadPromise) {
384
+ state.pluginsLoadPromise = (async () => {
385
+ const config = await loadTradejsConfig(projectRoot);
386
+ const connectorModules = toUniqueModules(config.connectors);
387
+ if (!connectorModules.length) {
388
+ return;
389
+ }
390
+ for (const moduleName of connectorModules) {
391
+ try {
392
+ const resolvedModuleName = resolvePluginModuleSpecifier(
393
+ moduleName,
394
+ projectRoot
395
+ );
396
+ const moduleExport = await importConnectorPluginModule(resolvedModuleName);
397
+ const pluginDefinition = extractConnectorPluginDefinition(moduleExport);
398
+ if (!pluginDefinition) {
399
+ import_logger2.logger.warn(
400
+ 'Skip connector plugin "%s": export { connectorEntries } is missing',
401
+ moduleName
402
+ );
403
+ continue;
404
+ }
405
+ registerEntries(pluginDefinition.connectorEntries, moduleName, state);
406
+ } catch (error) {
374
407
  import_logger2.logger.warn(
375
- 'Skip connector plugin "%s": export { connectorEntries } is missing',
376
- moduleName
408
+ 'Failed to load connector plugin "%s": %s',
409
+ moduleName,
410
+ String(error)
377
411
  );
378
- continue;
379
412
  }
380
- registerEntries(pluginDefinition.connectorEntries, moduleName);
381
- } catch (error) {
382
- import_logger2.logger.warn(
383
- 'Failed to load connector plugin "%s": %s',
384
- moduleName,
385
- String(error)
386
- );
387
413
  }
388
- }
389
- })();
390
- return pluginsLoadPromise;
414
+ })();
415
+ }
416
+ await state.pluginsLoadPromise;
391
417
  };
392
- var getConnectorCreatorByName = async (connectorName) => {
393
- await ensureConnectorPluginsLoaded();
418
+ var getConnectorCreatorByName = async (connectorName, cwd = getTradejsProjectCwd()) => {
419
+ await ensureConnectorPluginsLoaded(cwd);
420
+ const { state } = getConnectorRegistryState(cwd);
394
421
  const raw = String(connectorName ?? "").trim();
395
422
  if (!raw) {
396
423
  return void 0;
397
424
  }
398
- const direct = connectorCreators.get(raw);
425
+ const direct = state.connectorCreators.get(raw);
399
426
  if (direct) {
400
427
  return direct;
401
428
  }
402
- const existing = findConnectorNameInsensitive(raw);
429
+ const existing = findConnectorNameInsensitive(raw, state.connectorCreators);
403
430
  if (!existing) {
404
431
  return void 0;
405
432
  }
406
- return connectorCreators.get(existing);
433
+ return state.connectorCreators.get(existing);
407
434
  };
408
- var getConnectorNameByProvider = async (provider) => {
409
- await ensureConnectorPluginsLoaded();
435
+ var getConnectorNameByProvider = async (provider, cwd = getTradejsProjectCwd()) => {
436
+ await ensureConnectorPluginsLoaded(cwd);
437
+ const { state } = getConnectorRegistryState(cwd);
410
438
  const normalized = normalizeProvider(provider);
411
439
  if (!normalized) {
412
440
  return void 0;
413
441
  }
414
- return providerToConnectorName.get(normalized);
442
+ return state.providerToConnectorName.get(normalized);
415
443
  };
416
- var getConnectorCreatorByProvider = async (provider) => {
417
- const connectorName = await getConnectorNameByProvider(provider);
444
+ var getConnectorCreatorByProvider = async (provider, cwd = getTradejsProjectCwd()) => {
445
+ await ensureConnectorPluginsLoaded(cwd);
446
+ const { state } = getConnectorRegistryState(cwd);
447
+ const normalized = normalizeProvider(provider);
448
+ if (!normalized) {
449
+ return void 0;
450
+ }
451
+ const connectorName = state.providerToConnectorName.get(normalized);
418
452
  if (!connectorName) {
419
453
  return void 0;
420
454
  }
421
- return connectorCreators.get(connectorName);
455
+ return state.connectorCreators.get(connectorName);
422
456
  };
423
- var resolveConnectorName = async (providerOrName) => {
457
+ var resolveConnectorName = async (providerOrName, cwd = getTradejsProjectCwd()) => {
458
+ await ensureConnectorPluginsLoaded(cwd);
459
+ const { state } = getConnectorRegistryState(cwd);
424
460
  const raw = String(providerOrName ?? "").trim();
425
461
  if (!raw) {
426
462
  return void 0;
427
463
  }
428
- const byProvider = await getConnectorNameByProvider(raw);
464
+ const byProvider = state.providerToConnectorName.get(normalizeProvider(raw));
429
465
  if (byProvider) {
430
466
  return byProvider;
431
467
  }
432
- const byName = await getConnectorCreatorByName(raw);
433
- if (!byName) {
434
- return void 0;
435
- }
436
- return findConnectorNameInsensitive(raw) ?? void 0;
468
+ return state.connectorCreators.get(raw) && raw ? raw : findConnectorNameInsensitive(raw, state.connectorCreators) ?? void 0;
437
469
  };
438
- var getAvailableConnectorNames = async () => {
439
- await ensureConnectorPluginsLoaded();
440
- return [...connectorCreators.keys()].sort((a, b) => a.localeCompare(b));
470
+ var getAvailableConnectorNames = async (cwd = getTradejsProjectCwd()) => {
471
+ await ensureConnectorPluginsLoaded(cwd);
472
+ const { state } = getConnectorRegistryState(cwd);
473
+ return [...state.connectorCreators.keys()].sort((a, b) => a.localeCompare(b));
441
474
  };
442
- var getAvailableConnectorProviders = async () => {
443
- await ensureConnectorPluginsLoaded();
444
- return [...providerToConnectorName.keys()].sort((a, b) => a.localeCompare(b));
475
+ var getAvailableConnectorProviders = async (cwd = getTradejsProjectCwd()) => {
476
+ await ensureConnectorPluginsLoaded(cwd);
477
+ const { state } = getConnectorRegistryState(cwd);
478
+ return [...state.providerToConnectorName.keys()].sort(
479
+ (a, b) => a.localeCompare(b)
480
+ );
445
481
  };
446
- var registerConnectorEntries = (entries) => {
447
- registerEntries(entries, "runtime");
482
+ var registerConnectorEntries = (entries, cwd = getTradejsProjectCwd()) => {
483
+ const { state } = getConnectorRegistryState(cwd);
484
+ registerEntries(entries, "runtime", state);
448
485
  };
449
- var resetConnectorRegistryCache = () => {
450
- connectorCreators.clear();
451
- providerToConnectorName.clear();
452
- pluginsLoadPromise = null;
486
+ var resetConnectorRegistryCache = (cwd) => {
487
+ const normalizedCwd = String(cwd ?? "").trim();
488
+ if (!normalizedCwd) {
489
+ registryStateByProjectRoot.clear();
490
+ return;
491
+ }
492
+ registryStateByProjectRoot.delete(getTradejsProjectCwd(normalizedCwd));
453
493
  };
454
494
  var DEFAULT_CONNECTOR_NAME = BUILTIN_CONNECTOR_NAMES.ByBit;
455
495
  // Annotate the CommonJS export names for ESM import in node:
@@ -10,8 +10,8 @@ import {
10
10
  registerConnectorEntries,
11
11
  resetConnectorRegistryCache,
12
12
  resolveConnectorName
13
- } from "./chunk-E2QNOA5M.mjs";
14
- import "./chunk-DE7ADBIR.mjs";
13
+ } from "./chunk-MGFEID6K.mjs";
14
+ import "./chunk-3C76HVLA.mjs";
15
15
  import "./chunk-6DZX6EAA.mjs";
16
16
  export {
17
17
  BUILTIN_CONNECTOR_NAMES,
package/dist/pine.d.mts CHANGED
@@ -1,8 +1,32 @@
1
- import { RunPineScriptParams, PineContextLike } from '@tradejs/core/pine';
2
- export * from '@tradejs/core/pine';
1
+ import { Candle } from '@tradejs/types';
3
2
 
3
+ interface PinePlotPoint {
4
+ title?: string;
5
+ time?: number;
6
+ value?: unknown;
7
+ options?: Record<string, unknown>;
8
+ }
9
+ interface PineContextLike {
10
+ plots?: Record<string, {
11
+ data?: PinePlotPoint[];
12
+ }>;
13
+ result?: Record<string, unknown>;
14
+ [key: string]: unknown;
15
+ }
16
+ interface RunPineScriptParams {
17
+ candles: Candle[];
18
+ script: string;
19
+ symbol?: string;
20
+ timeframe?: string;
21
+ inputs?: Record<string, unknown>;
22
+ limit?: number;
23
+ }
24
+ declare const getPinePlotSeries: (context: PineContextLike, plotName: string) => PinePlotPoint[];
25
+ declare const getLatestPinePlotValue: (context: PineContextLike, plotName: string) => unknown;
26
+ declare const asFiniteNumber: (value: unknown) => number | undefined;
27
+ declare const asPineBoolean: (value: unknown) => boolean;
4
28
  declare const loadPineScript: (filePath: string, fallback?: string) => string;
5
29
  declare const createLoadPineScript: (baseDir: string) => ((fileNameOrPath: string, fallback?: string) => string);
6
30
  declare const runPineScript: ({ candles, script, symbol, timeframe, inputs, limit, }: RunPineScriptParams) => Promise<PineContextLike>;
7
31
 
8
- export { createLoadPineScript, loadPineScript, runPineScript };
32
+ export { type PineContextLike, type PinePlotPoint, type RunPineScriptParams, asFiniteNumber, asPineBoolean, createLoadPineScript, getLatestPinePlotValue, getPinePlotSeries, loadPineScript, runPineScript };
package/dist/pine.d.ts CHANGED
@@ -1,8 +1,32 @@
1
- import { RunPineScriptParams, PineContextLike } from '@tradejs/core/pine';
2
- export * from '@tradejs/core/pine';
1
+ import { Candle } from '@tradejs/types';
3
2
 
3
+ interface PinePlotPoint {
4
+ title?: string;
5
+ time?: number;
6
+ value?: unknown;
7
+ options?: Record<string, unknown>;
8
+ }
9
+ interface PineContextLike {
10
+ plots?: Record<string, {
11
+ data?: PinePlotPoint[];
12
+ }>;
13
+ result?: Record<string, unknown>;
14
+ [key: string]: unknown;
15
+ }
16
+ interface RunPineScriptParams {
17
+ candles: Candle[];
18
+ script: string;
19
+ symbol?: string;
20
+ timeframe?: string;
21
+ inputs?: Record<string, unknown>;
22
+ limit?: number;
23
+ }
24
+ declare const getPinePlotSeries: (context: PineContextLike, plotName: string) => PinePlotPoint[];
25
+ declare const getLatestPinePlotValue: (context: PineContextLike, plotName: string) => unknown;
26
+ declare const asFiniteNumber: (value: unknown) => number | undefined;
27
+ declare const asPineBoolean: (value: unknown) => boolean;
4
28
  declare const loadPineScript: (filePath: string, fallback?: string) => string;
5
29
  declare const createLoadPineScript: (baseDir: string) => ((fileNameOrPath: string, fallback?: string) => string);
6
30
  declare const runPineScript: ({ candles, script, symbol, timeframe, inputs, limit, }: RunPineScriptParams) => Promise<PineContextLike>;
7
31
 
8
- export { createLoadPineScript, loadPineScript, runPineScript };
32
+ export { type PineContextLike, type PinePlotPoint, type RunPineScriptParams, asFiniteNumber, asPineBoolean, createLoadPineScript, getLatestPinePlotValue, getPinePlotSeries, loadPineScript, runPineScript };
package/dist/pine.js CHANGED
@@ -17,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
21
  // If the importer is in node compatibility mode or this is not an ESM
23
22
  // file that has been converted to a CommonJS file using a Babel-
@@ -31,14 +30,39 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
30
  // src/pine.ts
32
31
  var pine_exports = {};
33
32
  __export(pine_exports, {
33
+ asFiniteNumber: () => asFiniteNumber,
34
+ asPineBoolean: () => asPineBoolean,
34
35
  createLoadPineScript: () => createLoadPineScript,
36
+ getLatestPinePlotValue: () => getLatestPinePlotValue,
37
+ getPinePlotSeries: () => getPinePlotSeries,
35
38
  loadPineScript: () => loadPineScript,
36
39
  runPineScript: () => runPineScript
37
40
  });
38
41
  module.exports = __toCommonJS(pine_exports);
39
42
  var import_node_fs = __toESM(require("fs"));
40
43
  var import_node_path = __toESM(require("path"));
41
- __reExport(pine_exports, require("@tradejs/core/pine"), module.exports);
44
+ var getPinePlotSeries = (context, plotName) => {
45
+ const name = String(plotName || "").trim();
46
+ if (!name) return [];
47
+ const data = context?.plots?.[name]?.data;
48
+ return Array.isArray(data) ? data : [];
49
+ };
50
+ var getLatestPinePlotValue = (context, plotName) => {
51
+ const series = getPinePlotSeries(context, plotName);
52
+ if (!series.length) return void 0;
53
+ return series[series.length - 1]?.value;
54
+ };
55
+ var asFiniteNumber = (value) => {
56
+ if (typeof value !== "number" || !Number.isFinite(value)) {
57
+ return void 0;
58
+ }
59
+ return value;
60
+ };
61
+ var asPineBoolean = (value) => {
62
+ if (typeof value === "boolean") return value;
63
+ if (typeof value === "number") return Number.isFinite(value) && value !== 0;
64
+ return false;
65
+ };
42
66
  var loadPinets = () => {
43
67
  const resolvedPath = require.resolve("pinets");
44
68
  const cjsPath = resolvedPath.includes("pinets.min.browser") ? resolvedPath.replace(/pinets\.min\.browser(\.es)?\.js$/, "pinets.min.cjs") : resolvedPath;
@@ -121,8 +145,11 @@ var runPineScript = async ({
121
145
  };
122
146
  // Annotate the CommonJS export names for ESM import in node:
123
147
  0 && (module.exports = {
148
+ asFiniteNumber,
149
+ asPineBoolean,
124
150
  createLoadPineScript,
151
+ getLatestPinePlotValue,
152
+ getPinePlotSeries,
125
153
  loadPineScript,
126
- runPineScript,
127
- ...require("@tradejs/core/pine")
154
+ runPineScript
128
155
  });
package/dist/pine.mjs CHANGED
@@ -1,11 +1,19 @@
1
1
  import {
2
+ asFiniteNumber,
3
+ asPineBoolean,
2
4
  createLoadPineScript,
5
+ getLatestPinePlotValue,
6
+ getPinePlotSeries,
3
7
  loadPineScript,
4
8
  runPineScript
5
- } from "./chunk-CVTV6S2V.mjs";
9
+ } from "./chunk-7ICOZAKA.mjs";
6
10
  import "./chunk-6DZX6EAA.mjs";
7
11
  export {
12
+ asFiniteNumber,
13
+ asPineBoolean,
8
14
  createLoadPineScript,
15
+ getLatestPinePlotValue,
16
+ getPinePlotSeries,
9
17
  loadPineScript,
10
18
  runPineScript
11
19
  };
@@ -1,15 +1,15 @@
1
1
  import { StrategyManifest, StrategyCreator, StrategyRegistryEntry } from '@tradejs/types';
2
2
 
3
- declare const ensureStrategyPluginsLoaded: () => Promise<void>;
4
- declare const ensureIndicatorPluginsLoaded: () => Promise<void>;
5
- declare const getStrategyCreator: (name: string) => Promise<StrategyCreator | undefined>;
6
- declare const getAvailableStrategyNames: () => Promise<string[]>;
7
- declare const getRegisteredStrategies: () => Record<string, StrategyCreator>;
8
- declare const getRegisteredManifests: () => StrategyManifest[];
9
- declare const getStrategyManifest: (name?: string) => StrategyManifest | undefined;
10
- declare const isKnownStrategy: (name: string) => boolean;
11
- declare const registerStrategyEntries: (entries: readonly StrategyRegistryEntry[]) => void;
12
- declare const resetStrategyRegistryCache: () => void;
3
+ declare const ensureStrategyPluginsLoaded: (cwd?: string) => Promise<void>;
4
+ declare const ensureIndicatorPluginsLoaded: (cwd?: string) => Promise<void>;
5
+ declare const getStrategyCreator: (name: string, cwd?: string) => Promise<StrategyCreator | undefined>;
6
+ declare const getAvailableStrategyNames: (cwd?: string) => Promise<string[]>;
7
+ declare const getRegisteredStrategies: (cwd?: string) => Record<string, StrategyCreator>;
8
+ declare const getRegisteredManifests: (cwd?: string) => StrategyManifest[];
9
+ declare const getStrategyManifest: (name?: string, cwd?: string) => StrategyManifest | undefined;
10
+ declare const isKnownStrategy: (name: string, cwd?: string) => boolean;
11
+ declare const registerStrategyEntries: (entries: readonly StrategyRegistryEntry[], cwd?: string) => void;
12
+ declare const resetStrategyRegistryCache: (cwd?: string) => void;
13
13
  declare const strategies: Record<string, StrategyCreator>;
14
14
 
15
15
  export { ensureIndicatorPluginsLoaded, ensureStrategyPluginsLoaded, getAvailableStrategyNames, getRegisteredManifests, getRegisteredStrategies, getStrategyCreator, getStrategyManifest, isKnownStrategy, registerStrategyEntries, resetStrategyRegistryCache, strategies };
@@ -1,15 +1,15 @@
1
1
  import { StrategyManifest, StrategyCreator, StrategyRegistryEntry } from '@tradejs/types';
2
2
 
3
- declare const ensureStrategyPluginsLoaded: () => Promise<void>;
4
- declare const ensureIndicatorPluginsLoaded: () => Promise<void>;
5
- declare const getStrategyCreator: (name: string) => Promise<StrategyCreator | undefined>;
6
- declare const getAvailableStrategyNames: () => Promise<string[]>;
7
- declare const getRegisteredStrategies: () => Record<string, StrategyCreator>;
8
- declare const getRegisteredManifests: () => StrategyManifest[];
9
- declare const getStrategyManifest: (name?: string) => StrategyManifest | undefined;
10
- declare const isKnownStrategy: (name: string) => boolean;
11
- declare const registerStrategyEntries: (entries: readonly StrategyRegistryEntry[]) => void;
12
- declare const resetStrategyRegistryCache: () => void;
3
+ declare const ensureStrategyPluginsLoaded: (cwd?: string) => Promise<void>;
4
+ declare const ensureIndicatorPluginsLoaded: (cwd?: string) => Promise<void>;
5
+ declare const getStrategyCreator: (name: string, cwd?: string) => Promise<StrategyCreator | undefined>;
6
+ declare const getAvailableStrategyNames: (cwd?: string) => Promise<string[]>;
7
+ declare const getRegisteredStrategies: (cwd?: string) => Record<string, StrategyCreator>;
8
+ declare const getRegisteredManifests: (cwd?: string) => StrategyManifest[];
9
+ declare const getStrategyManifest: (name?: string, cwd?: string) => StrategyManifest | undefined;
10
+ declare const isKnownStrategy: (name: string, cwd?: string) => boolean;
11
+ declare const registerStrategyEntries: (entries: readonly StrategyRegistryEntry[], cwd?: string) => void;
12
+ declare const resetStrategyRegistryCache: (cwd?: string) => void;
13
13
  declare const strategies: Record<string, StrategyCreator>;
14
14
 
15
15
  export { ensureIndicatorPluginsLoaded, ensureStrategyPluginsLoaded, getAvailableStrategyNames, getRegisteredManifests, getRegisteredStrategies, getStrategyCreator, getStrategyManifest, isKnownStrategy, registerStrategyEntries, resetStrategyRegistryCache, strategies };