openvibe-sdk/agents/rules

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.168.0.

From types/agents-rules.d.ts (both). Declarations are shown verbatim.

type Effect

export type Effect = 'allow' | 'ask' | 'deny';

type Level

export type Level = 'ask' | 'auto-edits' | 'approve-for-me' | 'full';

interface PermissionRule

export interface PermissionRule { action: string; resource?: string; effect: Effect; when?: 'attended' | 'unattended' | 'any'; reason?: string; }

interface Call

export interface Call { action: string; resource?: string; floor?: boolean; kind?: 'read' | 'edit' | 'exec' | 'network' | 'other'; }

export export function decide(rules: PermissionRule[], call: Call,

export function decide(rules: PermissionRule[], call: Call, options?: { attended?: boolean; level?: Level }): { effect: Effect; rule: PermissionRule | null; why: string };

export export function fromBlueprint(doc: object): PermissionRule[]

export function fromBlueprint(doc: object): PermissionRule[];

export export function matches(pattern: string | null | undefined,

export function matches(pattern: string | null | undefined, value: string): boolean;

export export const LEVELS: Level[];

export const LEVELS: Level[];

export export const EFFECTS: Effect[];

export const EFFECTS: Effect[];

export export const MACHINE_KIND: Record<string, string>;

export const MACHINE_KIND: Record<string, string>;