staklink 0.4.17 → 0.4.19

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.17";
60930
+ var VERSION = "0.4.19";
60931
60931
 
60932
60932
  // node_modules/uuid/dist/esm/stringify.js
60933
60933
  var byteToHex = [];
@@ -137611,10 +137611,12 @@ function createGoose(settings = {}) {
137611
137611
  return provider;
137612
137612
  }
137613
137613
  var goose = createGoose();
137614
+ var MAX_BUFFER_MB = 50;
137614
137615
  function exportSession(name30, audience = "user") {
137615
137616
  const sanitizedName = sanitizeShellArg2(name30);
137616
137617
  const stdout = (0, import_child_process2.execSync)(`goose session export --name "${sanitizedName}" --format json`, {
137617
- encoding: "utf-8"
137618
+ encoding: "utf-8",
137619
+ maxBuffer: MAX_BUFFER_MB * 1024 * 1024
137618
137620
  });
137619
137621
  const session = JSON.parse(stdout);
137620
137622
  return convertGooseMessages(session?.conversation ?? [], audience);
@@ -137652,9 +137654,10 @@ async function runAgent({
137652
137654
  summarize,
137653
137655
  model,
137654
137656
  searchApiKey,
137655
- summaryApiKey
137657
+ summaryApiKey,
137658
+ mcpServers
137656
137659
  }) {
137657
- createGooseConfig(searchApiKey);
137660
+ createGooseConfig(searchApiKey, mcpServers);
137658
137661
  const env2 = goose_env(apiKey, model);
137659
137662
  console.log("RUN goose with env", env2);
137660
137663
  const safePrompt = prompt.startsWith("-") ? `
@@ -137676,9 +137679,6 @@ ${prompt}` : prompt;
137676
137679
  } catch {
137677
137680
  }
137678
137681
  }
137679
- if (searchApiKey) {
137680
- cmd += ` --with-streamable-http-extension "https://mcp.exa.ai/mcp?exaApiKey=${searchApiKey}"`;
137681
- }
137682
137682
  const res = await executeCommand(cmd, cwd, env2, (l) => console.log(l));
137683
137683
  const output = res.stdout;
137684
137684
  if (summarize && session) {
@@ -137688,7 +137688,7 @@ ${prompt}` : prompt;
137688
137688
  }
137689
137689
  return output;
137690
137690
  }
137691
- function createGooseConfig(exaApiKey) {
137691
+ function createGooseConfig(exaApiKey, mcpServers) {
137692
137692
  const configDir = path7.join(os.homedir(), ".config", "goose");
137693
137693
  const configPath = path7.join(configDir, "config.yaml");
137694
137694
  let configContent = `extensions:
@@ -137709,7 +137709,31 @@ function createGooseConfig(exaApiKey) {
137709
137709
  description: "Search the web and github"
137710
137710
  uri: https://mcp.exa.ai/mcp?exaApiKey=${exaApiKey}
137711
137711
  timeout: 300
137712
- `;
137712
+ `;
137713
+ }
137714
+ if (mcpServers) {
137715
+ for (const server of mcpServers) {
137716
+ const headers = { ...server.headers || {} };
137717
+ if (server.token) {
137718
+ headers["Authorization"] = `Bearer ${server.token}`;
137719
+ }
137720
+ configContent += `
137721
+ ${server.name}:
137722
+ enabled: true
137723
+ type: streamable_http
137724
+ name: ${server.name}
137725
+ uri: ${server.url}
137726
+ timeout: 300
137727
+ `;
137728
+ if (Object.keys(headers).length > 0) {
137729
+ configContent += ` headers:
137730
+ `;
137731
+ for (const [key, value] of Object.entries(headers)) {
137732
+ configContent += ` ${key}: "${value}"
137733
+ `;
137734
+ }
137735
+ }
137736
+ }
137713
137737
  }
137714
137738
  try {
137715
137739
  if (!fs8.existsSync(configDir)) {
@@ -139927,7 +139951,7 @@ var createAsyncAgentHandler = (getParams, transformResult) => {
139927
139951
  return async (req, res) => {
139928
139952
  const request_id = startReq();
139929
139953
  try {
139930
- const { repoName, apiKey, agent_name, session, summarize, model, searchApiKey, summaryApiKey } = req.body;
139954
+ const { repoName, apiKey, agent_name, session, summarize, model, searchApiKey, summaryApiKey, mcpServers } = req.body;
139931
139955
  const params = getParams(req);
139932
139956
  const workspaceRoot2 = await workspaceRoot();
139933
139957
  let repoPath = workspaceRoot2;
@@ -139953,7 +139977,8 @@ var createAsyncAgentHandler = (getParams, transformResult) => {
139953
139977
  summarize: summarize ? true : false,
139954
139978
  model,
139955
139979
  searchApiKey,
139956
- summaryApiKey
139980
+ summaryApiKey,
139981
+ mcpServers
139957
139982
  }).then(async (result) => {
139958
139983
  const finalResult = transformResult ? transformResult(result) : result;
139959
139984
  const screenshots = await collectScreenshots(startTime);
@@ -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.17";
11007
+ var VERSION = "0.4.19";
11008
11008
 
11009
11009
  // src/deps.ts
11010
11010
  var import_child_process = require("child_process");
@@ -11013,7 +11013,7 @@ var import_fs3 = require("fs");
11013
11013
  var import_os = require("os");
11014
11014
  var import_path2 = require("path");
11015
11015
  var execAsync = (0, import_util2.promisify)(import_child_process.exec);
11016
- var GOOSE_VERSION = "1.26.1";
11016
+ var GOOSE_VERSION = "1.28.0";
11017
11017
  var SKILLS = [
11018
11018
  { name: "agent-browser", repo: "https://github.com/vercel-labs/agent-browser" },
11019
11019
  { name: "code-simplifier", repo: "https://github.com/getsentry/skills" },
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.17",
5
+ "version": "0.4.19",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {
@@ -120,7 +120,7 @@
120
120
  "@types/jsonwebtoken": "^9.0.10",
121
121
  "ai": "^6.0.26",
122
122
  "ai-sdk-provider-codex-cli": "^1.0.5",
123
- "ai-sdk-provider-goose": "^0.2.4",
123
+ "ai-sdk-provider-goose": "^0.2.5",
124
124
  "aieo": "^0.1.31",
125
125
  "async-mutex": "^0.5.0",
126
126
  "commander": "^14.0.1",