@sema-agent/server 1.292.0 → 1.293.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/http/server.js +17 -0
- package/package.json +1 -1
package/dist/http/server.js
CHANGED
|
@@ -1138,6 +1138,23 @@ export function createHttpServer(deps) {
|
|
|
1138
1138
|
else if (ev.type === "workspace_changed") {
|
|
1139
1139
|
res.write(`data: ${JSON.stringify({ type: "workspace_changed", ...workspaceChangedEventData(ev) })}\n\n`);
|
|
1140
1140
|
}
|
|
1141
|
+
else if (ev.type === "text_delta" || ev.type === "turn_end" || ev.type === "message_committed" || ev.type === "context_usage") {
|
|
1142
|
+
const e = ev;
|
|
1143
|
+
const ident = {
|
|
1144
|
+
...(e.eventId !== undefined ? { eventId: e.eventId } : {}),
|
|
1145
|
+
...(e.parentToolCallId !== undefined ? { parentToolCallId: e.parentToolCallId } : {}),
|
|
1146
|
+
...(e.sourceTaskId !== undefined ? { sourceTaskId: e.sourceTaskId } : {}),
|
|
1147
|
+
...(e.bgAgentId !== undefined ? { bgAgentId: e.bgAgentId } : {}),
|
|
1148
|
+
};
|
|
1149
|
+
const arm = ev.type === "text_delta"
|
|
1150
|
+
? { type: "text_delta", delta: e.delta, ...ident }
|
|
1151
|
+
: ev.type === "turn_end"
|
|
1152
|
+
? { type: "turn_end", ...(e.usage !== undefined ? { usage: e.usage } : {}), ...(e.usageMissing !== undefined ? { usageMissing: e.usageMissing } : {}), ...(e.stopReason !== undefined ? { stopReason: e.stopReason } : {}), ...ident }
|
|
1153
|
+
: ev.type === "message_committed"
|
|
1154
|
+
? { type: "message_committed", entryId: e.entryId, role: e.role, ...(e.toolCallId !== undefined ? { toolCallId: e.toolCallId } : {}), ...ident }
|
|
1155
|
+
: { type: "context_usage", ...contextUsageEventData(ev), ...ident };
|
|
1156
|
+
res.write(`data: ${JSON.stringify(arm)}\n\n`);
|
|
1157
|
+
}
|
|
1141
1158
|
else {
|
|
1142
1159
|
res.write(`data: ${JSON.stringify(ev)}\n\n`);
|
|
1143
1160
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.293.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",
|