{"record":{"id":"d1119ba4da4bf696","repo":"NousResearch/hermes-agent","slug":"stage-native-deps-get-windows-is-srcversion-b","errorCode":null,"errorMessage":"[stage-native-deps] get-windows is ${srcVersion} but the staged lib/windows.js rewrite was verified against ${GET_WINDOWS_VERSION}. Re-verify the rewrite (STAGED_WINDOWS_JS) against the new version, then update GET_WINDOWS_VERSION.","messagePattern":"\\[stage-native-deps\\] get-windows is (.+?) but the staged lib/windows\\.js rewrite was verified against (.+?)\\. Re-verify the rewrite \\(STAGED_WINDOWS_JS\\) against the new version, then update GET_WINDOWS_VERSION\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/desktop/scripts/stage-native-deps.mjs","lineNumber":439,"sourceCode":" * Per-platform native payload: macOS ships the `main` Swift helper binary\n * (universal, present in every published tarball), Windows the node-pre-gyp\n * prebuilt under lib/binding (downloaded by the package's install script on\n * a Windows host — cross-platform packs already can't happen, see\n * stageNodePtyInto), Linux nothing (it shells out to xprop at runtime).\n */\nconst GET_WINDOWS_VERSION = '9.3.0'\n\nexport function stageGetWindowsInto(\n  srcRoot,\n  destRoot,\n  { platform = process.platform, rebuild } = {}\n) {\n  // The STAGED_WINDOWS_JS rewrite mirrors this exact version's export surface.\n  // A version bump must fail the build here until the rewrite is re-verified —\n  // otherwise it ships stale and fails soft as a generic \"unavailable\".\n  const srcVersion = JSON.parse(readFileSync(join(srcRoot, 'package.json'), 'utf8')).version\n  if (srcVersion !== GET_WINDOWS_VERSION) {\n    throw new Error(\n      `[stage-native-deps] get-windows is ${srcVersion} but the staged lib/windows.js ` +\n        `rewrite was verified against ${GET_WINDOWS_VERSION}. Re-verify the rewrite ` +\n        `(STAGED_WINDOWS_JS) against the new version, then update GET_WINDOWS_VERSION.`\n    )\n  }\n\n  rmSync(destRoot, { recursive: true, force: true })\n  mkdirSync(destRoot, { recursive: true })\n\n  cpSync(join(srcRoot, 'package.json'), join(destRoot, 'package.json'))\n  cpSync(join(srcRoot, 'index.js'), join(destRoot, 'index.js'))\n\n  // lib/*.js only — NOT copyGlobByExt, which recurses into lib/binding and\n  // stages empty dirs for every prebuilt slot (including the darwin one the\n  // tarball bundles on all platforms). Bindings are staged explicitly below.\n  mkdirSync(join(destRoot, 'lib'), { recursive: true })\n  for (const entry of readdirSync(join(srcRoot, 'lib'), { withFileTypes: true })) {\n    if (entry.isFile() && entry.name.endsWith('.js')) {","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/scripts/stage-native-deps.mjs#L421-L457","documentation":"Error \"[stage-native-deps] get-windows is ${srcVersion} but the staged lib/windows.js rewrite was verified against ${GET_WINDOWS_VERSION}. Re-verify the rewrite (STAGED_WINDOWS_JS) against the new version, then update GET_WINDOWS_VERSION.\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/scripts/stage-native-deps.mjs:439 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-verify the staged lib/windows.js rewrite against the new get-windows version and update GET_WINDOWS_VERSION.","Pin get-windows back to the verified version if the rewrite has not been reviewed yet."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}