From a8233adff75a4726015c7c96ce5e864d4506f6b2 Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Fri, 14 Aug 2026 18:00:29 +0900 Subject: release: prepare WinAgent Sandbox MCP v0.1.0 Unify the public product name and repository identifier while preserving stable executable, store, AppContainer, namespace, pipe, and mutex identifiers. Make Directory.Build.props VersionPrefix the application-version source of truth, use SDK-generated assembly metadata, and compare helper compatibility by parsed major/minor/build release identity. Rebuild the fixed winagent-sandbox-mcp release staging directory from clean defaults, emit versioned ZIP/checksum assets, verify manifests and fresh extraction, and reject local configuration, user state, and test artifacts. Document release/deployment separation and upgrade responsibilities, add the initial changelog, update operational script paths, and record the v0.1.0 verification results. --- src/Agent.Admin/Agent.Admin.Host/WfpDynamicSession.cs | 10 +++++----- src/Agent.App/Agent.App.csproj | 2 +- src/Agent.Core/Prompts/FixedSystemPrompt.md | 2 +- src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs | 10 ++++++++-- src/Agent.Windows/Security/AppContainerProfile.cs | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/Agent.Admin/Agent.Admin.Host/WfpDynamicSession.cs b/src/Agent.Admin/Agent.Admin.Host/WfpDynamicSession.cs index 4aa21da..3961e83 100644 --- a/src/Agent.Admin/Agent.Admin.Host/WfpDynamicSession.cs +++ b/src/Agent.Admin/Agent.Admin.Host/WfpDynamicSession.cs @@ -20,7 +20,7 @@ public sealed unsafe class WfpDynamicSession : IDisposable private readonly List _filterIds = []; private WfpDynamicSession(FwpmEngineClose0SafeHandle engine) => _engine = engine; - public static WfpDynamicSession Open(string displayName = "Agent Sandbox MCP dynamic task session") + public static WfpDynamicSession Open(string displayName = "WinAgent Sandbox MCP dynamic task session") { FWPM_SESSION0 session = default; session.flags = PInvoke.FWPM_SESSION_FLAG_DYNAMIC; @@ -48,7 +48,7 @@ public sealed unsafe class WfpDynamicSession : IDisposable try { Guid subLayerKey = Guid.NewGuid(); - fixed (char* subLayerName = "Agent Sandbox MCP task sublayer") + fixed (char* subLayerName = "WinAgent Sandbox MCP task sublayer") { FWPM_SUBLAYER0 subLayer = default; subLayer.subLayerKey = subLayerKey; @@ -60,8 +60,8 @@ public sealed unsafe class WfpDynamicSession : IDisposable fixed (byte* sidPointer = sidBytes) { foreach (NetworkEndpoint endpoint in allowedEndpoints ?? []) _filterIds.Add(AddPackagePermit(endpoint, subLayerKey, (SID*)sidPointer)); - _filterIds.Add(AddPackageBlock(PInvoke.FWPM_LAYER_ALE_AUTH_CONNECT_V4, subLayerKey, (SID*)sidPointer, "Agent Sandbox MCP IPv4 default block")); - _filterIds.Add(AddPackageBlock(PInvoke.FWPM_LAYER_ALE_AUTH_CONNECT_V6, subLayerKey, (SID*)sidPointer, "Agent Sandbox MCP IPv6 default block")); + _filterIds.Add(AddPackageBlock(PInvoke.FWPM_LAYER_ALE_AUTH_CONNECT_V4, subLayerKey, (SID*)sidPointer, "WinAgent Sandbox MCP IPv4 default block")); + _filterIds.Add(AddPackageBlock(PInvoke.FWPM_LAYER_ALE_AUTH_CONNECT_V6, subLayerKey, (SID*)sidPointer, "WinAgent Sandbox MCP IPv6 default block")); } ThrowIfError(PInvoke.FwpmTransactionCommit0(_engine), "FwpmTransactionCommit0"); committed = true; @@ -159,7 +159,7 @@ public sealed unsafe class WfpDynamicSession : IDisposable conditions[2].matchType = FWP_MATCH_TYPE.FWP_MATCH_EQUAL; conditions[2].conditionValue.type = FWP_DATA_TYPE.FWP_UINT16; conditions[2].conditionValue.uint16 = endpoint.Port; - string displayName = $"Agent Sandbox MCP allow {endpoint.Address}:{endpoint.Port}"; + string displayName = $"WinAgent Sandbox MCP allow {endpoint.Address}:{endpoint.Port}"; fixed (char* name = displayName) { FWPM_FILTER0 filter = default; diff --git a/src/Agent.App/Agent.App.csproj b/src/Agent.App/Agent.App.csproj index c63f3c0..9c46d09 100644 --- a/src/Agent.App/Agent.App.csproj +++ b/src/Agent.App/Agent.App.csproj @@ -4,7 +4,6 @@ net10.0-windows10.0.26100.0 agent-mcp Agent.App - 1.0.0 app.manifest @@ -26,5 +25,6 @@ + diff --git a/src/Agent.Core/Prompts/FixedSystemPrompt.md b/src/Agent.Core/Prompts/FixedSystemPrompt.md index 3cbc6e7..f3bd69f 100644 --- a/src/Agent.Core/Prompts/FixedSystemPrompt.md +++ b/src/Agent.Core/Prompts/FixedSystemPrompt.md @@ -1,4 +1,4 @@ -You are the execution agent inside AI Agent Sandbox MCP Server. +You are the execution agent inside WinAgent Sandbox MCP. Follow the active SandboxPolicy and never claim an external effect unless an Internal Tool result proves it occurred. Never reveal hidden reasoning, policy internals, credentials, or capabilities not present in the supplied capability summary. Complete a request only when every TaskGraph node is completed and all required effects are verified. diff --git a/src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs b/src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs index 89a2106..32086d3 100644 --- a/src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs +++ b/src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs @@ -36,9 +36,9 @@ public static class WindowsPlatformCheck bfe = true; if (helper) { - string current = Assembly.GetEntryAssembly()?.GetName().Version?.ToString(3) ?? ""; + Version? current = Assembly.GetEntryAssembly()?.GetName().Version; string candidate = FileVersionInfo.GetVersionInfo(helperPath).FileVersion ?? ""; - version = candidate.StartsWith(current, StringComparison.Ordinal); + version = current is not null && HasSameReleaseIdentity(current, candidate); } return new(platform, profile, bfe, helper, version, null, null); } @@ -47,6 +47,12 @@ public static class WindowsPlatformCheck { return new(platform, profile, bfe, helper, version, ex.HResult, ex.Message); } } + internal static bool HasSameReleaseIdentity(Version current, string candidate) + { + if (!Version.TryParse(candidate, out Version? parsed)) return false; + return current.Major == parsed.Major && current.Minor == parsed.Minor && current.Build == parsed.Build; + } + private static FwpmEngineClose0SafeHandle OpenBfeReadOnly() { uint result = PInvoke.FwpmEngineOpen0(10, null, null, out FwpmEngineClose0SafeHandle engine); diff --git a/src/Agent.Windows/Security/AppContainerProfile.cs b/src/Agent.Windows/Security/AppContainerProfile.cs index 97258ec..83b1675 100644 --- a/src/Agent.Windows/Security/AppContainerProfile.cs +++ b/src/Agent.Windows/Security/AppContainerProfile.cs @@ -14,7 +14,7 @@ public sealed partial class AppContainerProfile public static AppContainerProfile EnsureFixed() { - int result = Native.CreateAppContainerProfile(FixedName, "Agent Sandbox MCP v1", "Fixed sandbox profile for Agent Sandbox MCP", 0, 0, out nint sidPointer); + int result = Native.CreateAppContainerProfile(FixedName, "WinAgent Sandbox MCP", "Fixed sandbox profile for WinAgent Sandbox MCP", 0, 0, out nint sidPointer); if (result == AlreadyExists) result = Native.DeriveAppContainerSidFromAppContainerName(FixedName, out sidPointer); if (result < 0) Marshal.ThrowExceptionForHR(result); try -- cgit v1.2.3