Commit Graph

252 Commits

Author SHA1 Message Date
mumu
2572eab17d feat: add market light summary to reviews (#1177) 2026-05-02 22:36:12 +08:00
mumu
205795a325 feat: add LLM provider setup templates and presets (#1175)
* feat(issue-1172): dsa-后续开发规划:配置、通知告警、复盘红绿灯、bot-交互与-agent-增

* fix: address review feedback for MiniMax preset and agent timeout test

- Update MiniMax preset to official OpenAI-compatible base URL (api.minimaxi.com/v1)
  and current model examples (MiniMax-M2.7), with official source links in
  .env.example and docs/llm-providers.md.
- Add provenance + LiteLLM compatibility notes and rollback guidance in
  docs/llm-providers.md.
- Fix flaky test_llm_call_receives_remaining_timeout_budget by patching
  src.agent.runner.time.time so the remaining timeout budget is deterministic.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(review-feedback-1175): address latest review comments

* Update LLM provider defaults

* Fix agent model fallback test
2026-05-02 22:19:42 +08:00
mumu
8ca0771908 feat: support custom webhook body templates (#1173) 2026-05-02 17:02:29 +08:00
Alfred
96cc7390f8 fix: quiet LiteLLM debug logs (#1156) (#1159) 2026-04-30 21:53:36 +08:00
mumu
375eca0f74 Fix agent fallback, portfolio pricing, and task queue tests (#1144) 2026-04-28 23:00:32 +08:00
Jonty Wang
07b4fe5795 feat: Add Hong Kong market support (#1068)
* fix: update report title from 'A股智能分析报告' to '股票智能分析报告'

* feat: add support for Hong Kong market in market review and analysis features

* fix: update daily_analysis workflow name and adjust region check in market analyzer

* fix: enhance market region handling in run_market_review and compute_effective_region functions

* test: add Hong Kong market support in MarketReviewLocalizationTestCase

* fix: update market review region handling to include Hong Kong support in documentation and logic

* fix: update daily_analysis workflow name to Chinese and adjust Hong Kong index symbols in yfinance_fetcher

* fix: refactor market review execution to use run_market_review for improved handling

* fix: implement trading day filtering in MarketCommand to skip reviews on market holidays

* fix: update changelog and README to reflect market command enhancements and support for multiple regions

* fix: update YfinanceFetcher to include HK index symbol mappings for improved data retrieval

Co-authored-by: Jonty <jonty.wang@hk.com.sg>
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-04-28 22:25:29 +08:00
zhulinsen
c3d07ceb87 release: prepare v3.14.0 2026-04-26 21:57:09 +08:00
Alfred
9a08ba47fa [fix][feat] #1108 #1109: 同步 DeepSeek V4 渠道配置 (#1110)
* fix: align DeepSeek V4 channel config

* fix: preserve DeepSeek legacy default

---------

Co-authored-by: zhulinsen <zhuls97@163.com>
2026-04-25 18:50:42 +08:00
mumu
e480fccf50 docs: streamline README documentation (#1120)
* docs: streamline readme documentation
2026-04-25 18:17:22 +08:00
Alfred
4628cb5cf6 feat: cache agent data tool results (#1117) 2026-04-25 10:24:34 +08:00
zhulinsen
a58556585f chore(release): consolidate docker publish workflows and fix desktop log encoding
- Docker release workflow now pushes to both GHCR and Docker Hub (gated on DOCKERHUB_TOKEN and DOCKERHUB_USERNAME secrets), and builds linux/amd64 + linux/arm64.
- Manual publish workflow renamed, gains concurrency guard, input validation, pre-publish smoke, and a safer default tag (v1.0.0 instead of latest).
- Windows desktop backend log lines are decoded as streaming UTF-8 with a GBK fallback when replacement chars appear; PYTHONIOENCODING=utf-8 and python -X utf8 are injected to match.
- Docs: publish official image registries, direct docker run usage, and .env/volume mapping guidance; EN compose example synced with the real docker/docker-compose.yml layout.
- CHANGELOG updated under [Unreleased] in flat format.
2026-04-22 23:05:57 +08:00
mumu
04933583a9 fix: inject REPORT_LANGUAGE into workflow and add current_price to status API (#1013, #983) (#1028)
* fix: inject REPORT_LANGUAGE into workflow and add current_price to status API (#1013, #983)
* fix: preserve status API snapshot change pct fallbacks
* fix: keep status change pct scoped to intraday data
2026-04-10 20:36:28 +08:00
jiangmin168168
bfa7b8cd89 Feat/tushare增加港股查询支持 (#994) 2026-04-08 23:03:14 +08:00
Tom
abde35bbf9 集成Anspire search (#982)
* 集成Anspire search

* fix: add anspire_api_keys to config and handle safely

* fix: add anspire_api_keys to config and handle safely

* 修改单元测试文件、硬编码问题、systemConfigI18n描述

---------

Co-authored-by: xiaowei <4775987@qq.com>
2026-04-07 12:01:39 +08:00
mumu
e8f76b4397 fix: wrap optional pipeline services in try/except for graceful degradation (#1004)
* fix: wrap optional pipeline services in try/except for graceful degradation

SearchService and SocialSentimentService init failures previously crashed
the entire StockAnalysisPipeline constructor, preventing any analysis from
running even when search/sentiment is non-essential.

Changes:
- Wrap SearchService init in try/except, fallback to None on failure
- Wrap SocialSentimentService init in try/except, fallback to None on failure
- Add null-safety guards at all 5 downstream call sites
- Upgrade progress callback log from debug to warning for better visibility
2026-04-05 10:26:06 +08:00
mumu
e8862d5331 feat: 让普通股票分析链路在尽量不破坏现有接口契约的前提下支持 LiteLLM 流式输出… (#865) (#924) 2026-04-04 14:16:51 +08:00
mumu
84c999407e fix: 修复 SQLite 写入链路逐行更新导致的锁竞争与性能问题 (#878) (#927)
* fix(issue-878): [bug]-修复-sqlite-写入链路逐行更新导致的锁竞争与性能问题
2026-04-04 10:18:51 +08:00
mumu
672ed9b245 refactor: 优化飞书配置和文档 (#832) (#920) 2026-04-03 22:25:50 +08:00
Rules
dd89d06a7d feat:修复美股数据丢失,新增长桥数据源 (#981)
* fix:新增长桥数据源,补充美港股数据

* ci: Actions 注入 LONGBRIDGE_* 环境变量并增加数据源检查;full-guide 补充 CI 配置说明

Made-with: Cursor

* fix:长桥参数初始化时机调整

* fix:添加长桥初始化调试日志

* fix:调整数据源优先级

* Update tests/test_search_searxng.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update data_provider/base.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update data_provider/longbridge_fetcher.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/README_CHT.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/README_EN.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/README_EN.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/README_CHT.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(longbridge): 使用 get_config() 替代不存在的 config 导入(_is_available)

* fix:CHANGELOG、联调脚本重命名、繁中 README 英文链接、PRINT_QUOTE_PACKAGES 默认值已对齐。

* fix:调整审核中的问题

---------

Co-authored-by: xuxiong <xiong.xu@xsgames.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-02 23:05:08 +08:00
mumu
65fe0446aa feat: 隐藏 LiteLLM 实现细节,简化用户侧模型接入体验 (#875) (#925)
* chore(issue-875): [feature]-隐藏-litellm-实现细节,简化用户侧模型接入体验
2026-04-01 16:02:07 +08:00
mumu
a3a820db83 fix: 为 Discord Webhook 请求补充签名验证 (#896) (#934)
* fix(issue-896): [bug]-为-discord-webhook-请求补充签名验证
2026-04-01 11:43:32 +08:00
mumu
ee64365e99 fix: 在不修改 GitHub Actions workflow 的前提下… (#860) (#931)
* fix(issue-860): [bug]-stock_group-/-email_group-的设置在gith

* fix(review-feedback-931): address latest review comments

* fix(review-feedback-931): address latest review comments

* fix(review-feedback-931): address latest review comments
2026-04-01 11:34:27 +08:00
mumu
87d60e9daa fix: 修复断点续传按自然日判断数据存在性的逻辑 (#880) (#900)
* fix(issue-880): [bug]-修复断点续传按自然日判断数据存在性的逻辑

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix: remove transient pr draft from pr-900

* fix(review-feedback-900): address latest review comments

* fix(review-feedback-900): address latest review comments

* fix(issue-880): [bug]-修复断点续传按自然日判断数据存在性的逻辑

* fix(review-feedback-900): address latest review comments

---------

Co-authored-by: AutoCode Bot <autocode@example.com>
2026-04-01 11:22:17 +08:00
mumu
2134b47c3f fix: 修复 WebUI 修改 SCHEDULE_TIME 后运行中的本地内置调度器仍固定在… (#819) (#914)
* fix(issue-819): [bug]

* fix(review-feedback-914): address latest review comments

* fix(review-feedback-914): address latest review comments

* fix(review-feedback-914): address latest review comments

* fix(review-feedback-914): address latest review comments
2026-03-31 18:46:26 +08:00
mumu
a151a9e57a fix(issue-796): [bug]-docker方式部署不能打开web页面 (#906) 2026-03-29 10:13:30 +08:00
Sebastion
b81bf2bb6a fix(auth): use rightmost X-Forwarded-For entry to prevent rate-limit bypass (CWE-345) (#841)
* fix(auth): use rightmost X-Forwarded-For entry to prevent rate-limit bypass (CWE-345)

When TRUST_X_FORWARDED_FOR=true, get_client_ip() previously took the
leftmost (index [0]) entry from the X-Forwarded-For header. An attacker
can inject arbitrary leftmost values to rotate rate-limit buckets and
bypass brute-force protection on the login endpoint.

Change to [-1] (rightmost entry) which is the IP appended by the trusted
reverse proxy and cannot be controlled by the attacker.

* fix: address review feedback — add CHANGELOG entry, update deployment docs for XFF trust scope

* fix: move CHANGELOG entry from [3.10.1] to [Unreleased] section

* fix: align .env.example TRUST_X_FORWARDED_FOR comment with single-proxy security semantics

---------

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-26 23:08:26 +08:00
zhulinsen
d23e53f0c2 release: prepare v3.10.0 2026-03-24 22:16:23 +08:00
Alfred
e1dbee3318 feat: 在个股分析页展示个股所属板块及其与当日板块强弱的关系 (#669) (#800)
* feat: show related boards in stock reports (#669)

* fix: preserve unavailable related board states

---------

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-22 20:52:40 +08:00
Xinyao Qiu
14d3b746fe feat: add Slack as a first-class notification channel (#747)
* feat: add Slack as a first-class notification channel

* fix: guard Slack image delivery with _should_use_image_for_channel()

* fix: require SLACK_CHANNEL_ID in workflow config check

* docs: add Slack channel entry to CHANGELOG and fix README_CHT nav link

* fix: use Slack new file upload API for image delivery

* fix: update Slack image test for new upload API, add slack to md2img example

* fix: send raw bytes to Slack upload URL and unify bot/webhook precedence

* docs: unify Slack Bot > Webhook precedence across all docs

* docs: add Slack config entries and setup guide to full-guide (zh/en)

Add SLACK_BOT_TOKEN, SLACK_CHANNEL_ID, SLACK_WEBHOOK_URL rows to both
config tables (GitHub Actions + local run) and a dedicated Slack setup
section with Bot-first precedence, mirroring the existing Discord
section structure. Applied to both full-guide.md and full-guide_EN.md.

* feat: register Slack config fields in config_registry for Web settings

Add SLACK_BOT_TOKEN, SLACK_CHANNEL_ID, SLACK_WEBHOOK_URL to
_FIELD_DEFINITIONS (display_order 36-38, between Discord and Pushover)
so /api/v1/system/config/schema and the Web settings page can expose
them. Add SLACK to _infer_category() notification prefix list.

New test file test_config_registry.py (6 cases) verifies field
registration, sensitivity flags, display ordering, and schema response
inclusion — prevents future channels from shipping without UI exposure.

* fix: use password control for SLACK_WEBHOOK_URL to prevent plaintext leak

SLACK_WEBHOOK_URL was marked is_sensitive=True but ui_control was text,
inconsistent with DISCORD_WEBHOOK_URL and other sensitive Webhook fields.
The Web settings page would display the URL in plaintext.

Also added a registry-wide regression test: any is_sensitive field must
use ui_control=password, preventing future channels from repeating this.
2026-03-20 11:41:09 +08:00
Alfred
590a61f033 fix: clarify disabled portfolio FX refresh state (#772) (#778) 2026-03-19 23:00:58 +08:00
mumu
ef328e906b feat: add configurable report language (#764)
* feat: add configurable report language

* Fix review follow-ups for history and fallback localization

* fix: prefer .env report language at startup

* fix: address report language review feedback

* fix: address latest report language review feedback
2026-03-19 22:55:17 +08:00
Alfred
255c2bc022 fix: 在持仓管理页面的「汇率状态」卡片旁增加「刷新汇率」按钮 (#748) (#770)
* fix: add manual FX refresh on portfolio page

* fix: delay FX feedback until snapshot reload completes

---------

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-19 20:13:44 +08:00
Alfred
3eabeda06c feat: 支持 SearXNG 公共实例自动发现与受控轮询 (#752) (#769)
* feat: support SearXNG public instance discovery (#752)

* fix: back off cold-start failures for public searxng (#752)
2026-03-19 12:40:21 +08:00
Alfred
38d7ab5b5a docs: add Ollama local model configuration guide (Fixes #690) (#744)
* docs: add Ollama local model configuration guide (Fixes #690)

- Add Example 4 and channel mode example in LLM_CONFIG_GUIDE
- Add OLLAMA_API_BASE to .env.example and full-guide
- Add Ollama entry to litellm_config.example.yaml
- Add Q12b to FAQ (CN/EN)
- Add troubleshooting row for Ollama 404 / api/generate/api/show
- Update CHANGELOG

Made-with: Cursor

* docs: sync README with Ollama config per AGENTS.md (address review)

- Add Ollama to AI models list in README.md
- Add OLLAMA_API_BASE to Secrets table with link to config guide
- Add pitfall note: do not use OPENAI_BASE_URL for Ollama
- Sync docs/README_EN.md with same changes
- Update CHANGELOG to mention README sync

Made-with: Cursor

* docs: add OLLAMA_API_BASE to full-guide env table and note (address review)

* docs: remove duplicate OLLAMA_API_BASE entries in full-guide (address review)
2026-03-18 22:37:52 +08:00
Alfred
905b366ef1 feat: integrate TickFlow market review enhancement (#632) (#745)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-18 19:19:08 +08:00
Alfred
f57f21fdaa fix: 串行化持仓账本写入以消除并发超售窗口 (#742) (#743)
* fix: serialize portfolio ledger writes to close oversell race

* test: cover busy responses for portfolio event APIs

---------

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-18 19:10:15 +08:00
Alfred
216a77f6a2 fix: decouple agent and analysis primary models (#692) (#741)
* fix #692: decouple agent and analysis primary model selection

* fix #692: preserve yaml alias for agent primary model

* docs #692: sync agent primary model in EN/CHT readmes
2026-03-18 19:08:36 +08:00
Alfred
274720234a fix: add A-share financial/dividend context outputs (#710) (#731)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-17 21:38:31 +08:00
Alfred
2b8518d808 fix: 修复持仓超售校验与错误流水恢复 (#718) (#720)
* fix: close portfolio oversell recovery gap

* fix: preserve duplicate sell conflict semantics
2026-03-17 21:28:44 +08:00
Gu Jiacheng
0f1aefa1fc feat:增加tushare筹码分析接口、行业板块接口 (#717)
* feat:增加tushare筹码分析接口、行业板块接口

* -fix 多余改动

* - fix 删除多余提交

* - docs 补充描述
2026-03-17 21:25:56 +08:00
Alfred
eaa25f8a26 [#697] fix: 新闻时效硬过滤与策略分窗 (#707)
* fix: enforce strict news freshness windows (#697)

* fix: normalize timezone-aware publish date parsing (#697)

* fix: align analyzer news window with runtime pipeline config (#697)
2026-03-16 22:40:45 +08:00
Alfred
e861ea4d31 [docs] 云服务器 Web 界面访问指南 Issue #686 (#702)
* docs: add cloud server WebUI deployment guide (Fixes #686)

* docs: fix --webui schedule claim per Codex review (P1)
2026-03-16 22:03:11 +08:00
mumu
d42952ef5e Improve analysis API async contracts and startup helpers (#656)
* Improve analysis API async contracts and startup helpers

* Fix rebased analysis API contract regressions

* fix: align frontend report type union with full responses
2026-03-15 20:54:04 +08:00
Alfred
631bc820c5 [#627][PR4] 持仓管理P0:补全功能漏洞与缺失 (#677)
* feat(portfolio): implement P0 PR1 core ledger and snapshot

* feat(portfolio): implement PR2 import and risk loop

* feat(portfolio): deliver PR3 web and agent consumption loop

* fix(portfolio): finalize PR3 follow-up adjustments

* docs: clarify portfolio env section as P0

* feat(portfolio): close PR4 gaps for account workflow

* fix(portfolio): preserve csv code zeros and dry-run dedup

* fix(portfolio): align account contract and shared parser registry

* fix(portfolio): refine import dedup and local date defaults

---------

Co-authored-by: zhulinsen <zhuls97@163.com>
2026-03-15 20:19:11 +08:00
Xavier Zhou
7b7eff7187 fix: support legacy Discord channel env alias and align docs (#659) 2026-03-15 19:09:14 +08:00
Alfred
99fa425777 [docs] add openclaw skill integration guide Issue #615 (#640)
* docs: add openclaw skill integration guide (#615)

* docs: fix auth guidance and use DSA_BASE_URL placeholder in Agent curl example

---------

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-13 23:01:09 +08:00
Alfred
8cfcf7f6ef [Feature] [P0] 基本面数据管道程序化改造 Issue #614 (#626)
* fix: stabilize P0 fundamental context pipeline (#614)

* test: mock fundamental bundle for ETF context stability

* fix: preserve remaining budget and lock fundamental cache

* fix: harden adapter row matching and bound timeout workers

* fix: refine fundamental status semantics and dragon tiger completion

* test: cover get_stock_info board semantics contract

* docs: clarify board field contract in fundamental outputs

* fix: normalize belong board metadata keys across payload shapes

* fix: harden valuation status and scope fundamental cache keys

* fix: align belong board dict aliases with dataframe normalization

---------

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-13 16:36:52 +08:00
Alfred
021d738570 fix(actions): make ENABLE_CHIP_DISTRIBUTION configurable via vars/secrets (Fixes #617) (#618)
- Replace hardcoded 'false' with vars.ENABLE_CHIP_DISTRIBUTION || secrets.ENABLE_CHIP_DISTRIBUTION || 'false'
- Add ENABLE_CHIP_DISTRIBUTION to README and full-guide config tables
- Document that Actions defaults to false; users can set Variable to true for chip data

Made-with: Cursor

Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-03-12 20:51:18 +08:00
Alfred
4608f8f3a6 [feat] 增加 SearXNG支持 Issue #550 (#588)
* feat(search): add SearXNG support as quota-free fallback (Fixes #550)

Made-with: Cursor

* fix(pr-588): address Copilot review - test robustness, config urlparse, doc typo

- tests: fix flaky published_date assertion; add sleep patch to 3 retry tests; remove unused SearchResult import
- config: replace double urlparse with single-pass loop for SEARXNG_BASE_URLS
- docs: correct SERPAPI_KEYS to SERPAPI_API_KEYS in zeabur-deployment.md

Made-with: Cursor
2026-03-11 13:36:09 +08:00
Alfred
53e3d2dead [Feature] 报告引擎 P0:Schema、模板、完整性校验、Brief 模式、历史对比 (#560) (#561)
* chore(config): add report engine feature flags and template settings

* feat(analyzer): add pydantic schema validation for llm report json

* feat(report): report engine P0 - schema, templates, integrity, brief mode, history comparison

- Pydantic AnalysisReportSchema for LLM JSON validation
- Jinja2 templates (markdown, wechat, brief) with configurable dir
- Content integrity check with retry and placeholder fallback
- Brief mode (REPORT_TYPE=brief) for 3-5 sentence summary
- History comparison service for signal changes across runs
- generate_aggregate_report unified entry, ReportType.from_str(detailed)
- Config: REPORT_TEMPLATES_DIR, REPORT_RENDERER_ENABLED, etc.

Fixes #560
2026-03-09 21:35:55 +08:00