From 7cf0235ac7680e34612603bbf2fb63148386dae3 Mon Sep 17 00:00:00 2001 From: OoO Date: Sun, 31 May 2026 20:43:02 +0800 Subject: [PATCH] =?UTF-8?q?V10.511=20=E6=94=B6=E6=96=82=20Webcrumbs=20plug?= =?UTF-8?q?in=20=E8=A8=BA=E6=96=B7=E7=A9=BA=E7=8B=80=E6=85=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO_NEXT_STEPS.txt | 1 + config.py | 2 +- docs/guides/webcrumbs_shared_runtime.md | 2 +- docs/memory/history_logs.md | 1 + routes/system_public_routes.py | 21 +++++++++++++++++++++ templates/external_tool_status.html | 3 +++ tests/test_external_tool_entrypoints.py | 5 +++++ 7 files changed, 33 insertions(+), 2 deletions(-) diff --git a/TODO_NEXT_STEPS.txt b/TODO_NEXT_STEPS.txt index 52c88cd..592e834 100644 --- a/TODO_NEXT_STEPS.txt +++ b/TODO_NEXT_STEPS.txt @@ -4,6 +4,7 @@ ================================================================================ 【已完成】 + - V10.511 Webcrumbs live plugin 補 host data 安全空狀態:`/webcrumbs` 會注入 `StockPlatformSharedUI.marketSnapshot` / `aiCandidate` 的診斷空資料,避免 plugin fallback demo 數字被誤認成真實市場或 AI 建議。 - V10.510 Webcrumbs 從 runtime 接線推進到專案內 live plugin 試點:`/webcrumbs` 會設定 `StockPlatformSharedUI.allowedPluginUris` 並嵌入同源 `/webcrumbs-assets/plugins/finance.market-ticker-strip/0.1.0`、`finance.ai-candidate-card/0.1.0`,用同一頁同時驗 runtime、plugin proxy 與共享 UI loader 初始化。 - V10.509 新增市場情報 MCP Fetch Candidate Queue Writer Review Decision Approval Writer Preflight 安全預覽 gate:只審核 human approval 通過後由操作員貼回的 writer preflight 摘要,確認 approval identity、writer_preflight_id、row count、dedupe keys、approved decision 到 target review_state 的逐列映射、decision/approval/preflight evidence refs、exact identity / variant / overwrite guard 與 operator boundary;API 不讀 token、不執行 CLI、不開 DB、不寫 preflight/approval/decision/match、不更新 review_state、不補 queue、不掛 scheduler,只放行到後續 CLI review / run package 設計。 - V10.508 Webcrumbs 轉為 momo-pro 同源 asset proxy:`WEBCRUMBS_RUNTIME_URL` 預設改為 `/webcrumbs-assets/loader/webcrumbs-compatible-loader.js`,新增 allowlist proxy 只代理 188 Shared UI Hub 的 `loader/`、`plugins/`、`demo/`,避免 `webcrumbs.wooo.work` 公網 TLS / Basic Auth 尚未收斂時影響正式頁面載入;`/webcrumbs` 診斷頁同步顯示 asset upstream。 diff --git a/config.py b/config.py index 0f547f1..a97d5c6 100644 --- a/config.py +++ b/config.py @@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.510" +SYSTEM_VERSION = "V10.511" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/docs/guides/webcrumbs_shared_runtime.md b/docs/guides/webcrumbs_shared_runtime.md index 8973d61..687c3db 100644 --- a/docs/guides/webcrumbs_shared_runtime.md +++ b/docs/guides/webcrumbs_shared_runtime.md @@ -63,7 +63,7 @@ style.css ## 驗收 - `/webcrumbs` 顯示 runtime URL、版本與 plugin base。 -- `/webcrumbs` 會嵌入同源 `/webcrumbs-assets/plugins/...` 的 live plugin preview,作為 shared runtime 的第一個專案內試點。 +- `/webcrumbs` 會嵌入同源 `/webcrumbs-assets/plugins/...` 的 live plugin preview,並由 momo-pro 注入診斷空狀態資料,避免 plugin fallback demo 數字在正式頁面被誤認成真實市場或 AI 建議。 - `/webcrumbs-assets/loader/webcrumbs-compatible-loader.js` 回 200 且 content type 是 JavaScript。 - `ewoooc_base.html` 在 `WEBCRUMBS_ENABLED=true` 且 runtime URL 有效時輸出 `
diff --git a/tests/test_external_tool_entrypoints.py b/tests/test_external_tool_entrypoints.py index 15545d7..777b9d1 100644 --- a/tests/test_external_tool_entrypoints.py +++ b/tests/test_external_tool_entrypoints.py @@ -43,7 +43,12 @@ def test_external_tool_bridge_pages_are_diagnostic_not_blank(): assert "plugin_previews" in route_source assert "finance.market-ticker-strip/0.1.0" in route_source assert "finance.ai-candidate-card/0.1.0" in route_source + assert "plugin_seed_data" in route_source + assert "diagnostic_empty" in route_source + assert "source_not_connected" in route_source assert "StockPlatformSharedUI.allowedPluginUris" in template + assert "StockPlatformSharedUI.marketSnapshot" in template + assert "StockPlatformSharedUI.aiCandidate" in template assert "stock-platform-plugin" in template assert "external-tool-webcrumbs-grid" in css assert "尚未接入 proxy" in route_source