open-agents-ai 0.105.1 → 0.105.2
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/index.js +3 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12682,8 +12682,7 @@ async function handleCmd(cmd) {
|
|
|
12682
12682
|
if (riEvt.event === 'token' && riEvt.data) {
|
|
12683
12683
|
var tkn = typeof riEvt.data === 'string' ? riEvt.data : String(riEvt.data);
|
|
12684
12684
|
riTokenContent += tkn;
|
|
12685
|
-
appendFileSync(riStreamFile, JSON.stringify({ type: 'token', content: tkn }) + '
|
|
12686
|
-
');
|
|
12685
|
+
appendFileSync(riStreamFile, JSON.stringify({ type: 'token', content: tkn }) + '\\n');
|
|
12687
12686
|
} else if (riEvt.event === 'result' && riEvt.data) {
|
|
12688
12687
|
// Final metadata event \u2014 parse for usage/tool_calls
|
|
12689
12688
|
try {
|
|
@@ -12714,8 +12713,7 @@ async function handleCmd(cmd) {
|
|
|
12714
12713
|
}],
|
|
12715
12714
|
usage: { input_tokens: riInputTokens, output_tokens: riOutputTokens },
|
|
12716
12715
|
};
|
|
12717
|
-
appendFileSync(riStreamFile, JSON.stringify({ type: 'done', result: JSON.stringify(riFinalPayload) }) + '
|
|
12718
|
-
');
|
|
12716
|
+
appendFileSync(riStreamFile, JSON.stringify({ type: 'done', result: JSON.stringify(riFinalPayload) }) + '\\n');
|
|
12719
12717
|
dlog('remote_infer: stream complete, tokens=' + riTokenContent.length + ' in=' + riInputTokens + ' out=' + riOutputTokens);
|
|
12720
12718
|
break;
|
|
12721
12719
|
}
|
|
@@ -13206,8 +13204,7 @@ async function handleCmd(cmd) {
|
|
|
13206
13204
|
var sseChunk = await sseReader.read();
|
|
13207
13205
|
if (sseChunk.done) break;
|
|
13208
13206
|
sseBuf += sseDecoder.decode(sseChunk.value, { stream: true });
|
|
13209
|
-
var sseLines = sseBuf.split('
|
|
13210
|
-
');
|
|
13207
|
+
var sseLines = sseBuf.split('\\n');
|
|
13211
13208
|
sseBuf = sseLines.pop();
|
|
13212
13209
|
|
|
13213
13210
|
for (var sli = 0; sli < sseLines.length; sli++) {
|
package/package.json
CHANGED