staklink 0.4.19 → 0.4.20

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.19";
60930
+ var VERSION = "0.4.20";
60931
60931
 
60932
60932
  // node_modules/uuid/dist/esm/stringify.js
60933
60933
  var byteToHex = [];
@@ -141687,7 +141687,7 @@ function buildPushPrompt(opts) {
141687
141687
  if (opts.createPR) {
141688
141688
  let step = 4;
141689
141689
  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, or if there was nothing to push, skip creation.`
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, 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
141691
  );
141692
141692
  if (opts.label) {
141693
141693
  step++;
@@ -141712,7 +141712,7 @@ function buildPushPrompt(opts) {
141712
141712
  "- 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
141713
  "- Do NOT ask for confirmation. Just do it.",
141714
141714
  "- If push fails, try pulling with rebase first. If that fails with conflicts, resolve them and continue.",
141715
- "- Output the PR URL if you created one.",
141715
+ "- 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
141716
  "- Output the branch name you ended up on.",
141717
141717
  "- Output the commit hash after pushing."
141718
141718
  );
@@ -141813,11 +141813,15 @@ ${prompt}`);
141813
141813
  if (branchMatch) {
141814
141814
  results.branches[repoName] = branchMatch[1];
141815
141815
  }
141816
- const prMatch = output.match(
141816
+ const prTagMatch = output.match(
141817
+ /<pr_url>(https:\/\/github\.com\/[^\s<]+\/pull\/\d+)<\/pr_url>/
141818
+ );
141819
+ const prBareMatch = output.match(
141817
141820
  /https:\/\/github\.com\/[^\s\])"'>]+\/pull\/\d+/
141818
141821
  );
141819
- if (prMatch) {
141820
- results.prs[repoName] = prMatch[0];
141822
+ const prUrl = prTagMatch?.[1] || prBareMatch?.[0];
141823
+ if (prUrl) {
141824
+ results.prs[repoName] = prUrl;
141821
141825
  }
141822
141826
  } finally {
141823
141827
  await teardown();
@@ -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.19";
11007
+ var VERSION = "0.4.20";
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.19",
5
+ "version": "0.4.20",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {