Skip to content

Commit e2f8ef5

Browse files
committed
Merge remote changes and resolve namespace conflict
2 parents 4590548 + 40e0a0d commit e2f8ef5

592 files changed

Lines changed: 2571 additions & 1696 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/launch.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"version": "0.0.1",
3+
"configurations": [
4+
{
5+
"name": "McpServer.Web",
6+
"runtimeExecutable": "dotnet",
7+
"runtimeArgs": ["run", "--project", "src/McpServer.Web"],
8+
"port": 39984
9+
},
10+
{
11+
"name": "McpServer.Director",
12+
"runtimeExecutable": "dotnet",
13+
"runtimeArgs": ["run", "--project", "src/McpServer.Director"]
14+
},
15+
{
16+
"name": "McpServerManager.Desktop",
17+
"runtimeExecutable": "dotnet",
18+
"runtimeArgs": ["run", "--project", "src/McpServerManager.Desktop"],
19+
"autoPort": true
20+
},
21+
{
22+
"name": "McpServerManager.Desktop (WSL)",
23+
"runtimeExecutable": "wsl",
24+
"runtimeArgs": ["dotnet", "run", "--project", "src/McpServerManager.Desktop"],
25+
"autoPort": true
26+
}
27+
]
28+
}

.claude/settings.local.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(find /f/GitHub/McpServerManager/.claude/worktrees/magical-ritchie -type f -name *auth* -o -name *Auth*)",
5+
"mcp__Claude_Preview__preview_start",
6+
"Bash(curl -s http://localhost:7147/auth/config)",
7+
"Bash(curl -s http://localhost:39984/auth/config)",
8+
"Bash(find F:GitHubMcpServerManagersrc F:GitHubMcpServerManagertests -name *.cs -type f)",
9+
"Bash(xargs grep:*)",
10+
"Bash(find F:GitHubMcpServerManagertests -name *.cs -type f)",
11+
"Bash(find F:GitHubMcpServerManager -name *.json -o -name *.xml -o -name *.yaml -o -name *.yml)",
12+
"Bash(grep -r '^namespace McpServer\\\\.' F:GitHubMcpServerManagertests --include=*.cs)",
13+
"Bash(find F:GitHubMcpServerManagersrc -name *.csproj -exec grep -H McpServer. {})",
14+
"Bash(2)",
15+
"Bash(find F:GitHubMcpServerManagersrc -name *.csproj)",
16+
"Bash(find F:GitHubMcpServerManagertests -name *.csproj)",
17+
"Bash(xargs -0 sed -i -e s/McpServer.Director/McpServerManager.Director/g -e s/McpServer.UI/McpServerManager.UI/g -e s/McpServer.Web/McpServerManager.Web/g -e s/McpServer.VsExtension/McpServerManager.VsExtension/g echo 'Done. Checking for double-renames...' grep -r McpServerManagerManager src tests --include=*.cs -l)",
18+
"Bash(echo \"Exit: $?\")",
19+
"Bash(dotnet build:*)",
20+
"Bash(while read:*)",
21+
"Bash(do grep:*)",
22+
"Bash(done)",
23+
"Bash(xargs -0 sed -i -e 's/McpServer\\\\.Director/McpServerManager.Director/g' -e 's/McpServer\\\\.UI/McpServerManager.UI/g' -e 's/McpServer\\\\.Web/McpServerManager.Web/g' -e 's/McpServer\\\\.VsExtension/McpServerManager.VsExtension/g' echo \"AXAML files updated\")",
24+
"Bash(do echo:*)",
25+
"Read(//f/GitHub/McpServerManager/.claude/worktrees/magical-ritchie/**)",
26+
"Bash(find /f/GitHub/McpServerManager -type f -name Build.cs -o -name Build.csproj -o -name *.nuke)",
27+
"Bash(grep -n \"void RunDeploy\\\\|void RunPackDirector\\\\|void RunUpdateDirector\\\\|void RunUpdateWebUi\\\\|void RunBuildDesktop\\\\|void RunDeployAll\" /f/GitHub/McpServerManager/build/*.cs)",
28+
"Bash(grep -n \"private.*DeployDirectorCore\\\\|private.*DeployWebUiCore\\\\|private.*DeployDesktopMsixCore\\\\|private.*DeployDesktopDebCore\" /f/GitHub/McpServerManager/build/*.cs)",
29+
"Bash(grep -n \"BuildDesktopDebCore\" /f/GitHub/McpServerManager/build/*.cs)",
30+
"Bash(grep -n \"BuildDesktopMsixCore\" /f/GitHub/McpServerManager/build/*.cs)",
31+
"Bash(dotnet run:*)",
32+
"Bash(find F:GitHubMcpServerManager -type f -name *.yaml -o -name *.yml)",
33+
"Bash(git submodule:*)"
34+
]
35+
}
36+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ artifacts/
2121

2222
AGENTS-README-FIRST.yaml
2323
*.nupkg
24+
*.vsix
2425
*.py
2526
/.codex/session-log-buffer.backfilled-20260306T184008Z.md
2627
/.codex/session-log-buffer.md

build/Build.BuildAndDeployTargets.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private string ExecuteDotnetToolPipeline(
128128
var outputDirectory = Path.IsPathRooted(nupkgDirectory) ? nupkgDirectory : Path.Combine(RepoRootPath, nupkgDirectory);
129129
EnsureDirectoryExists(outputDirectory);
130130

131-
var targetFramework = ResolveTargetFramework(projectPath, "net9.0");
131+
var targetFramework = ResolveTargetFramework(projectPath, "net10.0");
132132
var publishDirectory = Path.Combine(Path.GetDirectoryName(projectPath)!, "bin", Configuration, targetFramework, "publish");
133133
var projectDocument = XDocument.Load(projectPath);
134134
var propertyGroups = projectDocument.Root?.Elements().Where(x => x.Name.LocalName == "PropertyGroup").ToList() ?? new List<XElement>();
@@ -280,7 +280,7 @@ private string ExecuteDotnetToolPipeline(
280280
private string BuildAndroidPackageCore()
281281
{
282282
var projectPath = Path.Combine(RepoRootPath, "src", "McpServerManager.Android", "McpServerManager.Android.csproj");
283-
var targetFramework = ResolveTargetFramework(projectPath, "net9.0-android");
283+
var targetFramework = ResolveTargetFramework(projectPath, "net10.0-android");
284284
var version = ResolveVersionDetails(PackageVersion);
285285
var artifactsDirectory = ArtifactsDirectoryPath;
286286
EnsureDirectoryExists(artifactsDirectory);
@@ -354,14 +354,14 @@ private string BuildAndroidPackageCore()
354354
private void DeployAndroidCore(string deviceSerial)
355355
{
356356
var projectPath = Path.Combine(RepoRootPath, "src", "McpServerManager.Android", "McpServerManager.Android.csproj");
357-
var targetFramework = ResolveTargetFramework(projectPath, "net9.0-android");
357+
var targetFramework = ResolveTargetFramework(projectPath, "net10.0-android");
358358

359359
if (!ShouldExecuteAction($"Deploy Android app to {deviceSerial}"))
360360
{
361361
return;
362362
}
363363

364-
var devices = InvokeProcess("adb", new List<string> { "devices", "-l" }, RepoRootPath, true);
364+
var devices = InvokeProcess(ResolveAdbPath(), new List<string> { "devices", "-l" }, RepoRootPath, true);
365365
foreach (var line in devices.StandardOutputLines)
366366
{
367367
Info(line);
@@ -430,7 +430,7 @@ private string BuildDesktopDebCore(bool installAfterBuild)
430430
"-r",
431431
runtimeId,
432432
"-f",
433-
"net9.0",
433+
"net10.0",
434434
"--self-contained",
435435
"true",
436436
"-p:PublishSingleFile=true",
@@ -662,9 +662,9 @@ private DeploymentResult DeployAndroidSelection(string targetName, bool expectEm
662662
{
663663
try
664664
{
665-
if (!CommandExists("adb"))
665+
if (!CommandExists("adb") && ResolveAdbPath() == "adb")
666666
{
667-
return CreateDeploymentResult(targetName, "Skipped", "adb was not found in PATH.");
667+
return CreateDeploymentResult(targetName, "Skipped", "adb was not found in PATH or Android SDK.");
668668
}
669669

670670
var resolution = ResolveAndroidDevice(expectEmulator, requestedSerial);

build/Build.Common.cs

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,41 @@ private void ApplyMarkdownAvaloniaLinuxPatchIfNeeded()
472472
File.WriteAllText(propsPath, updated);
473473
}
474474

475+
private string ResolveAdbPath()
476+
{
477+
// Check if adb is already on the system PATH.
478+
if (CommandExists("adb"))
479+
return "adb";
480+
481+
// Try ANDROID_HOME / ANDROID_SDK_ROOT environment variables.
482+
foreach (var envVar in new[] { "ANDROID_HOME", "ANDROID_SDK_ROOT" })
483+
{
484+
var sdkRoot = Environment.GetEnvironmentVariable(envVar);
485+
if (!string.IsNullOrWhiteSpace(sdkRoot))
486+
{
487+
var candidate = Path.Combine(sdkRoot, "platform-tools", "adb.exe");
488+
if (File.Exists(candidate))
489+
return candidate;
490+
}
491+
}
492+
493+
// Try the default Windows SDK install location.
494+
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
495+
if (!string.IsNullOrWhiteSpace(localAppData))
496+
{
497+
var candidate = Path.Combine(localAppData, "Android", "Sdk", "platform-tools", "adb.exe");
498+
if (File.Exists(candidate))
499+
return candidate;
500+
}
501+
502+
// Fallback — let the caller handle the missing-adb error.
503+
return "adb";
504+
}
505+
475506
private List<AndroidDeviceInfo> GetAndroidDevicesCore()
476507
{
477508
var devices = new List<AndroidDeviceInfo>();
478-
var adbCheck = InvokeProcess("adb", new List<string> { "devices", "-l" }, RepoRootPath, false);
509+
var adbCheck = InvokeProcess(ResolveAdbPath(), new List<string> { "devices", "-l" }, RepoRootPath, false);
479510
if (adbCheck.ExitCode != 0)
480511
{
481512
return devices;

build/Build.MsixPackaging.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private sealed class MsixDesktopConfiguration
1717
public string PackageDisplayName { get; set; } = "McpServerManager";
1818
public string Publisher { get; set; } = string.Empty;
1919
public string DesktopProjectPath { get; set; } = Path.Combine("src", "McpServerManager.Desktop", "McpServerManager.Desktop.csproj");
20-
public string DesktopFramework { get; set; } = "net9.0";
20+
public string DesktopFramework { get; set; } = "net10.0";
2121
public string DesktopSubDirectory { get; set; } = "desktop";
2222
public string DesktopAppId { get; set; } = "McpServerManagerDesktop";
2323
public string DesktopDescription { get; set; } = "Avalonia desktop app for browsing and analyzing Copilot request/session logs";

build/Build.UtilityTargets.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ string InvokeAdbCapture(IReadOnlyList<string> arguments, bool allowFailure = fal
551551
{
552552
var commandArguments = new List<string> { "-s", serial };
553553
commandArguments.AddRange(arguments);
554-
var result = InvokeProcess("adb", commandArguments, RepoRootPath, false);
554+
var result = InvokeProcess(ResolveAdbPath(), commandArguments, RepoRootPath, false);
555555
if (!allowFailure && result.ExitCode != 0)
556556
{
557557
throw new InvalidOperationException($"adb {string.Join(" ", commandArguments)} failed.{Environment.NewLine}{result.GetCombinedOutput()}");
@@ -573,7 +573,7 @@ void WriteArtifact(string name, string content)
573573
}
574574

575575
EnsureDirectoryExists(effectiveOutputRoot);
576-
InvokeProcess("adb", new List<string> { "devices" }, RepoRootPath, true);
576+
InvokeProcess(ResolveAdbPath(), new List<string> { "devices" }, RepoRootPath, true);
577577

578578
WriteArtifact("session-metadata.json", JsonSerializer.Serialize(new
579579
{
@@ -584,7 +584,7 @@ void WriteArtifact(string name, string content)
584584
capturedAtUtc = DateTime.UtcNow.ToString("O", CultureInfo.InvariantCulture)
585585
}, new JsonSerializerOptions { WriteIndented = true }));
586586

587-
WriteArtifact("adb-devices.txt", InvokeProcess("adb", new List<string> { "devices", "-l" }, RepoRootPath, false).GetCombinedOutput());
587+
WriteArtifact("adb-devices.txt", InvokeProcess(ResolveAdbPath(), new List<string> { "devices", "-l" }, RepoRootPath, false).GetCombinedOutput());
588588
WriteArtifact("device-getprop.txt", InvokeAdbCapture(new List<string> { "shell", "getprop" }, true));
589589
WriteArtifact("device-build.txt", InvokeAdbCapture(new List<string> { "shell", "dumpsys", "package", PackageName }, true));
590590

@@ -646,7 +646,7 @@ dotnet run --project build/Build.csproj -- --target CollectAndroidCrashArtifacts
646646
if (IncludeBugreport)
647647
{
648648
var bugreportBase = Path.Combine(effectiveOutputRoot, "bugreport");
649-
var bugreportResult = InvokeProcess("adb", new List<string> { "-s", serial, "bugreport", bugreportBase }, RepoRootPath, false);
649+
var bugreportResult = InvokeProcess(ResolveAdbPath(), new List<string> { "-s", serial, "bugreport", bugreportBase }, RepoRootPath, false);
650650
WriteArtifact("bugreport-command-output.txt", bugreportResult.GetCombinedOutput());
651651
}
652652
}
-80.3 KB
Binary file not shown.
-80.3 KB
Binary file not shown.
-80.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)