Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(updater): include feed config in Windows ZIP
xieqiying0e4aae3ae23d
diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 4dab518ad..0615fbd13 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -224,6 +224,10 @@],"icon": "build/icon.ico","extraResources": [+ {+ "from": "resources/app-update.yml",+ "to": "app-update.yml"+ },{"from": "../../target/release/pi-desktop-host-core.exe","to": "bin/pi-desktop-host-core.exe"diff --git a/apps/desktop/resources/app-update.yml b/apps/desktop/resources/app-update.ymlnew file mode 100644index 000000000..d70b7efbf--- /dev/null+++ b/apps/desktop/resources/app-update.yml@@ -0,0 +1,4 @@+provider: github+owner: vastsa+repo: PI-Desktop+updaterCacheDirName: '@pi-desktopdesktop-updater'diff --git a/apps/desktop/test/auto-update.test.mjs b/apps/desktop/test/auto-update.test.mjsindex 37e1eb967..5462c2add 100644--- a/apps/desktop/test/auto-update.test.mjs+++ b/apps/desktop/test/auto-update.test.mjs@@ -253,12 +253,37 @@ test("check-for-updates is reachable from the application menu", () => {}});-test("packaging publishes an electron-updater feed for GitHub Releases", () => {+test("packaging publishes an electron-updater feed for GitHub Releases", async () => {const pkg = JSON.parse(pkgSource);assert.ok(pkg.dependencies["electron-updater"], "electron-updater dependency");assert.equal(pkg.build.publish[0].provider, "github");assert.equal(pkg.build.publish[0].owner, "vastsa");assert.equal(pkg.build.publish[0].repo, "PI-Desktop");+ const windowsUpdateConfigResource = pkg.build.win.extraResources.find(+ ({ from }) => from === "resources/app-update.yml",+ );+ assert.deepEqual(windowsUpdateConfigResource, {+ from: "resources/app-update.yml",+ to: "app-update.yml",+ }, "Windows packages carry the updater config needed by manual ZIP checks");+ const updateConfig = Object.fromEntries(+ (await read("../resources/app-update.yml"))+ .trim()+ .split(/\r?\n/)+ .map((line) => {+ const separator = line.indexOf(":");+ return [+ line.slice(0, separator),+ line.slice(separator + 1).trim().replace(/^['"]|['"]$/g, ""),+ ];+ }),+ );+ assert.deepEqual(updateConfig, {+ provider: pkg.build.publish[0].provider,+ owner: pkg.build.publish[0].owner,+ repo: pkg.build.publish[0].repo,+ updaterCacheDirName: `${pkg.name.replaceAll("/", "")}-updater`,+ });const macTargets = pkg.build.mac.target.map((entry) => entry.target);assert.ok(macTargets.includes("zip"), "mac zip target (Squirrel.Mac feed)");// electron-builder must never self-publish (implicit tag publishing woulddiff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex fe7ac5d70..2385ea16a 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -13746,9 +13746,11 @@ are withdrawn with ADR 0165.setup wizard or administrator prompt, keeps the normal PI-Desktop taskbaridentity/icon, uses the existing application data directory, and reportsupdate preference `manual` by default and effective update mode `manual`.- An available update does not download or run- `PI-Desktop-Setup-<version>.exe`. Relaunch restores sessions from that same- profile.+ Its `resources/app-update.yml` points to the same GitHub feed, so the manual+ check settles as up-to-date or available instead of failing with `ENOENT`.+ When an update is available, Settings offers the Releases page; it does not+ download or run `PI-Desktop-Setup-<version>.exe`. Relaunch restores sessions+ from that same profile.- **Specs linked**: `01-product/01-product-scope.md`,`06-delivery/06-release-runbook.md`, `03-runtime/07-process-model.md`,ADR 0197 / D603