@quantish/agent 0.1.32 → 0.1.34
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/index.js +9 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -252,12 +252,13 @@ var MCPClient = class {
|
|
|
252
252
|
return this.toolsCache;
|
|
253
253
|
}
|
|
254
254
|
const headers = {
|
|
255
|
-
"Content-Type": "application/json"
|
|
256
|
-
"x-api-key": this.apiKey
|
|
255
|
+
"Content-Type": "application/json"
|
|
257
256
|
};
|
|
258
257
|
if (this.source === "discovery") {
|
|
259
258
|
headers["Accept"] = "application/json, text/event-stream";
|
|
260
259
|
headers["X-API-Key"] = this.apiKey;
|
|
260
|
+
} else {
|
|
261
|
+
headers["x-api-key"] = this.apiKey;
|
|
261
262
|
}
|
|
262
263
|
const response = await fetch(this.baseUrl, {
|
|
263
264
|
method: "POST",
|
|
@@ -286,12 +287,13 @@ var MCPClient = class {
|
|
|
286
287
|
*/
|
|
287
288
|
async callTool(name, args) {
|
|
288
289
|
const headers = {
|
|
289
|
-
"Content-Type": "application/json"
|
|
290
|
-
"x-api-key": this.apiKey
|
|
290
|
+
"Content-Type": "application/json"
|
|
291
291
|
};
|
|
292
292
|
if (this.source === "discovery") {
|
|
293
293
|
headers["Accept"] = "application/json, text/event-stream";
|
|
294
294
|
headers["X-API-Key"] = this.apiKey;
|
|
295
|
+
} else {
|
|
296
|
+
headers["x-api-key"] = this.apiKey;
|
|
295
297
|
}
|
|
296
298
|
const response = await fetch(this.baseUrl, {
|
|
297
299
|
method: "POST",
|
|
@@ -3688,7 +3690,8 @@ var Agent = class {
|
|
|
3688
3690
|
}
|
|
3689
3691
|
const allTools = await this.getAllTools();
|
|
3690
3692
|
const systemPrompt = this.config.systemPrompt ?? DEFAULT_SYSTEM_PROMPT;
|
|
3691
|
-
const
|
|
3693
|
+
const defaultModel = this.config.provider === "openrouter" ? "z-ai/glm-4.7" : DEFAULT_MODEL;
|
|
3694
|
+
const model = this.config.model ?? defaultModel;
|
|
3692
3695
|
const maxTokens = this.config.maxTokens ?? 8192;
|
|
3693
3696
|
this.llmProvider = createLLMProvider({
|
|
3694
3697
|
provider: this.config.provider || "anthropic",
|
|
@@ -5421,7 +5424,7 @@ Stopped ${count} background process${count > 1 ? "es" : ""}.`);
|
|
|
5421
5424
|
}
|
|
5422
5425
|
|
|
5423
5426
|
// src/index.ts
|
|
5424
|
-
var VERSION = "0.1.
|
|
5427
|
+
var VERSION = "0.1.34";
|
|
5425
5428
|
function cleanup() {
|
|
5426
5429
|
if (processManager.hasRunning()) {
|
|
5427
5430
|
const count = processManager.runningCount();
|