Người dùng báo: chọn tiếng Nhật mà nhóm Sandbox Security, nút Save/Cancel và
nhiều chỗ khác vẫn tiếng Anh. Bộ test i18n cũ vẫn xanh vì nó chỉ bắt lỗi "có
dịch nhưng không ai áp lại" — hai lỗ thật nằm chỗ khác:
* Chuỗi HARDCODE không đi qua ``tr()`` bao giờ (``QPushButton("Unlock")``), nên
phép đo "đổi ngôn ngữ rồi tìm chỗ không mang mốc" thấy nó đứng yên ở cả hai
lần chụp và coi là bình thường.
* Nhãn nút do CHÍNH Qt vẽ. ``QDialogButtonBox``, ``QMessageBox.question`` và
``QInputDialog.get*`` lấy chữ từ bảng dịch riêng của Qt; ứng dụng không cài
``QTranslator`` nào và bản PySide6 đang dùng cũng không đóng gói file
``qtbase_*.qm`` nào để cài — nên chúng luôn rơi về tiếng Anh.
``ui/dialog_buttons.py`` gán nhãn của dự án đè lên nhãn Qt: ``dialog_buttons``
(10 hộp thoại), ``confirm`` (13 hộp Có/Không), ``ask_text``/``ask_multiline``/
``ask_item`` (16 hộp nhập liệu). Cùng với 17 chuỗi hardcode và 5 câu lỗi mà
``core/tasks.py`` trả thẳng ra hộp thoại — nay trả KHOÁ i18n, nơi hiển thị mới
gọi ``tr()`` — là 61 chỗ.
Ba chỗ nữa cùng lớp lỗi, phát hiện khi rà lại:
* ``_add_section`` nhận chuỗi ĐÃ dịch nên bốn tiêu đề mục của Step config đứng
nguyên ở ngôn ngữ lúc dựng panel. Nay nhận khoá + ``bind_dynamic`` để không
mất trạng thái gập/mở khi đổi ngôn ngữ.
* Thẻ tool ở Giám sát ▸ Công cụ hiện thẳng ``spec.description`` — chuỗi gửi cho
MÔ HÌNH trong schema function-calling, phải giữ tiếng Anh. Thêm bộ mô tả hiển
thị riêng cho 9 tool.
* Tên nhóm catalog ở tab Connector ("Other (any generic MCP server)").
Kèm theo, phần giao diện người dùng yêu cầu:
* ``__version__`` 2.26.0 -> 0.0.1, một nguồn cho tiêu đề cửa sổ, tab Giới thiệu
và dòng mới ở góc phải thanh trạng thái (thay dòng ghi công tác giả).
* Tắt size grip: nó vẽ một vệt ngay bên phải dòng phiên bản. Cửa sổ vẫn kéo
giãn được từ các cạnh.
* ``_NAV_SETTINGS_GAP`` 10 -> 4: hàng Cài đặt bớt xa nhóm Dashboard/Giám sát.
Hai test SẼ TREO nếu không sửa kèm: chúng patch ``QInputDialog.getText/getItem``
để tự trả lời, mà code nay gọi ``ask_text``/``ask_item`` — patch không còn chặn
được và hộp thoại thật sẽ mở ra chờ người bấm.
Ba cổng mới trong ``tests/ui/test_i18n_khong_hardcode_chu.py`` canh ở mức cấu
trúc (không ai được dựng lại kiểu cũ); đã kiểm chúng CẮN trên bản trước khi sửa:
10 + 13 + 17 vi phạm.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Cowork Local
Cowork Local is the internal AI cowork desktop platform. It provides a local-first desktop runtime, multi-turn conversational agents, workspace isolation, task scheduling, MCP connectors, security guardrails, and model routing.
🏛️ 4-Tier Clean Architecture
The codebase strictly adheres to Clean Architecture with unidirectional inward dependencies:
presentation/ (PySide6 UI, Shell, NavRail, Chat, Scheduling, Settings, Dashboard)
│
▼
application/ (Pure Python Orchestration: Conversations, Scheduling, Workspaces, Monitoring, Routing)
│
▼
domain/ (Pure Python: Entities, Immutable Execution Requests, Agent Events, Descriptors)
▲
│
infrastructure/ (Adapters, LLM Providers, Atomic Persistence, Keyring SecretStore, MCP)
- Domain & Application Layers: 100% Pure Python (zero Qt/UI imports).
- Single Responsibility: Every production module is strictly
<= 400 LOC. - Security & Durability: API keys stored in OS Keyring; atomic JSON disk persistence.
🚀 Quick Start
1. Windows — two double-clicks
install.bat once, to install the Python dependencies
run.bat every time, to start the app
install.bat builds an isolated virtualenv under %LOCALAPPDATA%\CoworkLocal
(deliberately outside the repo — the quality gates walk the whole directory
tree, so a .venv in here would turn every vendored module into a Gate O
violation). Add --dev to also install the test dependencies, or --system to
skip the virtualenv and install into the Python already on PATH.
Both scripts also make the source importable under its package name. That step
is not optional: python -m cowork_local only resolves when the checkout
directory is literally named cowork_local, and the MS365 MCP server is
launched as a subprocess with python -m cowork_local.mcp_servers.ms365_server,
so a differently-named checkout breaks the app and its subprocesses. The
scripts create a junction instead of forcing anyone to rename their folder.
2. Any platform — run from source
From the parent of a checkout directory named cowork_local:
python -m cowork_local
3. Run Automated Tests
python -m pip install -r requirements.txt
pytest -q
There is one requirements file, not a runtime/test pair. A separate test file
would hold only pytest: 64 of the 108 test modules build real widgets, and 20
of them import PySide6 unguarded at module scope, so it would have to pull in
almost the whole runtime list anyway — two files for one near-identical list is
just a second place for the pins to drift.
🛡️ CASAN Quality Gate & Verification
Before submitting any Pull Request, run the unified CASAN Quality Gate:
# Run all 4 quality gates (Clean Arch, Secrets, LOC, and Pytest Suite)
python scripts/run_quality_gate.py
# Run static and architectural guards only (fast check)
python scripts/run_quality_gate.py --skip-tests
Individual guard scripts:
- Clean Architecture Import Guard:
python scripts/check_imports.py - Secrets & Plaintext Audit:
python scripts/audit_security.py - Single Responsibility LOC Guard:
python scripts/check_loc.py --max-lines 400 - Release E2E Smoke Test:
pytest tests/e2e/test_smoke.py -v
🤝 Contributing & Recipes
- Quick Start Guide: See START_CONTRIBUTING.md.
- Contributor Recipes: See docs/governance/contributor-recipes.md for step-by-step recipes to:
- Add a new AI Model Provider.
- Add a new Built-in Tool / MCP Server.
- Add a new Screen / Tab / Widget.
- Security Policy: See SECURITY.md.