agentscope-ai / agentscope-ai/agentscope-java

[Bug]:PostgresAgentStateStore存储记忆有问题

未关闭
#2,327 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area/core/memory area/extensions bug
主要语言
Java
星标
5.6k
派生
1.3k
平均合并
4 天 12 小时
30 天内合并 PR
77

描述

private String slotSessionId(SandboxIsolationKey key) {
IsolationScope scope = key.getScope();
return switch (scope) {
case SESSION -> "sandbox/session/" + key.getValue();
case USER -> "sandbox/user/" + agentId + "/" + key.getValue();
case AGENT -> "sandbox/agent/" + agentId;
case GLOBAL -> "sandbox/global";
};
}

protected void validateSessionId(String sessionId) {
if (sessionId == null || sessionId.trim().isEmpty()) {
throw new IllegalArgumentException("AgentStateStore ID cannot be null or empty");
}
if (sessionId.contains("/") || sessionId.contains("\\")) {
throw new IllegalArgumentException("AgentStateStore ID cannot contain path separators");
}
if (sessionId.length() > 255) {
throw new IllegalArgumentException("AgentStateStore ID cannot exceed 255 characters");
}
}
存在冲突

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。