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 Exceptionstatic | 执行阶段相关操作。 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 |
|---|---|---|
resources | List<Map<String, Object>> | resources(类型 `List >`)。The resources. |
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/builder/web/managed/selfhosted/SessionInputStager.java:44–77stage
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 |
|---|---|---|
metadata | Map<String, Object> | 元数据(类型 `Map`)。The metadata. |
workDir | Path | work 目录(类型 `Path`)。The work dir. |
Exception可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/builder/web/managed/selfhosted/SessionInputStager.java:80–118