@algosuite/vo-mcp 0.2.0-beta.16 → 0.2.0-beta.17
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/cli.js +5 -51
- package/dist/cli.js.map +2 -2
- package/dist/index.js +5 -51
- package/dist/index.js.map +2 -2
- package/dist/runner-cli.js +433 -290
- package/dist/runner-cli.js.map +4 -4
- package/dist/runner-supervisor.js +238 -36
- package/dist/runner-supervisor.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5897,59 +5897,15 @@ function createNullConsensusEngineClient(reason = NULL_CLIENT_DEFAULT_REASON) {
|
|
|
5897
5897
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
5898
5898
|
|
|
5899
5899
|
// src/consensus/meta-model-caller.ts
|
|
5900
|
-
var META_MODEL_API_BASE_URL = "https://api.meta.ai/v1";
|
|
5901
5900
|
var META_CONSENSUS_MODEL = "muse-spark-1.1";
|
|
5902
5901
|
var META_MODEL_API_KEY_ENV = "MODEL_API_KEY";
|
|
5903
5902
|
var META_MODEL_API_KEY_ALIAS = "META_API";
|
|
5904
|
-
function resolveMetaKey(env) {
|
|
5905
|
-
return String(env[META_MODEL_API_KEY_ENV] || env[META_MODEL_API_KEY_ALIAS] || "").trim();
|
|
5906
|
-
}
|
|
5907
|
-
function positiveMaxTokens(value) {
|
|
5908
|
-
const parsed = Math.floor(Number(value));
|
|
5909
|
-
return Number.isFinite(parsed) && parsed > 0 ? parsed : 2048;
|
|
5910
|
-
}
|
|
5911
5903
|
function createMetaModelCaller(options = {}) {
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
if (!key) throw new Error(`Missing ${META_MODEL_API_KEY_ENV} for Meta Model API`);
|
|
5918
|
-
const messages = [
|
|
5919
|
-
...systemPrompt ? [{ role: "system", content: systemPrompt }] : [],
|
|
5920
|
-
{ role: "user", content: prompt }
|
|
5921
|
-
];
|
|
5922
|
-
const response = await fetchImpl(`${META_MODEL_API_BASE_URL}/chat/completions`, {
|
|
5923
|
-
method: "POST",
|
|
5924
|
-
headers: {
|
|
5925
|
-
Authorization: `Bearer ${key}`,
|
|
5926
|
-
"Content-Type": "application/json"
|
|
5927
|
-
},
|
|
5928
|
-
body: JSON.stringify({
|
|
5929
|
-
model: model || META_CONSENSUS_MODEL,
|
|
5930
|
-
messages,
|
|
5931
|
-
max_tokens: positiveMaxTokens(maxTokens),
|
|
5932
|
-
reasoning_effort: reasoningEffort
|
|
5933
|
-
}),
|
|
5934
|
-
signal
|
|
5935
|
-
});
|
|
5936
|
-
const payload = await response.json();
|
|
5937
|
-
if (!response.ok) {
|
|
5938
|
-
const message = String(payload.error?.message || response.statusText || "request failed").slice(0, 500);
|
|
5939
|
-
throw Object.assign(new Error(`Meta Model API ${response.status}: ${message}`), { status: response.status });
|
|
5940
|
-
}
|
|
5941
|
-
const content = payload.choices?.[0]?.message?.content;
|
|
5942
|
-
if (typeof content !== "string" || !content.trim()) {
|
|
5943
|
-
throw new Error(`Meta Model API returned no text (finish=${payload.choices?.[0]?.finish_reason || "unknown"})`);
|
|
5944
|
-
}
|
|
5945
|
-
const inputTokens = Number(payload.usage?.prompt_tokens || 0);
|
|
5946
|
-
const outputTokens = Number(payload.usage?.completion_tokens || 0);
|
|
5947
|
-
return {
|
|
5948
|
-
content,
|
|
5949
|
-
inputTokens,
|
|
5950
|
-
outputTokens,
|
|
5951
|
-
totalTokens: Number(payload.usage?.total_tokens || inputTokens + outputTokens)
|
|
5952
|
-
};
|
|
5904
|
+
void options;
|
|
5905
|
+
return async function callMetaWithMetrics2() {
|
|
5906
|
+
throw new Error(
|
|
5907
|
+
"Muse Spark direct consensus is disabled. Use an explicit sanitized task capsule through the AlgoSuite Model Firewall."
|
|
5908
|
+
);
|
|
5953
5909
|
};
|
|
5954
5910
|
}
|
|
5955
5911
|
var callMetaWithMetrics = createMetaModelCaller();
|
|
@@ -6256,8 +6212,6 @@ function probeProviders(env = process.env) {
|
|
|
6256
6212
|
if ((env["ANTHROPIC_API_KEY"] ?? "").trim().length > 0) out.push("anthropic");
|
|
6257
6213
|
if ((env["OPENAI_API_KEY"] ?? "").trim().length > 0) out.push("openai");
|
|
6258
6214
|
if ((env["GOOGLE_API_KEY"] ?? "").trim().length > 0) out.push("google");
|
|
6259
|
-
if ((env["DEEPSEEK_API_KEY"] ?? "").trim().length > 0) out.push("deepseek");
|
|
6260
|
-
if ((env[META_MODEL_API_KEY_ENV] ?? "").trim().length > 0 || (env[META_MODEL_API_KEY_ALIAS] ?? "").trim().length > 0) out.push("meta");
|
|
6261
6215
|
return out;
|
|
6262
6216
|
}
|
|
6263
6217
|
async function loadFactoryAndCallers(injectedEngine, injectedShared) {
|