supercode_interchange/orchestration/
mod.rs1pub mod access;
9pub mod channel;
10pub mod codec;
11pub mod fire;
12pub mod job;
13pub mod obligation;
14pub mod profile;
15pub mod route;
16pub mod subscription;
17pub mod worker;
18pub mod workflow;
19
20pub use access::{Access, AccessPolicy};
21pub use channel::ChannelConfig;
22pub use fire::{Fire, FireStatus};
23pub use job::{Job, JobOrigin, Repeat, Schedule, Target};
24pub use obligation::{
25 Attachment, Obligation, ObligationSource, ObligationState, OutboundContent, Posted,
26};
27pub use profile::{Orchestration, PersonaRef, Profile, ProfileResidue};
28pub use route::{resolve_route, route_specificity, Route, RouteMatch};
29pub use subscription::WebhookSubscription;
30pub use worker::{
31 EnvValue, PermissionDefault, PermissionPolicy, PermissionUnattended, WorkerHome, WorkerSpec,
32 WorkerSurface,
33};
34pub use workflow::{hermes_instance, Workflow};
35
36pub fn schema() -> schemars::Schema {
40 schemars::schema_for!(Orchestration)
41}
42
43pub fn schema_for(record: &str) -> Option<schemars::Schema> {
45 Some(match record {
46 "Orchestration" => schemars::schema_for!(Orchestration),
47 "Profile" => schemars::schema_for!(Profile),
48 "Binding" => schemars::schema_for!(crate::ontology::Binding),
49 "SurfaceKey" => schemars::schema_for!(crate::ontology::SurfaceKey),
50 "Job" => schemars::schema_for!(Job),
51 "Fire" => schemars::schema_for!(Fire),
52 "Obligation" => schemars::schema_for!(Obligation),
53 "ChannelConfig" => schemars::schema_for!(ChannelConfig),
54 "Route" => schemars::schema_for!(Route),
55 "Access" => schemars::schema_for!(Access),
56 "WebhookSubscription" => schemars::schema_for!(WebhookSubscription),
57 "WorkerSpec" => schemars::schema_for!(WorkerSpec),
58 "PersonaRef" => schemars::schema_for!(PersonaRef),
59 "SecretRef" => schemars::schema_for!(crate::ontology::SecretRef),
60 "Fidelity" => schemars::schema_for!(crate::ontology::Fidelity),
61 "ArtifactFidelity" => schemars::schema_for!(crate::ontology::ArtifactFidelity),
62 _ => return None,
63 })
64}
65
66pub const RECORDS: &[&str] = &[
68 "Orchestration",
69 "Profile",
70 "Binding",
71 "SurfaceKey",
72 "Job",
73 "Fire",
74 "Obligation",
75 "ChannelConfig",
76 "Route",
77 "Access",
78 "WebhookSubscription",
79 "WorkerSpec",
80 "PersonaRef",
81 "SecretRef",
82 "Fidelity",
83 "ArtifactFidelity",
84];