metadata:
  schemaVersion: '0.0.0'
  version: '0.0.0'
  # Exported so that everything that describes a process to start names this
  # shape by coordinate (process:command) rather than declaring its own: a
  # repo adapter's verb, the gate's check as it is run, an agent's session.
  export: true
  name: command
  namespace: process
definitions:

  # An external process to start: what is executed, and what it is given.
  #
  # Three spellings of this stood in the tree. A repo adapter answered a
  # verb with a dataclass of `executable` and `args`; the gate ran a check
  # from a list of strings it assembled; and an agent's session was a list
  # of strings whose first item happened to be the executable. A list says
  # nothing about which item is the program, so each reader of one took the
  # first and hoped, and a value could not pass from one of the three to
  # another without being rebuilt.
  #
  # It carries no working directory and no environment. None of the three
  # states either as part of the command: each is the runner's, decided
  # where the process is started.
  command:
    name: command
    fields:
      executable:
        help: >-
          What is executed: a program found on the path, or a path to one.
        type: string
        x-normalize:
        - trim
        x-validate:
        - non-empty
      args:
        help: >-
          The arguments the executable is given, each as one token of its
          command line, in order.
        type:
          base: list
          item: string
        optional: true
        default: []
