staklink 0.4.22 → 0.4.24
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 +22 -20
- package/dist/staklink-cli.cjs +1 -1
- package/package.json +2 -2
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.24";
|
|
60931
60931
|
|
|
60932
60932
|
// node_modules/uuid/dist/esm/stringify.js
|
|
60933
60933
|
var byteToHex = [];
|
|
@@ -137110,6 +137110,7 @@ var GooseModels = {
|
|
|
137110
137110
|
"claude-sonnet-4-6": "anthropic/claude-sonnet-4-6",
|
|
137111
137111
|
"claude-haiku-4-5": "anthropic/claude-haiku-4-5",
|
|
137112
137112
|
"claude-opus-4-6": "anthropic/claude-opus-4-6",
|
|
137113
|
+
"claude-opus-4-7": "anthropic/claude-opus-4-7",
|
|
137113
137114
|
"claude-sonnet-4-0": "anthropic/claude-sonnet-4-0",
|
|
137114
137115
|
"claude-opus-4-0": "anthropic/claude-opus-4-0",
|
|
137115
137116
|
// OpenAI GPT
|
|
@@ -137144,7 +137145,8 @@ var GooseModels = {
|
|
|
137144
137145
|
mistral: "ollama/mistral",
|
|
137145
137146
|
codellama: "ollama/codellama",
|
|
137146
137147
|
// OpenRouter
|
|
137147
|
-
"kimi-k2.5": "openrouter/moonshotai/kimi-k2.5"
|
|
137148
|
+
"kimi-k2.5": "openrouter/moonshotai/kimi-k2.5",
|
|
137149
|
+
"kimi-k2.6": "openrouter/moonshotai/kimi-k2.6"
|
|
137148
137150
|
};
|
|
137149
137151
|
var API_KEY_ENV_VARS = {
|
|
137150
137152
|
anthropic: "ANTHROPIC_API_KEY",
|
|
@@ -137632,7 +137634,7 @@ function isStreamDecodeError(output) {
|
|
|
137632
137634
|
var MODELS2 = {
|
|
137633
137635
|
sonnet: GooseModels["claude-sonnet-4-6"],
|
|
137634
137636
|
opus: GooseModels["claude-opus-4-6"],
|
|
137635
|
-
kimi: GooseModels["kimi-k2.
|
|
137637
|
+
kimi: GooseModels["kimi-k2.6"],
|
|
137636
137638
|
gemini: GooseModels["gemini-3-pro-preview"],
|
|
137637
137639
|
gpt: GooseModels["gpt-5.1-codex"]
|
|
137638
137640
|
};
|
|
@@ -137683,7 +137685,7 @@ async function runAgent({
|
|
|
137683
137685
|
}) {
|
|
137684
137686
|
createGooseConfig(searchApiKey, mcpServers);
|
|
137685
137687
|
const env2 = goose_env(apiKey, model);
|
|
137686
|
-
|
|
137688
|
+
log("RUN goose with env", env2);
|
|
137687
137689
|
const safePrompt = prompt.startsWith("-") ? `
|
|
137688
137690
|
${prompt}` : prompt;
|
|
137689
137691
|
const cleanPrompt = sanitizeShellArg(safePrompt);
|
|
@@ -137691,7 +137693,7 @@ ${prompt}` : prompt;
|
|
|
137691
137693
|
system += system_prompt ? sanitizeShellArg(system_prompt) + "\n\n" : "";
|
|
137692
137694
|
system += SYSTEM_SUFFIX;
|
|
137693
137695
|
system = sanitizeShellArg(system);
|
|
137694
|
-
|
|
137696
|
+
log("Using Goose CLI", cleanPrompt, system);
|
|
137695
137697
|
let cmd = `goose run --with-builtin developer -t "${cleanPrompt}" --system "${system}"`;
|
|
137696
137698
|
if (session) {
|
|
137697
137699
|
session = sanitizeShellArg(session);
|
|
@@ -137703,14 +137705,14 @@ ${prompt}` : prompt;
|
|
|
137703
137705
|
} catch {
|
|
137704
137706
|
}
|
|
137705
137707
|
}
|
|
137706
|
-
let res = await executeCommand(cmd, cwd, env2, (l) =>
|
|
137708
|
+
let res = await executeCommand(cmd, cwd, env2, (l) => log(l));
|
|
137707
137709
|
if (session && isStreamDecodeError(res.stdout)) {
|
|
137708
137710
|
const maxRetries = 2;
|
|
137709
137711
|
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
137710
|
-
|
|
137712
|
+
log(`Stream decode error detected, retrying (${attempt}/${maxRetries})...`);
|
|
137711
137713
|
await new Promise((r) => setTimeout(r, 2e3 * attempt));
|
|
137712
137714
|
const retryCmd = `goose run --with-builtin developer -t "continue" --system "${system}" --name ${session} --resume`;
|
|
137713
|
-
res = await executeCommand(retryCmd, cwd, env2, (l) =>
|
|
137715
|
+
res = await executeCommand(retryCmd, cwd, env2, (l) => log(l));
|
|
137714
137716
|
if (!isStreamDecodeError(res.stdout)) break;
|
|
137715
137717
|
}
|
|
137716
137718
|
}
|
|
@@ -137788,9 +137790,9 @@ function createGooseConfig(exaApiKey, mcpServers) {
|
|
|
137788
137790
|
fs8.mkdirSync(configDir, { recursive: true });
|
|
137789
137791
|
}
|
|
137790
137792
|
fs8.writeFileSync(configPath, configContent, "utf-8");
|
|
137791
|
-
|
|
137793
|
+
log(`Created goose config at ${configPath}`);
|
|
137792
137794
|
} catch (error88) {
|
|
137793
|
-
|
|
137795
|
+
warn("Error creating goose config:", error88);
|
|
137794
137796
|
}
|
|
137795
137797
|
}
|
|
137796
137798
|
async function runGooseWeb(apiKey, cwd, port) {
|
|
@@ -137813,7 +137815,7 @@ async function runGooseWeb(apiKey, cwd, port) {
|
|
|
137813
137815
|
env: env2
|
|
137814
137816
|
});
|
|
137815
137817
|
} catch (error88) {
|
|
137816
|
-
|
|
137818
|
+
error("Error occurred while starting Goose:", error88);
|
|
137817
137819
|
}
|
|
137818
137820
|
}
|
|
137819
137821
|
|
|
@@ -137833,7 +137835,7 @@ async function runAgent2({
|
|
|
137833
137835
|
if (!prompt) {
|
|
137834
137836
|
throw new Error("Missing prompt");
|
|
137835
137837
|
}
|
|
137836
|
-
|
|
137838
|
+
log("runAgent called with:", {
|
|
137837
137839
|
prompt,
|
|
137838
137840
|
apiKey: apiKey ? "***" : "undefined",
|
|
137839
137841
|
cwd
|
|
@@ -137865,7 +137867,7 @@ async function runAgent2({
|
|
|
137865
137867
|
}
|
|
137866
137868
|
};
|
|
137867
137869
|
} catch (error88) {
|
|
137868
|
-
|
|
137870
|
+
log("Model error:", error88);
|
|
137869
137871
|
throw error88;
|
|
137870
137872
|
}
|
|
137871
137873
|
}
|
|
@@ -137875,7 +137877,7 @@ function findClaudePath() {
|
|
|
137875
137877
|
if (!claudePath) {
|
|
137876
137878
|
throw new Error("Claude CLI not found in PATH");
|
|
137877
137879
|
}
|
|
137878
|
-
|
|
137880
|
+
log("Found Claude CLI at:", claudePath);
|
|
137879
137881
|
return claudePath;
|
|
137880
137882
|
} catch (error88) {
|
|
137881
137883
|
throw new Error(`Could not find Claude CLI: ${error88}`);
|
|
@@ -139357,7 +139359,7 @@ async function runAgent3({
|
|
|
139357
139359
|
let system = SYSTEM_CORE;
|
|
139358
139360
|
system += system_prompt ? system_prompt + "\n\n" : "";
|
|
139359
139361
|
system += SYSTEM_SUFFIX;
|
|
139360
|
-
|
|
139362
|
+
log("Codex agent using API key:", apiKey ? `${apiKey.substring(0, 8)}...` : "MISSING");
|
|
139361
139363
|
if (apiKey) {
|
|
139362
139364
|
writeCodexAuth(apiKey);
|
|
139363
139365
|
}
|
|
@@ -139566,13 +139568,13 @@ var parseValidationResponse = (rawResponse) => {
|
|
|
139566
139568
|
async function streamGooseToSSE(sessionId, prompt, apiKey, res, options) {
|
|
139567
139569
|
let resume = false;
|
|
139568
139570
|
try {
|
|
139569
|
-
|
|
139571
|
+
log("Exporting session", sessionId);
|
|
139570
139572
|
exportSession(sessionId, "assistant");
|
|
139571
139573
|
resume = true;
|
|
139572
|
-
|
|
139574
|
+
log("Session exists, resume");
|
|
139573
139575
|
} catch (error88) {
|
|
139574
|
-
|
|
139575
|
-
|
|
139576
|
+
log("Error exporting session", error88);
|
|
139577
|
+
log("Session doesn't exist, don't resume");
|
|
139576
139578
|
}
|
|
139577
139579
|
log("Streaming Goose to SSE", { sessionId, prompt, apiKey, resume, model: options?.model });
|
|
139578
139580
|
createGooseConfig(options?.searchApiKey);
|
|
@@ -139751,7 +139753,7 @@ async function streamCodexToSSE(sessionId, prompt, apiKey, res, options) {
|
|
|
139751
139753
|
ensureSessionsDir();
|
|
139752
139754
|
const sessionPath = getSessionPath(sessionId);
|
|
139753
139755
|
log("Streaming Codex to SSE", { sessionId, prompt, sessionPath });
|
|
139754
|
-
|
|
139756
|
+
log("Codex streaming using API key:", apiKey ? `${apiKey.substring(0, 8)}...` : "MISSING");
|
|
139755
139757
|
if (apiKey) {
|
|
139756
139758
|
writeCodexAuth(apiKey);
|
|
139757
139759
|
}
|
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.24";
|
|
11008
11008
|
|
|
11009
11009
|
// src/deps.ts
|
|
11010
11010
|
var import_child_process = require("child_process");
|
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.
|
|
5
|
+
"version": "0.4.24",
|
|
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.
|
|
123
|
+
"ai-sdk-provider-goose": "^0.2.7",
|
|
124
124
|
"aieo": "^0.1.31",
|
|
125
125
|
"async-mutex": "^0.5.0",
|
|
126
126
|
"commander": "^14.0.1",
|