Class AgentSpacesConsoleAutoConfiguration

java.lang.Object
ai.badmonkey.agentspaces.spring.AgentSpacesConsoleAutoConfiguration

@AutoConfiguration @ConditionalOnProperty(prefix="agentspaces.console", name="enabled", havingValue="true") public class AgentSpacesConsoleAutoConfiguration extends Object
Serves the fleet console when agentspaces.console.enabled=true (spec's "the console is one more read-only peer": everything shown derives from this peer's replicas, membership, and ad cache). The default view watches every configured space generically; ConsoleViewCustomizer beans refine it with the application's entry types and worker attribution, and every ConsolePanel bean becomes a section on the served UI and a document under /api/v1/panels. Each bean here is @ConditionalOnMissingBean, so an application replaces any piece by declaring its own.
  • Constructor Details

    • AgentSpacesConsoleAutoConfiguration

      public AgentSpacesConsoleAutoConfiguration()
  • Method Details

    • agentSpacesConsoleView

      @Bean @ConditionalOnMissingBean public ConsoleView agentSpacesConsoleView(AgentSpaces spaces, PeerNode node, List<ConsoleViewCustomizer> customizers)
      The console model over the configured fabric: first group's membership and discovery, every configured space watched generically, refined by every ConsoleViewCustomizer bean in order.
      Parameters:
      spaces - the fabric facade
      node - the peer node, for per-connection channel modes
      customizers - the application's refinements, possibly empty
      Returns:
      the console view
    • agentSpacesCommander

      @Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="agentspaces.console.command", name="enabled", havingValue="true") public FleetCommander agentSpacesCommander(AgentSpacesProperties properties, AgentSpaces spaces, ConsoleView view, List<ConsoleCommand> commands)
      The C2 executor, present only when agentspaces.console.command.enabled=true. It resolves spaces on the first configured group (so the control and audit spaces must be declared among that group's spaces), collects every ConsoleCommand bean, and records commands in the console view.
      Parameters:
      properties - the starter configuration
      spaces - the fabric facade
      view - the console view
      commands - the application's command beans, possibly empty
      Returns:
      the commander
    • agentSpacesConsoleServer

      @Bean @ConditionalOnMissingBean public FleetConsoleServer agentSpacesConsoleServer(AgentSpacesProperties properties, ConsoleView view, List<ConsolePanel> panels, List<FleetCommander> commanders)
      The console server, its fleet name defaulting to the first configured group's name. Command-and-control is attached when a FleetCommander bean is present and the command routes have a gate: the static agentspaces.console.command.token when set, otherwise — under a configured agentspaces.security.oidc.* — a BearerJwtValidator over the identity provider's keys requiring agentspaces.console.command.required-scope (TODO-EFG §5). A static token always wins when both are present.
      Parameters:
      properties - the starter configuration
      view - the console view
      panels - every panel bean in the context, possibly empty
      commanders - the commander bean when C2 is enabled, else empty
      Returns:
      the server, not yet started
    • agentSpacesConsoleLifecycle

      @Bean @ConditionalOnMissingBean public AgentSpacesConsoleLifecycle agentSpacesConsoleLifecycle(AgentSpacesProperties properties, FleetConsoleServer server)
      Starts the console server once the fabric is up and stops it first on the way down.
      Parameters:
      properties - the starter configuration
      server - the console server
      Returns:
      the lifecycle