@sema-agent/server 1.313.0 → 1.314.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.
- package/dist/auth-bridge.d.ts +3 -2
- package/dist/bench/s1/live-deps.js +2 -2
- package/dist/budget.d.ts +4 -76
- package/dist/budget.js +4 -83
- package/dist/capabilities/sandbox-file-send.d.ts +2 -1
- package/dist/config-types.d.ts +1 -1
- package/dist/elicitation.d.ts +5 -3
- package/dist/elicitation.js +3 -2
- package/dist/fleet-lease.d.ts +1 -1
- package/dist/fleet-lease.js +1 -1
- package/dist/hooks/hook-llm.d.ts +5 -4
- package/dist/hooks/hook-runner.d.ts +1 -1
- package/dist/hooks/hook-runner.js +1 -1
- package/dist/http/server.js +67 -85
- package/dist/key-resolver.d.ts +1 -1
- package/dist/key-resolver.js +1 -1
- package/dist/leader/grader-env-factory.d.ts +1 -1
- package/dist/leader/grader-env-factory.js +2 -2
- package/dist/leader/wire.d.ts +1 -1
- package/dist/leader/wire.js +1 -1
- package/dist/main.js +26 -26
- package/dist/memory-scope.d.ts +18 -0
- package/dist/memory-scope.js +38 -0
- package/dist/observability/cost-taxonomy.d.ts +34 -0
- package/dist/observability/cost-taxonomy.js +26 -0
- package/dist/observability/prompt-manifest.d.ts +75 -0
- package/dist/observability/prompt-manifest.js +82 -0
- package/dist/plugins/web-search.d.ts +4 -3
- package/dist/question.d.ts +2 -1
- package/dist/question.js +3 -2
- package/dist/run-local.js +2 -2
- package/dist/runtime-caps-resolver.d.ts +7 -7
- package/dist/runtime-caps-resolver.js +3 -3
- package/dist/security.d.ts +2 -16
- package/dist/security.js +3 -37
- package/dist/tool-approval.d.ts +2 -1
- package/dist/tool-approval.js +3 -2
- package/package.json +1 -1
package/dist/tool-approval.js
CHANGED
|
@@ -12,7 +12,7 @@ function sessionAllowCategory(toolName) {
|
|
|
12
12
|
function sessionAllowKey(owner, sessionId, category) {
|
|
13
13
|
return JSON.stringify([owner, sessionId, category]);
|
|
14
14
|
}
|
|
15
|
-
export function
|
|
15
|
+
export function parseToolApprovalResponse(body) {
|
|
16
16
|
if (body === null || typeof body !== "object" || Array.isArray(body))
|
|
17
17
|
return { ok: false, error: "body must be an object" };
|
|
18
18
|
const d = body.decision;
|
|
@@ -22,6 +22,7 @@ export function parseToolApprovalDecision(body) {
|
|
|
22
22
|
}
|
|
23
23
|
return { ok: false, error: 'decision must be one of "allow" | "allow_session" | "deny"' };
|
|
24
24
|
}
|
|
25
|
+
export const parseToolApprovalDecision = parseToolApprovalResponse;
|
|
25
26
|
function isChildAsk(req) {
|
|
26
27
|
return req.fromSubagent === true;
|
|
27
28
|
}
|
|
@@ -208,7 +209,7 @@ export class ToolApprovalCoordinator {
|
|
|
208
209
|
return settled.allowed;
|
|
209
210
|
}
|
|
210
211
|
respond(id, principal, body) {
|
|
211
|
-
const parsed =
|
|
212
|
+
const parsed = parseToolApprovalResponse(body);
|
|
212
213
|
if (!parsed.ok)
|
|
213
214
|
return { status: 400, body: { error: parsed.error } };
|
|
214
215
|
const entry = this.pending.get(id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.314.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",
|