Manifest
genctl runs a resolver's command once per entry, from the .genroc directory, with every site naming it in one manifest on stdin. A non-zero exit fails the command, with stderr as the message. As JSON Schema: resolver-manifest.json.
| Field | Type | Required | Description |
|---|---|---|---|
mode | resolve | generate | yes | Whether genctl uses the reply. "generate" (genctl generate, typed resolvers only) reads none, so a resolver may skip the work behind it and only write its files; answering anyway is still correct. |
processes | Process[] | yes | One entry per definition with a site for this resolver, in the order the files were read. The reply answers every site, in this order. |
Process
One entry of processes.
| Field | Type | Required | Description |
|---|---|---|---|
dir | string | yes | The definition's directory, absolute: what a relative argument joins to. One call can span several directories, so the resolver's working directory (the .genroc directory) is not it. |
file | string | yes | The definition's file name, within dir. |
name | string | yes | The definition's name. |
sites | Site[] | yes | The directives in this definition that name this resolver. |
$defs | object | The definitions the sites' types reach, and no others. Absent when they reach none, and for a structural resolver. |
Site
One entry of sites: a directive naming this resolver.
| Field | Type | Required | Description |
|---|---|---|---|
args | string[] | yes | The argument's words (blanks separate them, '...' quotes one literally). Not paths: a resolver may take a URL, a package name or nothing, which is []. |
level | process | task | action | yes | Which namespace the directive sits in, so a resolver need not parse pointer to know where it landed. |
pointer | any[] | yes | Where the directive is: keys and array indices from the definition's root, a task named by its id rather than its index. Where the slot has a type, this is its genctl schema type address. |
action | string | The action's type. Only at level action. | |
child | string | The process the action spawns. Only at level action, on an action that names one. | |
task | string | The id of the task the directive is in. Absent at level process. | |
types | object | What this resolver's types entry asked for, by the name it gave each: a JSON Schema whose $ref points into the process's $defs, or null where nothing is at that address. Absent for a structural resolver. |
Reply
What the resolver writes to stdout on success. As JSON Schema: resolver-reply.json.
| Field | Type | Required | Description |
|---|---|---|---|
values | any[] | yes | One value per site, in the manifest's order: processes as listed, then sites within each. A typed resolver answers strings; a structural one answers any JSON value, and a mapping where the directive is a spread. |