pub struct NativeServiceDef {
pub name: &'static str,
pub sensitive: bool,
pub description: &'static str,
pub parameters: Option<&'static str>,
pub make: fn() -> Arc<dyn NativeService>,
}Expand description
Native service declaration entry (declarative registration: adding a native capability = appending one entry to the plugin declaration table; the router, the capability inventory, and binding checks need zero changes).
name aligns with the governance-side service catalog seed; the shared
source of truth is each family’s official_native_services.json, with
two-sided guards locking drift.
Fields§
§name: &'static strGlobally unique service name (service_name of io_request; unique
across families, locked when aggregated on the governance side).
sensitive: boolWhether the service touches credentials or sensitive data (aligned with governance-side catalog metadata).
description: &'static strOne-line description (consumed by the capability inventory / docs).
parameters: Option<&'static str>Parameter contract (JSON Schema string in the OpenAI function
parameters subset): None = no contract declared, the capability
inventory omits parameters, and LLM consumers degrade to an empty
schema (byte-for-byte identical to existing behavior, no silent
semantic change). Adding a service = append an entry to this table;
services with a fixed parameter surface should also declare
parameters so the LLM side can generate the tool schema.
make: fn() -> Arc<dyn NativeService>Instance constructor (stateful services inject their default state here).