AS AgentScopeAPI 手册 / API Reference

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
userIdString用户标识(类型 `String`)。The user id.
agentIdString智能体标识(类型 `String`)。The agent id.
返回Returns Optional<AgentDefinition>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/share/AgentVisibilityResolver.java:33
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.