feat: prepare 2.2.0 with UI and execution fixes

Add dark theme, richer Markdown and readable plugin results.
Improve Android input evidence, response integrity and diagnostics.
Unify lifecycle, guidance receipts and evidence sources across clients.
Keep direct action dispatch without an added AI quota approval layer.
Align version metadata at 2.2.0 and bundle Helper 1.2.2.

Validation: 3063 backend tests before the version bump; 44 after.
Frontend: 317 tests and production build passed.
This commit is contained in:
chenmingxuan committed 2026-10-26 00:44:13 +08:00
1 parent 83bcfd54d5
commit fac4ccb760
146 files changed
+5689 -2033

No files matched your search

+43
View File
@@ -72,6 +72,49 @@ def test_pc_first_and_intentional_interleaving_are_supported():
assert progress.guard("cua-driver") is None
def test_stage_updates_are_atomic_and_preserve_unmentioned_scope_and_order(tmp_path):
progress = TaskProgress()
resources = {"android", "cua-driver"}
progress.update(plan(), resources=resources, directory=tmp_path)
before = progress.value.model_dump()
saved = (tmp_path / "notes/task_progress.md").read_bytes()
with pytest.raises(ValidationError, match="完成或阻塞阶段必须记录"):
progress.update(
{"reason": "无证据不能完成", "stage_updates": [{"id": "phone", "status": "done"}]},
resources=resources,
directory=tmp_path,
)
assert progress.value.model_dump() == before
assert (tmp_path / "notes/task_progress.md").read_bytes() == saved
progress.update(
{
"reason": "手机已检查完",
"stage_updates": [
{"id": "phone", "status": "done", "evidence": "实际步骤记录 real-step"}
],
},
resources=resources,
directory=tmp_path,
)
assert progress.value.stages[1].model_dump() == before["stages"][1]
assert [s.id for s in progress.value.stages] == ["phone", "pc"]
assert progress.value.stages[0].scope == before["stages"][0]["scope"]
progress.update(
{"reason": "开始电脑检查", "stage_updates": [{"id": "pc", "status": "active"}]},
resources=resources,
)
assert progress.guard("cua-driver") is None
with pytest.raises(ValueError, match="未知 id"):
progress.update(
{"reason": "错拼不能覆盖", "stage_updates": [{"id": "typo", "status": "done"}]},
resources=resources,
)
with pytest.raises(ValidationError, match="只能提供一种"):
progress.update(
{**plan(), "stage_updates": [{"id": "pc", "status": "active"}]}, resources=resources
)
@pytest.mark.asyncio
async def test_flash_preflight_does_not_authorize_pc_mutation(monkeypatch):
plugins = SimpleNamespace(