staklink 0.4.19 → 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.
- package/dist/proxy-server.cjs +24 -7
- package/dist/staklink-cli.cjs +1 -1
- package/package.json +1 -1
package/dist/proxy-server.cjs
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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");
|
|
@@ -141687,7 +141700,7 @@ function buildPushPrompt(opts) {
|
|
|
141687
141700
|
if (opts.createPR) {
|
|
141688
141701
|
let step = 4;
|
|
141689
141702
|
lines.push(
|
|
141690
|
-
`${step}. ONLY if you actually pushed commits in step 3, create a pull request from the current branch to "${opts.baseBranch}" using the gh CLI. The PR title should be derived from the commit message. If a PR already exists for this branch,
|
|
141703
|
+
`${step}. ONLY if you actually pushed commits in step 3, create a pull request from the current branch to "${opts.baseBranch}" using the gh CLI. The PR title should be derived from the commit message. If a PR already exists for this branch, get its URL instead. If there was nothing to push, skip this step. After creating or finding the PR, you MUST output the URL in <pr_url>...</pr_url> tags.`
|
|
141691
141704
|
);
|
|
141692
141705
|
if (opts.label) {
|
|
141693
141706
|
step++;
|
|
@@ -141712,7 +141725,7 @@ function buildPushPrompt(opts) {
|
|
|
141712
141725
|
"- If there are NO changes to commit and NO unpushed commits, do NOTHING. Do not commit, do not push, do not create a PR. Just report that there were no changes.",
|
|
141713
141726
|
"- Do NOT ask for confirmation. Just do it.",
|
|
141714
141727
|
"- If push fails, try pulling with rebase first. If that fails with conflicts, resolve them and continue.",
|
|
141715
|
-
"-
|
|
141728
|
+
"- If you created or found an existing PR, you MUST output the full PR URL wrapped in tags like this: <pr_url>https://github.com/owner/repo/pull/123</pr_url>. This is REQUIRED whenever a PR exists for the branch.",
|
|
141716
141729
|
"- Output the branch name you ended up on.",
|
|
141717
141730
|
"- Output the commit hash after pushing."
|
|
141718
141731
|
);
|
|
@@ -141813,11 +141826,15 @@ ${prompt}`);
|
|
|
141813
141826
|
if (branchMatch) {
|
|
141814
141827
|
results.branches[repoName] = branchMatch[1];
|
|
141815
141828
|
}
|
|
141816
|
-
const
|
|
141829
|
+
const prTagMatch = output.match(
|
|
141830
|
+
/<pr_url>(https:\/\/github\.com\/[^\s<]+\/pull\/\d+)<\/pr_url>/
|
|
141831
|
+
);
|
|
141832
|
+
const prBareMatch = output.match(
|
|
141817
141833
|
/https:\/\/github\.com\/[^\s\])"'>]+\/pull\/\d+/
|
|
141818
141834
|
);
|
|
141819
|
-
|
|
141820
|
-
|
|
141835
|
+
const prUrl = prTagMatch?.[1] || prBareMatch?.[0];
|
|
141836
|
+
if (prUrl) {
|
|
141837
|
+
results.prs[repoName] = prUrl;
|
|
141821
141838
|
}
|
|
141822
141839
|
} finally {
|
|
141823
141840
|
await teardown();
|
package/dist/staklink-cli.cjs
CHANGED
|
@@ -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.
|
|
11007
|
+
var VERSION = "0.4.21";
|
|
11008
11008
|
|
|
11009
11009
|
// src/deps.ts
|
|
11010
11010
|
var import_child_process = require("child_process");
|