feat: add typed local package pilot root

This commit is contained in:
codex
2026-08-06 09:46:50 +03:00
parent 95beb0f632
commit 66e46db849
3 changed files with 14 additions and 2 deletions
@@ -10,8 +10,9 @@ internal static class PackageLifecyclePilotCli
{
public static async Task<int> RunAsync(string[] args)
{
if (args.Length != 4 || args[0] != "--mode" || args[1] != "PackageLifecyclePilot" || args[2] != "--root" || !Path.IsPathFullyQualified(args[3]) || args[3].StartsWith(@"\\")) return 2;
var root=Path.GetFullPath(args[3]); var id=Guid.NewGuid().ToString("N"); var evidenceDir=Path.Combine(root,"evidence",id); Directory.CreateDirectory(evidenceDir);
if (args.Length != 4 || args[0] != "--mode" || args[1] != "PackageLifecyclePilot" || args[2] != "--root") return 2;
ResolvedPackagePilotRoot pilotRoot; try { pilotRoot=new PathResolver().ResolvePackagePilotRoot(args[3]); } catch { return 2; }
var root=pilotRoot.Value; var id=Guid.NewGuid().ToString("N"); var evidenceDir=Path.Combine(root,"evidence",id); Directory.CreateDirectory(evidenceDir);
try
{
var catalog=Path.Combine(root,"catalog"); Directory.CreateDirectory(catalog); var store=new LocalPackageStore(root,new Sha256FileHasher());