Run daemon on packaged Bare runtime
Rolling release / release (push) Canceled after 14m9s
CI / verify (push) Canceled after 14m18s

This commit is contained in:
2026-09-11 15:52:53 -04:00
parent 562f1a6316
commit a3314db1e9
30 changed files with 2953 additions and 65 deletions
+5 -2
View File
@@ -3,9 +3,12 @@ import fs from 'node:fs';
import path from 'node:path';
const harnessPath = process.env.JARVIS_HARNESS_PATH || path.resolve(new URL('../vendor/agent-harness', import.meta.url).pathname);
// Bare's module loader accepts the maintained Holepunch compatibility map. The
// second argument is essential for the copied CommonJS harness: it maps its
// Node builtin requests to bare-* modules without creating a second runtime.
const require = createRequire(import.meta.url);
process.env.QVAC_CONFIG_PATH ||= path.resolve(new URL('../qvac.config.json', import.meta.url).pathname);
const Agent = require(path.join(harnessPath, 'index.js'));
const Agent = require(path.join(harnessPath, 'index.js'), { with: { imports: 'bare-node-runtime/imports' } });
let loadPromise = null;
let ownerCount = 0;
@@ -33,7 +36,7 @@ export function sdkPackagePath() {
}
export function assertSdkVersion() {
const sdkPackage = require(sdkPackagePath());
const sdkPackage = require(sdkPackagePath(), { with: { imports: 'bare-node-runtime/imports' } });
if (!/^0\.19\./.test(sdkPackage.version)) {
throw new Error(`Jarvis requires vendored @qvac/sdk in the 0.19.x series; found ${sdkPackage.version}`);
}