SessionConstants
public final class SessionConstants
源码Source
io/agentscope/harness/coding/session/SessionConstants.java:19–36会话 Constants,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.harness.coding.session 包。核心成员包括 resolveRequesterKey、MAX_SPAWN_DEPTH、ROOT_REQUESTER_SESSION_KEY。
Shared constants for managed session / subagent flows.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
MAX_SPAWN_DEPTHstaticfinal | int | 最大 SPAWN DEPTH字段。 Maximum allowed spawn depth to prevent runaway recursion (main=0, sub=1, sub-sub=2…). |
ROOT_REQUESTER_SESSION_KEYstaticfinal | String | 根 REQUESTER 会话键字段。 Synthetic requester key when the tool owner is the top-level harness (no parent session). |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static String resolveRequesterKey(String parentSessionKey)static | 解析 `resolveRequesterKey`。 Resolves the requester key: explicit parent or `#ROOT_REQUESTER_SESSION_KEY`. |
字段详情Field Detail
MAX_SPAWN_DEPTH
public static final int MAX_SPAWN_DEPTH
staticfinal
最大 SPAWN DEPTH字段。声明为 public static final int MAX_SPAWN_DEPTH。
Maximum allowed spawn depth to prevent runaway recursion (main=0, sub=1, sub-sub=2…).
源码Source
io/agentscope/harness/coding/session/SessionConstants.java:22ROOT_REQUESTER_SESSION_KEY
public static final String ROOT_REQUESTER_SESSION_KEY
staticfinal
根 REQUESTER 会话键字段。声明为 public static final String ROOT_REQUESTER_SESSION_KEY。
Synthetic requester key when the tool owner is the top-level harness (no parent session).
源码Source
io/agentscope/harness/coding/session/SessionConstants.java:25方法详情Method Detail
resolveRequesterKey
public static String resolveRequesterKey(String parentSessionKey)
static
解析 resolveRequesterKey。
Resolves the requester key: explicit parent or #ROOT_REQUESTER_SESSION_KEY.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parentSessionKey | String | 父级会话键(类型 `String`)。The parent session key. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/coding/session/SessionConstants.java:30–35