The two verbs of a machine (commons headless 0006-machine-verbs): machine query takes a query string and machine check a check id, each with a target selector (--on, as any command that may be reached through ssh), and returns the typed outcome of a report. Headless does not learn what a query is: the string is opaque to it, handed to the backend byte for byte, and what answers it (SQL over a database, an osquery schema, a check of governance, risk and compliance) is the backend's, which the program that uses these verbs gives. This module imports neither the data library nor the grc library, and no layer of Headless MAY.
typeMachineBackend= {
/** Answers a query string, which it alone reads. */query(query:string, ctx:Context):Promise<Outcome>;
/** Runs the check with this id. */check(id:string, ctx:Context):Promise<Outcome>;
/** The ids of the checks there are, where the backend knows them, so that a wrong id is told the nearest. */checks?():readonlystring[];
};
What answers a machine verb: the program's own (data's queries, grc's checks), given to the verbs.
typeMachineBackend= {
/** Answers a query string, which it alone reads. */query(query:string, ctx:Context):Promise<Outcome>;
/** Runs the check with this id. */check(id:string, ctx:Context):Promise<Outcome>;
/** The ids of the checks there are, where the backend knows them, so that a wrong id is told the nearest. */checks?():readonlystring[];
};
What answers a machine verb: the program's own (data's queries, grc's checks), given to the verbs.