Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions memex/Memex.Portal.Shared/Api/MeshApiEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
using MeshWeaver.Hosting.AspNetCore; // SessionHubResolver, McpConfiguration
using MeshWeaver.Mesh.Security; // WellKnownUsers
using MeshWeaver.Mesh.Services;
using MeshWeaver.AI; // MeshOperations — the TYPE ships in
// MeshWeaver.Mesh.Operations, but its namespace is a
// FROZEN binary contract (#2370), so this import is
// load-bearing and is NOT an AI-assembly dependency.
// Removed as a 'phantom' in #2349 and restored here.
using MeshWeaver.Messaging; // AccessService
using Memex.Portal.Shared.Authentication;
using Microsoft.AspNetCore.Builder;
Expand Down
19 changes: 19 additions & 0 deletions test/MeshWeaver.AI.Test/MarkdownReferenceExtractorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,4 +402,23 @@ public void ExtractReferences_EndIndex_IsExclusive()
}

#endregion

/// <summary>
/// Both UCR content forms — <c>content/…</c> and <c>content:…</c>, bare or partition-qualified.
///
/// <para>Moved from <c>MeshWeaver.Autocomplete.Test.UnifiedReferenceAutocompleteProviderTest</c>
/// (#2276). <see cref="MarkdownReferenceExtractor"/> ships with MeshWeaver.AI and was that
/// suite's last real dependency on the engine; the autocomplete pipeline it sits beside is core
/// and stays there.</para>
/// </summary>
[Theory]
[InlineData("@content/docs/readme.md", "content/docs/readme.md")]
[InlineData("@ACME/content/readme.md", "ACME/content/readme.md")]
[InlineData("@content:docs/readme.md", "content:docs/readme.md")]
[InlineData("@ACME/content:readme.md", "ACME/content:readme.md")]
public void HandlesBothContentFormats(string input, string expectedPath)
{
var paths = MarkdownReferenceExtractor.GetUniquePaths(input);
paths.Should().ContainSingle().Which.Should().Be(expectedPath);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\MeshWeaver.AI\MeshWeaver.AI.csproj" />
<ProjectReference Include="..\..\src\MeshWeaver.Fixture\MeshWeaver.Fixture.csproj" />
<ProjectReference Include="..\..\src\MeshWeaver.Hosting.Monolith\MeshWeaver.Hosting.Monolith.csproj" />
<ProjectReference Include="..\..\src\MeshWeaver.Hosting\MeshWeaver.Hosting.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,18 +565,4 @@ public void UcrPrefixResolver_RejectsInvalidPrefixes(string path)

#endregion

#region Content Reference Extraction Tests

[Theory]
[InlineData("@content/docs/readme.md", "content/docs/readme.md")]
[InlineData("@ACME/content/readme.md", "ACME/content/readme.md")]
[InlineData("@content:docs/readme.md", "content:docs/readme.md")]
[InlineData("@ACME/content:readme.md", "ACME/content:readme.md")]
public void MarkdownExtractor_HandlesBothContentFormats(string input, string expectedPath)
{
var paths = AI.MarkdownReferenceExtractor.GetUniquePaths(input);
paths.Should().ContainSingle().Which.Should().Be(expectedPath);
}

#endregion
}
Loading