Table of Contents

Class ToolPermissionProfile

Namespace
JD.AI.Core.Agents
Assembly
JD.AI.Core.dll

In-memory explicit tool permission profile resolved from user/project config. Rules support exact names and glob patterns (*, ?).

public sealed class ToolPermissionProfile
Inheritance
ToolPermissionProfile
Inherited Members

Properties

Empty

public static ToolPermissionProfile Empty { get; }

Property Value

ToolPermissionProfile

GlobalAllowed

[SuppressMessage("Design", "CA1002:Do not expose generic lists", Justification = "Simple mutable runtime profile")]
public List<string> GlobalAllowed { get; }

Property Value

List<string>

GlobalDenied

[SuppressMessage("Design", "CA1002:Do not expose generic lists", Justification = "Simple mutable runtime profile")]
public List<string> GlobalDenied { get; }

Property Value

List<string>

ProjectAllowed

[SuppressMessage("Design", "CA1002:Do not expose generic lists", Justification = "Simple mutable runtime profile")]
public List<string> ProjectAllowed { get; }

Property Value

List<string>

ProjectDenied

[SuppressMessage("Design", "CA1002:Do not expose generic lists", Justification = "Simple mutable runtime profile")]
public List<string> ProjectDenied { get; }

Property Value

List<string>

Methods

AddAllowed(string, bool)

public void AddAllowed(string toolPattern, bool projectScope)

Parameters

toolPattern string
projectScope bool

AddDenied(string, bool)

public void AddDenied(string toolPattern, bool projectScope)

Parameters

toolPattern string
projectScope bool

IsExplicitlyAllowed(string)

public bool IsExplicitlyAllowed(string toolName)

Parameters

toolName string

Returns

bool

IsExplicitlyDenied(string)

public bool IsExplicitlyDenied(string toolName)

Parameters

toolName string

Returns

bool

MatchesRule(string, string)

public static bool MatchesRule(string value, string pattern)

Parameters

value string
pattern string

Returns

bool