staklink 0.4.17 → 0.4.18
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.
- package/dist/proxy-server.cjs +33 -10
- package/dist/staklink-cli.cjs +1 -1
- package/package.json +1 -1
package/dist/proxy-server.cjs
CHANGED
|
@@ -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.
|
|
60930
|
+
var VERSION = "0.4.18";
|
|
60931
60931
|
|
|
60932
60932
|
// node_modules/uuid/dist/esm/stringify.js
|
|
60933
60933
|
var byteToHex = [];
|
|
@@ -137652,9 +137652,10 @@ async function runAgent({
|
|
|
137652
137652
|
summarize,
|
|
137653
137653
|
model,
|
|
137654
137654
|
searchApiKey,
|
|
137655
|
-
summaryApiKey
|
|
137655
|
+
summaryApiKey,
|
|
137656
|
+
mcpServers
|
|
137656
137657
|
}) {
|
|
137657
|
-
createGooseConfig(searchApiKey);
|
|
137658
|
+
createGooseConfig(searchApiKey, mcpServers);
|
|
137658
137659
|
const env2 = goose_env(apiKey, model);
|
|
137659
137660
|
console.log("RUN goose with env", env2);
|
|
137660
137661
|
const safePrompt = prompt.startsWith("-") ? `
|
|
@@ -137676,9 +137677,6 @@ ${prompt}` : prompt;
|
|
|
137676
137677
|
} catch {
|
|
137677
137678
|
}
|
|
137678
137679
|
}
|
|
137679
|
-
if (searchApiKey) {
|
|
137680
|
-
cmd += ` --with-streamable-http-extension "https://mcp.exa.ai/mcp?exaApiKey=${searchApiKey}"`;
|
|
137681
|
-
}
|
|
137682
137680
|
const res = await executeCommand(cmd, cwd, env2, (l) => console.log(l));
|
|
137683
137681
|
const output = res.stdout;
|
|
137684
137682
|
if (summarize && session) {
|
|
@@ -137688,7 +137686,7 @@ ${prompt}` : prompt;
|
|
|
137688
137686
|
}
|
|
137689
137687
|
return output;
|
|
137690
137688
|
}
|
|
137691
|
-
function createGooseConfig(exaApiKey) {
|
|
137689
|
+
function createGooseConfig(exaApiKey, mcpServers) {
|
|
137692
137690
|
const configDir = path7.join(os.homedir(), ".config", "goose");
|
|
137693
137691
|
const configPath = path7.join(configDir, "config.yaml");
|
|
137694
137692
|
let configContent = `extensions:
|
|
@@ -137709,7 +137707,31 @@ function createGooseConfig(exaApiKey) {
|
|
|
137709
137707
|
description: "Search the web and github"
|
|
137710
137708
|
uri: https://mcp.exa.ai/mcp?exaApiKey=${exaApiKey}
|
|
137711
137709
|
timeout: 300
|
|
137712
|
-
|
|
137710
|
+
`;
|
|
137711
|
+
}
|
|
137712
|
+
if (mcpServers) {
|
|
137713
|
+
for (const server of mcpServers) {
|
|
137714
|
+
const headers = { ...server.headers || {} };
|
|
137715
|
+
if (server.token) {
|
|
137716
|
+
headers["Authorization"] = `Bearer ${server.token}`;
|
|
137717
|
+
}
|
|
137718
|
+
configContent += `
|
|
137719
|
+
${server.name}:
|
|
137720
|
+
enabled: true
|
|
137721
|
+
type: streamable_http
|
|
137722
|
+
name: ${server.name}
|
|
137723
|
+
uri: ${server.url}
|
|
137724
|
+
timeout: 300
|
|
137725
|
+
`;
|
|
137726
|
+
if (Object.keys(headers).length > 0) {
|
|
137727
|
+
configContent += ` headers:
|
|
137728
|
+
`;
|
|
137729
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
137730
|
+
configContent += ` ${key}: "${value}"
|
|
137731
|
+
`;
|
|
137732
|
+
}
|
|
137733
|
+
}
|
|
137734
|
+
}
|
|
137713
137735
|
}
|
|
137714
137736
|
try {
|
|
137715
137737
|
if (!fs8.existsSync(configDir)) {
|
|
@@ -139927,7 +139949,7 @@ var createAsyncAgentHandler = (getParams, transformResult) => {
|
|
|
139927
139949
|
return async (req, res) => {
|
|
139928
139950
|
const request_id = startReq();
|
|
139929
139951
|
try {
|
|
139930
|
-
const { repoName, apiKey, agent_name, session, summarize, model, searchApiKey, summaryApiKey } = req.body;
|
|
139952
|
+
const { repoName, apiKey, agent_name, session, summarize, model, searchApiKey, summaryApiKey, mcpServers } = req.body;
|
|
139931
139953
|
const params = getParams(req);
|
|
139932
139954
|
const workspaceRoot2 = await workspaceRoot();
|
|
139933
139955
|
let repoPath = workspaceRoot2;
|
|
@@ -139953,7 +139975,8 @@ var createAsyncAgentHandler = (getParams, transformResult) => {
|
|
|
139953
139975
|
summarize: summarize ? true : false,
|
|
139954
139976
|
model,
|
|
139955
139977
|
searchApiKey,
|
|
139956
|
-
summaryApiKey
|
|
139978
|
+
summaryApiKey,
|
|
139979
|
+
mcpServers
|
|
139957
139980
|
}).then(async (result) => {
|
|
139958
139981
|
const finalResult = transformResult ? transformResult(result) : result;
|
|
139959
139982
|
const screenshots = await collectScreenshots(startTime);
|
package/dist/staklink-cli.cjs
CHANGED
|
@@ -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.
|
|
11007
|
+
var VERSION = "0.4.18";
|
|
11008
11008
|
|
|
11009
11009
|
// src/deps.ts
|
|
11010
11010
|
var import_child_process = require("child_process");
|