@sjawhar/pi-legion-envoy 7.7.1 → 7.8.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/envoy.js +11 -1
- package/dist/legion.js +2 -1
- package/package.json +1 -1
package/dist/envoy.js
CHANGED
|
@@ -29896,6 +29896,7 @@ var AGENT_STREAM_WATCH_TTL_MS = 30000;
|
|
|
29896
29896
|
var AGENT_STREAM_LIMITS = {
|
|
29897
29897
|
partChars: 16000,
|
|
29898
29898
|
toolChars: 8000,
|
|
29899
|
+
modelChars: 200,
|
|
29899
29900
|
historyMessages: 200,
|
|
29900
29901
|
historyBytes: 512 * 1024,
|
|
29901
29902
|
snapshotIntervalMs: 100
|
|
@@ -35179,6 +35180,13 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
35179
35180
|
|
|
35180
35181
|
// src/agent-stream.ts
|
|
35181
35182
|
var encoder = new TextEncoder;
|
|
35183
|
+
function readModel(message) {
|
|
35184
|
+
if (typeof message.model !== "string" || message.model === "")
|
|
35185
|
+
return;
|
|
35186
|
+
if (typeof message.provider !== "string" || message.provider === "")
|
|
35187
|
+
return;
|
|
35188
|
+
return capAgentStreamText(`${message.provider}/${message.model}`, AGENT_STREAM_LIMITS.modelChars);
|
|
35189
|
+
}
|
|
35182
35190
|
function readMessage(raw) {
|
|
35183
35191
|
if (typeof raw !== "object" || raw === null)
|
|
35184
35192
|
return null;
|
|
@@ -35188,6 +35196,7 @@ function readMessage(raw) {
|
|
|
35188
35196
|
return {
|
|
35189
35197
|
host: message,
|
|
35190
35198
|
isError: message.isError === true,
|
|
35199
|
+
model: readModel(message),
|
|
35191
35200
|
role: message.role,
|
|
35192
35201
|
timestamp: message.timestamp,
|
|
35193
35202
|
toolCallId: typeof message.toolCallId === "string" ? message.toolCallId : undefined,
|
|
@@ -35285,7 +35294,8 @@ function frameFor(entry) {
|
|
|
35285
35294
|
parts: conversationParts(message.host.content),
|
|
35286
35295
|
role: message.role === "assistant" ? "assistant" : "user",
|
|
35287
35296
|
streaming: entry.streaming,
|
|
35288
|
-
...dispatchMessageId === undefined ? {} : { dispatchMessageId }
|
|
35297
|
+
...dispatchMessageId === undefined ? {} : { dispatchMessageId },
|
|
35298
|
+
...message.role === "assistant" && message.model !== undefined ? { model: message.model } : {}
|
|
35289
35299
|
},
|
|
35290
35300
|
seq: entry.seq,
|
|
35291
35301
|
v: AGENT_STREAM_PROTOCOL
|
package/dist/legion.js
CHANGED
|
@@ -13983,6 +13983,7 @@ var AGENT_STREAM_WATCH_TTL_MS = 30000;
|
|
|
13983
13983
|
var AGENT_STREAM_LIMITS = {
|
|
13984
13984
|
partChars: 16000,
|
|
13985
13985
|
toolChars: 8000,
|
|
13986
|
+
modelChars: 200,
|
|
13986
13987
|
historyMessages: 200,
|
|
13987
13988
|
historyBytes: 512 * 1024,
|
|
13988
13989
|
snapshotIntervalMs: 100
|
|
@@ -17554,7 +17555,7 @@ function endInjectedUserTurns(sessionID) {
|
|
|
17554
17555
|
// package.json
|
|
17555
17556
|
var package_default = {
|
|
17556
17557
|
name: "@sjawhar/pi-legion-envoy",
|
|
17557
|
-
version: "7.
|
|
17558
|
+
version: "7.8.0",
|
|
17558
17559
|
license: "Apache-2.0",
|
|
17559
17560
|
type: "module",
|
|
17560
17561
|
omp: {
|