core_api/
timeouts.generated.rs1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4pub enum Operation {
5 CoreRequest,
6 EntityRefresh,
7 HarnessSessionOpen,
8 ScriptValidation,
9 ScriptSave,
10 CoreBridgeRequest,
11 CoreBridgeInbound,
12 NodeRequest,
13 LionBridgeRequest,
14 LlmCloudCall,
15}
16
17impl Operation {
18 pub const fn id(self) -> &'static str {
19 match self {
20 Self::CoreRequest => "coreRequest",
21 Self::EntityRefresh => "entityRefresh",
22 Self::HarnessSessionOpen => "harnessSessionOpen",
23 Self::ScriptValidation => "scriptValidation",
24 Self::ScriptSave => "scriptSave",
25 Self::CoreBridgeRequest => "coreBridgeRequest",
26 Self::CoreBridgeInbound => "coreBridgeInbound",
27 Self::NodeRequest => "nodeRequest",
28 Self::LionBridgeRequest => "lionBridgeRequest",
29 Self::LlmCloudCall => "llmCloudCall",
30 }
31 }
32
33 pub const fn timeout(self) -> Duration {
34 Duration::from_millis(match self {
35 Self::CoreRequest => 60000,
36 Self::EntityRefresh => 85000,
37 Self::HarnessSessionOpen => 150000,
38 Self::ScriptValidation => 205000,
39 Self::ScriptSave => 420000,
40 Self::CoreBridgeRequest => 35000,
41 Self::CoreBridgeInbound => 55000,
42 Self::NodeRequest => 60000,
43 Self::LionBridgeRequest => 60000,
44 Self::LlmCloudCall => 180000,
45 })
46 }
47}
48
49#[derive(Debug, Clone, Copy, PartialEq, Eq)]
50pub enum WaitProfile {
51 HostIpc,
52 CoreBridge,
53 Client,
54 LionForward,
55}
56
57impl WaitProfile {
58 pub const fn grace(self, operation: Operation) -> Duration {
59 Duration::from_millis(match (self, operation) {
60 (Self::HostIpc, _) => 5000,
61 (Self::CoreBridge, _) => 10000,
62 (Self::Client, _) => 35000,
63 (Self::LionForward, Operation::EntityRefresh) => 5000,
64 (Self::LionForward, Operation::ScriptValidation) => 25000,
65 (Self::LionForward, Operation::ScriptSave) => 30000,
66 (Self::LionForward, _) => 0,
67 })
68 }
69}
70
71const FORWARD_PREFIXES: &[&str] = &[
72 "/invoke",
73 "/dispatch/agent",
74 "/dispatch",
75];
76
77const STORED_SCRIPT_SAVE: &[&str] = &[
78 "/automation/snapshot/rollback",
79 "/app/automation/snapshot/rollback",
80 "/automation/overview/save",
81 "/automation/copy",
82 "/automation/enroll",
83];
84
85const SOURCE_SCRIPT_SAVE: &[&str] = &[
86 "/automation/save",
87 "/app/automation/save",
88];
89
90const SOURCE_SCRIPT_VALIDATION: &[&str] = &[
91 "/app/automation/verify",
92 "/bridge/automation/parse",
93 "/bridge/automation/format",
94 "/bridge/automation/verify",
95 "/automation/format",
96 "/bridge/automation/compile",
97 "/bridge/agent/automation/compile",
98];
99
100const ORDINARY_OVERRIDES: &[(&str, Operation)] = &[
101 ("/app/integration/entity/refresh", Operation::EntityRefresh),
102 ("/harness/test/session/open", Operation::HarnessSessionOpen),
103];