AgentVisibilityResolver
public interface AgentVisibilityResolver
源码Source
io/agentscope/builder/web/share/AgentVisibilityResolver.java:27–34定义智能体 Visibility 解析器契约的接口。位于 io.agentscope.builder.web.share 包。核心成员包括 findVisible。
Resolves whether an agent is visible to a user and returns its definition. Implemented by the
control plane's catalog service (authoritative, file + JPA backed) and by the data plane with a
JPA-only read view over the shared database, so both planes can apply AgentAccessGuard
without a cross-plane dependency.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Optional<AgentDefinition> findVisible(String userId, String agentId) | 查找可见。 Returns the definition of `agentId` when visible to `userId` (global scope,
owned by the user, or shared in via grants), otherwise `Optional#empty()`. |
方法详情Method Detail
findVisible
public Optional<AgentDefinition> findVisible(String userId, String agentId)
查找可见。
Returns the definition of agentId when visible to userId (global scope, owned by the user, or shared in via grants), otherwise Optional#empty().
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
userId | String | 用户标识(类型 `String`)。The user id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
Optional<AgentDefinition>返回可选。Returns optional.
源码Source
io/agentscope/builder/web/share/AgentVisibilityResolver.java:33