0.9.3.8: Add NexSearch, Places, Land Portal and Destination Guide
Complete Roadmap 12 with native discovery services, moderated destination content, land portal projection, optional viewer capabilities, OpenAPI/docs and CI regression coverage.
This commit is contained in:
1 parent
b7e340a258
commit
fca0a1bf97
19 files changed
+2959
-81
No files matched your search
@@ -233,6 +233,14 @@ jobs:
|
||||
shell: bash
|
||||
run: dotnet run --configuration Release --project tools/ci/NexExperiencesRegression/NexExperiencesRegression.csproj
|
||||
|
||||
- name: Verify Roadmap 12 NexDiscovery
|
||||
shell: bash
|
||||
run: python3 tools/ci/verify_nexdiscovery.py
|
||||
|
||||
- name: Regression-test NexDiscovery persistence and moderation
|
||||
shell: bash
|
||||
run: dotnet run --configuration Release --project tools/ci/NexDiscoveryRegression/NexDiscoveryRegression.csproj
|
||||
|
||||
- name: Verify NV dollar live database matrix contract
|
||||
shell: bash
|
||||
run: python3 tools/ci/verify_ledger_db_matrix.py
|
||||
@@ -406,10 +414,10 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
grep -F 'public const string ProductName = "OpenGenesisLINK";' OpenSim/Framework/VersionInfo.cs
|
||||
grep -F 'public const string VersionNumber = "0.9.3.7";' OpenSim/Framework/VersionInfo.cs
|
||||
grep -F 'public const string AssemblyVersionNumber = "0.9.3.7";' OpenSim/Framework/VersionInfo.cs
|
||||
grep -F 'public const string VersionNumber = "0.9.3.8";' OpenSim/Framework/VersionInfo.cs
|
||||
grep -F 'public const string AssemblyVersionNumber = "0.9.3.8";' OpenSim/Framework/VersionInfo.cs
|
||||
grep -F 'public const Flavour VERSION_FLAVOUR = Flavour.Dev;' OpenSim/Framework/VersionInfo.cs
|
||||
grep -F 'public const string MilestoneVersion = "0.9.3.7";' NexVerse/Core/NexVersePlatform.cs
|
||||
grep -F 'public const string MilestoneVersion = "0.9.3.8";' NexVerse/Core/NexVersePlatform.cs
|
||||
grep -F 'Development checkpoint status: completed 3 October 2026' doc/NexVerse/CHECKPOINT_0.9.3.2.md
|
||||
grep -F '36/36 explicit checklist items completed' doc/NexVerse/CHECKPOINT_0.9.3.2.md
|
||||
|
||||
@@ -459,7 +467,7 @@ jobs:
|
||||
grep -F '"status": "ok"' /tmp/nexverse-health.json
|
||||
|
||||
curl --silent --fail --max-time 2 http://127.0.0.1:19090/api/v1/version > /tmp/nexverse-version.json
|
||||
grep -F '"server_version": "OpenGenesisLINK 0.9.3.7 Dev"' /tmp/nexverse-version.json
|
||||
grep -F '"server_version": "OpenGenesisLINK 0.9.3.8 Dev"' /tmp/nexverse-version.json
|
||||
grep -F '"api_version": "v1"' /tmp/nexverse-version.json
|
||||
grep -F '"language": "de-DE"' /tmp/nexverse-version.json
|
||||
|
||||
@@ -670,6 +678,28 @@ jobs:
|
||||
):
|
||||
assert inventory_path in doc["paths"], f"Inventory OpenAPI path missing: {inventory_path}"
|
||||
|
||||
for discovery_path in (
|
||||
"/api/v1/search",
|
||||
"/api/v1/places",
|
||||
"/api/v1/places/{placeId}",
|
||||
"/api/v1/events",
|
||||
"/api/v1/classifieds",
|
||||
"/api/v1/land-portal",
|
||||
"/api/v1/land-portal/owned",
|
||||
"/api/v1/destinations",
|
||||
"/api/v1/destinations/categories",
|
||||
"/api/v1/destinations/{destinationId}",
|
||||
"/api/v1/destinations/{destinationId}/visit",
|
||||
"/api/v1/destinations/{destinationId}/moderation",
|
||||
):
|
||||
assert discovery_path in doc["paths"], f"Discovery OpenAPI path missing: {discovery_path}"
|
||||
|
||||
assert doc["paths"]["/api/v1/search"]["get"]["security"] == []
|
||||
assert doc["paths"]["/api/v1/places"]["get"]["security"] == []
|
||||
assert doc["paths"]["/api/v1/places"]["post"]["x-nexverse-scope"] == "discovery:manage"
|
||||
assert doc["paths"]["/api/v1/destinations"]["post"]["x-nexverse-scope"] == "discovery:submit"
|
||||
assert doc["paths"]["/api/v1/destinations/{destinationId}/moderation"]["post"]["x-nexverse-scope"] == "discovery:manage"
|
||||
|
||||
assert doc["components"]["securitySchemes"]["apiKeyAuth"]["name"] == "X-NexVerse-Api-Key"
|
||||
assert doc["x_nexverse_idempotency"]["protected_operations"] == [
|
||||
"POST /api/v1/users",
|
||||
@@ -680,14 +710,16 @@ jobs:
|
||||
assert "/api/v1/docs" in doc["paths"]
|
||||
assert doc["x_nexverse_language"] == "de-DE"
|
||||
assert doc["x_nexverse_version_history"][0]["api_version"] == "v1"
|
||||
assert doc["x_nexverse_version_history"][0]["server_line"] == "0.9.3.7"
|
||||
assert doc["x_nexverse_version_history"][0]["server_line"] == "0.9.3.8"
|
||||
assert doc["x_nexverse_version_history"][0]["status"] == "development"
|
||||
assert doc["x_nexverse_version_history"][1]["server_line"] == "0.9.3.6"
|
||||
assert doc["x_nexverse_version_history"][1]["server_line"] == "0.9.3.7"
|
||||
assert doc["x_nexverse_version_history"][1]["status"] == "completed"
|
||||
assert doc["x_nexverse_version_history"][2]["server_line"] == "0.9.3.5"
|
||||
assert doc["x_nexverse_version_history"][2]["server_line"] == "0.9.3.6"
|
||||
assert doc["x_nexverse_version_history"][2]["status"] == "completed"
|
||||
assert doc["x_nexverse_version_history"][3]["server_line"] == "0.9.3.4"
|
||||
assert doc["x_nexverse_version_history"][3]["status"] == "release"
|
||||
assert doc["x_nexverse_version_history"][3]["server_line"] == "0.9.3.5"
|
||||
assert doc["x_nexverse_version_history"][3]["status"] == "completed"
|
||||
assert doc["x_nexverse_version_history"][4]["server_line"] == "0.9.3.4"
|
||||
assert doc["x_nexverse_version_history"][4]["status"] == "release"
|
||||
assert doc["x_nexverse_changelog"]
|
||||
assert doc["x_nexverse_changelog"][0]["version"] == "0.9.3.3"
|
||||
assert "0.9.3.1 Dev" not in json.dumps(doc, ensure_ascii=False)
|
||||
@@ -708,7 +740,7 @@ jobs:
|
||||
assert "/api/v1/estates/{estateId}/regions/{regionId}" in estate_change["endpoints"]
|
||||
|
||||
roadmap = doc["x_nexverse_roadmap"]
|
||||
assert roadmap["current_milestone"] == "0.9.3.7"
|
||||
assert roadmap["current_milestone"] == "0.9.3.8"
|
||||
assert roadmap["current_codename"] == ""
|
||||
milestones = {item["version"]: item for item in roadmap["milestones"]}
|
||||
assert milestones["0.9.3.1"]["status"] == "released"
|
||||
@@ -720,6 +752,7 @@ jobs:
|
||||
assert milestones["0.9.3.5"]["checklist"] == {"completed": 83, "total": 83, "open": 0}
|
||||
assert milestones["0.9.3.6"]["status"] == "completed"
|
||||
assert milestones["0.9.3.7"]["status"] == "completed"
|
||||
assert milestones["0.9.3.8"]["status"] == "completed"
|
||||
|
||||
from pathlib import Path
|
||||
roadmap_text = Path("../doc/NexVerse/ROADMAP.md").read_text(encoding="utf-8")
|
||||
|
||||
@@ -0,0 +1,692 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NexVerse.Core.Discovery
|
||||
{
|
||||
public enum NexDiscoveryMaturity
|
||||
{
|
||||
General = 0,
|
||||
Moderate = 1,
|
||||
Adult = 2
|
||||
}
|
||||
|
||||
public enum NexDiscoveryPublicationState
|
||||
{
|
||||
Draft = 0,
|
||||
Submitted = 1,
|
||||
Approved = 2,
|
||||
Rejected = 3
|
||||
}
|
||||
|
||||
public enum NexLandUse
|
||||
{
|
||||
Other = 0,
|
||||
Residential = 1,
|
||||
Commercial = 2,
|
||||
Mixed = 3
|
||||
}
|
||||
|
||||
public sealed class NexPlaceRecord
|
||||
{
|
||||
public Guid PlaceId { get; set; }
|
||||
public Guid RegionId { get; set; }
|
||||
public string RegionName { get; set; } = string.Empty;
|
||||
public Guid ParcelId { get; set; }
|
||||
public int ParcelLocalId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public NexDiscoveryMaturity Maturity { get; set; } = NexDiscoveryMaturity.General;
|
||||
public List<string> Images { get; set; } = new List<string>();
|
||||
public Guid OwnerId { get; set; }
|
||||
public int X { get; set; } = 128;
|
||||
public int Y { get; set; } = 128;
|
||||
public int Z { get; set; } = 25;
|
||||
public string TeleportUri { get; set; } = string.Empty;
|
||||
public string ParcelDetails { get; set; } = string.Empty;
|
||||
public double Traffic { get; set; }
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
public List<Guid> EventIds { get; set; } = new List<Guid>();
|
||||
public List<Guid> RelatedDestinationIds { get; set; } = new List<Guid>();
|
||||
public NexLandUse LandUse { get; set; } = NexLandUse.Other;
|
||||
public string RegionType { get; set; } = string.Empty;
|
||||
public bool Featured { get; set; }
|
||||
public NexDiscoveryPublicationState State { get; set; } = NexDiscoveryPublicationState.Draft;
|
||||
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class NexEventRecord
|
||||
{
|
||||
public Guid EventId { get; set; }
|
||||
public Guid PlaceId { get; set; }
|
||||
public Guid OrganizerId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string Image { get; set; } = string.Empty;
|
||||
public NexDiscoveryMaturity Maturity { get; set; } = NexDiscoveryMaturity.General;
|
||||
public DateTimeOffset StartsAt { get; set; }
|
||||
public DateTimeOffset EndsAt { get; set; }
|
||||
public long AdmissionPriceMinor { get; set; }
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
public NexDiscoveryPublicationState State { get; set; } = NexDiscoveryPublicationState.Draft;
|
||||
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class NexClassifiedRecord
|
||||
{
|
||||
public Guid ClassifiedId { get; set; }
|
||||
public Guid OwnerId { get; set; }
|
||||
public Guid PlaceId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string Category { get; set; } = string.Empty;
|
||||
public string Image { get; set; } = string.Empty;
|
||||
public NexDiscoveryMaturity Maturity { get; set; } = NexDiscoveryMaturity.General;
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
public NexDiscoveryPublicationState State { get; set; } = NexDiscoveryPublicationState.Draft;
|
||||
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class NexDestinationRecord
|
||||
{
|
||||
public Guid DestinationId { get; set; }
|
||||
public Guid PlaceId { get; set; }
|
||||
public Guid SubmittedBy { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string Category { get; set; } = string.Empty;
|
||||
public string Subcategory { get; set; } = string.Empty;
|
||||
public string Collection { get; set; } = string.Empty;
|
||||
public string Image { get; set; } = string.Empty;
|
||||
public NexDiscoveryMaturity Maturity { get; set; } = NexDiscoveryMaturity.General;
|
||||
public bool Featured { get; set; }
|
||||
public bool EditorPick { get; set; }
|
||||
public int Popularity { get; set; }
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
public List<Guid> EventIds { get; set; } = new List<Guid>();
|
||||
public NexDiscoveryPublicationState State { get; set; } = NexDiscoveryPublicationState.Draft;
|
||||
public string ModerationNote { get; set; } = string.Empty;
|
||||
public string ModeratedBy { get; set; } = string.Empty;
|
||||
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class NexDiscoverySnapshot
|
||||
{
|
||||
public int SchemaVersion { get; set; } = NexDiscoveryStore.CurrentSchemaVersion;
|
||||
public List<NexPlaceRecord> Places { get; set; } = new List<NexPlaceRecord>();
|
||||
public List<NexEventRecord> Events { get; set; } = new List<NexEventRecord>();
|
||||
public List<NexClassifiedRecord> Classifieds { get; set; } = new List<NexClassifiedRecord>();
|
||||
public List<NexDestinationRecord> Destinations { get; set; } = new List<NexDestinationRecord>();
|
||||
}
|
||||
|
||||
public sealed class NexDiscoveryStore
|
||||
{
|
||||
public const int CurrentSchemaVersion = 1;
|
||||
|
||||
private readonly object m_Sync = new object();
|
||||
private readonly string m_Path;
|
||||
private readonly JsonSerializerOptions m_Json;
|
||||
private NexDiscoverySnapshot m_State;
|
||||
|
||||
public NexDiscoveryStore(string path)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(path))
|
||||
throw new ArgumentException("Discovery store path is required.", nameof(path));
|
||||
|
||||
m_Path = Path.GetFullPath(path);
|
||||
m_Json = new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true,
|
||||
PropertyNameCaseInsensitive = true
|
||||
};
|
||||
m_Json.Converters.Add(new JsonStringEnumConverter());
|
||||
m_State = Load();
|
||||
}
|
||||
|
||||
public NexPlaceRecord GetPlace(Guid id)
|
||||
{
|
||||
lock (m_Sync)
|
||||
return Clone(m_State.Places.FirstOrDefault(x => x.PlaceId == id));
|
||||
}
|
||||
|
||||
public IReadOnlyList<NexPlaceRecord> ListPlaces(
|
||||
string query,
|
||||
NexDiscoveryMaturity? maximumMaturity,
|
||||
NexDiscoveryPublicationState? state,
|
||||
int offset,
|
||||
int limit)
|
||||
{
|
||||
ValidatePage(offset, limit);
|
||||
string q = NormalizeQuery(query);
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
IEnumerable<NexPlaceRecord> source = m_State.Places;
|
||||
|
||||
if (state.HasValue)
|
||||
source = source.Where(x => x.State == state.Value);
|
||||
if (maximumMaturity.HasValue)
|
||||
source = source.Where(x => x.Maturity <= maximumMaturity.Value);
|
||||
if (q.Length > 0)
|
||||
source = source.Where(x => Matches(q, x.Name, x.RegionName, x.Description, x.ParcelDetails, string.Join(" ", x.Tags)));
|
||||
|
||||
return source
|
||||
.OrderByDescending(x => x.Featured)
|
||||
.ThenByDescending(x => x.Traffic)
|
||||
.ThenBy(x => x.Name, StringComparer.OrdinalIgnoreCase)
|
||||
.Skip(offset)
|
||||
.Take(limit)
|
||||
.Select(Clone)
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public NexPlaceRecord UpsertPlace(NexPlaceRecord input)
|
||||
{
|
||||
if (input == null)
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
|
||||
NexPlaceRecord record = NormalizePlace(input);
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
NexPlaceRecord existing = m_State.Places.FirstOrDefault(x => x.PlaceId == record.PlaceId);
|
||||
if (existing != null)
|
||||
{
|
||||
record.CreatedAt = existing.CreatedAt;
|
||||
m_State.Places.Remove(existing);
|
||||
}
|
||||
|
||||
record.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
m_State.Places.Add(record);
|
||||
Save();
|
||||
return Clone(record);
|
||||
}
|
||||
}
|
||||
|
||||
public bool DeletePlace(Guid id)
|
||||
{
|
||||
lock (m_Sync)
|
||||
{
|
||||
bool removed = m_State.Places.RemoveAll(x => x.PlaceId == id) > 0;
|
||||
if (removed)
|
||||
{
|
||||
m_State.Destinations.RemoveAll(x => x.PlaceId == id);
|
||||
m_State.Events.RemoveAll(x => x.PlaceId == id);
|
||||
m_State.Classifieds.RemoveAll(x => x.PlaceId == id);
|
||||
Save();
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
}
|
||||
|
||||
public NexEventRecord GetEvent(Guid id)
|
||||
{
|
||||
lock (m_Sync)
|
||||
return Clone(m_State.Events.FirstOrDefault(x => x.EventId == id));
|
||||
}
|
||||
|
||||
public IReadOnlyList<NexEventRecord> ListEvents(
|
||||
string query,
|
||||
NexDiscoveryMaturity? maximumMaturity,
|
||||
NexDiscoveryPublicationState? state,
|
||||
int offset,
|
||||
int limit)
|
||||
{
|
||||
ValidatePage(offset, limit);
|
||||
string q = NormalizeQuery(query);
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
IEnumerable<NexEventRecord> source = m_State.Events;
|
||||
|
||||
if (state.HasValue)
|
||||
source = source.Where(x => x.State == state.Value);
|
||||
if (maximumMaturity.HasValue)
|
||||
source = source.Where(x => x.Maturity <= maximumMaturity.Value);
|
||||
if (q.Length > 0)
|
||||
source = source.Where(x => Matches(q, x.Name, x.Description, string.Join(" ", x.Tags)));
|
||||
|
||||
return source
|
||||
.OrderBy(x => x.StartsAt)
|
||||
.Skip(offset)
|
||||
.Take(limit)
|
||||
.Select(Clone)
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public NexEventRecord UpsertEvent(NexEventRecord input)
|
||||
{
|
||||
if (input == null)
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
if (input.EventId == Guid.Empty)
|
||||
input.EventId = Guid.NewGuid();
|
||||
RequireName(input.Name, nameof(input.Name));
|
||||
if (input.PlaceId == Guid.Empty)
|
||||
throw new ArgumentException("Event place is required.");
|
||||
if (input.EndsAt <= input.StartsAt)
|
||||
throw new ArgumentException("Event end must be after start.");
|
||||
if (input.AdmissionPriceMinor < 0)
|
||||
throw new ArgumentOutOfRangeException(nameof(input.AdmissionPriceMinor));
|
||||
|
||||
NexEventRecord record = Clone(input);
|
||||
record.Name = record.Name.Trim();
|
||||
record.Description = TrimMax(record.Description, 8192);
|
||||
record.Tags = NormalizeTags(record.Tags);
|
||||
record.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
if (!m_State.Places.Any(x => x.PlaceId == record.PlaceId))
|
||||
throw new InvalidOperationException("Event place was not found.");
|
||||
|
||||
NexEventRecord existing = m_State.Events.FirstOrDefault(x => x.EventId == record.EventId);
|
||||
if (existing != null)
|
||||
{
|
||||
record.CreatedAt = existing.CreatedAt;
|
||||
m_State.Events.Remove(existing);
|
||||
}
|
||||
|
||||
m_State.Events.Add(record);
|
||||
Save();
|
||||
return Clone(record);
|
||||
}
|
||||
}
|
||||
|
||||
public bool DeleteEvent(Guid id)
|
||||
{
|
||||
lock (m_Sync)
|
||||
{
|
||||
bool removed = m_State.Events.RemoveAll(x => x.EventId == id) > 0;
|
||||
foreach (NexPlaceRecord place in m_State.Places)
|
||||
place.EventIds.RemoveAll(x => x == id);
|
||||
foreach (NexDestinationRecord destination in m_State.Destinations)
|
||||
destination.EventIds.RemoveAll(x => x == id);
|
||||
if (removed)
|
||||
Save();
|
||||
return removed;
|
||||
}
|
||||
}
|
||||
|
||||
public NexClassifiedRecord GetClassified(Guid id)
|
||||
{
|
||||
lock (m_Sync)
|
||||
return Clone(m_State.Classifieds.FirstOrDefault(x => x.ClassifiedId == id));
|
||||
}
|
||||
|
||||
public IReadOnlyList<NexClassifiedRecord> ListClassifieds(
|
||||
string query,
|
||||
NexDiscoveryMaturity? maximumMaturity,
|
||||
NexDiscoveryPublicationState? state,
|
||||
int offset,
|
||||
int limit)
|
||||
{
|
||||
ValidatePage(offset, limit);
|
||||
string q = NormalizeQuery(query);
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
IEnumerable<NexClassifiedRecord> source = m_State.Classifieds;
|
||||
if (state.HasValue)
|
||||
source = source.Where(x => x.State == state.Value);
|
||||
if (maximumMaturity.HasValue)
|
||||
source = source.Where(x => x.Maturity <= maximumMaturity.Value);
|
||||
if (q.Length > 0)
|
||||
source = source.Where(x => Matches(q, x.Name, x.Description, x.Category, string.Join(" ", x.Tags)));
|
||||
|
||||
return source
|
||||
.OrderByDescending(x => x.UpdatedAt)
|
||||
.Skip(offset)
|
||||
.Take(limit)
|
||||
.Select(Clone)
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public NexClassifiedRecord UpsertClassified(NexClassifiedRecord input)
|
||||
{
|
||||
if (input == null)
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
if (input.ClassifiedId == Guid.Empty)
|
||||
input.ClassifiedId = Guid.NewGuid();
|
||||
RequireName(input.Name, nameof(input.Name));
|
||||
|
||||
NexClassifiedRecord record = Clone(input);
|
||||
record.Name = record.Name.Trim();
|
||||
record.Description = TrimMax(record.Description, 8192);
|
||||
record.Category = TrimMax(record.Category, 128);
|
||||
record.Tags = NormalizeTags(record.Tags);
|
||||
record.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
if (record.PlaceId != Guid.Empty &&
|
||||
!m_State.Places.Any(x => x.PlaceId == record.PlaceId))
|
||||
{
|
||||
throw new InvalidOperationException("Classified place was not found.");
|
||||
}
|
||||
|
||||
NexClassifiedRecord existing =
|
||||
m_State.Classifieds.FirstOrDefault(x => x.ClassifiedId == record.ClassifiedId);
|
||||
|
||||
if (existing != null)
|
||||
{
|
||||
record.CreatedAt = existing.CreatedAt;
|
||||
m_State.Classifieds.Remove(existing);
|
||||
}
|
||||
|
||||
m_State.Classifieds.Add(record);
|
||||
Save();
|
||||
return Clone(record);
|
||||
}
|
||||
}
|
||||
|
||||
public bool DeleteClassified(Guid id)
|
||||
{
|
||||
lock (m_Sync)
|
||||
{
|
||||
bool removed = m_State.Classifieds.RemoveAll(x => x.ClassifiedId == id) > 0;
|
||||
if (removed)
|
||||
Save();
|
||||
return removed;
|
||||
}
|
||||
}
|
||||
|
||||
public NexDestinationRecord GetDestination(Guid id)
|
||||
{
|
||||
lock (m_Sync)
|
||||
return Clone(m_State.Destinations.FirstOrDefault(x => x.DestinationId == id));
|
||||
}
|
||||
|
||||
public IReadOnlyList<NexDestinationRecord> ListDestinations(
|
||||
string query,
|
||||
NexDiscoveryMaturity? maximumMaturity,
|
||||
NexDiscoveryPublicationState? state,
|
||||
string category,
|
||||
string collection,
|
||||
bool? featured,
|
||||
bool? editorPick,
|
||||
string sort,
|
||||
int offset,
|
||||
int limit)
|
||||
{
|
||||
ValidatePage(offset, limit);
|
||||
string q = NormalizeQuery(query);
|
||||
string categoryKey = NormalizeQuery(category);
|
||||
string collectionKey = NormalizeQuery(collection);
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
IEnumerable<NexDestinationRecord> source = m_State.Destinations;
|
||||
|
||||
if (state.HasValue)
|
||||
source = source.Where(x => x.State == state.Value);
|
||||
if (maximumMaturity.HasValue)
|
||||
source = source.Where(x => x.Maturity <= maximumMaturity.Value);
|
||||
if (featured.HasValue)
|
||||
source = source.Where(x => x.Featured == featured.Value);
|
||||
if (editorPick.HasValue)
|
||||
source = source.Where(x => x.EditorPick == editorPick.Value);
|
||||
if (categoryKey.Length > 0)
|
||||
source = source.Where(x => NormalizeQuery(x.Category) == categoryKey);
|
||||
if (collectionKey.Length > 0)
|
||||
source = source.Where(x => NormalizeQuery(x.Collection) == collectionKey);
|
||||
if (q.Length > 0)
|
||||
source = source.Where(x => Matches(q, x.Name, x.Description, x.Category, x.Subcategory, x.Collection, string.Join(" ", x.Tags)));
|
||||
|
||||
source = (sort ?? string.Empty).Trim().ToLowerInvariant() switch
|
||||
{
|
||||
"recent" => source.OrderByDescending(x => x.CreatedAt),
|
||||
"popular" => source.OrderByDescending(x => x.Popularity).ThenByDescending(x => x.UpdatedAt),
|
||||
"hot" => source.OrderByDescending(x => x.Popularity).ThenByDescending(x => x.CreatedAt),
|
||||
_ => source.OrderByDescending(x => x.EditorPick).ThenByDescending(x => x.Featured).ThenByDescending(x => x.Popularity)
|
||||
};
|
||||
|
||||
return source
|
||||
.Skip(offset)
|
||||
.Take(limit)
|
||||
.Select(Clone)
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public NexDestinationRecord UpsertDestination(NexDestinationRecord input)
|
||||
{
|
||||
if (input == null)
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
if (input.DestinationId == Guid.Empty)
|
||||
input.DestinationId = Guid.NewGuid();
|
||||
if (input.PlaceId == Guid.Empty)
|
||||
throw new ArgumentException("Destination place is required.");
|
||||
RequireName(input.Name, nameof(input.Name));
|
||||
|
||||
NexDestinationRecord record = Clone(input);
|
||||
record.Name = record.Name.Trim();
|
||||
record.Description = TrimMax(record.Description, 8192);
|
||||
record.Category = TrimMax(record.Category, 128);
|
||||
record.Subcategory = TrimMax(record.Subcategory, 128);
|
||||
record.Collection = TrimMax(record.Collection, 128);
|
||||
record.Tags = NormalizeTags(record.Tags);
|
||||
record.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
if (!m_State.Places.Any(x => x.PlaceId == record.PlaceId))
|
||||
throw new InvalidOperationException("Destination place was not found.");
|
||||
|
||||
NexDestinationRecord existing =
|
||||
m_State.Destinations.FirstOrDefault(x => x.DestinationId == record.DestinationId);
|
||||
|
||||
if (existing != null)
|
||||
{
|
||||
record.CreatedAt = existing.CreatedAt;
|
||||
record.Popularity = Math.Max(existing.Popularity, record.Popularity);
|
||||
record.ModeratedBy = existing.ModeratedBy;
|
||||
record.ModerationNote = existing.ModerationNote;
|
||||
m_State.Destinations.Remove(existing);
|
||||
}
|
||||
|
||||
m_State.Destinations.Add(record);
|
||||
Save();
|
||||
return Clone(record);
|
||||
}
|
||||
}
|
||||
|
||||
public NexDestinationRecord ModerateDestination(
|
||||
Guid destinationId,
|
||||
NexDiscoveryPublicationState state,
|
||||
string moderator,
|
||||
string note)
|
||||
{
|
||||
if (state != NexDiscoveryPublicationState.Approved &&
|
||||
state != NexDiscoveryPublicationState.Rejected)
|
||||
{
|
||||
throw new ArgumentException("Moderation state must be Approved or Rejected.");
|
||||
}
|
||||
|
||||
lock (m_Sync)
|
||||
{
|
||||
NexDestinationRecord record =
|
||||
m_State.Destinations.FirstOrDefault(x => x.DestinationId == destinationId) ??
|
||||
throw new KeyNotFoundException("Destination was not found.");
|
||||
|
||||
record.State = state;
|
||||
record.ModeratedBy = (moderator ?? string.Empty).Trim();
|
||||
record.ModerationNote = TrimMax(note, 2048);
|
||||
record.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
Save();
|
||||
return Clone(record);
|
||||
}
|
||||
}
|
||||
|
||||
public NexDestinationRecord RecordDestinationVisit(Guid destinationId)
|
||||
{
|
||||
lock (m_Sync)
|
||||
{
|
||||
NexDestinationRecord record =
|
||||
m_State.Destinations.FirstOrDefault(x => x.DestinationId == destinationId) ??
|
||||
throw new KeyNotFoundException("Destination was not found.");
|
||||
|
||||
if (record.State != NexDiscoveryPublicationState.Approved)
|
||||
throw new InvalidOperationException("Only approved destinations can receive visits.");
|
||||
|
||||
record.Popularity = checked(record.Popularity + 1);
|
||||
record.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
Save();
|
||||
return Clone(record);
|
||||
}
|
||||
}
|
||||
|
||||
public IReadOnlyList<object> GetCategories()
|
||||
{
|
||||
lock (m_Sync)
|
||||
{
|
||||
return m_State.Destinations
|
||||
.Where(x => x.State == NexDiscoveryPublicationState.Approved)
|
||||
.GroupBy(x => x.Category ?? string.Empty, StringComparer.OrdinalIgnoreCase)
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x.Key))
|
||||
.OrderBy(x => x.Key, StringComparer.OrdinalIgnoreCase)
|
||||
.Select(x => (object)new
|
||||
{
|
||||
category = x.Key,
|
||||
subcategories = x
|
||||
.Select(y => y.Subcategory)
|
||||
.Where(y => !string.IsNullOrWhiteSpace(y))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.OrderBy(y => y, StringComparer.OrdinalIgnoreCase)
|
||||
.ToArray(),
|
||||
count = x.Count()
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
private NexDiscoverySnapshot Load()
|
||||
{
|
||||
if (!File.Exists(m_Path))
|
||||
return new NexDiscoverySnapshot();
|
||||
|
||||
NexDiscoverySnapshot state =
|
||||
JsonSerializer.Deserialize<NexDiscoverySnapshot>(
|
||||
File.ReadAllText(m_Path),
|
||||
m_Json) ??
|
||||
new NexDiscoverySnapshot();
|
||||
|
||||
if (state.SchemaVersion != CurrentSchemaVersion)
|
||||
throw new InvalidOperationException("Unsupported NexDiscovery schema version.");
|
||||
|
||||
state.Places ??= new List<NexPlaceRecord>();
|
||||
state.Events ??= new List<NexEventRecord>();
|
||||
state.Classifieds ??= new List<NexClassifiedRecord>();
|
||||
state.Destinations ??= new List<NexDestinationRecord>();
|
||||
return state;
|
||||
}
|
||||
|
||||
private void Save()
|
||||
{
|
||||
string directory = Path.GetDirectoryName(m_Path);
|
||||
if (!string.IsNullOrWhiteSpace(directory))
|
||||
Directory.CreateDirectory(directory);
|
||||
|
||||
string temp = m_Path + ".tmp";
|
||||
File.WriteAllText(temp, JsonSerializer.Serialize(m_State, m_Json));
|
||||
File.Move(temp, m_Path, true);
|
||||
}
|
||||
|
||||
private NexPlaceRecord NormalizePlace(NexPlaceRecord input)
|
||||
{
|
||||
NexPlaceRecord record = Clone(input);
|
||||
if (record.PlaceId == Guid.Empty)
|
||||
record.PlaceId = Guid.NewGuid();
|
||||
if (record.RegionId == Guid.Empty)
|
||||
throw new ArgumentException("Place region is required.");
|
||||
RequireName(record.Name, nameof(record.Name));
|
||||
|
||||
record.Name = record.Name.Trim();
|
||||
record.RegionName = TrimMax(record.RegionName, 255);
|
||||
record.Description = TrimMax(record.Description, 8192);
|
||||
record.ParcelDetails = TrimMax(record.ParcelDetails, 8192);
|
||||
record.RegionType = TrimMax(record.RegionType, 128);
|
||||
record.TeleportUri = TrimMax(record.TeleportUri, 2048);
|
||||
record.Images = NormalizeStrings(record.Images, 16, 2048);
|
||||
record.Tags = NormalizeTags(record.Tags);
|
||||
record.EventIds ??= new List<Guid>();
|
||||
record.RelatedDestinationIds ??= new List<Guid>();
|
||||
|
||||
if (record.X < 0 || record.Y < 0 || record.Z < 0)
|
||||
throw new ArgumentOutOfRangeException("Place coordinates must be non-negative.");
|
||||
if (record.Traffic < 0 || double.IsNaN(record.Traffic) || double.IsInfinity(record.Traffic))
|
||||
throw new ArgumentOutOfRangeException(nameof(record.Traffic));
|
||||
|
||||
return record;
|
||||
}
|
||||
|
||||
private static List<string> NormalizeTags(IEnumerable<string> values) =>
|
||||
NormalizeStrings(values, 32, 64)
|
||||
.Select(x => x.ToLowerInvariant())
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
private static List<string> NormalizeStrings(
|
||||
IEnumerable<string> values,
|
||||
int maximumCount,
|
||||
int maximumLength)
|
||||
{
|
||||
return (values ?? Array.Empty<string>())
|
||||
.Select(x => TrimMax(x, maximumLength))
|
||||
.Where(x => x.Length > 0)
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.Take(maximumCount)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private static string TrimMax(string value, int max)
|
||||
{
|
||||
string normalized = (value ?? string.Empty).Trim();
|
||||
return normalized.Length <= max
|
||||
? normalized
|
||||
: normalized.Substring(0, max);
|
||||
}
|
||||
|
||||
private static void RequireName(string value, string parameter)
|
||||
{
|
||||
string normalized = (value ?? string.Empty).Trim();
|
||||
if (normalized.Length == 0 || normalized.Length > 255)
|
||||
throw new ArgumentException("A name between 1 and 255 characters is required.", parameter);
|
||||
}
|
||||
|
||||
private static string NormalizeQuery(string value) =>
|
||||
(value ?? string.Empty).Trim().ToLowerInvariant();
|
||||
|
||||
private static bool Matches(string query, params string[] values) =>
|
||||
values.Any(x => NormalizeQuery(x).Contains(query, StringComparison.Ordinal));
|
||||
|
||||
private static void ValidatePage(int offset, int limit)
|
||||
{
|
||||
if (offset < 0)
|
||||
throw new ArgumentOutOfRangeException(nameof(offset));
|
||||
if (limit < 1 || limit > 500)
|
||||
throw new ArgumentOutOfRangeException(nameof(limit));
|
||||
}
|
||||
|
||||
private T Clone<T>(T value)
|
||||
{
|
||||
if (value == null)
|
||||
return default;
|
||||
|
||||
return JsonSerializer.Deserialize<T>(
|
||||
JsonSerializer.Serialize(value, m_Json),
|
||||
m_Json);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,9 @@ namespace NexVerse.Core
|
||||
public static class NexVersePlatform
|
||||
{
|
||||
public const string ProductName = "OpenGenesisLINK";
|
||||
public const string MilestoneVersion = "0.9.3.7";
|
||||
public const string MilestoneVersion = "0.9.3.8";
|
||||
public const string MilestoneCodename = "";
|
||||
public const string MilestoneTitle = "NexGroups und NexExperiences";
|
||||
public const string MilestoneTitle = "NexSearch, Places, Land und Destination Guide";
|
||||
public const string UiLanguage = "de-DE";
|
||||
public const string ApiVersion = "v1";
|
||||
public const string ProtocolVersion = "1";
|
||||
@@ -27,6 +27,7 @@ namespace NexVerse.Core
|
||||
["voice"] = "planned",
|
||||
["economy"] = "native-nv-dollar",
|
||||
["lsl"] = "experience-tools-integrated",
|
||||
["discovery"] = "native-v1",
|
||||
["firestorm"] = "baseline-validation-pending"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@ namespace NexVerse.Core.Security
|
||||
public const string ExperiencesRead = "experiences:read";
|
||||
public const string ExperiencesManage = "experiences:manage";
|
||||
public const string ExperiencesScript = "experiences:script";
|
||||
public const string DiscoveryRead = "discovery:read";
|
||||
public const string DiscoverySubmit = "discovery:submit";
|
||||
public const string DiscoveryManage = "discovery:manage";
|
||||
}
|
||||
|
||||
public sealed class NexPrincipal
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
|
||||
namespace NexVerse.RegionModules.Discovery
|
||||
{
|
||||
[Extension(
|
||||
Path = "/OpenSim/RegionModules",
|
||||
NodeName = "RegionModule",
|
||||
Id = "NexDiscoveryViewerModule")]
|
||||
public sealed class NexDiscoveryViewerModule :
|
||||
ISharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_Log =
|
||||
LogManager.GetLogger(
|
||||
typeof(NexDiscoveryViewerModule));
|
||||
|
||||
private readonly object m_Sync = new object();
|
||||
private readonly List<Scene> m_Scenes =
|
||||
new List<Scene>();
|
||||
|
||||
private bool m_Enabled;
|
||||
private string m_WorldApiBaseUrl = string.Empty;
|
||||
private int m_RequestTimeoutMilliseconds = 3000;
|
||||
private HttpClient m_Http;
|
||||
|
||||
public string Name => "NexDiscoveryViewerModule";
|
||||
public Type ReplaceableInterface => null;
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
IConfig section =
|
||||
config?.Configs["NexDiscoveryViewer"];
|
||||
|
||||
if (section == null ||
|
||||
!section.GetBoolean("Enabled", false))
|
||||
{
|
||||
m_Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
m_WorldApiBaseUrl =
|
||||
section.GetString(
|
||||
"WorldApiBaseUrl",
|
||||
string.Empty)
|
||||
.Trim()
|
||||
.TrimEnd('/');
|
||||
|
||||
m_RequestTimeoutMilliseconds =
|
||||
Math.Clamp(
|
||||
section.GetInt(
|
||||
"RequestTimeoutMilliseconds",
|
||||
3000),
|
||||
500,
|
||||
30000);
|
||||
|
||||
if (!Uri.TryCreate(
|
||||
m_WorldApiBaseUrl,
|
||||
UriKind.Absolute,
|
||||
out Uri baseUri) ||
|
||||
(baseUri.Scheme != Uri.UriSchemeHttp &&
|
||||
baseUri.Scheme != Uri.UriSchemeHttps))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"[NEX-DISCOVERY]: WorldApiBaseUrl must be an absolute HTTP(S) URL.");
|
||||
}
|
||||
|
||||
m_Http =
|
||||
new HttpClient
|
||||
{
|
||||
Timeout =
|
||||
TimeSpan.FromMilliseconds(
|
||||
m_RequestTimeoutMilliseconds)
|
||||
};
|
||||
|
||||
m_Enabled = true;
|
||||
|
||||
m_Log.InfoFormat(
|
||||
"[NEX-DISCOVERY]: Viewer capability adapter enabled for {0}.",
|
||||
m_WorldApiBaseUrl);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (!m_Enabled || scene == null)
|
||||
return;
|
||||
|
||||
lock (m_Sync)
|
||||
m_Scenes.Add(scene);
|
||||
|
||||
scene.EventManager.OnRegisterCaps +=
|
||||
OnRegisterCaps;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (scene == null)
|
||||
return;
|
||||
|
||||
scene.EventManager.OnRegisterCaps -=
|
||||
OnRegisterCaps;
|
||||
|
||||
lock (m_Sync)
|
||||
m_Scenes.Remove(scene);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
lock (m_Sync)
|
||||
{
|
||||
foreach (Scene scene in m_Scenes)
|
||||
{
|
||||
scene.EventManager.OnRegisterCaps -=
|
||||
OnRegisterCaps;
|
||||
}
|
||||
|
||||
m_Scenes.Clear();
|
||||
}
|
||||
|
||||
m_Http?.Dispose();
|
||||
m_Http = null;
|
||||
}
|
||||
|
||||
private void OnRegisterCaps(
|
||||
UUID agentId,
|
||||
Caps caps)
|
||||
{
|
||||
if (!m_Enabled ||
|
||||
caps == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Register(
|
||||
caps,
|
||||
"NexSearch",
|
||||
"/api/v1/search");
|
||||
|
||||
Register(
|
||||
caps,
|
||||
"NexPlaces",
|
||||
"/api/v1/places");
|
||||
|
||||
Register(
|
||||
caps,
|
||||
"NexLandPortal",
|
||||
"/api/v1/land-portal");
|
||||
|
||||
Register(
|
||||
caps,
|
||||
"NexDestinationGuide",
|
||||
"/api/v1/destinations");
|
||||
}
|
||||
|
||||
private void Register(
|
||||
Caps caps,
|
||||
string capability,
|
||||
string worldApiPath)
|
||||
{
|
||||
caps.RegisterSimpleHandler(
|
||||
capability,
|
||||
new SimpleStreamHandler(
|
||||
"/" + UUID.Random(),
|
||||
(request, response) =>
|
||||
Proxy(
|
||||
request,
|
||||
response,
|
||||
worldApiPath)));
|
||||
}
|
||||
|
||||
private void Proxy(
|
||||
IOSHttpRequest request,
|
||||
IOSHttpResponse response,
|
||||
string worldApiPath)
|
||||
{
|
||||
if (!string.Equals(
|
||||
request?.HttpMethod,
|
||||
"GET",
|
||||
StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
response.StatusCode =
|
||||
(int)HttpStatusCode.MethodNotAllowed;
|
||||
response.ContentType =
|
||||
"application/json; charset=utf-8";
|
||||
response.RawBuffer =
|
||||
System.Text.Encoding.UTF8.GetBytes(
|
||||
"{\"error\":\"method_not_allowed\",\"message\":\"GET is required.\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string query =
|
||||
request?.Url?.Query ??
|
||||
string.Empty;
|
||||
|
||||
using HttpRequestMessage outbound =
|
||||
new HttpRequestMessage(
|
||||
HttpMethod.Get,
|
||||
m_WorldApiBaseUrl +
|
||||
worldApiPath +
|
||||
query);
|
||||
|
||||
outbound.Headers.TryAddWithoutValidation(
|
||||
"X-NexVerse-Viewer-Agent",
|
||||
capsSafeAgent(request));
|
||||
|
||||
using HttpResponseMessage upstream =
|
||||
m_Http.Send(outbound);
|
||||
|
||||
response.StatusCode =
|
||||
(int)upstream.StatusCode;
|
||||
|
||||
response.ContentType =
|
||||
upstream.Content.Headers.ContentType
|
||||
?.ToString() ??
|
||||
"application/json; charset=utf-8";
|
||||
|
||||
response.RawBuffer =
|
||||
upstream.Content
|
||||
.ReadAsByteArrayAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_Log.WarnFormat(
|
||||
"[NEX-DISCOVERY]: Viewer capability proxy {0} failed: {1}",
|
||||
worldApiPath,
|
||||
e.Message);
|
||||
|
||||
response.StatusCode =
|
||||
(int)HttpStatusCode.BadGateway;
|
||||
response.ContentType =
|
||||
"application/json; charset=utf-8";
|
||||
response.RawBuffer =
|
||||
System.Text.Encoding.UTF8.GetBytes(
|
||||
"{\"error\":\"discovery_upstream_unavailable\",\"message\":\"World API discovery service is unavailable.\"}");
|
||||
}
|
||||
}
|
||||
|
||||
private static string capsSafeAgent(
|
||||
IOSHttpRequest request)
|
||||
{
|
||||
string agent =
|
||||
request?.UserAgent ??
|
||||
string.Empty;
|
||||
|
||||
return agent.Length <= 255
|
||||
? agent
|
||||
: agent.Substring(0, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -8,6 +8,7 @@ using NexVerse.Core.Audit;
|
||||
using NexVerse.Core.ControlPlane;
|
||||
using NexVerse.Core.Economy;
|
||||
using NexVerse.Core.Experiences;
|
||||
using NexVerse.Core.Discovery;
|
||||
using NexVerse.Core.Messaging;
|
||||
using NexVerse.Core.Jobs;
|
||||
using NexVerse.Core.Observability;
|
||||
@@ -447,9 +448,11 @@ namespace NexVerse.Server.Api
|
||||
IConfig nexGroupsConfig =
|
||||
config.Configs["NexGroups"];
|
||||
|
||||
GroupsService nexGroupsService = null;
|
||||
|
||||
if (nexGroupsConfig?.GetBoolean("Enabled", false) == true)
|
||||
{
|
||||
GroupsService nexGroupsService =
|
||||
nexGroupsService =
|
||||
new GroupsService(
|
||||
config);
|
||||
|
||||
@@ -498,6 +501,82 @@ namespace NexVerse.Server.Api
|
||||
"OpenGenesisLINK NexExperiences API"),
|
||||
true);
|
||||
|
||||
IConfig discoveryConfig =
|
||||
config.Configs["NexDiscovery"];
|
||||
|
||||
string discoveryStorePath =
|
||||
discoveryConfig?.GetString(
|
||||
"StorePath",
|
||||
"data/opengenesislink-discovery.json") ??
|
||||
"data/opengenesislink-discovery.json";
|
||||
|
||||
string teleportBaseUri =
|
||||
discoveryConfig?.GetString(
|
||||
"TeleportBaseUri",
|
||||
string.Empty) ??
|
||||
string.Empty;
|
||||
|
||||
NexDiscoveryStore discoveryStore =
|
||||
new NexDiscoveryStore(
|
||||
discoveryStorePath);
|
||||
|
||||
NexDiscoveryApi discoveryApi =
|
||||
new NexDiscoveryApi(
|
||||
authenticator,
|
||||
userAccounts,
|
||||
grid,
|
||||
nexGroupsService,
|
||||
experienceStore,
|
||||
discoveryStore,
|
||||
() =>
|
||||
NexEconomyConnector.Current?.Enabled == true
|
||||
? NexEconomyConnector.Current.Economy
|
||||
: null,
|
||||
auditSink,
|
||||
teleportBaseUri);
|
||||
|
||||
server.AddSimpleStreamHandler(
|
||||
new SimpleStreamHandler(
|
||||
"/api/v1/search",
|
||||
apiGate.Wrap(discoveryApi.HandleSearch),
|
||||
"OpenGenesisLINK NexSearch API"),
|
||||
true);
|
||||
|
||||
server.AddSimpleStreamHandler(
|
||||
new SimpleStreamHandler(
|
||||
"/api/v1/places",
|
||||
apiGate.Wrap(discoveryApi.HandlePlaces),
|
||||
"OpenGenesisLINK Places API"),
|
||||
true);
|
||||
|
||||
server.AddSimpleStreamHandler(
|
||||
new SimpleStreamHandler(
|
||||
"/api/v1/events",
|
||||
apiGate.Wrap(discoveryApi.HandleContent),
|
||||
"OpenGenesisLINK Discovery Events API"),
|
||||
true);
|
||||
|
||||
server.AddSimpleStreamHandler(
|
||||
new SimpleStreamHandler(
|
||||
"/api/v1/classifieds",
|
||||
apiGate.Wrap(discoveryApi.HandleContent),
|
||||
"OpenGenesisLINK Classifieds API"),
|
||||
true);
|
||||
|
||||
server.AddSimpleStreamHandler(
|
||||
new SimpleStreamHandler(
|
||||
"/api/v1/land-portal",
|
||||
apiGate.Wrap(discoveryApi.HandleLandPortal),
|
||||
"OpenGenesisLINK Land Portal API"),
|
||||
true);
|
||||
|
||||
server.AddSimpleStreamHandler(
|
||||
new SimpleStreamHandler(
|
||||
"/api/v1/destinations",
|
||||
apiGate.Wrap(discoveryApi.HandleDestinations),
|
||||
"OpenGenesisLINK Destination Guide API"),
|
||||
true);
|
||||
|
||||
NexInventoryApi inventoryApi =
|
||||
new NexInventoryApi(
|
||||
inventory,
|
||||
|
||||
@@ -190,6 +190,41 @@ namespace NexVerse.Server.Api
|
||||
("post", "NV$-Konto sperren, freigeben oder schließen", "admin:*", "200")),
|
||||
["/api/v1/economy/accounts/ensure"] = AuthenticatedOperations(
|
||||
("post", "Vertrauenswürdiges Gruppen-, Business-, Estate- oder Objekt-Wallet provisionieren", "economy:transfer (service/admin)", "200")),
|
||||
["/api/v1/search"] = GetOperation(
|
||||
"NexSearch über Personen, Gruppen, Regionen, Parcels, Places, Events, Land, Classifieds, Experiences und Destinations"),
|
||||
["/api/v1/places"] = MergeOperations(
|
||||
GetOperation("Veröffentlichte Places durchsuchen"),
|
||||
AuthenticatedOperations(
|
||||
("post", "Place anlegen oder aktualisieren", "discovery:manage", "201"))),
|
||||
["/api/v1/places/{placeId}"] = MergeOperations(
|
||||
GetOperation("Veröffentlichtes Place-Profil lesen"),
|
||||
AuthenticatedOperations(
|
||||
("put", "Place aktualisieren", "discovery:manage", "200"),
|
||||
("delete", "Place und abhängige Discovery-Einträge löschen", "discovery:manage", "200"))),
|
||||
["/api/v1/events"] = MergeOperations(
|
||||
GetOperation("Veröffentlichte Discovery-Events durchsuchen"),
|
||||
AuthenticatedOperations(
|
||||
("post", "Discovery-Event anlegen oder aktualisieren", "discovery:manage", "201"))),
|
||||
["/api/v1/classifieds"] = MergeOperations(
|
||||
GetOperation("Veröffentlichte Classifieds durchsuchen"),
|
||||
AuthenticatedOperations(
|
||||
("post", "Classified anlegen oder aktualisieren", "discovery:manage", "201"))),
|
||||
["/api/v1/land-portal"] = GetOperation(
|
||||
"Aktive NV$-Landangebote als Landportal durchsuchen"),
|
||||
["/api/v1/land-portal/owned"] = AuthenticatedOperations(
|
||||
("get", "Eigene oder autorisierte Landangebote lesen", "discovery:read", "200")),
|
||||
["/api/v1/destinations"] = MergeOperations(
|
||||
GetOperation("Freigegebene Destination-Guide-Einträge durchsuchen"),
|
||||
AuthenticatedOperations(
|
||||
("post", "Destination zur Moderation einreichen", "discovery:submit", "201"))),
|
||||
["/api/v1/destinations/categories"] = GetOperation(
|
||||
"Destination-Guide-Kategorien und Unterkategorien lesen"),
|
||||
["/api/v1/destinations/{destinationId}"] = GetOperation(
|
||||
"Freigegebene Destination mit Place- und Event-Bezug lesen"),
|
||||
["/api/v1/destinations/{destinationId}/visit"] = PublicOperations(
|
||||
("post", "Destination-Aufruf für Popularitätsranking registrieren", "200")),
|
||||
["/api/v1/destinations/{destinationId}/moderation"] = AuthenticatedOperations(
|
||||
("post", "Destination freigeben oder ablehnen", "discovery:manage", "200")),
|
||||
["/api/v1/groups"] = AuthenticatedOperations(
|
||||
("get", "NexGroups durchsuchen", "groups:read", "200"),
|
||||
("post", "NexGroup erstellen", "groups:manage", "201")),
|
||||
@@ -487,6 +522,23 @@ namespace NexVerse.Server.Api
|
||||
"EconomyAccountStateResponse",
|
||||
"200");
|
||||
ApplyJsonContract(paths, "/api/v1/economy/accounts/ensure", "post", "EconomyWalletEnsureRequest", "EconomyBalanceResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/search", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/places", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/places", "post", "DiscoveryPlaceRequest", "DiscoveryObjectResponse", "201");
|
||||
ApplyJsonContract(paths, "/api/v1/places/{placeId}", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/places/{placeId}", "put", "DiscoveryPlaceRequest", "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/events", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/events", "post", "DiscoveryMutationRequest", "DiscoveryObjectResponse", "201");
|
||||
ApplyJsonContract(paths, "/api/v1/classifieds", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/classifieds", "post", "DiscoveryMutationRequest", "DiscoveryObjectResponse", "201");
|
||||
ApplyJsonContract(paths, "/api/v1/land-portal", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/land-portal/owned", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/destinations", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/destinations", "post", "DiscoveryDestinationRequest", "DiscoveryObjectResponse", "201");
|
||||
ApplyJsonContract(paths, "/api/v1/destinations/categories", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/destinations/{destinationId}", "get", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/destinations/{destinationId}/visit", "post", null, "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/destinations/{destinationId}/moderation", "post", "DiscoveryModerationRequest", "DiscoveryObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/groups", "get", null, "Chapter11ObjectResponse", "200");
|
||||
ApplyJsonContract(paths, "/api/v1/groups", "post", "NexGroupCreateRequest", "Chapter11ObjectResponse", "201");
|
||||
ApplyJsonContract(paths, "/api/v1/groups/{groupId}", "get", null, "Chapter11ObjectResponse", "200");
|
||||
@@ -1210,10 +1262,25 @@ namespace NexVerse.Server.Api
|
||||
new
|
||||
{
|
||||
api_version = NexVersePlatform.ApiVersion,
|
||||
server_line = "0.9.3.7",
|
||||
server_line = "0.9.3.8",
|
||||
codename = NexVersePlatform.MilestoneCodename,
|
||||
status = "development",
|
||||
published = "2026-10-06",
|
||||
compatibility = "OpenGenesisLINK v0.9.3.8 Dev — NexSearch, Places, Land Portal und Destination Guide",
|
||||
highlights = new[]
|
||||
{
|
||||
"NexSearch aggregiert People, Groups, Regions, Parcels, Places, Events, Land, Classifieds, Experiences und Destinations",
|
||||
"Places und Destination Guide mit persistenter Moderation, Kategorien, Collections, Events, Popularitaet und Teleport-Links",
|
||||
"Land Portal projiziert die autoritative NV$-Land-Commerce-Datenbasis; optionale Viewer-CAPS ergaenzen Firestorm ohne Legacy-Suche zu ersetzen"
|
||||
}
|
||||
},
|
||||
new
|
||||
{
|
||||
api_version = NexVersePlatform.ApiVersion,
|
||||
server_line = "0.9.3.7",
|
||||
codename = NexVersePlatform.MilestoneCodename,
|
||||
status = "completed",
|
||||
published = "2026-10-06",
|
||||
compatibility = "OpenGenesisLINK v0.9.3.7 Dev — NexGroups, NexExperiences und Experience LSL",
|
||||
highlights = new[]
|
||||
{
|
||||
@@ -1627,7 +1694,7 @@ namespace NexVerse.Server.Api
|
||||
},
|
||||
new { version = "0.9.3.6", codename = "", title = "NV$-Wirtschaft, Bankwesen, Handel und Land", status = "completed", checklist = (object)null, summary = "Natives Kontobuch, Bankwesen, Viewer-Wirtschaftskompatibilität und Landhandel abgeschlossen.", evidence = new[] { "Doppelte Buchfuehrung und persistente Konten", "NVBAN/Banking/Commerce/Landhandel", "Live-MariaDB/PostgreSQL- und Runtime-CI gruen" } },
|
||||
new { version = "0.9.3.7", codename = "", title = "NexGroups und NexExperiences", status = "completed", checklist = (object)null, summary = "NexGroups-Paritaetsschicht, native NexExperiences und Experience-LSL abgeschlossen.", evidence = new[] { "NexGroups Management/Moderation/API plus NV$-Gruppenkonto", "Native Experience-Permissions, Policies, Script-Bindings und persistentes K/V", "Release-Build, Hypergrid, LLLogin, World API und Chapter-11-CI gruen" } },
|
||||
new { version = "0.9.3.8", codename = "", title = "Suche, Orte, Land und Reiseführer", status = "planned", checklist = (object)null, summary = "Suche, Orte, Landportal und Dienste zur Zielentdeckung.", evidence = Array.Empty<string>() },
|
||||
new { version = "0.9.3.8", codename = "", title = "Suche, Orte, Land und Reiseführer", status = "completed", checklist = (object)null, summary = "NexSearch, Places, Land Portal und Destination Guide einschließlich optionaler Viewer-CAPS abgeschlossen.", evidence = new[] { "NexSearch aggregiert autoritative People-, Groups-, Grid-, Experience- und NV$-Landdaten", "Persistente Places, Events, Classifieds und moderierte Destinationen", "NexSearch/NexPlaces/NexLandPortal/NexDestinationGuide Viewer-CAPS sowie CI-Persistenz- und Moderationsregression" } },
|
||||
new { version = "0.9.3.9", codename = "", title = "NexVoice", status = "planned", checklist = (object)null, summary = "WebRTC-/Janus-Sprachplattform als Ersatz für entfernte Legacy-Sprachsysteme.", evidence = Array.Empty<string>() },
|
||||
new { version = "0.9.3.10", codename = "", title = "Wegfindung", status = "planned", checklist = (object)null, summary = "Wegfindungsdienst, NavMesh-Verhalten und LSL-Integration.", evidence = Array.Empty<string>() },
|
||||
new { version = "0.9.3.11", codename = "", title = "LSL-Parität I — Kernkonformität", status = "planned", checklist = (object)null, summary = "Maschinenlesbare LSL-Matrix, Konformitätstests und Härtung der Script-Sandbox.", evidence = Array.Empty<string>() },
|
||||
@@ -1915,6 +1982,60 @@ namespace NexVerse.Server.Api
|
||||
};
|
||||
}
|
||||
|
||||
private static object PublicOperations(
|
||||
params (string method, string summary, string successCode)[] operations)
|
||||
{
|
||||
Dictionary<string, object> result =
|
||||
new Dictionary<string, object>();
|
||||
|
||||
foreach ((string method, string summary, string successCode) operationSpec in operations)
|
||||
{
|
||||
result[operationSpec.method] =
|
||||
new Dictionary<string, object>
|
||||
{
|
||||
["summary"] = operationSpec.summary,
|
||||
["security"] = Array.Empty<object>(),
|
||||
["responses"] = new Dictionary<string, object>
|
||||
{
|
||||
[operationSpec.successCode] = new { description = "Erfolgreiche Antwort" },
|
||||
["400"] = JsonResponse("Ungültige Anfrage", "Error"),
|
||||
["404"] = JsonResponse("Ressource nicht gefunden", "Error"),
|
||||
["429"] = JsonResponse("Rate-Limit überschritten", "Error")
|
||||
},
|
||||
["x-nexverse-audience"] = new[] { "citizen", "admin", "service" },
|
||||
["x-nexverse-purpose"] = operationSpec.summary,
|
||||
["x-nexverse-ai-instruction"] =
|
||||
"Öffentliche Discovery-Operation. Keine zusätzlichen Rechte aus der Lesbarkeit oder Aufrufbarkeit ableiten.",
|
||||
["x-nexverse-security-constraints"] =
|
||||
new[]
|
||||
{
|
||||
"Keine Zugangsdaten senden, sofern die Operation sie nicht ausdrücklich erfordert.",
|
||||
"Rate-Limits und Korrelations-IDs beachten."
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static object MergeOperations(
|
||||
params object[] operationGroups)
|
||||
{
|
||||
Dictionary<string, object> result =
|
||||
new Dictionary<string, object>();
|
||||
|
||||
foreach (object group in operationGroups)
|
||||
{
|
||||
if (group is Dictionary<string, object> operations)
|
||||
{
|
||||
foreach (KeyValuePair<string, object> pair in operations)
|
||||
result[pair.Key] = pair.Value;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static object AuthenticatedOperations(
|
||||
params (string method, string summary, string scope, string successCode)[] operations)
|
||||
{
|
||||
@@ -2411,6 +2532,66 @@ namespace NexVerse.Server.Api
|
||||
["correlation_id"] = new { type = "string" }
|
||||
}
|
||||
},
|
||||
["DiscoveryObjectResponse"] = new
|
||||
{
|
||||
type = "object"
|
||||
},
|
||||
["DiscoveryMutationRequest"] = new
|
||||
{
|
||||
type = "object",
|
||||
additionalProperties = true
|
||||
},
|
||||
["DiscoveryPlaceRequest"] = new
|
||||
{
|
||||
type = "object",
|
||||
required = new[] { "region_id", "name" },
|
||||
properties = new Dictionary<string, object>
|
||||
{
|
||||
["place_id"] = new { type = "string", format = "uuid" },
|
||||
["region_id"] = new { type = "string", format = "uuid" },
|
||||
["region_name"] = new { type = "string", maxLength = 255 },
|
||||
["parcel_id"] = new { type = "string", format = "uuid" },
|
||||
["parcel_local_id"] = new { type = "integer", minimum = 0 },
|
||||
["name"] = new { type = "string", minLength = 1, maxLength = 255 },
|
||||
["description"] = new { type = "string", maxLength = 8192 },
|
||||
["maturity"] = new { type = "string", @enum = new[] { "general", "moderate", "adult" } },
|
||||
["owner_id"] = new { type = "string", format = "uuid" },
|
||||
["teleport_uri"] = new { type = "string", maxLength = 2048 },
|
||||
["traffic"] = new { type = "number", minimum = 0 },
|
||||
["land_use"] = new { type = "string", @enum = new[] { "other", "residential", "commercial", "mixed" } },
|
||||
["region_type"] = new { type = "string", maxLength = 128 },
|
||||
["featured"] = new { type = "boolean" },
|
||||
["state"] = new { type = "string", @enum = new[] { "draft", "submitted", "approved", "rejected" } }
|
||||
}
|
||||
},
|
||||
["DiscoveryDestinationRequest"] = new
|
||||
{
|
||||
type = "object",
|
||||
required = new[] { "place_id", "name" },
|
||||
properties = new Dictionary<string, object>
|
||||
{
|
||||
["destination_id"] = new { type = "string", format = "uuid" },
|
||||
["place_id"] = new { type = "string", format = "uuid" },
|
||||
["name"] = new { type = "string", minLength = 1, maxLength = 255 },
|
||||
["description"] = new { type = "string", maxLength = 8192 },
|
||||
["category"] = new { type = "string", maxLength = 128 },
|
||||
["subcategory"] = new { type = "string", maxLength = 128 },
|
||||
["collection"] = new { type = "string", maxLength = 128 },
|
||||
["maturity"] = new { type = "string", @enum = new[] { "general", "moderate", "adult" } },
|
||||
["featured"] = new { type = "boolean" },
|
||||
["editor_pick"] = new { type = "boolean" }
|
||||
}
|
||||
},
|
||||
["DiscoveryModerationRequest"] = new
|
||||
{
|
||||
type = "object",
|
||||
required = new[] { "state" },
|
||||
properties = new Dictionary<string, object>
|
||||
{
|
||||
["state"] = new { type = "string", @enum = new[] { "approved", "rejected" } },
|
||||
["note"] = new { type = "string", maxLength = 2048 }
|
||||
}
|
||||
},
|
||||
["Chapter11ObjectResponse"] = new
|
||||
{
|
||||
type = "object"
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace OpenSim
|
||||
{
|
||||
// NexVerse maintains its own version line from the OpenSimulator 0.9.3.0 baseline.
|
||||
public const string ProductName = "OpenGenesisLINK";
|
||||
public const string VersionNumber = "0.9.3.7";
|
||||
public const string AssemblyVersionNumber = "0.9.3.7";
|
||||
public const string VersionNumber = "0.9.3.8";
|
||||
public const string AssemblyVersionNumber = "0.9.3.8";
|
||||
|
||||
public const Flavour VERSION_FLAVOUR = Flavour.Dev;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenGenesisLINK
|
||||
|
||||
**OpenGenesisLINK v0.9.3.7 Dev** is an independent virtual-world server platform developed by the OpenGenesisLINK project.
|
||||
**OpenGenesisLINK v0.9.3.8 Dev** is an independent virtual-world server platform developed by the OpenGenesisLINK project.
|
||||
|
||||
This repository starts from the published **OpenSimulator 0.9.3.0 ("Nessie") Release** source package. It is intentionally maintained as its own repository rather than as a GitHub fork. The long-term objective is an independent OpenGenesisLINK development line whose architecture, services, protocols, modules, tooling and branding may diverge substantially from OpenSimulator.
|
||||
|
||||
@@ -21,7 +21,7 @@ Imported OpenSimulator files do **not** lose or replace their existing BSD/third
|
||||
|
||||
## Versioning
|
||||
|
||||
The active development version is **OpenGenesisLINK v0.9.3.7 Dev**.
|
||||
The active development version is **OpenGenesisLINK v0.9.3.8 Dev**.
|
||||
|
||||
OpenGenesisLINK continues the existing 0.9.3.x development line. OpenSimulator 0.9.3.0 remains the historical source baseline; upstream OpenSimulator version numbers do not automatically become OpenGenesisLINK version numbers.
|
||||
|
||||
|
||||
+4
-3
@@ -1,8 +1,8 @@
|
||||
# OpenGenesisLINK versioning
|
||||
|
||||
Current stable release: **NexVerse 0.9.3.4**
|
||||
Active development line: **OpenGenesisLINK v0.9.3.7 Dev**
|
||||
Active milestone: **NexGroups and NexExperiences — Chapter 11 completed**
|
||||
Active development line: **OpenGenesisLINK v0.9.3.8 Dev**
|
||||
Active milestone: **Search, Places, Land and Destination Guide — Chapter 12 completed**
|
||||
Next architectural consolidation line: **OpenGenesisLINK v0.9.4.0**
|
||||
Completed milestone codename: **NEXJAST**
|
||||
|
||||
@@ -30,7 +30,8 @@ OpenGenesisLINK continues from the OpenSimulator 0.9.3.0 source baseline and the
|
||||
- `NexVerse 0.9.3.4` — completed stable release for Simulator, Region and Estate Control Plane.
|
||||
- `OpenGenesisLINK v0.9.3.5 Dev` — completed development line for Inventory, OAR/IAR, persistent Job Engine and NexBus.
|
||||
- `OpenGenesisLINK v0.9.3.6 Dev` — completed development line for NV$ economy, banking, commerce and land flows.
|
||||
- `OpenGenesisLINK v0.9.3.7 Dev` — current development line; NexGroups parity layer and native NexExperiences/Experience LSL are implemented and validated on `main`.
|
||||
- `OpenGenesisLINK v0.9.3.7 Dev` — completed development line for NexGroups parity, native NexExperiences and Experience LSL.
|
||||
- `OpenGenesisLINK v0.9.3.8 Dev` — current development line; NexSearch, Places, Land Portal and Destination Guide are implemented with optional viewer discovery capabilities.
|
||||
- `OpenGenesisLINK v0.9.3.5 RC1+` — future release-candidate phase after the 0.9.3.5 definition of done is satisfied.
|
||||
- `OpenGenesisLINK v0.9.3.5` — next stable release after validation of the active milestone.
|
||||
- `OpenGenesisLINK v0.9.4.0` — Generation 1 consolidation line for broader OGL branding, German administration surfaces and the native addon subsystem.
|
||||
|
||||
@@ -974,6 +974,13 @@
|
||||
;; Money Unit fee to create groups. Default is 0.
|
||||
; PriceGroupCreate = 0
|
||||
|
||||
[NexDiscoveryViewer]
|
||||
; Optional viewer-facing capabilities for OpenGenesisLINK-aware viewers.
|
||||
; Standard Firestorm/SL-compatible search remains untouched.
|
||||
Enabled = false
|
||||
WorldApiBaseUrl = "http://127.0.0.1:8002"
|
||||
RequestTimeoutMilliseconds = 3000
|
||||
|
||||
[NexExperiencesViewer]
|
||||
; Central OpenGenesisLINK Experience adapter.
|
||||
; Experience permissions and K/V state remain authoritative in Robust.
|
||||
|
||||
@@ -276,6 +276,16 @@
|
||||
; This file is server-owned and must be writable by the Robust process.
|
||||
StorePath = "data/nexverse-experiences.json"
|
||||
|
||||
[NexDiscovery]
|
||||
; Native OpenGenesisLINK discovery authority for Places, Events,
|
||||
; Classifieds and Destination Guide curation.
|
||||
StorePath = "data/opengenesislink-discovery.json"
|
||||
|
||||
; Optional hop/teleport base used when a Place does not provide an
|
||||
; explicit TeleportUri, for example:
|
||||
; TeleportBaseUri = "hop://login.mynexverse.de"
|
||||
TeleportBaseUri = ""
|
||||
|
||||
[NexEconomy]
|
||||
; Native OpenGenesisLINK NV$ double-entry ledger bootstrap.
|
||||
; Disabled until the durable database backend has been validated for this installation.
|
||||
|
||||
@@ -232,6 +232,16 @@
|
||||
; This file is server-owned and must be writable by the Robust process.
|
||||
StorePath = "data/nexverse-experiences.json"
|
||||
|
||||
[NexDiscovery]
|
||||
; Native OpenGenesisLINK discovery authority for Places, Events,
|
||||
; Classifieds and Destination Guide curation.
|
||||
StorePath = "data/opengenesislink-discovery.json"
|
||||
|
||||
; Optional hop/teleport base used when a Place does not provide an
|
||||
; explicit TeleportUri, for example:
|
||||
; TeleportBaseUri = "hop://login.mynexverse.de"
|
||||
TeleportBaseUri = ""
|
||||
|
||||
[NexEconomy]
|
||||
; Native OpenGenesisLINK NV$ double-entry ledger bootstrap.
|
||||
; Disabled until the durable database backend has been validated for this installation.
|
||||
|
||||
+59
-58
@@ -3,8 +3,8 @@
|
||||
> Status: Active development roadmap
|
||||
> Current stable release: **NexVerse 0.9.3.4**
|
||||
> Completed release train: **0.9.3.2 → 0.9.3.3 → 0.9.3.4**
|
||||
> Active development line: **OpenGenesisLINK v0.9.3.7 Dev**
|
||||
> Active milestone: **0.9.3.7 — NexGroups and NexExperiences completed**
|
||||
> Active development line: **OpenGenesisLINK v0.9.3.8 Dev**
|
||||
> Active milestone: **0.9.3.8 — Search, Places, Land and Destination Guide completed**
|
||||
> Completed milestone codename: **NEXJAST**
|
||||
> Historical source baseline: OpenSimulator 0.9.3.0 ("Nessie")
|
||||
|
||||
@@ -1097,74 +1097,75 @@ Support Firestorm-visible flows including:
|
||||
|
||||
## 12. Search, Places, Land and Destination Guide
|
||||
|
||||
Create NexVerse-native discovery services used by both web and viewer.
|
||||
**Status: implemented on the 0.9.3.8 development line.** OpenGenesisLINK now exposes one discovery layer for web clients and optional viewer capabilities while preserving the existing Firestorm-compatible search stack.
|
||||
|
||||
### 12.1 NexSearch
|
||||
|
||||
Index and search:
|
||||
|
||||
- people;
|
||||
- groups;
|
||||
- regions;
|
||||
- parcels;
|
||||
- places;
|
||||
- events;
|
||||
- land for sale;
|
||||
- land for rent;
|
||||
- classifieds;
|
||||
- experiences;
|
||||
- destinations.
|
||||
- [x] people via the authoritative UserAccount service;
|
||||
- [x] groups via the existing Groups V2/NexGroups authority when enabled;
|
||||
- [x] regions via the authoritative Grid service;
|
||||
- [x] parcels projected from published Places;
|
||||
- [x] Places from the persistent NexDiscovery store;
|
||||
- [x] Events from the persistent NexDiscovery store;
|
||||
- [x] land for sale from the existing NV$ land-commerce authority;
|
||||
- [x] land for rent from the existing NV$ land-commerce authority;
|
||||
- [x] Classifieds from the persistent NexDiscovery store;
|
||||
- [x] Experiences from the native NexExperiences authority;
|
||||
- [x] Destinations from the moderated Destination Guide;
|
||||
- [x] type, maturity and bounded-result filtering;
|
||||
- [x] public `GET /api/v1/search` endpoint.
|
||||
|
||||
### 12.2 Places
|
||||
|
||||
Create web place pages containing:
|
||||
|
||||
- region/place name;
|
||||
- description;
|
||||
- maturity;
|
||||
- images;
|
||||
- owner;
|
||||
- coordinates;
|
||||
- teleport link;
|
||||
- parcel details;
|
||||
- traffic;
|
||||
- tags;
|
||||
- events;
|
||||
- related destinations.
|
||||
- [x] region/place name;
|
||||
- [x] description;
|
||||
- [x] maturity;
|
||||
- [x] image list;
|
||||
- [x] owner;
|
||||
- [x] coordinates;
|
||||
- [x] explicit or generated teleport link;
|
||||
- [x] parcel UUID/local ID and parcel details;
|
||||
- [x] traffic;
|
||||
- [x] tags;
|
||||
- [x] linked events;
|
||||
- [x] related destinations;
|
||||
- [x] land-use and region-type metadata;
|
||||
- [x] featured state;
|
||||
- [x] persistent managed CRUD plus public read surface.
|
||||
|
||||
### 12.3 Land portal
|
||||
|
||||
Provide web/API views similar in purpose to modern virtual-world land marketplaces:
|
||||
|
||||
- owned land;
|
||||
- land for sale;
|
||||
- rentals;
|
||||
- residential;
|
||||
- commercial;
|
||||
- featured listings;
|
||||
- price;
|
||||
- area;
|
||||
- maturity;
|
||||
- region type;
|
||||
- map location.
|
||||
- [x] authenticated owned-land view;
|
||||
- [x] active land-for-sale view;
|
||||
- [x] active rental view;
|
||||
- [x] residential/commercial/mixed metadata through Place enrichment;
|
||||
- [x] featured listings;
|
||||
- [x] NV$ price;
|
||||
- [x] area;
|
||||
- [x] maturity;
|
||||
- [x] region type;
|
||||
- [x] map coordinates;
|
||||
- [x] teleport link;
|
||||
- [x] reuses `NexEconomyService.SearchLandListings`; no duplicate commerce ledger or listing authority.
|
||||
|
||||
### 12.4 Destination Guide
|
||||
|
||||
The StadtPortal manages destination content that is also visible in compatible viewers.
|
||||
|
||||
Features:
|
||||
|
||||
- categories;
|
||||
- subcategories;
|
||||
- featured destinations;
|
||||
- editor picks;
|
||||
- recently added;
|
||||
- popular/hot;
|
||||
- events;
|
||||
- maturity filtering;
|
||||
- curated collections;
|
||||
- teleport links;
|
||||
- submission and moderation workflow.
|
||||
- [x] categories;
|
||||
- [x] subcategories;
|
||||
- [x] featured destinations;
|
||||
- [x] editor picks;
|
||||
- [x] recently added sorting;
|
||||
- [x] popular/hot sorting;
|
||||
- [x] linked events;
|
||||
- [x] maturity filtering;
|
||||
- [x] curated collections;
|
||||
- [x] teleport links through the linked Place;
|
||||
- [x] submission workflow;
|
||||
- [x] approve/reject moderation workflow;
|
||||
- [x] popularity/visit counter;
|
||||
- [x] public category and destination APIs;
|
||||
- [x] optional viewer CAPS: `NexSearch`, `NexPlaces`, `NexLandPortal`, `NexDestinationGuide`;
|
||||
- [x] standard Firestorm/SL-compatible search behavior remains untouched.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The NexVerse World API is the Robust-hosted control-plane API for the NexVerse grid deployment running on OpenGenesisLINK.
|
||||
|
||||
Active server development line: **OpenGenesisLINK v0.9.3.7 Dev — NexGroups, NexExperiences and Experience LSL**
|
||||
Active server development line: **OpenGenesisLINK v0.9.3.8 Dev — NexSearch, Places, Land Portal and Destination Guide**
|
||||
|
||||
World API v1 was completed as the 0.9.3.2 development checkpoint on 3 October 2026 and remains the control-plane API foundation for the active OpenGenesisLINK development line. NexVerse continues as the deployment/grid identity.
|
||||
|
||||
@@ -721,3 +721,65 @@ Script routes provide Experience resolution/details, resident permission checks,
|
||||
The shared LSL API/YEngine now exposes the Experience permission and persistent-storage surface: `llRequestExperiencePermissions`, `experience_permissions`, `experience_permissions_denied`, `llGetExperienceDetails`, `llAgentInExperience`, CRUD K/V calls, K/V size/count/key enumeration and `llGetExperienceErrorMessage`.
|
||||
|
||||
Experience permission decisions and K/V data are grid-authoritative through Robust. YEngine reserves event IDs 26 and 27 for the two Experience permission events.
|
||||
|
||||
|
||||
## NexDiscovery — Roadmap 12 / OpenGenesisLINK 0.9.3.8
|
||||
|
||||
OpenGenesisLINK 0.9.3.8 introduces a shared discovery layer for web clients and compatible viewers. Existing Firestorm/Second-Life-compatible search behavior is deliberately preserved; NexDiscovery is an additional native service rather than a destructive replacement.
|
||||
|
||||
### NexSearch
|
||||
|
||||
`GET /api/v1/search` performs bounded cross-domain discovery. Supported result domains are:
|
||||
|
||||
- `people`
|
||||
- `groups`
|
||||
- `regions`
|
||||
- `parcels`
|
||||
- `places`
|
||||
- `events`
|
||||
- `land_for_sale`
|
||||
- `land_for_rent`
|
||||
- `classifieds`
|
||||
- `experiences`
|
||||
- `destinations`
|
||||
|
||||
NexSearch does not create duplicate authorities. People come from UserAccountService, groups from the configured Groups/NexGroups authority, regions from GridService, Experiences from NexExperiences, and sale/rental listings from the NV$ land-commerce workflow. Places, Discovery Events, Classifieds and Destination Guide curation are persisted in the NexDiscovery store.
|
||||
|
||||
Public search supports query, type and maturity filtering. Result counts are bounded server-side.
|
||||
|
||||
### Places
|
||||
|
||||
`GET /api/v1/places` and `GET /api/v1/places/{placeId}` expose published Place data including region/parcel identity, description, maturity, images, owner, coordinates, teleport URI, parcel details, traffic, tags, linked events, related destinations, land-use metadata, region type and featured state.
|
||||
|
||||
Managed Place mutations use `discovery:manage`. Removing a Place also removes its dependent Destination, Event and Classified discovery records so stale portal entries are not retained.
|
||||
|
||||
When a Place does not define an explicit teleport URI, Robust may build one from `[NexDiscovery] TeleportBaseUri`, region name and local coordinates.
|
||||
|
||||
### Land Portal
|
||||
|
||||
`GET /api/v1/land-portal` projects the existing NV$ land-commerce listings into a discovery-oriented marketplace view. Filters include sale/rental type, query, price range, minimum area, maturity, land use, region type and featured state.
|
||||
|
||||
The Land Portal does not maintain a second land-sale database. Price, seller, listing activity and rental period remain authoritative in `NexEconomyService`; NexDiscovery only enriches those listings with Place metadata such as maturity, residential/commercial classification, region type, map position and teleport link.
|
||||
|
||||
`GET /api/v1/land-portal/owned` requires `discovery:read` and returns listings for the authenticated or otherwise authorized owner account.
|
||||
|
||||
### Destination Guide
|
||||
|
||||
`GET /api/v1/destinations` exposes approved Destination Guide entries. Supported views include featured/editor picks, recently added, popular/hot ordering, categories, subcategories, curated collections, maturity filtering and linked events.
|
||||
|
||||
`GET /api/v1/destinations/categories` projects the public category/subcategory tree.
|
||||
|
||||
Authenticated submissions use `discovery:submit`. Moderation uses `discovery:manage` through `POST /api/v1/destinations/{destinationId}/moderation` with `approved` or `rejected` state. Submitted entries are never returned by the public guide until explicitly approved.
|
||||
|
||||
`POST /api/v1/destinations/{destinationId}/visit` records an approved destination visit for popularity ordering. It does not grant any additional grid permission.
|
||||
|
||||
### Viewer capabilities
|
||||
|
||||
When `[NexDiscoveryViewer] Enabled = true` is configured on a simulator, OpenGenesisLINK advertises four optional capabilities to compatible viewers:
|
||||
|
||||
- `NexSearch`
|
||||
- `NexPlaces`
|
||||
- `NexLandPortal`
|
||||
- `NexDestinationGuide`
|
||||
|
||||
These capabilities proxy only public GET discovery operations to the central World API. They do not expose management scopes, API keys or database access to the simulator/viewer. Standard viewer search remains untouched.
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="../../../NexVerse/Core/Discovery/NexDiscoveryStore.cs" Link="NexDiscoveryStore.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,199 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NexVerse.Core.Discovery;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
private static void Require(bool condition, string message)
|
||||
{
|
||||
if (!condition)
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
|
||||
private static void Main()
|
||||
{
|
||||
string root =
|
||||
Path.Combine(
|
||||
Path.GetTempPath(),
|
||||
"ogl-discovery-" +
|
||||
Guid.NewGuid().ToString("N"));
|
||||
Directory.CreateDirectory(root);
|
||||
|
||||
string path =
|
||||
Path.Combine(
|
||||
root,
|
||||
"discovery.json");
|
||||
|
||||
NexDiscoveryStore store =
|
||||
new NexDiscoveryStore(path);
|
||||
|
||||
Guid regionId = Guid.NewGuid();
|
||||
Guid parcelId = Guid.NewGuid();
|
||||
Guid ownerId = Guid.NewGuid();
|
||||
|
||||
NexPlaceRecord place =
|
||||
store.UpsertPlace(
|
||||
new NexPlaceRecord
|
||||
{
|
||||
RegionId = regionId,
|
||||
RegionName = "NexVerse Landing",
|
||||
ParcelId = parcelId,
|
||||
ParcelLocalId = 1,
|
||||
OwnerId = ownerId,
|
||||
Name = "NexVerse Landing Plaza",
|
||||
Description = "Central destination for the grid",
|
||||
Maturity = NexDiscoveryMaturity.General,
|
||||
Images = { "https://example.invalid/place.jpg" },
|
||||
X = 171,
|
||||
Y = 126,
|
||||
Z = 25,
|
||||
Traffic = 123.5,
|
||||
Tags = { "city", "landing", "welcome" },
|
||||
LandUse = NexLandUse.Commercial,
|
||||
RegionType = "city",
|
||||
Featured = true,
|
||||
State = NexDiscoveryPublicationState.Approved
|
||||
});
|
||||
|
||||
Require(
|
||||
place.PlaceId != Guid.Empty,
|
||||
"place ID was not assigned");
|
||||
|
||||
Require(
|
||||
store.ListPlaces(
|
||||
"landing",
|
||||
NexDiscoveryMaturity.General,
|
||||
NexDiscoveryPublicationState.Approved,
|
||||
0,
|
||||
10).Count == 1,
|
||||
"place search failed");
|
||||
|
||||
NexEventRecord eventRecord =
|
||||
store.UpsertEvent(
|
||||
new NexEventRecord
|
||||
{
|
||||
PlaceId = place.PlaceId,
|
||||
OrganizerId = ownerId,
|
||||
Name = "Welcome Night",
|
||||
Description = "Opening event",
|
||||
StartsAt = DateTimeOffset.UtcNow.AddHours(1),
|
||||
EndsAt = DateTimeOffset.UtcNow.AddHours(3),
|
||||
Tags = { "party", "welcome" },
|
||||
State = NexDiscoveryPublicationState.Approved
|
||||
});
|
||||
|
||||
NexClassifiedRecord classified =
|
||||
store.UpsertClassified(
|
||||
new NexClassifiedRecord
|
||||
{
|
||||
OwnerId = ownerId,
|
||||
PlaceId = place.PlaceId,
|
||||
Name = "Shop Space",
|
||||
Description = "Commercial parcel offer",
|
||||
Category = "land",
|
||||
Tags = { "shop", "commercial" },
|
||||
State = NexDiscoveryPublicationState.Approved
|
||||
});
|
||||
|
||||
NexDestinationRecord destination =
|
||||
store.UpsertDestination(
|
||||
new NexDestinationRecord
|
||||
{
|
||||
PlaceId = place.PlaceId,
|
||||
SubmittedBy = ownerId,
|
||||
Name = "NexVerse City Start",
|
||||
Description = "Editor destination",
|
||||
Category = "city",
|
||||
Subcategory = "welcome",
|
||||
Collection = "stadt-nexverse",
|
||||
Featured = true,
|
||||
EditorPick = true,
|
||||
Tags = { "city", "start" },
|
||||
EventIds = { eventRecord.EventId },
|
||||
State = NexDiscoveryPublicationState.Submitted
|
||||
});
|
||||
|
||||
Require(
|
||||
store.ListDestinations(
|
||||
string.Empty,
|
||||
null,
|
||||
NexDiscoveryPublicationState.Approved,
|
||||
string.Empty,
|
||||
string.Empty,
|
||||
null,
|
||||
null,
|
||||
string.Empty,
|
||||
0,
|
||||
10).Count == 0,
|
||||
"submitted destination leaked into public results");
|
||||
|
||||
destination =
|
||||
store.ModerateDestination(
|
||||
destination.DestinationId,
|
||||
NexDiscoveryPublicationState.Approved,
|
||||
"ci-admin",
|
||||
"approved");
|
||||
|
||||
Require(
|
||||
destination.State ==
|
||||
NexDiscoveryPublicationState.Approved,
|
||||
"destination moderation failed");
|
||||
|
||||
store.RecordDestinationVisit(
|
||||
destination.DestinationId);
|
||||
store.RecordDestinationVisit(
|
||||
destination.DestinationId);
|
||||
|
||||
Require(
|
||||
store.GetDestination(
|
||||
destination.DestinationId).Popularity == 2,
|
||||
"destination popularity tracking failed");
|
||||
|
||||
Require(
|
||||
store.GetCategories().Count == 1,
|
||||
"destination category projection failed");
|
||||
|
||||
NexDiscoveryStore reopened =
|
||||
new NexDiscoveryStore(path);
|
||||
|
||||
Require(
|
||||
reopened.GetPlace(place.PlaceId) != null &&
|
||||
reopened.GetEvent(eventRecord.EventId) != null &&
|
||||
reopened.GetClassified(classified.ClassifiedId) != null &&
|
||||
reopened.GetDestination(destination.DestinationId) != null,
|
||||
"discovery persistence/reopen failed");
|
||||
|
||||
Require(
|
||||
reopened.ListDestinations(
|
||||
"nexverse",
|
||||
NexDiscoveryMaturity.General,
|
||||
NexDiscoveryPublicationState.Approved,
|
||||
"city",
|
||||
"stadt-nexverse",
|
||||
true,
|
||||
true,
|
||||
"popular",
|
||||
0,
|
||||
10).Count == 1,
|
||||
"destination filters failed");
|
||||
|
||||
Require(
|
||||
reopened.DeletePlace(place.PlaceId),
|
||||
"place deletion failed");
|
||||
|
||||
Require(
|
||||
reopened.GetPlace(place.PlaceId) == null &&
|
||||
reopened.GetEvent(eventRecord.EventId) == null &&
|
||||
reopened.GetClassified(classified.ClassifiedId) == null &&
|
||||
reopened.GetDestination(destination.DestinationId) == null,
|
||||
"place cascade cleanup failed");
|
||||
|
||||
Directory.Delete(root, true);
|
||||
|
||||
Console.WriteLine(
|
||||
"OpenGenesisLINK NexDiscovery persistence, moderation and cascade regression: OK");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
#!/usr/bin/env python3
|
||||
from pathlib import Path
|
||||
|
||||
store = Path("NexVerse/Core/Discovery/NexDiscoveryStore.cs").read_text(encoding="utf-8")
|
||||
api = Path("NexVerse/Server/Api/NexDiscoveryApi.cs").read_text(encoding="utf-8")
|
||||
connector = Path("NexVerse/Server/Api/NexVerseWorldApiConnector.cs").read_text(encoding="utf-8")
|
||||
security = Path("NexVerse/Core/Security/NexSecurity.cs").read_text(encoding="utf-8")
|
||||
roadmap = Path("doc/NexVerse/ROADMAP.md").read_text(encoding="utf-8")
|
||||
robust = Path("bin/Robust.ini.example").read_text(encoding="utf-8")
|
||||
robust_hg = Path("bin/Robust.HG.ini.example").read_text(encoding="utf-8")
|
||||
opensim_config = Path("bin/OpenSim.ini.example").read_text(encoding="utf-8")
|
||||
viewer = Path("NexVerse/RegionModules/Discovery/NexDiscoveryViewerModule.cs").read_text(encoding="utf-8")
|
||||
openapi = Path("NexVerse/Server/Api/NexVerseWorldApiHandlers.cs").read_text(encoding="utf-8")
|
||||
regression = Path("tools/ci/NexDiscoveryRegression/Program.cs").read_text(encoding="utf-8")
|
||||
|
||||
for marker in (
|
||||
"### 12.1 NexSearch",
|
||||
"### 12.2 Places",
|
||||
"### 12.3 Land portal",
|
||||
"### 12.4 Destination Guide",
|
||||
):
|
||||
assert marker in roadmap, f"missing Roadmap 12 marker: {marker}"
|
||||
|
||||
for marker in (
|
||||
"NexPlaceRecord",
|
||||
"NexEventRecord",
|
||||
"NexClassifiedRecord",
|
||||
"NexDestinationRecord",
|
||||
"NexDiscoveryPublicationState",
|
||||
"NexDiscoveryMaturity",
|
||||
"NexLandUse",
|
||||
"ListPlaces(",
|
||||
"ListEvents(",
|
||||
"ListClassifieds(",
|
||||
"ListDestinations(",
|
||||
"ModerateDestination(",
|
||||
"RecordDestinationVisit(",
|
||||
"GetCategories(",
|
||||
):
|
||||
assert marker in store, f"missing NexDiscovery store marker: {marker}"
|
||||
|
||||
for marker in (
|
||||
"HandleSearch(",
|
||||
"HandlePlaces(",
|
||||
"HandleLandPortal(",
|
||||
"HandleDestinations(",
|
||||
"HandleContent(",
|
||||
'"people"',
|
||||
'"groups"',
|
||||
'"regions"',
|
||||
'"parcels"',
|
||||
'"places"',
|
||||
'"events"',
|
||||
'"land_for_sale"',
|
||||
'"land_for_rent"',
|
||||
'"classifieds"',
|
||||
'"experiences"',
|
||||
'"destinations"',
|
||||
"SearchLandListings(",
|
||||
"FindGroups(",
|
||||
"GetRegionsByName(",
|
||||
"GetUserAccounts(",
|
||||
"m_Experiences.Search(",
|
||||
"DestinationTeleport(",
|
||||
):
|
||||
assert marker in api, f"missing NexDiscovery API marker: {marker}"
|
||||
|
||||
for marker in (
|
||||
'"/api/v1/search"',
|
||||
'"/api/v1/places"',
|
||||
'"/api/v1/events"',
|
||||
'"/api/v1/classifieds"',
|
||||
'"/api/v1/land-portal"',
|
||||
'"/api/v1/destinations"',
|
||||
"new NexDiscoveryStore(",
|
||||
"new NexDiscoveryApi(",
|
||||
):
|
||||
assert marker in connector, f"missing NexDiscovery connector marker: {marker}"
|
||||
|
||||
for marker in (
|
||||
'["/api/v1/search"]',
|
||||
'["/api/v1/places"]',
|
||||
'["/api/v1/land-portal"]',
|
||||
'["/api/v1/destinations"]',
|
||||
'["/api/v1/destinations/{destinationId}/moderation"]',
|
||||
'"DiscoveryPlaceRequest"',
|
||||
'"DiscoveryDestinationRequest"',
|
||||
'"DiscoveryModerationRequest"',
|
||||
"PublicOperations(",
|
||||
"MergeOperations(",
|
||||
):
|
||||
assert marker in openapi, f"missing NexDiscovery OpenAPI marker: {marker}"
|
||||
|
||||
for marker in (
|
||||
'DiscoveryRead = "discovery:read"',
|
||||
'DiscoverySubmit = "discovery:submit"',
|
||||
'DiscoveryManage = "discovery:manage"',
|
||||
):
|
||||
assert marker in security, f"missing discovery scope: {marker}"
|
||||
|
||||
for config in (robust, robust_hg):
|
||||
assert "[NexDiscovery]" in config
|
||||
assert 'StorePath = "data/opengenesislink-discovery.json"' in config
|
||||
assert 'TeleportBaseUri = ""' in config
|
||||
|
||||
for marker in (
|
||||
"NexDiscoveryViewerModule",
|
||||
'"NexSearch"',
|
||||
'"NexPlaces"',
|
||||
'"NexLandPortal"',
|
||||
'"NexDestinationGuide"',
|
||||
"/api/v1/search",
|
||||
"/api/v1/places",
|
||||
"/api/v1/land-portal",
|
||||
"/api/v1/destinations",
|
||||
):
|
||||
assert marker in viewer, f"missing viewer discovery capability marker: {marker}"
|
||||
|
||||
assert "[NexDiscoveryViewer]" in opensim_config
|
||||
assert 'WorldApiBaseUrl = "http://127.0.0.1:8002"' in opensim_config
|
||||
|
||||
for marker in (
|
||||
"submitted destination leaked into public results",
|
||||
"destination moderation failed",
|
||||
"destination popularity tracking failed",
|
||||
"discovery persistence/reopen failed",
|
||||
"place cascade cleanup failed",
|
||||
):
|
||||
assert marker in regression, f"missing discovery regression marker: {marker}"
|
||||
|
||||
print("OpenGenesisLINK Roadmap 12 NexDiscovery contract: OK")
|
||||
Reference in new issue
Block a user