@sema-agent/server 3.15.1 → 3.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/security.js +5 -1
- package/package.json +1 -1
package/dist/security.js
CHANGED
|
@@ -169,7 +169,11 @@ export function createAuthorizer(config, sessionStore) {
|
|
|
169
169
|
// 判据改成 fail-closed:多租形下拿不到归属判别能力,就不能允许复用一个 caller 自报的
|
|
170
170
|
// sessionId(拒绝的是「复用」,不是「提交」—— 不带 sessionId 的新会话照常受理)。
|
|
171
171
|
// 单租/dev 形(requirePrincipal=false)零行为变化:那里没有租户边界可越。
|
|
172
|
-
|
|
172
|
+
// ⚠️ 消息必须点名「连本 worker 自己刚铸的 id 也一样」:无 `register` 的 store 上,新会话的
|
|
173
|
+
// 归属**根本没被记下**,所以第二个 turn 带回引擎自己给的 id 时同样落到这里。不说清楚的话,
|
|
174
|
+
// 这个 403 从消费端看是纯粹的反直觉(「这 id 是你给我的,你现在说我无权用」)——
|
|
175
|
+
// 实测:客户端「首 turn 不发 sessionId、后续 turn 带回铸值」这一常见形状,第二个 turn 起必拒。
|
|
176
|
+
throw new HttpError(403, "session reuse needs an owner-aware session store on a multi-tenant deployment: this worker's session store cannot attest who owns a session, so a sessionId cannot be authorized — including one this worker itself minted a moment ago (without a register seam it was never recorded as yours). Configure a durable session backend (SESSION_BACKEND), or omit sessionId on every turn to start fresh.");
|
|
173
177
|
}
|
|
174
178
|
sessionId = requested;
|
|
175
179
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.2",
|
|
4
4
|
"description": "Sema Server — the server/API implementation layer for Sema, wiring core, registry, model providers, and cloud agent execution. Built on @sema-agent/core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|