This commit is contained in:
2026-09-11 13:54:10 -04:00
parent 4c81d26274
commit 8f6884ac42
7 changed files with 185 additions and 11 deletions
+8
View File
@@ -85,6 +85,14 @@ export async function qvacRuntimeState() {
return sdk.state();
}
const MASTER_CALLS = new Set(['assessModelFit', 'getSystemResources', 'state', 'heartbeat']);
export async function callQvac(method, input) {
if (!MASTER_CALLS.has(method)) throw new Error(`QVAC method is not exposed through the master: ${method}`);
const sdk = await Agent.engine.ensureInit();
if (typeof sdk[method] !== 'function') throw new Error(`QVAC SDK does not expose ${method}()`);
return input === undefined ? sdk[method]() : sdk[method](input);
}
export function qvacStatus() {
return { ...QVAC_MASTER, owners: ownerCount, loaded: Agent.engine.getLoaded() };
}