staklink 0.3.46 → 0.3.47

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.46";
56944
+ var VERSION = "0.3.47";
56945
56945
 
56946
56946
  // node_modules/uuid/dist/esm/stringify.js
56947
56947
  var byteToHex = [];
@@ -111183,7 +111183,8 @@ 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) => `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.
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.
111187
111188
 
111188
111189
  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).
111189
111190
 
@@ -111202,10 +111203,20 @@ We have SPECIAL env vars for pm2, that tell the code-server system how to automa
111202
111203
 
111203
111204
  None of these commands are required though, only the "script" is required (to start the frontend).
111204
111205
 
111205
- When you have made a file change and want to restart the whole pm2 environment, do so like this: \`npx -y staklink reload\`. That will start the pm2 apps, then re-run all the install, build, pre-start commands if they are defined.
111206
+ When you have made a file change and want to restart the whole pm2 environment, do so like this: \`npx -y staklink reload\`. That will start the pm2 apps, then re-run all the install, build, pre-start commands if they are defined. IMPORTANT: the main frontend service should be accessible from outside the pod... so depending on the language/framework being used, you might want to make sure the host is correct (such as adding '--host 0.0.0.0' to the start script of rails for example).
111206
111207
 
111207
111208
  Good luck!
111208
111209
  `;
111210
+ if (history) {
111211
+ p += `
111212
+
111213
+ Here is a summary of our previous conversation history:
111214
+ ${history}
111215
+
111216
+ `;
111217
+ }
111218
+ return p;
111219
+ };
111209
111220
  var parseXML = (rawResponse) => {
111210
111221
  const files = {};
111211
111222
  const regex = /<([\w.\-]+)>([\s\S]*?)<\/\1>/g;
@@ -113123,8 +113134,16 @@ ${diff.trim()}`);
113123
113134
  createAsyncAgentHandler(
113124
113135
  (req) => {
113125
113136
  const podConfigPath = req.body.podConfigPath || "/workspaces/.pod-config/.user-dockerfile";
113137
+ let history = void 0;
113138
+ if (req.body.history) {
113139
+ if (typeof req.body.history === "string") {
113140
+ history = req.body.history;
113141
+ } else {
113142
+ history = JSON.stringify(req.body.history);
113143
+ }
113144
+ }
113126
113145
  return {
113127
- prompt: repair_exports.makePrompt(podConfigPath),
113146
+ prompt: repair_exports.makePrompt(podConfigPath, history),
113128
113147
  system: repair_exports.SYSTEM
113129
113148
  };
113130
113149
  },
@@ -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.46";
10951
+ var VERSION = "0.3.47";
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.46",
5
+ "version": "0.3.47",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {