1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Identity and discovery types for registered named capabilities — the
//! by-name handles a recursive workflow uses to address sub-capabilities.
//!
//! These are the durable, provider-neutral descriptors used by the
//! [`crate::registry::CapabilityRegistry`]. They intentionally do *not* carry
//! executable handles: a [`ComponentMetadata`] can be serialized, diffed, and
//! rendered in a UI long after the process that registered the live model or
//! tool has exited.
use ;
/// A stable, durable identifier for a registered capability.
///
/// This is a newtype over [`String`] rather than a raw Rust type path so a
/// capability can survive module moves, renames, and serialization. The string
/// is the registered name (for example `"gpt-4o"` or `"lookup_user"`); it is
/// scoped to a [`ComponentKind`] by the registry, so the same name may be used
/// for, say, a model and a tool without collision.
;
/// The kind of capability a registered component provides.
///
/// The kind partitions the registry namespace: lookups, duplicate detection,
/// aliasing, and discovery are all scoped by kind, so `(Model, "x")` and
/// `(Tool, "x")` are independent entries.
/// Discovery and UI metadata for one registered capability.
///
/// Every entry in a [`crate::registry::CapabilityRegistry`] has metadata, even
/// when it was registered through a minimal name-only API; in that case the
/// description and tags are empty and [`ComponentMetadata::aliases`] is filled
/// in as aliases are declared.