staklink 0.3.68 → 0.3.69
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/proxy-server.cjs +15 -3
- package/dist/staklink-cli.cjs +1 -1
- package/package.json +1 -1
package/dist/proxy-server.cjs
CHANGED
|
@@ -61229,7 +61229,7 @@ var SSEManager = class {
|
|
|
61229
61229
|
var sseManager = new SSEManager();
|
|
61230
61230
|
|
|
61231
61231
|
// src/proxy/version.ts
|
|
61232
|
-
var VERSION = "0.3.
|
|
61232
|
+
var VERSION = "0.3.69";
|
|
61233
61233
|
|
|
61234
61234
|
// node_modules/uuid/dist/esm/stringify.js
|
|
61235
61235
|
var byteToHex = [];
|
|
@@ -132835,7 +132835,6 @@ async function streamGooseToSSE(sessionId, prompt, apiKey, res, options) {
|
|
|
132835
132835
|
system: options?.system
|
|
132836
132836
|
});
|
|
132837
132837
|
for await (const part of result.fullStream) {
|
|
132838
|
-
log("Stream part received:", JSON.stringify(part));
|
|
132839
132838
|
sendSSE(res, "message", part);
|
|
132840
132839
|
if (options?.webhookUrl) {
|
|
132841
132840
|
const p = part;
|
|
@@ -132878,7 +132877,7 @@ async function streamGooseToSSE(sessionId, prompt, apiKey, res, options) {
|
|
|
132878
132877
|
type: "tool-result",
|
|
132879
132878
|
toolCallId: p.toolCallId,
|
|
132880
132879
|
toolName: p.toolName,
|
|
132881
|
-
output: p.output,
|
|
132880
|
+
output: truncateOutput(p.output),
|
|
132882
132881
|
timestamp: Date.now()
|
|
132883
132882
|
}).catch((error87) => error("Error posting to webhook", error87));
|
|
132884
132883
|
break;
|
|
@@ -132901,6 +132900,19 @@ function sendSSE(res, event, data) {
|
|
|
132901
132900
|
`);
|
|
132902
132901
|
}
|
|
132903
132902
|
}
|
|
132903
|
+
function truncateOutput(output) {
|
|
132904
|
+
const str = typeof output === "string" ? output : JSON.stringify(output);
|
|
132905
|
+
const lines = str.split("\n");
|
|
132906
|
+
const maxLines = 10;
|
|
132907
|
+
const maxLineLength = 100;
|
|
132908
|
+
const truncatedLines = lines.slice(0, maxLines).map(
|
|
132909
|
+
(line) => line.length > maxLineLength ? line.slice(0, maxLineLength) + "..." : line
|
|
132910
|
+
);
|
|
132911
|
+
if (lines.length > maxLines) {
|
|
132912
|
+
truncatedLines.push("[truncated]");
|
|
132913
|
+
}
|
|
132914
|
+
return truncatedLines.join("\n");
|
|
132915
|
+
}
|
|
132904
132916
|
async function postToWebhook(url3, payload) {
|
|
132905
132917
|
try {
|
|
132906
132918
|
const response = await fetch(url3, {
|
package/dist/staklink-cli.cjs
CHANGED
|
@@ -10967,7 +10967,7 @@ var glob = Object.assign(glob_, {
|
|
|
10967
10967
|
glob.glob = glob;
|
|
10968
10968
|
|
|
10969
10969
|
// src/proxy/version.ts
|
|
10970
|
-
var VERSION = "0.3.
|
|
10970
|
+
var VERSION = "0.3.69";
|
|
10971
10971
|
|
|
10972
10972
|
// src/cli.ts
|
|
10973
10973
|
var STAKLINK_PROXY = "staklink-proxy";
|