Skip to content

Commit cdb0879

Browse files
committed
Refactor, modernize, and restructure MCP Server projects
- Migrated McpServer.Director and McpServer.Web into the workspace; updated solution, CI/CD, and submodules. - Removed all .NET, Blazor, and Bunit test projects and files for Director, UI.Core, and Web. - Modernized VSIX and Android projects: updated target frameworks, build settings, and resource handling. - Enhanced RepoScreen with directory navigation and improved workspace path resolution in MainWindowViewModel. - Improved VoiceConversationViewModel and TodoListHostViewModel for robustness and UX. - Updated dependencies, build tooling, and TypeScript config. - Major refactor of McpServerManager.Core: introduced MVVM data resolution pattern, unified DI registration, and cross-platform voice/chat UI. - Added new documentation for MVVM data flow and DI/service registration. - Improved CQRS/DI setup and interface inheritance for service mapping. - Added comprehensive test projects and suites for UI Core, Web, Manager.Core, and Desktop UI, covering ViewModels, CQRS, DI, and UI behaviors. - Reformatted McpSession.psm1 for consistency; no logic changes. - Miscellaneous: removed global xUnit usings, updated submodules, and performed minor code cleanups.
1 parent 9e97fa1 commit cdb0879

108 files changed

Lines changed: 1072 additions & 197 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.

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@
33
<!-- Avoid compiling generated sources from ad-hoc build output folders. -->
44
<DefaultItemExcludes>$(DefaultItemExcludes);artifacts/**;artifacts\**</DefaultItemExcludes>
55
</PropertyGroup>
6+
7+
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
8+
<!-- Third-party dependencies are still consumed for net461 compatibility targets. -->
9+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
10+
</PropertyGroup>
611
</Project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# MVVM Data Resolution Pattern
2+
3+
This workspace uses a strict MVVM source-of-truth pattern for runtime data.
4+
5+
## Rules
6+
- Never push view-owned runtime data into services just to satisfy timing.
7+
- ViewModels expose resolver/readiness functions for dynamic state.
8+
- Views only initiate actions when ViewModel readiness gates pass.
9+
- Service clients consume data through resolver delegates.
10+
- Selection/switch workflows publish state changes; consumers react.
11+
12+
## Required Shape
13+
- `ResolveXxx`: returns current value from source-of-truth state.
14+
- `ResolveXxxReady`: returns `true` only when action preconditions are stable.
15+
- Action handlers must guard with `ResolveXxxReady` before invoking network/session calls.
16+
17+
## Applied Example
18+
- Workspace path resolution and voice-start readiness are implemented through:
19+
- `ResolveActiveWorkspacePath`
20+
- `ResolveWorkspaceReady`
21+
- `VoiceConversationViewModel.IsWorkspaceReady`
22+
23+
## Rollout Requirement
24+
All apps in this workspace should follow this pattern for every runtime data flow:
25+
- Desktop
26+
- Android
27+
- Shared UI.Core/Core viewmodels
28+
- Director/Web viewmodels where applicable
29+
30+
Avoid imperative writes that bypass viewmodel state ownership.

docs/todo.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ Architecture:
420420
done: true
421421
- id: ARCH-MIGRATE-002
422422
title: Migrate McpServer.Director and McpServer.Web projects to this workspace
423-
done: false
423+
done: true
424424
completed: 2026-03-06T12:51:56.5636092Z
425425
description:
426426
- Migrate McpServer.Director and McpServer.Web projects from McpServer Workspace to this workspace (RequestTracker).
@@ -816,3 +816,16 @@ refactoring:
816816
done: false
817817
- task: 'M5.3 Verify and complete AgentApiClientAdapter coverage in McpServer.Web (GAP-018/019 partial): confirm agent-pool queue/job/stream/notifications adapter operations are wired or document remaining Web adapter gaps'
818818
done: false
819+
mvp-mcp:
820+
high-priority:
821+
- id: DEPLOY-ALLSCRIPT-001
822+
title: A script to deploy all targets
823+
done: false
824+
description:
825+
- '- Director as Global Dotnet Tool'
826+
- '- Web-UI as Global Dotnet Tool'
827+
- '- Android to attached Phone'
828+
- '- Android to attached Emulator'
829+
- '- Desktop as MSIX to Windows'
830+
- '- Desktop as DEB to WSL'
831+
medium-priority: []

extensions/McpServer-mcp-todo/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/McpServer-mcp-todo/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
],
1313
"activationEvents": [
1414
"onStartupFinished",
15-
"onView:fwhMcpTodo.todoList",
16-
"onView:fwhMcpTodo.filters",
1715
"workspaceContains:FunWasHad.sln"
1816
],
1917
"main": "./out/extension.js",

extensions/McpServer-mcp-todo/tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"compilerOptions": {
3+
"forceConsistentCasingInFileNames": true,
34
"module": "commonjs",
45
"target": "ES2022",
56
"outDir": "out",
6-
"lib": ["ES2022"],
7+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
78
"sourceMap": true,
89
"rootDir": "src",
910
"strict": true,
1011
"esModuleInterop": true,
11-
"skipLibCheck": true
12+
"skipLibCheck": true,
13+
"skipDefaultLibCheck": true
1214
},
1315
"include": ["src/**/*"],
1416
"exclude": ["node_modules"]

lib/McpServer

nupkg/SharpNinja.McpServer.Director.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
33
<metadata>
44
<id>SharpNinja.McpServer.Director</id>
5-
<version>0.2.56-beta.341</version>
5+
<version>0.5.1-14</version>
66
<authors>SharpNinja</authors>
77
<description>CLI management tool for McpServer. Provides workspace management, agent orchestration, compliance policy editing, Keycloak OIDC auth, and an interactive Terminal.Gui TUI with 7 tabbed screens. 18 CLI commands via System.CommandLine.</description>
88
<packageTypes>
99
<packageType name="DotnetTool" />
1010
</packageTypes>
1111
</metadata>
1212
<files>
13-
<file src="E:\github\McpServer\src\McpServer.Director\bin\Release\net9.0\publish\**" target="tools/net9.0/any" />
13+
<file src="E:\github\RequestTracker\src\McpServer.Director\bin\Release\net9.0\publish\**" target="tools/net9.0/any" />
1414
</files>
1515
</package>

nupkg/SharpNinja.McpServer.Web.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
33
<metadata>
44
<id>SharpNinja.McpServer.Web</id>
5-
<version>0.2.56-beta.341</version>
5+
<version>0.0.3-10</version>
66
<authors>SharpNinja</authors>
77
<description>SharpNinja.McpServer.Web</description>
88
<packageTypes>
99
<packageType name="DotnetTool" />
1010
</packageTypes>
1111
</metadata>
1212
<files>
13-
<file src="E:\github\McpServer\src\McpServer.Web\bin\Release\net9.0\publish\**" target="tools/net9.0/any" />
13+
<file src="E:\github\RequestTracker\src\McpServer.Web\bin\Release\net9.0\publish\**" target="tools/net9.0/any" />
1414
</files>
1515
</package>

scripts/Bump-GitVersionPatch.ps1

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<#
2+
.SYNOPSIS
3+
Bumps the patch level of GitVersion.yml next-version.
4+
5+
.DESCRIPTION
6+
Reads GitVersion.yml, increments the patch component of next-version
7+
(e.g. 0.2.0 -> 0.2.1), and writes the file back. Designed to be
8+
dot-sourced by other scripts to avoid duplication (TR-MCP-DRY-001).
9+
10+
.EXAMPLE
11+
. .\Bump-GitVersionPatch.ps1
12+
$result = Bump-GitVersionPatch -RepoRoot 'E:\github\McpServer'
13+
# $result.OldVersion = '0.2.0', $result.NewVersion = '0.2.1'
14+
#>
15+
16+
function Bump-GitVersionPatch {
17+
[CmdletBinding()]
18+
param(
19+
[Parameter(Mandatory)]
20+
[string]$RepoRoot
21+
)
22+
23+
$gitVersionPath = Join-Path $RepoRoot 'GitVersion.yml'
24+
if (-not (Test-Path $gitVersionPath)) {
25+
Write-Error "GitVersion.yml not found at $gitVersionPath"
26+
}
27+
28+
$content = Get-Content -Path $gitVersionPath -Raw
29+
$match = [regex]::Match($content, '(?m)^next-version:\s*(\d+)\.(\d+)\.(\d+)')
30+
if (-not $match.Success) {
31+
Write-Error "Could not parse next-version from GitVersion.yml"
32+
}
33+
34+
$major = [int]$match.Groups[1].Value
35+
$minor = [int]$match.Groups[2].Value
36+
$patch = [int]$match.Groups[3].Value
37+
$oldVersion = "$major.$minor.$patch"
38+
$newVersion = "$major.$minor.$($patch + 1)"
39+
40+
$newContent = $content -replace '(?m)^(next-version:\s*)\d+\.\d+\.\d+', "`${1}$newVersion"
41+
Set-Content -Path $gitVersionPath -Value $newContent -NoNewline
42+
git -C $RepoRoot add GitVersion.yml 2>&1 | Out-Null
43+
44+
return [pscustomobject]@{
45+
OldVersion = $oldVersion
46+
NewVersion = $newVersion
47+
}
48+
}

0 commit comments

Comments
 (0)