staklink 0.3.91 → 0.4.0

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.
@@ -61258,7 +61258,7 @@ var SSEManager = class {
61258
61258
  var sseManager = new SSEManager();
61259
61259
 
61260
61260
  // src/proxy/version.ts
61261
- var VERSION = "0.3.91";
61261
+ var VERSION = "0.4.0";
61262
61262
 
61263
61263
  // node_modules/uuid/dist/esm/stringify.js
61264
61264
  var byteToHex = [];
@@ -136946,6 +136946,8 @@ var makeRepairPrompt = (podConfigPath, history, initialPrompt) => {
136946
136946
 
136947
136947
  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). Remember that you may need to add or alter env vars in the pm2.config.js 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). If its a simple backend api project, then thats fine to be defined as the "frontend". If there really is no public-facing frontend or api, then the "frontend" pm2 service should just be a dummy server: "npx -y hell0-w0rld". Its important that we have at least SOMETHING running as the "frontend" so we can verify that the pod is running smoothly!
136948
136948
 
136949
+ IMPORTANT: You may be in a multi-repo workspace! If so, make sure the "cwd" field for each appin the pm2.config.js specifies different paths to each repo! Like "/workspaces/repo1", "/workspaces/repo2", etc.
136950
+
136949
136951
  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.
136950
136952
 
136951
136953
  The actual core project code is being run with pm2! You can use pm2 commands to inspect the running processes. However, there is another service running in pm2 also (called staklink-proxy), that is not part of the software project at hand. DO NOT run "pm2 logs" just like that... only read logs of specific processes from the pm2 config file one at a time! Your goal is to get all supporting services and processes running in order to run the main project frontend. (Of course, sometimes its just one simple frontend process without supporting services. It really just depends on the project).
@@ -10967,13 +10967,18 @@ var glob = Object.assign(glob_, {
10967
10967
  glob.glob = glob;
10968
10968
 
10969
10969
  // src/proxy/version.ts
10970
- var VERSION = "0.3.91";
10970
+ var VERSION = "0.4.0";
10971
10971
 
10972
- // src/goose.ts
10972
+ // src/deps.ts
10973
10973
  var import_child_process = require("child_process");
10974
10974
  var import_util2 = require("util");
10975
10975
  var execAsync = (0, import_util2.promisify)(import_child_process.exec);
10976
10976
  var GOOSE_VERSION = "1.22.0";
10977
+ async function ensureDepsInstalled() {
10978
+ await ensureGooseInstalled();
10979
+ await ensureAgentBrowserInstalled();
10980
+ await ensureAgentBrowserSkillInstalled();
10981
+ }
10977
10982
  async function ensureGooseInstalled() {
10978
10983
  try {
10979
10984
  const { stdout } = await execAsync("goose --version");
@@ -11003,6 +11008,52 @@ async function installGoose() {
11003
11008
  console.error("\u26A0\uFE0F Failed to install Goose:", error2);
11004
11009
  }
11005
11010
  }
11011
+ async function ensureAgentBrowserInstalled() {
11012
+ try {
11013
+ await execAsync("agent-browser --version");
11014
+ console.log("\u2705 agent-browser is already installed");
11015
+ } catch {
11016
+ console.log("\u{1F4E6} agent-browser not found, installing...");
11017
+ await installAgentBrowser();
11018
+ }
11019
+ }
11020
+ async function installAgentBrowser() {
11021
+ try {
11022
+ console.log("\u{1F4E6} Installing agent-browser...");
11023
+ await execAsync("npm install -g agent-browser");
11024
+ console.log("\u{1F4E6} Running agent-browser install...");
11025
+ await execAsync("agent-browser install");
11026
+ console.log("\u2705 agent-browser installed successfully");
11027
+ } catch (error2) {
11028
+ console.error("\u26A0\uFE0F Failed to install agent-browser:", error2);
11029
+ }
11030
+ }
11031
+ var AGENT_BROWSER_SKILL_NAME = "agent-browser";
11032
+ var AGENT_BROWSER_SKILL_REPO = "https://github.com/vercel-labs/agent-browser";
11033
+ async function ensureAgentBrowserSkillInstalled() {
11034
+ try {
11035
+ const { stdout } = await execAsync("npx skills ls -g");
11036
+ if (stdout.includes(AGENT_BROWSER_SKILL_NAME)) {
11037
+ console.log(`\u2705 Skill "${AGENT_BROWSER_SKILL_NAME}" is already installed`);
11038
+ return;
11039
+ }
11040
+ console.log(`\u{1F4E6} Installing ${AGENT_BROWSER_SKILL_NAME} skill...`);
11041
+ await installAgentBrowserSkill();
11042
+ } catch {
11043
+ console.log(`\u{1F4E6} Installing ${AGENT_BROWSER_SKILL_NAME} skill...`);
11044
+ await installAgentBrowserSkill();
11045
+ }
11046
+ }
11047
+ async function installAgentBrowserSkill() {
11048
+ try {
11049
+ await execAsync(
11050
+ `npx skills add ${AGENT_BROWSER_SKILL_REPO} --skill ${AGENT_BROWSER_SKILL_NAME} -g -y`
11051
+ );
11052
+ console.log(`\u2705 Skill "${AGENT_BROWSER_SKILL_NAME}" installed successfully`);
11053
+ } catch (error2) {
11054
+ console.error(`\u26A0\uFE0F Failed to install ${AGENT_BROWSER_SKILL_NAME} skill:`, error2);
11055
+ }
11056
+ }
11006
11057
 
11007
11058
  // src/cli.ts
11008
11059
  var STAKLINK_PROXY = "staklink-proxy";
@@ -11048,7 +11099,7 @@ program2.command("start").description("Start the staklink proxy server").action(
11048
11099
  const root = await workspaceRoot();
11049
11100
  const proxyServerPath = getProxyPath();
11050
11101
  console.log("Starting staklink proxy server...");
11051
- await ensureGooseInstalled();
11102
+ await ensureDepsInstalled();
11052
11103
  console.log(`Workspace root: ${root}`);
11053
11104
  console.log(`Proxy server path: ${proxyServerPath}`);
11054
11105
  const runner = new Runner(root, console.log);
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.91",
5
+ "version": "0.4.0",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {