"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
docs: add June 18 news (Research Autopilot Phase 1 + local Data Bridge loader + Discord security notice)
Haozhe Wu84bbf871c575
diff --git a/README.md b/README.mdindex 89a696e0c..afdf8f6ef 100644--- a/README.md+++ b/README.md@@ -50,12 +50,14 @@## 📰 News+- **2026-06-18** 🔬 **Research Autopilot Phase 1 + a local Data Bridge loader, plus a Discord security notice**: Two new agent tools wire the **Hypothesis Registry → Research Goal → backtest** path end to end — `run_research_autopilot` turns a `hypothesis_id` into a research goal (thesis as objective, backtest-relevant acceptance criteria, next-step hints), and `generate_backtest_config` auto-writes a backtest `config.json` from the hypothesis's universe and data sources, so the agent can go straight from idea → `signal_engine.py` → run (**50 tools** now) ([#260](https://github.com/HKUDS/Vibe-Trading/pull/260), thanks @Robin1987China). A new **`local` data loader** reads OHLCV straight from your own **CSV / Parquet / DuckDB** files: map symbols to files in `~/.vibe-trading/data-bridge/config.yaml` and prefix a symbol with `local:` to route it to your data, with normal fallback-chain support ([#252](https://github.com/HKUDS/Vibe-Trading/pull/252), thanks @Robin1987China). A fast follow-up repaired runtime defects both shipped with — Autopilot never received the host `session_id` (every call errored), `generate_backtest_config` wrote under a run root `safe_run_dir` rejected, and the local loader silently emptied tz-aware inputs on a tz-naive timestamp comparison ([#266](https://github.com/HKUDS/Vibe-Trading/pull/266)). DeepSeek's `DSML`-wrapped tool calls now parse correctly ([#261](https://github.com/HKUDS/Vibe-Trading/issues/261)), the Robinhood OAuth handshake gets a longer init timeout with the MCP `initTimeout` key now documented ([#263](https://github.com/HKUDS/Vibe-Trading/pull/263)), and an identifier-containment hardening wave landed: persistent-memory type validation ([#257](https://github.com/HKUDS/Vibe-Trading/pull/257)), MCP swarm run-id containment ([#258](https://github.com/HKUDS/Vibe-Trading/pull/258)), and a strict `mp_[0-9a-f]{32}` mandate proposal-id format now enforced consistently across the relay, preview, and commit gate ([#256](https://github.com/HKUDS/Vibe-Trading/pull/256), [#264](https://github.com/HKUDS/Vibe-Trading/pull/264)). ⚠️ **Security notice:** the former `discord.gg/2vDYc2w5` community invite now resolves to a server we no longer control that runs a fake Collab.Land wallet-"verification" phishing scam — it has been removed from every README and the issue template, and the **only** official Discord is now the HKUDS community server ([discord.gg/6TdQnT5xcF](https://discord.gg/6TdQnT5xcF)). Vibe-Trading will never ask you to "verify" or connect a crypto wallet.- **2026-06-17** 🧩 **Install compatibility + Opus/Kimi provider fixes**: Baseline `pip install vibe-trading-ai` no longer pulls the optional `pyharmonics` / `ta` dependency chain; harmonic detection now lives behind `vibe-trading-ai[harmonic]` while the bundled detector remains available ([#250](https://github.com/HKUDS/Vibe-Trading/pull/250), closes [#249](https://github.com/HKUDS/Vibe-Trading/issues/249)). The agent loop also avoids assistant-prefill handoff messages rejected by Opus 4.8+, and Kimi/Moonshot can override the client `User-Agent` with `MOONSHOT_USER_AGENT` ([#248](https://github.com/HKUDS/Vibe-Trading/pull/248), closes [#246](https://github.com/HKUDS/Vibe-Trading/issues/246) and [#204](https://github.com/HKUDS/Vibe-Trading/issues/204)); follow-up tests now directly cover background-result and auto-compact handoff paths ([#251](https://github.com/HKUDS/Vibe-Trading/pull/251)).- **2026-06-16** 🛡️ **Security/API hardening + GLM/Zhipu alias**: Settings writes require auth when configured ([#245](https://github.com/HKUDS/Vibe-Trading/pull/245)); API shell-capable tools require explicit `VIBE_TRADING_ENABLE_SHELL_TOOLS=1` opt-in ([#243](https://github.com/HKUDS/Vibe-Trading/pull/243)); local shutdown requires auth when an API key is configured ([#241](https://github.com/HKUDS/Vibe-Trading/pull/241)); and untrusted loopback-looking hosts are rejected instead of treated as local ([#242](https://github.com/HKUDS/Vibe-Trading/pull/242)). Runtime edges also got cleaned up: Web chat syncs completed attempts ([#236](https://github.com/HKUDS/Vibe-Trading/pull/236)), run cards emit strict JSON for non-finite metrics ([#238](https://github.com/HKUDS/Vibe-Trading/pull/238)), malformed `RSSHUB_TIMEOUT_S` / `RSSHUB_FETCH_BUDGET_S` falls back safely ([#240](https://github.com/HKUDS/Vibe-Trading/pull/240)), and ddgs retry fallback is regression-covered ([#239](https://github.com/HKUDS/Vibe-Trading/pull/239)). GLM/Zhipu is now a first-class provider alias with model-name inference ([#247](https://github.com/HKUDS/Vibe-Trading/pull/247), closes [#237](https://github.com/HKUDS/Vibe-Trading/issues/237)).-- **2026-06-15** 🧭 **Web-search resilience + Web UI run-continuity fixes**: `web_search` no longer fails when a single engine is rate-limited — it now queries several free, no-key engines in order (DuckDuckGo, Google, Bing, Brave, Mojeek, Yahoo) with retry/backoff, treats "no results" as an empty answer rather than an error, and returns an actionable message instead of a bare ❌ when every engine is throttled (override the engine list with `VIBE_TRADING_SEARCH_BACKENDS`) ([#232](https://github.com/HKUDS/Vibe-Trading/pull/232), closes [#231](https://github.com/HKUDS/Vibe-Trading/issues/231), thanks @Ethan-sun01). In the Web UI, switching pages during a run no longer freezes it — the chat re-subscribes to the live stream and replays missed progress on return ([#234](https://github.com/HKUDS/Vibe-Trading/pull/234)) — and the Stop button now takes effect mid-stream and between tools instead of only at iteration boundaries ([#235](https://github.com/HKUDS/Vibe-Trading/pull/235)), closing both halves of [#229](https://github.com/HKUDS/Vibe-Trading/issues/229) (thanks @kalkinj). The baostock loader also accepts native `sh.601398` / `sz.000001` codes alongside tushare-style `601398.SH` ([#230](https://github.com/HKUDS/Vibe-Trading/pull/230), thanks @bhlt).<details><summary>Earlier news</summary>+- **2026-06-15** 🧭 **Web-search resilience + Web UI run-continuity fixes**: `web_search` no longer fails when a single engine is rate-limited — it now queries several free, no-key engines in order (DuckDuckGo, Google, Bing, Brave, Mojeek, Yahoo) with retry/backoff, treats "no results" as an empty answer rather than an error, and returns an actionable message instead of a bare ❌ when every engine is throttled (override the engine list with `VIBE_TRADING_SEARCH_BACKENDS`) ([#232](https://github.com/HKUDS/Vibe-Trading/pull/232), closes [#231](https://github.com/HKUDS/Vibe-Trading/issues/231), thanks @Ethan-sun01). In the Web UI, switching pages during a run no longer freezes it — the chat re-subscribes to the live stream and replays missed progress on return ([#234](https://github.com/HKUDS/Vibe-Trading/pull/234)) — and the Stop button now takes effect mid-stream and between tools instead of only at iteration boundaries ([#235](https://github.com/HKUDS/Vibe-Trading/pull/235)), closing both halves of [#229](https://github.com/HKUDS/Vibe-Trading/issues/229) (thanks @kalkinj). The baostock loader also accepts native `sh.601398` / `sz.000001` codes alongside tushare-style `601398.SH` ([#230](https://github.com/HKUDS/Vibe-Trading/pull/230), thanks @bhlt).+- **2026-06-14** 📊 **Per-run token usage + progressive Run Detail charts**: Every agent run now persists provider-reported token usage as a run-scoped `llm_usage.json` — provider/model, aggregate totals, and per-iteration counts — surfaced additively on `/runs/{id}`, so a finished run's token cost stays auditable after the live stream is gone (provider-reported only; no prompt/content capture, no price estimation) ([#223](https://github.com/HKUDS/Vibe-Trading/pull/223), thanks @LemonCANDY42). The Run Detail page no longer loads every symbol's candlesticks up front: the default `/runs/{id}` response is unchanged, but the UI now renders the run summary first and loads each symbol's chart on demand through opt-in `?chart_payload=summary` / `?chart_symbol=` modes, with per-symbol loading state and a load-all-with-progress control ([#225](https://github.com/HKUDS/Vibe-Trading/pull/225), thanks @LemonCANDY42). Two loader fixes close the cycle: yfinance's exclusive `end` boundary no longer drops the final requested trading day — the download now passes `end + 1 day` while cache keys keep the original range ([#226](https://github.com/HKUDS/Vibe-Trading/pull/226), thanks @gyx09212214-prog) — and a malformed `CCXT_TIMEOUT_MS` / `OKX_TIMEOUT_S` value now warns and falls back to its default instead of raising at import and blocking startup ([#227](https://github.com/HKUDS/Vibe-Trading/pull/227), thanks @gyx09212214-prog).- **2026-06-13** ↩️ **Resume a past session by ID from the CLI**: The interactive CLI now prints the session-id on exit, with a copy-paste `vibe-trading resume <session-id>` hint — so locating the trace for a finished run no longer means guessing which folder under `agent/sessions/` is newest by timestamp. The new `vibe-trading resume <session-id>` subcommand reopens that exact session and replays its recent turns into the loop; an unknown id fails fast instead of silently starting a blank session ([#218](https://github.com/HKUDS/Vibe-Trading/pull/218), thanks @zwrong).- **2026-06-12** 🩺 **Provider reliability overhaul — DeepSeek hangs, Kimi access, streaming liveness**: A cluster of provider reports — DeepSeek runs stuck on "Agent is working…" ([#208](https://github.com/HKUDS/Vibe-Trading/issues/208), thanks @XYWOX), `reached max iterations` masking empty model responses ([#203](https://github.com/HKUDS/Vibe-Trading/issues/203), thanks @mojianliang), the UI never recovering after a stall ([#195](https://github.com/HKUDS/Vibe-Trading/issues/195), thanks @mafia23), and Kimi rejecting the client ([#204](https://github.com/HKUDS/Vibe-Trading/issues/204), thanks @liao497) — shared one root: every OpenAI-compatible provider ran through a single shim that applied DeepSeek/Kimi/Gemini quirks globally and silently swallowed stream failures. Provider-specific behavior now lives in an explicit **capability layer** — reasoning capture/replay, Gemini thought signatures, the Kimi `User-Agent`, OpenRouter's reasoning body are each gated to their own provider instead of cross-contaminating. Reasoning-only streams show a live **"Reasoning…"** indicator instead of dead air; a stream failure raises a contextual `provider_stream_error` with one automatic retry for transient resets (deterministic 4xx fail fast) instead of silently falling back to a slow non-streaming call; an empty model response is reported as `empty_model_response` instead of "max iterations"; SSE heartbeats no longer break reconnect replay; and a stuck read-only tool times out instead of hiding behind heartbeats forever. A new **`vibe-trading provider doctor`** prints a redacted provider/model/package/proxy snapshot for one-command triage of environment-side hangs. DeepSeek users can opt into the official native adapter with `pip install "vibe-trading-ai[deepseek]"`, and kimi-k2.x's `temperature=1` requirement is applied automatically — the Kimi path is verified end-to-end against the live API (tool calls + strict multi-turn reasoning replay on `kimi-k2.6`).diff --git a/README_ar.md b/README_ar.mdindex 9e48cb4a6..9666b1164 100644--- a/README_ar.md+++ b/README_ar.md@@ -50,12 +50,14 @@## 📰 الأخبار+- **2026-06-18** 🔬 **المرحلة الأولى من Research Autopilot + محمّل Data Bridge محلي، إضافةً إلى تنبيه أمني بشأن Discord**: تربط أداتان جديدتان للوكيل مسار **Hypothesis Registry → Research Goal → backtest** من طرف إلى طرف — تحوّل `run_research_autopilot` رقم `hypothesis_id` إلى research goal (الأطروحة كهدف، ومعايير قبول موجّهة للـ backtest، وتلميحات للخطوة التالية)، وتكتب `generate_backtest_config` ملف `config.json` للـ backtest تلقائياً من universe ومصادر بيانات الفرضية، فيستطيع الوكيل الانتقال مباشرةً من الفكرة → `signal_engine.py` → التشغيل (الآن **50 أداة**) ([#260](https://github.com/HKUDS/Vibe-Trading/pull/260)، شكراً @Robin1987China). ويقرأ **محمّل البيانات `local`** الجديد بيانات OHLCV مباشرةً من ملفاتك **CSV / Parquet / DuckDB**: اربط الرموز بالملفات في `~/.vibe-trading/data-bridge/config.yaml` وأضف بادئة `local:` للرمز ليُوجَّه إلى بياناتك المحلية، مع دعم سلسلة fallback المعتادة ([#252](https://github.com/HKUDS/Vibe-Trading/pull/252)، شكراً @Robin1987China). وأصلح تتبّع سريع عيوب وقت التشغيل التي رافقت كليهما — لم يكن Autopilot يتلقى `session_id` المضيف (تخفق كل استدعاء)، وكتبت `generate_backtest_config` ضمن جذر run يرفضه `safe_run_dir`، وأفرغ المحمّل المحلي بصمت مدخلات tz-aware عند مقارنة طابع زمني tz-naive ([#266](https://github.com/HKUDS/Vibe-Trading/pull/266)). وتُحلَّل الآن استدعاءات أدوات DeepSeek المغلّفة بـ `DSML` بشكل صحيح ([#261](https://github.com/HKUDS/Vibe-Trading/issues/261))، وحصلت مصافحة Robinhood OAuth على مهلة تهيئة أطول مع توثيق مفتاح إعداد MCP `initTimeout` ([#263](https://github.com/HKUDS/Vibe-Trading/pull/263))، ونزلت دفعة من تقوية احتواء المعرّفات: التحقق من نوع الذاكرة الدائمة ([#257](https://github.com/HKUDS/Vibe-Trading/pull/257))، واحتواء معرّفات تشغيل swarm في MCP ([#258](https://github.com/HKUDS/Vibe-Trading/pull/258))، وفرض صيغة صارمة `mp_[0-9a-f]{32}` لمعرّف mandate proposal-id باتساق عبر relay وpreview وبوابة commit ([#256](https://github.com/HKUDS/Vibe-Trading/pull/256)، [#264](https://github.com/HKUDS/Vibe-Trading/pull/264)). ⚠️ **تنبيه أمني**: دعوة المجتمع القديمة `discord.gg/2vDYc2w5` تشير الآن إلى خادم لم نعد نتحكم به ويُشغّل عملية تصيّد بانتحال "تحقّق" محفظة Collab.Land — أُزيلت من كل ملفات README ومن قالب المشكلات، وأصبح خادم HKUDS المجتمعي ([discord.gg/6TdQnT5xcF](https://discord.gg/6TdQnT5xcF)) هو Discord الرسمي **الوحيد**. لن يطلب منك Vibe-Trading أبداً "التحقّق" من محفظة عملات رقمية أو ربطها.- **2026-06-17** 🧩 **توافق التثبيت + إصلاحات مزوّدي Opus/Kimi**: لم يعد التثبيت الأساسي `pip install vibe-trading-ai` يجلب سلسلة الاعتماد الاختيارية `pyharmonics` / `ta`؛ أصبح كشف الأنماط التوافقية خلف extra باسم `vibe-trading-ai[harmonic]` مع بقاء detector المضمّن متاحاً ([#250](https://github.com/HKUDS/Vibe-Trading/pull/250)، يغلق [#249](https://github.com/HKUDS/Vibe-Trading/issues/249)). ولم يعد Agent loop يرسل رسائل assistant-prefill handoff التي يرفضها Opus 4.8+، كما يمكن لـ Kimi/Moonshot تجاوز `User-Agent` عبر `MOONSHOT_USER_AGENT` ([#248](https://github.com/HKUDS/Vibe-Trading/pull/248)، يغلق [#246](https://github.com/HKUDS/Vibe-Trading/issues/246) و[#204](https://github.com/HKUDS/Vibe-Trading/issues/204))؛ وتغطي اختبارات المتابعة مساري background-result وauto-compact handoff مباشرة ([#251](https://github.com/HKUDS/Vibe-Trading/pull/251)).- **2026-06-16** 🛡️ **تعزيز الأمان/API + alias لـ GLM/Zhipu**: تتطلب كتابات Settings المصادقة عند تفعيلها ([#245](https://github.com/HKUDS/Vibe-Trading/pull/245))؛ وتتطلب أدوات shell-capable في جلسات API تفعيلًا صريحًا عبر `VIBE_TRADING_ENABLE_SHELL_TOOLS=1` ([#243](https://github.com/HKUDS/Vibe-Trading/pull/243))؛ ويتطلب local shutdown المصادقة عند ضبط API key ([#241](https://github.com/HKUDS/Vibe-Trading/pull/241))؛ وتُرفض Host التي تبدو كـ loopback لكنها غير موثوقة بدل معاملتها كمحلية ([#242](https://github.com/HKUDS/Vibe-Trading/pull/242)). كما صُقلت تفاصيل التشغيل: يتزامن Web chat مع المحاولات المكتملة ([#236](https://github.com/HKUDS/Vibe-Trading/pull/236))، وتُصدر run cards صيغة strict JSON للمقاييس غير المنتهية ([#238](https://github.com/HKUDS/Vibe-Trading/pull/238))، وتتراجع قيم `RSSHUB_TIMEOUT_S` / `RSSHUB_FETCH_BUDGET_S` المشوهة بأمان ([#240](https://github.com/HKUDS/Vibe-Trading/pull/240))، وثُبّت fallback إعادة المحاولة في ddgs باختبار انحدار ([#239](https://github.com/HKUDS/Vibe-Trading/pull/239)). وأصبح GLM/Zhipu alias من الدرجة الأولى مع استنتاج اسم النموذج ([#247](https://github.com/HKUDS/Vibe-Trading/pull/247)، يغلق [#237](https://github.com/HKUDS/Vibe-Trading/issues/237)).-- **2026-06-15** 🧭 **متانة بحث الويب + إصلاحات استمرارية التشغيل في واجهة الويب**: لم يعد `web_search` يفشل عند تقييد مزوّد بحث واحد——إذ يستعلم الآن عدة محركات مجانية بلا مفاتيح بالترتيب (DuckDuckGo، Google، Bing، Brave، Mojeek، Yahoo) مع إعادة محاولة/تراجع، ويعامل "لا نتائج" كإجابة فارغة لا كخطأ، ويعيد رسالة قابلة للتنفيذ بدل ❌ مجرّدة عندما تُقيَّد كل المحركات (يمكن تجاوز قائمة المحركات عبر `VIBE_TRADING_SEARCH_BACKENDS`) ([#232](https://github.com/HKUDS/Vibe-Trading/pull/232)، يغلق [#231](https://github.com/HKUDS/Vibe-Trading/issues/231)، شكراً @Ethan-sun01). وفي واجهة الويب، لم يعد تبديل الصفحات أثناء التشغيل يُجمِّده——إذ تعيد المحادثة الاشتراك في البث الحي وتعيد تشغيل التقدّم الفائت عند العودة ([#234](https://github.com/HKUDS/Vibe-Trading/pull/234))——وأصبح زر الإيقاف يسري أثناء البث وبين الأدوات لا عند حدود التكرار فقط ([#235](https://github.com/HKUDS/Vibe-Trading/pull/235))، ما يغلق شِقَّي [#229](https://github.com/HKUDS/Vibe-Trading/issues/229) (شكراً @kalkinj). كما أصبح محمّل baostock يقبل الرموز الأصلية `sh.601398` / `sz.000001` إلى جانب صيغة tushare `601398.SH` ([#230](https://github.com/HKUDS/Vibe-Trading/pull/230)، شكراً @bhlt).<details><summary>أخبار سابقة</summary>+- **2026-06-15** 🧭 **متانة بحث الويب + إصلاحات استمرارية التشغيل في واجهة الويب**: لم يعد `web_search` يفشل عند تقييد مزوّد بحث واحد——إذ يستعلم الآن عدة محركات مجانية بلا مفاتيح بالترتيب (DuckDuckGo، Google، Bing، Brave، Mojeek، Yahoo) مع إعادة محاولة/تراجع، ويعامل "لا نتائج" كإجابة فارغة لا كخطأ، ويعيد رسالة قابلة للتنفيذ بدل ❌ مجرّدة عندما تُقيَّد كل المحركات (يمكن تجاوز قائمة المحركات عبر `VIBE_TRADING_SEARCH_BACKENDS`) ([#232](https://github.com/HKUDS/Vibe-Trading/pull/232)، يغلق [#231](https://github.com/HKUDS/Vibe-Trading/issues/231)، شكراً @Ethan-sun01). وفي واجهة الويب، لم يعد تبديل الصفحات أثناء التشغيل يُجمِّده——إذ تعيد المحادثة الاشتراك في البث الحي وتعيد تشغيل التقدّم الفائت عند العودة ([#234](https://github.com/HKUDS/Vibe-Trading/pull/234))——وأصبح زر الإيقاف يسري أثناء البث وبين الأدوات لا عند حدود التكرار فقط ([#235](https://github.com/HKUDS/Vibe-Trading/pull/235))، ما يغلق شِقَّي [#229](https://github.com/HKUDS/Vibe-Trading/issues/229) (شكراً @kalkinj). كما أصبح محمّل baostock يقبل الرموز الأصلية `sh.601398` / `sz.000001` إلى جانب صيغة tushare `601398.SH` ([#230](https://github.com/HKUDS/Vibe-Trading/pull/230)، شكراً @bhlt).+- **2026-06-14** 📊 **استهلاك التوكنات لكل تشغيل + تحميل رسوم Run Detail عند الطلب**: أصبح كل تشغيل agent يحفظ استهلاك التوكنات المُبلَّغ من المزوّد كملف `llm_usage.json` على مستوى التشغيل——المزوّد/النموذج، والإجماليات التراكمية، والعدّ لكل تكرار——ويُعرَض إضافيًا على `/runs/{id}`، بحيث تبقى تكلفة التوكنات قابلة للتدقيق بعد انتهاء التشغيل واختفاء البث الحي (قيم المزوّد فقط؛ بلا التقاط prompt/محتوى ولا تقدير سعر) ([#223](https://github.com/HKUDS/Vibe-Trading/pull/223)، شكراً @LemonCANDY42). كما لم تعد صفحة Run Detail تُحمّل شموع كل الرموز مقدمًا: تبقى استجابة `/runs/{id}` الافتراضية دون تغيير، لكن الواجهة الآن تعرض ملخّص التشغيل أولًا ثم تُحمّل رسم كل رمز عند الطلب عبر وضعَي `?chart_payload=summary` / `?chart_symbol=` الاختياريين، مع حالة تحميل لكل رمز وزر "تحميل الكل مع شريط تقدّم" ([#225](https://github.com/HKUDS/Vibe-Trading/pull/225)، شكراً @LemonCANDY42). ويُختتم ذلك بإصلاحين في الـ loader: لم تعد حدود `end` الحصرية في yfinance تُسقِط آخر يوم تداول في النطاق المطلوب——إذ يمرّر الاستدعاء الآن `end + يوم واحد` بينما تحتفظ مفاتيح الكاش بالنطاق الأصلي ([#226](https://github.com/HKUDS/Vibe-Trading/pull/226)، شكراً @gyx09212214-prog)——وأصبحت القيمة المُشوَّهة لـ `CCXT_TIMEOUT_MS` / `OKX_TIMEOUT_S` تُصدر تحذيرًا وتعود إلى قيمتها الافتراضية بدل أن ترفع استثناءً عند الـ import وتعطّل الإقلاع ([#227](https://github.com/HKUDS/Vibe-Trading/pull/227)، شكراً @gyx09212214-prog).- **2026-06-13** ↩️ **استئناف جلسة سابقة بالمعرّف من سطر الأوامر**: أصبحت واجهة CLI التفاعلية تطبع session-id عند الخروج، مع تلميح قابل للنسخ `vibe-trading resume <session-id>`——فلم يعد العثور على trace لتشغيل منتهٍ يتطلّب تخمين أي مجلد تحت `agent/sessions/` هو الأحدث زمنياً. الأمر الفرعي الجديد `vibe-trading resume <session-id>` يعيد فتح تلك الجلسة بالذات ويعيد تشغيل أحدث أدوارها في الـ loop؛ والمعرّف غير الموجود يفشل فوراً بدل بدء جلسة فارغة بصمت ([#218](https://github.com/HKUDS/Vibe-Trading/pull/218)، شكراً @zwrong).- **2026-06-12** 🩺 **إصلاح شامل لموثوقية المزوّدين——تعليق DeepSeek، الوصول إلى Kimi، حيوية البث**: مجموعة من البلاغات——تشغيلات DeepSeek عالقة عند "Agent is working…" ([#208](https://github.com/HKUDS/Vibe-Trading/issues/208)، شكرًا @XYWOX)، رسالة `reached max iterations` تخفي استجابات نموذج فارغة ([#203](https://github.com/HKUDS/Vibe-Trading/issues/203)، شكرًا @mojianliang)، واجهة لا تتعافى بعد التوقف ([#195](https://github.com/HKUDS/Vibe-Trading/issues/195)، شكرًا @mafia23)، وKimi يرفض العميل ([#204](https://github.com/HKUDS/Vibe-Trading/issues/204)، شكرًا @liao497)——تشترك في جذر واحد: كل مزوّد متوافق مع OpenAI كان يمر عبر طبقة واحدة تطبّق خصوصيات DeepSeek/Kimi/Gemini عالميًا وتبتلع أخطاء البث بصمت. أصبح السلوك الخاص بكل مزوّد الآن في **طبقة قدرات** صريحة——التقاط/إعادة إرسال reasoning، وتوقيعات Gemini الفكرية، و`User-Agent` الخاص بـ Kimi، وجسم reasoning في OpenRouter، كلٌّ مقيّد بمزوّده ولا يلوّث غيره. تُظهر تدفقات reasoning مؤشر **"Reasoning…"** حيًّا بدل الصمت؛ ويرفع فشلُ البث خطأ `provider_stream_error` سياقيًا مع إعادة محاولة واحدة للانقطاعات العابرة (أخطاء 4xx الحتمية تفشل فورًا) بدل التراجع الصامت إلى استدعاء غير متدفق بطيء؛ وتُشخَّص الاستجابة الفارغة كـ `empty_model_response` بدل "max iterations"؛ ولم تعد نبضات SSE تكسر إعادة التشغيل عند إعادة الاتصال؛ وتنتهي مهلة الأداة القارئة العالقة بدل الاختباء خلف النبضات للأبد. الأمر الجديد **`vibe-trading provider doctor`** يطبع لقطة مموَّهة للمزوّد/النموذج/الحزم/الوكيل لتشخيص التعليق البيئي بأمر واحد. يمكن لمستخدمي DeepSeek تفعيل المحوّل الأصلي الرسمي عبر `pip install "vibe-trading-ai[deepseek]"`، ويُطبَّق متطلب `temperature=1` لنماذج kimi-k2.x تلقائيًا——مسار Kimi مُتحقَّق منه نهايةً إلى نهاية مقابل الـ API الحقيقي (استدعاء أدوات + إعادة إرسال reasoning متعدد الأدوار الصارم على `kimi-k2.6`).diff --git a/README_ja.md b/README_ja.mdindex 8dda2d6ef..9e654bbc9 100644--- a/README_ja.md+++ b/README_ja.md@@ -50,12 +50,14 @@## 📰 ニュース+- **2026-06-18** 🔬 **Research Autopilot 第1フェーズ + ローカル Data Bridge ローダー、加えて Discord セキュリティ通知**:2 つの新しい agent ツールが **Hypothesis Registry → Research Goal → backtest** の経路を端から端までつなぎます——`run_research_autopilot` は `hypothesis_id` を research goal に変換し(テーゼを目的に、backtest 向けの受け入れ基準、次のステップのヒント付き)、`generate_backtest_config` は hypothesis の universe とデータソースから backtest の `config.json` を自動生成するので、agent はアイデア → `signal_engine.py` → 実行まで一直線に進めます(現在 **50 ツール**)([#260](https://github.com/HKUDS/Vibe-Trading/pull/260)、@Robin1987China さんに感謝)。新しい **`local` データローダー**は、自分の **CSV / Parquet / DuckDB** ファイルから直接 OHLCV を読み込みます:`~/.vibe-trading/data-bridge/config.yaml` でシンボルをファイルに対応付け、シンボルに `local:` を前置するとローカルデータへルーティングされ、通常の fallback チェーンにも対応します([#252](https://github.com/HKUDS/Vibe-Trading/pull/252)、@Robin1987China さんに感謝)。直後の追従修正で、両者が抱えていた実行時の欠陥を修正しました——Autopilot はホストの `session_id` を受け取れず(毎回エラー)、`generate_backtest_config` は `safe_run_dir` が拒否する run ルートに書き込み、ローカルローダーは tz-naive なタイムスタンプ比較で tz-aware 入力を黙って空にしていました([#266](https://github.com/HKUDS/Vibe-Trading/pull/266))。DeepSeek の `DSML` でラップされた tool call が正しくパースされるようになり([#261](https://github.com/HKUDS/Vibe-Trading/issues/261))、Robinhood OAuth ハンドシェイクの初期化タイムアウトが延長され、MCP `initTimeout` 設定キーもドキュメント化されました([#263](https://github.com/HKUDS/Vibe-Trading/pull/263))。さらに識別子の封じ込め強化が一括で入りました:永続メモリの型バリデーション([#257](https://github.com/HKUDS/Vibe-Trading/pull/257))、MCP swarm run-id の封じ込め([#258](https://github.com/HKUDS/Vibe-Trading/pull/258))、そして relay・preview・commit ゲート間で一貫して強制される厳格な `mp_[0-9a-f]{32}` mandate proposal-id フォーマット([#256](https://github.com/HKUDS/Vibe-Trading/pull/256)、[#264](https://github.com/HKUDS/Vibe-Trading/pull/264))。⚠️ **セキュリティ通知**:以前の `discord.gg/2vDYc2w5` コミュニティ招待は、現在私たちが管理していないサーバーに解決され、偽の Collab.Land ウォレット「認証」フィッシング詐欺を実行しています——すべての README と issue テンプレートから削除され、**唯一**の公式 Discord は HKUDS コミュニティサーバー([discord.gg/6TdQnT5xcF](https://discord.gg/6TdQnT5xcF))になりました。Vibe-Trading が暗号ウォレットの「認証」や接続を求めることは決してありません。- **2026-06-17** 🧩 **インストール互換性 + Opus/Kimi プロバイダ修正**:通常の `pip install vibe-trading-ai` では、任意機能の `pyharmonics` / `ta` 依存チェーンを引かなくなりました。harmonic detection は `vibe-trading-ai[harmonic]` extra の背後に移しつつ、同梱 fallback detector はそのまま使えます([#250](https://github.com/HKUDS/Vibe-Trading/pull/250)、[#249](https://github.com/HKUDS/Vibe-Trading/issues/249) をクローズ)。Agent loop は Opus 4.8+ が拒否する assistant-prefill handoff message を送らなくなり、Kimi/Moonshot は `MOONSHOT_USER_AGENT` で client `User-Agent` を上書きできます([#248](https://github.com/HKUDS/Vibe-Trading/pull/248)、[#246](https://github.com/HKUDS/Vibe-Trading/issues/246) と [#204](https://github.com/HKUDS/Vibe-Trading/issues/204) をクローズ)。follow-up tests は background-result と auto-compact の handoff 経路を直接カバーします([#251](https://github.com/HKUDS/Vibe-Trading/pull/251))。- **2026-06-16** 🛡️ **セキュリティ/API 強化 + GLM/Zhipu alias**:Settings 書き込みは認証設定時に auth 必須になりました([#245](https://github.com/HKUDS/Vibe-Trading/pull/245));API session の shell-capable tools は明示的な `VIBE_TRADING_ENABLE_SHELL_TOOLS=1` opt-in が必要です([#243](https://github.com/HKUDS/Vibe-Trading/pull/243));API key 設定時の local shutdown も auth 必須です([#241](https://github.com/HKUDS/Vibe-Trading/pull/241));loopback に見えるが信頼できない Host は local 扱いせず拒否します([#242](https://github.com/HKUDS/Vibe-Trading/pull/242))。実行時の細部も改善: Web chat は完了済み attempts と同期し([#236](https://github.com/HKUDS/Vibe-Trading/pull/236))、run card は非有限メトリクスを strict JSON として出力([#238](https://github.com/HKUDS/Vibe-Trading/pull/238))、不正な `RSSHUB_TIMEOUT_S` / `RSSHUB_FETCH_BUDGET_S` は安全に fallback([#240](https://github.com/HKUDS/Vibe-Trading/pull/240))、ddgs retry fallback は regression coverage 付きです([#239](https://github.com/HKUDS/Vibe-Trading/pull/239))。GLM/Zhipu は first-class provider alias となり、model-name inference も追加されました([#247](https://github.com/HKUDS/Vibe-Trading/pull/247)、[#237](https://github.com/HKUDS/Vibe-Trading/issues/237) をクローズ)。-- **2026-06-15** 🧭 **Web 検索の堅牢化 + Web UI のラン継続性修正**:`web_search` は単一エンジンがレート制限されても失敗しなくなりました——複数の無料・キー不要のエンジン(DuckDuckGo、Google、Bing、Brave、Mojeek、Yahoo)を順に照会し、リトライ/バックオフを行い、「結果なし」をエラーではなく空の回答として扱い、すべてのエンジンが制限された場合は素っ気ない ❌ ではなく実行可能なメッセージを返します(エンジン一覧は `VIBE_TRADING_SEARCH_BACKENDS` で上書き可能)([#232](https://github.com/HKUDS/Vibe-Trading/pull/232)、[#231](https://github.com/HKUDS/Vibe-Trading/issues/231) をクローズ、@Ethan-sun01 さんに感謝)。Web UI では、ラン中にページを切り替えても固まらなくなりました——チャットは戻った際にライブストリームへ再購読し、見逃した進捗を再生します([#234](https://github.com/HKUDS/Vibe-Trading/pull/234))——そして停止ボタンはイテレーション境界だけでなく、ストリーミング中やツール間でも有効になりました([#235](https://github.com/HKUDS/Vibe-Trading/pull/235))。これにより [#229](https://github.com/HKUDS/Vibe-Trading/issues/229) の両方が解決します(@kalkinj さんに感謝)。baostock loader は tushare 形式の `601398.SH` に加え、ネイティブの `sh.601398` / `sz.000001` コードも受け付けるようになりました([#230](https://github.com/HKUDS/Vibe-Trading/pull/230)、@bhlt さんに感謝)。<details><summary>過去のニュース</summary>+- **2026-06-15** 🧭 **Web 検索の堅牢化 + Web UI のラン継続性修正**:`web_search` は単一エンジンがレート制限されても失敗しなくなりました——複数の無料・キー不要のエンジン(DuckDuckGo、Google、Bing、Brave、Mojeek、Yahoo)を順に照会し、リトライ/バックオフを行い、「結果なし」をエラーではなく空の回答として扱い、すべてのエンジンが制限された場合は素っ気ない ❌ ではなく実行可能なメッセージを返します(エンジン一覧は `VIBE_TRADING_SEARCH_BACKENDS` で上書き可能)([#232](https://github.com/HKUDS/Vibe-Trading/pull/232)、[#231](https://github.com/HKUDS/Vibe-Trading/issues/231) をクローズ、@Ethan-sun01 さんに感謝)。Web UI では、ラン中にページを切り替えても固まらなくなりました——チャットは戻った際にライブストリームへ再購読し、見逃した進捗を再生します([#234](https://github.com/HKUDS/Vibe-Trading/pull/234))——そして停止ボタンはイテレーション境界だけでなく、ストリーミング中やツール間でも有効になりました([#235](https://github.com/HKUDS/Vibe-Trading/pull/235))。これにより [#229](https://github.com/HKUDS/Vibe-Trading/issues/229) の両方が解決します(@kalkinj さんに感謝)。baostock loader は tushare 形式の `601398.SH` に加え、ネイティブの `sh.601398` / `sz.000001` コードも受け付けるようになりました([#230](https://github.com/HKUDS/Vibe-Trading/pull/230)、@bhlt さんに感謝)。+- **2026-06-14** 📊 **ラン単位のトークン使用量 + Run Detail チャートの遅延読み込み**: 各 agent ランは、プロバイダ報告のトークン使用量をラン単位の `llm_usage.json` として永続化するようになりました——プロバイダ/モデル、累計合計、イテレーションごとの件数——`/runs/{id}` に追加的に提供されるため、ランが終わってライブストリームが消えた後もトークンコストを監査できます(プロバイダ報告値のみ;prompt/内容のキャプチャや価格推定はなし)([#223](https://github.com/HKUDS/Vibe-Trading/pull/223)、@LemonCANDY42 さんに感謝)。Run Detail ページは、もはや全シンボルのローソク足を最初に読み込みません: 既定の `/runs/{id}` レスポンスは変更なしのまま、UI はまずランのサマリーを描画し、オプトインの `?chart_payload=summary` / `?chart_symbol=` モードで各シンボルのチャートをオンデマンドに読み込みます。シンボルごとの読み込み状態と「全件読み込み + 進捗」コントロール付きです([#225](https://github.com/HKUDS/Vibe-Trading/pull/225)、@LemonCANDY42 さんに感謝)。2 つの loader 修正で締めくくり: yfinance の排他的な `end` 境界が、要求範囲の最終取引日を取りこぼさなくなりました——ダウンロード呼び出しは `end + 1 日` を渡し、キャッシュキーは元の範囲を保持します([#226](https://github.com/HKUDS/Vibe-Trading/pull/226)、@gyx09212214-prog さんに感謝)——そして不正な `CCXT_TIMEOUT_MS` / `OKX_TIMEOUT_S` 値は、import 時に例外を投げて起動を妨げる代わりに、警告して既定値にフォールバックするようになりました([#227](https://github.com/HKUDS/Vibe-Trading/pull/227)、@gyx09212214-prog さんに感謝)。- **2026-06-13** ↩️ **CLI からセッションを ID で再開**: インタラクティブ CLI が終了時に session-id を表示し、コピペ可能な `vibe-trading resume <session-id>` のヒントも添えるようになりました——終了したランの trace を探すのに、`agent/sessions/` 配下のどのフォルダがタイムスタンプ的に最新かを当てる必要はもうありません。新しい `vibe-trading resume <session-id>` サブコマンドはその正確なセッションを再び開き、直近のターンを loop に再生します;存在しない id は空のセッションを黙って始めるのではなく即座にエラーで終了します([#218](https://github.com/HKUDS/Vibe-Trading/pull/218)、@zwrong さんに感謝)。- **2026-06-12** 🩺 **プロバイダ信頼性の全面強化——DeepSeek ハング、Kimi 接続、ストリーミング死活**:一連のプロバイダ報告——DeepSeek 実行が「Agent is working…」で停止([#208](https://github.com/HKUDS/Vibe-Trading/issues/208)、@XYWOX さんに感謝)、`reached max iterations` がモデルの空応答を覆い隠す([#203](https://github.com/HKUDS/Vibe-Trading/issues/203)、@mojianliang さんに感謝)、停止後に UI が復帰しない([#195](https://github.com/HKUDS/Vibe-Trading/issues/195)、@mafia23 さんに感謝)、Kimi がクライアントを拒否([#204](https://github.com/HKUDS/Vibe-Trading/issues/204)、@liao497 さんに感謝)——の根因は一つでした:すべての OpenAI 互換プロバイダが単一の shim を共有し、DeepSeek/Kimi/Gemini 固有の挙動をグローバルに適用し、ストリーム失敗を黙って握りつぶしていました。プロバイダ固有の挙動は明示的な**ケイパビリティ層**に移行——reasoning の捕捉/再送、Gemini thought signature、Kimi の `User-Agent`、OpenRouter の reasoning body はそれぞれ自分のプロバイダにのみ適用され、相互汚染しません。reasoning のみのストリームはリアルタイムの**「Reasoning…」**インジケータを表示;ストリーム失敗は文脈付きの `provider_stream_error` を送出し、一時的な切断は 1 回だけ自動リトライ(決定的な 4xx は即時失敗)、遅い非ストリーミング呼び出しへの静かなフォールバックは廃止;モデルの空応答は `empty_model_response` として正しく診断;SSE ハートビートが再接続リプレイを壊さなくなり;スタックした読み取り専用ツールはタイムアウトします。新コマンド **`vibe-trading provider doctor`** は秘匿化済みの provider/モデル/パッケージ/プロキシのスナップショットを出力し、環境起因のハングをワンコマンドで切り分け。DeepSeek は `pip install "vibe-trading-ai[deepseek]"` で公式ネイティブアダプタを選択でき、kimi-k2.x の `temperature=1` 要件は自動適用——Kimi 経路は実 API でエンドツーエンド検証済みです(`kimi-k2.6` のツール呼び出し + 厳格なマルチターン reasoning 再送)。diff --git a/README_ko.md b/README_ko.mdindex 103894c18..77790c438 100644--- a/README_ko.md+++ b/README_ko.md@@ -50,12 +50,14 @@## 📰 뉴스+- **2026-06-18** 🔬 **Research Autopilot 1단계 + 로컬 Data Bridge 로더, 그리고 Discord 보안 공지**: 두 개의 새 agent 도구가 **Hypothesis Registry → Research Goal → backtest** 경로를 끝까지 연결합니다 — `run_research_autopilot`은 `hypothesis_id`를 research goal로 바꾸고(주장을 목표로, backtest 지향 수용 기준, 다음 단계 힌트 포함), `generate_backtest_config`는 hypothesis의 universe와 데이터 소스로부터 backtest `config.json`을 자동 작성하므로, agent가 아이디어 → `signal_engine.py` → 실행까지 곧장 진행할 수 있습니다(이제 **50개 도구**)([#260](https://github.com/HKUDS/Vibe-Trading/pull/260), @Robin1987China 님 감사합니다). 새 **`local` 데이터 로더**는 사용자 본인의 **CSV / Parquet / DuckDB** 파일에서 직접 OHLCV를 읽습니다: `~/.vibe-trading/data-bridge/config.yaml`에서 심볼을 파일에 매핑하고 심볼에 `local:` 접두사를 붙이면 로컬 데이터로 라우팅되며, 일반 fallback 체인도 지원합니다([#252](https://github.com/HKUDS/Vibe-Trading/pull/252), @Robin1987China 님 감사합니다). 직후 후속 수정으로 둘이 함께 들어온 런타임 결함을 고쳤습니다 — Autopilot이 호스트 `session_id`를 받지 못했고(매 호출이 오류), `generate_backtest_config`가 `safe_run_dir`이 거부하는 run 루트에 기록했으며, 로컬 로더가 tz-naive 타임스탬프 비교에서 tz-aware 입력을 조용히 비웠습니다([#266](https://github.com/HKUDS/Vibe-Trading/pull/266)). DeepSeek의 `DSML`로 감싼 tool call이 이제 올바르게 파싱되고([#261](https://github.com/HKUDS/Vibe-Trading/issues/261)), Robinhood OAuth 핸드셰이크의 초기화 타임아웃이 늘어났으며 MCP `initTimeout` 설정 키도 문서화됐습니다([#263](https://github.com/HKUDS/Vibe-Trading/pull/263)). 또한 식별자 봉쇄 강화가 한 번에 들어왔습니다: 영속 메모리 타입 검증([#257](https://github.com/HKUDS/Vibe-Trading/pull/257)), MCP swarm run-id 봉쇄([#258](https://github.com/HKUDS/Vibe-Trading/pull/258)), 그리고 relay·preview·commit 게이트 전반에서 일관되게 강제되는 엄격한 `mp_[0-9a-f]{32}` mandate proposal-id 형식([#256](https://github.com/HKUDS/Vibe-Trading/pull/256), [#264](https://github.com/HKUDS/Vibe-Trading/pull/264)). ⚠️ **보안 공지**: 이전의 `discord.gg/2vDYc2w5` 커뮤니티 초대는 이제 우리가 더 이상 관리하지 않는 서버로 연결되며, 가짜 Collab.Land 지갑 "인증" 피싱 사기를 운영합니다 — 모든 README와 issue 템플릿에서 제거됐고, **유일한** 공식 Discord는 이제 HKUDS 커뮤니티 서버([discord.gg/6TdQnT5xcF](https://discord.gg/6TdQnT5xcF))입니다. Vibe-Trading은 절대 암호화폐 지갑을 "인증"하거나 연결하라고 요구하지 않습니다.- **2026-06-17** 🧩 **설치 호환성 + Opus/Kimi 프로바이더 수정**: 기본 `pip install vibe-trading-ai`는 더 이상 선택 기능인 `pyharmonics` / `ta` 의존성 체인을 끌어오지 않습니다. harmonic detection은 `vibe-trading-ai[harmonic]` extra 뒤로 이동했고, 내장 fallback detector는 그대로 사용할 수 있습니다([#250](https://github.com/HKUDS/Vibe-Trading/pull/250), [#249](https://github.com/HKUDS/Vibe-Trading/issues/249) 종료). Agent loop는 Opus 4.8+가 거부하는 assistant-prefill handoff message를 보내지 않으며, Kimi/Moonshot은 `MOONSHOT_USER_AGENT`로 client `User-Agent`를 덮어쓸 수 있습니다([#248](https://github.com/HKUDS/Vibe-Trading/pull/248), [#246](https://github.com/HKUDS/Vibe-Trading/issues/246) 및 [#204](https://github.com/HKUDS/Vibe-Trading/issues/204) 종료). 후속 테스트는 background-result와 auto-compact handoff 경로를 직접 커버합니다([#251](https://github.com/HKUDS/Vibe-Trading/pull/251)).- **2026-06-16** 🛡️ **보안/API 강화 + GLM/Zhipu alias**: Settings 쓰기는 인증 설정 시 auth가 필요합니다([#245](https://github.com/HKUDS/Vibe-Trading/pull/245)); API session의 shell-capable tools는 명시적인 `VIBE_TRADING_ENABLE_SHELL_TOOLS=1` opt-in이 필요합니다([#243](https://github.com/HKUDS/Vibe-Trading/pull/243)); API key가 설정된 local shutdown도 auth가 필요합니다([#241](https://github.com/HKUDS/Vibe-Trading/pull/241)); loopback처럼 보이지만 신뢰할 수 없는 Host는 local로 취급하지 않고 거부합니다([#242](https://github.com/HKUDS/Vibe-Trading/pull/242)). 런타임 세부도 다듬었습니다: Web chat은 완료된 attempts와 동기화되고([#236](https://github.com/HKUDS/Vibe-Trading/pull/236)), run card는 유한하지 않은 metric을 strict JSON으로 출력하며([#238](https://github.com/HKUDS/Vibe-Trading/pull/238)), 잘못된 `RSSHUB_TIMEOUT_S` / `RSSHUB_FETCH_BUDGET_S`는 안전하게 fallback합니다([#240](https://github.com/HKUDS/Vibe-Trading/pull/240)). ddgs retry fallback도 regression coverage가 추가됐습니다([#239](https://github.com/HKUDS/Vibe-Trading/pull/239)). GLM/Zhipu는 first-class provider alias가 되었고 model-name inference도 추가됐습니다([#247](https://github.com/HKUDS/Vibe-Trading/pull/247), [#237](https://github.com/HKUDS/Vibe-Trading/issues/237) 종료).-- **2026-06-15** 🧭 **웹 검색 견고성 + Web UI 실행 연속성 수정**: `web_search`는 단일 엔진이 레이트리밋되어도 더 이상 실패하지 않습니다——이제 여러 무료·키 불필요 엔진(DuckDuckGo, Google, Bing, Brave, Mojeek, Yahoo)을 순서대로 조회하고 재시도/백오프를 적용하며, "결과 없음"을 오류가 아닌 빈 답변으로 처리하고, 모든 엔진이 제한될 때는 무미건조한 ❌ 대신 실행 가능한 메시지를 반환합니다(엔진 목록은 `VIBE_TRADING_SEARCH_BACKENDS`로 재정의 가능)([#232](https://github.com/HKUDS/Vibe-Trading/pull/232), [#231](https://github.com/HKUDS/Vibe-Trading/issues/231) 종료, @Ethan-sun01 님 감사합니다). Web UI에서는 실행 중 페이지를 전환해도 더 이상 멈추지 않습니다——채팅이 돌아올 때 라이브 스트림에 다시 구독하고 놓친 진행을 재생합니다([#234](https://github.com/HKUDS/Vibe-Trading/pull/234))——그리고 중지 버튼이 이터레이션 경계뿐 아니라 스트리밍 중과 도구 사이에서도 즉시 적용됩니다([#235](https://github.com/HKUDS/Vibe-Trading/pull/235)). 이로써 [#229](https://github.com/HKUDS/Vibe-Trading/issues/229)의 두 증상이 모두 해결됩니다(@kalkinj 님 감사합니다). baostock loader도 tushare 스타일 `601398.SH`와 함께 네이티브 `sh.601398` / `sz.000001` 코드를 받아들입니다([#230](https://github.com/HKUDS/Vibe-Trading/pull/230), @bhlt 님 감사합니다).<details><summary>이전 뉴스</summary>+- **2026-06-15** 🧭 **웹 검색 견고성 + Web UI 실행 연속성 수정**: `web_search`는 단일 엔진이 레이트리밋되어도 더 이상 실패하지 않습니다——이제 여러 무료·키 불필요 엔진(DuckDuckGo, Google, Bing, Brave, Mojeek, Yahoo)을 순서대로 조회하고 재시도/백오프를 적용하며, "결과 없음"을 오류가 아닌 빈 답변으로 처리하고, 모든 엔진이 제한될 때는 무미건조한 ❌ 대신 실행 가능한 메시지를 반환합니다(엔진 목록은 `VIBE_TRADING_SEARCH_BACKENDS`로 재정의 가능)([#232](https://github.com/HKUDS/Vibe-Trading/pull/232), [#231](https://github.com/HKUDS/Vibe-Trading/issues/231) 종료, @Ethan-sun01 님 감사합니다). Web UI에서는 실행 중 페이지를 전환해도 더 이상 멈추지 않습니다——채팅이 돌아올 때 라이브 스트림에 다시 구독하고 놓친 진행을 재생합니다([#234](https://github.com/HKUDS/Vibe-Trading/pull/234))——그리고 중지 버튼이 이터레이션 경계뿐 아니라 스트리밍 중과 도구 사이에서도 즉시 적용됩니다([#235](https://github.com/HKUDS/Vibe-Trading/pull/235)). 이로써 [#229](https://github.com/HKUDS/Vibe-Trading/issues/229)의 두 증상이 모두 해결됩니다(@kalkinj 님 감사합니다). baostock loader도 tushare 스타일 `601398.SH`와 함께 네이티브 `sh.601398` / `sz.000001` 코드를 받아들입니다([#230](https://github.com/HKUDS/Vibe-Trading/pull/230), @bhlt 님 감사합니다).+- **2026-06-14** 📊 **실행 단위 토큰 사용량 + Run Detail 차트 지연 로딩**: 이제 모든 agent 실행은 프로바이더가 보고한 토큰 사용량을 실행 범위의 `llm_usage.json`으로 영속화합니다——프로바이더/모델, 누적 합계, 이터레이션별 카운트——`/runs/{id}`에 추가로 노출되어, 실행이 끝나고 라이브 스트림이 사라진 뒤에도 토큰 비용을 감사할 수 있습니다(프로바이더 보고값만; prompt/내용 캡처나 가격 추정 없음)([#223](https://github.com/HKUDS/Vibe-Trading/pull/223), @LemonCANDY42 님 감사합니다). Run Detail 페이지는 더 이상 모든 심볼의 캔들을 처음부터 불러오지 않습니다: 기본 `/runs/{id}` 응답은 그대로 유지되지만, UI는 먼저 실행 요약을 렌더링한 뒤 옵트인 `?chart_payload=summary` / `?chart_symbol=` 모드로 각 심볼의 차트를 필요할 때 불러옵니다. 심볼별 로딩 상태와 "전체 로드 + 진행률" 컨트롤이 함께 제공됩니다([#225](https://github.com/HKUDS/Vibe-Trading/pull/225), @LemonCANDY42 님 감사합니다). 두 가지 loader 수정으로 마무리: yfinance의 배타적 `end` 경계가 요청 범위의 마지막 거래일을 더 이상 누락하지 않습니다——다운로드 호출은 `end + 1일`을 전달하고 캐시 키는 원래 범위를 유지합니다([#226](https://github.com/HKUDS/Vibe-Trading/pull/226), @gyx09212214-prog 님 감사합니다)——그리고 잘못된 `CCXT_TIMEOUT_MS` / `OKX_TIMEOUT_S` 값은 import 시 예외를 던져 시작을 막는 대신 경고하고 기본값으로 폴백합니다([#227](https://github.com/HKUDS/Vibe-Trading/pull/227), @gyx09212214-prog 님 감사합니다).- **2026-06-13** ↩️ **CLI에서 ID로 과거 세션 재개**: 인터랙티브 CLI가 이제 종료 시 session-id를 출력하고, 복사해 붙여넣을 수 있는 `vibe-trading resume <session-id>` 힌트도 함께 보여줍니다——끝난 실행의 trace를 찾으려고 `agent/sessions/` 아래 어느 폴더가 타임스탬프상 가장 최신인지 추측할 필요가 더는 없습니다. 새 `vibe-trading resume <session-id>` 서브커맨드는 바로 그 세션을 다시 열고 최근 턴들을 loop에 재생합니다; 존재하지 않는 id는 빈 세션을 조용히 시작하는 대신 즉시 오류로 종료합니다([#218](https://github.com/HKUDS/Vibe-Trading/pull/218), @zwrong 님 감사합니다).- **2026-06-12** 🩺 **프로바이더 신뢰성 전면 강화——DeepSeek 행, Kimi 접속, 스트리밍 라이브니스**: 일련의 프로바이더 리포트——DeepSeek 실행이 "Agent is working…"에서 멈춤([#208](https://github.com/HKUDS/Vibe-Trading/issues/208), @XYWOX 님 감사합니다), `reached max iterations`가 모델의 빈 응답을 가림([#203](https://github.com/HKUDS/Vibe-Trading/issues/203), @mojianliang 님 감사합니다), 멈춘 뒤 UI가 복구되지 않음([#195](https://github.com/HKUDS/Vibe-Trading/issues/195), @mafia23 님 감사합니다), Kimi가 클라이언트를 거부([#204](https://github.com/HKUDS/Vibe-Trading/issues/204), @liao497 님 감사합니다)——의 근본 원인은 하나였습니다: 모든 OpenAI 호환 프로바이더가 단일 shim을 공유하며 DeepSeek/Kimi/Gemini 고유 동작을 전역으로 적용하고 스트림 실패를 조용히 삼켰습니다. 이제 프로바이더별 동작은 명시적인 **케이퍼빌리티 계층**으로 이동——reasoning 캡처/재전송, Gemini thought signature, Kimi `User-Agent`, OpenRouter reasoning body가 각자의 프로바이더에만 적용되어 상호 오염이 없습니다. reasoning 전용 스트림은 실시간 **"Reasoning…"** 표시를 보여주고; 스트림 실패는 컨텍스트가 담긴 `provider_stream_error`를 발생시키며 일시적 끊김은 한 번 자동 재시도(결정적 4xx는 즉시 실패), 느린 비스트리밍 호출로의 조용한 폴백은 제거; 모델의 빈 응답은 `empty_model_response`로 정확히 진단; SSE 하트비트가 재연결 리플레이를 깨뜨리지 않으며; 멈춘 읽기 전용 도구는 타임아웃됩니다. 새 명령 **`vibe-trading provider doctor`**는 마스킹된 provider/모델/패키지/프록시 스냅샷을 출력해 환경 쪽 행을 한 번에 분류합니다. DeepSeek은 `pip install "vibe-trading-ai[deepseek]"`로 공식 네이티브 어댑터를 선택할 수 있고, kimi-k2.x의 `temperature=1` 요구는 자동 적용——Kimi 경로는 실제 API로 엔드투엔드 검증되었습니다(`kimi-k2.6` 도구 호출 + 엄격한 멀티턴 reasoning 재전송).diff --git a/README_zh.md b/README_zh.mdindex bda0674ba..3c0d967b0 100644--- a/README_zh.md+++ b/README_zh.md@@ -50,12 +50,14 @@## 📰 News+- **2026-06-18** 🔬 **Research Autopilot 第一阶段 + 本地 Data Bridge 加载器,外加一则 Discord 安全提示**:两个新 agent 工具把**假设登记(Hypothesis Registry)→ 研究目标(Research Goal)→ 回测**这条链路打通——`run_research_autopilot` 把一个 `hypothesis_id` 变成一个研究目标(论点即目标、面向回测的验收标准、下一步提示),`generate_backtest_config` 则根据假设的标的池与数据源自动写出回测 `config.json`,让 agent 可以从想法 → `signal_engine.py` → 实跑一气呵成(现在 **50 个工具**)([#260](https://github.com/HKUDS/Vibe-Trading/pull/260),感谢 @Robin1987China)。新的 **`local` 数据加载器**直接从你自己的 **CSV / Parquet / DuckDB** 文件读取 OHLCV:在 `~/.vibe-trading/data-bridge/config.yaml` 里把 symbol 映射到文件,并给 symbol 加 `local:` 前缀即可路由到本地数据,照常支持 fallback 链([#252](https://github.com/HKUDS/Vibe-Trading/pull/252),感谢 @Robin1987China)。一个快速跟进修掉了二者各自带来的运行期缺陷——Autopilot 从未收到宿主 `session_id`(每次调用都报错),`generate_backtest_config` 写到了 `safe_run_dir` 拒绝的 run 根目录,本地加载器在 tz-naive 时间戳比较时静默清空了 tz-aware 输入([#266](https://github.com/HKUDS/Vibe-Trading/pull/266))。DeepSeek 的 `DSML` 包裹式工具调用现在能正确解析([#261](https://github.com/HKUDS/Vibe-Trading/issues/261)),Robinhood OAuth 握手获得了更长的初始化超时,MCP `initTimeout` 配置项也已写进文档([#263](https://github.com/HKUDS/Vibe-Trading/pull/263)),并落地了一波标识符收敛加固:持久记忆类型校验([#257](https://github.com/HKUDS/Vibe-Trading/pull/257))、MCP swarm run-id 收敛([#258](https://github.com/HKUDS/Vibe-Trading/pull/258))、以及在 relay、preview 与 commit 网关之间一致强制的严格 `mp_[0-9a-f]{32}` mandate proposal-id 格式([#256](https://github.com/HKUDS/Vibe-Trading/pull/256)、[#264](https://github.com/HKUDS/Vibe-Trading/pull/264))。⚠️ **安全提示**:旧的 `discord.gg/2vDYc2w5` 社区邀请链接现在指向一个我们已无法控制的服务器,里面跑着假冒 Collab.Land 的钱包"验证"钓鱼骗局——它已从所有 README 和 issue 模板中移除,**唯一**官方 Discord 现在是 HKUDS 社区服务器([discord.gg/6TdQnT5xcF](https://discord.gg/6TdQnT5xcF))。Vibe-Trading 绝不会要求你"验证"或连接加密钱包。- **2026-06-17** 🧩 **安装兼容 + Opus/Kimi provider 修复**:基础 `pip install vibe-trading-ai` 不再拉取可选的 `pyharmonics` / `ta` 依赖链;谐波形态识别现在放到 `vibe-trading-ai[harmonic]` extra 后面,同时保留内置 fallback 检测器([#250](https://github.com/HKUDS/Vibe-Trading/pull/250),关闭 [#249](https://github.com/HKUDS/Vibe-Trading/issues/249))。Agent loop 也不再发送 Opus 4.8+ 会拒绝的 assistant-prefill handoff 消息,Kimi/Moonshot 可通过 `MOONSHOT_USER_AGENT` 覆盖客户端 `User-Agent`([#248](https://github.com/HKUDS/Vibe-Trading/pull/248),关闭 [#246](https://github.com/HKUDS/Vibe-Trading/issues/246) 和 [#204](https://github.com/HKUDS/Vibe-Trading/issues/204));后续测试已直接覆盖 background-result 与 auto-compact 两条 handoff 路径([#251](https://github.com/HKUDS/Vibe-Trading/pull/251))。- **2026-06-16** 🛡️ **安全/API 加固 + GLM/Zhipu alias**:Settings 写入在配置认证时必须鉴权([#245](https://github.com/HKUDS/Vibe-Trading/pull/245));API session 中 shell-capable 工具必须显式设置 `VIBE_TRADING_ENABLE_SHELL_TOOLS=1` 才会暴露([#243](https://github.com/HKUDS/Vibe-Trading/pull/243));配置 API key 后 local shutdown 也要求鉴权([#241](https://github.com/HKUDS/Vibe-Trading/pull/241));看似 loopback 但不可信的 Host 会被拒绝,而不再被当成本地请求([#242](https://github.com/HKUDS/Vibe-Trading/pull/242))。运行边角也继续打磨:Web chat 会同步已完成尝试([#236](https://github.com/HKUDS/Vibe-Trading/pull/236)),run card 对非有限指标写出 strict JSON([#238](https://github.com/HKUDS/Vibe-Trading/pull/238)),畸形 `RSSHUB_TIMEOUT_S` / `RSSHUB_FETCH_BUDGET_S` 会安全回退([#240](https://github.com/HKUDS/Vibe-Trading/pull/240)),ddgs retry fallback 已有回归覆盖([#239](https://github.com/HKUDS/Vibe-Trading/pull/239))。GLM/Zhipu 现在是一等 provider alias,并支持按模型名推断([#247](https://github.com/HKUDS/Vibe-Trading/pull/247),关闭 [#237](https://github.com/HKUDS/Vibe-Trading/issues/237))。-- **2026-06-15** 🧭 **Web 搜索韧性 + Web UI 运行连续性修复**:`web_search` 不再因单个引擎被限流而失败——现在按序查询多个免费、免 key 的引擎(DuckDuckGo、Google、Bing、Brave、Mojeek、Yahoo),带重试/退避,把"无结果"当作空答案而非错误,所有引擎都被限流时返回可操作的提示而不是一个干巴巴的 ❌(可用 `VIBE_TRADING_SEARCH_BACKENDS` 覆盖引擎列表)([#232](https://github.com/HKUDS/Vibe-Trading/pull/232),关闭 [#231](https://github.com/HKUDS/Vibe-Trading/issues/231),感谢 @Ethan-sun01)。Web UI 方面,运行过程中切换页面不再卡死——聊天页返回时会重新订阅实时流并回放期间错过的进度([#234](https://github.com/HKUDS/Vibe-Trading/pull/234))——停止按钮现在会在流式中和工具之间即时生效,而不只是在迭代边界([#235](https://github.com/HKUDS/Vibe-Trading/pull/235)),两个症状一起关闭了 [#229](https://github.com/HKUDS/Vibe-Trading/issues/229)(感谢 @kalkinj)。baostock loader 也开始接受原生的 `sh.601398` / `sz.000001` 代码格式,与 tushare 风格的 `601398.SH` 并存([#230](https://github.com/HKUDS/Vibe-Trading/pull/230),感谢 @bhlt)。<details><summary>更早的更新</summary>+- **2026-06-15** 🧭 **Web 搜索韧性 + Web UI 运行连续性修复**:`web_search` 不再因单个引擎被限流而失败——现在按序查询多个免费、免 key 的引擎(DuckDuckGo、Google、Bing、Brave、Mojeek、Yahoo),带重试/退避,把"无结果"当作空答案而非错误,所有引擎都被限流时返回可操作的提示而不是一个干巴巴的 ❌(可用 `VIBE_TRADING_SEARCH_BACKENDS` 覆盖引擎列表)([#232](https://github.com/HKUDS/Vibe-Trading/pull/232),关闭 [#231](https://github.com/HKUDS/Vibe-Trading/issues/231),感谢 @Ethan-sun01)。Web UI 方面,运行过程中切换页面不再卡死——聊天页返回时会重新订阅实时流并回放期间错过的进度([#234](https://github.com/HKUDS/Vibe-Trading/pull/234))——停止按钮现在会在流式中和工具之间即时生效,而不只是在迭代边界([#235](https://github.com/HKUDS/Vibe-Trading/pull/235)),两个症状一起关闭了 [#229](https://github.com/HKUDS/Vibe-Trading/issues/229)(感谢 @kalkinj)。baostock loader 也开始接受原生的 `sh.601398` / `sz.000001` 代码格式,与 tushare 风格的 `601398.SH` 并存([#230](https://github.com/HKUDS/Vibe-Trading/pull/230),感谢 @bhlt)。+- **2026-06-14** 📊 **按运行记录 token 用量 + Run Detail 图表按需加载**:每次 agent 运行现在都会把 provider 上报的 token 用量持久化为运行级的 `llm_usage.json`——provider/模型、累计总量、逐迭代计数——并附加到 `/runs/{id}` 上,这样一次运行结束、实时流消失后,它的 token 成本依然可审计(仅 provider 上报值;不抓 prompt/内容,不估算价格)([#223](https://github.com/HKUDS/Vibe-Trading/pull/223),感谢 @LemonCANDY42)。Run Detail 页面也不再一上来就加载每个标的的 K 线:默认 `/runs/{id}` 响应保持不变,但 UI 现在先渲染运行摘要,再通过可选的 `?chart_payload=summary` / `?chart_symbol=` 模式按需加载每个标的的图表,带有逐标的的加载状态和一个"全部加载 + 进度"控件([#225](https://github.com/HKUDS/Vibe-Trading/pull/225),感谢 @LemonCANDY42)。两个 loader 修复收尾:yfinance 的排他 `end` 边界不再漏掉请求范围内的最后一个交易日——下载调用现在传 `end + 1 天`,而缓存键仍保留原始范围([#226](https://github.com/HKUDS/Vibe-Trading/pull/226),感谢 @gyx09212214-prog);畸形的 `CCXT_TIMEOUT_MS` / `OKX_TIMEOUT_S` 值现在会告警并回退到默认值,而不是在 import 时抛错、阻塞启动([#227](https://github.com/HKUDS/Vibe-Trading/pull/227),感谢 @gyx09212214-prog)。- **2026-06-13** ↩️ **从 CLI 按 ID 恢复历史会话**:交互式 CLI 现在会在退出时打印 session-id,并附上可直接复制的 `vibe-trading resume <session-id>` 提示——找某次运行对应的 trace 不再需要靠时间戳去猜 `agent/sessions/` 下哪个目录最新。新增的 `vibe-trading resume <session-id>` 子命令会重新打开那个确切的会话,并把最近几轮对话回放进 loop;ID 不存在时会立即报错退出,而不是静默开一个空会话([#218](https://github.com/HKUDS/Vibe-Trading/pull/218),感谢 @zwrong)。- **2026-06-12** 🩺 **Provider 可靠性大修——DeepSeek 卡死、Kimi 接入、流式存活**:一批 provider 报告——DeepSeek 运行卡在"智能体工作中…"([#208](https://github.com/HKUDS/Vibe-Trading/issues/208),感谢 @XYWOX)、`reached max iterations` 掩盖了模型空响应([#203](https://github.com/HKUDS/Vibe-Trading/issues/203),感谢 @mojianliang)、卡住后 UI 无法恢复([#195](https://github.com/HKUDS/Vibe-Trading/issues/195),感谢 @mafia23)、Kimi 拒绝客户端([#204](https://github.com/HKUDS/Vibe-Trading/issues/204),感谢 @liao497)——指向同一个根因:所有 OpenAI 兼容 provider 共用一个 shim,把 DeepSeek/Kimi/Gemini 的协议怪癖全局套用,还静默吞掉流式失败。现在 provider 专属行为收进显式的**能力层(capability layer)**——reasoning 捕获/回放、Gemini thought signature、Kimi `User-Agent`、OpenRouter reasoning body 各自只作用于自己的 provider,不再互相污染。纯 reasoning 流式会显示实时 **"Reasoning…"** 指示而不是一片死寂;流式失败会抛出带上下文的 `provider_stream_error`,瞬态中断自动重试一次(确定性 4xx 立即失败),不再静默降级为慢速非流式调用;模型空响应被如实诊断为 `empty_model_response` 而非"max iterations";SSE 心跳不再破坏重连回放;卡死的只读工具会超时退出而不是永远躲在心跳后面。新增 **`vibe-trading provider doctor`**,一条命令打印脱敏的 provider/模型/包/代理快照,快速定位环境侧假卡死。DeepSeek 用户可通过 `pip install "vibe-trading-ai[deepseek]"` 启用官方原生 adapter;kimi-k2.x 的 `temperature=1` 要求自动适配——Kimi 链路已对真实 API 完成端到端验证(`kimi-k2.6` 工具调用 + 严格多轮 reasoning 回放)。