@sema-agent/server 3.3.0 → 3.4.0
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.
|
@@ -155,12 +155,25 @@ async function handleApprovalsAssistantBody(req, res, url, ctx, miss) {
|
|
|
155
155
|
// 🔴 STRIP the resume `token` (the unexposed secret capability — resume is by sessionId, never the
|
|
156
156
|
// token) AND the RAW `toolInput` (core bounds but does NOT redact it — redaction is
|
|
157
157
|
// the consumer's job). Re-emit the REDACTED `input` instead.
|
|
158
|
-
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
//
|
|
158
|
+
// 🔴 EXPLICIT projection([2029] cli 批准的收窄,辖域=仅本 inbox 面)—— 此前是「剥 token/toolInput、
|
|
159
|
+
// 其余整行展开」,于是 core summarizeCheckpoint 在 tool_approval 门上填的 toolName/toolCallId/preview/
|
|
160
|
+
// principal/sourceTaskId/contentKind 全部漏上 wire(其中 preview 还没过脱敏,而它同源的 toolInput 是
|
|
161
|
+
// 显式脱敏的)。四客户端仓结构性零消费(inbox verb 无调用点,[2029] 取证),按 §2 原意收成显式白名单:
|
|
162
|
+
// §1 镜像键(OMIT-when-absent)+ 两个显式 nullable 的 enrichment(objective/input)。富行
|
|
163
|
+
// (toolName/toolCallId/decide 绑定)只住 /v1/approvals —— 那面有具名消费者(desktop session-host
|
|
164
|
+
// 冷恢复),不在本刀辖域。`input` = REDACTED preview,只有 tool_approval 门携带(其余 ⇒ null)。
|
|
162
165
|
const input = s.toolInput != null ? redactedPreview(s.toolInput) : null;
|
|
163
|
-
return {
|
|
166
|
+
return {
|
|
167
|
+
sessionId: s.sessionId,
|
|
168
|
+
scope: s.scope,
|
|
169
|
+
createdAt: s.createdAt,
|
|
170
|
+
...(s.gateKind !== undefined ? { gateKind: s.gateKind } : {}),
|
|
171
|
+
...(s.severity !== undefined ? { severity: s.severity } : {}),
|
|
172
|
+
...(s.spentMicroUsd !== undefined ? { spentMicroUsd: s.spentMicroUsd } : {}),
|
|
173
|
+
...(s.deadline !== undefined ? { deadline: s.deadline } : {}),
|
|
174
|
+
objective: ctx?.body?.objective ?? null,
|
|
175
|
+
input,
|
|
176
|
+
};
|
|
164
177
|
}))).sort((a, b) => (b.severity ?? 0) - (a.severity ?? 0)); // severity DESC (listByScope is created_at ASC; stable → oldest-first within a tier)
|
|
165
178
|
sendJson(res, 200, { inbox }); // CheckpointSummary (token-stripped) + objective, severity-prioritized — the assistant single inbox
|
|
166
179
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
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",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"build:binary:run-local:darwin-arm64": "bun build --compile --target=bun-darwin-arm64 src/run-local.ts --outfile dist/run-local-darwin-arm64"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@sema-agent/core": "^2.
|
|
56
|
+
"@sema-agent/core": "^2.2.0",
|
|
57
57
|
"@sema-agent/registry-core": "^0.10.24",
|
|
58
58
|
"e2b": "^2.28.0",
|
|
59
59
|
"libsodium-wrappers": "^0.8.4",
|