v0.20.5 add antigravity clean workspace

This commit is contained in:
Deep Research System
2026-05-07 20:47:33 +08:00
parent a0f1144f6c
commit bb2c91754b
27 changed files with 3501 additions and 67 deletions
+14 -14
View File
@@ -24,24 +24,25 @@ from scripts.deploy_adapters import default_codex_home, deploy_codex
from scripts.runtime.skills import SkillRegistry
CODEX_TEMPLATE = REPO_ROOT / "codex_adapter_templates" / "codex"
OPENCODE_ROOT = REPO_ROOT / ".opencode"
AGENTS_SKILLS = REPO_ROOT / ".agents" / "skills"
OPENCODE_SKILLS = OPENCODE_ROOT / "skills"
AGENT_SKILLS = REPO_ROOT / ".agent" / "skills"
REQUIRED_PATHS = [
"AGENTS.md",
"GEMINI.md",
"README.md",
"PLAN.md",
".opencode/opencode.json",
".agent/agents.md",
".agent/rules/deep-research-antigravity.md",
".agent/workflows/deep-research-native.md",
".agent/skills/search-strategy/SKILL.md",
"codex_adapter_templates/codex/config.toml",
"codex_adapter_templates/codex/agents/dr-pm.toml",
"codex_adapter_templates/codex/commands/dr-run.md",
".agents/skills/search-strategy/SKILL.md",
"skills/deep-research/SKILL.md",
"skills/document-ingest/SKILL.md",
"scripts/dr.py",
"scripts/deploy_adapters.py",
"scripts/install_codex_adapter.py",
"scripts/export_antigravity_workspace.py",
]
REQUIRED_ENV_KEYS = [
@@ -119,12 +120,12 @@ def check_deployment() -> int:
if not (REPO_ROOT / item).exists():
issues.append(f"missing required path: {item}")
tracked = git_tracked(["codex_adapter_templates", ".opencode", ".agents/skills", "skills"])
legacy_tracked = git_tracked([".codex"])
tracked = git_tracked(["codex_adapter_templates", ".agent", "skills"])
legacy_tracked = git_tracked([".codex", ".opencode", ".claude", ".gemini", ".agents"])
if legacy_tracked:
warnings.append("legacy .codex files are still tracked; run: git rm -r --cached .codex")
warnings.append("legacy platform adapter files are still tracked; prefer Antigravity clean workspace or remove them from the branch")
for item in REQUIRED_PATHS:
if item.startswith(("codex_adapter_templates/", ".opencode/", ".agents/")) and item not in tracked:
if item.startswith(("codex_adapter_templates/", ".agent/")) and item not in tracked:
warnings.append(f"not tracked by git: {item}")
skills = SkillRegistry().list()
@@ -148,9 +149,9 @@ def check_deployment() -> int:
print("Deep Research deployment check")
print(f" repo: {REPO_ROOT}")
print(f" codex template files tracked: {sum(1 for p in tracked if p.startswith('codex_adapter_templates/'))}")
print(f" legacy .codex files tracked: {len(legacy_tracked)}")
print(f" legacy platform adapter files tracked: {len(legacy_tracked)}")
print(f" codex home: {codex_home}")
print(f" opencode files tracked: {sum(1 for p in tracked if p.startswith('.opencode/'))}")
print(f" antigravity .agent files tracked: {sum(1 for p in tracked if p.startswith('.agent/'))}")
print(f" codex skills: {len(skills)}")
if warnings:
@@ -171,7 +172,6 @@ def check_deployment() -> int:
def repair(force: bool, codex_home: Path | None) -> int:
try:
codex_result = deploy_codex(target=codex_home, force=force)
skills_written = copy_tree_contents(OPENCODE_SKILLS, AGENTS_SKILLS, force=force)
except PermissionError as exc:
print(f"repair failed: permission denied: {exc}", file=sys.stderr)
return 1
@@ -182,7 +182,7 @@ def repair(force: bool, codex_home: Path | None) -> int:
print("Repair completed.")
print(f" Codex home files written: {len(codex_result.written)}")
print(f" Codex home: {codex_result.target}")
print(f" .agents skills written: {len(skills_written)}")
print(f" .agent skills source: {AGENT_SKILLS}")
return check_deployment()