@sema-agent/server 1.299.0 → 1.300.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/trace/project.d.ts +2 -0
- package/dist/trace/project.js +3 -2
- package/package.json +1 -1
package/dist/trace/project.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export type TraceBlock = {
|
|
|
36
36
|
output: unknown;
|
|
37
37
|
isError?: boolean;
|
|
38
38
|
truncated?: boolean;
|
|
39
|
+
totalChars?: number;
|
|
39
40
|
structured?: unknown;
|
|
40
41
|
eventId?: string;
|
|
41
42
|
parentToolCallId?: string;
|
|
@@ -62,6 +63,7 @@ export declare function toolEndEventData(ev: {
|
|
|
62
63
|
isError: boolean;
|
|
63
64
|
output?: unknown;
|
|
64
65
|
truncated?: boolean;
|
|
66
|
+
totalChars?: number;
|
|
65
67
|
structured?: unknown;
|
|
66
68
|
eventId?: string;
|
|
67
69
|
parentToolCallId?: string;
|
package/dist/trace/project.js
CHANGED
|
@@ -62,6 +62,7 @@ export function toolEndEventData(ev) {
|
|
|
62
62
|
isError: ev.isError,
|
|
63
63
|
...(ev.output !== undefined ? { output: redactDeep(ev.output) } : {}),
|
|
64
64
|
...(ev.truncated ? { truncated: true } : {}),
|
|
65
|
+
...(typeof ev.totalChars === "number" ? { totalChars: ev.totalChars } : {}),
|
|
65
66
|
...(ev.structured !== undefined ? { structured: redactDeep(ev.structured) } : {}),
|
|
66
67
|
...identityFields(ev),
|
|
67
68
|
};
|
|
@@ -240,7 +241,7 @@ export function projectEvents(events, opts = {}) {
|
|
|
240
241
|
break;
|
|
241
242
|
case "tool_end": {
|
|
242
243
|
const callId = String(d.toolCallId ?? "");
|
|
243
|
-
blocks.push({ type: "tool-result", callId, ...(typeof d.label === "string" ? { label: d.label } : {}), output: d.output, ...(d.isError ? { isError: true } : {}), ...(d.truncated ? { truncated: true } : {}), ...(d.structured !== undefined ? { structured: d.structured } : {}), ...identityFields(d) });
|
|
244
|
+
blocks.push({ type: "tool-result", callId, ...(typeof d.label === "string" ? { label: d.label } : {}), output: d.output, ...(d.isError ? { isError: true } : {}), ...(d.truncated ? { truncated: true } : {}), ...(typeof d.totalChars === "number" ? { totalChars: d.totalChars } : {}), ...(d.structured !== undefined ? { structured: d.structured } : {}), ...identityFields(d) });
|
|
244
245
|
break;
|
|
245
246
|
}
|
|
246
247
|
case "prompt_assembled":
|
|
@@ -306,7 +307,7 @@ export function mapTraceEvent(type, seq, data) {
|
|
|
306
307
|
case "tool_start":
|
|
307
308
|
return { event: "tool-call", data: { seq, id: data.toolCallId, name: data.toolName, ...(typeof data.label === "string" ? { label: data.label } : {}), input: data.args, ...identityFields(data) } };
|
|
308
309
|
case "tool_end":
|
|
309
|
-
return { event: "tool-result", data: { seq, callId: data.toolCallId, ...(typeof data.label === "string" ? { label: data.label } : {}), isError: Boolean(data.isError), ...(data.output !== undefined ? { output: data.output } : {}), ...(data.truncated ? { truncated: true } : {}), ...(data.structured !== undefined ? { structured: data.structured } : {}), ...identityFields(data) } };
|
|
310
|
+
return { event: "tool-result", data: { seq, callId: data.toolCallId, ...(typeof data.label === "string" ? { label: data.label } : {}), isError: Boolean(data.isError), ...(data.output !== undefined ? { output: data.output } : {}), ...(data.truncated ? { truncated: true } : {}), ...(typeof data.totalChars === "number" ? { totalChars: data.totalChars } : {}), ...(data.structured !== undefined ? { structured: data.structured } : {}), ...identityFields(data) } };
|
|
310
311
|
case "turn_end": {
|
|
311
312
|
const tokens = toContractTokens(data.usage);
|
|
312
313
|
return { event: "turn", data: { seq, ...(tokens ? { tokens } : {}) } };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.300.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",
|