Interface GatewayAiContext
- All Superinterfaces:
AiContext
GatewayContext.getAiContext(), which returns
empty when AI is not enabled on the gateway; once a caller holds one of these, every accessor is
non-empty and ready to use.-
Nested Class Summary
Nested classes/interfaces inherited from interface AiContext
AiContext.HarnessBuilder, AiContext.ProvidedModel -
Method Summary
Modifier and TypeMethodDescriptionSnapshot of every currently running gateway MCP connection, used by inventory routes that feed the user-agent configuration UI.booleanWhether at least one model provider is configured.mcpToolsFor(Collection<String> connectionNames) Build anMcpToolSourcewhose resource name matches an entry ofconnectionNames(deduped).Methods inherited from interface AiContext
getDefaultModel, getModelProviders, newAgenticHarness, newAgenticHarness
-
Method Details
-
getDiagnosticDigestManager
DiagnosticDigestManager getDiagnosticDigestManager()- Returns:
- the registry that consumer modules use to publish a
DiagnosticDigestGeneratorfor a given page URL.
-
hasModelProviders
boolean hasModelProviders()Whether at least one model provider is configured. Answers from configuration alone, without contacting any provider. -
getMcpConnections
List<McpConnectionInfo> getMcpConnections()Snapshot of every currently running gateway MCP connection, used by inventory routes that feed the user-agent configuration UI. Only includes connections whose startup succeeded. -
mcpToolsFor
Build anMcpToolSourcewhose resource name matches an entry ofconnectionNames(deduped). An empty collection yields a source that contributes no tools.The set of participating connections is resolved at this call — names that don't resolve to a running connection are skipped. Each subsequent
McpToolSource.getMcpTools()invocation still re-lists tools on the already-resolved connections, so a connection's tool set may change turn-to-turn even though the set of connections is frozen.Each tool reports its connection's configured permissions through
CallableTool.permissions(), re-read live rather than captured, so the harness gates listing and execution against the run'sAiActor. This method performs no gating itself.Compose with
AiContext.HarnessBuilder.mcpTools(McpToolSource)to scope a harness's MCP tools to an agent's explicit selection — e.g.ctx.newAgenticHarness(...).mcpTools(ctx.mcpToolsFor(cfg.mcpConnections())).build().
-