tradeblocks-mcp 3.0.0 → 3.0.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/server/index.js CHANGED
@@ -45,7 +45,7 @@ import {
45
45
  BACHELIER_DTE_THRESHOLD,
46
46
  MassiveProvider,
47
47
  ThetaDataProvider,
48
- applyQuoteGreeks,
48
+ applyQuoteGreeksParallel,
49
49
  bachelierPrice,
50
50
  bsPrice,
51
51
  buildOccTicker,
@@ -54,7 +54,7 @@ import {
54
54
  getProvider,
55
55
  markPrice,
56
56
  parseLegsString
57
- } from "./chunk-JAAQMESY.js";
57
+ } from "./chunk-PNKG7RY7.js";
58
58
  import {
59
59
  PortfolioStatsCalculator,
60
60
  REPORT_FIELDS,
@@ -15641,7 +15641,7 @@ var MarketIngestor = class {
15641
15641
  underlyingPriceByTime.set(time, bar.open);
15642
15642
  }
15643
15643
  }
15644
- const stats = applyQuoteGreeks({
15644
+ const stats = await applyQuoteGreeksParallel({
15645
15645
  rows,
15646
15646
  getDate: (row) => row.timestamp.slice(0, 10),
15647
15647
  getTime: (row) => row.timestamp.slice(11, 16),
@@ -19714,9 +19714,21 @@ async function startTradeBlocksMcp(options = {}) {
19714
19714
  process.on("SIGINT", shutdown);
19715
19715
  process.on("SIGTERM", shutdown);
19716
19716
  }
19717
- var entrypoint = process.argv[1] ? path13.resolve(process.argv[1]) : "";
19718
- var currentFile = fileURLToPath(import.meta.url);
19719
- if (entrypoint === currentFile) {
19717
+ async function resolveEntrypointPath(filePath) {
19718
+ const resolved = path13.resolve(filePath);
19719
+ try {
19720
+ return await fs3.realpath(resolved);
19721
+ } catch {
19722
+ return resolved;
19723
+ }
19724
+ }
19725
+ async function isDirectEntrypoint() {
19726
+ if (!process.argv[1]) return false;
19727
+ const entrypoint = await resolveEntrypointPath(process.argv[1]);
19728
+ const currentFile = await resolveEntrypointPath(fileURLToPath(import.meta.url));
19729
+ return entrypoint === currentFile;
19730
+ }
19731
+ if (await isDirectEntrypoint()) {
19720
19732
  startTradeBlocksMcp().catch((error) => {
19721
19733
  console.error("Error:", error.message || error);
19722
19734
  process.exit(1);