@algosuite/vo-mcp 0.2.0-beta.63 → 0.2.0-beta.64
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 +71 -32
- package/dist/runner-cli.js.map +4 -4
- package/dist/runner-supervisor.js +63 -32
- package/dist/runner-supervisor.js.map +4 -4
- package/package.json +1 -1
package/dist/runner-cli.js
CHANGED
|
@@ -3407,6 +3407,72 @@ var init_installation_token = __esm({
|
|
|
3407
3407
|
}
|
|
3408
3408
|
});
|
|
3409
3409
|
|
|
3410
|
+
// ../../scripts/virtual-office/code-runner/control-plane-heartbeat-body.mjs
|
|
3411
|
+
function buildRunnerHeartbeatBody({
|
|
3412
|
+
runnerId,
|
|
3413
|
+
runnerInstanceId,
|
|
3414
|
+
operatorId,
|
|
3415
|
+
uptimeSec,
|
|
3416
|
+
activeTasks,
|
|
3417
|
+
maxConcurrency,
|
|
3418
|
+
effectiveConcurrency,
|
|
3419
|
+
measuredTaskSlots,
|
|
3420
|
+
measuredCpuSlots,
|
|
3421
|
+
measuredMemorySlots,
|
|
3422
|
+
version,
|
|
3423
|
+
daemonVersion,
|
|
3424
|
+
nodeVersion,
|
|
3425
|
+
defaultAgent,
|
|
3426
|
+
supervisorInstanceId,
|
|
3427
|
+
supervisorVersion,
|
|
3428
|
+
supervisorCapabilities,
|
|
3429
|
+
servedRepos,
|
|
3430
|
+
servedOperators,
|
|
3431
|
+
availableAgents,
|
|
3432
|
+
accountUsage,
|
|
3433
|
+
availableLocalModels,
|
|
3434
|
+
prepared_job_shadow: preparedJobShadow
|
|
3435
|
+
} = {}) {
|
|
3436
|
+
const body = { runner_id: runnerId, ...preparedJobShadow ? { prepared_job_shadow: preparedJobShadow } : {} };
|
|
3437
|
+
if (runnerInstanceId) body.runner_instance_id = runnerInstanceId;
|
|
3438
|
+
if (operatorId) body.operator_id = operatorId;
|
|
3439
|
+
if (typeof uptimeSec === "number") body.uptime_sec = uptimeSec;
|
|
3440
|
+
if (typeof activeTasks === "number") body.active_tasks = activeTasks;
|
|
3441
|
+
if (typeof maxConcurrency === "number") body.max_concurrency = maxConcurrency;
|
|
3442
|
+
if (typeof effectiveConcurrency === "number") body.effective_concurrency = effectiveConcurrency;
|
|
3443
|
+
if (typeof measuredTaskSlots === "number") body.measured_task_slots = measuredTaskSlots;
|
|
3444
|
+
if (typeof measuredCpuSlots === "number") body.measured_cpu_slots = measuredCpuSlots;
|
|
3445
|
+
if (typeof measuredMemorySlots === "number") body.measured_memory_slots = measuredMemorySlots;
|
|
3446
|
+
if (version) body.version = version;
|
|
3447
|
+
if (daemonVersion) body.daemon_version = daemonVersion;
|
|
3448
|
+
if (nodeVersion) body.node_version = nodeVersion;
|
|
3449
|
+
if (defaultAgent) body.default_agent = defaultAgent;
|
|
3450
|
+
if (supervisorInstanceId) body.supervisor_instance_id = supervisorInstanceId;
|
|
3451
|
+
if (supervisorVersion) body.supervisor_version = supervisorVersion;
|
|
3452
|
+
if (Array.isArray(supervisorCapabilities) && supervisorCapabilities.length > 0) {
|
|
3453
|
+
body.supervisor_capabilities = supervisorCapabilities;
|
|
3454
|
+
}
|
|
3455
|
+
if (Array.isArray(servedRepos) && servedRepos.length > 0) body.served_repos = servedRepos;
|
|
3456
|
+
if (Array.isArray(servedOperators) && servedOperators.length > 0) {
|
|
3457
|
+
body.served_operator_ids = servedOperators;
|
|
3458
|
+
}
|
|
3459
|
+
if (Array.isArray(availableAgents) && availableAgents.length > 0) {
|
|
3460
|
+
body.available_agents = availableAgents;
|
|
3461
|
+
}
|
|
3462
|
+
if (Array.isArray(accountUsage) && accountUsage.length > 0) {
|
|
3463
|
+
body.account_usage = accountUsage;
|
|
3464
|
+
}
|
|
3465
|
+
if (Array.isArray(availableLocalModels) && availableLocalModels.length > 0) {
|
|
3466
|
+
body.available_local_models = availableLocalModels;
|
|
3467
|
+
}
|
|
3468
|
+
return body;
|
|
3469
|
+
}
|
|
3470
|
+
var init_control_plane_heartbeat_body = __esm({
|
|
3471
|
+
"../../scripts/virtual-office/code-runner/control-plane-heartbeat-body.mjs"() {
|
|
3472
|
+
"use strict";
|
|
3473
|
+
}
|
|
3474
|
+
});
|
|
3475
|
+
|
|
3410
3476
|
// ../../scripts/virtual-office/code-runner/control-plane-promote.mjs
|
|
3411
3477
|
async function promoteDraftPrRequest(req, prNumber, automationContext, onUnauthorized = () => {
|
|
3412
3478
|
}) {
|
|
@@ -4083,38 +4149,8 @@ function createControlPlaneClient({
|
|
|
4083
4149
|
* authenticated operator so the web shows a TRUE "runner online" signal.
|
|
4084
4150
|
* Best-effort caller; throws on 401/non-ok so the daemon can log + retry.
|
|
4085
4151
|
*/
|
|
4086
|
-
async postHeartbeat(
|
|
4087
|
-
const body =
|
|
4088
|
-
if (runnerInstanceId2) body.runner_instance_id = runnerInstanceId2;
|
|
4089
|
-
if (operatorId) body.operator_id = operatorId;
|
|
4090
|
-
if (typeof uptimeSec === "number") body.uptime_sec = uptimeSec;
|
|
4091
|
-
if (typeof activeTasks === "number") body.active_tasks = activeTasks;
|
|
4092
|
-
if (typeof maxConcurrency === "number") body.max_concurrency = maxConcurrency;
|
|
4093
|
-
if (typeof effectiveConcurrency === "number") body.effective_concurrency = effectiveConcurrency;
|
|
4094
|
-
if (typeof measuredTaskSlots === "number") body.measured_task_slots = measuredTaskSlots;
|
|
4095
|
-
if (typeof measuredCpuSlots === "number") body.measured_cpu_slots = measuredCpuSlots;
|
|
4096
|
-
if (typeof measuredMemorySlots === "number") body.measured_memory_slots = measuredMemorySlots;
|
|
4097
|
-
if (version) body.version = version;
|
|
4098
|
-
if (daemonVersion) body.daemon_version = daemonVersion;
|
|
4099
|
-
if (defaultAgent) body.default_agent = defaultAgent;
|
|
4100
|
-
if (supervisorInstanceId) body.supervisor_instance_id = supervisorInstanceId;
|
|
4101
|
-
if (supervisorVersion) body.supervisor_version = supervisorVersion;
|
|
4102
|
-
if (Array.isArray(supervisorCapabilities) && supervisorCapabilities.length > 0) {
|
|
4103
|
-
body.supervisor_capabilities = supervisorCapabilities;
|
|
4104
|
-
}
|
|
4105
|
-
if (Array.isArray(servedRepos) && servedRepos.length > 0) body.served_repos = servedRepos;
|
|
4106
|
-
if (Array.isArray(servedOperators) && servedOperators.length > 0) {
|
|
4107
|
-
body.served_operator_ids = servedOperators;
|
|
4108
|
-
}
|
|
4109
|
-
if (Array.isArray(availableAgents) && availableAgents.length > 0) {
|
|
4110
|
-
body.available_agents = availableAgents;
|
|
4111
|
-
}
|
|
4112
|
-
if (Array.isArray(accountUsage) && accountUsage.length > 0) {
|
|
4113
|
-
body.account_usage = accountUsage;
|
|
4114
|
-
}
|
|
4115
|
-
if (Array.isArray(availableLocalModels) && availableLocalModels.length > 0) {
|
|
4116
|
-
body.available_local_models = availableLocalModels;
|
|
4117
|
-
}
|
|
4152
|
+
async postHeartbeat(heartbeat) {
|
|
4153
|
+
const body = buildRunnerHeartbeatBody(heartbeat);
|
|
4118
4154
|
const res = await req("POST", "/api/v1/runner/heartbeat", body, {
|
|
4119
4155
|
timeoutMs: heartbeatTimeoutMs
|
|
4120
4156
|
});
|
|
@@ -4206,6 +4242,7 @@ var init_control_plane_client = __esm({
|
|
|
4206
4242
|
"../../scripts/virtual-office/code-runner/control-plane-client.mjs"() {
|
|
4207
4243
|
"use strict";
|
|
4208
4244
|
init_installation_token();
|
|
4245
|
+
init_control_plane_heartbeat_body();
|
|
4209
4246
|
init_control_plane_promote();
|
|
4210
4247
|
init_control_plane_task_list();
|
|
4211
4248
|
init_control_plane_resume();
|
|
@@ -10230,6 +10267,7 @@ function makeLoopTicks({
|
|
|
10230
10267
|
const accountUsage = getAccountUsage();
|
|
10231
10268
|
const version = String(env2.VO_CODE_RUNNER_VERSION || "").trim().slice(0, 40);
|
|
10232
10269
|
const daemonVersion = String(env2.VO_CODE_RUNNER_DAEMON_VERSION || "").trim().slice(0, 40);
|
|
10270
|
+
const nodeVersion = String(process.version || "").trim().slice(0, 40);
|
|
10233
10271
|
const supervisorInstanceId = String(env2.VO_RUNNER_SUPERVISOR_INSTANCE_ID || "").trim();
|
|
10234
10272
|
const supervisorVersion = String(env2.VO_RUNNER_SUPERVISOR_VERSION || "").trim().slice(0, 40);
|
|
10235
10273
|
const supervisorCapabilities = String(env2.VO_RUNNER_SUPERVISOR_CAPABILITIES || "").split(",").map((value) => value.trim()).filter(Boolean).slice(0, 8);
|
|
@@ -10241,6 +10279,7 @@ function makeLoopTicks({
|
|
|
10241
10279
|
...runnerInstanceId ? { runnerInstanceId } : {},
|
|
10242
10280
|
...version ? { version } : {},
|
|
10243
10281
|
...daemonVersion ? { daemonVersion } : {},
|
|
10282
|
+
...nodeVersion ? { nodeVersion } : {},
|
|
10244
10283
|
...cfg.agent ? { defaultAgent: cfg.agent } : {},
|
|
10245
10284
|
...supervisorInstanceId ? { supervisorInstanceId } : {},
|
|
10246
10285
|
...supervisorVersion ? { supervisorVersion } : {},
|