优化流程

This commit is contained in:
2026-09-02 13:51:35 +08:00
parent 97a03c290b
commit f3eb5dff54
71 changed files with 5290 additions and 515 deletions
+5
View File
@@ -3,6 +3,7 @@
from __future__ import annotations
from dataclasses import dataclass
import shutil
from app.cad_agent.adapters.artifact_store import FileArtifactStore
from app.cad_agent.adapters.event_publisher import IdempotentInProcessPublisher
@@ -30,6 +31,10 @@ class V3Services:
def compose_v3(settings: Settings) -> V3Services:
repository = SqliteTaskRepository(settings.task_root.parent / "autonomous-cad-v3.sqlite3")
if repository.protocol_reset and settings.task_root.exists():
# Protocol 3.1 has no valid interpretation for structured-only task
# artifacts, so clear that task root together with its old database.
shutil.rmtree(settings.task_root)
artifacts = FileArtifactStore(settings.task_root)
runtime = ProfileCadRuntime(settings)
registry = default_registry()