Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1af8907
feat(dispatch): 統一派發邏輯重構,消除重複 dispatch 程式碼
Apr 22, 2026
76af2fa
chore: 通知管道從 feishu 改為 telegram
Apr 22, 2026
52e19de
fix(dispatch): 修復 openclaw 路徑解析,優先檢查常見 bin 目錄
Apr 22, 2026
e756361
fix(server): 修復 dashboard server 的 openclaw 路徑解析
Apr 22, 2026
f5bb6a2
feat: 任務建立時記錄 source channel,dispatch 優先使用任務來源 channel
Apr 22, 2026
69b8272
feat: 繁體中文本地化工具 fanti_convert.py + Dashboard 監聽所有網卡
Apr 23, 2026
3e69aea
feat(dashboard): enforce DB-first live-status source mode with CLI sw…
May 13, 2026
34fba98
fix(tests): restore kanban compatibility and sync path handling
May 13, 2026
32840cf
chore(agents): sync event-bus-first workflow rules across SOULs
May 13, 2026
3ad26d3
chore(localization): sync fanti variants and backend/frontend parity …
May 13, 2026
4f553ec
docs(readme): add 2026-05 db-first and mode-switch updates
May 13, 2026
42108f8
feat(cli): add human-readable task list output with optional --show-id
May 13, 2026
3400092
feat(cli): include task content/progress in list output by default
May 13, 2026
fb41c18
feat(cli): hide session-mirror entries by default in task list
May 13, 2026
89b9f9c
fix(cli): fallback to progress/flow text when task description is empty
May 13, 2026
bc71b90
feat(tg-cli): support Chinese alias '任務清單 完整' for task list
May 13, 2026
9336512
fix(tg-cli): use report-first content in full task list output
May 13, 2026
1dfef5d
feat(tg-cli): add stable tg.tasks.* command codes for task list
May 13, 2026
2fca3d0
fix(eventbus): persist and propagate report content in DB task flow
May 13, 2026
218af25
revert(cli): remove tg.tasks pseudo commands; keep built-in slash com…
May 13, 2026
47d07e8
docs: update Edict README with model config notes
May 15, 2026
c69252c
fix: allow test task IDs in kanban updater
May 15, 2026
66e20df
chore: snapshot before deep audit fixes
Jun 2, 2026
72b6fa6
fix(#1): remove all _fanti duplicate files (35 files)
Jun 2, 2026
8ce7953
fix(#2): add API key authentication to backend write endpoints
Jun 2, 2026
c26d8d5
fix(#3): repair docker-compose.yml — fix corrupted REDIS_URL + add wo…
Jun 2, 2026
df6354c
fix(#4): remove hardcoded passwords — use .env + dynamic generation
Jun 2, 2026
9f92670
fix(#5): fix systemd service + edict.sh — support all-services manage…
Jun 2, 2026
d2dfc51
fix(#6): fix dispatch_worker retry logic + long title 422
Jun 2, 2026
7a1263d
fix(#7): install.sh idempotency — AGENTS.md + pending_model_changes.json
Jun 2, 2026
5c50baf
fix: e2e state machine alignment + config env_file absolute path + di…
Jun 2, 2026
4a2735b
fix: edict.sh — _ensure_dirs set -e compat + start-all/stop-all var e…
Jun 2, 2026
e1a94c8
chore: gitignore .pids/ and _output/ runtime artifacts
Jun 2, 2026
f5a9170
refactor: 清理死碼、配置加固、文件更新
Jun 2, 2026
fa6ccd9
fix: 深度檢核修復 — config/API/測試/安全/死碼清理
Jun 2, 2026
f461cda
docs: 補齊 README — 後端架構/安全/部署/通知管道/本地化/死碼清理
Jun 4, 2026
65bbcb4
docs: 加入 Maintained Fork Notice(fork 目標/改動狀態/upstream PR 方向)
Jun 4, 2026
c17f389
docs: 補齊 backend 中文註解 — 依 RULES.md 第4條規範
Jun 4, 2026
edb028e
fix: 深度檢核修復 — port/service name/flow_log/.env.example/README 重複/Feish…
Jun 4, 2026
f2107a7
文檔全面同步與補充
Jun 4, 2026
9f9bf86
test(pytest): centralize repo-root bootstrap in conftest
Jun 6, 2026
c6fd4ec
fix(api): expose public task ids while preserving internal UUID
Jun 6, 2026
1f4999c
feat(dashboard): bridge db mode mutations through backend api
Jun 6, 2026
411f6fe
fix(dashboard): support db-mode task stop resume cancel
Jun 6, 2026
c4962fc
test(dashboard): lock session agent visibility policy
Jun 6, 2026
2aad475
fix(dashboard): align db transition payloads
Jun 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Runtime data (machine-specific)
.pids/
_output/
data/live_status.json
data/agent_config.json
data/model_change_log.json
Expand All @@ -16,6 +18,7 @@ data/mission_control_tasks.json

# Environment
.env
edict.service.env

# Python
__pycache__/
Expand Down Expand Up @@ -50,3 +53,4 @@ _*.py
# Generated docs
*.docx
*.pdf
edict.service.env
91 changes: 91 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# CHANGELOG

## v2.0.0(2026-06-05)

### 🏛️ 重大更新:DB-first 架構

- **任務資料源改為 DB-first**:Dashboard `live-status` 支援 `db` / `json` / `auto` 三種資料源模式切換,預設建議使用 `db` 模式,以 PostgreSQL 為單一事實來源。
- **模式切換 CLI**:新增 `scripts/task_source_mode.py`,可查詢與切換資料源模式,同時檢測後端健康狀態。
- **流程一致性強化**:主路徑以 Event Bus(Redis Streams)為準,CLI 僅作故障排查與補救使用。

### 🔐 安全加固

- **API Key 後端鑑權**:所有寫入端點(POST / PUT / DELETE)強制驗證 API Key,支援 `X-API-Key` header 與 `Authorization: Bearer` 兩種傳遞方式。
- **密碼與密鑰集中管理**:所有密碼與密鑰統一從 `.env` 檔案載入,不再硬編碼於程式碼中,預設值改為動態隨機生成(256-bit 安全強度)。
- **審計日誌**:新增 `audit_logs` 獨立表,記錄所有 Agent 與系統對任務的操作,支援跨任務檢索與聚合查詢。

### 📢 通知管道升級

- **Telegram 化**:通知管道從 Feishu 遷移至 Telegram,dispatch 自動追蹤任務來源 channel 並優先回報至對應管道。
- **多管道支援**:保留 discord、slack、wecom、webhook 等管道介面,可透過配置靈活切換。

### 📝 繁體中文本地化

- 新增 `scripts/fanti_convert.py` 繁簡轉換工具。
- Dashboard 全介面支援繁體中文。
- Backend 程式碼註解全面補齊繁體中文說明。

### 🔧 後端重構

- **Dispatch 統一重構**:消除重複派發邏輯,統一 `openclaw` 路徑解析,支援指數退避重試機制。
- **Transactional Outbox 模式**:事件先與業務數據寫入同一事務,再由 `OutboxRelay` worker 異步投遞至 Redis Streams,消滅 DB/Event 雙寫不一致問題。
- **Event Bus 強化**:支援消費者組(Consumer Group)、ACK 確認、XAUTOCLAIM 認領超時事件,確保事件不遺失。
- **WebSocket 即時推送**:取代舊架構的 5 秒 HTTP 輪詢,改為 WebSocket 連接 + Redis Pub/Sub 實時推送。

### 🐛 穩定性修復

- 修復 config.py — `env_file` 相對路徑改為絕對路徑。
- 修復 e2e 狀態機對齊 — 確保 kanban 相容層與 backend 狀態轉換矩陣一致。
- 修復 dispatch_worker 重試邏輯 — 長標題導致 422 錯誤。
- 修復 systemd service 與 `edict.sh` — 支援全服務管理(start-all / stop-all / status)。
- 修復 `docker-compose.yml` — 修正損壞的 REDIS_URL 並新增 worker 服務。
- 修復 `install.sh` — AGENTS.md 與 `pending_model_changes.json` 的冪等性。
- Dashboard 任務分類修正:`isEdict()` 現可正確辨識 UUID 格式任務。
- Dashboard 穩定性強化:修復 `STATE_LABEL` 未定義、`loadAll()` 競爭條件等問題。
- 修復 `flow_log` 重複欄位問題。

### 🧹 死碼清理

- 移除 35 個 `_fanti` 重複檔案。
- 清理 `channels/__init__.py` 殘留程式碼。
- 移除未使用的舊架構程式碼區塊。

### 🚀 部署強化

- 新增 `systemd/` 目錄,包含 5 個 user service 模板:
- `edict-backend.service`
- `edict-orchestrator.service`
- `edict-dispatch-worker.service`
- `edict-outbox-relay.service`
- `edict-dashboard.service`
- 新增 `.env.example`,提供完整的環境變數設定參考。
- `install.sh` 支援 `install-services` + `init_env` 子命令。
- Dashboard port 環境變數化:支援 `DASHBOARD_PORT` / `EDICT_DASHBOARD_PORT`。

---

## v1.x(2026-04 ~ 2026-05)

### 功能更新

- 任務建立時記錄 source channel,dispatch 優先使用任務來源 channel。
- Dashboard 監聽所有網卡(0.0.0.0),不再僅限 localhost。
- 修復 dashboard server 與 dispatch 模組的 openclaw 路徑解析。
- 統一派發邏輯,消除重複 dispatch 程式碼。
- 支援 `tg.tasks.*` 命令碼用於任務列表查詢(Telegram CLI)。
- 任務列表輸出支援繁體中文別名(「任務清單 完整」)。
- CLI 任務列表輸出預設隱藏 session-mirror 項目。
- 修復 EventBus:持久化並傳播 report 內容至 DB 任務流程。

### CI 與依賴

- 升級 `docker/login-action` 3→4、`docker/metadata-action` 5→6、`docker/setup-qemu-action` 3→4、`actions/setup-python` 5→6。
- 修復 CI YAML 中 FastAPI 匯入步驟的解析歧義。
- 相容 Windows 系統的 Python 解釋器路徑查找。

### 文件

- 新增專案設計文件、效能基準計劃文件、朝堂議政開發規格。
- 補齊 README — 後端架構、安全、部署、通知管道、本地化。
- 加入 Maintained Fork Notice(fork 目標 / 改動狀態 / upstream PR 方向)。
- 補齊 backend 中文註解(依 RULES.md 規範)。
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ open http://127.0.0.1:7891
| `dashboard/court_discuss.py` | 朝堂议政引擎(多官员 LLM 讨论) | 🔶 中 |
| `scripts/kanban_update.py` | 看板 CLI + 数据清洗 + 状态机校验(~350 行) | 🔶 中 |
| `scripts/*.py` | 数据同步 / 自动化脚本 | 🔶 中 |
| `tests/test_e2e_kanban.py` | E2E 看板测试(24 断言) | 🔶 中 |
| `tests/test_e2e_kanban.py` | E2E 看板测试(9 场景 17 断言) | 🔶 中 |
| `install.sh` | 安装脚本 | 🟢 低 |

---
Expand Down
Loading