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