Add document surface diagnostics
This commit is contained in:
parent
a17e10d198
commit
8bb85d7c47
6 changed files with 149 additions and 10 deletions
|
|
@ -1454,6 +1454,35 @@ namespace GameCult.Mesh
|
|||
return new CultMeshSurfaceDiagnostic(CultMeshSurfaceKind.LiveFeed, feed.FeedId, feed.RouteHint, feed.Sources);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a typed document handle as one entry in a surface catalog.
|
||||
/// </summary>
|
||||
public static CultMeshSurfaceDiagnostic DescribeSurface(
|
||||
ICultMeshDocumentHandle document)
|
||||
{
|
||||
if (document == null) throw new ArgumentNullException(nameof(document));
|
||||
return new CultMeshSurfaceDiagnostic(
|
||||
CultMeshSurfaceKind.Document,
|
||||
document.DocumentId,
|
||||
document.RouteHint,
|
||||
document.Sources);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a typed collection handle as one entry in a surface catalog.
|
||||
/// </summary>
|
||||
public static CultMeshSurfaceDiagnostic DescribeSurface<TDocument>(
|
||||
CultMeshCollectionHandle<TDocument> collection)
|
||||
where TDocument : class
|
||||
{
|
||||
if (collection == null) throw new ArgumentNullException(nameof(collection));
|
||||
return new CultMeshSurfaceDiagnostic(
|
||||
CultMeshSurfaceKind.Collection,
|
||||
collection.CollectionId,
|
||||
collection.RouteHint,
|
||||
collection.Sources);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a typed state pointer as one entry in a surface catalog.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1502,6 +1502,12 @@ namespace GameCult.Mesh
|
|||
/// <summary>A typed operation handle.</summary>
|
||||
Operation,
|
||||
|
||||
/// <summary>A typed reactive document handle.</summary>
|
||||
Document,
|
||||
|
||||
/// <summary>A typed reactive collection handle.</summary>
|
||||
Collection,
|
||||
|
||||
/// <summary>A typed pointer to Verse state.</summary>
|
||||
StatePointer,
|
||||
|
||||
|
|
@ -1608,6 +1614,8 @@ namespace GameCult.Mesh
|
|||
ProjectionRecipes = catalog.FindByKind(CultMeshSurfaceKind.ProjectionRecipe);
|
||||
LiveFeeds = catalog.FindByKind(CultMeshSurfaceKind.LiveFeed);
|
||||
Operations = catalog.FindByKind(CultMeshSurfaceKind.Operation);
|
||||
Documents = catalog.FindByKind(CultMeshSurfaceKind.Document);
|
||||
Collections = catalog.FindByKind(CultMeshSurfaceKind.Collection);
|
||||
StatePointers = catalog.FindByKind(CultMeshSurfaceKind.StatePointer);
|
||||
NativeSliceViews = catalog.FindByKind(CultMeshSurfaceKind.NativeSliceView);
|
||||
}
|
||||
|
|
@ -1627,6 +1635,12 @@ namespace GameCult.Mesh
|
|||
/// <summary>Gets typed operation handles.</summary>
|
||||
public IReadOnlyList<CultMeshSurfaceDiagnostic> Operations { get; }
|
||||
|
||||
/// <summary>Gets typed reactive document handles.</summary>
|
||||
public IReadOnlyList<CultMeshSurfaceDiagnostic> Documents { get; }
|
||||
|
||||
/// <summary>Gets typed reactive collection handles.</summary>
|
||||
public IReadOnlyList<CultMeshSurfaceDiagnostic> Collections { get; }
|
||||
|
||||
/// <summary>Gets typed pointers to Verse state.</summary>
|
||||
public IReadOnlyList<CultMeshSurfaceDiagnostic> StatePointers { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -388,19 +388,20 @@ diagnostic shape for generated clients, Eve/CultUI inspectors, MCP tools, and
|
|||
surface catalogs. Tooling should ask CultMesh for these descriptors instead of
|
||||
copying source lists and route hints by convention.
|
||||
`CultMesh.DescribeSurface(...)` and `CultMesh.DescribeSurfaceCatalog(...)`
|
||||
collect query surfaces, projection recipes, live feeds, operations, state
|
||||
pointers, and native views into one inspectable catalog for a runtime or
|
||||
generated binding package. State pointers are advertised by pointer id; native
|
||||
slice views are advertised by view id and route while the full column layout
|
||||
stays in `CultMeshNativeSliceViewDescriptor`.
|
||||
collect query surfaces, projection recipes, live feeds, operations, document
|
||||
handles, collection handles, state pointers, and native views into one
|
||||
inspectable catalog for a runtime or generated binding package. Documents are
|
||||
advertised by document id, collections by collection id, state pointers by
|
||||
pointer id, and native slice views by view id and route while the full column
|
||||
layout stays in `CultMeshNativeSliceViewDescriptor`.
|
||||
Catalog diagnostics support exact id lookup and kind filtering so tools can
|
||||
discover, for example, every operation or native view without local scan
|
||||
conventions. `CultMesh.DescribeSurfaceCatalogIndex(...)` / TS
|
||||
`CultMesh.surfaceCatalogIndex(...)` promotes that grouping into a shared
|
||||
diagnostic shape with `queries`, `projectionRecipes`, `liveFeeds`,
|
||||
`operations`, `statePointers`, and `nativeSliceViews`, so generated bindings
|
||||
and tools can ask for the semantic bucket they need without copying catalog
|
||||
scan logic.
|
||||
`operations`, `documents`, `collections`, `statePointers`, and
|
||||
`nativeSliceViews`, so generated bindings and tools can ask for the semantic
|
||||
bucket they need without copying catalog scan logic.
|
||||
|
||||
Live feeds compose several query surfaces into one client-facing snapshot
|
||||
without making the UI own refresh loops:
|
||||
|
|
|
|||
Loading…
Reference in a new issue