Skip to repository content138 lines · 3.7 KB · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T02:53:47.250Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
flags.rs
1use crate::{EnumFeatureFlag, FeatureFlag, PresenceFlag, register_feature_flag};
2
3pub struct NotebookFeatureFlag;
4
5impl FeatureFlag for NotebookFeatureFlag {
6 const NAME: &'static str = "notebooks";
7 type Value = PresenceFlag;
8}
9register_feature_flag!(NotebookFeatureFlag);
10
11pub struct PanicFeatureFlag;
12
13impl FeatureFlag for PanicFeatureFlag {
14 const NAME: &'static str = "panic";
15 type Value = PresenceFlag;
16}
17register_feature_flag!(PanicFeatureFlag);
18
19/// A feature flag for granting access to beta ACP features.
20///
21/// We reuse this feature flag for new betas, so don't delete it if it is not currently in use.
22pub struct AcpBetaFeatureFlag;
23
24impl FeatureFlag for AcpBetaFeatureFlag {
25 const NAME: &'static str = "acp-beta";
26 type Value = PresenceFlag;
27}
28register_feature_flag!(AcpBetaFeatureFlag);
29
30pub struct DiffReviewFeatureFlag;
31
32impl FeatureFlag for DiffReviewFeatureFlag {
33 const NAME: &'static str = "diff-review";
34 type Value = PresenceFlag;
35
36 fn enabled_for_staff() -> bool {
37 false
38 }
39}
40register_feature_flag!(DiffReviewFeatureFlag);
41
42/// Gates the `create_thread` and `list_agents_and_models` tools, which let
43/// the agent spawn independent sibling threads that show up in the agent
44/// panel sidebar.
45pub struct CreateThreadToolFeatureFlag;
46
47impl FeatureFlag for CreateThreadToolFeatureFlag {
48 const NAME: &'static str = "create-thread-tool";
49 type Value = PresenceFlag;
50
51 fn enabled_for_staff() -> bool {
52 true
53 }
54}
55register_feature_flag!(CreateThreadToolFeatureFlag);
56
57pub struct LspToolFeatureFlag;
58
59impl FeatureFlag for LspToolFeatureFlag {
60 const NAME: &'static str = "lsp-tool";
61 type Value = PresenceFlag;
62
63 fn enabled_for_staff() -> bool {
64 false
65 }
66}
67register_feature_flag!(LspToolFeatureFlag);
68
69pub struct RenameToolFeatureFlag;
70
71impl FeatureFlag for RenameToolFeatureFlag {
72 const NAME: &'static str = "rename-tool";
73 type Value = PresenceFlag;
74
75 fn enabled_for_staff() -> bool {
76 true
77 }
78}
79register_feature_flag!(RenameToolFeatureFlag);
80
81pub struct ProjectPanelUndoRedoFeatureFlag;
82
83impl FeatureFlag for ProjectPanelUndoRedoFeatureFlag {
84 const NAME: &'static str = "project-panel-undo-redo";
85 type Value = PresenceFlag;
86
87 fn enabled_for_staff() -> bool {
88 true
89 }
90}
91register_feature_flag!(ProjectPanelUndoRedoFeatureFlag);
92
93/// Controls how agent thread worktree chips are labeled in the sidebar.
94#[derive(Clone, Copy, PartialEq, Eq, Debug, EnumFeatureFlag)]
95pub enum AgentThreadWorktreeLabel {
96 #[default]
97 Both,
98 Worktree,
99 Branch,
100}
101
102pub struct AgentThreadWorktreeLabelFlag;
103
104impl FeatureFlag for AgentThreadWorktreeLabelFlag {
105 const NAME: &'static str = "agent-thread-worktree-label";
106 type Value = AgentThreadWorktreeLabel;
107
108 fn enabled_for_staff() -> bool {
109 false
110 }
111}
112register_feature_flag!(AgentThreadWorktreeLabelFlag);
113
114pub struct AutoWatchFeatureFlag;
115
116impl FeatureFlag for AutoWatchFeatureFlag {
117 const NAME: &'static str = "auto-watch-screens";
118 type Value = PresenceFlag;
119}
120register_feature_flag!(AutoWatchFeatureFlag);
121
122/// Wraps agent-run terminal commands in an OS-level sandbox where supported,
123/// and applies the shared per-host network grants to the `fetch` tool and the
124/// out-of-project write grants to the `create_directory` tool. When off,
125/// these tools run with the agent's full ambient permissions, as they always
126/// have.
127pub struct SandboxingFeatureFlag;
128
129impl FeatureFlag for SandboxingFeatureFlag {
130 const NAME: &'static str = "sandboxing";
131 type Value = PresenceFlag;
132
133 fn enabled_for_staff() -> bool {
134 false
135 }
136}
137register_feature_flag!(SandboxingFeatureFlag);
138