Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
Revert "fix(desktop): run macOS codesign identifier fixup in afterSign"
Lan2c7c38ce01ff
diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 04b759bc3..0cd319bd0 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -74,7 +74,7 @@},"build": {"appId": "net.aiuo.pi-desktop",- "afterSign": "./scripts/after-sign.mjs",+ "afterPack": "./scripts/after-pack.mjs","productName": "PI-Desktop","directories": {"output": "release"diff --git a/apps/desktop/scripts/after-sign.mjs b/apps/desktop/scripts/after-pack.mjssimilarity index 54%rename from apps/desktop/scripts/after-sign.mjsrename to apps/desktop/scripts/after-pack.mjsindex 9c43eb928..a45d24760 100644--- a/apps/desktop/scripts/after-sign.mjs+++ b/apps/desktop/scripts/after-pack.mjs@@ -1,18 +1,8 @@#!/usr/bin/env node-/**- * Runs after electron-builder finishes signing the macOS bundle.- *- * Doing this in `afterSign` (not `afterPack`) guarantees that every nested- * helper (`PI-Desktop Helper.app`, `... Helper (Renderer).app`, ...) has- * already been adhoc- or Developer-ID-signed. Otherwise `codesign` refuses- * to re-sign the outer `.app` with:- * "code object is not signed at all"- * because some helper's signature was stripped by @electron/rebuild.- */import path from "node:path";import { ensureMacCodesignIdentifier } from "./macos-codesign-identity.mjs";-export default async function afterSign(context) {+export default async function afterPack(context) {if (context.electronPlatformName !== "darwin") return;const appName = context.packager.appInfo.productFilename;const bundleId = context.packager.appInfo.id;diff --git a/apps/desktop/test/macos-codesign-identity.test.mjs b/apps/desktop/test/macos-codesign-identity.test.mjsindex 572729e59..340f913fb 100644--- a/apps/desktop/test/macos-codesign-identity.test.mjs+++ b/apps/desktop/test/macos-codesign-identity.test.mjs@@ -15,10 +15,9 @@ const packageJson = JSON.parse(await readFile(new URL("../package.json", import.meta.url), "utf8"),);-test("packaging binds the macOS codesign identifier after sign", () => {+test("packaging binds the macOS codesign identifier after pack", () => {assert.equal(packageJson.build.appId, MAC_BUNDLE_ID);- assert.equal(packageJson.build.afterSign, "./scripts/after-sign.mjs");- assert.ok(!("afterPack" in packageJson.build));+ assert.equal(packageJson.build.afterPack, "./scripts/after-pack.mjs");});test(