Interface PermissionCheckContext

Represents the context required for making a permission decision for tool usage. This object aggregates all necessary information that the IToolPermissionManager needs to evaluate whether a tool call should be allowed.

PermissionCheckContext

interface PermissionCheckContext {
    tool: ITool<any, any>;
    personaId: string;
    personaCapabilities: string[];
    userContext: UserContext;
    gmiId?: string;
}

Properties

tool: ITool<any, any>

The actual ITool instance for which permission is being checked. This provides access to tool metadata like id, name, and requiredCapabilities.

personaId: string

The unique identifier of the active Persona within the GMI that is attempting to use the tool.

personaCapabilities: string[]

An array of capability strings (e.g., "filesystem:read", "api:weather") currently possessed by the active Persona.

userContext: UserContext

The context of the end-user associated with the current request, which may include userId, preferences, skill level, etc.

gmiId?: string

Optional. The unique identifier of the GMI instance making the request. Useful for logging or more granular GMI-specific rules.