@algosuite/vo-mcp 0.2.0-beta.35 → 0.2.0-beta.37
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 +181 -20
- package/dist/runner-cli.js.map +4 -4
- package/dist/runner-supervisor.js +1 -1
- package/dist/runner-supervisor.js.map +1 -1
- package/dist/thresholds.json +2 -0
- package/package.json +1 -1
package/dist/runner-cli.js
CHANGED
|
@@ -2922,7 +2922,7 @@ function createControlPlaneClient({
|
|
|
2922
2922
|
},
|
|
2923
2923
|
/**
|
|
2924
2924
|
* Read the operator's dispatch-mode config (Fast→Ultracode effort setting).
|
|
2925
|
-
* Returns the mode string ('fast'|'standard'|'deep'|'ultra'|'ultracode'),
|
|
2925
|
+
* Returns the mode string ('fast'|'standard'|'deep'|'ultra'|'marathon'; 'ultracode' legacy),
|
|
2926
2926
|
* defaulting to 'standard' on any error. Never throws — best-effort.
|
|
2927
2927
|
*/
|
|
2928
2928
|
async getDispatchMode() {
|
|
@@ -3284,6 +3284,22 @@ function flushAgentStreamBuffer({
|
|
|
3284
3284
|
if (trailing) deliverAgentEvent(parseEvent(trailing), { onProgress, onResult });
|
|
3285
3285
|
return "";
|
|
3286
3286
|
}
|
|
3287
|
+
function nextDeadlineDecision({
|
|
3288
|
+
nowMs,
|
|
3289
|
+
startMs,
|
|
3290
|
+
lastActivityMs,
|
|
3291
|
+
maxWallClockMs = 0,
|
|
3292
|
+
stallWindowMs = 6e5,
|
|
3293
|
+
legacy = false
|
|
3294
|
+
} = {}) {
|
|
3295
|
+
if (!(maxWallClockMs > 0)) return { action: "wait", delayMs: null };
|
|
3296
|
+
const elapsed = nowMs - startMs;
|
|
3297
|
+
if (elapsed < maxWallClockMs) return { action: "wait", delayMs: maxWallClockMs - elapsed };
|
|
3298
|
+
if (legacy) return { action: "kill", stalledForMs: null };
|
|
3299
|
+
const idle = nowMs - lastActivityMs;
|
|
3300
|
+
if (idle >= stallWindowMs) return { action: "kill", stalledForMs: idle };
|
|
3301
|
+
return { action: "wait", delayMs: stallWindowMs - idle };
|
|
3302
|
+
}
|
|
3287
3303
|
function finalizeAgentTaskResult({
|
|
3288
3304
|
result,
|
|
3289
3305
|
bin,
|
|
@@ -3292,6 +3308,7 @@ function finalizeAgentTaskResult({
|
|
|
3292
3308
|
killed,
|
|
3293
3309
|
cancelReason,
|
|
3294
3310
|
maxWallClockMs,
|
|
3311
|
+
stalledForMs = null,
|
|
3295
3312
|
forcedAfterResult,
|
|
3296
3313
|
code,
|
|
3297
3314
|
signal,
|
|
@@ -3302,7 +3319,8 @@ function finalizeAgentTaskResult({
|
|
|
3302
3319
|
...result,
|
|
3303
3320
|
ok: false,
|
|
3304
3321
|
timedOut: true,
|
|
3305
|
-
|
|
3322
|
+
stalledForMs,
|
|
3323
|
+
summary: stalledForMs != null ? `stalled: no stream activity for ${stalledForMs}ms after the wall-clock deadline (${maxWallClockMs}ms)` : `wall-clock timeout (${maxWallClockMs}ms)`
|
|
3306
3324
|
};
|
|
3307
3325
|
}
|
|
3308
3326
|
if (killed) {
|
|
@@ -4123,6 +4141,8 @@ function runAgentTask({
|
|
|
4123
4141
|
shouldCancel = async () => false,
|
|
4124
4142
|
cancelPollMs = 5e3,
|
|
4125
4143
|
maxWallClockMs = 0,
|
|
4144
|
+
stallWindowMs = Number(env2?.VO_CODE_RUNNER_STALL_WINDOW_MS) > 0 ? Number(env2.VO_CODE_RUNNER_STALL_WINDOW_MS) : 6e5,
|
|
4145
|
+
legacyWallClock = env2?.VO_CODE_RUNNER_LEGACY_WALLCLOCK === "1",
|
|
4126
4146
|
postResultExitGraceMs = 1e4,
|
|
4127
4147
|
exitDrainGraceMs = 300,
|
|
4128
4148
|
armTerminalCleanup = armTerminalProcessCleanup,
|
|
@@ -4250,6 +4270,7 @@ function runAgentTask({
|
|
|
4250
4270
|
killed,
|
|
4251
4271
|
cancelReason,
|
|
4252
4272
|
maxWallClockMs,
|
|
4273
|
+
stalledForMs,
|
|
4253
4274
|
forcedAfterResult,
|
|
4254
4275
|
code,
|
|
4255
4276
|
signal,
|
|
@@ -4268,12 +4289,31 @@ function runAgentTask({
|
|
|
4268
4289
|
}
|
|
4269
4290
|
}, 5e3);
|
|
4270
4291
|
};
|
|
4271
|
-
const
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4292
|
+
const deadlineStartMs = Date.now();
|
|
4293
|
+
let lastActivityMs = deadlineStartMs;
|
|
4294
|
+
let stalledForMs = null;
|
|
4295
|
+
let wallTimer = null;
|
|
4296
|
+
const armDeadline = () => {
|
|
4297
|
+
const decision = nextDeadlineDecision({
|
|
4298
|
+
nowMs: Date.now(),
|
|
4299
|
+
startMs: deadlineStartMs,
|
|
4300
|
+
lastActivityMs,
|
|
4301
|
+
maxWallClockMs,
|
|
4302
|
+
stallWindowMs,
|
|
4303
|
+
legacy: legacyWallClock
|
|
4304
|
+
});
|
|
4305
|
+
if (decision.action === "kill") {
|
|
4306
|
+
timedOut = true;
|
|
4307
|
+
stalledForMs = decision.stalledForMs;
|
|
4308
|
+
clearInterval(poll);
|
|
4309
|
+
hardKill();
|
|
4310
|
+
return;
|
|
4311
|
+
}
|
|
4312
|
+
if (decision.delayMs != null) wallTimer = setTimeout(armDeadline, decision.delayMs);
|
|
4313
|
+
};
|
|
4314
|
+
armDeadline();
|
|
4276
4315
|
child.stdout.on("data", (chunk) => {
|
|
4316
|
+
lastActivityMs = Date.now();
|
|
4277
4317
|
buffer = consumeAgentStreamChunk({
|
|
4278
4318
|
chunk,
|
|
4279
4319
|
buffer,
|
|
@@ -4283,6 +4323,7 @@ function runAgentTask({
|
|
|
4283
4323
|
});
|
|
4284
4324
|
});
|
|
4285
4325
|
child.stderr.on("data", (c) => {
|
|
4326
|
+
lastActivityMs = Date.now();
|
|
4286
4327
|
stderrTail = (stderrTail + c.toString()).slice(-4e3);
|
|
4287
4328
|
});
|
|
4288
4329
|
child.on("error", (err) => {
|
|
@@ -6007,6 +6048,7 @@ function isMaxTurnsResult(summary) {
|
|
|
6007
6048
|
}
|
|
6008
6049
|
function partialPrTitlePrefix(run = {}) {
|
|
6009
6050
|
if (isMaxTurnsResult(run.summary)) return "\u26A0 PARTIAL (max turns reached)";
|
|
6051
|
+
if (run.timedOut && run.stalledForMs != null) return "\u26A0 PARTIAL (stalled \u2014 no progress after wall clock)";
|
|
6010
6052
|
if (run.timedOut) return "\u26A0 PARTIAL (wall-clock timeout)";
|
|
6011
6053
|
return "\u26A0 PARTIAL (needs continuation)";
|
|
6012
6054
|
}
|
|
@@ -7119,6 +7161,98 @@ var init_dispatch_onboarding = __esm({
|
|
|
7119
7161
|
}
|
|
7120
7162
|
});
|
|
7121
7163
|
|
|
7164
|
+
// ../../scripts/virtual-office/code-runner/methodology-composer.mjs
|
|
7165
|
+
function classifyTaskShape(task) {
|
|
7166
|
+
const prompt = String(task?.prompt || "");
|
|
7167
|
+
for (const rule of SHAPE_RULES) {
|
|
7168
|
+
if (rule.matches(task, prompt)) return rule.shape;
|
|
7169
|
+
}
|
|
7170
|
+
return "feature";
|
|
7171
|
+
}
|
|
7172
|
+
function composeMethodologyBlock(task) {
|
|
7173
|
+
const shape = classifyTaskShape(task);
|
|
7174
|
+
const lines = [
|
|
7175
|
+
`## Methodology (auto-composed: ${shape})`,
|
|
7176
|
+
...UNIVERSAL_DIRECTIVES.map((d) => `- ${d}`),
|
|
7177
|
+
...(SHAPE_DIRECTIVES[shape] || []).map((d) => `- ${d}`)
|
|
7178
|
+
];
|
|
7179
|
+
return { shape, block: lines.join("\n") };
|
|
7180
|
+
}
|
|
7181
|
+
function withMethodology(prompt, task) {
|
|
7182
|
+
const { shape, block } = composeMethodologyBlock(task);
|
|
7183
|
+
return { shape, prompt: `${prompt ?? ""}
|
|
7184
|
+
|
|
7185
|
+
${block}` };
|
|
7186
|
+
}
|
|
7187
|
+
var SHAPE_RULES, UNIVERSAL_DIRECTIVES, SHAPE_DIRECTIVES;
|
|
7188
|
+
var init_methodology_composer = __esm({
|
|
7189
|
+
"../../scripts/virtual-office/code-runner/methodology-composer.mjs"() {
|
|
7190
|
+
"use strict";
|
|
7191
|
+
SHAPE_RULES = [
|
|
7192
|
+
{
|
|
7193
|
+
shape: "recovery",
|
|
7194
|
+
matches: (task, prompt) => Boolean(task?.resumed_from) || /VO_RECOVERY_FROM_CODE_TASK/u.test(prompt) || /previous run stopped before completion/iu.test(prompt)
|
|
7195
|
+
},
|
|
7196
|
+
{
|
|
7197
|
+
shape: "pr-repair",
|
|
7198
|
+
matches: (task) => typeof task?.repair_pr_number === "number"
|
|
7199
|
+
},
|
|
7200
|
+
{
|
|
7201
|
+
shape: "bug-fix",
|
|
7202
|
+
matches: (task, prompt) => Boolean(task?.bug_id) || /^reproduce and fix\b/iu.test(prompt) || /captured by: qa sweep/iu.test(prompt)
|
|
7203
|
+
},
|
|
7204
|
+
{
|
|
7205
|
+
shape: "roadmap-advance",
|
|
7206
|
+
matches: (task, prompt) => Boolean(task?.roadmap_app || task?.roadmap_item_id || typeof task?.roadmap_phase_index === "number") || /^roadmap:/iu.test(prompt)
|
|
7207
|
+
},
|
|
7208
|
+
{
|
|
7209
|
+
shape: "research",
|
|
7210
|
+
matches: (_task, prompt) => /\b(investigate|research|root[- ]cause|audit|diagnose|find out why|explain why)\b/iu.test(prompt)
|
|
7211
|
+
},
|
|
7212
|
+
{
|
|
7213
|
+
shape: "design",
|
|
7214
|
+
matches: (_task, prompt) => /\b(design doc|architecture|architect|adr\b|lane brief|write a plan|propose (a|the) (design|plan|approach))\b/iu.test(prompt)
|
|
7215
|
+
},
|
|
7216
|
+
{
|
|
7217
|
+
shape: "chore",
|
|
7218
|
+
matches: (_task, prompt) => prompt.length < 400 && /\b(typo|rename|bump|readme|changelog|comment|reword|lint fix|formatting)\b/iu.test(prompt)
|
|
7219
|
+
}
|
|
7220
|
+
];
|
|
7221
|
+
UNIVERSAL_DIRECTIVES = [
|
|
7222
|
+
"Verification is a stage, not a vibe: before publishing, run the tests/build your change touches and cite their actual output. A claim without execution evidence is not done.",
|
|
7223
|
+
"Work to completion or end with an explicit failure reason. Do not stop because time has passed; stop when the evidence says the work is done \u2014 or state exactly what is blocking.",
|
|
7224
|
+
"Default to doing the work yourself in this session. Spawn parallel subagents ONLY for pieces that are genuinely independent and independently verifiable \u2014 and verify their results yourself before integrating; never let unreviewed parallel output merge into shared files."
|
|
7225
|
+
];
|
|
7226
|
+
SHAPE_DIRECTIVES = {
|
|
7227
|
+
"bug-fix": [
|
|
7228
|
+
"Reproduce first: write the check that fails because of this bug, prove it fails, then fix, then prove the same check passes. A fix without a failing-then-passing check is not a fix."
|
|
7229
|
+
],
|
|
7230
|
+
research: [
|
|
7231
|
+
"Every claim needs its source AND exact attribution \u2014 which file:line, which benchmark, which baseline, which version. Verify attribution, not just that a source exists; misattributed real facts are the dominant research failure mode.",
|
|
7232
|
+
"Deliver findings as a repo artifact (docs/) with the evidence inline, not only as chat output."
|
|
7233
|
+
],
|
|
7234
|
+
"roadmap-advance": [
|
|
7235
|
+
"Update the roadmap doc status, regenerate the roadmap board if the doc changed, and add the roadmap-log fragment IN THIS SAME PR \u2014 a roadmap task that does not move the roadmap did not happen."
|
|
7236
|
+
],
|
|
7237
|
+
design: [
|
|
7238
|
+
"Produce the plan artifact (docs/lanes/ or docs/adr/ with a Related section) BEFORE writing code. State the requirements you are designing to at the top; ambiguity resolved now is rework avoided later."
|
|
7239
|
+
],
|
|
7240
|
+
recovery: [
|
|
7241
|
+
"Restore the preserved context first (draft PR, branch, checkpoint notes) and finish the ORIGINAL spec. Do not redo work that is already committed; verify what exists, then close the gap."
|
|
7242
|
+
],
|
|
7243
|
+
"pr-repair": [
|
|
7244
|
+
"Work from the exact materialized PR source. Never force-push or rebase the existing branch; publish the replacement and let the host close the original."
|
|
7245
|
+
],
|
|
7246
|
+
chore: [
|
|
7247
|
+
"Keep the diff minimal and mechanical. No fan-out, no speculative refactors; the verification stage is still required."
|
|
7248
|
+
],
|
|
7249
|
+
feature: [
|
|
7250
|
+
"Ship the tests that prove the feature works in the same change, to the output-verified standard (assert the correct answer, not that something rendered)."
|
|
7251
|
+
]
|
|
7252
|
+
};
|
|
7253
|
+
}
|
|
7254
|
+
});
|
|
7255
|
+
|
|
7122
7256
|
// ../../scripts/virtual-office/code-runner/task-prompt.mjs
|
|
7123
7257
|
function buildMissingKnowledgeMessage(taskId, reason) {
|
|
7124
7258
|
const id = taskId || "unknown-task";
|
|
@@ -7162,11 +7296,16 @@ function withAttachmentManifest(prompt, markdown) {
|
|
|
7162
7296
|
|
|
7163
7297
|
${manifest}` : prompt;
|
|
7164
7298
|
}
|
|
7299
|
+
function withComposedMethodology(prompt, task, log2, taskId) {
|
|
7300
|
+
const { shape, prompt: composed } = withMethodology(prompt, task);
|
|
7301
|
+
log2(`task ${taskId || "unknown-task"}: methodology shape=${shape}`);
|
|
7302
|
+
return composed;
|
|
7303
|
+
}
|
|
7165
7304
|
async function composeCodeTaskPrompt(client, task, { log: log2 = () => {
|
|
7166
7305
|
}, allowMissingKnowledgeContext = false, attachmentManifestMarkdown = "" } = {}) {
|
|
7167
7306
|
const taskId = task?.code_task_id;
|
|
7168
7307
|
if (!taskId) {
|
|
7169
|
-
return composeDispatchPrompt(withAttachmentManifest(task?.prompt, attachmentManifestMarkdown), {
|
|
7308
|
+
return composeDispatchPrompt(withComposedMethodology(withAttachmentManifest(task?.prompt, attachmentManifestMarkdown), task, log2, taskId), {
|
|
7170
7309
|
repo: task?.repo,
|
|
7171
7310
|
knowledgeContextMarkdown: handleMissingKnowledgeContext(taskId, "missing code_task_id on the claimed task", {
|
|
7172
7311
|
allowMissingKnowledgeContext,
|
|
@@ -7175,7 +7314,7 @@ async function composeCodeTaskPrompt(client, task, { log: log2 = () => {
|
|
|
7175
7314
|
});
|
|
7176
7315
|
}
|
|
7177
7316
|
if (typeof client?.getTaskKnowledgeContext !== "function") {
|
|
7178
|
-
return composeDispatchPrompt(withAttachmentManifest(task?.prompt, attachmentManifestMarkdown), {
|
|
7317
|
+
return composeDispatchPrompt(withComposedMethodology(withAttachmentManifest(task?.prompt, attachmentManifestMarkdown), task, log2, taskId), {
|
|
7179
7318
|
repo: task?.repo,
|
|
7180
7319
|
knowledgeContextMarkdown: handleMissingKnowledgeContext(taskId, "control-plane client cannot fetch knowledge context", {
|
|
7181
7320
|
allowMissingKnowledgeContext,
|
|
@@ -7204,7 +7343,7 @@ async function composeCodeTaskPrompt(client, task, { log: log2 = () => {
|
|
|
7204
7343
|
const prompt = operatorInstructions ? `${task?.prompt ?? ""}
|
|
7205
7344
|
|
|
7206
7345
|
${operatorInstructions}` : task?.prompt;
|
|
7207
|
-
return composeDispatchPrompt(withAttachmentManifest(prompt, attachmentManifestMarkdown), {
|
|
7346
|
+
return composeDispatchPrompt(withComposedMethodology(withAttachmentManifest(prompt, attachmentManifestMarkdown), task, log2, taskId), {
|
|
7208
7347
|
repo: task?.repo,
|
|
7209
7348
|
knowledgeContextMarkdown
|
|
7210
7349
|
});
|
|
@@ -7214,6 +7353,7 @@ var init_task_prompt = __esm({
|
|
|
7214
7353
|
"../../scripts/virtual-office/code-runner/task-prompt.mjs"() {
|
|
7215
7354
|
"use strict";
|
|
7216
7355
|
init_dispatch_onboarding();
|
|
7356
|
+
init_methodology_composer();
|
|
7217
7357
|
ALLOW_MISSING_KNOWLEDGE_CONTEXT_ENV = "VO_CODE_RUNNER_ALLOW_MISSING_KNOWLEDGE_CONTEXT";
|
|
7218
7358
|
}
|
|
7219
7359
|
});
|
|
@@ -9763,7 +9903,21 @@ var init_control_server = __esm({
|
|
|
9763
9903
|
// ../../scripts/virtual-office/code-runner/effort-mode-config.mjs
|
|
9764
9904
|
function resolveEffortMode(mode) {
|
|
9765
9905
|
const normalized = String(mode || "").trim().toLowerCase();
|
|
9766
|
-
|
|
9906
|
+
const canonical = LEGACY_MODE_ALIASES[normalized] || normalized;
|
|
9907
|
+
return EFFORT_MODE_CONFIG[canonical] || EFFORT_MODE_CONFIG[DEFAULT_MODE];
|
|
9908
|
+
}
|
|
9909
|
+
function resolveDefaultBudgetUsd(env2 = {}) {
|
|
9910
|
+
const raw = env2?.[DEFAULT_BUDGET_USD_ENV];
|
|
9911
|
+
if (raw === void 0 || raw === null) return null;
|
|
9912
|
+
const parsed = Number(String(raw).trim());
|
|
9913
|
+
if (!Number.isFinite(parsed) || parsed <= 0) return null;
|
|
9914
|
+
return parsed;
|
|
9915
|
+
}
|
|
9916
|
+
function resolveDispatchBudgetUsd({ taskBudgetUsd, env: env2 = {} } = {}) {
|
|
9917
|
+
if (typeof taskBudgetUsd === "number" && Number.isFinite(taskBudgetUsd)) {
|
|
9918
|
+
return taskBudgetUsd;
|
|
9919
|
+
}
|
|
9920
|
+
return resolveDefaultBudgetUsd(env2);
|
|
9767
9921
|
}
|
|
9768
9922
|
function composeEffortPrompt(basePrompt, effortConfig) {
|
|
9769
9923
|
const parts = [];
|
|
@@ -9780,15 +9934,16 @@ ${effortConfig.multiAgentInstruction}
|
|
|
9780
9934
|
parts.push(String(basePrompt || "").trim());
|
|
9781
9935
|
return parts.join("\n");
|
|
9782
9936
|
}
|
|
9783
|
-
var RED_TEAM_DIRECTIVE, EFFORT_MODE_CONFIG, DEFAULT_MODE;
|
|
9937
|
+
var RED_TEAM_DIRECTIVE, DEFAULT_BUDGET_USD_ENV, EFFORT_MODE_CONFIG, DEFAULT_MODE, LEGACY_MODE_ALIASES;
|
|
9784
9938
|
var init_effort_mode_config = __esm({
|
|
9785
9939
|
"../../scripts/virtual-office/code-runner/effort-mode-config.mjs"() {
|
|
9786
9940
|
"use strict";
|
|
9787
9941
|
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.";
|
|
9942
|
+
DEFAULT_BUDGET_USD_ENV = "VO_CODE_RUNNER_DEFAULT_BUDGET_USD";
|
|
9788
9943
|
EFFORT_MODE_CONFIG = {
|
|
9789
9944
|
fast: {
|
|
9790
9945
|
tier: "cheap",
|
|
9791
|
-
maxBudgetUsd:
|
|
9946
|
+
maxBudgetUsd: null,
|
|
9792
9947
|
permissionMode: "acceptEdits",
|
|
9793
9948
|
maxTurns: 80,
|
|
9794
9949
|
thinkingDirective: RED_TEAM_DIRECTIVE,
|
|
@@ -9796,7 +9951,7 @@ var init_effort_mode_config = __esm({
|
|
|
9796
9951
|
},
|
|
9797
9952
|
standard: {
|
|
9798
9953
|
tier: "mid",
|
|
9799
|
-
maxBudgetUsd:
|
|
9954
|
+
maxBudgetUsd: null,
|
|
9800
9955
|
permissionMode: "acceptEdits",
|
|
9801
9956
|
maxTurns: 200,
|
|
9802
9957
|
thinkingDirective: RED_TEAM_DIRECTIVE,
|
|
@@ -9804,7 +9959,7 @@ var init_effort_mode_config = __esm({
|
|
|
9804
9959
|
},
|
|
9805
9960
|
deep: {
|
|
9806
9961
|
tier: "best",
|
|
9807
|
-
maxBudgetUsd:
|
|
9962
|
+
maxBudgetUsd: null,
|
|
9808
9963
|
permissionMode: "acceptEdits",
|
|
9809
9964
|
maxTurns: 300,
|
|
9810
9965
|
thinkingDirective: `Think step-by-step. Verify assumptions against source code. Check edge cases. ${RED_TEAM_DIRECTIVE}`,
|
|
@@ -9812,15 +9967,15 @@ var init_effort_mode_config = __esm({
|
|
|
9812
9967
|
},
|
|
9813
9968
|
ultra: {
|
|
9814
9969
|
tier: "best",
|
|
9815
|
-
maxBudgetUsd:
|
|
9970
|
+
maxBudgetUsd: null,
|
|
9816
9971
|
permissionMode: "acceptEdits",
|
|
9817
9972
|
maxTurns: 500,
|
|
9818
9973
|
thinkingDirective: `Think step-by-step. Exhaustively verify every assumption against source code and documentation. ${RED_TEAM_DIRECTIVE}`,
|
|
9819
9974
|
multiAgentInstruction: "If this task needs multiple phases (research, build, verify), propose a plan first."
|
|
9820
9975
|
},
|
|
9821
|
-
|
|
9976
|
+
marathon: {
|
|
9822
9977
|
tier: "best",
|
|
9823
|
-
maxBudgetUsd:
|
|
9978
|
+
maxBudgetUsd: null,
|
|
9824
9979
|
permissionMode: "acceptEdits",
|
|
9825
9980
|
maxTurns: 800,
|
|
9826
9981
|
thinkingDirective: `Think step-by-step. Exhaustively verify every assumption against source code and documentation. Build worked examples to validate correctness. ${RED_TEAM_DIRECTIVE}`,
|
|
@@ -9828,6 +9983,7 @@ var init_effort_mode_config = __esm({
|
|
|
9828
9983
|
}
|
|
9829
9984
|
};
|
|
9830
9985
|
DEFAULT_MODE = "standard";
|
|
9986
|
+
LEGACY_MODE_ALIASES = { ultracode: "marathon" };
|
|
9831
9987
|
}
|
|
9832
9988
|
});
|
|
9833
9989
|
|
|
@@ -11024,7 +11180,12 @@ async function resolveEffortDispatch({ client, task, agent = "claude", env: env2
|
|
|
11024
11180
|
permissionMode: env2.VO_CODE_RUNNER_PERMISSION_MODE || effortConfig.permissionMode,
|
|
11025
11181
|
maxTurns: typeof task.max_turns === "number" ? task.max_turns : applying ? decision.maxTurns : effortConfig.maxTurns,
|
|
11026
11182
|
effort,
|
|
11027
|
-
|
|
11183
|
+
// Default dollar ceilings are OFF (2026-08-13). Only an EXPLICIT per-task
|
|
11184
|
+
// budget — or the VO_CODE_RUNNER_DEFAULT_BUDGET_USD override a BYO-API-key
|
|
11185
|
+
// operator sets — produces a `--max-budget-usd` flag. The router's dollar
|
|
11186
|
+
// rung is a default too, so it is suppressed with the rest; the router
|
|
11187
|
+
// still governs tier, effort, and maxTurns (the real runaway bound).
|
|
11188
|
+
maxBudgetUsd: resolveDispatchBudgetUsd({ taskBudgetUsd: task.max_budget_usd, env: env2 }),
|
|
11028
11189
|
prompt: composeEffortPrompt(basePrompt, effortConfig),
|
|
11029
11190
|
routerDecision: decision ? toPersistedRouterDecision(decision, model) : null
|
|
11030
11191
|
};
|
|
@@ -13352,7 +13513,7 @@ async function processOneTask(client, task, cfg, runnerInstanceId, swarmAdmissio
|
|
|
13352
13513
|
const sandbox = resolveRunnerSandbox(process.env, sel.agent);
|
|
13353
13514
|
await safeProgress(client, id, runnerStagePatch(
|
|
13354
13515
|
"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}` : ""}` : ""})`,
|
|
13516
|
+
`${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
13517
|
routerDecision ? { router_decision: routerDecision } : {}
|
|
13357
13518
|
));
|
|
13358
13519
|
const cap = typeof attemptBudgetUsd === "number" ? attemptBudgetUsd : resolveCodeDispatchCapUsd();
|