feat(local-service): allow exact worktree migration

This commit is contained in:
DCCONSTRUCTIONS
2026-08-30 23:23:36 +03:00
parent 2a5763d3fb
commit 177be8869f
5 changed files with 421 additions and 25 deletions
@@ -28,6 +28,14 @@ def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("action", choices=("plan", "apply", "status"))
parser.add_argument("--repository-root", type=Path, required=True)
parser.add_argument(
"--expected-current-repository-root",
type=Path,
help=(
"authorize migration only from this exact installed WorkingDirectory; "
"cross-repository plans remain denied when omitted"
),
)
parser.add_argument(
"--agent-path",
type=Path,
@@ -43,6 +51,7 @@ def main() -> int:
plan = plan_mission_core_launch_agent(
repository_root=arguments.repository_root,
agent_path=arguments.agent_path,
expected_current_repository_root=arguments.expected_current_repository_root,
)
if arguments.action == "plan":
print(json.dumps(plan.to_dict(), indent=2, sort_keys=True))