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