@algosuite/vo-mcp 0.2.0-beta.54 → 0.2.0-beta.55

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.
@@ -8350,6 +8350,15 @@ function classifyTaskShape(task) {
8350
8350
  }
8351
8351
  return "feature";
8352
8352
  }
8353
+ function declaredStakes(prompt) {
8354
+ const m = GOVERNED_STAKES_DECLARATION_RE.exec(prompt);
8355
+ if (!m) return void 0;
8356
+ const remainder = m[1].trim();
8357
+ if (remainder.length === 0) return void 0;
8358
+ if (/^none\b/iu.test(remainder)) return null;
8359
+ const value = remainder.split(".")[0].trim().slice(0, 60);
8360
+ return value.length > 0 ? value : void 0;
8361
+ }
8353
8362
  function stripDispatchBoilerplate(text) {
8354
8363
  const contractLines = HEADLESS_EXECUTION_CONTRACT.split("\n").map((l) => l.trim()).filter((l) => l.length >= 20);
8355
8364
  return String(text ?? "").split("\n").map((rawLine) => {
@@ -8365,6 +8374,8 @@ function stripDispatchBoilerplate(text) {
8365
8374
  }
8366
8375
  function matchGovernedStakes(task) {
8367
8376
  const prompt = stripDispatchBoilerplate(String(task?.prompt || ""));
8377
+ const declared = declaredStakes(prompt);
8378
+ if (declared !== void 0) return declared;
8368
8379
  const m = GOVERNED_STAKES_PATTERN.exec(prompt);
8369
8380
  return m ? m[0] : null;
8370
8381
  }
@@ -8390,7 +8401,7 @@ function withMethodology(prompt, task) {
8390
8401
 
8391
8402
  ${block}` };
8392
8403
  }
8393
- var UI_ROADMAP_DISPATCH_MARKER, SHAPE_RULES, GOVERNED_STAKES_PATTERN, RESEARCH_WORKFLOW_DIRECTIVE, CONSENSUS_DIRECTIVES, UNIVERSAL_DIRECTIVES, SHAPE_DIRECTIVES;
8404
+ var UI_ROADMAP_DISPATCH_MARKER, SHAPE_RULES, GOVERNED_STAKES_PATTERN, GOVERNED_STAKES_DECLARATION_RE, RESEARCH_WORKFLOW_DIRECTIVE, CONSENSUS_DIRECTIVES, UNIVERSAL_DIRECTIVES, SHAPE_DIRECTIVES;
8394
8405
  var init_methodology_composer = __esm({
8395
8406
  "../../scripts/virtual-office/code-runner/methodology-composer.mjs"() {
8396
8407
  "use strict";
@@ -8434,6 +8445,7 @@ var init_methodology_composer = __esm({
8434
8445
  }
8435
8446
  ];
8436
8447
  GOVERNED_STAKES_PATTERN = /\b(FERPA|IDOR|HIPAA|PII|privacy|security|authz|authorization|access[- ]control|permission[- ]denied|IRS|tax|§\s?\d|payroll|1099|W-2|MACRS|depreciation|billing|payment|refund|ledger|journal entr|reconcil|compliance|IEP\b|§?504\b|safeguard|governed fact)\b/iu;
8448
+ GOVERNED_STAKES_DECLARATION_RE = /\bgoverned stakes:[ \t]*([^\n]{1,120})/iu;
8437
8449
  RESEARCH_WORKFLOW_DIRECTIVE = "For a genuinely open research question (not a single-file or single-log lookup \u2014 those need no harness), use the office research harness rather than ad-hoc browsing: for an open-web question run the workflow at ~/.claude/workflows/storm-deep-research-budget.mjs (Workflow tool, scriptPath, the question as args); for a question about THIS repo run ~/.claude/workflows/deep-research-internal-budget.mjs. Use ONLY the -budget variants (sonnet investigators, one opus synthesis) and stay inside this task budget. If the Workflow tool or those scripts are unavailable on this host, say so in the report and run the same four stages yourself \u2014 perspectives, WebSearch/WebFetch investigation, an adversarial pass that tries to REFUTE each key claim, then a cited write-up \u2014 with at most cheap-tier subagents; never a Fable/Opus fan-out.";
8438
8450
  CONSENSUS_DIRECTIVES = [
8439
8451
  "This task touches governed or high-stakes facts. BEFORE building tests around your central domain claim, run a multi-model consensus check on that claim (vo-mcp: vo_consensus_judgment or vo_verify_answer) and paste the verdict AND the tool result's receipt_id (a UUID; present when the cloud moat verified) into the PR body as `receipt id: <uuid>` \u2014 never invent one, and if the result has no receipt_id say so. A wrong governed fact caught at the claim stage costs one panel call; caught at the PR stage it costs the whole task; caught in production it costs a user.",
@@ -10279,6 +10291,31 @@ var init_agent_unfixable_checks = __esm({
10279
10291
  }
10280
10292
  });
10281
10293
 
10294
+ // ../../scripts/virtual-office/code-runner/check-run-latest.mjs
10295
+ function latestCheckRunsByName(rollup) {
10296
+ if (!Array.isArray(rollup)) return [];
10297
+ const passthrough = [];
10298
+ const latest = /* @__PURE__ */ new Map();
10299
+ for (const entry of rollup) {
10300
+ if (!entry || typeof entry !== "object") continue;
10301
+ const isCheckRun = Boolean(String(entry.conclusion || "")) || Boolean(entry.status);
10302
+ const name = isCheckRun && entry.name ? String(entry.name) : "";
10303
+ if (!name) {
10304
+ passthrough.push(entry);
10305
+ continue;
10306
+ }
10307
+ const startedAt = String(entry.startedAt || entry.started_at || "");
10308
+ const held = latest.get(name);
10309
+ if (!held || startedAt >= held.startedAt) latest.set(name, { startedAt, entry });
10310
+ }
10311
+ return [...passthrough, ...[...latest.values()].map((h) => h.entry)];
10312
+ }
10313
+ var init_check_run_latest = __esm({
10314
+ "../../scripts/virtual-office/code-runner/check-run-latest.mjs"() {
10315
+ "use strict";
10316
+ }
10317
+ });
10318
+
10282
10319
  // ../../scripts/virtual-office/code-runner/ci-repair-evidence.mjs
10283
10320
  function extractWorkflowRunIds(links = []) {
10284
10321
  const ids = [];
@@ -10639,8 +10676,10 @@ async function adoptPrOpenedTasks(tasks, {
10639
10676
  now = () => Date.now(),
10640
10677
  servedRepos = [],
10641
10678
  servedOperators = [],
10679
+ // $5 mirrors pr-watcher.mjs / daemon-config.mjs after the 2026-08-21/22 `error_max_budget_usd`
10680
+ // kills (#9967 $2.41, #9968/#9969 ~$1.65); makeWatchRunner always passes its own value.
10642
10681
  repairChainMax = 3,
10643
- repairBudgetUsd = 1
10682
+ repairBudgetUsd = 5
10644
10683
  }) {
10645
10684
  const repos = new Set(servedRepos.map((repo) => repo.toLowerCase()));
10646
10685
  const operators = new Set(servedOperators);
@@ -10914,7 +10953,7 @@ import { homedir as homedir9 } from "node:os";
10914
10953
  import { join as join14 } from "node:path";
10915
10954
  function parsePrCiStatus(view) {
10916
10955
  const state = (view && typeof view.state === "string" ? view.state : "UNKNOWN").toUpperCase();
10917
- const rollup = view && Array.isArray(view.statusCheckRollup) ? view.statusCheckRollup : [];
10956
+ const rollup = latestCheckRunsByName(view && Array.isArray(view.statusCheckRollup) ? view.statusCheckRollup : []);
10918
10957
  const failedChecks = [];
10919
10958
  const failedCheckLinks = [];
10920
10959
  let pending = false;
@@ -11163,7 +11202,11 @@ function makeWatchRunner({
11163
11202
  servedRepos = [],
11164
11203
  servedOperators = [],
11165
11204
  repairChainMax = 3,
11166
- repairBudgetUsd = 1,
11205
+ // $5, not $1: measured kills 2026-08-21/22 — #9967 ($2.41), #9968/#9969 (~$1.65 each) died
11206
+ // `error_max_budget_usd` with the fix finished but unpublished; the repair that landed (#9984)
11207
+ // cost $2.36. The daemon normally passes cfg.watchRepairBudgetUsd (daemon-config.mjs), which
11208
+ // carries the same default; this is the fallback when the watcher is built without one.
11209
+ repairBudgetUsd = 5,
11167
11210
  allowAmbientGithub = false,
11168
11211
  // Default ON (operator directive 2026-07-24); VO_CODE_RUNNER_ARM_AUTOMERGE=0 opts out.
11169
11212
  autoMergeEnabled = process.env.VO_CODE_RUNNER_ARM_AUTOMERGE !== "0"
@@ -11245,6 +11288,7 @@ var init_pr_watcher = __esm({
11245
11288
  "../../scripts/virtual-office/code-runner/pr-watcher.mjs"() {
11246
11289
  "use strict";
11247
11290
  init_agent_unfixable_checks();
11291
+ init_check_run_latest();
11248
11292
  init_ci_repair_evidence();
11249
11293
  init_pr_watcher_failure_confirmation();
11250
11294
  init_superseded_pr_source();
@@ -14275,7 +14319,7 @@ async function finalizePublishedPr({
14275
14319
  root_pr_number: pr.prNumber,
14276
14320
  attempt: 0,
14277
14321
  max_attempts: cfg.watchRepairChainMax ?? 3,
14278
- per_attempt_budget_usd: cfg.watchRepairBudgetUsd ?? 1
14322
+ per_attempt_budget_usd: cfg.watchRepairBudgetUsd ?? 5
14279
14323
  },
14280
14324
  // A CI-fix task, or a DRAFT published only because the local overlap gate
14281
14325
  // blocked it, must not spend repair attempts: the overlap resolves when the
@@ -14312,7 +14356,7 @@ async function finalizePublishedPr({
14312
14356
  root_pr_number: pr.prNumber,
14313
14357
  attempt: 0,
14314
14358
  max_attempts: cfg.watchRepairChainMax ?? 3,
14315
- per_attempt_budget_usd: cfg.watchRepairBudgetUsd ?? 1
14359
+ per_attempt_budget_usd: cfg.watchRepairBudgetUsd ?? 5
14316
14360
  },
14317
14361
  ...fixDispatchGuard
14318
14362
  });
@@ -15137,7 +15181,10 @@ function loadCodeRunnerConfig(env2 = process.env, { log: log2 = () => {
15137
15181
  watchEnabled: env2.VO_CODE_RUNNER_WATCH !== "0",
15138
15182
  watchMaxFix: Math.max(0, Number(env2.VO_CODE_RUNNER_WATCH_MAX_FIX ?? 1) || 0),
15139
15183
  watchRepairChainMax: Math.max(1, Math.min(10, Number(env2.VO_CODE_RUNNER_REPAIR_CHAIN_MAX ?? 3) || 3)),
15140
- watchRepairBudgetUsd: Math.max(0.25, Math.min(10, Number(env2.VO_CODE_RUNNER_REPAIR_BUDGET_USD ?? 1) || 1)),
15184
+ // $5 default (2026-08-22): at $1 real repairs died `error_max_budget_usd` a few percent short —
15185
+ // #9967 ($2.41), #9968/#9969 (~$1.65 each) left finished fixes unpublished as dead PARTIAL
15186
+ // drafts; the repair that landed (#9984) cost $2.36. Ceiling/override behaviour unchanged.
15187
+ watchRepairBudgetUsd: Math.max(0.25, Math.min(10, Number(env2.VO_CODE_RUNNER_REPAIR_BUDGET_USD ?? 5) || 5)),
15141
15188
  watchIntervalSec: Math.max(30, Number(env2.VO_CODE_RUNNER_WATCH_SEC ?? 60) || 60),
15142
15189
  armAutoMerge: env2.VO_CODE_RUNNER_ARM_AUTOMERGE !== "0",
15143
15190
  controlEnabled: env2.VO_CODE_RUNNER_CONTROL !== "0",