@@ -756,6 +756,70 @@ pub fn build_router(state: AppState) -> Router {
756756 . merge ( graphql:: graphql_router ( state) )
757757 // Federation endpoints (separate state)
758758 . merge ( federation_routes)
759+ // Public well-known endpoints (no auth required)
760+ . merge ( wellknown_router ( ) )
761+ }
762+
763+ /// Groove capability manifest served at /.well-known/groove.
764+ ///
765+ /// Exposes VeriSimDB's service capabilities for groove-based service discovery.
766+ /// See the Groove.idr ABI definition for the canonical manifest schema.
767+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
768+ pub struct GrooveCapability {
769+ /// Capability name (e.g. "octad-storage")
770+ pub name : String ,
771+ /// Protocol (always "http" for REST endpoints)
772+ pub protocol : String ,
773+ /// Endpoint path
774+ pub endpoint : String ,
775+ }
776+
777+ /// Groove service manifest for /.well-known/groove discovery.
778+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
779+ pub struct GrooveManifest {
780+ /// Unique service identifier
781+ pub service_id : String ,
782+ /// Protocol version
783+ pub groove_version : String ,
784+ /// Service capabilities
785+ pub capabilities : Vec < GrooveCapability > ,
786+ /// Capability names this service consumes from others
787+ pub consumes : Vec < String > ,
788+ /// Port the service listens on
789+ pub port : u16 ,
790+ }
791+
792+ /// Build the /.well-known router (public, no authentication required)
793+ fn wellknown_router ( ) -> Router {
794+ Router :: new ( )
795+ . route ( "/.well-known/groove" , get ( groove_handler) )
796+ }
797+
798+ /// Handler for GET /.well-known/groove — returns the VeriSimDB capability manifest
799+ async fn groove_handler ( ) -> Json < GrooveManifest > {
800+ Json ( GrooveManifest {
801+ service_id : "verisimdb" . to_string ( ) ,
802+ groove_version : "1.0.0" . to_string ( ) ,
803+ capabilities : vec ! [
804+ GrooveCapability {
805+ name: "octad-storage" . to_string( ) ,
806+ protocol: "http" . to_string( ) ,
807+ endpoint: "/api/v1/entities" . to_string( ) ,
808+ } ,
809+ GrooveCapability {
810+ name: "drift-detection" . to_string( ) ,
811+ protocol: "http" . to_string( ) ,
812+ endpoint: "/api/v1/drift" . to_string( ) ,
813+ } ,
814+ GrooveCapability {
815+ name: "temporal-versioning" . to_string( ) ,
816+ protocol: "http" . to_string( ) ,
817+ endpoint: "/api/v1/versions" . to_string( ) ,
818+ } ,
819+ ] ,
820+ consumes : vec ! [ "scanning" . to_string( ) ] ,
821+ port : 8080 ,
822+ } )
759823}
760824
761825/// Health check handler — verifies drift detector status and reports degraded when critical
0 commit comments