@v587d/capital-generation 2.7.0 → 2.7.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +77 -1
  2. package/LICENSE +1 -1
  3. package/README.md +10 -9
  4. package/THIRD_PARTY_NOTICES.md +14 -4
  5. package/capital-config/client.js +50 -10
  6. package/capital-config/client.src.cjs +376 -62
  7. package/capital-config/index.js +168 -5
  8. package/capital-config/package.json +1 -1
  9. package/capital-watchlist/package.json +1 -1
  10. package/chart-ui/package.json +1 -1
  11. package/lib/agents/selected-skills-provider.js +5 -5
  12. package/lib/index.d.ts +4 -28
  13. package/lib/index.js +8 -18
  14. package/lib/web-retriever/local-fetch.d.ts +1 -1
  15. package/lib/web-retriever/local-fetch.js +1 -1
  16. package/lib/web-retriever/wind-client.d.ts +1 -1
  17. package/lib/web-retriever/wind-client.js +1 -1
  18. package/package.json +3 -1
  19. package/selected-skills/InvestSkill/ADDING-NEW-SKILLS.md +546 -0
  20. package/selected-skills/InvestSkill/CHANGELOG.md +373 -0
  21. package/selected-skills/InvestSkill/CI-CD-GUIDE.md +432 -0
  22. package/selected-skills/InvestSkill/CLAUDE.md +148 -0
  23. package/selected-skills/InvestSkill/CONTRIBUTING.md +291 -0
  24. package/selected-skills/InvestSkill/DEPLOYMENTS.md +321 -0
  25. package/selected-skills/InvestSkill/FAQ.md +509 -0
  26. package/selected-skills/InvestSkill/GEMINI.md +419 -0
  27. package/selected-skills/InvestSkill/LICENSE +21 -0
  28. package/selected-skills/InvestSkill/PLATFORM-COMPATIBILITY.md +529 -0
  29. package/selected-skills/InvestSkill/README-claude-code.md +435 -0
  30. package/selected-skills/InvestSkill/README-cursor.md +475 -0
  31. package/selected-skills/InvestSkill/README-gemini.md +532 -0
  32. package/selected-skills/InvestSkill/README-ollama.md +106 -0
  33. package/selected-skills/InvestSkill/README-zh-TW.md +461 -0
  34. package/selected-skills/InvestSkill/README.md +311 -0
  35. package/selected-skills/InvestSkill/RELEASE-QUICK-REFERENCE.md +230 -0
  36. package/selected-skills/InvestSkill/RELEASE_NOTES.md +121 -0
  37. package/selected-skills/InvestSkill/SECURITY.md +232 -0
  38. package/selected-skills/InvestSkill/TODO.md +28 -0
  39. package/selected-skills/InvestSkill/UPSTREAM.md +62 -0
  40. package/selected-skills/InvestSkill/install.sh +212 -0
  41. package/selected-skills/InvestSkill/package.json +64 -0
  42. package/selected-skills/InvestSkill/plugins/us-stock-analysis/README.md +119 -0
  43. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/10k-digest/SKILL.md +338 -0
  44. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/bear-case/SKILL.md +233 -0
  45. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/catalyst-calendar/SKILL.md +327 -0
  46. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/chart-master/SKILL.md +648 -0
  47. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/competitor-analysis/SKILL.md +478 -0
  48. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/dcf-valuation/SKILL.md +109 -0
  49. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/dividend-analysis/SKILL.md +684 -0
  50. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/earnings-call-analysis/SKILL.md +456 -0
  51. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/earnings-preview/SKILL.md +277 -0
  52. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/economics-analysis/SKILL.md +349 -0
  53. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/etf-analysis/SKILL.md +279 -0
  54. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/fact-check/SKILL.md +288 -0
  55. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/financial-report-analyst/SKILL.md +544 -0
  56. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/full-report/SKILL.md +301 -0
  57. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/fundamental-analysis/SKILL.md +67 -0
  58. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/industry-map/SKILL.md +336 -0
  59. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/insider-trading/SKILL.md +502 -0
  60. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/institutional-ownership/SKILL.md +548 -0
  61. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/learning-coach/SKILL.md +311 -0
  62. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/options-analysis/SKILL.md +495 -0
  63. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/portfolio-review/SKILL.md +465 -0
  64. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/position-ladder/SKILL.md +429 -0
  65. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/report-generator/SKILL.md +857 -0
  66. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/research-bundle/SKILL.md +94 -0
  67. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/result-validator/SKILL.md +174 -0
  68. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/risk-stress-test/SKILL.md +293 -0
  69. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/sector-analysis/SKILL.md +426 -0
  70. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/short-interest/SKILL.md +397 -0
  71. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/stock-eval/SKILL.md +645 -0
  72. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/stock-screener/SKILL.md +244 -0
  73. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/stock-valuation/SKILL.md +640 -0
  74. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/tax-lens/SKILL.md +351 -0
  75. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/technical-analysis/SKILL.md +654 -0
  76. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/thesis-tracker/SKILL.md +317 -0
  77. package/selected-skills/README.md +15 -5
  78. package/selected-skills/catalog.js +589 -14
  79. package/selected-skills/investment-skills/UPSTREAM.md +1 -1
  80. package/selected-skills/investment-skills/skills/buffett-investment-framework/SKILL.md +1 -1
  81. package/selected-skills/peter-lynch-skill/LICENSE +21 -0
  82. package/selected-skills/peter-lynch-skill/README.md +305 -0
  83. package/selected-skills/peter-lynch-skill/UPSTREAM.md +71 -0
  84. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/SKILL.md +142 -0
  85. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/deep/methodology.md +587 -0
  86. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/deep/system-prompt.md +102 -0
  87. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/deep/web-research.md +471 -0
  88. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/disclaimer.md +2 -0
  89. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/filing-rules.md +64 -0
  90. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/quick/methodology.md +195 -0
  91. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/quick/system-prompt.md +72 -0
  92. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/quick/web-research.md +379 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,83 @@
7
7
  - **第三位(patch)**:不破坏既有工具 / 配置 / 会话的新增与修复(如 2.1.1、2.1.2)。
8
8
  - **第二位(minor)**:有需要用户知晓的行为变更,且段内附迁移说明(如 2.1.0 的图表呈现通道重做、2.2.0 的数据源与检索来源扩容、2.4.0 的**必须换宿主版本**——本插件自己的工具与数据契约没变,所以只抬第二位)。
9
9
 
10
+ ## [2.7.2] - 2026-10-11
11
+
12
+ 社区 Skill 目录多了第四份快照(**36 条**可选)。既有契约完全没动:工具入参与返回、能力清单、四把密钥
13
+ 与凭据引用名、配置字段、会话日志格式、你已有的自选股数据与**已经开启的那几项 Skill**,全部照旧;
14
+ 宿主要求与 2.7.1 相同(DSH`@0.2.0-rc.2`),不必换版本。
15
+
16
+ ### Added
17
+
18
+ - **社区 Skill 目录新增第四份快照**:`DjNero11/peter-lynch-skill`(MIT,commit `e0eaf58`)——一条完整的
19
+ 个股研究流程。先做一次约 450 字的快筛,回答"这只股票值不值得花 2–5 小时深挖",给出
20
+ SKIP / WATCHLIST / DEEP RESEARCH;也可以直接走最长 3000 字的尽调报告。两条路径都强制**固定证据预算**
21
+ (快筛默认 1–3 份来源、2–3 次取数)与**每条主张配一个可点开的来源链接**:取不到的字段就明说缺哪一项、
22
+ 该分析停在那一项上,不拿印象里的数字补。整份目录从 35 条变成 **36 条**,默认仍然关闭,只对你之后
23
+ 新建的 Capital 会话可见;解包体积 3.7 MB→**3.8 MB**(下载 1.3 MB)。
24
+ - **「精选 Skills」的筛选条多一个标签:彼得·林奇**。前三份快照按"分析视角"这个大类标注,这一份直接以
25
+ 人物命名——使用者真的会按"这是哪一种流派"来筛。中英文各一套显示名,切到中文界面不会露出英文原词。
26
+
27
+ ### Changed
28
+
29
+ - **这份快照的正文按本插件的取数边界改写了一遍**(124 行,只动"谁去取数"这一件事):上游写给"什么工具
30
+ 都在手边"的宿主,原文要求助手自己去搜、自己翻页;在本插件里取数是交出去的——结构化数据交给负责取数
31
+ 的角色,网页与披露材料交给负责检索的角色,把代码、要的字段、截止日期写清楚就行。方法论、评分表、
32
+ 预算数字、来源账本字段与输出模板**一字未改**;改了哪几类句子、为什么改,逐条写在该快照的
33
+ `UPSTREAM.md` 里。报告口径另补一句:那份 X/10 打的是**论点自洽度与结构特征**,不预测涨跌,也不是
34
+ 买卖指令——本项目不提供投资建议。
35
+ - **社区 Skill 正文的合规检查把附属文件也扫进来了**:上一版只扫每颗 skill 的入口文件,而这一份改完入口
36
+ 才发现"你自己去搜"那句写在它的附属说明书里——运行时同样会被读到。现在一颗 skill 目录下的全部
37
+ markdown 都在扫描范围内,其余三份快照照着复查一遍零命中。这一条对你没有可感变化,只决定下一份社区
38
+ 快照能不能进来。
39
+ - **这份快照标为 `watchlist`(观察中)而不是 `experimental`**:上游只有两次提交、自 2026-06-28 起没有
40
+ 更新(内容读起来是"按意图做完"而非"烂尾",但维护信号薄)。开启前请自行复核它的来源与口径——它按美股
41
+ 与境外上市语境写,**不声称适用于 A 股**,筛选条上的「美股」标签就是这件事的提示。
42
+
43
+ ## [2.7.1] - 2026-10-10
44
+
45
+ 社区 Skill 目录多了第三份快照(**35 条**可选),并把「插件」页那张配置卡片重排了一遍。既有契约
46
+ 完全没动:工具入参与返回、能力清单、四把密钥与凭据引用名、配置字段、会话日志格式、你已有的自选股
47
+ 数据与**已经开启的那几项 Skill**,全部照旧;宿主要求与 2.7.0 相同(DSH`@0.2.0-rc.2`),不必换版本。
48
+
49
+ ### Added
50
+
51
+ - **社区 Skill 目录新增第三份快照**:`yennanliu/InvestSkill`(MIT,commit `c3f2a17`)的 28 个美股
52
+ 模块——逐条主张核验、空头反方、披露文件与内部人追踪、压力测试、现金流与组合视角等,整份目录从 7 条
53
+ 变成 **35 条**,默认仍然全部关闭。上游自带的流程编排照旧排除(与本插件的角色路由冲突),上游脚本
54
+ 一条都不会被执行。整包解包体积因此从 2.2 MB→2.6 MB 那一档再抬到 **3.7 MB**(下载 1.2 MB);每颗
55
+ skill 的正文、references 与脚本、`LICENSE` 与 `UPSTREAM.md` 都在包里。
56
+ - **「精选 Skills」每一项多一颗「详情」**:点一下就摊开那份 `SKILL.md` **原文**(不渲染,就是源码,
57
+ 可以选中复制),开之前先看看它到底让助手做什么;窗口按 `Esc`、点外面或右上角的关闭都能收起来,
58
+ 英文代号也写在这扇窗口的标题下面。原文是**要看了才去取**的(鼠标停在「详情」上就先预热):整份
59
+ 目录加起来约 750 KB,
60
+ 不该为"可能一次都不点"的动作在打开页面时就付掉;取不到会明说取不到(并说清是"这份快照读不到"还是
61
+ "宿主进程还没有这条读原文的通道——这时要重启 DSH,刷新页面没有用"),绝不会把"没读到"写成一份空的原文。
62
+
63
+ ### Changed
64
+
65
+ - **插件详情页的配置从"一长条"改成三格**:「数据源」「精选 Skills」「包含的组件」各占一格,进页面
66
+ 默认停在「数据源」。原来「数据源」标题底下压着一层「精选 Skills」小标题,读起来像是数据源的一个
67
+ 子项——这两块其实是平级的,现在平级了;往下滚四屏才能看完的日子也到此为止。
68
+ - **两格带数字**:「精选 Skills」标**已开启 / 收录总数**(例如 `2/35`,只标总数会让人以为整份目录
69
+ 都开着),「包含的组件」标组件行数。取不到那个行数时**只写名字、不写数字**——把"还不知道"写成 `0`
70
+ 就是骗你。
71
+ - **「包含的组件」这一格的内容仍是 DSH 自己画的那份组件清单**(行开关、运行状态、"共 N 个 · 运行 N"
72
+ 都住在它那里),我们只是把它接到这一格上:切到这一格它才显形,切走就收起。清单没有被我们重画一份,
73
+ 所以宿主哪天改它,不会出现两处说法不一样。
74
+ - **在「数据源」填了密钥还没按保存就切去别格,那一格会写明「数据源 未保存」**:填的东西不会因为你
75
+ 切格子就消失,但也不会替你保存。
76
+ - **三格的首行文字与顶部切换条之间留同样的距离**:以前每切一格版面就跳一下,看着像内容被换掉了。
77
+ 「包含的组件」那一格也不再额外写一行"清单在下方"的说明——点这一格看到的就是那份清单。
78
+ - **「精选 Skills」从上下排改成左右排**:能力筛选器挪到左边、按项数从多到少排(「全部」仍在最前),
79
+ 每一项后面跟着它下面有几项(例如「美股 26」),往下翻清单时这一列一直钉在左边——以前它在最上方,
80
+ 滚到第二十行就想筛选得先滚回去。「按能力筛选」那四个字不再占一行,屏幕读屏时仍然报得出这一组是什么。
81
+ **已开启的那几项排在清单最前面**(同一档里仍按目录顺序)——不过这是**下次进入这一格时**的事:刚拨完
82
+ 开关那一行不会当场被抽走,切到别处再切回来它才升到上面(格子标题上的「已开启 / 收录总数」仍然实时)。
83
+ - **行面上的动作变干净了**:不再印 `buffett-investment-framework` 这种英文代号,**开启后的**技能那一行
84
+ 多出一颗「复制技能名」按钮(有边框、按得动,复制成功亮一下「已复制」再自己退回去——以前那行灰色小字
85
+ 既不明显也没有复位,像一个一直亮着的状态)。
86
+
10
87
  ## [2.7.0] - 2026-10-10
11
88
 
12
89
  自选股从**"你每次贴给助手看"**变成**"助手自己读得到"**,并加上三套自带的研究流程与一份默认关闭的
@@ -55,7 +132,6 @@ DSH`@0.2.0-rc.2` 带的 `dsh-skill` 与 `dsh-skill-filesystem`(两颗精确版
55
132
  和 `UPSTREAM.md`;上游 README 用的成图和它自己的 viz 站点不进包(同一批图在仓库里还存了两份)。整包
56
133
  解包体积因此只从 2.2 MB 抬到 2.6 MB,下载 869 kB。全量快照仍然完整住在仓库里,从 `github:` 安装、
57
134
  或回看"它当时是哪个 commit、原文怎么写"都不受影响。
58
-
59
135
  ## [2.6.5] - 2026-10-08
60
136
 
61
137
  上游数据源的一轮**外部巡检**:仓库里新加了一条每天早上的契约巡检,不合格自动开 GitHub Issue。
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 v587d
3
+ Copyright (c) 2026 v587d
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  <p align="center">
16
16
  <a href="https://awesome-dsh-plugin.com"><img src="https://awesome-dsh-plugin.com/badge.svg" alt="awesome · DSH plugin"></a>
17
17
  <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-green" alt="License"></a>
18
- <a href="https://github.com/v587d/capital-generation/releases"><img src="https://img.shields.io/badge/version-2.7.0-9cf" alt="Version"></a>
18
+ <a href="https://github.com/v587d/capital-generation/releases"><img src="https://img.shields.io/badge/version-2.7.2-9cf" alt="Version"></a>
19
19
  </p>
20
20
 
21
21
  # Capital Generation
@@ -26,8 +26,6 @@ Capital Generation 是运行在 [DeepSeek Harness(DSH)](https://github.com/d
26
26
 
27
27
  **🎞️视频演示:**[安装、配置与使用](https://www.bilibili.com/video/BV1fzaZ6CE9J/)。
28
28
 
29
- [样例:假期后研判报告(20261007)](docs/sample/假期后研判报告.md)。
30
-
31
29
  > [!IMPORTANT]
32
30
  > 本项目仍在探索中,不提供金融服务或投资建议,不保证数据完整、及时或准确,也不承诺投资回报。请自行核对来源并承担投资风险。
33
31
 
@@ -65,7 +63,7 @@ https://github.com/v587d/capital-generation
65
63
  > [!NOTE]
66
64
  > 本插件所有自带密钥均可免费申请、免费日常使用。 哪怕所有密钥留空也不影响插件核心功能,即缺哪个密钥,仅表示对应能力就不可用,其他功能照常。
67
65
 
68
- 2. **选填密钥。** 打开 DSH 「插件」 → **Capital Generation** -> 「配置」。
66
+ 2. **选填密钥。** 打开 DSH 「插件」 → **Capital Generation** →「数据源」(进页面就停在这一格)。
69
67
 
70
68
  | 密钥 | 用途 |
71
69
  | --- | --- |
@@ -97,6 +95,8 @@ https://github.com/v587d/capital-generation
97
95
 
98
96
  在新的 Capital 模式会话中使用以下指令。将方括号内容换成自己的标的、公告或持仓;证券代码写完整市场后缀,例如 `600519.SH`。每条指令单独发送,便于观察结果。
99
97
 
98
+ [样例:假期后研判报告(20261007)](docs/sample/假期后研判报告.md)
99
+
100
100
  **完整投资研究报告**
101
101
 
102
102
  ```text
@@ -143,7 +143,8 @@ https://github.com/v587d/capital-generation
143
143
  | :---: | :---: |
144
144
  | <a href="assets/watchlist-popup.png"><img src="assets/watchlist-popup.png" alt="管理自选股" width="400"></a> | <a href="assets/watchlist-more.png"><img src="assets/watchlist-more.png" alt="标记持仓" width="400"></a> |
145
145
 
146
- - **精选 Skills:** 当前收录两个开源项目:[The Investment Skills Lexicon](https://github.com/finterm-ai/investment-skills)(Buffett Investment Framework)和 [China Stock Research Skills](https://github.com/spikeHongg/china-stock-research-skills)(六个研究模块)。上游编排 skill 不会覆盖 Capital 的会话路由。可在「插件」→ **Capital Generation** →「配置」中按需开启;开启后新建 Capital 会话生效,默认关闭。
146
+ - **精选 Skills:** 当前收录四个开源项目:[The Investment Skills Lexicon](https://github.com/finterm-ai/investment-skills)(Buffett Investment Framework)、[China Stock Research Skills](https://github.com/spikeHongg/china-stock-research-skills)(六个 A 股研究模块)、[InvestSkill](https://github.com/yennanliu/InvestSkill)(28 个美股模块:逐条主张核验、空头反方、披露文件与内部人追踪、压力测试等)与 [Peter Lynch Research](https://github.com/DjNero11/peter-lynch-skill)(一条完整的个股研究流程:先快筛决定值不值得深挖,再按固定证据预算出尽调报告,每条主张都带可点开的来源链接)。
147
+
147
148
  <p align="center">
148
149
  <a href="assets/selected-skills配置.png">
149
150
  <img src="assets/selected-skills配置.png" alt="selected-skills配置" width="800">
@@ -153,7 +154,7 @@ https://github.com/v587d/capital-generation
153
154
  ## 常见问题
154
155
 
155
156
  - **安装后找不到 Capital 模式?** 确认插件出现在「插件」→ 已安装列表;Web / CLI profile 安装后要重启该 profile,并在新会话选择模式。
156
- - **配置在哪?** 打开「插件」→ 已安装的 **Capital Generation**,页面里的「配置」段就是;不在 DSH 的普通「设置」页面,也不用点进「包含的组件」。保存密钥后新建会话再试。
157
+ - **配置在哪?** 打开「插件」→ 已安装的 **Capital Generation**,页面顶部就是「数据源 / 精选 Skills / 包含的组件」三格,四把密钥都在第一格;不在 DSH 的普通「设置」页面,也不用点进任何一行组件。保存密钥后新建会话再试。
157
158
  - **桌面端升级后仍是旧版?** 桌面端安装时会固定所解析的版本,不会自动升级。卸载后重新安装,再到插件详情查看版本号;如需指定版本,可在地址末尾加 `#v2.6.1` 或 `@2.6.1`。
158
159
  - **刚发布的新版本装不到?** 桌面端取包时会跳过**刚发布不久**的版本(宿主侧包管理器的发布冷却策略,实测会静默装成上一个版本),国内镜像的同步也可能滞后一段时间。急着用最新代码,改用仓库地址安装最直接。
159
160
  - **网页抓取失败?** 配置卡片中的「允许启动本地提取网页内容」默认开启:AnySearch 提取失败时可尝试本机直连。关闭后,本机直连的具名来源查询也不可用;请检查该开关和网络连接。
@@ -162,7 +163,7 @@ https://github.com/v587d/capital-generation
162
163
  目前 Windows 桌面端有一项[已知宿主差异](CHANGELOG.md):主 Agent 的部分工具限制可能不生效。请特别留意它实际调用了哪些工具;结构化数据的取数限制仍由工具自身执行。
163
164
 
164
165
  ## 开发与贡献
165
-
166
+ [![OctoCounts](https://api.octocounts.com/badge/v587d/capital-generation/branch/master)](https://octocounts.com/github/v587d/capital-generation/tree/master)
166
167
  普通用户不需要执行下面的命令。修改源码时请参考 [贡献指南](CONTRIBUTING.md) 和 [开发约定](AGENTS.md):
167
168
 
168
169
  ```bash
@@ -177,8 +178,8 @@ npm run smoke:boot # 检查插件装配
177
178
 
178
179
  ## 致谢
179
180
 
180
- - 「精选 Skills」的研究流程**原样收录**自 [finterm-ai/investment-skills](https://github.com/finterm-ai/investment-skills) 与 [spikeHongg/china-stock-research-skills](https://github.com/spikeHongg/china-stock-research-skills)(均 MIT License):不改上游文本,按固定 commit 收录,全部默认关闭,其中观点与方法论属于原作者,不构成对本插件结论的背书。
181
+ - 「精选 Skills」的研究流程按固定 commit **快照收录**自 [finterm-ai/investment-skills](https://github.com/finterm-ai/investment-skills)、[spikeHongg/china-stock-research-skills](https://github.com/spikeHongg/china-stock-research-skills) 与 [yennanliu/InvestSkill](https://github.com/yennanliu/InvestSkill)(均 MIT License)。
181
182
  - 会话里的可交互图表由 [TradingView Lightweight Charts](https://github.com/tradingview/lightweight-charts)(Apache-2.0)渲染。
182
183
  - 行情、财务、公告与网页材料来自同花顺 Fuyao、Wind Alice、AnySearch、PaddleOCR 以及东方财富、腾讯等公开或申请制接口;数据版权归各服务方,额度与条款以服务方为准,本项目不重新分发原始数据。
183
184
 
184
- 随包分发的第三方组件、版本与许可逐条列在 [第三方组件与许可](THIRD_PARTY_NOTICES.md)。
185
+ 随包分发的第三方组件、版本与许可逐条列在 [第三方组件与许可](THIRD_PARTY_NOTICES.md)。
@@ -8,12 +8,22 @@
8
8
  | 组件 | 作者 | 许可证 | 原始仓库 | 许可文本 | 用在哪里 |
9
9
  |---|---|---|---|---|---|
10
10
  | Lightweight Charts™ 5.2.1(standalone 构建) | TradingView | Apache-2.0 | <https://github.com/tradingview/lightweight-charts> | `lib/chart/vendor/LICENSE` | 插件内所有可交互图表的渲染层;`VERSION.json` 记有该构建的 sha256,归属标识(attribution logo)保持开启 |
11
- | Investment Skills Lexicon(`7235d34`,未修改的固定快照) | finterm.ai | MIT | <https://github.com/finterm-ai/investment-skills> | `selected-skills/investment-skills/LICENSE` | 「精选 Skills」中的 `buffett-investment-framework` |
11
+ | Investment Skills Lexicon(`7235d34`,固定快照;仅改写路由段的一句前置条件与退路) | finterm.ai | MIT | <https://github.com/finterm-ai/investment-skills> | `selected-skills/investment-skills/LICENSE` | 「精选 Skills」中的 `buffett-investment-framework` |
12
12
  | China Stock Research Skills(`d49f1f3`,未修改的固定快照) | spikeHongg | MIT | <https://github.com/spikeHongg/china-stock-research-skills> | `selected-skills/china-stock-research-skills/LICENSE` | 「精选 Skills」中的 `financial-health`、`risk-warning-catalysts`、`valuation-investment-strategy`、`strategy-business-transition`、`industry-competition-moat`、`business-decomposition-order-quality` |
13
+ | InvestSkill(`c3f2a17`,固定快照;补 `name` 字段 + 28 颗的取数口径改写,分析正文未改) | yennanliu | MIT | <https://github.com/yennanliu/InvestSkill> | `selected-skills/InvestSkill/LICENSE` | 「精选 Skills」中的 28 个美股模块(`fact-check`、`bear-case`、`10k-digest`、`stock-valuation`、`risk-stress-test`、`tax-lens` 等) |
14
+ | Peter Lynch Research(`e0eaf58`,固定快照;套一层 skills 目录 + 取数口径改写,方法论、预算与输出模板未改) | Szymon Nycz(仓库账号 `DjNero11`) | MIT | <https://github.com/DjNero11/peter-lynch-skill> | `selected-skills/peter-lynch-skill/LICENSE` | 「精选 Skills」中的 `peter-lynch-skill`(个股快筛与尽调工作流,美股与境外上市口径) |
13
15
 
14
- 两份 Skill 快照的收录方式、上游 commit、维护状态与排除项逐条记在各自的 `UPSTREAM.md` 里;它们**默认全部关闭**,
16
+ 四份 Skill 快照的收录方式、上游 commit、维护状态与排除项逐条记在各自的 `UPSTREAM.md` 里;它们**默认全部关闭**,
15
17
  只在使用者于配置页显式开启后才对新建的 Capital 会话可见,上游自带的脚本一律不作为可执行面引入。
16
- 上游自带的编排 skill(`china-stock-research-orchestrator`)不进入可选清单,因为它与本插件既有的角色路由冲突。
18
+ 上游自带的编排、报告与出图 skill 不进入可选清单(六颗仍留在快照里作为可审查材料):前者与本插件既有的角色
19
+ 路由冲突,后两者与已删除的报告交付链路、以及"出图只走 `render_chart`"的约定冲突。
20
+
21
+ **三处对上游正文的改写都是合规改写,不是编辑**:上游 skill 写给"什么工具都在手边"的宿主,成规模地要求
22
+ 分析角色自己去 `web search` 取实时行情;前两份还留着"取不到就凭印象估一个"的逃生口,最新这份没有这个
23
+ 逃生口,但取数归属同样要改。本插件的取数只有一个入口(交给负责取数的
24
+ 角色),而"用记忆里的数字继续分析"没有任何工具会拦,所以只能改在正文里。
25
+ 改了什么、影响几篇,逐条记在对应快照的 `UPSTREAM.md`;改写结果由仓库自带的回归测试逐条复查。
26
+ 方法论、评分表、输出模板与分析结论一字未改。
17
27
 
18
28
  ## npm 运行时依赖
19
29
 
@@ -39,5 +49,5 @@ PaddleOCR 文档解析,以及东方财富、腾讯的公开行情接口与若
39
49
  ## 本插件自身
40
50
 
41
51
  Capital Generation 的原创代码与文档以 MIT 许可发布,见仓库根的 `LICENSE`。
42
- 本文件不构成对任何第三方项目、数据源或其观点的背书;两份 Skill 快照里的方法论与结论属于原作者,
52
+ 本文件不构成对任何第三方项目、数据源或其观点的背书;四份 Skill 快照里的方法论与结论属于原作者,
43
53
  使用前请自行复核来源,尤其不要把按美股语境写的框架直接当作 A 股规则。
@@ -5,31 +5,71 @@ window.__ModuleLoader__.load({
5
5
  var module = { exports: {} }
6
6
  var exports = module.exports
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' })
8
- "use strict";var k=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var B=(i,e,a)=>()=>{if(a)throw a[0];try{return i&&(e=i(i=0)),e}catch(s){throw a=[s],s}};var W=(i,e)=>{for(var a in e)k(i,a,{get:e[a],enumerable:!0})},K=(i,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of P(e))!j.call(i,n)&&n!==a&&k(i,n,{get:()=>e[n],enumerable:!(s=I(e,n))||s.enumerable});return i};var U=i=>K(k({},"__esModule",{value:!0}),i);var E={};W(E,{SELECTED_SKILL_CATALOG:()=>M,SELECTED_SKILL_TAGS:()=>q,SELECTED_SKILL_TAG_LABELS:()=>$});var q,M,$,N=B(()=>{"use strict";q=Object.freeze(["a-share","business-analysis","cash-flow","competition","financial-health","monitoring","orders","perspective","risk","strategy","valuation"]),M=Object.freeze([{key:"buffettFramework",name:"buffett-investment-framework",label:{zh:"Buffett Investment Framework",en:"Buffett Investment Framework"},description:{zh:"\u4EE5\u8BC1\u636E\u4E3A\u57FA\u7840\u7684\u5546\u4E1A\u8D28\u91CF\u3001\u8D44\u672C\u914D\u7F6E\u3001\u4F30\u503C\u548C\u98CE\u9669\u5206\u6790\u6846\u67B6\u3002\u4E3B\u8981\u6E90\u4E8E\u7F8E\u80A1\u8BED\u5883\u3002",en:"Evidence-led business quality, capital allocation, valuation, and risk analysis. Primarily US-market oriented."},owner:"finterm-ai",repository:"investment-skills",status:"experimental",lastCommit:"2026-07-22",reviewBy:"2026-11-06",tags:["business-analysis","cash-flow","perspective","risk","valuation"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u4E0D\u80FD\u76F4\u63A5\u5F53\u4F5C A \u80A1\u89C4\u5219\u6216\u6295\u8D44\u5EFA\u8BAE\u3002",en:"Experimental; do not treat it as A-share rules or investment advice."}},{key:"financialHealth",name:"financial-health",label:{zh:"\u8D22\u52A1\u5065\u5EB7",en:"Financial Health"},description:{zh:"\u68C0\u67E5\u76C8\u5229\u8D28\u91CF\u3001\u73B0\u91D1\u8F6C\u6362\u3001\u8425\u8FD0\u8D44\u672C\u3001\u6760\u6746\u548C\u8D44\u4EA7\u8D1F\u503A\u8868\u98CE\u9669\u3002",en:"Checks earnings quality, cash conversion, working capital, leverage, and balance-sheet risk."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","cash-flow","financial-health","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0A\u6E38\u7EF4\u62A4\u8F83\u4E45\u672A\u66F4\u65B0\uFF0C\u542F\u7528\u524D\u8BF7\u81EA\u884C\u590D\u6838\u5185\u5BB9\u548C\u6765\u6E90\u3002",en:"Cold-start experiment; upstream has been quiet, so review content and sources before use."}},{key:"riskWarningCatalysts",name:"risk-warning-catalysts",label:{zh:"\u98CE\u9669\u4E0E\u50AC\u5316\u5242\u76D1\u63A7",en:"Risk Warning Catalysts"},description:{zh:"\u628A\u7814\u7A76\u7ED3\u8BBA\u8F6C\u6210\u5E26\u6765\u6E90\u3001\u9608\u503C\u548C\u590D\u67E5\u9891\u7387\u7684\u98CE\u9669\u4E0E\u50AC\u5316\u5242\u76D1\u63A7\u9879\u3002",en:"Turns research into source-backed risk and catalyst monitoring with thresholds and review cadence."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","monitoring","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0D\u8D1F\u8D23\u4F30\u503C\u6216\u4EA4\u6613\u51B3\u7B56\u3002",en:"Cold-start experiment; it does not make valuation or trading decisions."}},{key:"valuationInvestmentStrategy",name:"valuation-investment-strategy",label:{zh:"\u4F30\u503C\u4E0E\u60C5\u666F\u5206\u6790",en:"Valuation Investment Strategy"},description:{zh:"\u5728\u4E8B\u5B9E\u57FA\u7840\u5B8C\u6210\u540E\u6784\u5EFA\u5E26\u5047\u8BBE\u3001\u60C5\u666F\u548C\u5931\u6548\u6761\u4EF6\u7684\u4F30\u503C\u6846\u67B6\u3002",en:"Builds valuation scenarios with assumptions and invalidation conditions after the factual base is ready."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","risk","valuation"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u8F93\u51FA\u4E0D\u7B49\u4E8E\u4E70\u5356\u6216\u4ED3\u4F4D\u5EFA\u8BAE\u3002",en:"Cold-start experiment; output is not a buy, sell, or position-size recommendation."}},{key:"strategyBusinessTransition",name:"strategy-business-transition",label:{zh:"\u6218\u7565\u4E0E\u4E1A\u52A1\u8F6C\u578B",en:"Strategy Business Transition"},description:{zh:"\u68C0\u9A8C\u516C\u53F8\u6218\u7565\u53D9\u4E8B\u3001\u4E1A\u52A1\u8FC1\u79FB\u3001\u8D44\u672C\u914D\u7F6E\u548C\u8F6C\u578B\u91CC\u7A0B\u7891\u3002",en:"Tests strategy narratives, business migration, capital allocation, and transition milestones."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","strategy","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0D\u8D1F\u8D23\u4F30\u503C\u6216\u4EA4\u6613\u8BA1\u5212\u3002",en:"Cold-start experiment; it does not make valuation or trading plans."}},{key:"industryCompetitionMoat",name:"industry-competition-moat",label:{zh:"\u884C\u4E1A\u7ADE\u4E89\u4E0E\u62A4\u57CE\u6CB3",en:"Industry Competition Moat"},description:{zh:"\u5206\u6790\u884C\u4E1A\u7ED3\u6784\u3001\u7ADE\u4E89\u683C\u5C40\u3001\u4F9B\u9700\u548C\u516C\u53F8\u5DEE\u5F02\u5316\u662F\u5426\u53EF\u6301\u7EED\u3002",en:"Analyzes industry structure, competition, supply-demand, and sustainable differentiation."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","business-analysis","competition","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u884C\u4E1A\u5224\u65AD\u4ECD\u9700\u56DE\u5230\u516C\u5F00\u8BC1\u636E\u3002",en:"Cold-start experiment; industry conclusions still require public evidence."}},{key:"businessDecompositionOrderQuality",name:"business-decomposition-order-quality",label:{zh:"\u4E1A\u52A1\u62C6\u89E3\u4E0E\u8BA2\u5355\u8D28\u91CF",en:"Business Decomposition Order Quality"},description:{zh:"\u62C6\u89E3\u4EA7\u54C1\u3001\u5BA2\u6237\u3001\u9879\u76EE\u548C\u8BA2\u5355\uFF0C\u68C0\u67E5\u589E\u957F\u80FD\u5426\u8F6C\u5316\u4E3A\u6536\u5165\u548C\u73B0\u91D1\u3002",en:"Breaks down products, customers, projects, and orders to test conversion into revenue and cash."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","business-analysis","cash-flow","orders","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0D\u8D1F\u8D23\u6700\u7EC8\u4F30\u503C\u6216\u4E70\u5356\u5EFA\u8BAE\u3002",en:"Cold-start experiment; it does not make final valuation or trading recommendations."}}]),$=Object.freeze({zh:{all:"\u5168\u90E8","a-share":"A \u80A1","business-analysis":"\u4E1A\u52A1\u5206\u6790","cash-flow":"\u73B0\u91D1\u6D41",competition:"\u7ADE\u4E89\u683C\u5C40","financial-health":"\u8D22\u52A1\u5065\u5EB7",monitoring:"\u76D1\u63A7",orders:"\u8BA2\u5355",perspective:"\u5206\u6790\u89C6\u89D2",risk:"\u98CE\u9669",strategy:"\u6218\u7565",valuation:"\u4F30\u503C"},en:{all:"All","a-share":"A-share","business-analysis":"Business analysis","cash-flow":"Cash flow",competition:"Competition","financial-health":"Financial health",monitoring:"Monitoring",orders:"Orders",perspective:"Perspective",risk:"Risk",strategy:"Strategy",valuation:"Valuation"}})});var{createElement:t,useEffect:G,useRef:Y,useState:F}=require("react"),{createPortal:V}=require("react-dom"),{SettingsForm:Q,SettingsSecretField:J,SettingsFormModel:X,Switch:T,IconRightUpOutlineRegular:D}=require("@deepseek-ai/dsh-client-ui-primitives"),{SELECTED_SKILL_CATALOG:x,SELECTED_SKILL_TAG_LABELS:R}=(N(),U(E)),v="capital-config",L="@v587d/capital-generation",S="settings.capital",A="plugins.detail.badge",Z="https://github.com/v587d/capital-generation",ee=`https://www.npmjs.com/package/${L}`,ie="FUYAO_API_KEY",ae="ANYSEARCH_API_KEY",te="WIND_API_KEY",se="PADDLE_OCR_TOKEN",y={fuyao:"https://fuyao.aicubes.cn/docs/",anysearch:"https://www.anysearch.com/docs/auth",wind:"https://market.windalice.com/",paddleocr:"https://aistudio.baidu.com/paddleocr"},p=["fuyao","anysearch","wind","paddleocr"],z=x.map(({key:i})=>i),g={fuyao:ie,anysearch:ae,wind:te,paddleocr:se},le=()=>Object.fromEntries(p.map(i=>[i,{ref:g[i],configured:!1,writable:!0}])),ne={title:"\u6570\u636E\u6E90",fuyaoLabel:"Fuyao API Key",fuyaoHint:"\u540C\u82B1\u987A Fuyao \u7ED3\u6784\u5316\u6570\u636E\u63A5\u53E3\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",anysearchLabel:"AnySearch API Key",anysearchHint:"AnySearch \u7F51\u9875\u641C\u7D22 / \u63D0\u53D6\u63A5\u53E3\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",localFetchLabel:"\u5141\u8BB8\u542F\u52A8\u672C\u5730\u63D0\u53D6\u7F51\u9875\u5185\u5BB9",localFetchHint:"\u5F00\u542F\u540E\u672C\u5730\u6293\u53D6\u515C\u5E95\uFF08\u56DE\u6267\u6765\u6E90 local-http\uFF09\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",windLabel:"Wind Alice API Key",windHint:"Wind \u91D1\u878D\u4FE1\u62AB\u7C7B\u6587\u6863\u68C0\u7D22\u63A5\u53E3\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",paddleocrLabel:"PaddleOCR \u6587\u6863\u89E3\u6790 Token",paddleocrHint:"\u914D\u7F6E Token \u540E\u81EA\u52A8\u89E3\u6790 PDF\u3001\u56FE\u7247\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",selectedSkillsTitle:"\u7CBE\u9009 Skills",selectedSkillsFilterLabel:"\u6309\u80FD\u529B\u7B5B\u9009",selectedSkillsEmpty:"\u6CA1\u6709\u5339\u914D\u8FD9\u4E2A\u6807\u7B7E\u7684 Skill\u3002",selectedSkillsCopyName:"\u590D\u5236\u6280\u80FD",selectedSkillsCopyAction:"\u590D\u5236\u6280\u80FD",selectedSkillsCopied:"\u5DF2\u590D\u5236",selectedSkillsOpenRepo:"\u6253\u5F00\u4E0A\u6E38\u4ED3\u5E93",openDocs:"\u5B98\u65B9\u6587\u6863",configured:"\u5DF2\u914D\u7F6E\u5BC6\u94A5\u3002",notConfigured:"\u672A\u914D\u7F6E\u5BC6\u94A5\u3002",save:"\u4FDD\u5B58",saving:"\u4FDD\u5B58\u4E2D\u2026",readOnly:"\u672C\u90E8\u7F72\u7684\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u3002",saveFailed:"\u672C\u90E8\u7F72\u6CA1\u6709\u63A5\u53D7\u8FD9\u4E9B\u503C\uFF0C\u5DF2\u4FDD\u7559\u4F9B\u4F60\u4FEE\u6539\u3002",unavailable:"\u8BE5\u63D2\u4EF6\u5F53\u524D\u672A\u52A0\u8F7D\uFF0C\u6682\u65F6\u65E0\u6CD5\u914D\u7F6E\u3002",githubLabel:"GitHub \u4ED3\u5E93",npmLabel:"npm \u5305\u9875\u9762"},oe={title:"Data Sources",fuyaoLabel:"Fuyao API Key",fuyaoHint:"Tonghuashun Fuyao structured-data API. Takes effect in new Capital mode sessions.",anysearchLabel:"AnySearch API Key",anysearchHint:"AnySearch web search / extract interface. Takes effect in new Capital mode sessions.",localFetchLabel:"Allow local web page extraction",localFetchHint:"When on, a failed fetch falls back to local direct fetching (receipt via: local-http). Takes effect in new Capital mode sessions.",windLabel:"Wind Alice API Key",windHint:"Wind financial disclosure document retrieval interface. Takes effect in new Capital mode sessions.",paddleocrLabel:"PaddleOCR document token",paddleocrHint:"Configure the token to parse PDFs and images automatically. Takes effect in new Capital mode sessions.",selectedSkillsTitle:"Selected Skills",selectedSkillsFilterLabel:"Filter by capability",selectedSkillsEmpty:"No skills match this tag.",selectedSkillsCopyName:"Copy skill",selectedSkillsCopyAction:"Copy skill",selectedSkillsCopied:"Copied",selectedSkillsOpenRepo:"Open upstream repository",openDocs:"Official docs",configured:"A key is configured.",notConfigured:"No key is configured.",save:"Save",saving:"Saving\u2026",readOnly:"This deployment stores settings read-only.",saveFailed:"The deployment did not accept these values; they were left for you to correct.",unavailable:"This plugin is not loaded, so it cannot be configured right now.",githubLabel:"GitHub repository",npmLabel:"npm package page"};function b(i,e){return typeof i=="string"&&i.length>0?i:e}function re(i,e){return e==="fuyao"?b(i.value?.fuyaoCredentialRef,g.fuyao):e==="wind"?b(i.value?.retriever?.windDocs?.credentialRef,g.wind):e==="paddleocr"?b(i.value?.retriever?.paddleOcr?.credentialRef,g.paddleocr):b(i.value?.retriever?.credentialRef,g.anysearch)}function ce(){if(typeof document>"u"||document.querySelector("style[data-capital-config]"))return()=>{};let i=document.createElement("style");return i.dataset.capitalConfig="true",i.textContent=`
8
+ "use strict";var D=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.prototype.hasOwnProperty;var ie=(t,e,i)=>()=>{if(i)throw i[0];try{return t&&(e=t(t=0)),e}catch(n){throw i=[n],n}};var ae=(t,e)=>{for(var i in e)D(t,i,{get:e[i],enumerable:!0})},se=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of ee(e))!te.call(t,l)&&l!==i&&D(t,l,{get:()=>e[l],enumerable:!(n=Z(e,l))||n.enumerable});return t};var ne=t=>se(D({},"__esModule",{value:!0}),t);var H={};ae(H,{SELECTED_SKILL_CATALOG:()=>oe,SELECTED_SKILL_SKILL_DIRS:()=>le,SELECTED_SKILL_TAG_LABELS:()=>re});var le,oe,re,U=ie(()=>{"use strict";le=Object.freeze({"investment-skills":"skills","china-stock-research-skills":"skills",InvestSkill:"plugins/us-stock-analysis/skills","peter-lynch-skill":"skills"}),oe=Object.freeze([{key:"buffettFramework",name:"buffett-investment-framework",label:{zh:"Buffett Investment Framework",en:"Buffett Investment Framework"},description:{zh:"\u4EE5\u8BC1\u636E\u4E3A\u57FA\u7840\u7684\u5546\u4E1A\u8D28\u91CF\u3001\u8D44\u672C\u914D\u7F6E\u3001\u4F30\u503C\u548C\u98CE\u9669\u5206\u6790\u6846\u67B6\u3002\u4E3B\u8981\u6E90\u4E8E\u7F8E\u80A1\u8BED\u5883\u3002",en:"Evidence-led business quality, capital allocation, valuation, and risk analysis. Primarily US-market oriented."},owner:"finterm-ai",repository:"investment-skills",status:"experimental",lastCommit:"2026-07-22",reviewBy:"2026-11-06",tags:["business-analysis","cash-flow","perspective","risk","valuation"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u4E0D\u80FD\u76F4\u63A5\u5F53\u4F5C A \u80A1\u89C4\u5219\u6216\u6295\u8D44\u5EFA\u8BAE\u3002",en:"Experimental; do not treat it as A-share rules or investment advice."}},{key:"financialHealth",name:"financial-health",label:{zh:"\u8D22\u52A1\u5065\u5EB7",en:"Financial Health"},description:{zh:"\u68C0\u67E5\u76C8\u5229\u8D28\u91CF\u3001\u73B0\u91D1\u8F6C\u6362\u3001\u8425\u8FD0\u8D44\u672C\u3001\u6760\u6746\u548C\u8D44\u4EA7\u8D1F\u503A\u8868\u98CE\u9669\u3002",en:"Checks earnings quality, cash conversion, working capital, leverage, and balance-sheet risk."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","cash-flow","financial-health","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0A\u6E38\u7EF4\u62A4\u8F83\u4E45\u672A\u66F4\u65B0\uFF0C\u542F\u7528\u524D\u8BF7\u81EA\u884C\u590D\u6838\u5185\u5BB9\u548C\u6765\u6E90\u3002",en:"Cold-start experiment; upstream has been quiet, so review content and sources before use."}},{key:"riskWarningCatalysts",name:"risk-warning-catalysts",label:{zh:"\u98CE\u9669\u4E0E\u50AC\u5316\u5242\u76D1\u63A7",en:"Risk Warning Catalysts"},description:{zh:"\u628A\u7814\u7A76\u7ED3\u8BBA\u8F6C\u6210\u5E26\u6765\u6E90\u3001\u9608\u503C\u548C\u590D\u67E5\u9891\u7387\u7684\u98CE\u9669\u4E0E\u50AC\u5316\u5242\u76D1\u63A7\u9879\u3002",en:"Turns research into source-backed risk and catalyst monitoring with thresholds and review cadence."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","monitoring","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0D\u8D1F\u8D23\u4F30\u503C\u6216\u4EA4\u6613\u51B3\u7B56\u3002",en:"Cold-start experiment; it does not make valuation or trading decisions."}},{key:"valuationInvestmentStrategy",name:"valuation-investment-strategy",label:{zh:"\u4F30\u503C\u4E0E\u60C5\u666F\u5206\u6790",en:"Valuation Investment Strategy"},description:{zh:"\u5728\u4E8B\u5B9E\u57FA\u7840\u5B8C\u6210\u540E\u6784\u5EFA\u5E26\u5047\u8BBE\u3001\u60C5\u666F\u548C\u5931\u6548\u6761\u4EF6\u7684\u4F30\u503C\u6846\u67B6\u3002",en:"Builds valuation scenarios with assumptions and invalidation conditions after the factual base is ready."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","risk","valuation"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u8F93\u51FA\u4E0D\u7B49\u4E8E\u4E70\u5356\u6216\u4ED3\u4F4D\u5EFA\u8BAE\u3002",en:"Cold-start experiment; output is not a buy, sell, or position-size recommendation."}},{key:"strategyBusinessTransition",name:"strategy-business-transition",label:{zh:"\u6218\u7565\u4E0E\u4E1A\u52A1\u8F6C\u578B",en:"Strategy Business Transition"},description:{zh:"\u68C0\u9A8C\u516C\u53F8\u6218\u7565\u53D9\u4E8B\u3001\u4E1A\u52A1\u8FC1\u79FB\u3001\u8D44\u672C\u914D\u7F6E\u548C\u8F6C\u578B\u91CC\u7A0B\u7891\u3002",en:"Tests strategy narratives, business migration, capital allocation, and transition milestones."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","strategy","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0D\u8D1F\u8D23\u4F30\u503C\u6216\u4EA4\u6613\u8BA1\u5212\u3002",en:"Cold-start experiment; it does not make valuation or trading plans."}},{key:"industryCompetitionMoat",name:"industry-competition-moat",label:{zh:"\u884C\u4E1A\u7ADE\u4E89\u4E0E\u62A4\u57CE\u6CB3",en:"Industry Competition Moat"},description:{zh:"\u5206\u6790\u884C\u4E1A\u7ED3\u6784\u3001\u7ADE\u4E89\u683C\u5C40\u3001\u4F9B\u9700\u548C\u516C\u53F8\u5DEE\u5F02\u5316\u662F\u5426\u53EF\u6301\u7EED\u3002",en:"Analyzes industry structure, competition, supply-demand, and sustainable differentiation."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","business-analysis","competition","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u884C\u4E1A\u5224\u65AD\u4ECD\u9700\u56DE\u5230\u516C\u5F00\u8BC1\u636E\u3002",en:"Cold-start experiment; industry conclusions still require public evidence."}},{key:"businessDecompositionOrderQuality",name:"business-decomposition-order-quality",label:{zh:"\u4E1A\u52A1\u62C6\u89E3\u4E0E\u8BA2\u5355\u8D28\u91CF",en:"Business Decomposition Order Quality"},description:{zh:"\u62C6\u89E3\u4EA7\u54C1\u3001\u5BA2\u6237\u3001\u9879\u76EE\u548C\u8BA2\u5355\uFF0C\u68C0\u67E5\u589E\u957F\u80FD\u5426\u8F6C\u5316\u4E3A\u6536\u5165\u548C\u73B0\u91D1\u3002",en:"Breaks down products, customers, projects, and orders to test conversion into revenue and cash."},owner:"spikeHongg",repository:"china-stock-research-skills",status:"watchlist",lastCommit:"2026-03-09",reviewBy:"2026-11-06",tags:["a-share","business-analysis","cash-flow","orders","risk"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0D\u8D1F\u8D23\u6700\u7EC8\u4F30\u503C\u6216\u4E70\u5356\u5EFA\u8BAE\u3002",en:"Cold-start experiment; it does not make final valuation or trading recommendations."}},{key:"tenKDigest",name:"10k-digest",label:{zh:"\u5E74\u62A5\uFF0810-K\uFF09\u9010\u8282\u7CBE\u8BFB",en:"10-K Report Digest"},description:{zh:"\u9010\u8282\u7CBE\u8BFB\u7F8E\u80A1\u5E74\u62A5 10-K\uFF0C\u4EA7\u51FA\u6458\u8981\u3001\u5206\u8282\u8981\u70B9\u3001\u5173\u952E\u6307\u6807\u4E0E\u53EF\u6838\u5BF9\u7684\u51FA\u5904\u5F15\u7528\u3002",en:"Reads a 10-K section by section into an abstract, section summaries, key metrics and sourced references."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","filings","business-analysis"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u7AE0\u8282\u53E3\u5F84\u6309\u7F8E\u80A1 10-K \u5199\uFF0CA \u80A1\u5E74\u62A5\u7684\u62AB\u9732\u7ED3\u6784\u4E0D\u540C\uFF0C\u4E0D\u80FD\u76F4\u63A5\u5E73\u79FB\u3002",en:"Experimental; the section map follows US 10-K disclosure and does not transfer to A-share annual reports."}},{key:"bearCase",name:"bear-case",label:{zh:"\u7A7A\u5934\u89C6\u89D2\u7EA2\u961F\u53CD\u9A73",en:"Bear Case Red Team"},description:{zh:"\u9488\u5BF9\u4E00\u4E2A\u770B\u591A\u8BBA\u70B9\u523B\u610F\u6784\u5EFA\u6700\u5F3A\u7684\u53CD\u9762\u8BBA\u8BC1\uFF0C\u9010\u6761\u627E\u51FA\u53CD\u8BC1\u4E0E\u8106\u5F31\u5047\u8BBE\u3002",en:"Builds the strongest deliberate short-side counter-argument to a bullish thesis, with counterevidence."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","risk","perspective"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u53EA\u505A\u53CD\u9762\u8BBA\u8BC1\uFF0C\u4E0D\u6784\u6210\u5356\u51FA\u6216\u505A\u7A7A\u5EFA\u8BAE\uFF0C\u4E5F\u4E0D\u9884\u6D4B\u8DCC\u5E45\u3002",en:"Experimental; a counter-argument only, not a sell or short recommendation and no downside forecast."}},{key:"catalystCalendar",name:"catalyst-calendar",label:{zh:"90 \u5929\u50AC\u5316\u5242\u65E5\u5386",en:"Catalyst Calendar"},description:{zh:"\u5217\u51FA\u672A\u6765 90 \u5929\u7684\u4E8B\u4EF6\u50AC\u5316\u5242\u4E0E\u9884\u671F\u5F71\u54CD\uFF0C\u7528\u6765\u5B89\u6392\u590D\u67E5\u8282\u594F\u3002",en:"Lists upcoming catalysts over a 90-day window with expected impact and a review cadence."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","earnings","monitoring"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u4E8B\u4EF6\u5F71\u54CD\u662F\u5B9A\u6027\u5224\u65AD\uFF0C\u4E0D\u9884\u6D4B\u5177\u4F53\u6DA8\u8DCC\u3002",en:"Experimental; catalyst impact is qualitative and does not forecast price moves."}},{key:"competitorAnalysis",name:"competitor-analysis",label:{zh:"\u76F4\u63A5\u5BF9\u624B\u4E0E\u62A4\u57CE\u6CB3",en:"Competitor Analysis"},description:{zh:"\u56F4\u7ED5\u4E00\u5BB6\u516C\u53F8\u4E0E\u5176\u76F4\u63A5\u5BF9\u624B\u505A\u62A4\u57CE\u6CB3\u3001\u5E02\u573A\u5730\u4F4D\u4E0E\u884C\u4E1A\u683C\u5C40\u5206\u6790\u3002",en:"Moat, market position and industry dynamics for one company against its direct rivals."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","competition","business-analysis","risk"],riskNote:{zh:"\u4E0E\u300C\u884C\u4E1A\u7ADE\u4E89\u4E0E\u62A4\u57CE\u6CB3\u300D\u89C6\u89D2\u91CD\u53E0\uFF0C\u540C\u4E1A\u540D\u5355\u4E0E\u53E3\u5F84\u6309\u7F8E\u80A1\u62AB\u9732\u53D6\u6750\uFF1B\u7ED3\u8BBA\u4ECD\u8981\u56DE\u5230\u516C\u5F00\u8BC1\u636E\u3002",en:"Overlaps the industry/moat lens; peer sets follow US disclosure, so conclusions still need public evidence."}},{key:"dividendAnalysis",name:"dividend-analysis",label:{zh:"\u5206\u7EA2\u56DE\u8D2D\u4E0E\u8D44\u672C\u914D\u7F6E",en:"Dividend & Capital Allocation"},description:{zh:"\u628A\u5206\u7EA2\u3001\u56DE\u8D2D\u3001\u5E76\u8D2D\u3001\u503A\u52A1\u7BA1\u7406\u4E0E\u81EA\u7531\u73B0\u91D1\u6D41\u53BB\u5411\u5408\u8D77\u6765\u770B\u8D44\u672C\u914D\u7F6E\u7EAA\u5F8B\u3002",en:"Reviews dividends, buybacks, M&A, debt and FCF deployment as one capital-allocation discipline."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","capital-allocation","cash-flow","valuation"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u4E0D\u627F\u8BFA\u80A1\u606F\u53EF\u6301\u7EED\u6027\uFF0C\u4E5F\u4E0D\u9884\u6D4B\u6536\u76CA\u3002",en:"Experimental; it does not promise dividend sustainability or returns."}},{key:"earningsCallAnalysis",name:"earnings-call-analysis",label:{zh:"\u4E1A\u7EE9\u7535\u8BDD\u4F1A\u6587\u672C\u5206\u6790",en:"Earnings Call Analysis"},description:{zh:"\u4ECE\u4E1A\u7EE9\u7535\u8BDD\u4F1A\u7EAA\u8981\u91CC\u8BFB\u60C5\u7EEA\u3001\u4E3B\u9898\u4E0E\u7BA1\u7406\u5C42\u53E3\u5F84\u7684\u53D8\u5316\u3002",en:"Reads sentiment, themes and shifts in management tone from earnings call transcripts."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","earnings","perspective"],riskNote:{zh:"\u5FC5\u987B\u5148\u62FF\u5230\u7EAA\u8981\u539F\u6587\uFF1B\u6CA1\u6709\u539F\u6587\u65F6\u4E0D\u8BB8\u51ED\u5370\u8C61\u8865\u5199\u7BA1\u7406\u5C42\u8868\u6001\u3002",en:"Needs the actual transcript; never reconstruct management remarks from memory."}},{key:"earningsPreview",name:"earnings-preview",label:{zh:"\u8D22\u62A5\u524D\u4E09\u6863\u60C5\u666F\u63A8\u6F14",en:"Earnings Preview"},description:{zh:"\u5BF9\u6BD4\u4E00\u81F4\u9884\u671F\u4E0E\u671F\u6743\u9690\u542B\u6CE2\u52A8\uFF0C\u7ED9\u51FA\u8D85\u9884\u671F/\u7B26\u5408/\u4E0D\u53CA\u4E09\u6863\u60C5\u666F\u4E0E\u5404\u81EA\u8981\u76EF\u7684\u6307\u6807\u3002",en:"Compares consensus with the implied move and lays out beat / in-line / miss scenarios with watch KPIs."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","earnings","risk","monitoring"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u6B63\u6587\u6BCF\u6863\u60C5\u666F\u5E26\u4ED3\u4F4D\u5199\u6CD5\uFF0C\u53EA\u5F53\u63A8\u6F14\u7EC3\u4E60\uFF0C\u4E0D\u662F\u4EA4\u6613\u6307\u4EE4\u3002",en:"Experimental; each scenario carries position wording \u2014 read it as a rehearsal, not a trade instruction."}},{key:"economicsAnalysis",name:"economics-analysis",label:{zh:"\u7F8E\u56FD\u5B8F\u89C2\u6307\u6807\u89E3\u8BFB",en:"US Economics Analysis"},description:{zh:"\u89E3\u8BFB\u7F8E\u56FD\u5B8F\u89C2\u6570\u636E\u4E0E\u5229\u7387\u8DEF\u5F84\uFF0C\u5E76\u4EA4\u4EE3\u5B83\u4F20\u5BFC\u5230\u5E02\u573A\u7684\u8DEF\u5F84\u3002",en:"Interprets US macro prints and the rate path, and spells out the transmission to markets."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","macro","risk"],riskNote:{zh:"\u53E3\u5F84\u662F\u7F8E\u56FD\u5B8F\u89C2\uFF0C\u5BF9 A \u80A1\u53EA\u80FD\u5F53\u5916\u90E8\u73AF\u5883\u53D8\u91CF\uFF0C\u4E0D\u76F4\u63A5\u63A8\u653F\u7B56\u3002",en:"US macro only; for A-shares treat it as an external condition, not a policy read."}},{key:"etfAnalysis",name:"etf-analysis",label:{zh:"ETF \u5C3D\u8C03\u4E0E\u5951\u5408\u5EA6\u8BC4\u5206",en:"ETF Analysis"},description:{zh:"\u8D39\u7387\u3001\u8DDF\u8E2A\u8BEF\u5DEE\u3001\u6D41\u52A8\u6027\u3001\u6210\u5206\u96C6\u4E2D\u5EA6\u4E0E\u6301\u4ED3\u91CD\u53E0\uFF0C\u6C47\u6210\u4E00\u679A ETF \u5951\u5408\u5EA6\u8BC4\u5206\u3002",en:"Expense ratio, tracking difference, liquidity, concentration and overlap rolled into a fitness score."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","instruments","portfolio","risk"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u8BC4\u5206\u8861\u91CF\u7ED3\u6784\u7279\u5F81\uFF0C\u4E0D\u4EE3\u8868\u6536\u76CA\u9884\u671F\u3002",en:"Experimental; the score describes structure, not expected return."}},{key:"factCheck",name:"fact-check",label:{zh:"\u9010\u6761\u4E3B\u5F20\u6838\u9A8C\u4E0E\u8865\u5F15\u7528",en:"Fact Check"},description:{zh:"\u628A\u62A5\u544A\u91CC\u7684\u6BCF\u4E2A\u6570\u5B57\u4E0E\u4E8B\u5B9E\u4E3B\u5F20\u62C6\u51FA\u6765\u9010\u6761\u6BD4\u5BF9\u4E00\u624B\u6765\u6E90\uFF0C\u6807\u6CE8\u5DF2\u6838\u9A8C/\u4E0D\u7B26/\u65E0\u6CD5\u6838\u9A8C\u5E76\u56DE\u586B\u5F15\u7528\u3002",en:"Extracts every figure and claim, checks each against a primary source, and marks verified / mismatch / unverifiable."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","filings","verification"],riskNote:{zh:"\u4E00\u624B\u6765\u6E90\u6E05\u5355\u6309 SEC \u6587\u4EF6\u3001\u516C\u53F8 IR\u3001FRED \u4E0E\u4EA4\u6613\u6240\u6570\u636E\u5199\uFF1BA \u80A1\u6750\u6599\u8981\u6362\u6210\u516C\u544A\u4E0E\u5B98\u65B9\u62AB\u9732\u3002",en:"Its primary-source list is SEC / IR / FRED / exchange data; swap in announcements and official disclosure for A-shares."}},{key:"financialReportAnalyst",name:"financial-report-analyst",label:{zh:"\u8D22\u62A5\u8D28\u91CF\u4E0E\u7EA2\u65D7\u89E3\u8BFB",en:"Financial Report Analyst"},description:{zh:"\u4ECE 10-K / 10-Q \u8BFB\u62A5\u8868\u8D28\u91CF\u3001\u5F02\u5E38\u7EA2\u65D7\u4E0E\u4E00\u4E2A\u53EF\u4EA4\u4EE3\u51FA\u5904\u7684\u4FE1\u53F7\u3002",en:"Reads statement quality, red flags and one sourced signal from 10-K / 10-Q filings."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","filings","financial-health","risk"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u7EA2\u65D7\u662F\u63D0\u793A\u590D\u67E5\u7684\u7EBF\u7D22\uFF0C\u4E0D\u662F\u7ED3\u8BBA\u3002",en:"Experimental; red flags are prompts to re-check, not conclusions."}},{key:"industryMap",name:"industry-map",label:{zh:"\u4EA7\u4E1A\u94FE\u5730\u56FE\u4E0E\u54BD\u5589\u70B9",en:"Industry Map"},description:{zh:"\u628A\u4E0A\u4E0B\u6E38\u753B\u6210\u6709\u5411\u56FE\uFF0C\u5B9A\u4F4D\u516C\u53F8\u4F4D\u7F6E\u3001\u627E\u4F9B\u9700\u74F6\u9888\u4E0E\u5229\u6DA6\u6C60\uFF0C\u5E76\u6D3E\u751F\u4E8C\u7EBF\u7EBF\u7D22\u3002",en:"Maps the value chain as a directed graph to locate the company, find chokepoints and second-order ideas."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","macro","competition","business-analysis"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u4EA7\u4E1A\u94FE\u5224\u65AD\u4ECD\u9700\u9010\u6761\u56DE\u5230\u516C\u5F00\u8BC1\u636E\u3002",en:"Experimental; value-chain reads still need claim-by-claim public evidence."}},{key:"insiderTrading",name:"insider-trading",label:{zh:"\u5185\u90E8\u4EBA\u589E\u51CF\u6301\u8FFD\u8E2A",en:"Insider Trading"},description:{zh:"\u4ECE SEC Form 4 \u8FFD\u8E2A\u9AD8\u7BA1\u4E0E\u8463\u4E8B\u7684\u589E\u51CF\u53D8\u52A8\u5E76\u505A\u89E3\u8BFB\u3002",en:"Tracks executive and director buying and selling from SEC Form 4 filings."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","filings","monitoring","perspective"],riskNote:{zh:"\u4F9D\u8D56\u7F8E\u56FD\u5185\u90E8\u4EBA\u7533\u62A5\u5236\u5EA6\uFF1BA \u80A1\u8981\u6362\u6210\u5927\u80A1\u4E1C\u4E0E\u8463\u76D1\u9AD8\u53D8\u52A8\u516C\u544A\uFF0C\u53E3\u5F84\u4E0D\u53EF\u76F4\u63A5\u5E73\u79FB\u3002",en:"Assumes US insider filings; A-shares need major-holder and director-change announcements instead."}},{key:"institutionalOwnership",name:"institutional-ownership",label:{zh:"\u673A\u6784\u6301\u4ED3\u53D8\u52A8",en:"Institutional Ownership"},description:{zh:"\u4ECE 13F \u6587\u4EF6\u8BFB\u673A\u6784\u6301\u4ED3\u53D8\u5316\uFF0C\u8BC6\u522B\u673A\u6784\u8D44\u91D1\u7684\u8FC1\u79FB\u65B9\u5411\u3002",en:"Reads changes in institutional holdings from 13F filings to spot where the money is moving."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","filings","monitoring"],riskNote:{zh:"13F \u6709\u4E00\u4E2A\u5B63\u5EA6\u6EDE\u540E\u4E14\u4E0D\u542B\u7A7A\u5934\u4ED3\u4F4D\uFF1B\u8BFB\u6210\u8D8B\u52BF\u4E4B\u524D\u5148\u8BB0\u4F4F\u8FD9\u4E24\u70B9\u3002",en:"13F lags a quarter and omits shorts \u2014 remember both before reading it as a trend."}},{key:"learningCoach",name:"learning-coach",label:{zh:"\u628A\u5206\u6790\u8BB2\u6210\u8BFE\u7A0B",en:"Learning Coach"},description:{zh:"\u50CF\u5BFC\u5E08\u4E00\u6837\u9010\u6307\u6807\u89E3\u91CA\u4E00\u4EFD\u5206\u6790\u7ED3\u679C\uFF0C\u518D\u53CD\u95EE 3\u20135 \u4E2A\u68C0\u9A8C\u7406\u89E3\u7684\u95EE\u9898\u3002",en:"Explains an analysis metric by metric in plain words, then asks 3\u20135 Socratic questions."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["education","perspective"],riskNote:{zh:"\u6559\u5B66\u6027\u8D28\uFF1B\u5B83\u89E3\u91CA\u7684\u662F\u4E0A\u6E38\u5206\u6790\u7684\u53E3\u5F84\uFF0C\u4E0D\u989D\u5916\u4EA7\u751F\u6295\u8D44\u5224\u65AD\u3002",en:"Educational; it explains the analysis it is handed and forms no investment view of its own."}},{key:"optionsAnalysis",name:"options-analysis",label:{zh:"\u671F\u6743\u5E0C\u814A\u5B57\u6BCD\u4E0E\u9690\u6CE2",en:"Options Analysis"},description:{zh:"\u770B\u5E0C\u814A\u5B57\u6BCD\u3001\u9690\u542B\u6CE2\u52A8\u7387\u4E0E\u7B56\u7565\u9002\u914D\u5EA6\uFF0C\u7528\u6765\u7406\u89E3\u671F\u6743\u7684\u98CE\u9669\u5F62\u72B6\u3002",en:"Reviews Greeks, implied volatility and strategy fit to characterise an options risk shape."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","instruments","risk"],riskNote:{zh:"\u5B9E\u9A8C\u6027\u8D28\uFF1B\u53EA\u89E3\u91CA\u671F\u6743\u98CE\u9669\uFF0C\u4E0D\u63A8\u8350\u5177\u4F53\u5408\u7EA6\u6216\u7B56\u7565\u7EC4\u5408\u3002",en:"Experimental; it explains options risk and does not recommend contracts or spreads."}},{key:"portfolioReview",name:"portfolio-review",label:{zh:"\u7EC4\u5408\u8868\u73B0\u4E0E\u914D\u7F6E\u504F\u79BB",en:"Portfolio Review"},description:{zh:"\u590D\u76D8\u7EC4\u5408\u7684\u6536\u76CA\u6765\u6E90\u3001\u96C6\u4E2D\u5EA6\u4E0E\u914D\u7F6E\u504F\u79BB\uFF0C\u5E76\u5217\u51FA\u9700\u8981\u76EF\u7684\u89C2\u5BDF\u9879\u3002",en:"Reviews portfolio performance, concentration and allocation drift, with items to watch."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","portfolio","risk"],riskNote:{zh:"\u4E0E\u672C\u63D2\u4EF6\u81EA\u5E26\u7684\u7EC4\u5408\u590D\u76D8\u6D41\u7A0B\u91CD\u53E0\uFF1B\u8FD9\u6761\u6309\u7F8E\u80A1\u8BED\u5883\u7ED9\u89C2\u5BDF\u6E05\u5355\uFF0C\u4ED3\u4F4D\u52A8\u4F5C\u4ECD\u7531\u4F7F\u7528\u8005\u51B3\u5B9A\u3002",en:"Overlaps the built-in portfolio review; this one gives a US-context watchlist and leaves position moves to you."}},{key:"positionLadder",name:"position-ladder",label:{zh:"\u5206\u6279\u5EFA\u4ED3\u4E0E\u644A\u8584\u8282\u594F",en:"Position Ladder"},description:{zh:"\u628A\u5EFA\u4ED3\u62C6\u6210\u5206\u6279\u7684\u80A1\u6570\u4E0A\u4E0B\u9650\u4E0E\u52A0\u51CF\u4ED3\u8282\u594F\uFF0C\u5E76\u68C0\u67E5\u6279\u6B21\u8BB0\u8D26\u3001\u6D17\u552E\u7A97\u53E3\u4E0E\u603B\u6536\u76CA\u53E3\u5F84\u3002",en:"Plans a staged entry with share-count floors and ceilings, trim/re-add cadence, lot and wash-sale checks."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","portfolio","monitoring"],riskNote:{zh:"\u6B63\u6587\u91CC\u7684\u80A1\u6570\u533A\u95F4\u662F\u63A8\u6F14\u7528\u7684\u7EC3\u4E60\uFF0C\u4E0D\u662F\u4E70\u5356\u6307\u4EE4\uFF1B\u672C\u63D2\u4EF6\u4E0D\u63D0\u4F9B\u6295\u8D44\u5EFA\u8BAE\uFF0C\u4ED3\u4F4D\u51B3\u5B9A\u5728\u4F7F\u7528\u8005\u3002",en:"Its share-count ranges are rehearsal arithmetic, not orders; this plugin gives no investment advice."}},{key:"resultValidator",name:"result-validator",label:{zh:"\u5206\u6790\u7ED3\u679C\u7F6E\u4FE1\u5EA6\u8BC4\u5206",en:"Result Validator"},description:{zh:"\u4ECE\u6570\u636E\u8D28\u91CF\u3001\u65B9\u6CD5\u4E00\u81F4\u6027\u4E0E\u4FE1\u53F7\u51B2\u7A81\u4E09\u4E2A\u7EF4\u5EA6\uFF0C\u7ED9\u4E00\u4EFD\u5206\u6790\u7ED3\u679C\u6253\u7F6E\u4FE1\u5EA6\u5206\u3002",en:"Scores an analysis's confidence across data quality, methodology and signal consistency."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["verification","perspective"],riskNote:{zh:"\u6253\u7684\u662F\u6570\u636E\u4E0E\u65B9\u6CD5\u81EA\u6D3D\u5EA6\uFF0C\u4E0D\u7B49\u4E8E\u9884\u6D4B\u51C6\u786E\u7387\uFF0C\u4E5F\u4E0D\u627F\u8BFA\u8868\u73B0\u3002",en:"It grades internal data/method consistency, not forecast accuracy or future performance."}},{key:"riskStressTest",name:"risk-stress-test",label:{zh:"\u7EC4\u5408\u538B\u529B\u6D4B\u8BD5\u4E0E\u98CE\u9669\u9884\u7B97",en:"Risk Stress Test"},description:{zh:"beta \u52A0\u6743\u655E\u53E3\u3001\u5386\u53F2\u60C5\u666F\u91CD\u653E\u3001VaR / CVaR\u3001\u6700\u5927\u56DE\u64A4\u4F30\u8BA1\u4E0E\u6D41\u52A8\u6027\u9000\u51FA\u5929\u6570\u3002",en:"Beta-weighted exposure, historical scenario replay, VaR / CVaR, drawdown estimates and days to exit."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","portfolio","risk","macro"],riskNote:{zh:"\u6A21\u578B\u5316\u4F30\u8BA1\uFF0C\u5047\u8BBE\u4E00\u53D8\u7ED3\u679C\u5C31\u53D8\uFF1B\u4E0D\u6784\u6210\u98CE\u63A7\u989D\u5EA6\uFF0C\u4E5F\u4E0D\u662F\u51CF\u4ED3\u6307\u4EE4\u3002",en:"Model output moves with every assumption; this is not a risk limit or a de-risking order."}},{key:"sectorAnalysis",name:"sector-analysis",label:{zh:"\u677F\u5757\u76F8\u5BF9\u5F3A\u5F31\u4E0E\u8F6E\u52A8",en:"Sector Analysis"},description:{zh:"\u770B\u7F8E\u56FD\u5404\u677F\u5757\u7684\u76F8\u5BF9\u5F3A\u5F31\u4E0E\u8F6E\u52A8\u7EBF\u7D22\uFF0C\u5E76\u4EA4\u4EE3\u5224\u65AD\u4F9D\u636E\u3002",en:"Reviews US sector positioning and rotation clues, and states what each read rests on."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","macro","competition"],riskNote:{zh:"\u677F\u5757\u5206\u7C7B\u6309\u7F8E\u80A1\u53E3\u5F84\uFF0C\u4E0E A \u80A1\u884C\u4E1A\u5206\u7C7B\u4E0D\u53EF\u76F4\u63A5\u5BF9\u7167\u3002",en:"Sector taxonomy is US-market; it does not line up with A-share industry classification."}},{key:"shortInterest",name:"short-interest",label:{zh:"\u7A7A\u5934\u6301\u4ED3\u4E0E\u6324\u538B\u6761\u4EF6",en:"Short Interest"},description:{zh:"\u8BFB\u7A7A\u5934\u6BD4\u4F8B\u3001\u56DE\u8865\u6210\u672C\u4E0E\u6324\u538B\u6761\u4EF6\uFF0C\u5E76\u68C0\u67E5\u5229\u7A7A\u5806\u79EF\u4FE1\u53F7\u3002",en:"Analyses short ratio, cost to cover, squeeze conditions and bearish positioning signals."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","filings","monitoring","risk"],riskNote:{zh:"\u7A7A\u5934\u6570\u636E\u662F\u6EDE\u540E\u62AB\u9732\uFF1B\u5F53\u6210\u5B9E\u65F6\u7ED3\u8BBA\u4E4B\u524D\u5148\u6838\u5BF9\u53E3\u5F84\u4E0E\u622A\u6B62\u65E5\u671F\u3002",en:"Short data is reported with a lag \u2014 check basis and as-of date before reading it as live."}},{key:"stockEval",name:"stock-eval",label:{zh:"\u57FA\u672C\u9762\u4E0E\u4F30\u503C\u7EFC\u5408\u8BC4\u4F30",en:"Stock Evaluation"},description:{zh:"\u628A\u8D22\u52A1\u8D28\u91CF\u3001\u6210\u957F\u3001\u4F30\u503C\u4E0E\u98CE\u9669\u5408\u5230\u4E00\u6B21\u7EFC\u5408\u8BC4\u4F30\u91CC\uFF0C\u5E76\u8F93\u51FA\u4E00\u4E2A\u53EF\u4EA4\u4EE3\u51FA\u5904\u7684\u7ED3\u8BBA\u3002",en:"Combines quality, growth, valuation and risk into one evaluation with a sourced conclusion."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","business-analysis","financial-health","valuation","risk"],riskNote:{zh:"\u4E0A\u6E38\u5DF2\u628A fundamental-analysis \u5408\u5165\u672C\u6761\uFF1B\u7EFC\u5408\u7ED3\u8BBA\u4ECD\u662F\u7F8E\u80A1\u53E3\u5F84\uFF0C\u4E0D\u66FF\u4EE3\u672C\u63D2\u4EF6\u65E2\u6709\u7814\u7A76\u6D41\u7A0B\u3002",en:"Upstream folded fundamental-analysis in; the read is US-context and does not replace Capital's own research flow."}},{key:"stockScreener",name:"stock-screener",label:{zh:"\u591A\u6807\u7684\u6A2A\u5411\u6253\u5206\u6392\u5E8F",en:"Stock Screener"},description:{zh:"\u6309\u4F30\u503C\u3001\u8D28\u91CF\u3001\u52A8\u91CF\u3001\u60C5\u7EEA\u4E0E\u6210\u957F\u4E94\u4E2A\u7EF4\u5EA6\u7ED9\u4E00\u7BEE\u5B50\u6807\u7684\u6253\u5206\u5E76\u6392\u5E8F\u3002",en:"Screens and ranks a list of US stocks across valuation, quality, momentum, sentiment and growth."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","valuation","business-analysis","technicals"],riskNote:{zh:"\u6392\u5E8F\u53EA\u53CD\u6620\u5F53\u671F\u6253\u5206\u53E3\u5F84\uFF0C\u4E0D\u9884\u6D4B\u672A\u6765\u8868\u73B0\uFF1B\u6807\u7684\u6E05\u5355\u4E0E\u6570\u636E\u6765\u6E90\u4ECD\u8981\u8D70\u672C\u63D2\u4EF6\u7684\u53D6\u6570\u94FE\u8DEF\u3002",en:"Ranking reflects the current scoring inputs only, not future performance; data still comes via Capital's own sources."}},{key:"stockValuation",name:"stock-valuation",label:{zh:"\u56DB\u65B9\u6CD5\u4F30\u503C\u533A\u95F4",en:"Stock Valuation"},description:{zh:"DCF\u3001\u53EF\u6BD4\u516C\u53F8\u3001EV \u500D\u6570\u4E0E\u5269\u4F59\u6536\u76CA\u4E00\u8D77\u51FA\u4F30\u503C\u533A\u95F4\uFF0C\u5E76\u9010\u6761\u4EA4\u4EE3\u5047\u8BBE\u3002",en:"Values a company with DCF, comparables, EV multiples and residual income, stating every assumption."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","valuation","cash-flow"],riskNote:{zh:"\u533A\u95F4\u968F\u5047\u8BBE\u5927\u5E45\u79FB\u52A8\uFF1B\u8F93\u51FA\u4E0D\u7B49\u4E8E\u76EE\u6807\u4EF7\uFF0C\u4E5F\u4E0D\u662F\u4E70\u5356\u5EFA\u8BAE\u3002",en:"Ranges swing with assumptions; the output is not a price target or a trade call."}},{key:"taxLens",name:"tax-lens",label:{zh:"\u7F8E\u56FD\u7A0E\u52A1\u89C6\u89D2\u68C0\u89C6\u6E05\u5355",en:"Tax Lens"},description:{zh:"\u957F\u77ED\u671F\u8D44\u672C\u5229\u5F97\u3001\u6D17\u552E\u7A97\u53E3\u3001\u5408\u683C\u80A1\u606F\u6301\u6709\u671F\u3001\u6279\u6B21\u9009\u62E9\u4E0E\u5E74\u5EA6\u7A0E\u8D1F\u62D6\u7D2F\u7684\u68C0\u89C6\u6E05\u5355\u3002",en:"Checks short vs. long-term gains, wash-sale windows, qualified dividends, lot selection and estimated tax drag."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","tax","portfolio"],riskNote:{zh:"\u53EA\u8BB2\u7F8E\u56FD\u7A0E\u5236\u4E14\u6B62\u4E8E\u6559\u80B2\u53E3\u5F84\uFF1B\u4E2D\u56FD\u5927\u9646\u7684\u7A0E\u52A1\u4E0E\u8D26\u6237\u5B89\u6392\u8BF7\u54A8\u8BE2\u4E13\u4E1A\u4EBA\u58EB\u3002",en:"US tax mechanics, educational only; get professional advice for mainland-China tax and account matters."}},{key:"technicalAnalysis",name:"technical-analysis",label:{zh:"\u6280\u672F\u9762\u4E0E\u6307\u6807\u89E3\u8BFB",en:"Technical Analysis"},description:{zh:"\u7528\u5747\u7EBF\u3001\u6210\u4EA4\u91CF\u3001RSI / MACD \u7B49\u6307\u6807\u8BFB\u8D8B\u52BF\u3001\u5173\u952E\u4EF7\u4F4D\u4E0E\u590D\u67E5\u89E6\u53D1\u6761\u4EF6\u3002",en:"Reads trend and key levels with moving averages, volume, RSI and MACD, plus re-check triggers."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","technicals","monitoring"],riskNote:{zh:"\u6280\u672F\u4FE1\u53F7\u53EA\u7ED9\u590D\u67E5\u6761\u4EF6\uFF0C\u4E0D\u9884\u6D4B\u65B9\u5411\uFF1B\u4E0D\u8981\u628A\u56FE\u5F62\u7ED3\u8BBA\u5199\u6210\u4E8B\u5B9E\u3002",en:"Technical signals are re-check triggers, not direction forecasts \u2014 do not present them as facts."}},{key:"thesisTracker",name:"thesis-tracker",label:{zh:"\u6295\u8D44\u8BBA\u70B9\u5B58\u6863\u4E0E\u590D\u6838",en:"Thesis Tracker"},description:{zh:"\u5199\u4E0B\u8BBA\u70B9\u7684 KPI\u3001\u5931\u6548\u6761\u4EF6\u4E0E\u50AC\u5316\u5242\uFF0C\u4E4B\u540E\u6309\u65B0\u6570\u636E\u590D\u67E5\u5E76\u7ED9\u51FA\u7EF4\u6301 / \u8D70\u5F31 / \u5931\u6548\u3002",en:"Records KPIs, invalidation triggers and catalysts, then re-checks them as INTACT / WEAKENED / BROKEN."},owner:"yennanliu",repository:"InvestSkill",status:"experimental",lastCommit:"2026-09-25",reviewBy:"2026-11-06",tags:["us-stock","verification","monitoring","perspective"],riskNote:{zh:"\u4E0A\u6E38\u5047\u8BBE\u80FD\u628A\u8BBA\u70B9\u843D\u76D8\uFF1B\u5728\u672C\u63D2\u4EF6\u4E0B\u6587\u4EF6\u5199\u5728\u5DE5\u4F5C\u76EE\u5F55\u5E76\u670D\u4ECE\u5F53\u524D\u4F1A\u8BDD\u6743\u9650\u3002",en:"Upstream assumes it can save files; under Capital it writes into the session workspace and obeys its permissions."}},{key:"peterLynchResearch",name:"peter-lynch-skill",label:{zh:"\u5F7C\u5F97\xB7\u6797\u5947\u5F0F\u4E2A\u80A1\u7814\u7A76",en:"Peter Lynch Research"},description:{zh:"\u7ED9\u4E00\u4E2A\u4EE3\u7801\u6216\u516C\u53F8\u540D\uFF0C\u8D70\u5FEB\u7B5B\uFF08SKIP / WATCHLIST / DEEP RESEARCH\uFF09\u6216\u5B8C\u6574\u5C3D\u8C03\uFF0C\u751F\u610F\u7406\u89E3\u3001\u5206\u7C7B\u4E0E\u4F30\u503C\u653E\u5728\u540C\u4E00\u5957\u68C0\u67E5\u91CC\uFF0C\u6BCF\u6761\u4E3B\u5F20\u914D\u53EF\u70B9\u5F00\u7684\u6765\u6E90\u94FE\u63A5\u3002\u7F8E\u80A1\u4E0E\u5883\u5916\u4E0A\u5E02\u53E3\u5F84\u3002",en:"Screens a ticker or company fast (SKIP / WATCHLIST / DEEP RESEARCH) or runs full due diligence, with linked sources under every claim. US and overseas-listing conventions."},owner:"DjNero11",repository:"peter-lynch-skill",status:"watchlist",lastCommit:"2026-06-28",reviewBy:"2026-11-06",tags:["peter-lynch","us-stock","valuation","risk","verification"],riskNote:{zh:"\u51B7\u542F\u52A8\u5B9E\u9A8C\uFF1B\u4E0A\u6E38\u4EC5\u4E24\u6B21\u63D0\u4EA4\u3001\u81EA 2026-06-28 \u8D77\u65E0\u66F4\u65B0\uFF0C\u542F\u7528\u524D\u8BF7\u81EA\u884C\u590D\u6838\u6765\u6E90\u3002X/10 \u8861\u91CF\u7684\u662F\u8BBA\u70B9\u81EA\u6D3D\u5EA6\u4E0E\u7ED3\u6784\u7279\u5F81\uFF0C\u4E0D\u9884\u6D4B\u8868\u73B0\uFF0C\u4E5F\u4E0D\u6784\u6210\u4E70\u5356\u5EFA\u8BAE\u3002",en:"Cold-start experiment; upstream has two commits and has been quiet since 2026-06-28, so review the sources before use. The X/10 score rates thesis consistency and structure, not forecast performance, and is not investment advice."}}]),re=Object.freeze({zh:{all:"\u5168\u90E8","a-share":"A \u80A1","business-analysis":"\u4E1A\u52A1\u5206\u6790","capital-allocation":"\u8D44\u672C\u914D\u7F6E","cash-flow":"\u73B0\u91D1\u6D41",competition:"\u7ADE\u4E89\u683C\u5C40",earnings:"\u4E1A\u7EE9\u4E0E\u7535\u8BDD\u4F1A",education:"\u6559\u5B66",filings:"\u62AB\u9732\u6587\u4EF6","financial-health":"\u8D22\u52A1\u5065\u5EB7",instruments:"\u671F\u6743\u4E0E\u57FA\u91D1",macro:"\u5B8F\u89C2\u4E0E\u884C\u4E1A",monitoring:"\u76D1\u63A7",orders:"\u8BA2\u5355",perspective:"\u5206\u6790\u89C6\u89D2","peter-lynch":"\u5F7C\u5F97\xB7\u6797\u5947",portfolio:"\u7EC4\u5408\u4E0E\u4ED3\u4F4D",risk:"\u98CE\u9669",strategy:"\u6218\u7565",tax:"\u7A0E\u52A1",technicals:"\u6280\u672F\u9762","us-stock":"\u7F8E\u80A1",valuation:"\u4F30\u503C",verification:"\u8BC1\u636E\u6838\u9A8C"},en:{all:"All","a-share":"A-share","business-analysis":"Business analysis","capital-allocation":"Capital allocation","cash-flow":"Cash flow",competition:"Competition",earnings:"Earnings",education:"Education",filings:"Filings","financial-health":"Financial health",instruments:"Options & funds",macro:"Macro & industry",monitoring:"Monitoring",orders:"Orders",perspective:"Perspective","peter-lynch":"Peter Lynch",portfolio:"Portfolio",risk:"Risk",strategy:"Strategy",tax:"Tax",technicals:"Technicals","us-stock":"US equity",valuation:"Valuation",verification:"Verification"}})});var{createElement:a,useEffect:N,useRef:j,useState:b}=require("react"),{createPortal:ce}=require("react-dom"),{SettingsForm:de,SettingsSecretField:pe,SettingsFormModel:ue,SegmentedControl:he,Switch:q,Modal:me,writeClipboard:ge,IconRightUpOutlineRegular:W}=require("@deepseek-ai/dsh-client-ui-primitives"),{SELECTED_SKILL_CATALOG:v,SELECTED_SKILL_TAG_LABELS:V}=(U(),ne(H)),T="capital-config",S="@v587d/capital-generation",B="settings.capital",K="plugins.detail.badge",fe="https://github.com/v587d/capital-generation",ye=`https://www.npmjs.com/package/${S}`,ke="FUYAO_API_KEY",we="ANYSEARCH_API_KEY",ve="WIND_API_KEY",be="PADDLE_OCR_TOKEN",_="capital-config-tabs",Se="/capital-skills",E={fuyao:"https://fuyao.aicubes.cn/docs/",anysearch:"https://www.anysearch.com/docs/auth",wind:"https://market.windalice.com/",paddleocr:"https://aistudio.baidu.com/paddleocr"},f=["fuyao","anysearch","wind","paddleocr"],$=v.map(({key:t})=>t),C={fuyao:ke,anysearch:we,wind:ve,paddleocr:be},xe=()=>Object.fromEntries(f.map(t=>[t,{ref:C[t],configured:!1,writable:!0}])),Ce={tabsLabel:"\u914D\u7F6E\u5206\u533A",title:"\u6570\u636E\u6E90",titleUnsaved:"\u6570\u636E\u6E90 \u672A\u4FDD\u5B58",componentsTitle:"\u5305\u542B\u7684\u7EC4\u4EF6",componentsHint:"\u7EC4\u4EF6\u6E05\u5355\u7531 DSH \u7ED8\u5236\uFF0C\u663E\u793A\u5728\u4E0B\u65B9\u3002",fuyaoLabel:"Fuyao API Key",fuyaoHint:"\u540C\u82B1\u987A Fuyao \u7ED3\u6784\u5316\u6570\u636E\u63A5\u53E3\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",anysearchLabel:"AnySearch API Key",anysearchHint:"AnySearch \u7F51\u9875\u641C\u7D22 / \u63D0\u53D6\u63A5\u53E3\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",localFetchLabel:"\u5141\u8BB8\u542F\u52A8\u672C\u5730\u63D0\u53D6\u7F51\u9875\u5185\u5BB9",localFetchHint:"\u5F00\u542F\u540E\u672C\u5730\u6293\u53D6\u515C\u5E95\uFF08\u56DE\u6267\u6765\u6E90 local-http\uFF09\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",windLabel:"Wind Alice API Key",windHint:"Wind \u91D1\u878D\u4FE1\u62AB\u7C7B\u6587\u6863\u68C0\u7D22\u63A5\u53E3\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",paddleocrLabel:"PaddleOCR \u6587\u6863\u89E3\u6790 Token",paddleocrHint:"\u914D\u7F6E Token \u540E\u81EA\u52A8\u89E3\u6790 PDF\u3001\u56FE\u7247\u3002\u4FDD\u5B58\u540E\u65B0 Capital \u6A21\u5F0F\u4F1A\u8BDD\u751F\u6548\u3002",selectedSkillsTitle:"\u7CBE\u9009 Skills",selectedSkillsFilterLabel:"\u6309\u80FD\u529B\u7B5B\u9009",selectedSkillsEmpty:"\u6CA1\u6709\u5339\u914D\u8FD9\u4E2A\u6807\u7B7E\u7684 Skill\u3002",selectedSkillsCopyName:"\u590D\u5236\u6280\u80FD\u540D",selectedSkillsCopied:"\u5DF2\u590D\u5236",selectedSkillsDetail:"\u8BE6\u60C5",selectedSkillsDetailClose:"\u5173\u95ED",selectedSkillsDocLoading:"\u539F\u6587\u8BFB\u53D6\u4E2D\u2026",selectedSkillsDocFailed:"\u539F\u6587\u8BFB\u4E0D\u5230\uFF1A\u8FD9\u4EFD\u5FEB\u7167\u6CA1\u968F\u5305\u843D\u5730\uFF0C\u6216\u6682\u65F6\u8BFB\u4E0D\u51FA\u6765\u3002",selectedSkillsDocStale:"\u539F\u6587\u8BFB\u4E0D\u5230\uFF1A\u5BBF\u4E3B\u8FDB\u7A0B\u91CC\u8FD8\u6CA1\u6709\u8FD9\u6761\u8BFB\u539F\u6587\u7684\u901A\u9053\u3002\u5347\u7EA7\u63D2\u4EF6\u540E\u8981\u91CD\u542F DSH\uFF0C\u91CD\u542F\u524D\u5237\u65B0\u9875\u9762\u4E5F\u6CA1\u6709\u7528\u3002",selectedSkillsOpenRepo:"\u6253\u5F00\u4E0A\u6E38\u4ED3\u5E93",openDocs:"\u5B98\u65B9\u6587\u6863",configured:"\u5DF2\u914D\u7F6E\u5BC6\u94A5\u3002",notConfigured:"\u672A\u914D\u7F6E\u5BC6\u94A5\u3002",save:"\u4FDD\u5B58",saving:"\u4FDD\u5B58\u4E2D\u2026",readOnly:"\u672C\u90E8\u7F72\u7684\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u3002",saveFailed:"\u672C\u90E8\u7F72\u6CA1\u6709\u63A5\u53D7\u8FD9\u4E9B\u503C\uFF0C\u5DF2\u4FDD\u7559\u4F9B\u4F60\u4FEE\u6539\u3002",unavailable:"\u8BE5\u63D2\u4EF6\u5F53\u524D\u672A\u52A0\u8F7D\uFF0C\u6682\u65F6\u65E0\u6CD5\u914D\u7F6E\u3002",githubLabel:"GitHub \u4ED3\u5E93",npmLabel:"npm \u5305\u9875\u9762"},ze={tabsLabel:"Settings sections",title:"Data Sources",titleUnsaved:"Data Sources unsaved",componentsTitle:"Components",componentsHint:"The component list is drawn by DSH and appears below.",fuyaoLabel:"Fuyao API Key",fuyaoHint:"Tonghuashun Fuyao structured-data API. Takes effect in new Capital mode sessions.",anysearchLabel:"AnySearch API Key",anysearchHint:"AnySearch web search / extract interface. Takes effect in new Capital mode sessions.",localFetchLabel:"Allow local web page extraction",localFetchHint:"When on, a failed fetch falls back to local direct fetching (receipt via: local-http). Takes effect in new Capital mode sessions.",windLabel:"Wind Alice API Key",windHint:"Wind financial disclosure document retrieval interface. Takes effect in new Capital mode sessions.",paddleocrLabel:"PaddleOCR document token",paddleocrHint:"Configure the token to parse PDFs and images automatically. Takes effect in new Capital mode sessions.",selectedSkillsTitle:"Selected Skills",selectedSkillsFilterLabel:"Filter by capability",selectedSkillsEmpty:"No skills match this tag.",selectedSkillsCopyName:"Copy skill name",selectedSkillsCopied:"Copied",selectedSkillsDetail:"Details",selectedSkillsDetailClose:"Close",selectedSkillsDocLoading:"Loading the source\u2026",selectedSkillsDocFailed:"The source could not be read: this snapshot is not in the installed package, or it cannot be opened right now.",selectedSkillsDocStale:"The source could not be read: this host process has no route for it yet. After upgrading the plugin, restart DSH \u2014 reloading the page alone will not help.",selectedSkillsOpenRepo:"Open upstream repository",openDocs:"Official docs",configured:"A key is configured.",notConfigured:"No key is configured.",save:"Save",saving:"Saving\u2026",readOnly:"This deployment stores settings read-only.",saveFailed:"The deployment did not accept these values; they were left for you to correct.",unavailable:"This plugin is not loaded, so it cannot be configured right now.",githubLabel:"GitHub repository",npmLabel:"npm package page"};function F(t,e){return typeof t=="string"&&t.length>0?t:e}function Ee(t,e){return e==="fuyao"?F(t.value?.fuyaoCredentialRef,C.fuyao):e==="wind"?F(t.value?.retriever?.windDocs?.credentialRef,C.wind):e==="paddleocr"?F(t.value?.retriever?.paddleOcr?.credentialRef,C.paddleocr):F(t.value?.retriever?.credentialRef,C.anysearch)}function Fe(){if(typeof document>"u"||document.querySelector("style[data-capital-config]"))return()=>{};let t=document.createElement("style");return t.dataset.capitalConfig="true",t.textContent=`
9
9
  .capital-config-card { display: flex; flex-direction: column; gap: 12px; }
10
10
  .capital-config-title { margin: 0; font-size: 14px; font-weight: 500; line-height: 20px; }
11
+ /* \u9762\u677F\u7684 display \u53EA\u5728\u300C\u6CA1\u88AB hidden\u300D\u65F6\u58F0\u660E\uFF1AUA \u7684 [hidden]{display:none} \u4F1A\u8F93\u7ED9\u4EFB\u4F55\u4F5C\u8005
12
+ display\uFF0C\u5199\u5728 .capital-config-panel \u4E0A\u5C31\u7B49\u4E8E hidden \u5931\u6548\u2014\u201435 \u9897\u5F00\u5173\u4E0E\u5BC6\u94A5\u8F93\u5165\u6846\u5168\u7559\u5728
13
+ Tab \u5E8F\u91CC\uFF0C\u63A7\u4EF6\u5BF9\u81EA\u5DF1\u8BF4\u8C0E\u3002\u4E24\u6761\u5404\u7BA1\u4E00\u8FB9\uFF0C\u8C01\u65E5\u540E\u52A0 display \u4E5F\u6F0F\u4E0D\u51FA\u6765\u3002 */
14
+ .capital-config-panel { flex-direction: column; gap: 12px; }
15
+ .capital-config-panel:not([hidden]) { display: flex; }
16
+ .capital-config-panel[hidden] { display: none; }
17
+ /* \u300C\u5305\u542B\u7684\u7EC4\u4EF6\u300D\u90A3\u4E00\u683C\u662F\u5BBF\u4E3B\u7684\uFF08section[data-plugin-rows]\uFF09\uFF0C\u6211\u4EEC\u6CA1\u6709\u80FD\u66FF\u6362\u5B83\u7684\u5EA7\u4F4D\uFF0C\u53EA\u80FD\u6536\u8D77/\u653E\u884C\u3002
18
+ \u53EA\u5199\u6B63\u9762\u5F0F\u3001\u4E24\u6761\u5404\u81EA\u6210\u89C4\u5219\uFF1A\u4EFB\u4F55\u4E00\u6761\u5931\u914D\uFF08\u5BBF\u4E3B\u6539\u540D\u3001\u8001\u5BBF\u4E3B\u6CA1\u8FD9\u6BB5\u3001\u65E0 :has() \u7684\u5F15\u64CE\u3001\u5361\u7247\u6CA1\u88AB
19
+ whileServed \u653E\u884C\u3001available \u4E3A\u5047\u3001\u5C5E\u6027\u503C\u610F\u5916\uFF09\u90FD\u843D\u5728**\u5BBF\u4E3B\u6BB5\u843D\u7167\u5E38\u53EF\u89C1**\u90A3\u4E00\u4FA7\u2014\u2014\u5B81\u53EF\u91CD\u590D\uFF0C
20
+ \u4E0D\u80FD\u628A\u7528\u6237\u7684\u6570\u636E\u85CF\u4E22\u3002\u5199\u6210 :not([data-capital-config-tab="components"]) \u5C31\u662F\u628A\u4E00\u4E2A\u62FC\u9519\u7684
21
+ \u5C5E\u6027\u503C\u53D8\u6210\u4E8B\u6545\u3002\u56DE\u5230\u53EF\u89C1\u4E00\u4FA7\u7684\u7ED3\u6784\u4FDD\u8BC1\uFF1Atab \u6761\u4E0D\u5728\u4EFB\u4F55\u9762\u677F\u91CC\uFF0C\u6C38\u8FDC\u6536\u4E0D\u5230 hidden\u3002 */
22
+ [data-plugin-detail="${S}"]:has(.capital-config-card[data-capital-config-tab="sources"]) section[data-plugin-rows] { display: none; }
23
+ [data-plugin-detail="${S}"]:has(.capital-config-card[data-capital-config-tab="skills"]) section[data-plugin-rows] { display: none; }
11
24
  .capital-config-secret-row { display: flex; flex-direction: column; gap: 2px; }
12
25
  /* \u6587\u6863\u94FE\u63A5 portal \u8FDB\u5B98\u65B9 head \u884C\u4E4B\u540E\u9760\u8FD9\u4E24\u6761\u6446\u4F4D\uFF1A\u5B98\u65B9 label \u662F flex:1\uFF08\u4F1A\u5403\u6389\u6574\u884C\uFF09\uFF0C
13
26
  \u6536\u6210 0 1 auto \u624D\u8BA9\u94FE\u63A5\u7D27\u8D34\u5176\u53F3\uFF1B\u914D\u7F6E\u5FBD\u6807\u62FF order + margin-left:auto \u7559\u5728\u884C\u5C3E\u3002 */
14
27
  .capital-config-secret-row label { flex: 0 1 auto; }
15
28
  .capital-config-secret-row label ~ span { order: 1; margin-left: auto; }
16
29
  .capital-config-field { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 0.5px solid var(--dsw-alias-border-l2); }
17
- .capital-config-selected-skills { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 0.5px solid var(--dsw-alias-border-l2); }
18
- .capital-config-selected-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
19
- .capital-config-selected-filter-label { flex: 0 0 100%; color: var(--dsw-alias-label-tertiary); font-size: 12px; line-height: 18px; }
20
- .capital-config-selected-filter-button { min-height: 26px; padding: 3px 8px; border: 0.5px solid var(--dsw-alias-border-l1); border-radius: 6px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 12px; line-height: 18px; cursor: pointer; }
30
+ /* \u7B2C\u4E8C\u683C\u662F\u5DE6\u53F3\u5E03\u5C40\uFF1A\u7B5B\u9009\u5668\u5728\u5DE6\u3001\u6E05\u5355\u5728\u53F3\u3002\u4E0D\u662F\u4E3A\u4E86\u597D\u770B\u2014\u201435 \u884C\u7684\u6E05\u5355\u91CC\u5F80\u4E0B\u6EDA\uFF0C\u9876\u90E8\u6A2A\u6392\u7684
31
+ \u4E8C\u5341\u51E0\u4E2A\u6807\u7B7E\u65E9\u5C31\u6EDA\u51FA\u89C6\u91CE\uFF0C\u7B5B\u9009\u5668\u7B49\u4E8E\u5931\u6548\uFF0C\u6240\u4EE5\u5B83\u8FD8\u8981 position: sticky \u8DDF\u7740\u6EDA\u3002
32
+ padding-top: 12px \u628A\u5DE6\u5217\u7B2C\u4E00\u9897\u6309\u94AE\u9876\u5230 tab \u6761\u4E0B\u65B9 24px\uFF0C\u4E0E\u7B2C\u4E00\u683C\u300CFuyao API Key\u300D\u540C\u4E00\u6863\uFF1A
33
+ \u9762\u677F\u53EA\u6709\u4E00\u4E2A\u5B50\u5143\u7D20\u65F6 flex gap \u4E0D\u53D1\u751F\u4F5C\u7528\uFF0C\u4E0D\u8865\u8FD9\u4E00\u6863\u5C31\u662F 12px\uFF0C\u5207\u683C\u5B50\u7248\u9762\u5C31\u8DF3\u4E00\u6B21\u3002
34
+ \u26A0\uFE0F sticky \u7684\u53C2\u7167\u662F\u9875\u9762\u6EDA\u52A8\u5BB9\u5668\u3001top \u662F\u5B83\u9876\u7AEF\u8FD8\u8981\u8BA9\u51FA\u7684\u9AD8\u5EA6\uFF0C\u4E24\u8005\u53EA\u80FD\u5728\u6D4F\u89C8\u5668\u91CC\u91CF\u3002 */
35
+ .capital-config-selected-layout { display: flex; align-items: flex-start; gap: 16px; padding-top: 12px; }
36
+ .capital-config-selected-filter { position: sticky; top: 12px; flex: 0 0 132px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
37
+ .capital-config-selected-filter-button { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-height: 26px; padding: 3px 8px; border: 0.5px solid var(--dsw-alias-border-l1); border-radius: 6px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 12px; line-height: 18px; text-align: left; cursor: pointer; }
21
38
  .capital-config-selected-filter-button:hover { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }
22
39
  .capital-config-selected-filter-button[aria-pressed="true"] { border-color: var(--dsw-alias-brand-primary); background: color-mix(in srgb, var(--dsw-alias-brand-primary) 12%, transparent); color: var(--dsw-alias-label-primary); }
40
+ /* \u6807\u7B7E\u540E\u9762\u90A3\u4E2A\u6570\u5B57 = "\u70B9\u5B83\u4F1A\u663E\u793A\u51E0\u884C"\uFF0C\u6309 catalog \u73B0\u7B97\uFF1B\u4E0D\u662F"\u5DF2\u5F00\u542F\u51E0\u9897"\uFF08\u90A3\u662F tab \u4E0A 2/35 \u7684\u53E3\u5F84\uFF09\u3002 */
41
+ .capital-config-selected-filter-count { flex: none; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
42
+ .capital-config-selected-filter-button[aria-pressed="true"] .capital-config-selected-filter-count { color: inherit; }
43
+ .capital-config-selected-list { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
23
44
  .capital-config-skill-tags { display: flex; flex-wrap: wrap; gap: 4px; }
24
45
  .capital-config-skill-tag { padding: 1px 5px; border-radius: 4px; background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 16px; }
25
46
  .capital-config-skill-heading { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
26
- .capital-config-skill-slug { min-width: 0; overflow-wrap: anywhere; color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 16px; }
27
- .capital-config-skill-copy { flex: none; padding: 2px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--dsw-alias-label-tertiary); font: inherit; font-size: 11px; line-height: 16px; cursor: pointer; }
28
- .capital-config-skill-copy:hover { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }
29
- .capital-config-skill-copy:focus-visible { outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary)); outline-offset: 1px; }
47
+ .capital-config-skill-actions { flex: none; display: inline-flex; align-items: center; gap: 6px; }
48
+ /* \u4E24\u4E2A\u52A8\u4F5C\u4EE5\u524D\u662F\u65E0\u8FB9\u6846\u7684 tertiary \u7070\uFF0C\u843D\u5728\u6807\u9898\u540E\u9762\u50CF\u4E00\u884C\u8BF4\u660E\u6587\u5B57\uFF0C\u770B\u4E0D\u51FA\u53EF\u70B9\u3002 */
49
+ .capital-config-skill-action { flex: none; min-height: 22px; padding: 2px 8px; border: 0.5px solid var(--dsw-alias-border-l2); border-radius: 6px; background: color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent); color: var(--dsw-alias-brand-primary); font: inherit; font-size: 11px; line-height: 16px; white-space: nowrap; cursor: pointer; }
50
+ .capital-config-skill-action:hover { border-color: var(--dsw-alias-brand-primary); background: color-mix(in srgb, var(--dsw-alias-brand-primary) 18%, transparent); }
51
+ .capital-config-skill-action:focus-visible { outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary)); outline-offset: 1px; }
30
52
  .capital-config-skill-repo { display: inline-flex; align-items: center; gap: 3px; color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 16px; text-decoration: none; }
31
53
  .capital-config-skill-repo:hover { color: var(--dsw-alias-brand-primary); text-decoration: underline; }
32
54
  .capital-config-skill-description { margin: 0; color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 18px; }
55
+ /* \u300C\u8BE6\u60C5\u300D\u70B9\u5F00\u7684\u662F\u5B98\u65B9 Modal\uFF08portal \u5230 body\uFF0C\u906E\u7F69\u3001Esc\u3001\u53F3\u4E0A\u5173\u95ED\u6309\u94AE\u4E0E\u7126\u70B9\u5F52\u8FD8\u90FD\u5F52\u5B83\uFF0C\u89C1 \xA75.3\uFF09\u3002
56
+ \u5B83\u9ED8\u8BA4\u53EA\u6709 380px\u2014\u2014\u88C5\u4E0D\u4E0B\u4E00\u4EFD markdown\uFF0C\u6240\u4EE5\u8FD9\u91CC\u7ED9\u5BBD\u5EA6\u3002\u9009\u62E9\u5668\u5199\u6210 div. \u662F\u4E3A\u4E86\u5728\u540C\u6743\u91CD\u7ADE\u4E89\u91CC
57
+ \u7A33\u8D62\u5B98\u65B9\u6563\u5217\u7C7B .dialog\uFF1A\u6211\u4EEC\u7684\u6837\u5F0F\u8868\u540E\u6CE8\u5165\uFF0C\u4F46"\u540E\u6CE8\u5165"\u662F\u5DE7\u5408\u4E0D\u662F\u5951\u7EA6\uFF0C\u522B\u62BC\u4E0A\u53BB\u3002 */
58
+ div.capital-config-skill-modal { width: min(820px, 100%); max-height: 100%; }
59
+ /* \u77EE\u7A97\u53E3\u91CC\u7684\u4FDD\u9669\uFF1A\u6B63\u6587\u6574\u4F53\u53EF\u6EDA\uFF0C\u907F\u514D\u88AB .dialog \u7684 overflow:hidden \u88C1\u6389\u534A\u884C\u3002 */
60
+ .capital-config-skill-modal-content { min-height: 0; overflow: auto; }
61
+ /* \u539F\u6587\u662F markdown \u5C31\u6309\u6E90\u7801\u5448\u73B0\uFF0C\u4E0D\u505A\u6E32\u67D3\u2014\u2014\u8FD9\u5757 UI \u8BF4\u7684\u662F"SKILL.md \u539F\u6587"\u3002\u6EDA\u52A8\u7684\u662F\u8FD9\u4E00\u4EFD\uFF0C
62
+ \u6807\u9898\u4E0E\u5173\u95ED\u6309\u94AE\u56E0\u6B64\u4E00\u76F4\u7559\u5728\u539F\u4F4D\u3002 */
63
+ .capital-config-skill-doc { min-height: 0; max-height: 58vh; margin: 0; padding: 12px 14px; overflow: auto; border-radius: 8px; background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
64
+ .capital-config-skill-doc-state { margin: 0; padding: 12px 14px; color: var(--dsw-alias-label-tertiary); font-size: 12px; line-height: 18px; }
65
+ /* \u8BFB\u5C4F\u7528\u7684\u4E00\u53E5\uFF08\u7B2C\u4E09\u683C\u90A3\u53E5"\u6E05\u5355\u5728\u4E0B\u65B9"\uFF09\uFF1A\u753B\u9762\u4E0A\u5220\u6389\u4E86\uFF0C\u4F46 aria-controls \u6307\u7684\u8FD9\u5757\u9762\u677F\u4E0D\u8BB8\u662F
66
+ \u7A7A\u7684\u2014\u2014\u7A7A\u9762\u677F\u4E0D\u62A5\u9519\uFF0C\u53EA\u6709\u8BFB\u5C4F\u7528\u6237\u4ED8\u8D26\u3002position:absolute \u21D2 \u5B83\u5BF9\u5E03\u5C40\u4E00\u70B9\u8D21\u732E\u90FD\u6CA1\u6709\u3002 */
67
+ .capital-config-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
68
+ /* \u7B2C\u4E09\u683C\u4E0D\u7559\u53EF\u89C1\u5185\u5BB9\uFF08\u5BBF\u4E3B\u90A3\u6BB5\u6E05\u5355\u5C31\u5728\u5361\u7247\u4E0B\u65B9\uFF09\uFF0C\u8FD9\u6761\u8D1F margin \u628A\u5B83\u7684\u9996\u884C\u6587\u5B57\u9876\u5230\u4E0E\u53E6\u4E24\u683C
69
+ \u7B49\u8DDD\u3002\u6570\u662F\u8FD9\u6837\u6765\u7684\uFF08\u6D4F\u89C8\u5668\u5B9E\u6D4B\uFF0C\u522B\u7167\u6284\u6CE8\u91CA\u6539\uFF09\uFF1A\u9762\u677F 0 \u9AD8\u65F6\u5BBF\u4E3B h4 \u843D\u5728 tab \u6761\u4E0B\u65B9 44px
70
+ = \u5361\u7247\u5230\u9762\u677F\u7684 12 + \u4E24\u683C\u4E4B\u95F4\u7684 32\uFF1B\u7B2C\u4E00\u683C\u90A3\u4E00\u6863\u662F 24 \u21D2 \u8981\u6536\u56DE 44 \u2212 20 = 24\u3002
71
+ \u9762\u677F hidden \u65F6 display: none\uFF0C\u8FD9\u6761 margin \u6839\u672C\u4E0D\u53C2\u4E0E\u5E03\u5C40\uFF0C\u6240\u4EE5\u53EA\u6709\u90A3\u4E00\u683C\u5728\u5C4F\u65F6\u624D\u751F\u6548\u3002 */
72
+ .capital-config-panel[data-capital-config-panel="components"] { margin-bottom: -20px; }
33
73
  .capital-config-doc-link { display: inline-flex; align-items: center; gap: 3px; color: var(--dsw-alias-label-tertiary); font-size: 12px; line-height: 20px; white-space: nowrap; text-decoration: none; }
34
74
  .capital-config-doc-link:hover { color: var(--dsw-alias-brand-primary); text-decoration: underline; }
35
75
  .capital-config-doc-link:focus-visible { border-radius: 3px; outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary)); outline-offset: 2px; }
@@ -44,7 +84,7 @@ window.__ModuleLoader__.load({
44
84
  .capital-config-plugin-link { border-radius: var(--dsw-radius-sm); width: 24px; height: 24px; color: var(--dsw-alias-label-tertiary); justify-content: center; align-items: center; display: inline-flex; text-decoration: none; }
45
85
  .capital-config-plugin-link:hover { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }
46
86
  .capital-config-plugin-link:focus-visible { outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary)); outline-offset: 1px; }
47
- `,document.head.appendChild(i),()=>i.remove()}var C=class{constructor(e,a){this.scope=e,this.ctx=a,this.status=le(),this.localFetchWriting=!1,this.localFetchFailed=!1,this.selectedSkillWriting=new Set,this.selectedSkillFailed=new Set,this.model=new X(e,[],p.map(s=>({field:s,write:n=>this.writeKey(s,n)}))),this.store=this.model.bind(()=>this.projection()),this.unsubscribe=e.subscribe(()=>{this.refreshRefs(),this.store.set(this.projection()),this.readCredentials()}),this.refreshRefs(),this.readCredentials()}dispose(){this.unsubscribe?.(),this.model.dispose()}projection(){let e=this.scope.getSnapshot();return{...this.model.shell(),...Object.fromEntries(p.map(a=>[a,{...this.model.field(a),configured:this.status[a].configured,writable:this.status[a].writable}])),localFetch:{on:e.value?.retriever?.localFetch?.enabled!==!1,writing:this.localFetchWriting,failed:this.localFetchFailed},selectedSkills:Object.fromEntries(z.map(a=>[a,{on:e.value?.selectedSkills?.[a]===!0,writing:this.selectedSkillWriting.has(a),failed:this.selectedSkillFailed.has(a)}]))}}refreshRefs(){let e=this.scope.getSnapshot();for(let a of p){let s=re(e,a);this.status[a].ref!==s&&(this.status[a]={ref:s,configured:!1,writable:!0},this.model.edit(a,""))}}async readCredentials(){let e=p.map(a=>this.status[a].ref);try{let a=await this.ctx.remote.credentials.describe(e);if(!a?.ok||p.some((n,o)=>e[o]!==this.status[n].ref))return;let s=a.value??{};for(let n of p){let o=this.status[n],c=s[o.ref];c!==void 0&&(this.status[n]={ref:o.ref,configured:c.configured===!0,writable:c.writable!==!1})}this.store.set(this.projection())}catch{}}refresh(e){p.some(a=>e===this.status[a].ref)&&this.readCredentials()}async writeKey(e,a){try{return await this.ctx.remote.credentials.set(this.status[e].ref,a.trim()),await this.readCredentials(),this.status[e].configured===!0}catch{return!1}}async toggleLocalFetch(e){if(this.localFetchWriting)return;let a=this.scope.getSnapshot();if(a.status!=="ready"||!a.writable)return;this.localFetchWriting=!0,this.localFetchFailed=!1,this.store.set(this.projection());try{await this.scope.mutate([{op:"set",path:["retriever","localFetch","enabled"],value:e}])}catch{}this.localFetchWriting=!1,this.scope.getSnapshot().value?.retriever?.localFetch?.enabled===e||(this.localFetchFailed=!0),this.store.set(this.projection())}async toggleSelectedSkill(e,a){if(!z.includes(e)||this.selectedSkillWriting.has(e))return;let s=this.scope.getSnapshot();if(s.status!=="ready"||!s.writable)return;this.selectedSkillWriting.add(e),this.selectedSkillFailed.delete(e),this.store.set(this.projection());try{await this.scope.mutate([{op:"set",path:["selectedSkills",e],value:a}])}catch{}this.selectedSkillWriting.delete(e),this.scope.getSnapshot().value?.selectedSkills?.[e]===a||this.selectedSkillFailed.add(e),this.store.set(this.projection())}inject(){return{hooks:{capitalCard:this.store},...this.model.actions(),toggleLocalFetch:e=>this.toggleLocalFetch(e),toggleSelectedSkill:(e,a)=>this.toggleSelectedSkill(e,a)}}};function w({field:i,label:e,hint:a,docsUrl:s,state:n,disabled:o,onEdit:c,t:d}){let f=Y(null),[h,u]=F(null);G(()=>{let m=f.current,l=m?m.querySelector("label"):null;l&&l.parentElement&&u(l.parentElement)},[]);let r=t("a",{href:s,target:"_blank",rel:"noopener noreferrer","aria-label":`${e} ${d("openDocs")}`,"data-capital-config-doc":"true",className:"capital-config-doc-link"},d("openDocs"),t(D,{size:12}));return t("div",{className:"capital-config-secret-row",key:i,ref:f},t(J,{id:`capital-config-${i}-key`,label:e,hint:a,text:n.text,configured:n.configured,stateLabel:n.configured?d("configured"):d("notConfigured"),disabled:o,onEdit:c}),h?V(r,h):r)}function O(){let i=typeof document<"u"?document.documentElement?.lang:"";return typeof i=="string"&&i.toLowerCase().startsWith("en")?"en":"zh"}function de({entry:i,state:e,disabled:a,onChange:s,t:n}){let o=O(),c=i.label[o],d=`https://github.com/${i.owner}/${i.repository}`,[f,h]=F(!1),u=async()=>{let r=globalThis.navigator?.clipboard;if(typeof r?.writeText=="function")try{await r.writeText(i.name),h(!0)}catch{}};return t("div",{className:"capital-config-field"},t("div",{className:"capital-config-switch-row"},t("div",{className:"capital-config-switch-text"},t("div",{className:"capital-config-skill-heading"},t("span",{className:"capital-config-title"},c),t("code",{className:"capital-config-skill-slug"},i.name),e?.on===!0?t("button",{type:"button",className:"capital-config-skill-copy",title:n("selectedSkillsCopyName"),"aria-label":n("selectedSkillsCopyName"),onClick:u},n(f?"selectedSkillsCopied":"selectedSkillsCopyAction")):null),t("p",{className:"capital-config-skill-description"},i.description[o]),t("a",{className:"capital-config-skill-repo",href:d,target:"_blank",rel:"noopener noreferrer",title:n("selectedSkillsOpenRepo")},`${i.owner}/${i.repository}`,t(D,{size:12})),t("div",{className:"capital-config-skill-tags"},i.tags.map(r=>t("span",{key:r,className:"capital-config-skill-tag"},R[o][r]??r)))),t(T,{label:c,checked:e?.on===!0,disabled:a||e?.writing===!0,onChange:s})),e?.failed?t("p",{role:"status",className:"capital-config-write-failed"},n("saveFailed")):null)}function pe(i){let e=i.t,a=i.useCapitalCard(l=>l),s=!a.writable,n=O(),[o,c]=F("all"),d=R[n],f=["all",...Array.from(new Set(x.flatMap(l=>l.tags)))],h=x.filter(l=>o==="all"||l.tags.includes(o)),u=t("section",{className:"capital-config-selected-skills"},t("h5",{className:"capital-config-title"},e("selectedSkillsTitle")),t("div",{className:"capital-config-selected-filter",role:"group","aria-label":e("selectedSkillsFilterLabel")},t("span",{className:"capital-config-selected-filter-label"},e("selectedSkillsFilterLabel")),...f.map(l=>t("button",{key:l,type:"button",className:"capital-config-selected-filter-button","aria-pressed":o===l?"true":"false",onClick:()=>c(l)},d[l]??l))),h.length>0?h.map(l=>t(de,{key:l.key,entry:l,state:a.selectedSkills?.[l.key],disabled:s||a.saving,onChange:H=>i.toggleSelectedSkill(l.key,H),t:e})):t("p",{className:"capital-config-hint"},e("selectedSkillsEmpty"))),r=t(Q,{labels:{unavailable:e("unavailable"),readOnly:e("readOnly"),saveFailed:e("saveFailed"),save:e("save"),saving:e("saving")},state:a,onSave:i.save,onDiscard:i.discard},t(w,{field:"fuyao",label:e("fuyaoLabel"),hint:e("fuyaoHint"),docsUrl:y.fuyao,state:a.fuyao,disabled:s||a.saving||!a.fuyao.writable,onEdit:l=>i.edit("fuyao",l),t:e}),t(w,{field:"anysearch",label:e("anysearchLabel"),hint:e("anysearchHint"),docsUrl:y.anysearch,state:a.anysearch,disabled:s||a.saving||!a.anysearch.writable,onEdit:l=>i.edit("anysearch",l),t:e}),t(w,{field:"wind",label:e("windLabel"),hint:e("windHint"),docsUrl:y.wind,state:a.wind,disabled:s||a.saving||!a.wind.writable,onEdit:l=>i.edit("wind",l),t:e}),t(w,{field:"paddleocr",label:e("paddleocrLabel"),hint:e("paddleocrHint"),docsUrl:y.paddleocr,state:a.paddleocr,disabled:s||a.saving||!a.paddleocr.writable,onEdit:l=>i.edit("paddleocr",l),t:e})),m=t("div",{className:"capital-config-field"},t("div",{className:"capital-config-switch-row"},t("div",{className:"capital-config-switch-text"},t("span",{className:"capital-config-switch-label"},e("localFetchLabel")),t("p",{className:"capital-config-hint"},e("localFetchHint"))),t(T,{label:e("localFetchLabel"),checked:a.localFetch?.on!==!1,disabled:s||a.saving||a.localFetch?.writing===!0,onChange:i.toggleLocalFetch})),a.localFetch?.failed?t("p",{role:"status",className:"capital-config-write-failed"},e("saveFailed")):null);return t("div",{className:"capital-config-card"},t("h4",{className:"capital-config-title"},e("title")),r,a.available?m:null,a.available?u:null)}var he={github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",npm:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"};function _({kind:i,href:e,label:a}){return t("a",{className:"capital-config-plugin-link",href:e,target:"_blank",rel:"noopener noreferrer","aria-label":a,title:a,"data-capital-plugin-link":i},t("svg",{viewBox:"0 0 24 24",width:16,height:16,fill:"currentColor","aria-hidden":"true",focusable:"false"},t("path",{d:he[i]})))}function fe({subject:i,t:e}){return i?.kind!=="bundle"||i.pkg?.name!==L?null:t("span",{className:"capital-config-plugin-links"},t(_,{kind:"github",href:Z,label:e("githubLabel")}),t(_,{kind:"npm",href:ee,label:e("npmLabel")}))}function ue(i){i.effect(ce,"capital-config: styles"),i.effect(()=>i.locale.register(S,{zh:ne,en:oe}),"capital-config: dictionaries");let e=new C(i.configForms.get(v),i);i.effect(()=>()=>e.dispose(),"capital-config: form subscription"),i.effect(()=>i.remote.$on("credentials/reference-updated",a=>e.refresh(a)),"capital-config: credential invalidations"),i.effect(()=>i.configForms.whileServed([v],()=>i.slots.inject("plugins.bundle.config",()=>i.slots.register({name:"plugins.bundle.config",key:L,locale:S,inject:()=>e.inject()},pe))),"capital-config: page"),i.effect(()=>i.slots.inject(A,()=>i.slots.register({name:A,id:`${v}-plugin-links`,locale:S},fe)),"capital-config: plugin links"),i.logger?.info?.("capital-config: settings card + \u6807\u9898\u5916\u94FE mounted")}exports.name="capital-config";exports.inject=["slots","locale","remote","remote.credentials","configForms"];exports.apply=ue;
87
+ `,document.head.appendChild(t),()=>t.remove()}var P=class{constructor(e,i){this.scope=e,this.ctx=i,this.status=xe(),this.localFetchWriting=!1,this.localFetchFailed=!1,this.selectedSkillWriting=new Set,this.selectedSkillFailed=new Set,this.bundleRows=null,this.rowsRequested=!1,this.rowsInFlight=!1,this.model=new ue(e,[],f.map(n=>({field:n,write:l=>this.writeKey(n,l)}))),this.store=this.model.bind(()=>this.projection()),this.unsubscribe=e.subscribe(()=>{this.refreshRefs(),this.store.set(this.projection()),this.readCredentials()}),this.refreshRefs(),this.readCredentials()}dispose(){this.unsubscribe?.(),this.model.dispose()}projection(){let e=this.scope.getSnapshot();return{...this.model.shell(),...Object.fromEntries(f.map(i=>[i,{...this.model.field(i),configured:this.status[i].configured,writable:this.status[i].writable}])),localFetch:{on:e.value?.retriever?.localFetch?.enabled!==!1,writing:this.localFetchWriting,failed:this.localFetchFailed},selectedSkills:Object.fromEntries($.map(i=>[i,{on:e.value?.selectedSkills?.[i]===!0,writing:this.selectedSkillWriting.has(i),failed:this.selectedSkillFailed.has(i)}])),components:{count:this.bundleRows}}}refreshRefs(){let e=this.scope.getSnapshot();for(let i of f){let n=Ee(e,i);this.status[i].ref!==n&&(this.status[i]={ref:n,configured:!1,writable:!0},this.model.edit(i,""))}}async readCredentials(){let e=f.map(i=>this.status[i].ref);try{let i=await this.ctx.remote.credentials.describe(e);if(!i?.ok||f.some((l,o)=>e[o]!==this.status[l].ref))return;let n=i.value??{};for(let l of f){let o=this.status[l],r=n[o.ref];r!==void 0&&(this.status[l]={ref:o.ref,configured:r.configured===!0,writable:r.writable!==!1})}this.store.set(this.projection())}catch{}}refresh(e){f.some(i=>e===this.status[i].ref)&&this.readCredentials()}async writeKey(e,i){try{return await this.ctx.remote.credentials.set(this.status[e].ref,i.trim()),await this.readCredentials(),this.status[e].configured===!0}catch{return!1}}async toggleLocalFetch(e){if(this.localFetchWriting)return;let i=this.scope.getSnapshot();if(i.status!=="ready"||!i.writable)return;this.localFetchWriting=!0,this.localFetchFailed=!1,this.store.set(this.projection());try{await this.scope.mutate([{op:"set",path:["retriever","localFetch","enabled"],value:e}])}catch{}this.localFetchWriting=!1,this.scope.getSnapshot().value?.retriever?.localFetch?.enabled===e||(this.localFetchFailed=!0),this.store.set(this.projection())}async toggleSelectedSkill(e,i){if(!$.includes(e)||this.selectedSkillWriting.has(e))return;let n=this.scope.getSnapshot();if(n.status!=="ready"||!n.writable)return;this.selectedSkillWriting.add(e),this.selectedSkillFailed.delete(e),this.store.set(this.projection());try{await this.scope.mutate([{op:"set",path:["selectedSkills",e],value:i}])}catch{}this.selectedSkillWriting.delete(e),this.scope.getSnapshot().value?.selectedSkills?.[e]===i||this.selectedSkillFailed.add(e),this.store.set(this.projection())}async ensureBundleRows(){this.rowsRequested=!0,this.bundleRows===null&&await this.readBundleRows()}invalidateBundleRows(){this.rowsRequested&&this.readBundleRows()}async readBundleRows(){if(this.rowsInFlight)return;this.rowsInFlight=!0;let e=this.bundleRows;try{let i=await this.ctx.remote.pluginManager.listBundles(),n=i?.ok===!0?(i.value??[]).find(l=>l?.name===S):void 0;Array.isArray(n?.rows)&&(e=n.rows.length)}catch{}this.rowsInFlight=!1,e!==this.bundleRows&&(this.bundleRows=e,this.store.set(this.projection()))}inject(){return{hooks:{capitalCard:this.store},...this.model.actions(),toggleLocalFetch:e=>this.toggleLocalFetch(e),toggleSelectedSkill:(e,i)=>this.toggleSelectedSkill(e,i),ensureBundleRows:()=>this.ensureBundleRows()}}};function L({field:t,label:e,hint:i,docsUrl:n,state:l,disabled:o,onEdit:r,t:h}){let m=j(null),[g,y]=b(null);N(()=>{let c=m.current,u=c?c.querySelector("label"):null;u&&u.parentElement&&y(u.parentElement)},[]);let k=a("a",{href:n,target:"_blank",rel:"noopener noreferrer","aria-label":`${e} ${h("openDocs")}`,"data-capital-config-doc":"true",className:"capital-config-doc-link"},h("openDocs"),a(W,{size:12}));return a("div",{className:"capital-config-secret-row",key:t,ref:m},a(pe,{id:`capital-config-${t}-key`,label:e,hint:i,text:l.text,configured:l.configured,stateLabel:l.configured?h("configured"):h("notConfigured"),disabled:o,onEdit:r}),g?ce(k,g):k)}function G(){let t=typeof document<"u"?document.documentElement?.lang:"";return typeof t=="string"&&t.toLowerCase().startsWith("en")?"en":"zh"}var R=new Map,O=new Map;function Le(t){return`${Se}/${encodeURIComponent(t)}.md`}function Ne(t){let e=R.get(t);if(e!==void 0)return Promise.resolve(e);let i=O.get(t);return i===void 0&&(i=fetch(Le(t),{method:"GET",cache:"no-store",credentials:"same-origin"}).then(async n=>{if(!n.ok){let o=await n.json().catch(()=>({})),r=new Error(typeof o?.error=="string"?o.error:`http_${n.status}`);throw r.code=typeof o?.error=="string"?o.error:n.status===401||n.status===403?"unauthorized":"route_missing",r}let l=await n.text();return R.set(t,l),l}).finally(()=>O.delete(t)),O.set(t,i)),i}var Re=1600;function Ae({entry:t,state:e,disabled:i,onChange:n,t:l}){let o=G(),r=t.label[o],h=`https://github.com/${t.owner}/${t.repository}`,m=j(null),[g,y]=b(!1),[k,c]=b(!1),[u,w]=b(null);N(()=>()=>{m.current!==null&&clearTimeout(m.current)},[]);let z=async()=>{await ge(t.name)&&(y(!0),m.current!==null&&clearTimeout(m.current),m.current=setTimeout(()=>y(!1),Re))},x=()=>{if(!(u?.status==="ready"||u?.status==="loading")){if(R.has(t.name)){w({status:"ready",text:R.get(t.name)});return}w({status:"loading"}),Ne(t.name).then(d=>w({status:"ready",text:d}),d=>{globalThis.console?.warn?.(`capital-config: SKILL.md \u539F\u6587\u8BFB\u53D6\u5931\u8D25 ${t.name}: ${String(d?.code??d?.message??d)}`),w({status:"failed",code:d?.code==="route_missing"?"route_missing":"unreadable"})})}},A=u?.status==="ready"?a("pre",{className:"capital-config-skill-doc"},u.text):u?.status==="failed"?a("p",{className:"capital-config-skill-doc-state"},l(u.code==="route_missing"?"selectedSkillsDocStale":"selectedSkillsDocFailed")):a("p",{className:"capital-config-skill-doc-state"},l("selectedSkillsDocLoading"));return a("div",{className:"capital-config-field"},a("div",{className:"capital-config-switch-row"},a("div",{className:"capital-config-switch-text"},a("div",{className:"capital-config-skill-heading"},a("span",{className:"capital-config-title"},r),a("div",{className:"capital-config-skill-actions"},e?.on===!0?a("button",{type:"button",className:"capital-config-skill-action",title:`${l("selectedSkillsCopyName")}: ${t.name}`,"aria-label":`${l("selectedSkillsCopyName")}: ${t.name}`,onClick:z},l(g?"selectedSkillsCopied":"selectedSkillsCopyName")):null,a("button",{type:"button",className:"capital-config-skill-action","aria-label":`${l("selectedSkillsDetail")}: ${t.name}`,"aria-haspopup":"dialog",onPointerEnter:x,onFocus:x,onClick:()=>{x(),c(!0)}},l("selectedSkillsDetail")),a(me,{open:k,onClose:()=>c(!1),title:r,description:t.name,closeLabel:l("selectedSkillsDetailClose"),className:"capital-config-skill-modal",contentClassName:"capital-config-skill-modal-content"},A))),a("p",{className:"capital-config-skill-description"},t.description[o]),a("a",{className:"capital-config-skill-repo",href:h,target:"_blank",rel:"noopener noreferrer",title:l("selectedSkillsOpenRepo")},`${t.owner}/${t.repository}`,a(W,{size:12})),a("div",{className:"capital-config-skill-tags"},t.tags.map(d=>a("span",{key:d,className:"capital-config-skill-tag"},V[o][d]??d)))),a(q,{label:r,checked:e?.on===!0,disabled:i||e?.writing===!0,onChange:n})),e?.failed?a("p",{role:"status",className:"capital-config-write-failed"},l("saveFailed")):null)}function Ie(t){let e=t.t,i=t.useCapitalCard(s=>s),n=!i.writable,l=G(),[o,r]=b("sources"),[h,m]=b("all");N(()=>{t.ensureBundleRows()},[]);let g=()=>new Set(v.filter(s=>i.selectedSkills?.[s.key]?.on===!0).map(s=>s.key)),[y,k]=b(g);N(()=>{i.available&&k(g())},[i.available]);let c=new Map;for(let s of v)for(let p of s.tags)c.set(p,(c.get(p)??0)+1);c.set("all",v.length);let u=["all",...Array.from(c.keys()).filter(s=>s!=="all").sort((s,p)=>c.get(p)-c.get(s))],w=v.filter(s=>h==="all"||s.tags.includes(h)).sort((s,p)=>(y.has(s.key)?0:1)-(y.has(p.key)?0:1)),z=a(de,{labels:{unavailable:e("unavailable"),readOnly:e("readOnly"),saveFailed:e("saveFailed"),save:e("save"),saving:e("saving")},state:i,onSave:t.save,onDiscard:t.discard},a(L,{field:"fuyao",label:e("fuyaoLabel"),hint:e("fuyaoHint"),docsUrl:E.fuyao,state:i.fuyao,disabled:n||i.saving||!i.fuyao.writable,onEdit:s=>t.edit("fuyao",s),t:e}),a(L,{field:"anysearch",label:e("anysearchLabel"),hint:e("anysearchHint"),docsUrl:E.anysearch,state:i.anysearch,disabled:n||i.saving||!i.anysearch.writable,onEdit:s=>t.edit("anysearch",s),t:e}),a(L,{field:"wind",label:e("windLabel"),hint:e("windHint"),docsUrl:E.wind,state:i.wind,disabled:n||i.saving||!i.wind.writable,onEdit:s=>t.edit("wind",s),t:e}),a(L,{field:"paddleocr",label:e("paddleocrLabel"),hint:e("paddleocrHint"),docsUrl:E.paddleocr,state:i.paddleocr,disabled:n||i.saving||!i.paddleocr.writable,onEdit:s=>t.edit("paddleocr",s),t:e}));if(!i.available)return a("div",{className:"capital-config-card"},z);let x=a("div",{className:"capital-config-field"},a("div",{className:"capital-config-switch-row"},a("div",{className:"capital-config-switch-text"},a("span",{className:"capital-config-switch-label"},e("localFetchLabel")),a("p",{className:"capital-config-hint"},e("localFetchHint"))),a(q,{label:e("localFetchLabel"),checked:i.localFetch?.on!==!1,disabled:n||i.saving||i.localFetch?.writing===!0,onChange:t.toggleLocalFetch})),i.localFetch?.failed?a("p",{role:"status",className:"capital-config-write-failed"},e("saveFailed")):null),A=V[l],d=a("div",{className:"capital-config-selected-filter",role:"group","aria-label":e("selectedSkillsFilterLabel")},...u.map(s=>a("button",{key:s,type:"button",className:"capital-config-selected-filter-button","aria-pressed":h===s?"true":"false",onClick:()=>m(s)},A[s]??s,a("span",{className:"capital-config-selected-filter-count"},String(c.get(s)))))),Y=w.length>0?w.map(s=>a(Ae,{key:s.key,entry:s,state:i.selectedSkills?.[s.key],disabled:n||i.saving,onChange:p=>t.toggleSelectedSkill(s.key,p),t:e})):[a("p",{key:"empty",className:"capital-config-hint"},e("selectedSkillsEmpty"))],Q=v.filter(s=>i.selectedSkills?.[s.key]?.on===!0).length,X=(s,p)=>Number.isInteger(p)?`${s} ${p}`:s,J=[{value:"sources",label:i.dirty?e("titleUnsaved"):e("title")},{value:"skills",label:`${e("selectedSkillsTitle")} ${Q}/${v.length}`},{value:"components",label:X(e("componentsTitle"),i.components?.count)}],I=(s,p)=>a("section",{id:`${_}-${s}-panel`,role:"tabpanel","aria-labelledby":`${_}-${s}`,className:"capital-config-panel","data-capital-config-panel":s,hidden:o!==s},...p);return a("div",{className:"capital-config-card","data-capital-config-tab":o},a(he,{id:_,value:o,options:J,label:e("tabsLabel"),disabled:!1,onChange:s=>{r(s),s==="components"&&t.ensureBundleRows(),s==="skills"&&k(g())}}),I("sources",[z,x]),I("skills",[a("div",{className:"capital-config-selected-layout"},d,a("div",{className:"capital-config-selected-list"},...Y))]),I("components",[a("span",{className:"capital-config-sr-only"},e("componentsHint"))]))}var De={github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",npm:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"};function M({kind:t,href:e,label:i}){return a("a",{className:"capital-config-plugin-link",href:e,target:"_blank",rel:"noopener noreferrer","aria-label":i,title:i,"data-capital-plugin-link":t},a("svg",{viewBox:"0 0 24 24",width:16,height:16,fill:"currentColor","aria-hidden":"true",focusable:"false"},a("path",{d:De[t]})))}function Te({subject:t,t:e}){return t?.kind!=="bundle"||t.pkg?.name!==S?null:a("span",{className:"capital-config-plugin-links"},a(M,{kind:"github",href:fe,label:e("githubLabel")}),a(M,{kind:"npm",href:ye,label:e("npmLabel")}))}function Be(t){t.effect(Fe,"capital-config: styles"),t.effect(()=>t.locale.register(B,{zh:Ce,en:ze}),"capital-config: dictionaries");let e=new P(t.configForms.get(T),t);t.effect(()=>()=>e.dispose(),"capital-config: form subscription"),t.effect(()=>t.remote.$on("credentials/reference-updated",i=>e.refresh(i)),"capital-config: credential invalidations"),t.effect(()=>{let i=()=>e.invalidateBundleRows(),n=[t.remote.$on("plugin-manager/changed",i),t.on("connection/reset",i)];return()=>{for(let l of n)l()}},"capital-config: bundle row invalidations"),t.effect(()=>t.configForms.whileServed([T],()=>t.slots.inject("plugins.bundle.config",()=>t.slots.register({name:"plugins.bundle.config",key:S,locale:B,inject:()=>e.inject()},Ie))),"capital-config: page"),t.effect(()=>t.slots.inject(K,()=>t.slots.register({name:K,id:`${T}-plugin-links`,locale:B},Te)),"capital-config: plugin links"),t.logger?.info?.("capital-config: settings card + \u6807\u9898\u5916\u94FE mounted")}exports.name="capital-config";exports.inject=["slots","locale","remote","remote.credentials","remote.pluginManager","configForms"];exports.apply=Be;
48
88
  return module.exports
49
89
  },
50
90
  })