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
//! ServiceActivatorsSpec: collection of ServiceActivatorSpec entries (v1) sharing a version.
//! Mirrors FiltersSpec semantics for ordered aggregation and deferred uniqueness enforcement.
//!
//! # Responsibilities
//! * Preserve declaration order (Vec internally).
//! * Carry a single `version` validated by parser (future parser TBD).
//! * Allow optional / duplicate service activator ids; uniqueness & auto-id handled in builder.
//!
//! # Auto-ID Strategy (Builder Level)
//! * Missing `service-activator.id` values assigned deterministic `service:auto.N` IDs starting at 1.
//! * Duplicate explicit ids trigger a build error.
//!
//! # Field Semantics
//! * `ref_name` is a reference identifier matching the `#[service(name=...)]` macro parameter,
//! NOT a file path. It links the YAML configuration to the registered service implementation.
//!
//! # Example (programmatic construction)
//! ```rust
//! use allora_runtime::spec::{ServiceActivatorSpec, ServiceActivatorsSpec};
//! let spec = ServiceActivatorsSpec::new(1)
//! .add(ServiceActivatorSpec::with_id("svc.hello", "hello_world", "inbound.a", "outbound.b"))
//! .add(ServiceActivatorSpec::new("worker_service", "inbound.b", "outbound.c"));
//! assert_eq!(spec.services_activators().len(), 2);
//! assert_eq!(spec.services_activators()[0].id(), Some("svc.hello"));
//! assert!(spec.services_activators()[1].id().is_none());
//! ```
use crateServiceActivatorSpec;