staklink 0.3.43 → 0.3.45

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.43";
56944
+ var VERSION = "0.3.45";
56945
56945
 
56946
56946
  // node_modules/uuid/dist/esm/stringify.js
56947
56947
  var byteToHex = [];
@@ -111159,25 +111159,30 @@ __export(repair_exports, {
111159
111159
  makePrompt: () => makePrompt,
111160
111160
  parseXML: () => parseXML
111161
111161
  });
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.
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.
111163
111163
 
111164
- When you have gotten the frontend running, or gotten as far as you can, respond to the user by saying either "<status>COMPLETE</status>" or "<status>FAILED</status>". If COMPLETE, then tell the user the fixed config files. FOR YOUR FINAL TEXT RESPONSE, USE THE THE FOLLOWING XML FORMAT:
111164
+ When you have gotten the frontend running, or gotten as far as you can, respond to the user by saying either "<status>COMPLETE</status>" or "<status>FAILED</status>". If COMPLETE, then tell the user the fixed config files (put the exact raw content of the files in the XML tags, no extra text like triple backticks or language label). FOR YOUR FINAL TEXT RESPONSE, USE THE THE FOLLOWING XML FORMAT:
111165
111165
 
111166
111166
  <status>COMPLETE</status>
111167
+ <summary>Short summary of what you did here.</summary>
111167
111168
  <pm2.config.js>
111168
- ...pm2 config file contents here...
111169
+ module.exports = {
111170
+ apps: [ ... ]
111171
+ };
111169
111172
  </pm2.config.js>
111170
111173
  <docker-compose.yaml>
111171
- ...docker-compose file contents here...
111174
+ version: "3.8"
111175
+ services:
111176
+ ...
111172
111177
  </docker-compose.yaml>
111173
111178
  <Dockerfile>
111174
- ...Dockerfile contents here...
111179
+ FROM ghcr.io/stakwork/staklink-js:latest
111175
111180
  </Dockerfile>
111176
111181
 
111177
111182
  IMPORTANT: YOU DO NOT NEED TO INCLUDE FILES THAT DID NOT CHANGE. Only include files that you modified.`;
111178
111183
  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.
111179
111184
 
111180
- 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). 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.
111185
+ 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). 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).
111181
111186
 
111182
111187
  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.
111183
111188
 
@@ -111192,7 +111197,9 @@ We have SPECIAL env vars for pm2, that tell the code-server system how to automa
111192
111197
  - TEST_COMMAND: Command to run tests (e.g. npm test)
111193
111198
  - E2E_TEST_COMMAND: Command to run end-to-end tests (e.g. npx playwright test)
111194
111199
 
111195
- 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. None of these commands are required though, only the "script" is required (to start the frontend).
111200
+ None of these commands are required though, only the "script" is required (to start the frontend).
111201
+
111202
+ 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.
111196
111203
 
111197
111204
  Good luck!
111198
111205
  `;
@@ -113121,34 +113128,6 @@ ${diff.trim()}`);
113121
113128
  (result) => repair_exports.parseXML(result)
113122
113129
  )
113123
113130
  );
113124
- app.post("/repair", async (req, res) => {
113125
- const request_id = startReq();
113126
- try {
113127
- const { repoName, prompt, apiKey, agent_name, session, system } = req.body;
113128
- const workspaceRoot2 = await workspaceRoot();
113129
- let repoPath = workspaceRoot2;
113130
- if (repoName) {
113131
- const candidate = import_path2.default.join(workspaceRoot2, repoName);
113132
- try {
113133
- const stat4 = await import_promises2.default.stat(candidate);
113134
- if (stat4.isDirectory()) {
113135
- repoPath = candidate;
113136
- }
113137
- } catch {
113138
- }
113139
- }
113140
- const agentFn = chooseAgent(agent_name || "goose");
113141
- agentFn(prompt, apiKey, repoPath, session, system).then((result) => {
113142
- finishReq(request_id, { success: true, result });
113143
- }).catch((error85) => {
113144
- failReq(request_id, error85);
113145
- });
113146
- res.json({ request_id, status: "pending" });
113147
- } catch (e) {
113148
- console.error("Error running claude scripts:", e);
113149
- fail(res, e);
113150
- }
113151
- });
113152
113131
  app.post(
113153
113132
  "/goose_web",
113154
113133
  async (req, res) => {
@@ -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.43";
10951
+ var VERSION = "0.3.45";
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.43",
5
+ "version": "0.3.45",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {