UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

23 lines • 1.17 kB
import type { AdmissionRules, CommandContext } from '../types.ts'; /** * Whether a session's allow list has a pattern for a command name. A * profile without an allow list allows everything; a profile with one * allows the names its patterns start with, builtins included. Shell * functions are the caller's exemption, not this one's. Mirrors Python's * `head_allowed`. */ export declare function headAllowed(name: string, rules: AdmissionRules | null): boolean; /** * The tokens a pattern reads: the entry point's normalization when it set one, * else the name and the raw argv (a context built by hand). */ export declare function lineTokens(ctx: CommandContext): readonly string[]; /** * Whether a session can run a command at all: its allow list allows the * name and no rule refuses the bare command everywhere. A rule written * under one mount refuses it only on a line working inside that mount, * which the shell judges line by line, so the command still runs; one * written under `/` covers every line. Mirrors Python's `runs`. */ export declare function runs(name: string, rules: AdmissionRules | null): boolean; //# sourceMappingURL=allow.d.ts.map