@8btc/finance-assistant-mcp 0.0.28 → 0.0.30
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/dist/index.cjs +204 -108
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -122,6 +122,37 @@ const startHTTPStreamableServer = async (createServer2, endpoint = "/mcp", port
|
|
|
122
122
|
);
|
|
123
123
|
});
|
|
124
124
|
};
|
|
125
|
+
const colors = [
|
|
126
|
+
// "#FFD147", // 1. MA5 - 亮黄色
|
|
127
|
+
// "#FF5858", // 2. MA10 - 鲜红色
|
|
128
|
+
// "#3F88C5", // 3. MA20 - 靛蓝色
|
|
129
|
+
// "#7B69C1", // 4. MA30 - 紫罗兰
|
|
130
|
+
// "#00B09A", // 5. MA40 - 青绿色
|
|
131
|
+
// "#FA9F42", // 6. MA60 - 橙色
|
|
132
|
+
// // 7. MA90 - 深洋红
|
|
133
|
+
// "#6A994E", // 8. MA120 - 橄榄绿
|
|
134
|
+
// "#8AA2AE", // 9. MA200 - 灰蓝色
|
|
135
|
+
// "#A07F7A", // 10. MA250 - 棕色
|
|
136
|
+
"#244485ff",
|
|
137
|
+
// 4. Blue 700 (比600更深的亮蓝色)
|
|
138
|
+
"#FA9F42",
|
|
139
|
+
"#D13F79",
|
|
140
|
+
"#FFD147",
|
|
141
|
+
"#7C3F0A",
|
|
142
|
+
// 6. Amber 700 (比600更深的深琥珀色/棕橙色)
|
|
143
|
+
"#C05621",
|
|
144
|
+
// 3. Yellow 700 (比600更深的暗黄色/金橙色)
|
|
145
|
+
"#6B21A8",
|
|
146
|
+
// 5. Violet 700 (比600更深的紫罗兰色)
|
|
147
|
+
"#404040",
|
|
148
|
+
// 7. Neutral 700 (比600更深的通用灰色)
|
|
149
|
+
// 紫色系/粉色系 (Purples/Pinks)
|
|
150
|
+
"#047857",
|
|
151
|
+
// 1. Green 700 (深绿色,比600更深)
|
|
152
|
+
"#C81E1E"
|
|
153
|
+
// 2. Red 700 (比600更深的鲜红色)
|
|
154
|
+
];
|
|
155
|
+
const splitLineColor = "#F5F5F5";
|
|
125
156
|
const renderHeat = (heat) => {
|
|
126
157
|
const chart = echarts__namespace.init(null, null, {
|
|
127
158
|
renderer: "svg",
|
|
@@ -148,8 +179,10 @@ const renderHeat = (heat) => {
|
|
|
148
179
|
lineStyle: {
|
|
149
180
|
width: 6,
|
|
150
181
|
color: [
|
|
151
|
-
[0.5, "#cccccc"],
|
|
152
|
-
[1, "#666666"]
|
|
182
|
+
// [0.5, "#cccccc"],
|
|
183
|
+
// [1, "#666666"],
|
|
184
|
+
[0.5, colors[0]],
|
|
185
|
+
[1, colors[1]]
|
|
153
186
|
]
|
|
154
187
|
}
|
|
155
188
|
},
|
|
@@ -157,7 +190,7 @@ const renderHeat = (heat) => {
|
|
|
157
190
|
icon: "path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",
|
|
158
191
|
length: "12%",
|
|
159
192
|
width: 20,
|
|
160
|
-
offsetCenter: [0, "-
|
|
193
|
+
offsetCenter: [0, "-55%"],
|
|
161
194
|
itemStyle: {
|
|
162
195
|
color: "auto"
|
|
163
196
|
}
|
|
@@ -178,10 +211,10 @@ const renderHeat = (heat) => {
|
|
|
178
211
|
},
|
|
179
212
|
axisLabel: {
|
|
180
213
|
color: "#464646",
|
|
181
|
-
fontSize:
|
|
182
|
-
distance: -
|
|
214
|
+
fontSize: 18,
|
|
215
|
+
distance: -65,
|
|
183
216
|
// rotate: "tangential",
|
|
184
|
-
formatter:
|
|
217
|
+
formatter: (value) => {
|
|
185
218
|
if (value === 0) {
|
|
186
219
|
return "0";
|
|
187
220
|
} else if (value === 1) {
|
|
@@ -196,7 +229,7 @@ const renderHeat = (heat) => {
|
|
|
196
229
|
},
|
|
197
230
|
detail: {
|
|
198
231
|
fontSize: 30,
|
|
199
|
-
offsetCenter: [0, "-
|
|
232
|
+
offsetCenter: [0, "-30%"],
|
|
200
233
|
valueAnimation: true,
|
|
201
234
|
formatter: function(value) {
|
|
202
235
|
return value + "";
|
|
@@ -241,7 +274,7 @@ const renderSentimentDistribute = (rawData) => {
|
|
|
241
274
|
}
|
|
242
275
|
];
|
|
243
276
|
const option = {
|
|
244
|
-
color:
|
|
277
|
+
color: colors,
|
|
245
278
|
animation: false,
|
|
246
279
|
tooltip: {
|
|
247
280
|
trigger: "item"
|
|
@@ -663,67 +696,46 @@ function Chapter3$2({
|
|
|
663
696
|
] })
|
|
664
697
|
] });
|
|
665
698
|
}
|
|
666
|
-
function
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
return data.industry_sentiment;
|
|
671
|
-
case "market":
|
|
672
|
-
return data.market_sentiment;
|
|
673
|
-
case "stock":
|
|
674
|
-
return data.stock_sentiment;
|
|
699
|
+
function Chapter4Sector({ data }) {
|
|
700
|
+
const d = react.useMemo(() => {
|
|
701
|
+
if (data.report_type === "market") {
|
|
702
|
+
return data.market;
|
|
675
703
|
}
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
style: {
|
|
699
|
-
width: `${slideWidth}px`
|
|
700
|
-
},
|
|
701
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute w-4 h-4 border border-[#171717] rounded-full right-0 -translate-y-[5px] translate-x-1/2 bg-white" })
|
|
704
|
+
if (data.report_type === "industry") {
|
|
705
|
+
const temp = data.industry;
|
|
706
|
+
return {
|
|
707
|
+
industry_impact: {
|
|
708
|
+
bullish_industries: temp.subsector_impact.bullish_subsectors.map(
|
|
709
|
+
(it) => {
|
|
710
|
+
return {
|
|
711
|
+
sector: it.subsector,
|
|
712
|
+
score: it.score,
|
|
713
|
+
reason: it.reason
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
),
|
|
717
|
+
bearish_industries: temp.subsector_impact.bearish_subsectors.map(
|
|
718
|
+
(it) => {
|
|
719
|
+
return {
|
|
720
|
+
sector: it.subsector,
|
|
721
|
+
score: it.score,
|
|
722
|
+
reason: it.reason
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
)
|
|
702
726
|
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
] }),
|
|
709
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center my-3", children: [
|
|
710
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "0" }),
|
|
711
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "中性" })
|
|
712
|
-
] }),
|
|
713
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center my-3 translate-x-4", children: [
|
|
714
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "1" }),
|
|
715
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "乐观" })
|
|
716
|
-
] })
|
|
717
|
-
] })
|
|
718
|
-
] }) }),
|
|
719
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "4.2 利好利空行业分析" }),
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
return data.market;
|
|
730
|
+
}, [data]);
|
|
731
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
720
732
|
/* @__PURE__ */ jsxRuntime.jsxs("table", { className: "table-fixed text-left border-b w-full", children: [
|
|
721
733
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "border-t border-b h-[40px]", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
722
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-1/2 px-2 font-bold", children: "
|
|
734
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-1/2 px-2 font-bold", children: "板块" }),
|
|
723
735
|
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-1/2 px-2 font-bold", children: "利空利好" })
|
|
724
736
|
] }) }),
|
|
725
737
|
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
726
|
-
|
|
738
|
+
d.industry_impact.bullish_industries.map((it, index) => {
|
|
727
739
|
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "h-[40px]", children: [
|
|
728
740
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children: it.sector }),
|
|
729
741
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children: Array(it.score).fill(void 0).map((itt, index2) => {
|
|
@@ -731,7 +743,7 @@ function Chapter4$2({ data }) {
|
|
|
731
743
|
}) })
|
|
732
744
|
] }, index);
|
|
733
745
|
}),
|
|
734
|
-
|
|
746
|
+
d.industry_impact.bearish_industries.map((it, index) => {
|
|
735
747
|
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "h-[40px]", children: [
|
|
736
748
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children: it.sector }),
|
|
737
749
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children: Array(Math.abs(it.score)).fill(void 0).map((itt, index2) => {
|
|
@@ -742,7 +754,7 @@ function Chapter4$2({ data }) {
|
|
|
742
754
|
] })
|
|
743
755
|
] }),
|
|
744
756
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-bold", children: "利好行业" }),
|
|
745
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "table space-y-2", children:
|
|
757
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "table space-y-2", children: d.industry_impact.bullish_industries.map((it, index) => {
|
|
746
758
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
747
759
|
/* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
|
|
748
760
|
it.sector,
|
|
@@ -759,7 +771,7 @@ function Chapter4$2({ data }) {
|
|
|
759
771
|
] }, index);
|
|
760
772
|
}) }),
|
|
761
773
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-bold", children: "利空行业" }),
|
|
762
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "table space-y-2", children:
|
|
774
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "table space-y-2", children: d.industry_impact.bearish_industries.map((it, index) => {
|
|
763
775
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
764
776
|
/* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
|
|
765
777
|
it.sector,
|
|
@@ -777,7 +789,87 @@ function Chapter4$2({ data }) {
|
|
|
777
789
|
}) })
|
|
778
790
|
] });
|
|
779
791
|
}
|
|
792
|
+
function Chapter4$2({ data }) {
|
|
793
|
+
const sentiment = react.useMemo(() => {
|
|
794
|
+
switch (data.report_type) {
|
|
795
|
+
case "industry":
|
|
796
|
+
return data.industry_sentiment;
|
|
797
|
+
case "market":
|
|
798
|
+
return data.market_sentiment;
|
|
799
|
+
case "stock":
|
|
800
|
+
return data.stock_sentiment;
|
|
801
|
+
}
|
|
802
|
+
}, [data]);
|
|
803
|
+
const sentimentValue = sentiment?.value || 0;
|
|
804
|
+
const normalized = sentimentValue / 100;
|
|
805
|
+
const slideWidth = normalized * 400;
|
|
806
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chapterPage", children: [
|
|
807
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionHeader, { index: 4, title: "情绪钟摆与板块轮动逻辑" }),
|
|
808
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "4.1 市场情绪指数" }),
|
|
809
|
+
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "table space-y-1", children: [
|
|
810
|
+
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
811
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "指数读数:" }),
|
|
812
|
+
sentimentValue
|
|
813
|
+
] }),
|
|
814
|
+
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
815
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "一句话解释:" }),
|
|
816
|
+
sentiment?.comment
|
|
817
|
+
] })
|
|
818
|
+
] }),
|
|
819
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-[400px] mx-auto relative", children: [
|
|
820
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[400px] rounded-full h-1.5 bg-[#F5F5F5] absolute", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
821
|
+
"div",
|
|
822
|
+
{
|
|
823
|
+
className: cn("bg-black h-1.5 relative rounded-full"),
|
|
824
|
+
style: {
|
|
825
|
+
width: `${slideWidth}px`
|
|
826
|
+
},
|
|
827
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute w-4 h-4 border border-[#171717] rounded-full right-0 -translate-y-[5px] translate-x-1/2 bg-white" })
|
|
828
|
+
}
|
|
829
|
+
) }),
|
|
830
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between font-bold", children: [
|
|
831
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center my-3 -translate-x-4", children: [
|
|
832
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "-1" }),
|
|
833
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "悲观" })
|
|
834
|
+
] }),
|
|
835
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center my-3", children: [
|
|
836
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "0" }),
|
|
837
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "中性" })
|
|
838
|
+
] }),
|
|
839
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center my-3 translate-x-4", children: [
|
|
840
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "1" }),
|
|
841
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "乐观" })
|
|
842
|
+
] })
|
|
843
|
+
] })
|
|
844
|
+
] }) }),
|
|
845
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "section-sub-header", children: "4.2 利好利空行业分析" }),
|
|
846
|
+
/* @__PURE__ */ jsxRuntime.jsx(Chapter4Sector, { data })
|
|
847
|
+
] });
|
|
848
|
+
}
|
|
780
849
|
function Chapter5$2({ data }) {
|
|
850
|
+
const d = react.useMemo(() => {
|
|
851
|
+
if (data.report_type === "industry") {
|
|
852
|
+
const dd = data.industry.industry_asset_linkage;
|
|
853
|
+
return {
|
|
854
|
+
a_share: {
|
|
855
|
+
reason: dd.a_share.reason,
|
|
856
|
+
impact: dd.a_share.impact,
|
|
857
|
+
performance: dd.a_share.industry_performance
|
|
858
|
+
},
|
|
859
|
+
hk_share: {
|
|
860
|
+
reason: dd.hk_share.reason,
|
|
861
|
+
impact: dd.hk_share.impact,
|
|
862
|
+
performance: dd.hk_share.industry_performance
|
|
863
|
+
},
|
|
864
|
+
us_share: {
|
|
865
|
+
reason: dd.us_share.reason,
|
|
866
|
+
impact: dd.us_share.impact,
|
|
867
|
+
performance: dd.us_share.industry_performance
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
return data.market.asset_class_impact;
|
|
872
|
+
}, [data]);
|
|
781
873
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chapterPage", children: [
|
|
782
874
|
/* @__PURE__ */ jsxRuntime.jsx(SectionHeader, { index: 5, title: "跨市场资产配置视角" }),
|
|
783
875
|
/* @__PURE__ */ jsxRuntime.jsxs("table", { className: "table-fixed text-left border-b w-full", children: [
|
|
@@ -787,9 +879,9 @@ function Chapter5$2({ data }) {
|
|
|
787
879
|
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "w-1/3 px-2 font-bold", children: "美股" })
|
|
788
880
|
] }) }),
|
|
789
881
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "h-[40px]", children: [
|
|
790
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children:
|
|
791
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children:
|
|
792
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children:
|
|
882
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children: d.a_share.performance }),
|
|
883
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children: d.hk_share.performance }),
|
|
884
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2", children: d.us_share.performance })
|
|
793
885
|
] }) })
|
|
794
886
|
] }),
|
|
795
887
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -797,15 +889,15 @@ function Chapter5$2({ data }) {
|
|
|
797
889
|
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "table", children: [
|
|
798
890
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
799
891
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "表现:" }),
|
|
800
|
-
|
|
892
|
+
d.a_share.performance
|
|
801
893
|
] }),
|
|
802
894
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
803
895
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "策略:" }),
|
|
804
|
-
|
|
896
|
+
d.a_share.impact
|
|
805
897
|
] }),
|
|
806
898
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
807
899
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "逻辑:" }),
|
|
808
|
-
|
|
900
|
+
d.a_share.reason
|
|
809
901
|
] })
|
|
810
902
|
] })
|
|
811
903
|
] }),
|
|
@@ -814,15 +906,15 @@ function Chapter5$2({ data }) {
|
|
|
814
906
|
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "table", children: [
|
|
815
907
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
816
908
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "表现:" }),
|
|
817
|
-
|
|
909
|
+
d.hk_share.performance
|
|
818
910
|
] }),
|
|
819
911
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
820
912
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "策略:" }),
|
|
821
|
-
|
|
913
|
+
d.hk_share.impact
|
|
822
914
|
] }),
|
|
823
915
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
824
916
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "逻辑:" }),
|
|
825
|
-
|
|
917
|
+
d.hk_share.reason
|
|
826
918
|
] })
|
|
827
919
|
] })
|
|
828
920
|
] }),
|
|
@@ -831,15 +923,15 @@ function Chapter5$2({ data }) {
|
|
|
831
923
|
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "table", children: [
|
|
832
924
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
833
925
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "表现:" }),
|
|
834
|
-
|
|
926
|
+
d.us_share.performance
|
|
835
927
|
] }),
|
|
836
928
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
837
929
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "策略:" }),
|
|
838
|
-
|
|
930
|
+
d.us_share.impact
|
|
839
931
|
] }),
|
|
840
932
|
/* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
841
933
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "逻辑:" }),
|
|
842
|
-
|
|
934
|
+
d.us_share.reason
|
|
843
935
|
] })
|
|
844
936
|
] })
|
|
845
937
|
] })
|
|
@@ -1354,6 +1446,41 @@ const newsSchema = {
|
|
|
1354
1446
|
})
|
|
1355
1447
|
})
|
|
1356
1448
|
}),
|
|
1449
|
+
industry: zod.z.object({
|
|
1450
|
+
subsector_impact: zod.z.object({
|
|
1451
|
+
bullish_subsectors: zod.z.array(
|
|
1452
|
+
zod.z.object({
|
|
1453
|
+
subsector: zod.z.string(),
|
|
1454
|
+
score: zod.z.number(),
|
|
1455
|
+
reason: zod.z.string()
|
|
1456
|
+
})
|
|
1457
|
+
),
|
|
1458
|
+
bearish_subsectors: zod.z.array(
|
|
1459
|
+
zod.z.object({
|
|
1460
|
+
subsector: zod.z.string(),
|
|
1461
|
+
score: zod.z.number(),
|
|
1462
|
+
reason: zod.z.string()
|
|
1463
|
+
})
|
|
1464
|
+
)
|
|
1465
|
+
}),
|
|
1466
|
+
industry_asset_linkage: zod.z.object({
|
|
1467
|
+
a_share: zod.z.object({
|
|
1468
|
+
impact: zod.z.string(),
|
|
1469
|
+
industry_performance: zod.z.string(),
|
|
1470
|
+
reason: zod.z.string()
|
|
1471
|
+
}),
|
|
1472
|
+
hk_share: zod.z.object({
|
|
1473
|
+
impact: zod.z.string(),
|
|
1474
|
+
industry_performance: zod.z.string(),
|
|
1475
|
+
reason: zod.z.string()
|
|
1476
|
+
}),
|
|
1477
|
+
us_share: zod.z.object({
|
|
1478
|
+
impact: zod.z.string(),
|
|
1479
|
+
industry_performance: zod.z.string(),
|
|
1480
|
+
reason: zod.z.string()
|
|
1481
|
+
})
|
|
1482
|
+
})
|
|
1483
|
+
}),
|
|
1357
1484
|
professional_insights: zod.z.array(
|
|
1358
1485
|
zod.z.object({
|
|
1359
1486
|
message: zod.z.string(),
|
|
@@ -1764,37 +1891,6 @@ const generate_financial_news_pdf = {
|
|
|
1764
1891
|
toolHandler: toolHandler$2,
|
|
1765
1892
|
initHandler: initHandler$2
|
|
1766
1893
|
};
|
|
1767
|
-
const colors = [
|
|
1768
|
-
// "#FFD147", // 1. MA5 - 亮黄色
|
|
1769
|
-
// "#FF5858", // 2. MA10 - 鲜红色
|
|
1770
|
-
// "#3F88C5", // 3. MA20 - 靛蓝色
|
|
1771
|
-
// "#7B69C1", // 4. MA30 - 紫罗兰
|
|
1772
|
-
// "#00B09A", // 5. MA40 - 青绿色
|
|
1773
|
-
// "#FA9F42", // 6. MA60 - 橙色
|
|
1774
|
-
// // 7. MA90 - 深洋红
|
|
1775
|
-
// "#6A994E", // 8. MA120 - 橄榄绿
|
|
1776
|
-
// "#8AA2AE", // 9. MA200 - 灰蓝色
|
|
1777
|
-
// "#A07F7A", // 10. MA250 - 棕色
|
|
1778
|
-
"#244485ff",
|
|
1779
|
-
// 4. Blue 700 (比600更深的亮蓝色)
|
|
1780
|
-
"#FA9F42",
|
|
1781
|
-
"#D13F79",
|
|
1782
|
-
"#FFD147",
|
|
1783
|
-
"#7C3F0A",
|
|
1784
|
-
// 6. Amber 700 (比600更深的深琥珀色/棕橙色)
|
|
1785
|
-
"#C05621",
|
|
1786
|
-
// 3. Yellow 700 (比600更深的暗黄色/金橙色)
|
|
1787
|
-
"#6B21A8",
|
|
1788
|
-
// 5. Violet 700 (比600更深的紫罗兰色)
|
|
1789
|
-
"#404040",
|
|
1790
|
-
// 7. Neutral 700 (比600更深的通用灰色)
|
|
1791
|
-
// 紫色系/粉色系 (Purples/Pinks)
|
|
1792
|
-
"#047857",
|
|
1793
|
-
// 1. Green 700 (深绿色,比600更深)
|
|
1794
|
-
"#C81E1E"
|
|
1795
|
-
// 2. Red 700 (比600更深的鲜红色)
|
|
1796
|
-
];
|
|
1797
|
-
const splitLineColor = "#F5F5F5";
|
|
1798
1894
|
const generateData$d = (rawData) => {
|
|
1799
1895
|
const categoryData = [];
|
|
1800
1896
|
const portfolio = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@8btc/finance-assistant-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
4
4
|
"description": "财经agent辅助mcp工具",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"test:html": "npm run build && node ./test/test-gen-html.cjs && open ./report.html",
|
|
17
17
|
"test:tech-indicator": "npm run build && node test/test-gen-pdf.cjs",
|
|
18
18
|
"test:portfolio": "npm run build && node test/test-portfolio.cjs",
|
|
19
|
-
"test:news": "npm run build && node test/test-financial-news.cjs"
|
|
19
|
+
"test:news": "npm run build && node test/test-financial-news.cjs",
|
|
20
|
+
"test:news:industry": "npm run build && node test/test-financial-news-industry.cjs"
|
|
20
21
|
},
|
|
21
22
|
"keywords": [
|
|
22
23
|
"mcp",
|