@8btc/finance-assistant-mcp 0.0.59 → 0.0.61

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.
Files changed (2) hide show
  1. package/dist/index.cjs +15 -16
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -45,7 +45,7 @@ function _interopNamespaceDefault(e) {
45
45
  }
46
46
  const echarts__namespace = /* @__PURE__ */ _interopNamespaceDefault(echarts);
47
47
  const d3__namespace = /* @__PURE__ */ _interopNamespaceDefault(d3);
48
- const version = "0.0.59";
48
+ const version = "0.0.61";
49
49
  const pkgJSON = {
50
50
  version
51
51
  };
@@ -1545,7 +1545,7 @@ const getFileAutoRename = async (filePath) => {
1545
1545
  const getJsonDataIfExists = async (jsonPath, defaultValue) => {
1546
1546
  try {
1547
1547
  await fsPromises.access(jsonPath, fsPromises.constants.F_OK);
1548
- const jsonRes = await fsPromises.readFile(jsonPath);
1548
+ const jsonRes = await fsPromises.readFile(jsonPath, "utf-8");
1549
1549
  return JSON.parse(jsonRes.toString());
1550
1550
  } catch (err) {
1551
1551
  return defaultValue;
@@ -1893,9 +1893,7 @@ const renderInstitutionPie = (rawData) => {
1893
1893
  radius: "70%",
1894
1894
  label: {
1895
1895
  formatter: (v) => {
1896
- return `${v.name} ${formatNumberToUnit(
1897
- Number(v.value || 0) * 100
1898
- )}%`;
1896
+ return `${v.name} ${formatNumberToUnit(Number(v.value || 0))}%`;
1899
1897
  }
1900
1898
  },
1901
1899
  data: rawData.map((it) => {
@@ -2845,9 +2843,9 @@ const tool$4 = {
2845
2843
  description: "生成基本面分析报告pdf,传入的json参数必须是标准格式的",
2846
2844
  inputSchema: zodToJsonSchema(fundamentalSchema)
2847
2845
  };
2848
- const toolHandler$4 = async (args) => {
2846
+ const toolHandler$4 = async (partialArgs) => {
2849
2847
  try {
2850
- const result = z.object(fundamentalSchema).safeParse(args);
2848
+ const result = z.object(fundamentalSchema).safeParse(partialArgs);
2851
2849
  if (!result.success) {
2852
2850
  throw new types_js.McpError(
2853
2851
  types_js.ErrorCode.InvalidParams,
@@ -2855,14 +2853,15 @@ const toolHandler$4 = async (args) => {
2855
2853
  );
2856
2854
  }
2857
2855
  logger.info(`start: ${(/* @__PURE__ */ new Date()).getTime()}`);
2858
- logger.info(args);
2859
- const jsonData = await getJsonDataIfExists(args.raw_data_path, {});
2860
- logger.info(`readFile `, args.raw_data_path);
2856
+ logger.info(partialArgs);
2857
+ const jsonData = await getJsonDataIfExists(partialArgs.raw_data_path, {});
2858
+ logger.info(`readFile `, partialArgs.raw_data_path);
2861
2859
  logger.info(jsonData);
2862
- const resp = generateFundamentalHtml({
2863
- ...args,
2860
+ const args = {
2861
+ ...partialArgs,
2864
2862
  ...jsonData
2865
- });
2863
+ };
2864
+ const resp = generateFundamentalHtml(args);
2866
2865
  const pdfUrl = await generatePDF({
2867
2866
  list: resp,
2868
2867
  title: "基本面分析报告",
@@ -8547,7 +8546,7 @@ function Chapter7({
8547
8546
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: data.pattern_analysis.short_term.short_resistance })
8548
8547
  ] }),
8549
8548
  /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
8550
- "支持位:",
8549
+ "支撑位:",
8551
8550
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: data.pattern_analysis.short_term.short_support })
8552
8551
  ] }),
8553
8552
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: data.pattern_analysis.short_term.pattern_desc })
@@ -8581,7 +8580,7 @@ function Chapter7({
8581
8580
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: data.pattern_analysis.intermediate_term.resistance })
8582
8581
  ] }),
8583
8582
  /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
8584
- "支持位:",
8583
+ "支撑位:",
8585
8584
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: data.pattern_analysis.intermediate_term.support })
8586
8585
  ] }),
8587
8586
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: data.pattern_analysis.intermediate_term.pattern_desc })
@@ -8615,7 +8614,7 @@ function Chapter7({
8615
8614
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: data.pattern_analysis.long_term.resistance })
8616
8615
  ] }),
8617
8616
  /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
8618
- "支持位:",
8617
+ "支撑位:",
8619
8618
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: data.pattern_analysis.long_term.support })
8620
8619
  ] }),
8621
8620
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: data.pattern_analysis.long_term.pattern_desc })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@8btc/finance-assistant-mcp",
3
- "version": "0.0.59",
3
+ "version": "0.0.61",
4
4
  "description": "财经agent辅助mcp工具",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",