pub struct DeclareCapabilityRequest {
pub provider_id: String,
pub contract_id: String,
pub transport: i32,
pub endpoint: String,
pub params: Option<TransportParams>,
pub description: String,
}Fields§
§provider_id: StringOwning CapabilityProvider (primitive/service/skill); MUST already be registered.
contract_id: Stringcontract_id, e.g. “robonix/primitive/camera/depth”.
transport: i32§endpoint: StringPreferred address string. Format is transport-specific: grpc: “127.0.0.1:50105” (caller binds first) ros2: “/scanner/cloud” (“” => Atlas mints) mcp: “http://host:port/mcp"
Conflict resolution:
- empty proposal + mintable transport (ros2)
-> Atlas mints “/rbnx/
/ ” - empty proposal + non-mintable transport (grpc, mcp) -> InvalidArgument
- non-empty + no collision -> stored verbatim
- non-empty + collision + mintable
-> Atlas rewrites by appending “~
” - non-empty + collision + non-mintable -> AlreadyExists (caller picks new and retries)
CALLER MUST USE the returned endpoint.
params: Option<TransportParams>Transport-specific params; the oneof variant MUST match transport.
description: StringInstance-specific natural-language description for THIS particular
Capability instance – the part that’s specific to this provider’s
setup, on top of whatever the contract already says generically.
Example: contract robonix/primitive/camera/rgb already explains
“returns current RGB image as sensor_msgs/Image”; this field adds
“front-facing, 640x480 @ 30 Hz, no exposure compensation” for the
tiago_camera_front instance specifically. Surfaced to Pilot / LLM.
Filled by the CapabilityProvider – either explicitly, or auto-
filled by the framework from the handler’s docstring (e.g.
robonix_api’s @cap.mcp(...) / @cap.grpc(...) wrappers read
the wrapped function’s docstring into this field before calling
DeclareCapability). Either way, only this single field hits the
wire.
SHOULD be one short line (~200 chars or less); longer prose belongs in CAPABILITY.md.
Optional; may be empty when the contract’s description already
says everything that needs saying. Consumers MERGE this with
ContractDescriptor.description at consume time – the two are
not alternatives; they cover generic vs instance-specific aspects
of the same Capability and may overlap. The CapabilityProvider’s
CAPABILITY.md is a separate, long-form per-CapabilityProvider
doc (see RegisterRequest.capability_md_path), surfaced alongside.
Implementations§
Trait Implementations§
Source§impl Clone for DeclareCapabilityRequest
impl Clone for DeclareCapabilityRequest
Source§fn clone(&self) -> DeclareCapabilityRequest
fn clone(&self) -> DeclareCapabilityRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeclareCapabilityRequest
impl Debug for DeclareCapabilityRequest
Source§impl Default for DeclareCapabilityRequest
impl Default for DeclareCapabilityRequest
Source§impl Hash for DeclareCapabilityRequest
impl Hash for DeclareCapabilityRequest
Source§impl Message for DeclareCapabilityRequest
impl Message for DeclareCapabilityRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for DeclareCapabilityRequest
impl PartialEq for DeclareCapabilityRequest
impl Eq for DeclareCapabilityRequest
impl StructuralPartialEq for DeclareCapabilityRequest
Auto Trait Implementations§
impl Freeze for DeclareCapabilityRequest
impl RefUnwindSafe for DeclareCapabilityRequest
impl Send for DeclareCapabilityRequest
impl Sync for DeclareCapabilityRequest
impl Unpin for DeclareCapabilityRequest
impl UnsafeUnpin for DeclareCapabilityRequest
impl UnwindSafe for DeclareCapabilityRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].