supercode_interchange/orchestration/
mod.rs1pub mod access;
9pub mod agent;
10pub mod channel;
11pub mod codec;
12pub mod fire;
13pub mod job;
14pub mod obligation;
15pub mod profile;
16pub mod route;
17pub mod subscription;
18pub mod worker;
19pub mod workflow;
20
21pub use access::{Access, AccessPolicy};
22pub use agent::{
23 AgentDecl, Budget, BudgetLimit, BudgetPeriod, Conversation, ConversationKind, Cost,
24 HandoffState, HistoryRef, Participant, ParticipantRole, SessionUsage, SpeakerPolicy, Transfer,
25 TransferHistory, TransferState, Usage,
26};
27pub use channel::ChannelConfig;
28pub use fire::{Fire, FireStatus};
29pub use job::{Job, JobOrigin, Repeat, Schedule, Target};
30pub use obligation::{
31 Attachment, Obligation, ObligationSource, ObligationState, OutboundContent, Posted,
32};
33pub use profile::{Orchestration, PersonaRef, Profile, ProfileResidue};
34pub use route::{resolve_route, route_specificity, Route, RouteMatch};
35pub use subscription::WebhookSubscription;
36pub use worker::{
37 EnvValue, PermissionDefault, PermissionPolicy, PermissionUnattended, WorkerHome, WorkerSpec,
38 WorkerSurface,
39};
40pub use workflow::{hermes_instance, Workflow};
41
42pub fn schema() -> schemars::Schema {
46 schemars::schema_for!(Orchestration)
47}
48
49pub fn schema_for(record: &str) -> Option<schemars::Schema> {
51 Some(match record {
52 "Orchestration" => schemars::schema_for!(Orchestration),
53 "Profile" => schemars::schema_for!(Profile),
54 "Binding" => schemars::schema_for!(crate::ontology::Binding),
55 "SurfaceKey" => schemars::schema_for!(crate::ontology::SurfaceKey),
56 "Job" => schemars::schema_for!(Job),
57 "Fire" => schemars::schema_for!(Fire),
58 "Obligation" => schemars::schema_for!(Obligation),
59 "ChannelConfig" => schemars::schema_for!(ChannelConfig),
60 "Route" => schemars::schema_for!(Route),
61 "Access" => schemars::schema_for!(Access),
62 "WebhookSubscription" => schemars::schema_for!(WebhookSubscription),
63 "WorkerSpec" => schemars::schema_for!(WorkerSpec),
64 "PersonaRef" => schemars::schema_for!(PersonaRef),
65 "SecretRef" => schemars::schema_for!(crate::ontology::SecretRef),
66 "AgentDecl" => schemars::schema_for!(AgentDecl),
67 "Conversation" => schemars::schema_for!(Conversation),
68 "SpeakerPolicy" => schemars::schema_for!(SpeakerPolicy),
69 "Transfer" => schemars::schema_for!(Transfer),
70 "Handoff" => schemars::schema_for!(agent::Handoff),
71 "Usage" => schemars::schema_for!(Usage),
72 "Budget" => schemars::schema_for!(Budget),
73 "Fidelity" => schemars::schema_for!(crate::ontology::Fidelity),
74 "ArtifactFidelity" => schemars::schema_for!(crate::ontology::ArtifactFidelity),
75 _ => return None,
76 })
77}
78
79pub const RECORDS: &[&str] = &[
81 "Orchestration",
82 "Profile",
83 "Binding",
84 "SurfaceKey",
85 "Job",
86 "Fire",
87 "Obligation",
88 "ChannelConfig",
89 "Route",
90 "Access",
91 "WebhookSubscription",
92 "WorkerSpec",
93 "PersonaRef",
94 "SecretRef",
95 "AgentDecl",
96 "Conversation",
97 "SpeakerPolicy",
98 "Transfer",
99 "Handoff",
100 "Usage",
101 "Budget",
102 "Fidelity",
103 "ArtifactFidelity",
104];