AguiRuntimeContextResolver
@FunctionalInterface public interface AguiRuntimeContextResolver
io/agentscope/core/agui/runtime/AguiRuntimeContextResolver.java:33–43定义 AGUI 运行时上下文解析器契约的接口。位于 io.agentscope.core.agui.runtime 包。核心成员包括 resolve。
Resolves a caller-provided RuntimeContext for an AG-UI request.
Applications can expose this as a bean (or pass it programmatically to
io.agentscope.core.agui.processor.AguiRequestProcessor) to attach request-scoped values
such as tenant information, tracing data, or tool dependencies. The AG-UI runtime metadata is
still supplied by the protocol adapter and takes precedence over conflicting values.
The native request type is transport-specific, so the request parameter uses a wildcard
(<?>). Implementations that need the native request can obtain it via
request.getNativeRequest() (returned as the captured type) and narrow it with
instanceof.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public RuntimeContext resolve(AguiRuntimeContextRequest<?> request) | 用于当前请求的解析运行时上下文。 Resolve the runtime context for the current request. |
方法详情Method Detail
resolve
public RuntimeContext resolve(AguiRuntimeContextRequest<?> request)
用于当前请求的解析运行时上下文。
Resolve the runtime context for the current request.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
request | AguiRuntimeContextRequest<?> | AG-UI 请求上下文。The AG-UI request context |
RuntimeContextio/agentscope/core/agui/runtime/AguiRuntimeContextResolver.java:42