Skip to content
Closed
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
14 changes: 7 additions & 7 deletions memex/Memex.Portal.Shared/OrganizationLayoutAreas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ public static class OrganizationLayoutAreas
{
var hubPath = host.Hub.Address.ToString();

var orgStream = host.Workspace.GetStream<Organization>()
?.Select(orgs => orgs?.FirstOrDefault())
?? Observable.Return<Organization?>(null);

var nodeStream = host.Workspace.GetStream<MeshNode>()
?.Select(nodes => nodes?.FirstOrDefault(n => n.Path == hubPath))
?? Observable.Return<MeshNode?>(null);

return orgStream.CombineLatest(nodeStream).SelectMany(async t =>
var orgStream = host.Workspace.GetStream<Organization>()
?.Select(orgs => orgs?.FirstOrDefault())
?? Observable.Return<Organization?>(null);

return nodeStream.CombineLatest(orgStream).SelectMany(async t =>
{
var (org, node) = t;
if (org == null && node == null)
var (node, org) = t;
if (node == null)
return Controls.Markdown("*Loading...*") as UiControl;

var perms = await PermissionHelper.GetEffectivePermissionsAsync(host.Hub, hubPath);
Expand Down
1 change: 1 addition & 0 deletions memex/Memex.Portal.Shared/OrganizationNodeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public IEnumerable<MeshNode> GetStaticNodes()
.AddContentCollections()
.AddNodeTypeLayoutAreas()
.AddLayout(layout => layout
.WithDefaultArea(MeshNodeLayoutAreas.OverviewArea)
.WithView(MeshNodeLayoutAreas.OverviewArea, OrganizationLayoutAreas.Overview))
};

Expand Down
6 changes: 3 additions & 3 deletions samples/Graph/Data/ACME/Documentation/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ Key features:

For detailed understanding of MeshWeaver's architecture in the context of the Software Sample Organization:

- **[Understanding MeshWeaver Architecture](ACME/Documentation/Architecture)**: Message hubs, MVVM patterns, reactive design
- **[AI Agent Integration](ACME/Documentation/AIAgentIntegration)**: How AI agents work with MeshWeaver
- **[Unified References](ACME/Documentation/UnifiedReferences)**: Path syntax and reference patterns
- **[Understanding MeshWeaver Architecture](@ACME/Documentation/Architecture)**: Message hubs, MVVM patterns, reactive design
- **[AI Agent Integration](@ACME/Documentation/AIAgentIntegration)**: How AI agents work with MeshWeaver
- **[Unified References](@ACME/Documentation/UnifiedReferences)**: Path syntax and reference patterns

# Next Steps

Expand Down
8 changes: 4 additions & 4 deletions samples/Graph/Data/ACME/Documentation/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ The Software sample organization demonstrates MeshWeaver capabilities through re

| Topic | Go here |
|-------|---------|
| Get up and running | [Getting Started](ACME/Documentation/GettingStarted) - Setup, navigation, first steps |
| Understand the architecture | [Architecture](ACME/Documentation/Architecture) - MeshNodes, namespaces, message hubs |
| Add AI to your app | [AI Agent Integration](ACME/Documentation/AIAgentIntegration) - Agents, MeshPlugin, NLP |
| Reference paths and queries | [Unified References](ACME/Documentation/UnifiedReferences) - Paths, queries, layout areas |
| Get up and running | [Getting Started](@ACME/Documentation/GettingStarted) - Setup, navigation, first steps |
| Understand the architecture | [Architecture](@ACME/Documentation/Architecture) - MeshNodes, namespaces, message hubs |
| Add AI to your app | [AI Agent Integration](@ACME/Documentation/AIAgentIntegration) - Agents, MeshPlugin, NLP |
| Reference paths and queries | [Unified References](@ACME/Documentation/UnifiedReferences) - Paths, queries, layout areas |

---

Expand Down
18 changes: 9 additions & 9 deletions samples/Graph/Data/ACME/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Welcome to ACME, a task management demo showcasing MeshWeaver's collaborative pr

| Resource | Description |
|----------|-------------|
| [CustomerOnboarding](ACME/CustomerOnboarding) | Insurance onboarding workflow with compliance tasks |
| [ProductLaunch](ACME/ProductLaunch) | Marketing campaign with cross-functional tasks |
| [Getting Started](ACME/Documentation/GettingStarted) | Setup and first steps |
| [Documentation](ACME/Documentation) | Complete guides and references |
| [CustomerOnboarding](@ACME/CustomerOnboarding) | Insurance onboarding workflow with compliance tasks |
| [ProductLaunch](@ACME/ProductLaunch) | Marketing campaign with cross-functional tasks |
| [Getting Started](@ACME/Documentation/GettingStarted) | Setup and first steps |
| [Documentation](@ACME/Documentation) | Complete guides and references |

---

Expand All @@ -39,8 +39,8 @@ ACME (Organization)

| Project | Focus | Tasks |
|---------|-------|-------|
| [CustomerOnboarding](ACME/CustomerOnboarding) | Insurance compliance | KYC review, risk scoring, policy generation |
| [ProductLaunch](ACME/ProductLaunch) | Marketing campaign | Landing pages, demos, sales training |
| [CustomerOnboarding](@ACME/CustomerOnboarding) | Insurance compliance | KYC review, risk scoring, policy generation |
| [ProductLaunch](@ACME/ProductLaunch) | Marketing campaign | Landing pages, demos, sales training |

---

Expand Down Expand Up @@ -90,6 +90,6 @@ Projects include multiple perspectives for task management:

| Topic | Link |
|-------|------|
| Architecture | [How ACME is built](ACME/Documentation/Architecture) |
| AI Integration | [Using the TodoAgent](ACME/Documentation/AIAgentIntegration) |
| References | [Paths, queries, and areas](ACME/Documentation/UnifiedReferences) |
| Architecture | [How ACME is built](@ACME/Documentation/Architecture) |
| AI Integration | [Using the TodoAgent](@ACME/Documentation/AIAgentIntegration) |
| References | [Paths, queries, and areas](@ACME/Documentation/UnifiedReferences) |
8 changes: 4 additions & 4 deletions samples/Graph/Data/Cornerstone/Documentation/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ The Cornerstone sample organization demonstrates MeshWeaver capabilities through

| Topic | Go here |
|-------|---------|
| Get up and running | [Getting Started](Cornerstone/Documentation/GettingStarted) - Setup, navigation, first steps |
| Understand the architecture | [Architecture](Cornerstone/Documentation/Architecture) - Data model, NodeTypes, pricing pipeline |
| Add AI to your app | [AI Agent Integration](Cornerstone/Documentation/AIAgentIntegration) - Pricing assistant, risk queries |
| Reference paths and queries | [Unified References](Cornerstone/Documentation/UnifiedReferences) - Paths, queries, layout areas |
| Get up and running | [Getting Started](@Cornerstone/Documentation/GettingStarted) - Setup, navigation, first steps |
| Understand the architecture | [Architecture](@Cornerstone/Documentation/Architecture) - Data model, NodeTypes, pricing pipeline |
| Add AI to your app | [AI Agent Integration](@Cornerstone/Documentation/AIAgentIntegration) - Pricing assistant, risk queries |
| Reference paths and queries | [Unified References](@Cornerstone/Documentation/UnifiedReferences) - Paths, queries, layout areas |

---

Expand Down
28 changes: 14 additions & 14 deletions samples/Graph/Data/Cornerstone/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Welcome to Cornerstone, a reinsurance pricing demo showcasing MeshWeaver's capab

| Resource | Description |
|----------|-------------|
| [Microsoft](Cornerstone/Microsoft) | Technology sector pricing with full sample data |
| [Tesla](Cornerstone/Tesla) | Industrial and specialty lines |
| [Nestle](Cornerstone/Nestle) | Consumer and agricultural coverage |
| [Getting Started](Cornerstone/Documentation/GettingStarted) | Setup and first steps |
| [Documentation](Cornerstone/Documentation) | Complete guides and references |
| [Microsoft](@Cornerstone/Microsoft) | Technology sector pricing with full sample data |
| [Tesla](@Cornerstone/Tesla) | Industrial and specialty lines |
| [Nestle](@Cornerstone/Nestle) | Consumer and agricultural coverage |
| [Getting Started](@Cornerstone/Documentation/GettingStarted) | Setup and first steps |
| [Documentation](@Cornerstone/Documentation) | Complete guides and references |

---

Expand All @@ -40,12 +40,12 @@ Each insured company contains yearly pricing instances with property risks, rein

| Insured | Sector | Status |
|---------|--------|--------|
| [Microsoft](Cornerstone/Microsoft) | Technology | Full sample data (2026) |
| [Tesla](Cornerstone/Tesla) | Industrial | Sample pricing (2026) |
| [Nestle](Cornerstone/Nestle) | Consumer/Agriculture | Sample pricing (2026) |
| [GlobalManufacturing](Cornerstone/GlobalManufacturing) | Manufacturing | Historical (2024) |
| [EuropeanLogistics](Cornerstone/EuropeanLogistics) | Logistics | Historical (2024) |
| [TechIndustries](Cornerstone/TechIndustries) | Technology | Historical (2024) |
| [Microsoft](@Cornerstone/Microsoft) | Technology | Full sample data (2026) |
| [Tesla](@Cornerstone/Tesla) | Industrial | Sample pricing (2026) |
| [Nestle](@Cornerstone/Nestle) | Consumer/Agriculture | Sample pricing (2026) |
| [GlobalManufacturing](@Cornerstone/GlobalManufacturing) | Manufacturing | Historical (2024) |
| [EuropeanLogistics](@Cornerstone/EuropeanLogistics) | Logistics | Historical (2024) |
| [TechIndustries](@Cornerstone/TechIndustries) | Technology | Historical (2024) |

---

Expand Down Expand Up @@ -97,6 +97,6 @@ Pricings use standardized dimensions for filtering and aggregation:

| Topic | Link |
|-------|------|
| Architecture | [How Cornerstone is built](Cornerstone/Documentation/Architecture) |
| AI Integration | [Using the pricing assistant](Cornerstone/Documentation/AIAgentIntegration) |
| References | [Paths, queries, and areas](Cornerstone/Documentation/UnifiedReferences) |
| Architecture | [How Cornerstone is built](@Cornerstone/Documentation/Architecture) |
| AI Integration | [Using the pricing assistant](@Cornerstone/Documentation/AIAgentIntegration) |
| References | [Paths, queries, and areas](@Cornerstone/Documentation/UnifiedReferences) |
8 changes: 4 additions & 4 deletions samples/Graph/Data/Northwind/Documentation/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ The Northwind sample demonstrates MeshWeaver capabilities through a realistic go

| Topic | Go here |
|-------|---------|
| Get up and running | [Getting Started](Northwind/Documentation/GettingStarted) - Setup, navigation, first steps |
| Understand the architecture | [Architecture](Northwind/Documentation/Architecture) - Data model, views, analytics pipeline |
| Add AI to your app | [AI Agent Integration](Northwind/Documentation/AIAgentIntegration) - NorthwindAgent, analytics queries |
| Reference paths and queries | [Unified References](Northwind/Documentation/UnifiedReferences) - Paths, queries, layout areas |
| Get up and running | [Getting Started](@Northwind/Documentation/GettingStarted) - Setup, navigation, first steps |
| Understand the architecture | [Architecture](@Northwind/Documentation/Architecture) - Data model, views, analytics pipeline |
| Add AI to your app | [AI Agent Integration](@Northwind/Documentation/AIAgentIntegration) - NorthwindAgent, analytics queries |
| Reference paths and queries | [Unified References](@Northwind/Documentation/UnifiedReferences) - Paths, queries, layout areas |

---

Expand Down
16 changes: 8 additions & 8 deletions samples/Graph/Data/Northwind/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Welcome to Northwind, a comprehensive analytics demo showcasing MeshWeaver's cap

| Resource | Description |
|----------|-------------|
| [Analytics](Northwind/Analytics) | 53 interactive dashboards and analytics views |
| [Getting Started](Northwind/Documentation/GettingStarted) | Setup and first steps |
| [Documentation](Northwind/Documentation) | Complete guides and references |
| [Reports](Northwind/Reports) | Pre-built analytical reports |
| [Analytics](@Northwind/Analytics) | 53 interactive dashboards and analytics views |
| [Getting Started](@Northwind/Documentation/GettingStarted) | Setup and first steps |
| [Documentation](@Northwind/Documentation) | Complete guides and references |
| [Reports](@Northwind/Reports) | Pre-built analytical reports |

---

Expand All @@ -34,7 +34,7 @@ Explore **53 views** organized across 8 categories:
- **Suppliers** - Supplier analytics
- **Financial** - Financial metrics and profitability

[Open Analytics](Northwind/Analytics)
[Open Analytics](@Northwind/Analytics)

---

Expand Down Expand Up @@ -88,6 +88,6 @@ Northwind specializes in gourmet foods:

| Topic | Link |
|-------|------|
| Architecture | [How Northwind is built](Northwind/Documentation/Architecture) |
| AI Integration | [Using the NorthwindAgent](Northwind/Documentation/AIAgentIntegration) |
| References | [Paths, queries, and areas](Northwind/Documentation/UnifiedReferences) |
| Architecture | [How Northwind is built](@Northwind/Documentation/Architecture) |
| AI Integration | [Using the NorthwindAgent](@Northwind/Documentation/AIAgentIntegration) |
| References | [Paths, queries, and areas](@Northwind/Documentation/UnifiedReferences) |
2 changes: 1 addition & 1 deletion src/MeshWeaver.Blazor.Portal/Components/SearchHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private static async Task ExecuteTextSearchAsync(
IMeshService meshService, SearchRequest req, PendingSearch pending, CancellationToken ct)
{
// Fetch a wider pool so scoring can surface the best matches
var query = $"*{req.Input}* scope:descendants context:search is:main limit:{CandidatePoolSize}";
var query = $"*{req.Input}* scope:subtree context:search is:main limit:{CandidatePoolSize}";
var candidates = new List<QuerySuggestion>();

await foreach (var obj in meshService.QueryAsync(
Expand Down
5 changes: 5 additions & 0 deletions src/MeshWeaver.Hosting/Security/AccessControlPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public static MessageHubConfiguration AddAccessControlPipeline(this MessageHubCo
if (attr == null)
return await next.Invoke(delivery, ct);

// Hub-to-hub communication is trusted infrastructure — skip access control.
// This handles child hubs subscribing to parent data during initialization.
if (delivery.AccessContext is { IsHub: true })
return await next.Invoke(delivery, ct);

var userId = ResolveIdentity(delivery, accessService);

// Log identity resolution details for debugging access issues
Expand Down
12 changes: 9 additions & 3 deletions src/MeshWeaver.Markdown/LinkUrlCleanupExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ private void ResolveLinks(MarkdownDocument document)

var url = link.Url;

// Strip leading '@' prefix
if (url.StartsWith('@'))
// Track whether URL had @ prefix (UCR = absolute mesh path)
var wasAtPrefixed = url.StartsWith('@');
if (wasAtPrefixed)
url = url.TrimStart('@');

// Skip external links, anchors, and mailto
Expand All @@ -52,9 +53,14 @@ private void ResolveLinks(MarkdownDocument document)
// Already absolute — keep as-is
link.Url = url + fragment;
}
else if (wasAtPrefixed && !string.IsNullOrEmpty(url))
{
// @-prefixed = absolute UCR reference — prepend / directly, no relative resolution
link.Url = $"/{url}" + fragment;
}
else if (!string.IsNullOrEmpty(url))
{
// Relative — resolve against current node path, prepend '/'
// Bare relative path — resolve against current node path, prepend '/'
var resolved = PathUtils.ResolveRelativePath(url, currentNodePath);
link.Url = $"/{resolved}" + fragment;
}
Expand Down
6 changes: 6 additions & 0 deletions src/MeshWeaver.Messaging.Contract/AccessContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ public record AccessContext
/// The Api permission flag is required for operations in this context.
/// </summary>
public bool IsApiToken { get; init; }

/// <summary>
/// When true, this context represents a hub identity (set by ImpersonateAsHub).
/// Hub-to-hub communication is trusted infrastructure and bypasses access control.
/// </summary>
public bool IsHub { get; init; }
}
3 changes: 2 additions & 1 deletion src/MeshWeaver.Messaging.Hub/AccessService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ public IDisposable ImpersonateAsHub(IMessageHub hub)
return new AccessContextScope(this, new AccessContext
{
ObjectId = hub.Address.ToFullString(),
Name = hub.Address.ToString()
Name = hub.Address.ToString(),
IsHub = true
});
}

Expand Down
3 changes: 2 additions & 1 deletion src/MeshWeaver.Messaging.Hub/PostOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public PostOptions ImpersonateAsHub(Address hubAddress) => this with
ImpersonateContext = new AccessContext
{
ObjectId = hubAddress.ToFullString(),
Name = hubAddress.ToString()
Name = hubAddress.ToString(),
IsHub = true
}
};

Expand Down
Loading
Loading