pub enum RuleSource {
UserSettings,
ProjectSettings,
LocalSettings,
CliArg,
Session,
PolicySettings,
Command,
Plugin,
Host,
}Variants§
UserSettings
~/.agix/scenes/<scope>/settings.json
ProjectSettings
settings.json in the project directory (.agix by default)
LocalSettings
settings.local.json in the project directory
CliArg
设置的 cli 层:agixd --set permissions.allow=… 或 EmbedConfig::settings
Session
这个会话自己的:建会话时 options.settings 里的规则串,与会话里答应的「本会话都允许」
PolicySettings
部署方的 managed settings(settings::managed)
Command
由命令展开时临时注入
Plugin
由已安装插件贡献。卸载插件时用 Policy::remove_rules_by_source
整批撤销。
Host
宿主自带的 PermissionPolicy:它的回答作为一层规则参与裁决。
Implementations§
Trait Implementations§
Source§impl Clone for RuleSource
impl Clone for RuleSource
impl Copy for RuleSource
Source§impl Debug for RuleSource
impl Debug for RuleSource
Source§impl<'de> Deserialize<'de> for RuleSource
impl<'de> Deserialize<'de> for RuleSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RuleSource
Source§impl Hash for RuleSource
impl Hash for RuleSource
Source§impl JsonSchema for RuleSource
impl JsonSchema for RuleSource
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for RuleSource
impl PartialEq for RuleSource
Source§impl Serialize for RuleSource
impl Serialize for RuleSource
impl StructuralPartialEq for RuleSource
Auto Trait Implementations§
impl Forget for RuleSource
impl Freeze for RuleSource
impl Move for RuleSource
impl RefUnwindSafe for RuleSource
impl Send for RuleSource
impl Sync for RuleSource
impl Unpin for RuleSource
impl UnsafeUnpin for RuleSource
impl UnwindSafe for RuleSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more