staklink 0.4.20 → 0.4.21

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.
@@ -60927,7 +60927,7 @@ var SSEManager = class {
60927
60927
  var sseManager = new SSEManager();
60928
60928
 
60929
60929
  // src/proxy/version.ts
60930
- var VERSION = "0.4.20";
60930
+ var VERSION = "0.4.21";
60931
60931
 
60932
60932
  // node_modules/uuid/dist/esm/stringify.js
60933
60933
  var byteToHex = [];
@@ -137626,6 +137626,9 @@ function sanitizeShellArg2(arg) {
137626
137626
  }
137627
137627
 
137628
137628
  // src/agent/goose.ts
137629
+ function isStreamDecodeError(output) {
137630
+ return output.includes("Stream decode error: error decoding response body.") && output.includes("Please retry if you think this is a transient or recoverable error.");
137631
+ }
137629
137632
  var MODELS2 = {
137630
137633
  sonnet: GooseModels["claude-sonnet-4-6"],
137631
137634
  opus: GooseModels["claude-opus-4-6"],
@@ -137679,7 +137682,17 @@ ${prompt}` : prompt;
137679
137682
  } catch {
137680
137683
  }
137681
137684
  }
137682
- const res = await executeCommand(cmd, cwd, env2, (l) => console.log(l));
137685
+ let res = await executeCommand(cmd, cwd, env2, (l) => console.log(l));
137686
+ if (session && isStreamDecodeError(res.stdout)) {
137687
+ const maxRetries = 2;
137688
+ for (let attempt = 1; attempt <= maxRetries; attempt++) {
137689
+ console.log(`Stream decode error detected, retrying (${attempt}/${maxRetries})...`);
137690
+ await new Promise((r) => setTimeout(r, 2e3 * attempt));
137691
+ const retryCmd = `goose run --with-builtin developer -t "continue" --system "${system}" --name ${session} --resume`;
137692
+ res = await executeCommand(retryCmd, cwd, env2, (l) => console.log(l));
137693
+ if (!isStreamDecodeError(res.stdout)) break;
137694
+ }
137695
+ }
137683
137696
  const output = res.stdout;
137684
137697
  if (summarize && session) {
137685
137698
  const sessionData = exportSession(session, "assistant");
@@ -11004,7 +11004,7 @@ var glob = Object.assign(glob_, {
11004
11004
  glob.glob = glob;
11005
11005
 
11006
11006
  // src/proxy/version.ts
11007
- var VERSION = "0.4.20";
11007
+ var VERSION = "0.4.21";
11008
11008
 
11009
11009
  // src/deps.ts
11010
11010
  var import_child_process = require("child_process");
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "staklink",
3
3
  "displayName": "staklink",
4
4
  "description": "staklink process manager",
5
- "version": "0.4.20",
5
+ "version": "0.4.21",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {