v0.20.5 add antigravity clean workspace
This commit is contained in:
+15
-15
@@ -18,9 +18,9 @@ if str(REPO_ROOT) not in sys.path:
|
||||
from scripts.runtime.skills import SkillRegistry
|
||||
|
||||
CODEX_TEMPLATE = REPO_ROOT / "codex_adapter_templates" / "codex"
|
||||
ANTIGRAVITY_RULES_DIR = REPO_ROOT / ".agents" / "rules"
|
||||
ANTIGRAVITY_WORKFLOWS_DIR = REPO_ROOT / ".agents" / "workflows"
|
||||
ANTIGRAVITY_AGENTS_FILE = REPO_ROOT / ".agents" / "agents.md"
|
||||
ANTIGRAVITY_RULES_DIR = REPO_ROOT / ".agent" / "rules"
|
||||
ANTIGRAVITY_WORKFLOWS_DIR = REPO_ROOT / ".agent" / "workflows"
|
||||
ANTIGRAVITY_AGENTS_FILE = REPO_ROOT / ".agent" / "agents.md"
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -192,20 +192,20 @@ def deploy_antigravity(
|
||||
) -> DeployResult:
|
||||
"""Deploy Antigravity workspace rules and skills into a workspace root.
|
||||
|
||||
This intentionally deploys to a workspace-local `.agents` directory, not
|
||||
This intentionally deploys to a workspace-local `.agent` directory, not
|
||||
global Antigravity/Gemini settings, so existing user configuration is not
|
||||
touched. Existing files are skipped unless `force=True`.
|
||||
"""
|
||||
workspace = (target or repo_root).expanduser()
|
||||
parts: list[DeployResult] = []
|
||||
if not skip_agents:
|
||||
parts.append(copy_antigravity_agents_file(workspace / ".agents", force=force, dry_run=dry_run))
|
||||
parts.append(copy_antigravity_agents_file(workspace / ".agent", force=force, dry_run=dry_run))
|
||||
if not skip_skills:
|
||||
parts.append(copy_registered_skills(workspace / ".agents" / "skills", force=force, dry_run=dry_run))
|
||||
parts.append(copy_registered_skills(workspace / ".agent" / "skills", force=force, dry_run=dry_run))
|
||||
if not skip_rules:
|
||||
parts.append(copy_antigravity_rules(workspace / ".agents" / "rules", force=force, dry_run=dry_run))
|
||||
parts.append(copy_antigravity_rules(workspace / ".agent" / "rules", force=force, dry_run=dry_run))
|
||||
if not skip_workflows:
|
||||
parts.append(copy_antigravity_workflows(workspace / ".agents" / "workflows", force=force, dry_run=dry_run))
|
||||
parts.append(copy_antigravity_workflows(workspace / ".agent" / "workflows", force=force, dry_run=dry_run))
|
||||
return _merge_results("antigravity", workspace, parts)
|
||||
|
||||
|
||||
@@ -238,10 +238,10 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
antigravity = sub.add_parser("antigravity", help="Deploy Antigravity workspace rules and skills")
|
||||
antigravity.add_argument("--target", type=Path, help="Workspace root; defaults to this repository")
|
||||
antigravity.add_argument("--force", action="store_true", help="overwrite existing files and create .bak backups")
|
||||
antigravity.add_argument("--skip-agents", action="store_true", help="do not copy role definitions into target/.agents/agents.md")
|
||||
antigravity.add_argument("--skip-skills", action="store_true", help="do not copy canonical skills into target/.agents/skills")
|
||||
antigravity.add_argument("--skip-rules", action="store_true", help="do not copy workspace rules into target/.agents/rules")
|
||||
antigravity.add_argument("--skip-workflows", action="store_true", help="do not copy workflows into target/.agents/workflows")
|
||||
antigravity.add_argument("--skip-agents", action="store_true", help="do not copy role definitions into target/.agent/agents.md")
|
||||
antigravity.add_argument("--skip-skills", action="store_true", help="do not copy canonical skills into target/.agent/skills")
|
||||
antigravity.add_argument("--skip-rules", action="store_true", help="do not copy workspace rules into target/.agent/rules")
|
||||
antigravity.add_argument("--skip-workflows", action="store_true", help="do not copy workflows into target/.agent/workflows")
|
||||
antigravity.add_argument("--dry-run", action="store_true", help="show files that would be written without writing")
|
||||
return parser
|
||||
|
||||
@@ -252,7 +252,6 @@ def main() -> int:
|
||||
result = deploy_codex(
|
||||
target=args.target,
|
||||
force=args.force,
|
||||
skip_agents=args.skip_agents,
|
||||
skip_skills=args.skip_skills,
|
||||
dry_run=args.dry_run,
|
||||
include_config=args.include_config,
|
||||
@@ -270,6 +269,7 @@ def main() -> int:
|
||||
result = deploy_antigravity(
|
||||
target=args.target,
|
||||
force=args.force,
|
||||
skip_agents=args.skip_agents,
|
||||
skip_skills=args.skip_skills,
|
||||
skip_rules=args.skip_rules,
|
||||
skip_workflows=args.skip_workflows,
|
||||
@@ -278,9 +278,9 @@ def main() -> int:
|
||||
print_result(result)
|
||||
print()
|
||||
print("Open the target workspace in Antigravity and enable/mention the workspace rule if needed:")
|
||||
print(" .agents/rules/deep-research-antigravity.md")
|
||||
print(" .agent/rules/deep-research-antigravity.md")
|
||||
print("Workflow installed when supported by your Antigravity build:")
|
||||
print(" .agents/workflows/deep-research-native.md")
|
||||
print(" .agent/workflows/deep-research-native.md")
|
||||
print("Existing files are skipped by default. Use --force only when you want .bak backups and replacement.")
|
||||
return 0
|
||||
raise SystemExit(f"unsupported platform: {args.platform}")
|
||||
|
||||
Reference in New Issue
Block a user