MCPcopy Create free account
hub / github.com/AI45Lab/Code / restricted_registry

Function restricted_registry

core/src/safety_gate.rs:189–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187 }
188
189 fn restricted_registry() -> Arc<SkillRegistry> {
190 let registry = SkillRegistry::new();
191 registry.register_unchecked(Arc::new(Skill {
192 name: "read-only".to_string(),
193 description: String::new(),
194 allowed_tools: Some("read(*), grep(*)".to_string()),
195 disable_model_invocation: false,
196 kind: SkillKind::Instruction,
197 content: String::new(),
198 tags: Vec::new(),
199 version: None,
200 }));
201 Arc::new(registry)
202 }
203
204 #[tokio::test]
205 async fn active_skill_restriction_is_ignored_by_default_before_permission_allow() {

Calls 1

register_uncheckedMethod · 0.80

Tested by

no test coverage detected