@8btc/finance-assistant-mcp 0.0.43 → 0.0.45

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 +27 -22
  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.43";
48
+ const version = "0.0.45";
49
49
  const pkgJSON = {
50
50
  version
51
51
  };
@@ -6283,24 +6283,6 @@ const stockForecastSchema = {
6283
6283
  market: zod.z.string().describe("市场"),
6284
6284
  name: zod.z.string().describe("上市公司名称"),
6285
6285
  trend_forecasting_review: zod.z.string().describe("趋势预测综述"),
6286
- history: zod.z.array(
6287
- zod.z.object({
6288
- date: zod.z.string().describe("日期"),
6289
- close_price: zod.z.number().describe("收盘价")
6290
- })
6291
- ).describe("历史数据"),
6292
- predict: zod.z.array(
6293
- zod.z.object({
6294
- date: zod.z.string().describe("日期"),
6295
- close_price: zod.z.number().describe("收盘价")
6296
- })
6297
- ).describe("预测数据"),
6298
- backtest: zod.z.array(
6299
- zod.z.object({
6300
- date: zod.z.string().describe("日期"),
6301
- close_price: zod.z.number().describe("收盘价")
6302
- })
6303
- ).describe("回测数据"),
6304
6286
  history_data_path: zod.z.string().optional().describe("历史数据路径"),
6305
6287
  predict_data_path: zod.z.string().optional().describe("预测数据路径"),
6306
6288
  backtest_data_path: zod.z.string().optional().describe("回测数据路径"),
@@ -6360,10 +6342,29 @@ const stockForecastSchema = {
6360
6342
  pic_interpret: zod.z.string().describe("区间命中率解读"),
6361
6343
  comprehensive_analysis_and_assessment: zod.z.string().describe("综合研判"),
6362
6344
  key_findings_and_conclusions: zod.z.string().describe("核心结论"),
6363
- final_recommendations: zod.z.string().describe("最终建议")
6345
+ final_recommendations: zod.z.string().describe("最终建议"),
6346
+ data_path: zod.z.string().describe("数据存储的地址,**这很重要**:不要workspace的地址")
6364
6347
  };
6365
6348
  zod.z.object({
6366
- ...stockForecastSchema
6349
+ ...stockForecastSchema,
6350
+ history: zod.z.array(
6351
+ zod.z.object({
6352
+ date: zod.z.string().describe("日期"),
6353
+ close_price: zod.z.number().describe("收盘价")
6354
+ })
6355
+ ).describe("历史数据"),
6356
+ predict: zod.z.array(
6357
+ zod.z.object({
6358
+ date: zod.z.string().describe("日期"),
6359
+ close_price: zod.z.number().describe("收盘价")
6360
+ })
6361
+ ).describe("预测数据"),
6362
+ backtest: zod.z.array(
6363
+ zod.z.object({
6364
+ date: zod.z.string().describe("日期"),
6365
+ close_price: zod.z.number().describe("收盘价")
6366
+ })
6367
+ ).describe("回测数据")
6367
6368
  });
6368
6369
  const tool$1 = {
6369
6370
  name: "generate_stock_forecast_pdf",
@@ -6374,8 +6375,12 @@ const toolHandler$1 = async (args) => {
6374
6375
  try {
6375
6376
  logger.info(`start: ${(/* @__PURE__ */ new Date()).getTime()}`);
6376
6377
  logger.info(args);
6378
+ const data = await getJsonDataIfExists(args.data_path, {});
6377
6379
  const resp = generateStockForecastHtml({
6378
- ...args
6380
+ ...args,
6381
+ history: data.history || [],
6382
+ predict: data.predict || [],
6383
+ backtest: data.backtest || []
6379
6384
  });
6380
6385
  const pdfUrl = await generatePDF({
6381
6386
  list: resp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@8btc/finance-assistant-mcp",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "财经agent辅助mcp工具",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",