AS AgentScopeAPI 手册 / API Reference

SchedulerConfig

@Configuration public class SchedulerConfig
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:63–160

调度器配置,保存相关配置项。位于 io.agentscope.builder.web.config 包。核心成员包括 objectMapper、channelManager、outboundService、agentVisibilityResolver、baseStore、coordinationStore。

Bean assembly for the builder scheduler plane.

  • ObjectMapper — lenient mapper (unknown properties ignored) shared by the channel runtime and the session bridge when talking to the other planes;

  • ChannelManager — harness channel registry owning every live IM channel adapter;

  • OutboundService — outbound delivery into registered channels;

  • AgentVisibilityResolver — JPA-only read view over the shared database, backing AgentAccessGuard on the outbound endpoint;

  • controlPlaneWebClient / dataPlaneWebClient — plane-to-plane HTTP clients pre-authenticated with the shared internal token.

方法摘要Method Summary

方法Method说明Description
public ObjectMapper objectMapper()
返回 `objectMapper` 结果。
Lenient mapper: tolerates fields added by newer control/data planes.
public ChannelManager channelManager()
返回渠道管理器。
Harness channel registry; populated by `SchedulerChannelRuntime` at startup.
public OutboundService outboundService(ChannelManager channelManager)
设置出站服务。
Outbound delivery service shared by the HTTP controller.
public AgentVisibilityResolver agentVisibilityResolver(AgentVersionEntityRepository versionRepository, AgentVersionService versionService, UserAgentDefinitionStore userAgentDefinitionStore, UserStore userStore, AgentAclService aclService)
执行 `agentVisibilityResolver` 方法。
JPA-only `AgentVisibilityResolver` read view over the shared database.
public BaseStore baseStore(DataSource dataSource)
设置基类存储。
Default `BaseStore` backed by the Spring-managed `DataSource`, mirroring the control/data planes — all planes point at the same JDBC database, so definition files stay visible across planes.
public CoordinationStore coordinationStore(CoordLeaseEntityRepository leaseRepository, CoordHitlTicketEntityRepository hitlRepository, CoordWorkItemEntityRepository workRepository, CoordWorkerHeartbeatEntityRepository workerRepository, TransactionTemplate transactionTemplate)
执行 `coordinationStore` 方法。
Shared coordination store for cron fire leases (and future scheduler coordination).
public WebClient controlPlaneWebClient(String baseUrl, String internalToken)
执行 `controlPlaneWebClient` 方法。
HTTP client for the control plane, pre-authenticated with the internal token.
public WebClient dataPlaneWebClient(String baseUrl, String internalToken)
执行 `dataPlaneWebClient` 方法。
HTTP client for the data plane, pre-authenticated with the internal token.

方法详情Method Detail

objectMapper

public ObjectMapper objectMapper()

返回 objectMapper 结果。

Lenient mapper: tolerates fields added by newer control/data planes.

返回Returns ObjectMapper
返回ObjectMapper。Returns object mapper.
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:69–75

channelManager

public ChannelManager channelManager()

返回渠道管理器。

Harness channel registry; populated by SchedulerChannelRuntime at startup.

返回Returns ChannelManager
返回ChannelManager。Returns channel manager.
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:78–81

outboundService

public OutboundService outboundService(ChannelManager channelManager)

设置出站服务。

Outbound delivery service shared by the HTTP controller.

参数Parameters
名称Name类型Type说明Description
channelManagerChannelManager渠道管理器(类型 `ChannelManager`)。The channel manager.
返回Returns OutboundService
返回OutboundService。Returns outbound service.
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:84–87

agentVisibilityResolver

public AgentVisibilityResolver agentVisibilityResolver(AgentVersionEntityRepository versionRepository, AgentVersionService versionService, UserAgentDefinitionStore userAgentDefinitionStore, UserStore userStore, AgentAclService aclService)

执行 agentVisibilityResolver 方法。

JPA-only AgentVisibilityResolver read view over the shared database.

参数Parameters
名称Name类型Type说明Description
versionRepositoryAgentVersionEntityRepository版本仓库(类型 `AgentVersionEntityRepository`)。The version repository.
versionServiceAgentVersionService版本服务(类型 `AgentVersionService`)。The version service.
userAgentDefinitionStoreUserAgentDefinitionStore用户智能体定义存储(类型 `UserAgentDefinitionStore`)。The user agent definition store.
userStoreUserStore用户存储(类型 `UserStore`)。The user store.
aclServiceAgentAclServiceacl 服务(类型 `AgentAclService`)。The acl service.
返回Returns AgentVisibilityResolver
返回AgentVisibilityResolver。Returns agent visibility resolver.
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:93–103

baseStore

public BaseStore baseStore(DataSource dataSource)

设置基类存储。

Default BaseStore backed by the Spring-managed DataSource, mirroring the control/data planes — all planes point at the same JDBC database, so definition files stay visible across planes.

参数Parameters
名称Name类型Type说明Description
dataSourceDataSource数据来源(类型 `DataSource`)。The data source.
返回Returns BaseStore
返回BaseStore。Returns base store.
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:111–115

coordinationStore

public CoordinationStore coordinationStore(CoordLeaseEntityRepository leaseRepository, CoordHitlTicketEntityRepository hitlRepository, CoordWorkItemEntityRepository workRepository, CoordWorkerHeartbeatEntityRepository workerRepository, TransactionTemplate transactionTemplate)

执行 coordinationStore 方法。

Shared coordination store for cron fire leases (and future scheduler coordination).

参数Parameters
名称Name类型Type说明Description
leaseRepositoryCoordLeaseEntityRepositorylease 仓库(类型 `CoordLeaseEntityRepository`)。The lease repository.
hitlRepositoryCoordHitlTicketEntityRepositoryhitl 仓库(类型 `CoordHitlTicketEntityRepository`)。The hitl repository.
workRepositoryCoordWorkItemEntityRepositorywork 仓库(类型 `CoordWorkItemEntityRepository`)。The work repository.
workerRepositoryCoordWorkerHeartbeatEntityRepository工作进程仓库(类型 `CoordWorkerHeartbeatEntityRepository`)。The worker repository.
transactionTemplateTransactionTemplate事务模板(类型 `TransactionTemplate`)。The transaction template.
返回Returns CoordinationStore
返回CoordinationStore。Returns coordination store.
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:118–133

controlPlaneWebClient

public WebClient controlPlaneWebClient(String baseUrl, String internalToken)

执行 controlPlaneWebClient 方法。

HTTP client for the control plane, pre-authenticated with the internal token.

参数Parameters
名称Name类型Type说明Description
baseUrlString基类 URL(类型 `String`)。The base url.
internalTokenString内部令牌(类型 `String`)。The internal token.
返回Returns WebClient
返回WebClient。Returns web client.
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:136–142

dataPlaneWebClient

public WebClient dataPlaneWebClient(String baseUrl, String internalToken)

执行 dataPlaneWebClient 方法。

HTTP client for the data plane, pre-authenticated with the internal token.

参数Parameters
名称Name类型Type说明Description
baseUrlString基类 URL(类型 `String`)。The base url.
internalTokenString内部令牌(类型 `String`)。The internal token.
返回Returns WebClient
返回WebClient。Returns web client.
源码Source io/agentscope/builder/web/config/SchedulerConfig.java:145–151
基于官方固定版本源码静态生成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.