@algosuite/vo-mcp 0.2.0-beta.35 → 0.2.0-beta.36
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/runner-cli.js +27 -8
- package/dist/runner-cli.js.map +3 -3
- package/package.json +1 -1
package/dist/runner-cli.js
CHANGED
|
@@ -9765,6 +9765,19 @@ function resolveEffortMode(mode) {
|
|
|
9765
9765
|
const normalized = String(mode || "").trim().toLowerCase();
|
|
9766
9766
|
return EFFORT_MODE_CONFIG[normalized] || EFFORT_MODE_CONFIG[DEFAULT_MODE];
|
|
9767
9767
|
}
|
|
9768
|
+
function resolveDefaultBudgetUsd(env2 = {}) {
|
|
9769
|
+
const raw = env2?.[DEFAULT_BUDGET_USD_ENV];
|
|
9770
|
+
if (raw === void 0 || raw === null) return null;
|
|
9771
|
+
const parsed = Number(String(raw).trim());
|
|
9772
|
+
if (!Number.isFinite(parsed) || parsed <= 0) return null;
|
|
9773
|
+
return parsed;
|
|
9774
|
+
}
|
|
9775
|
+
function resolveDispatchBudgetUsd({ taskBudgetUsd, env: env2 = {} } = {}) {
|
|
9776
|
+
if (typeof taskBudgetUsd === "number" && Number.isFinite(taskBudgetUsd)) {
|
|
9777
|
+
return taskBudgetUsd;
|
|
9778
|
+
}
|
|
9779
|
+
return resolveDefaultBudgetUsd(env2);
|
|
9780
|
+
}
|
|
9768
9781
|
function composeEffortPrompt(basePrompt, effortConfig) {
|
|
9769
9782
|
const parts = [];
|
|
9770
9783
|
if (effortConfig.thinkingDirective) {
|
|
@@ -9780,15 +9793,16 @@ ${effortConfig.multiAgentInstruction}
|
|
|
9780
9793
|
parts.push(String(basePrompt || "").trim());
|
|
9781
9794
|
return parts.join("\n");
|
|
9782
9795
|
}
|
|
9783
|
-
var RED_TEAM_DIRECTIVE, EFFORT_MODE_CONFIG, DEFAULT_MODE;
|
|
9796
|
+
var RED_TEAM_DIRECTIVE, DEFAULT_BUDGET_USD_ENV, EFFORT_MODE_CONFIG, DEFAULT_MODE;
|
|
9784
9797
|
var init_effort_mode_config = __esm({
|
|
9785
9798
|
"../../scripts/virtual-office/code-runner/effort-mode-config.mjs"() {
|
|
9786
9799
|
"use strict";
|
|
9787
9800
|
RED_TEAM_DIRECTIVE = "Before declaring done, red-team your own work: name the top ways it could be wrong \u2014 especially code that is correct but silently not wired into production callers \u2014 give the failure scenario for each, and state the evidence that rules it out.";
|
|
9801
|
+
DEFAULT_BUDGET_USD_ENV = "VO_CODE_RUNNER_DEFAULT_BUDGET_USD";
|
|
9788
9802
|
EFFORT_MODE_CONFIG = {
|
|
9789
9803
|
fast: {
|
|
9790
9804
|
tier: "cheap",
|
|
9791
|
-
maxBudgetUsd:
|
|
9805
|
+
maxBudgetUsd: null,
|
|
9792
9806
|
permissionMode: "acceptEdits",
|
|
9793
9807
|
maxTurns: 80,
|
|
9794
9808
|
thinkingDirective: RED_TEAM_DIRECTIVE,
|
|
@@ -9796,7 +9810,7 @@ var init_effort_mode_config = __esm({
|
|
|
9796
9810
|
},
|
|
9797
9811
|
standard: {
|
|
9798
9812
|
tier: "mid",
|
|
9799
|
-
maxBudgetUsd:
|
|
9813
|
+
maxBudgetUsd: null,
|
|
9800
9814
|
permissionMode: "acceptEdits",
|
|
9801
9815
|
maxTurns: 200,
|
|
9802
9816
|
thinkingDirective: RED_TEAM_DIRECTIVE,
|
|
@@ -9804,7 +9818,7 @@ var init_effort_mode_config = __esm({
|
|
|
9804
9818
|
},
|
|
9805
9819
|
deep: {
|
|
9806
9820
|
tier: "best",
|
|
9807
|
-
maxBudgetUsd:
|
|
9821
|
+
maxBudgetUsd: null,
|
|
9808
9822
|
permissionMode: "acceptEdits",
|
|
9809
9823
|
maxTurns: 300,
|
|
9810
9824
|
thinkingDirective: `Think step-by-step. Verify assumptions against source code. Check edge cases. ${RED_TEAM_DIRECTIVE}`,
|
|
@@ -9812,7 +9826,7 @@ var init_effort_mode_config = __esm({
|
|
|
9812
9826
|
},
|
|
9813
9827
|
ultra: {
|
|
9814
9828
|
tier: "best",
|
|
9815
|
-
maxBudgetUsd:
|
|
9829
|
+
maxBudgetUsd: null,
|
|
9816
9830
|
permissionMode: "acceptEdits",
|
|
9817
9831
|
maxTurns: 500,
|
|
9818
9832
|
thinkingDirective: `Think step-by-step. Exhaustively verify every assumption against source code and documentation. ${RED_TEAM_DIRECTIVE}`,
|
|
@@ -9820,7 +9834,7 @@ var init_effort_mode_config = __esm({
|
|
|
9820
9834
|
},
|
|
9821
9835
|
ultracode: {
|
|
9822
9836
|
tier: "best",
|
|
9823
|
-
maxBudgetUsd:
|
|
9837
|
+
maxBudgetUsd: null,
|
|
9824
9838
|
permissionMode: "acceptEdits",
|
|
9825
9839
|
maxTurns: 800,
|
|
9826
9840
|
thinkingDirective: `Think step-by-step. Exhaustively verify every assumption against source code and documentation. Build worked examples to validate correctness. ${RED_TEAM_DIRECTIVE}`,
|
|
@@ -11024,7 +11038,12 @@ async function resolveEffortDispatch({ client, task, agent = "claude", env: env2
|
|
|
11024
11038
|
permissionMode: env2.VO_CODE_RUNNER_PERMISSION_MODE || effortConfig.permissionMode,
|
|
11025
11039
|
maxTurns: typeof task.max_turns === "number" ? task.max_turns : applying ? decision.maxTurns : effortConfig.maxTurns,
|
|
11026
11040
|
effort,
|
|
11027
|
-
|
|
11041
|
+
// Default dollar ceilings are OFF (2026-08-13). Only an EXPLICIT per-task
|
|
11042
|
+
// budget — or the VO_CODE_RUNNER_DEFAULT_BUDGET_USD override a BYO-API-key
|
|
11043
|
+
// operator sets — produces a `--max-budget-usd` flag. The router's dollar
|
|
11044
|
+
// rung is a default too, so it is suppressed with the rest; the router
|
|
11045
|
+
// still governs tier, effort, and maxTurns (the real runaway bound).
|
|
11046
|
+
maxBudgetUsd: resolveDispatchBudgetUsd({ taskBudgetUsd: task.max_budget_usd, env: env2 }),
|
|
11028
11047
|
prompt: composeEffortPrompt(basePrompt, effortConfig),
|
|
11029
11048
|
routerDecision: decision ? toPersistedRouterDecision(decision, model) : null
|
|
11030
11049
|
};
|
|
@@ -13352,7 +13371,7 @@ async function processOneTask(client, task, cfg, runnerInstanceId, swarmAdmissio
|
|
|
13352
13371
|
const sandbox = resolveRunnerSandbox(process.env, sel.agent);
|
|
13353
13372
|
await safeProgress(client, id, runnerStagePatch(
|
|
13354
13373
|
"starting_agent",
|
|
13355
|
-
`${cfg.runnerId} spawning ${sel.agent}:${model || "default"} (${tier}, effort ${dispatchMode}; ${sel.agent === "claude" ? `$${effectiveMaxBudgetUsd} hard API-equivalent cap` : "20m wall-clock cap"}${routerMode !== "off" && routerDecision ? `; auto-router ${routerMode}: ${routerDecision.rung}${routerDecision.effort ? ` effort=${routerDecision.effort}` : ""}` : ""})`,
|
|
13374
|
+
`${cfg.runnerId} spawning ${sel.agent}:${model || "default"} (${tier}, effort ${dispatchMode}; ${sel.agent === "claude" ? typeof effectiveMaxBudgetUsd === "number" && effectiveMaxBudgetUsd > 0 ? `$${effectiveMaxBudgetUsd} hard API-equivalent cap` : `no dollar cap, ${effectiveMaxTurns}-turn ceiling` : "20m wall-clock cap"}${routerMode !== "off" && routerDecision ? `; auto-router ${routerMode}: ${routerDecision.rung}${routerDecision.effort ? ` effort=${routerDecision.effort}` : ""}` : ""})`,
|
|
13356
13375
|
routerDecision ? { router_decision: routerDecision } : {}
|
|
13357
13376
|
));
|
|
13358
13377
|
const cap = typeof attemptBudgetUsd === "number" ? attemptBudgetUsd : resolveCodeDispatchCapUsd();
|