staklink 0.3.50 → 0.3.52

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.
@@ -56941,7 +56941,7 @@ var SSEManager = class {
56941
56941
  var sseManager = new SSEManager();
56942
56942
 
56943
56943
  // src/proxy/version.ts
56944
- var VERSION = "0.3.50";
56944
+ var VERSION = "0.3.52";
56945
56945
 
56946
56946
  // node_modules/uuid/dist/esm/stringify.js
56947
56947
  var byteToHex = [];
@@ -111156,7 +111156,7 @@ function findClaudePath() {
111156
111156
  var repair_exports = {};
111157
111157
  __export(repair_exports, {
111158
111158
  SYSTEM: () => SYSTEM,
111159
- makePrompt: () => makePrompt,
111159
+ makeRepairPrompt: () => makeRepairPrompt,
111160
111160
  parseXML: () => parseXML
111161
111161
  });
111162
111162
  var SYSTEM = `You are a software systems expert. Your job is to help set up the development environment for a software project. Fix the user's pm2 config and/or docker-compose files, and use the pm2 and docker cli to get the project running. YOUR GOAL IS TO THE GET THE frontend APP IN THE PM2 CONFIG FILE TO RUN CORRECTLY! Other apps and docker containers are only supporting services. You can restart the pm2 environment with "npx -y staklink reload" after making changes to the pm2 config or docker-compose files.
@@ -111183,9 +111183,11 @@ NEW_ENV_VAR=some_value
111183
111183
  </.env>
111184
111184
 
111185
111185
  IMPORTANT: YOU DO NOT NEED TO INCLUDE FILES THAT DID NOT CHANGE. Only include files that you modified.`;
111186
- var makePrompt = (podConfigPath, history) => {
111187
- let p = `Please inspect the current running environment, and try to fix it. The user tried to load the frontend on the defined PORT, but something went wrong.
111188
-
111186
+ var REPAIR_PROMPT = `Please inspect the current running environment, and try to fix it. The user tried to load the frontend on the defined PORT, but something went wrong.`;
111187
+ var makeRepairPrompt = (podConfigPath, history, initialPrompt) => {
111188
+ let p = initialPrompt ? initialPrompt : REPAIR_PROMPT;
111189
+ p += `
111190
+
111189
111191
  The config files can be read at ${podConfigPath}. You must find out how to edit the pm2.config.js and the docker-compose.yaml in order to get the project to run successfully (there is also a Dockerfile which may also be changed if absolutely needed). Also you may need to return required environment variables in a .env file. Focus on the frontend app defined in the pm2 config file, don't worry about other services unless they are needed to run the frontend. For example, if its a next.js app, you can read the package.json to see what SHOULD be in the pm2 "script" command or the special install/build/etc commands. REMEMBER: this is a development environment, so the pm2 script should be something like "npm run dev" or something similar... we want to default to whatever start script is best for development (like whatever has hot-reload etc).
111190
111192
 
111191
111193
  This project is currently running a remote code-server instance. Docker is optional, but may be used. The docker-compose file has already been started. You can use the regular docker commands (docker ps, docker logs, etc) to inspect the running containers.
@@ -111678,7 +111680,16 @@ Stderr: ${error85.stderr}`
111678
111680
  return this.branch;
111679
111681
  }
111680
111682
  async addLabelToPR(prNumber, label) {
111681
- await this.execGH(`pr edit ${prNumber} --add-label ${label}`);
111683
+ try {
111684
+ await this.execGH(`pr edit ${prNumber} --add-label ${label}`);
111685
+ } catch (error85) {
111686
+ if (error85 instanceof Error && error85.message.includes("label") && error85.message.includes("does not exist")) {
111687
+ await this.execGH(`label create ${label}`);
111688
+ await this.execGH(`pr edit ${prNumber} --add-label ${label}`);
111689
+ } else {
111690
+ throw error85;
111691
+ }
111692
+ }
111682
111693
  }
111683
111694
  };
111684
111695
 
@@ -111997,7 +112008,7 @@ ${testResultsEntry}
111997
112008
  }
111998
112009
  async function runPlaywrightTest(repoLocation, testFilePath) {
111999
112010
  const runner = new Runner(repoLocation, console.log);
112000
- const testCommand = `npx -y -p @playwright/test playwright test ${testFilePath}`;
112011
+ const testCommand = `npx -y @playwright/test test ${testFilePath}`;
112001
112012
  console.log(`Running: ${testCommand}`);
112002
112013
  try {
112003
112014
  const result = await runner.executeCommand(
@@ -113143,7 +113154,7 @@ ${diff.trim()}`);
113143
113154
  }
113144
113155
  }
113145
113156
  return {
113146
- prompt: repair_exports.makePrompt(podConfigPath, history),
113157
+ prompt: repair_exports.makeRepairPrompt(podConfigPath, history, req.body.prompt),
113147
113158
  system: repair_exports.SYSTEM
113148
113159
  };
113149
113160
  },
@@ -10948,7 +10948,7 @@ var glob = Object.assign(glob_, {
10948
10948
  glob.glob = glob;
10949
10949
 
10950
10950
  // src/proxy/version.ts
10951
- var VERSION = "0.3.50";
10951
+ var VERSION = "0.3.52";
10952
10952
 
10953
10953
  // src/cli.ts
10954
10954
  var STAKLINK_PROXY = "staklink-proxy";
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.3.50",
5
+ "version": "0.3.52",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {