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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentSpacesCommander(AgentSpacesProperties properties, AgentSpaces spaces, ConsoleView view, List<ConsoleCommand> commands) The C2 executor, present only whenagentspaces.console.command.enabled=true.agentSpacesConsoleLifecycle(AgentSpacesProperties properties, FleetConsoleServer server) Starts the console server once the fabric is up and stops it first on the way down.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.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 everyConsoleViewCustomizerbean in order.
-
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 everyConsoleViewCustomizerbean in order.- Parameters:
spaces- the fabric facadenode- the peer node, for per-connection channel modescustomizers- 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 whenagentspaces.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 everyConsoleCommandbean, and records commands in the console view.- Parameters:
properties- the starter configurationspaces- the fabric facadeview- the console viewcommands- 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 aFleetCommanderbean is present and the command routes have a gate: the staticagentspaces.console.command.tokenwhen set, otherwise — under a configuredagentspaces.security.oidc.*— aBearerJwtValidatorover the identity provider's keys requiringagentspaces.console.command.required-scope(TODO-EFG §5). A static token always wins when both are present.- Parameters:
properties- the starter configurationview- the console viewpanels- every panel bean in the context, possibly emptycommanders- 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 configurationserver- the console server- Returns:
- the lifecycle
-