AS AgentScopeAPI 手册 / API Reference

SessionInputStager

public final class SessionInputStager
源码Source io/agentscope/builder/web/managed/selfhosted/SessionInputStager.java:36–172

会话输入 Stager,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.managed.selfhosted 包。核心成员包括 metadataFromResources、stage。

Stages session metadata / resource file references into a worker workspace.

Supports Claude-style input_file / files metadata keys as well as Builder session resources[] entries with type=file (url / path / file://).

方法摘要Method Summary

方法Method说明Description
public static Map<String, Object> metadataFromResources(List<Map<String, Object>> resources)
static
设置该参数。
Builds a worker-facing metadata map from a session's `resources[]` list so poll responses can carry staging hints without a second round-trip.
public static void stage(Map<String, Object> metadata, Path workDir) throws Exception
static
执行阶段相关操作。
Stages `input_file` / `files` / `resources` references under workDir.

方法详情Method Detail

metadataFromResources

public static Map<String, Object> metadataFromResources(List<Map<String, Object>> resources)
static

设置该参数。

Builds a worker-facing metadata map from a session's resources[] list so poll responses can carry staging hints without a second round-trip.

参数Parameters
名称Name类型Type说明Description
resourcesList<Map<String, Object>>resources(类型 `List >`)。The resources.
返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/builder/web/managed/selfhosted/SessionInputStager.java:44–77

stage

public static void stage(Map<String, Object> metadata, Path workDir) throws Exception
static

执行阶段相关操作。

Stages input_file / files / resources references under workDir.

参数Parameters
名称Name类型Type说明Description
metadataMap<String, Object>元数据(类型 `Map`)。The metadata.
workDirPathwork 目录(类型 `Path`)。The work dir.
抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/builder/web/managed/selfhosted/SessionInputStager.java:80–118
基于官方固定版本源码静态生成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.