staklink 0.4.15 → 0.4.17

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.15";
60930
+ var VERSION = "0.4.17";
60931
60931
 
60932
60932
  // node_modules/uuid/dist/esm/stringify.js
60933
60933
  var byteToHex = [];
@@ -141651,16 +141651,18 @@ function buildPushPrompt(opts) {
141651
141651
  const lines = [
141652
141652
  `You are in the git repo at: ${opts.repoPath}`,
141653
141653
  "",
141654
- "Perform the following git operations. If any step fails, diagnose the problem and fix it (resolve merge conflicts, pull and rebase, etc). Be resilient - the goal is to get code pushed successfully. BUT its possible everything has already been pushed! In that case you dont have to do anything of course.",
141654
+ "Perform the following git operations if needed. If any step fails, diagnose the problem and fix it (resolve merge conflicts, pull and rebase, etc). Be resilient - the goal is to get code pushed successfully (if there is code to push of course!).",
141655
+ "",
141656
+ "CRITICAL: Before doing anything, run `git status` and `git log origin/<current-branch>..HEAD` (if the remote branch exists) to check whether there are actually any changes to commit or push. If the working tree is clean AND there are no unpushed commits, STOP IMMEDIATELY. Do NOT create a commit, do NOT push, do NOT create a PR. Just output that there were no changes and exit.",
141655
141657
  "",
141656
141658
  `1. Check the current branch. If you are on main or master, create a new feature branch${opts.branchName ? ` named "${opts.branchName}"` : ""} and switch to it. Otherwise stay on the current branch.`,
141657
141659
  `2. Check git status. If there are uncommitted changes, stage them (git add .) and commit${opts.commitName ? " using the exact commit message provided below" : " with a short descriptive message"}. If everything is already committed, skip this step.`,
141658
- "3. Push the current branch to origin. If the push is rejected (non-fast-forward, remote has new work, etc), pull with rebase and try again. If there are merge conflicts during rebase, resolve them sensibly and continue."
141660
+ "3. Push the current branch to origin ONLY if there are unpushed commits. If the branch is already up-to-date with origin, skip this step. If the push is rejected (non-fast-forward, remote has new work, etc), pull with rebase and try again. If there are merge conflicts during rebase, resolve them sensibly and continue."
141659
141661
  ];
141660
141662
  if (opts.createPR) {
141661
141663
  let step = 4;
141662
141664
  lines.push(
141663
- `${step}. 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, skip creation.`
141665
+ `${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.`
141664
141666
  );
141665
141667
  if (opts.label) {
141666
141668
  step++;
@@ -141682,6 +141684,7 @@ function buildPushPrompt(opts) {
141682
141684
  lines.push(
141683
141685
  "",
141684
141686
  "IMPORTANT:",
141687
+ "- 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.",
141685
141688
  "- Do NOT ask for confirmation. Just do it.",
141686
141689
  "- If push fails, try pulling with rebase first. If that fails with conflicts, resolve them and continue.",
141687
141690
  "- Output the PR URL if you created one.",
@@ -141697,6 +141700,10 @@ function buildPushPrompt(opts) {
141697
141700
  "---"
141698
141701
  );
141699
141702
  }
141703
+ lines.push(
141704
+ "",
141705
+ "At the very end of your response, ONLY if you actually committed or pushed something, include a single-sentence summary of what you did wrapped in <message></message> tags. If there were no changes, do NOT include a message tag."
141706
+ );
141700
141707
  return lines.join("\n");
141701
141708
  }
141702
141709
  async function handleAgentPush(req, res) {
@@ -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.15";
11007
+ var VERSION = "0.4.17";
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.15",
5
+ "version": "0.4.17",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {