@algosuite/vo-mcp 0.2.0-beta.59 → 0.2.0-beta.60
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 +210 -52
- package/dist/cli.js.map +4 -4
- package/dist/index.js +184 -42
- package/dist/index.js.map +4 -4
- package/dist/runner-cli.js +21 -8
- package/dist/runner-cli.js.map +3 -3
- package/package.json +1 -1
package/dist/runner-cli.js
CHANGED
|
@@ -16056,12 +16056,29 @@ function loadCodeRunnerConfig(env2 = process.env, { log: log2 = () => {
|
|
|
16056
16056
|
// drafts; the repair that landed (#9984) cost $2.36. Ceiling/override behaviour unchanged.
|
|
16057
16057
|
watchRepairBudgetUsd: Math.max(0.25, Math.min(10, Number(env2.VO_CODE_RUNNER_REPAIR_BUDGET_USD ?? 5) || 5)),
|
|
16058
16058
|
watchIntervalSec: Math.max(30, Number(env2.VO_CODE_RUNNER_WATCH_SEC ?? 60) || 60),
|
|
16059
|
+
// See the merge-ownership table at the top of this file. Two flags, two
|
|
16060
|
+
// owners; the GitHub one is strict opt-in so it can never win by default.
|
|
16059
16061
|
armAutoMerge: env2.VO_CODE_RUNNER_ARM_AUTOMERGE !== "0",
|
|
16062
|
+
armGhAutoMerge: env2.VO_CODE_RUNNER_ARM_GH_AUTOMERGE === "1",
|
|
16060
16063
|
controlEnabled: env2.VO_CODE_RUNNER_CONTROL !== "0",
|
|
16061
16064
|
controlPort: Math.max(1, Number(env2.VO_CODE_RUNNER_CONTROL_PORT ?? 7787) || 7787),
|
|
16062
16065
|
appOrigin: env2.VO_APP_ORIGIN || "https://algosuite.ai"
|
|
16063
16066
|
};
|
|
16064
16067
|
}
|
|
16068
|
+
function mergeOwner(cfg) {
|
|
16069
|
+
return cfg && cfg.armGhAutoMerge ? "github-auto" : "watcher-gated";
|
|
16070
|
+
}
|
|
16071
|
+
function describeMergeOwnership(cfg, { watchCyclesEnabled = false, once: once2 = false } = {}) {
|
|
16072
|
+
const ownerLine = mergeOwner(cfg) === "github-auto" ? "merge-owner=github-auto \u2014 publish arms `gh pr merge --auto` (VO_CODE_RUNNER_ARM_GH_AUTOMERGE=1); GitHub merges on green CI and NO consensus receipt is recorded" : "merge-owner=watcher-gated \u2014 publish does not arm GitHub auto-merge (VO_CODE_RUNNER_ARM_GH_AUTOMERGE=1 to opt in); merges go through the control plane, which records the consensus receipt";
|
|
16073
|
+
let watcherLine = "PR watcher OFF (VO_CODE_RUNNER_WATCH=0)";
|
|
16074
|
+
if (watchCyclesEnabled) {
|
|
16075
|
+
const merge = cfg.armAutoMerge ? "receipt-gated merge enabled" : "merge disabled (VO_CODE_RUNNER_ARM_AUTOMERGE=0)";
|
|
16076
|
+
watcherLine = `PR watcher ON \u2014 auto-fix ${cfg.watchMaxFix}/PR; ${merge}; every ${cfg.watchIntervalSec}s (VO_CODE_RUNNER_WATCH=0 to disable)`;
|
|
16077
|
+
} else if (once2) {
|
|
16078
|
+
watcherLine = "PR watcher bypassed for --once; dispatched PRs remain tracked";
|
|
16079
|
+
}
|
|
16080
|
+
return [ownerLine, watcherLine];
|
|
16081
|
+
}
|
|
16065
16082
|
var parseList;
|
|
16066
16083
|
var init_daemon_config = __esm({
|
|
16067
16084
|
"../../scripts/virtual-office/code-runner/daemon-config.mjs"() {
|
|
@@ -16401,6 +16418,7 @@ async function processOneTask(client, task, cfg, runnerInstanceId, swarmAdmissio
|
|
|
16401
16418
|
return;
|
|
16402
16419
|
}
|
|
16403
16420
|
await safeProgress(client, id, runnerStagePatch("opening_pr", `opening PR for ${files.length} changed file(s)`));
|
|
16421
|
+
log(`task ${id}: publishing with merge-owner=${mergeOwner(cfg)}`);
|
|
16404
16422
|
const closesSource = publicationTarget.supersedesPrNumber ? `
|
|
16405
16423
|
|
|
16406
16424
|
Closes #${publicationTarget.supersedesPrNumber}` : "";
|
|
@@ -16411,8 +16429,8 @@ Closes #${publicationTarget.supersedesPrNumber}` : "";
|
|
|
16411
16429
|
githubToken,
|
|
16412
16430
|
allowAmbientGithubFallback: cfg.allowAmbientGithub,
|
|
16413
16431
|
draft: partial,
|
|
16414
|
-
armAutoMerge:
|
|
16415
|
-
// watcher waits for green CI, then uses exact-SHA
|
|
16432
|
+
armAutoMerge: cfg.armGhAutoMerge,
|
|
16433
|
+
// default OFF: the watcher waits for green CI, then uses the exact-SHA receipt-gated merge
|
|
16416
16434
|
...publicationTarget,
|
|
16417
16435
|
deferSupersededPrCleanup: true
|
|
16418
16436
|
});
|
|
@@ -16520,12 +16538,7 @@ async function main({ env: env2 = process.env, once: once2 = false } = {}) {
|
|
|
16520
16538
|
`up as ${cfg.runnerId} \u2192 ${env2.VO_CONTROL_PLANE_URL} (agent ${cfg.agent} [${cfg.runnerBin}], concurrency ${capacityController.current()}/${cfg.maxConcurrency}, poll ${cfg.pollSec}s, once=${once2})`
|
|
16521
16539
|
);
|
|
16522
16540
|
for (const line of describeClaimScoping(cfg, env2)) log(line);
|
|
16523
|
-
log(
|
|
16524
|
-
cfg.armAutoMerge ? "PR auto-merge arming ON for complete PRs (default; VO_CODE_RUNNER_ARM_AUTOMERGE=0 to disable)" : "PR auto-merge arming OFF (VO_CODE_RUNNER_ARM_AUTOMERGE=0)"
|
|
16525
|
-
);
|
|
16526
|
-
log(
|
|
16527
|
-
watchCyclesEnabled ? `PR watcher ON \u2014 auto-fix ${cfg.watchMaxFix}/PR; ${cfg.armAutoMerge ? "receipt-gated merge enabled" : "merge disabled"}; every ${cfg.watchIntervalSec}s (VO_CODE_RUNNER_WATCH=0 to disable)` : once2 ? "PR watcher bypassed for --once; dispatched PRs remain tracked" : "PR watcher OFF (VO_CODE_RUNNER_WATCH=0)"
|
|
16528
|
-
);
|
|
16541
|
+
for (const line of describeMergeOwnership(cfg, { watchCyclesEnabled, once: once2 })) log(line);
|
|
16529
16542
|
const runWatch = makeWatchRunner({
|
|
16530
16543
|
client,
|
|
16531
16544
|
log,
|