// Copyright AGNTCY Contributors (https://github.com/agntcy) // SPDX-License-Identifier: Apache-2.0 syntax = "proto3"; package agntcy.dir.naming.v1; import "agntcy/dir/core/v1/record.proto"; import "agntcy/dir/naming/v1/name_verification.proto"; // NamingService provides methods for name resolution and verification. // Note: Verification is performed automatically by the backend scheduler // for signed records with verifiable names (http://, https:// prefixes). service NamingService { // GetVerificationInfo retrieves the verification info for a record. rpc GetVerificationInfo(GetVerificationInfoRequest) returns (GetVerificationInfoResponse); // Resolve resolves a record reference (name with optional version) to CIDs. // Supports Docker-style references: // - "name" -> returns all versions (newest first) // - "name:version" -> returns the specific version // - "name@cid" -> hash-verified lookup (latest version) // - "name:version@cid" -> hash-verified lookup (specific version) // Returns an error if no matching record is found. rpc Resolve(ResolveRequest) returns (ResolveResponse); } // GetVerificationInfoRequest is the request for retrieving verification info. // Either cid OR name must be provided. If name is provided, it will be resolved // to a CID first (using the latest version if version is not specified). message GetVerificationInfoRequest { // The CID of the record to check. // If provided, name and version are ignored. optional string cid = 1; // The name of the record to check (e.g., "cisco.com/agent"). // Used when cid is not provided. optional string name = 2; // Optional version when looking up by name (e.g., "v1.0.0"). // If not specified, the latest version is used. optional string version = 3; } // GetVerificationInfoResponse is the response for retrieving verification info. message GetVerificationInfoResponse { // Whether the record has verified name ownership. bool verified = 1; // The verification details (only set if verified is true). Verification verification = 2; // Error message if lookup failed. optional string error_message = 3; } // ResolveRequest is the request for resolving a record reference to CIDs. message ResolveRequest { // The name of the record to resolve (e.g., "cisco.com/agent"). string name = 1; // Optional version to resolve to (e.g., "v1.0.0"). optional string version = 2; } // ResolveResponse is the response containing the resolved records. message ResolveResponse { // The resolved record references (newest first by created_at). repeated agntcy.dir.core.v1.NamedRecordRef records = 1; }