Interface ConsoleCommand


public interface ConsoleCommand
The command-and-control extension point: one operator action the console can execute against the fleet. This is the command-side sibling of ConsolePanel (which is read-only). An application registers commands to give operators typed actions, dispatching a task into a space, triggering a key rotation, invoking a capability, and the console renders a form from fields() and executes execute(Map, CommandContext) on submit.

Every command runs under the console peer's own fabric identity: the entries a command writes are signed and leased by the console peer, and the CommandContext.operator() name travels as attribution. The HTTP layer authenticates the operator (a bearer token) before any command runs; a command implementation never sees an unauthenticated request. Under Spring Boot, every ConsoleCommand bean is registered automatically.

  • Method Details

    • id

      String id()
      The command's stable identifier, used in its execution URL. Lowercase words joined by dashes by convention, unique per console.
      Returns:
      the identifier
    • title

      String title()
      The command's title, shown on the UI.
      Returns:
      the human-readable title
    • description

      default String description()
      An optional one-line description of what the command does.
      Returns:
      the description, or the empty string
    • fields

      default List<ConsoleCommand.Field> fields()
      The input fields the operator fills in, rendered as a form.
      Returns:
      the fields, possibly empty for a no-argument command
    • execute

      Executes the command. Runs on an authenticated request, under the console peer's identity.
      Parameters:
      args - the submitted field values, keyed by ConsoleCommand.Field.name()
      ctx - the command context (operator, dispatch, cancel, broadcast, audit)
      Returns:
      the outcome