@ai-matrx/agents 0.10.3 → 0.10.4
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +26 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +4 -4
- package/dist/mandates/index.d.ts +4 -4
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/dist/matrx/index.cjs +18 -2
- package/dist/matrx/index.cjs.map +1 -1
- package/dist/matrx/index.js +18 -2
- package/dist/matrx/index.js.map +1 -1
- package/dist/projection/request.cjs +8 -2
- package/dist/projection/request.cjs.map +1 -1
- package/dist/projection/request.d.cts +2 -0
- package/dist/projection/request.d.ts +2 -0
- package/dist/projection/request.js +8 -2
- package/dist/projection/request.js.map +1 -1
- package/dist/react/index.cjs +26 -4
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +3 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.js +26 -4
- package/dist/react/index.js.map +1 -1
- package/dist/stream/ndjson.cjs +18 -2
- package/dist/stream/ndjson.cjs.map +1 -1
- package/dist/stream/ndjson.d.cts +2 -0
- package/dist/stream/ndjson.d.ts +2 -0
- package/dist/stream/ndjson.js +18 -2
- package/dist/stream/ndjson.js.map +1 -1
- package/mandates/snapshots/keys.0.10.3.json +469 -0
- package/package.json +1 -1
package/dist/matrx/index.js
CHANGED
|
@@ -399,17 +399,33 @@ function normalizeMatrxStreamEnvelope(value) {
|
|
|
399
399
|
if (!isRecord2(value)) return null;
|
|
400
400
|
if (typeof value.event === "string") {
|
|
401
401
|
const streamSeq = typeof value.stream_seq === "number" && Number.isFinite(value.stream_seq) ? value.stream_seq : void 0;
|
|
402
|
+
const streamId = typeof value.stream_id === "string" ? value.stream_id : void 0;
|
|
402
403
|
return {
|
|
403
404
|
event: value.event,
|
|
404
405
|
data: value.data,
|
|
406
|
+
...streamId === void 0 ? {} : { stream_id: streamId },
|
|
405
407
|
...streamSeq === void 0 ? {} : { stream_seq: streamSeq }
|
|
406
408
|
};
|
|
407
409
|
}
|
|
408
410
|
if (value.e === "c" && typeof value.t === "string") {
|
|
409
|
-
|
|
411
|
+
const streamId = typeof value.stream_id === "string" ? value.stream_id : void 0;
|
|
412
|
+
const streamSeq = typeof value.stream_seq === "number" && Number.isFinite(value.stream_seq) ? value.stream_seq : void 0;
|
|
413
|
+
return {
|
|
414
|
+
event: "chunk",
|
|
415
|
+
data: { text: value.t },
|
|
416
|
+
...streamId === void 0 ? {} : { stream_id: streamId },
|
|
417
|
+
...streamSeq === void 0 ? {} : { stream_seq: streamSeq }
|
|
418
|
+
};
|
|
410
419
|
}
|
|
411
420
|
if (value.e === "r" && typeof value.t === "string") {
|
|
412
|
-
|
|
421
|
+
const streamId = typeof value.stream_id === "string" ? value.stream_id : void 0;
|
|
422
|
+
const streamSeq = typeof value.stream_seq === "number" && Number.isFinite(value.stream_seq) ? value.stream_seq : void 0;
|
|
423
|
+
return {
|
|
424
|
+
event: "reasoning_chunk",
|
|
425
|
+
data: { text: value.t },
|
|
426
|
+
...streamId === void 0 ? {} : { stream_id: streamId },
|
|
427
|
+
...streamSeq === void 0 ? {} : { stream_seq: streamSeq }
|
|
428
|
+
};
|
|
413
429
|
}
|
|
414
430
|
return null;
|
|
415
431
|
}
|