Skip to content

The agent that grows with you

chore(desktop): name the bootstrap cache key and ref policy accurately

kshitijk4poor5912ed81ed94
diff --git a/apps/desktop/electron/bootstrap-runner.ts b/apps/desktop/electron/bootstrap-runner.ts
index d4a443d4af0..05465a84920 100644
--- a/apps/desktop/electron/bootstrap-runner.ts
+++ b/apps/desktop/electron/bootstrap-runner.ts
@@ -220,15 +220,14 @@ function hasExistingGitCheckout(activeRoot) {
}
}
-function cachedScriptPath(hermesHome, commit) {
- return path.join(bootstrapCacheDir(hermesHome), `install-${commit}.${process.platform === 'win32' ? 'ps1' : 'sh'}`)
+function cachedScriptPath(hermesHome, cacheKey) {
+ return path.join(bootstrapCacheDir(hermesHome), `install-${cacheKey}.${process.platform === 'win32' ? 'ps1' : 'sh'}`)
}
function downloadInstallScript(ref, destPath) {
- // Fetch from GitHub raw at the install ref. Normal production builds pass a
- // pinned SHA (immutable). Non-git fallback builds pass an unpinned branch
- // ref so local builds can still bootstrap without pretending the all-zero
- // placeholder is a real GitHub commit.
+ // Fetch from GitHub raw at the install ref: the packaged SHA for a fresh
+ // install, the branch for an existing checkout or a non-git fallback stamp
+ // (never the all-zero placeholder, which is not a real GitHub commit).
const scriptName = installScriptName()
const url = `https://raw.githubusercontent.com/NousResearch/hermes-agent/${ref}/scripts/${scriptName}`