Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix: remove macOS first-launch package artifacts

vastsada0707bfd5e1
diff --git a/apps/desktop/PI-Desktop-macOS-open.command b/apps/desktop/PI-Desktop-macOS-open.command
deleted file mode 100755
index 4c18dc6b8..000000000
--- a/apps/desktop/PI-Desktop-macOS-open.command
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-# Open a trusted unsigned PI-Desktop installation on macOS.
-#
-# This helper removes only Apple's quarantine attribute from the known
-# application locations. It never uses sudo and never accepts an arbitrary
-# path, so it cannot be used to clear quarantine from another application.
-
-set -euo pipefail
-
-readonly APP_BUNDLE_NAME="PI-Desktop.app"
-readonly EXPECTED_BUNDLE_ID="net.aiuo.pi-desktop"
-
-show_alert() {
- local title="$1"
- local message="$2"
-
- if ! /usr/bin/osascript - "$title" "$message" <<'APPLESCRIPT' >/dev/null 2>&1
-on run argv
- display alert (item 1 of argv) message (item 2 of argv) as critical
-end run
-APPLESCRIPT
- then
- printf '%s: %s\n' "$title" "$message" >&2
- fi
-}
-
-app_path=""
-app_candidates=("/Applications/${APP_BUNDLE_NAME}")
-if [[ -n "${HOME:-}" ]]; then
- app_candidates+=("${HOME}/Applications/${APP_BUNDLE_NAME}")
-fi
-
-for candidate in "${app_candidates[@]}"; do
- if [[ -d "$candidate" ]]; then
- app_path="$candidate"
- break
- fi
-done
-
-if [[ -z "$app_path" ]]; then
- show_alert \
- "PI-Desktop is not installed" \
- "Drag PI-Desktop.app to Applications, then double-click this helper again."
- exit 1
-fi
-
-bundle_identifier=""
-if [[ -f "$app_path/Contents/Info.plist" ]]; then
- bundle_identifier="$(/usr/bin/plutil -extract CFBundleIdentifier raw -o - "$app_path/Contents/Info.plist" 2>/dev/null || true)"
-fi
-if [[ "$bundle_identifier" != "$EXPECTED_BUNDLE_ID" ]]; then
- show_alert \
- "This is not a PI-Desktop app" \
- "The helper only opens the official PI-Desktop bundle."
- exit 1
-fi
-
-# A downloaded unsigned app can carry quarantine on the bundle and on nested
-# files. Remove only that attribute, preserving every other extended attribute.
-quarantine_attributes="$(/usr/bin/xattr -r -l "$app_path" 2>/dev/null || true)"
-if [[ "$quarantine_attributes" == *"com.apple.quarantine"* ]]; then
- if ! /usr/bin/xattr -r -d com.apple.quarantine "$app_path"; then
- show_alert \
- "PI-Desktop could not be opened" \
- "macOS could not clear the quarantine attribute. Try moving the app to Applications and run this helper again."
- exit 1
- fi
-fi
-
-/usr/bin/open "$app_path"
diff --git a/apps/desktop/PI-Desktop-macOS-opening-help.txt b/apps/desktop/PI-Desktop-macOS-opening-help.txt
deleted file mode 100644
index 43eb64f18..000000000
--- a/apps/desktop/PI-Desktop-macOS-opening-help.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-PI-Desktop macOS first launch
-
-Official GitHub Release builds are Developer ID-signed and notarized. After
-moving PI-Desktop.app to Applications, the app should open without extra steps.
-
-If you are using a local or unsigned build and macOS says the app is damaged
-or does not open, open Terminal and run:
-
-xattr -r -d com.apple.quarantine /Applications/PI-Desktop.app
-
-Use this only for an app obtained from a trusted PI-Desktop source. It removes
-only Apple's quarantine attribute from PI-Desktop.app. Signed and notarized
-builds do not need it.
-
-The macOS ZIP package also includes PI-Desktop-macOS-open.command, which can
-clear the same attribute and launch the app after installation.
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index a3377ff13..d80d4675d 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -173,10 +173,6 @@
"from": "build/tray-icon-mac.png",
"to": "tray-icon-mac.png"
}
- ],
- "extraDistFiles": [
- "PI-Desktop-macOS-open.command",
- "PI-Desktop-macOS-opening-help.txt"
]
},
"dmg": {
diff --git a/apps/desktop/test/packaging-footprint.test.mjs b/apps/desktop/test/packaging-footprint.test.mjs
index 2b3eb47f5..23397c48e 100644
--- a/apps/desktop/test/packaging-footprint.test.mjs
+++ b/apps/desktop/test/packaging-footprint.test.mjs
@@ -1,5 +1,5 @@
import assert from "node:assert/strict";
-import { readFile, stat } from "node:fs/promises";
+import { readFile } from "node:fs/promises";
import test from "node:test";
const packageJson = JSON.parse(
@@ -8,17 +8,6 @@ const packageJson = JSON.parse(
const sharedPackageJson = JSON.parse(
await readFile(new URL("../../../packages/shared/package.json", import.meta.url), "utf8"),
);
-const macOpenFixNote = await readFile(
- new URL("../PI-Desktop-macOS-opening-help.txt", import.meta.url),
- "utf8",
-);
-const macOpenScript = await readFile(
- new URL("../PI-Desktop-macOS-open.command", import.meta.url),
- "utf8",
-);
-const macOpenScriptStat = await stat(
- new URL("../PI-Desktop-macOS-open.command", import.meta.url),
-);
const dmgBackground = await readFile(
new URL("../build/dmg-background.png", import.meta.url),
);
@@ -241,11 +230,13 @@ test("macOS targets follow the native architecture selected by the runner", () =
assert.doesNotMatch(packageJson.scripts["dist:mac"], /--(?:arm64|x64)/);
});
-test("macOS DMG is a two-icon install; ZIP keeps the unsigned helper", () => {
- assert.deepEqual(packageJson.build.mac.extraDistFiles, [
- "PI-Desktop-macOS-open.command",
- "PI-Desktop-macOS-opening-help.txt",
- ]);
+test("macOS DMG remains a two-icon install and artifacts omit first-launch guidance", () => {
+ assert.equal(packageJson.build.mac.extraDistFiles, undefined);
+ assert.doesNotMatch(
+ JSON.stringify(packageJson.build),
+ /PI-Desktop-macOS-open\.command|PI-Desktop-macOS-opening-help\.txt/,
+ "macOS package configuration must not ship first-launch guidance assets",
+ );
assert.equal(packageJson.build.dmg.background, "build/dmg-background.png");
assert.equal(packageJson.build.dmg.icon, "build/icon.icns");
assert.deepEqual(packageJson.build.dmg.window, { width: 720, height: 440 });
@@ -258,7 +249,7 @@ test("macOS DMG is a two-icon install; ZIP keeps the unsigned helper", () => {
assert.doesNotMatch(
JSON.stringify(packageJson.build.dmg.contents),
/PI-Desktop-macOS-open\.command|Open PI-Desktop\.command|opening-help|If app won't open/,
- "the DMG must not expose the unsigned helper or opening note",
+ "the DMG must not expose first-launch guidance assets",
);
assert.deepEqual([...dmgBackground.subarray(0, 8)], [
137, 80, 78, 71, 13, 10, 26, 10,
@@ -270,21 +261,6 @@ test("macOS DMG is a two-icon install; ZIP keeps the unsigned helper", () => {
]);
assert.equal(dmgBackgroundRetina.readUInt32BE(16), 1440);
assert.equal(dmgBackgroundRetina.readUInt32BE(20), 880);
- assert.ok(macOpenScriptStat.mode & 0o111, "opening helper must be executable");
- assert.match(
- macOpenFixNote,
- /xattr -r -d com\.apple\.quarantine \/Applications\/PI-Desktop\.app/,
- );
- assert.match(macOpenFixNote, /trusted PI-Desktop source/);
- assert.match(macOpenFixNote, /Signed and\s+notarized\s+builds do not need/);
- assert.match(macOpenFixNote, /PI-Desktop-macOS-open\.command/);
- assert.match(macOpenScript, /\/Applications\/\$\{APP_BUNDLE_NAME\}/);
- assert.match(macOpenScript, /CFBundleIdentifier/);
- assert.match(macOpenScript, /net\.aiuo\.pi-desktop/);
- assert.match(macOpenScript, /\/usr\/bin\/xattr -r -d com\.apple\.quarantine/);
- assert.match(macOpenScript, /\/usr\/bin\/open/);
- assert.doesNotMatch(macOpenScript, /\bsudo\s+\//);
- assert.doesNotMatch(macOpenScript, /xattr -cr/);
});
test("packaging keeps voice native payloads unpacked and excludes removed PTY payloads", () => {
diff --git a/docs/adr/0204-unsigned-macos-first-launch-helper.md b/docs/adr/0204-unsigned-macos-first-launch-helper.md
index 116a07c92..bd4c2f63c 100644
--- a/docs/adr/0204-unsigned-macos-first-launch-helper.md
+++ b/docs/adr/0204-unsigned-macos-first-launch-helper.md
@@ -1,9 +1,9 @@
# ADR 0204: Explicit Unsigned macOS First-Launch Helper
-- Status: Accepted (amended by D406 / ADR 0232, D450 / ADR 0289, D457 / ADR 0296)
+- Status: Superseded for macOS distribution by D634 / [ADR 0309](0309-remove-macos-first-launch-artifacts.md)
- Date: 2026-09-09
- Deciders: PI-Desktop core
-- Related: D078, D371, D406, D450, D457, E2E-196b, ADR 0289, ADR 0296
+- Related: D078, D371, D406, D450, D457, D634, E2E-196b, ADR 0289, ADR 0296, ADR 0309
## Context
diff --git a/docs/adr/0232-macos-dmg-text-only-opening-guidance.md b/docs/adr/0232-macos-dmg-text-only-opening-guidance.md
index 2968f203c..9d74fed5f 100644
--- a/docs/adr/0232-macos-dmg-text-only-opening-guidance.md
+++ b/docs/adr/0232-macos-dmg-text-only-opening-guidance.md
@@ -1,6 +1,6 @@
# ADR 0232: Keep macOS DMG Opening Guidance Text-Only
-- Status: Accepted (amended by D457 / [ADR 0296](0296-macos-signed-dmg-two-icon-install.md))
+- Status: Superseded for macOS distribution by D634 / [ADR 0309](0309-remove-macos-first-launch-artifacts.md)
- Date: 2026-09-12
- Deciders: PI-Desktop release maintainers
- Amends: D371 / [ADR 0204](0204-unsigned-macos-first-launch-helper.md)
@@ -48,3 +48,9 @@ inspection on macOS.
Official signed DMGs no longer include the opening-help note. The two-icon
install row is the whole DMG. The ZIP still ships the note and helper.
+
+## Amendment (D634 / ADR 0309)
+
+Neither macOS DMG nor ZIP now ships the opening note or executable helper.
+The ZIP-helper provisions above are historical; see ADR 0309 for the current
+distribution rule.
diff --git a/docs/adr/0296-macos-signed-dmg-two-icon-install.md b/docs/adr/0296-macos-signed-dmg-two-icon-install.md
index dff41deab..b80a9856f 100644
--- a/docs/adr/0296-macos-signed-dmg-two-icon-install.md
+++ b/docs/adr/0296-macos-signed-dmg-two-icon-install.md
@@ -1,10 +1,10 @@
# ADR 0296: Signed macOS DMG is a two-icon install
-- Status: Accepted
+- Status: Accepted; ZIP guidance superseded by D634 / [ADR 0309](0309-remove-macos-first-launch-artifacts.md)
- Date: 2026-09-19
- Deciders: PI-Desktop release maintainers
- Amends: [ADR 0232](0232-macos-dmg-text-only-opening-guidance.md), [ADR 0204](0204-unsigned-macos-first-launch-helper.md)
-- Related: D457, D450 / [ADR 0289](0289-signed-macos-github-releases.md), E2E-196b, E2E-196c
+- Related: D457, D450, D634 / [ADR 0289](0289-signed-macos-github-releases.md), [ADR 0309](0309-remove-macos-first-launch-artifacts.md), E2E-196b, E2E-196c
## Context
@@ -37,3 +37,9 @@ path for tagged builds and made the installer look like an error dialog.
`apps/desktop/test/packaging-footprint.test.mjs` asserts the two-icon DMG
contents, 720×440 / 1440×880 backgrounds, and retained ZIP helper assets.
E2E-196b covers native archive inspection on macOS.
+
+## Amendment (D634 / ADR 0309)
+
+The ZIP no longer ships the opening note or executable helper. Neither macOS
+format includes first-launch guidance in signed releases or unsigned debug
+builds; the two-icon DMG layout remains unchanged.
diff --git a/docs/adr/0309-remove-macos-first-launch-artifacts.md b/docs/adr/0309-remove-macos-first-launch-artifacts.md
new file mode 100644
index 000000000..cb0dfefb9
--- /dev/null
+++ b/docs/adr/0309-remove-macos-first-launch-artifacts.md
@@ -0,0 +1,34 @@
+# ADR 0309: Remove bundled macOS first-launch guidance
+
+- Status: Accepted
+- Date: 2026-09-27
+- Deciders: PI-Desktop release maintainers
+- Amends: D457 / [ADR 0296](0296-macos-signed-dmg-two-icon-install.md), the macOS distribution provisions of [ADR 0232](0232-macos-dmg-text-only-opening-guidance.md) and [ADR 0204](0204-unsigned-macos-first-launch-helper.md)
+- Related: D634, E2E-196b
+
+## Context
+
+The signed and notarized macOS release lane no longer needs an unsigned
+first-launch workaround. The executable helper and its text note add files to
+macOS packages and imply that users should bypass Gatekeeper for unsigned
+builds, including local debug artifacts.
+
+## Decision
+
+Neither macOS DMG nor ZIP includes `PI-Desktop-macOS-open.command`,
+`PI-Desktop-macOS-opening-help.txt`, or another bundled quarantine-clearing
+helper or opening note. The ZIP contains `PI-Desktop.app` at its root. This
+applies to signed releases and local or opt-in unsigned debug builds; signing,
+notarization, stapling, and updater behavior are unchanged.
+
+## Consequences
+
+- Both macOS package formats omit the two first-launch guidance files.
+- Unsigned debug builds do not ship a Gatekeeper workaround and must not be
+ represented as equivalent to signed, notarized releases.
+
+## Verification
+
+`apps/desktop/test/packaging-footprint.test.mjs` guards the macOS builder
+configuration against reintroducing either file. E2E-196b covers native DMG
+and ZIP archive inspection.
diff --git a/docs/adr/README.md b/docs/adr/README.md
index c320e4e60..33651c3b3 100644
--- a/docs/adr/README.md
+++ b/docs/adr/README.md
@@ -225,7 +225,7 @@ Each ADR includes:
| 0201 | Explicit plugin project ids and host-owned session refresh | Accepted |
| 0202 | Expose effective subagent thinking metadata | Accepted |
| 0203 | Local MCP control plane for desktop operations | Accepted (amended by D372) |
-| 0204 | Explicit unsigned macOS first-launch helper | Accepted |
+| 0204 | Explicit unsigned macOS first-launch helper | Superseded for macOS distribution by 0309 |
| 0205 | Remote Agent Control uses a dedicated Host boundary | Accepted for implementation (post-MVP; amended by D374, D375, and D385) |
| 0206 | Extend provider retries and show bounded progress | Accepted |
| 0207 | Allow three same-path mutation recovery failures | Accepted (amends 0087 / D186) |
@@ -256,7 +256,7 @@ Each ADR includes:
| 0229 | Press-and-move project title reorder | Accepted (amends 0228) |
| 0230 | Skill ships with the Agent core tool set | Accepted (amends D174 / ADR 0048 / ADR 0219; issue #204) |
| 0231 | Ideographic comma opens the composer slash menu | Accepted (amends D123 / D139 / ADR 0024; issue #65) |
-| 0232 | Keep macOS DMG opening guidance text-only | Accepted (amended by 0296; amends D371 / ADR 0204) |
+| 0232 | Keep macOS DMG opening guidance text-only | Superseded for macOS distribution by 0309 |
| 0233 | Renderer-owned multi-folder project creation | Accepted (amends ADR 0011 / ADR 0016) |
| 0234 | Keep project memory host-owned and path-scoped | Accepted |
| 0235 | Preserve domain facades and enforce architecture budgets | Accepted |
@@ -325,7 +325,7 @@ Each ADR includes:
| 0293 | [SSH password authentication for the remote-host bootstrap](0293-ssh-password-authentication.md) | Accepted (D454; amends ADR 0292) |
| 0294 | [Project archive is a list + inspector workbench](0294-project-archive-list-inspector.md) | Accepted (D455; amends D267 / D168) |
| 0295 | [Session thinking-parameter omission](0295-session-thinking-parameter-omission.md) | Accepted (D456; amends ADR 0194 / ADR 0144 / ADR 0221) |
-| 0296 | [Signed macOS DMG is a two-icon install](0296-macos-signed-dmg-two-icon-install.md) | Accepted (D457; amends ADR 0232 / ADR 0204) |
+| 0296 | [Signed macOS DMG is a two-icon install](0296-macos-signed-dmg-two-icon-install.md) | Accepted; ZIP guidance superseded by 0309 (D634) |
| 0297 | [Provider-hosted web search as an adapter capability](0297-provider-hosted-web-search-adapter-capability.md) | Accepted |
| 0298 | [The app ships no fonts](0298-remove-bundled-fonts.md) | Accepted (D598; amends ADR 0083 / D232) |
| 0299 | [Subagent context budget and delegate compaction](0299-subagent-context-budget.md) | Accepted for implementation (amends ADR 0064; extends ADR 0062 / ADR 0279) |
@@ -338,6 +338,7 @@ Each ADR includes:
| 0306 | [Brazilian Portuguese (pt-BR) shell locale](0306-portuguese-brazil-shell-locale.md) | Accepted (amends ADR 0160 / 0183 / 0185) |
| 0307 | [Sync the API-key service catalog with pi-ai's built-in providers](0307-pi-ai-api-key-provider-sync.md) | Accepted (amends ADR 0012 / 0020 / 0116 / 0155) |
| 0308 | [Remove the Pull Requests destination and listing tool](0308-remove-pull-requests-destination.md) | Accepted |
+| 0309 | [Remove bundled macOS first-launch guidance](0309-remove-macos-first-launch-artifacts.md) | Accepted (D634; amends D457 / ADR 0296) |
| turn-process-and-thinking-display | [Turn process and thinking presentation](turn-process-and-thinking-display.md) | Accepted |
| provider-display-order | [Provider display order](provider-display-order.md) | Accepted |
| registry-header-variable-spelling | [Remote header variables accept the registry's `{name}` spelling](registry-header-variable-spelling.md) | Proposed |
diff --git a/docs/spec/05-security/01-security.md b/docs/spec/05-security/01-security.md
index 284f0fd5b..9a8eb58ed 100644
--- a/docs/spec/05-security/01-security.md
+++ b/docs/spec/05-security/01-security.md
@@ -236,15 +236,10 @@ claim availability or freshness against a malicious server.
- The client carries no GitHub token. A private or otherwise unreachable feed
fails closed; automatic failures stay ambient and explicit checks expose the
error.
-- Unsigned macOS distributions keep a narrow first-launch fallback for trusted
- sources. The DMG is a two-icon install and does not include that note. The ZIP
- package includes a text note and the executable helper, which searches only
- `/Applications/PI-Desktop.app` and `~/Applications/PI-Desktop.app`,
- verifies `CFBundleIdentifier` is `net.aiuo.pi-desktop`, removes only
- `com.apple.quarantine` recursively when present, and opens the app. It accepts
- no arbitrary path, uses no privilege escalation, and is not a substitute for
- Developer ID signing or notarization. The note gives the manual
- `com.apple.quarantine` command and says signed/notarized builds do not need it.
+- Neither macOS DMG nor ZIP ships first-launch guidance or an executable
+ quarantine-clearing helper. GitHub tag artifacts remain Developer ID-signed,
+ notarized, and stapled; opt-in unsigned builds are debug artifacts and do not
+ imply Gatekeeper qualification.
- Localized product "what's new" text (D164/D345) is selected in Main from the
shipped changelog catalog and attached to `UpdateState.releaseNotes`. The
renderer cannot supply a notes URL, feed, or remote body; missing catalog
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 30db460dc..d81b99fbb 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -467,31 +467,19 @@ identify the platform validation still needed.
- **Milestone**: M6+
- **Status**: Opt-in debug lane; tag releases must satisfy E2E-196c.
-#### E2E-196b: Unsigned macOS packages expose first-launch guidance
-
-- **Preconditions**: A default unsigned macOS release has produced both DMG and
- ZIP artifacts for at least one native architecture; a test macOS account can
- copy an app into `/Applications` or `~/Applications`.
-- **Steps**: 1) Open the DMG and inspect its root and layout. 2) Confirm the
- app and Applications link are the only items in the window. 3) Confirm the
- DMG has no command helper and no `If app won't open, read this.txt`. 4) Inspect
- the ZIP root without extracting the application contents and confirm it has
- both `PI-Desktop-macOS-opening-help.txt` and the executable
- `PI-Desktop-macOS-open.command`. 5) Read the note, move the app to
- `/Applications`, and double-click the ZIP helper.
+#### E2E-196b: macOS packages omit first-launch helper assets
+
+- **Preconditions**: An unsigned macOS debug packaging run has produced DMG and
+ ZIP artifacts for at least one native architecture.
+- **Steps**: 1) Inspect the DMG and confirm the app and Applications link are
+ the only items in its window. 2) Inspect the ZIP root without extracting the
+ app and confirm neither `PI-Desktop-macOS-opening-help.txt` nor
+ `PI-Desktop-macOS-open.command` is present. 3) Confirm the app remains
+ installable from the ZIP.
- **Expected**: The DMG contains the branded 720×440 background, the app, and
- the Applications link only; it does not contain or expose the command helper
- or the opening-help note. The ZIP contains the helper and the opening note at
- its root. The note includes
- `xattr -r -d com.apple.quarantine /Applications/PI-Desktop.app`, explains
- that the fallback is only for a trusted unsigned artifact when macOS reports
- that the app is damaged or does not open, and says signed/notarized builds do
- not need it. The ZIP helper searches only `/Applications/PI-Desktop.app` and
- `~/Applications/PI-Desktop.app`, removes only `com.apple.quarantine` when
- present, and opens the app without `sudo` or an arbitrary path argument. It
- validates `CFBundleIdentifier=net.aiuo.pi-desktop` before changing attributes.
- The guidance does not claim that an unsigned artifact has passed Gatekeeper
- qualification.
+ the Applications link only. The ZIP contains the app but neither first-launch
+ guidance asset. The same omission applies to signed and unsigned macOS
+ artifacts; signing, notarization, and updater behavior are unchanged.
- **Specs linked**: `06-delivery/06-release-runbook.md`,
`05-security/01-security.md`
- **Acceptance**: Quality, Security
diff --git a/docs/spec/06-delivery/06-release-runbook.md b/docs/spec/06-delivery/06-release-runbook.md
index a20e7529b..14f47340c 100644
--- a/docs/spec/06-delivery/06-release-runbook.md
+++ b/docs/spec/06-delivery/06-release-runbook.md
@@ -251,24 +251,12 @@ exactly one architecture-labelled DMG and ZIP (including blockmaps) and rejects
any unlabelled or wrong-architecture macOS artifact.
The DMG uses a branded 720×440 background with a two-icon drag-to-Applications
-gesture. The app and Applications link are the only items in the window. The
-opening-help note and the executable command helper are not included in the DMG.
-
-The macOS ZIP includes both `PI-Desktop-macOS-opening-help.txt` and the
-executable `PI-Desktop-macOS-open.command` at the package root. After moving
-`PI-Desktop.app` to `/Applications` or `~/Applications`, ZIP users can
-double-click the helper. It searches only those two fixed locations, removes
-only the recursive `com.apple.quarantine` attribute when present, and opens
-PI-Desktop. Before doing so it verifies `CFBundleIdentifier=net.aiuo.pi-desktop`.
-It does not use `sudo` or accept an arbitrary application path. The manual
-fallback for the standard system location is:
-
-```sh
-xattr -r -d com.apple.quarantine /Applications/PI-Desktop.app
-```
+gesture. The app and Applications link are the only items in the window.
-This helper is only for a trusted unsigned artifact when macOS reports that the
-app is damaged. Signed and notarized builds should open without it.
+The macOS ZIP contains `PI-Desktop.app` at its root. Neither the DMG nor ZIP
+ships an opening-help note or executable first-launch helper, including local
+and unsigned debug builds. Tagged artifacts remain signed and notarized; the
+unsigned lane is for debugging and does not imply Gatekeeper qualification.
DMG, ZIP, NSIS, AppImage, deb, rpm, blockmap, and updater feed outputs are already
compressed or compression-insensitive. The workflow therefore uploads their
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 1c9d3e594..87c38ab62 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -27,7 +27,8 @@ This log freezes previously open questions into concrete decisions.
| D451 | Review opens only on explicit user action | **A tool result never opens, activates, or resizes the work panel. The `tool_end` artifact gate and `shouldOpenReviewArtifact` are removed; Review is reached only from the `+` New launcher row or from the retained session context the viewport-fixed toggle / `Cmd/Ctrl + J` reveals. A successful workspace Write/Edit still records its message-owned inline review card in the transcript.** | An agent edit silently revealing a side panel competes with the user's own reading and layout, and the transcript card already carries the change evidence. See ADR 0043, `04-ux/01-ui-ia.md`, `04-ux/08-component-spec.md` §5, `04-ux/09-interaction-patterns.md`, E2E-057. |
| D452 | Plan and goal artifacts open in the bundled file view | **The contract approval card's artifact opener hands the immutable `.pi/plan/*.md` or `.pi/goal/*.md` path to the bundled `pi.file-manager` view whenever that view is launchable, and to the host file tab otherwise — the same preference and fallback a chat file reference already uses (ADR 0241). The artifact still creates or activates a tab in its originating session, so the approval reveal itself is unchanged; only the surface changes. Renderer-only; no protocol, host, storage, artifact-content, or permission change. See D189, ADR 0043, `04-ux/08-component-spec.md` §5.4 and §10A.2, `04-ux/09-interaction-patterns.md` §5A, E2E-106.** | The approval opener used a host file tab while every other project file the conversation names already opens in the user's own file view, so a plan or goal landed in the one surface the user does not browse project files in. |
| D459 | Restore resizable sidebar width with collapse-below-threshold | **Amend D408 / ADR 0238 and restore ADR 0141 (ADR 0290): the expanded sidebar is again a renderer-owned `240px..520px` column (default `275px`) with a right-edge handle that previews on pointer-down, persists on release, and supports ArrowLeft/ArrowRight (16px), Home, and End. A pointer width below `160px` collapses as a user action without overwriting the preferred expanded width; keyboard resize never collapses. Live maximum is the three-column remainder after MainChat's 450px floor. Renderer only; existing `pi.desktop.sidebarWidth` preference. See E2E-168.** | Long labels need reclaimable width; ADR 0238's fixed 275px pin blocked that while the live three-column budget could already cap a user-chosen width. This decision was mistakenly recorded as D451 (already used by Review-opens-only-on-explicit-user-action); renumbered per issue #620. |
-| D457 | Signed macOS DMG is a two-icon install | **Amend D406 / ADR 0232 / ADR 0204: official and local DMGs contain only PI-Desktop.app and the Applications link on a branded 720×440 plate. They no longer include `If app won't open, read this.txt` or the command helper. macOS ZIP packages still ship both the opening note and `PI-Desktop-macOS-open.command` for trusted unsigned artifacts. See ADR 0296 and E2E-196b.** | Tagged DMGs are signed and notarized (D450); the unsigned-opening note on the installer read as an error. |
+| D457 | Signed macOS DMG is a two-icon install | *(amended by D634)* **Amend D406 / ADR 0232 / ADR 0204: official and local DMGs contain only PI-Desktop.app and the Applications link on a branded 720×440 plate. The ZIP contains PI-Desktop.app only. Neither macOS format includes the opening note or command helper, including unsigned debug artifacts. See ADR 0296 / ADR 0309 and E2E-196b.** | Tagged DMGs are signed and notarized (D450); unsigned first-launch guidance is no longer needed in package artifacts. |
+| D634 | Remove bundled macOS first-launch guidance | **Amend D457 / ADR 0296 and the macOS distribution provisions of ADR 0232 / ADR 0204: neither macOS DMG nor ZIP ships `PI-Desktop-macOS-open.command`, `PI-Desktop-macOS-opening-help.txt`, or another bundled quarantine-clearing helper or opening note. The ZIP contains `PI-Desktop.app` at its root; the DMG remains a two-icon install. This applies to signed releases and local or opt-in unsigned debug builds. See ADR 0309 and E2E-196b.** | The signed release lane has eliminated the user need for an unsigned first-launch workaround; shipping it beside debug builds risks suggesting a Gatekeeper bypass. |
| D450 | Signed macOS GitHub Releases | **Amend D078 / ADR 0022: GitHub tag releases Developer ID-sign, notarize (`notarytool` via electron-builder 26), staple, and Gatekeeper-verify macOS DMG/ZIP before upload, using identity `Developer ID Application: XingYu Liu (DUV63RKYTW)` / team `DUV63RKYTW` from Actions secrets (`CSC_LINK`, `CSC_KEY_PASSWORD`, `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, `APPLE_TEAM_ID`). Missing secrets fail the job. Local unsigned packaging without a certificate remains. `workflow_dispatch` may set `sign_macos: false` only for unsigned debug artifacts. Packaged macOS uses in-app `electron-updater` (ZIP + merged `latest-mac.yml`); Linux deb/rpm and Windows portable ZIP stay notify-and-link. No afterPack/afterSign adhoc codesign (ADR 0278).** | Production DMGs must open without a Gatekeeper warning, and signed macOS installs can download and restart into a new tag. See ADR 0289, E2E-196c, E2E-067A. |
## B. Secondary implementation defaults
@@ -87,7 +88,7 @@ This log freezes previously open questions into concrete decisions.
| D403 | Press-and-move project title reorder | **Amend D402 / D093 / ADR 0228: mouse and pen reorder by pressing the project title and moving 8px; a click with no qualifying movement still selects and toggles collapse. Touch does not start a reorder. An accent insertion line shows before/after placement. ArrowUp/ArrowDown and Escape are unchanged. See ADR 0229 and E2E-253.** | A 400ms still press is a mobile long-press pattern and is slower than ChatGPT-style desktop sidebar lists. |
| D404 | Skill ships with the Agent core tool set | **Amend D174 / D185 / ADR 0048 / ADR 0219: `Skill` joins the Agent-mode core tool set, so its schema is present on the first provider request whenever the skill catalog is non-empty. It is removed from the deferred catalog and never appears under `# On-demand tools`; the other on-demand capabilities and `ToolSearch` are unchanged, and Plan and Goal still omit the tool entirely. No protocol, storage, permission, or skill-body change. See ADR 0230 and E2E-254.** | A user-typed `/skill-id` and the `# Skills` section both ask the model to call `Skill`, and a tool that is absent from the schema cannot be called at all: the deferred entry added a discovery round trip before any skill body could load (issue #204). |
| D405 | Ideographic comma opens the slash menu | **Amend D123 / D139 / ADR 0024: a `、` (U+3001) committed as the first character of an empty composer draft is rewritten to `/` before trigger detection, so a Chinese IME reaches the ordinary slash menu without switching input methods. Only that position is rewritten; a `、` anywhere else stays ordinary punctuation, and the `@` file menu is unaffected. Shared grammar and renderer only; no IPC, storage, or autocomplete-source change. See ADR 0231 and E2E-255.** | Reaching `/new`, `/compact`, a mode alias, or a Skill forced a Chinese IME user to switch to ASCII input mid-sentence and then switch back (issue #65). |
-| D406 | Keep macOS DMG opening guidance text-only | *(amended by D457)* **Amend D371 / ADR 0204: macOS DMGs expose the opening-help note as `If app won't open, read this.txt` and no longer include the executable `PI-Desktop-macOS-open.command`. macOS ZIP packages retain both the note and the helper. The note provides the narrow Terminal fallback for trusted unsigned builds; signed and notarized builds do not need it. See ADR 0232 and E2E-196b.** | The DMG should keep the normal app-to-Applications flow focused while still giving users a visible, actionable answer when an unsigned app does not open. |
+| D406 | Keep macOS DMG opening guidance text-only | *(amended by D457 and D634)* **Amend D371 / ADR 0204: macOS DMGs no longer expose the opening-help note or executable helper, and macOS ZIP packages no longer retain them. The narrow Terminal fallback was for trusted unsigned builds; signed and notarized builds do not need it. See ADR 0232, ADR 0296, ADR 0309, and E2E-196b.** | The DMG should keep the normal app-to-Applications flow focused while still giving users a visible, actionable answer when an unsigned app does not open. |
| D407 | Restore archived projects after session import | **Additive renderer behavior for issue #250: when a core or plugin import adds a new project-bound session, the import-triggered session refresh normalizes its project path and clears the renderer's archived presentation state for that project. Pathless sessions, skipped imports, historical plugin paths without an active binding, and ordinary refreshes leave archive state unchanged. Host project rows, IPC channels, plugin methods, storage schema, and data formats do not change. See ADR 0236 and E2E-257.** | The host can successfully materialize an imported session under a project while the renderer still hides that project's sidebar row as archived. Restoring only the newly imported binding makes the result discoverable without weakening deliberate archive choices during ordinary refreshes (issue #250). |
| D408 | Prioritize MainChat in the three-column shell | **Amend ADR 0226 / ADR 0151 / ADR 0033 for issue #267: MainChat keeps a hard 450px minimum, the work panel is capped by the live budget (`client width - 450px - expanded sidebar`, with no fixed maximum), and the expanded sidebar yields at that threshold — including while `sidebar-out` still occupies flex space. A manual sidebar reopen spends panel width first and otherwise targets 460px; closing the panel restores only a sidebar the layout collapsed. The native window never changes: the reservation seam stays at zero and no geometry is applied. Preview mode temporarily unmounts MainChat and uses a window-level chrome row; collapsed-sidebar macOS preview reserves 88px, or 8px in fullscreen, for traffic lights (D433). See ADR 0238 and E2E-LAYOUT-three-column-width-priority.** | The fixed client area had no explicit width priority, so the side docks could pin MainChat to its floor and leave the composer unusable. Making the yield order explicit keeps the chat readable inside the fixed window without reintroducing native window growth (issue #267). |
| D409 | Host-owned session collaboration messages | *(amended by D446)* **Amend ADR 0237 / ADR 0165 / ADR 0213: Rust host-core owns a durable session-collaboration ledger keyed by message id and real source/target Session IDs. Plugin-mediated `spawn`, `send`, `status`, `result`, and `cancel` operations use the reviewed desktop-control gateway; the sender is bound to the active plugin Agent tool invocation, target turns retain their existing configuration, and each delivery is claimed by its actual durable turn. Completion callbacks are durable, at-most-once, and reference the settled turn. Provenance is persisted with transcript rows and cannot be forged, stripped, or edited through regeneration. The additive schema v16 migration retains queued work across restart without unattended replay, applies permission ceilings and bounded autonomous hops, and keeps the existing Task family unchanged. See ADR 0239 and E2E-PLUGIN-session-orchestrator-real-workers.** | The plugin's prior create/prompt polling path could infer neither a durable turn outcome nor a safe bidirectional sender identity. A host-owned ledger makes delivery, provenance, callback, cancellation, and restart behavior auditable without restoring the withdrawn A2A protocol. |
@@ -472,7 +473,7 @@ section mirrors only marketplace/catalog items still blocking nothing.
| D364 | Windows portable exe without installer | *(superseded by D603)* **Amend D120 / D126 / ADR 0022: tag builds publish a Windows x64 portable exe `PI-Desktop-Portable-${version}.exe` alongside the NSIS installer `PI-Desktop-Setup-${version}.exe`. The portable target does not write `latest.yml`. Packaged portable runs (`PORTABLE_EXECUTABLE_FILE`) use notify-and-link delivery. NSIS installs keep in-app download and quit-and-install. Data stays in the existing application data directory. Portable requests user execution level.** | Company environments that whitelist a single executable cannot run the NSIS installer. Applying the NSIS updater to a portable run would install the app, so portable stays manual (ADR 0197, E2E-211). |
| D603 | Windows portable delivery uses a normal ZIP | *(amended by D628)* **Amend D364 / ADR 0022 / ADR 0197: tag builds publish a Windows x64 portable ZIP `PI-Desktop-Portable-${version}.zip` alongside the NSIS installer `PI-Desktop-Setup-${version}.exe`. The Windows release helper builds NSIS and ZIP separately, stamps ZIP app metadata with `piDistribution = "zip"`, and keeps the ZIP target out of `latest.yml`. Extracted ZIP runs use notify-and-link delivery; the updater still recognizes `PORTABLE_EXECUTABLE_FILE` for older portable executables. Data stays in the existing application data directory.** | The self-extracting portable wrapper could trigger administrator prompts and did not provide a reliable normal executable identity for the taskbar. A user-extracted ZIP launches `PI-Desktop.exe` directly and preserves the manual-update boundary. |
| D260 | Release documentation is a version surface | **A stable version bump must update every version-bearing surface before the tag: the shipped-locale in-app changelog and its test list, every workspace `package.json` including `docs/package.json` (a third workspace root `scripts/release.mjs` previously skipped), the Cargo workspace version and `host-core` lockfile entry, `APP_VERSION`, and the `<major>.<minor>.x` release line stated in `README.md` and `README.zh-CN.md`. `scripts/check-release-docs.mjs` verifies all of them; `scripts/release.mjs` runs it after bumping and refuses to commit or tag while any surface disagrees, with `--skip-docs-check` reserved for deliberate non-release bumps. Extends D164.** | The in-app changelog gate alone left published documentation behind: the READMEs still advertised the `0.5.x` line at `0.10.8`, and `docs/package.json` sat at `0.5.8`. A tag is irreversible, so the check runs before the tag exists rather than as review etiquette. |
-| D371 | Explicit unsigned macOS first-launch helper | *(amended by D406 and D443)* **Every macOS distribution ships an executable `PI-Desktop-macOS-open.command`, placed on the DMG in a visible first-launch row below the drag-to-Applications gesture. It searches only `/Applications/PI-Desktop.app` and `~/Applications/PI-Desktop.app`, verifies `CFBundleIdentifier` is `net.aiuo.pi-desktop`, removes only `com.apple.quarantine` when present, and opens the app. It never uses `sudo`, accepts no arbitrary path, and does not replace Developer ID signing or notarization.** | The unsigned macOS lane can be blocked by quarantine with a misleading damaged-app message, and the terminal-only `xattr -cr` note was broader than the launch failure requires (ADR 0204, E2E-196b) |
+| D371 | Explicit unsigned macOS first-launch helper | *(amended by D406, D443, and D634)* **Every macOS distribution used to ship an executable `PI-Desktop-macOS-open.command`; that helper is no longer distributed. See ADR 0204, ADR 0309, and E2E-196b.** | The unsigned macOS lane can be blocked by quarantine with a misleading damaged-app message, and the terminal-only `xattr -cr` note was broader than the launch failure required (ADR 0204, E2E-196b) |
| D443 | Canonical application ID and macOS codesign identifier | **Amend D141 / D371 / ADR 0204: the application ID is `net.aiuo.pi-desktop` (`APP_ID`, electron-builder `appId`, macOS `CFBundleIdentifier`, Windows AppUserModelID). Development macOS hosts use `net.aiuo.pi-desktop.dev`. Do not adhoc-sign the unsigned pack in `afterPack`/`afterSign`: nested Electron helpers are still unsigned and `codesign` fails with `code object is not signed at all`. See ADR 0278 and issue #524.** | The owner domain is `net.aiuo.pi-desktop`. Binding the unsigned outer identifier is deferred until a helper-safe pack path exists. |
## V. Extension activation decisions
@@ -7285,3 +7286,16 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.
- Renderer presentation only: no transcript, persistence, provider-thinking,
or host behavior changes. See ADR turn-process-and-thinking-display,
`04-ux/08-component-spec.md`, and E2E-CHAT-turn-process-and-thinking-display.
+
+## 2026-09-27 — Remove bundled macOS first-launch guidance (D634)
+
+- The DMG remains a two-icon app/Applications install, and the ZIP contains
+ `PI-Desktop.app` at its root. Neither format ships an opening note or
+ executable quarantine-clearing helper, including for local or unsigned debug
+ builds.
+- The signing, notarization, stapling, and updater lanes are unchanged. Unsigned
+ debug artifacts do not imply Gatekeeper qualification.
+- `packaging-footprint.test.mjs` guards the builder configuration; E2E-196b
+ covers native DMG and ZIP archive inspection.
+- D634 amends D457 / ADR 0296 and supersedes the macOS distribution provisions
+ of ADR 0232 / ADR 0204. See ADR 0309.
diff --git a/docs/zh-CN/adr/index.md b/docs/zh-CN/adr/index.md
index 36cc1befc..5662b3fc9 100644
--- a/docs/zh-CN/adr/index.md
+++ b/docs/zh-CN/adr/index.md
@@ -57,8 +57,8 @@ ADR 记录那些不应被静默改变的架构选择。中文入口与英文索
| [ADR 0198:为每个安静间隔命名活动行](/adr/0198-quiet-interval-activity-phases) | 补齐 starting / preparing / compacting / recovering,并在等待 Subagent 时展示各自的粗粒度动作 |
| [ADR 0200:宿主拥有的插件会话导入与归属 API](/adr/0200-plugin-owned-session-api) | 插件历史会话由主机生成 id,并按插件、来源和外部 id 归属 |
| [ADR 0201:显式插件项目 id 与宿主拥有的会话刷新](/adr/0201-plugin-project-ids-and-session-refresh) | 插件可显式绑定主机项目,成功写入由主机通知渲染器刷新 |
-| [ADR 0204:未签名 macOS 首次启动助手](/adr/0204-unsigned-macos-first-launch-helper) | 只清理 PI-Desktop 的 quarantine 属性,并用 Finder 一键启动可信的未签名应用(由 ADR 0232 修订) |
-| [ADR 0232:macOS DMG 只保留打开说明](/adr/0232-macos-dmg-text-only-opening-guidance) | 由 ADR 0296 修订:DMG 现为双图标安装;ZIP 仍保留首次启动助手 |
+| [ADR 0204:未签名 macOS 首次启动助手](/adr/0204-unsigned-macos-first-launch-helper) | 该辅助文件已由 D634 / ADR 0309 从 macOS 分发包中移除 |
+| [ADR 0232:macOS DMG 只保留打开说明](/adr/0232-macos-dmg-text-only-opening-guidance) | macOS 分发规则已由 D634 / ADR 0309 取代 |
| [ADR 0252:插件的宿主回合结束事件](/adr/0252-plugin-host-turn-end-event) | 宿主在每次已开始的回合结束时向插件宣告一次 `session:turnEnded`,携带回合身份与终止原因 |
## 完整索引
@@ -301,10 +301,11 @@ ADR 记录那些不应被静默改变的架构选择。中文入口与英文索
| 0292 | [远端主机的 SSH 引导](/adr/0292-ssh-remote-host-bootstrap) | 已接受实施(D453;ADR 0205 R2b,扩展 ADR 0286) |
| 0294 | [项目存档改为列表 + 检查器](/adr/0294-project-archive-list-inspector) | 已接受(D455;修订 D267 / D168) |
| 0295 | [会话思考参数不发送](/adr/0295-session-thinking-parameter-omission) | 已接受(D456;修订 ADR 0194 / ADR 0144 / ADR 0221) |
-| 0296 | [已签名 macOS DMG 改为双图标安装](/adr/0296-macos-signed-dmg-two-icon-install) | 已接受(D457;修订 ADR 0232 / ADR 0204) |
+| 0296 | [已签名 macOS DMG 改为双图标安装](/adr/0296-macos-signed-dmg-two-icon-install) | 已接受;ZIP 指引已由 D634 / ADR 0309 取代 |
| 0297 | [提供商托管联网搜索作为适配器能力](/adr/0297-provider-hosted-web-search-adapter-capability) | 已接受 |
| 0298 | [应用不再随包发布任何字体](/adr/0298-remove-bundled-fonts) | 已接受(D598;修订 ADR 0083 / D232) |
| 0308 | [移除拉取请求页面与列表工具](/adr/0308-remove-pull-requests-destination) | 已接受 |
+| 0309 | [移除 macOS 首次启动辅助文件](/adr/0309-remove-macos-first-launch-artifacts) | 已接受(D634;修订 D457 / ADR 0296) |
| registry-header-variable-spelling | [Remote header variables accept the registry's `{name}` spelling](/adr/registry-header-variable-spelling) | Proposed |
## 什么时候看 ADR
diff --git a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index e708b4658..092f4e1b3 100644
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@ -3703,23 +3703,15 @@ IPC 请求无法关闭。
- **里程碑**:M6+
- **状态**:可选调试通道;标签发布必须满足 E2E-196c。
-#### E2E-196b:未签名的 macOS 软件包展示首次启动指引
-
-- **先决条件**:默认未签名的 macOS 发布已为至少一个本机架构生成 DMG 和 ZIP 工件;
- 测试 macOS 账户可以将应用复制到 `/Applications` 或 `~/Applications`。
-- **步骤**:1) 打开 DMG 并检查根目录和布局。2) 确认窗口里只有应用与 Applications
- 链接。3) 确认 DMG 不含 command 助手,也不含 `If app won't open, read this.txt`。
- 4) 不解压应用内容,检查 ZIP 根目录,并确认其中同时存在
- `PI-Desktop-macOS-opening-help.txt` 和可执行的 `PI-Desktop-macOS-open.command`。
- 5) 阅读说明,将应用移动到 `/Applications`,然后双击 ZIP 中的助手。
-- **预期**:DMG 使用带品牌的 720×440 背景,只包含应用和 Applications 链接,不包含或
- 暴露 command 助手或打开说明。ZIP 根目录包含助手和同一份说明。说明包含
- `xattr -r -d com.apple.quarantine /Applications/PI-Desktop.app`,并说明兜底方式仅适用
- 于 macOS 对可信未签名工件提示应用已损坏或应用打不开的场景;已签名/公证版本无需
- 执行。ZIP 助手只查找 `/Applications/PI-Desktop.app` 和 `~/Applications/PI-Desktop.app`,
- 在存在时只删除 `com.apple.quarantine` 属性,然后打开应用,不使用 `sudo`,也不接受
- 任意路径;助手会在修改属性前校验 `CFBundleIdentifier=net.aiuo.pi-desktop`。说明不会
- 声称未签名工件已通过 Gatekeeper 资质验证。
+#### E2E-196b:macOS 软件包不附带首次启动助手
+
+- **先决条件**:未签名的 macOS 调试打包已为至少一个本机架构生成 DMG 和 ZIP 工件。
+- **步骤**:1) 检查 DMG,确认窗口里只有应用与 Applications 链接。2) 不解压应用内容,
+ 检查 ZIP 根目录,确认既没有 `PI-Desktop-macOS-opening-help.txt`,也没有
+ `PI-Desktop-macOS-open.command`。3) 确认 ZIP 中的应用仍可正常安装。
+- **预期**:DMG 使用带品牌的 720×440 背景,只包含应用与 Applications 链接;ZIP 包含
+ 应用,但两种首次启动指引文件都不存在。签名和未签名 macOS 工件均遵循此规则;签名、
+ 公证和更新程序行为保持不变。
- **关联规格**:`06-delivery/06-release-runbook.md`、`05-security/01-security.md`
- **验收**:质量、安全
- **里程碑**:M6+
diff --git a/docs/zh-CN/spec/06-delivery/06-release-runbook.md b/docs/zh-CN/spec/06-delivery/06-release-runbook.md
index b0865822e..1a5c0595f 100644
--- a/docs/zh-CN/spec/06-delivery/06-release-runbook.md
+++ b/docs/zh-CN/spec/06-delivery/06-release-runbook.md
@@ -204,22 +204,12 @@ Intel x64 通道发布 `PI-Desktop-<version>-x64.dmg` 和
上传前,每个 macOS 运行器必须恰好生成一个带架构后缀的 DMG 和 ZIP(包括
blockmap),任何无后缀或架构错误的 macOS 工件都会使发布失败。
-DMG 使用带有品牌视觉的 720×440 背景,只展示拖入 Applications 的双图标安装手势。
-窗口里只有应用和 Applications 链接;打开说明和可执行 command 助手都不放入 DMG。
-
-macOS ZIP 在安装包根目录包含 `PI-Desktop-macOS-opening-help.txt` 和可执行的
-`PI-Desktop-macOS-open.command`。将 `PI-Desktop.app` 移动到 `/Applications` 或
-`~/Applications` 后,ZIP 用户可以双击该助手。它只搜索这两个固定位置,在存在时递归
-删除唯一的 `com.apple.quarantine` 属性,然后打开 PI-Desktop。在执行前它会校验
-`CFBundleIdentifier=net.aiuo.pi-desktop`。它不会使用 `sudo`,也不接受任意应用路径。
-标准系统位置的终端备用命令为:
-
-```sh
-xattr -r -d com.apple.quarantine /Applications/PI-Desktop.app
-```
+DMG 使用带品牌视觉的 720×440 背景,只展示拖入 Applications 的双图标安装手势。
+窗口里只有应用和 Applications 链接。
-该助手仅适用于可信来源的未签名工件在 macOS 上提示应用已损坏的场景;已签名并公证
-的版本无需执行它。
+macOS ZIP 在安装包根目录包含 `PI-Desktop.app`。DMG 和 ZIP 都不附带打开说明或首次
+启动命令助手,本地与未签名调试构建也一样。标签发布工件仍会签名并公证;未签名通道
+仅用于调试,不代表已通过 Gatekeeper 验证。
标签构建和 `sign_macos: true`(手动运行的默认值)仅从 GitHub Actions 密钥接收 `CSC_LINK`、`CSC_KEY_PASSWORD`、`APPLE_ID`、`APPLE_APP_SPECIFIC_PASSWORD` 和 `APPLE_TEAM_ID`,通过 `CSC_NAME=XingYu Liu (DUV63RKYTW)`(裸通用名——electron-builder 拒绝 `Developer ID Application:` 前缀)固定证书,强制代码签名与 `notarytool` 公证 `PI-Desktop.app`。随后 DMG 会由 `scripts/notarize-and-staple-macos-release-dmg.sh` 单独提交到同一个服务,只有返回 `Accepted` 才允许装订票据。之后验证身份、代码签名完整性(含 `pi-desktop-host-core`)、Gatekeeper `Notarized Developer ID` 以及两份已装订票据,再进行任何工件上传。
diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.md
index 2bcb9f46e..c0fe54280 100644
--- a/docs/zh-CN/spec/08-meta/decisions-log.md
+++ b/docs/zh-CN/spec/08-meta/decisions-log.md
@@ -30,7 +30,8 @@
| D451 | 审阅面板只在用户主动操作时打开 | **工具结果永不打开、激活或改变工作面板。移除 `tool_end` 中的 artifact 门控与 `shouldOpenReviewArtifact`;Review 仅从 `+` 新建启动器的 Review 行,或视口固定开关 / `Cmd/Ctrl + J` 显示的会话保留上下文进入。成功的 workspace Write/Edit 仍会在 transcript 中记录消息级内联审阅卡片。** | Agent 编辑静默弹出侧边栏会与用户正在阅读的内容和布局争夺注意力,且 transcript 卡片已承载变更证据。见 ADR 0043、`04-ux/01-ui-ia.md`、`04-ux/08-component-spec.md` §5、`04-ux/09-interaction-patterns.md`、E2E-057。 |
| D452 | 计划与目标工件在内置文件视图中打开 | **审批卡的工件打开器把不可变的 `.pi/plan/*.md` 或 `.pi/goal/*.md` 路径交给内置 `pi.file-manager` 视图(该视图可启动时),否则交给宿主机文件标签——与对话文件引用已有的偏好与回退一致(ADR 0241)。工件仍会在其来源会话中创建或激活标签,因此审批揭示本身不变,只有承载界面改变。仅渲染进程;不改协议、宿主、存储、工件内容或权限。见 D189、ADR 0043、`04-ux/08-component-spec.md` §5.4 与 §10A.2、`04-ux/09-interaction-patterns.md` §5A、E2E-106。** | 审批打开器原先使用宿主机文件标签,而对话提到的其它项目文件都已进入用户自己的文件视图,于是计划或目标落在了用户唯一不浏览项目文件的界面上。 |
| D459 | 恢复可拖拽侧边栏宽度,过窄时收起 | **修订 D408 / ADR 0238 并恢复 ADR 0141(ADR 0290):展开侧边栏重新成为渲染层拥有的 `240px..520px` 列(默认 `275px`),右缘手柄在指针按下时预览、释放时持久,并支持左右方向键(16px)、Home 与 End。指针宽度低于 `160px` 时以用户操作收起,不覆盖首选展开宽度;键盘调整永不收起。实时上限为扣除 MainChat 450px 下限后的三栏余量。仅渲染进程;沿用 `pi.desktop.sidebarWidth` 偏好。见 E2E-168。** | 长标签需要可回收宽度;ADR 0238 固定 275px 会挡住这一点,而三栏实时预算本就可以限制用户选定的宽度。该决策曾被误记为 D451(已由「审阅面板只在用户主动操作时打开」占用);按 issue #620 改号。 |
-| D457 | 已签名 macOS DMG 改为双图标安装 | **修订 D406 / ADR 0232 / ADR 0204:正式与本地 DMG 只包含 PI-Desktop.app 和 Applications 链接,使用 720×440 品牌背景。不再放入 `If app won't open, read this.txt` 或 command 助手。macOS ZIP 仍附带打开说明和 `PI-Desktop-macOS-open.command`,供可信未签名工件使用。见 ADR 0296 与 E2E-196b。** | 标签 DMG 已签名公证(D450);安装盘上的未签名打开说明读起来像报错。 |
+| D457 | 已签名 macOS DMG 改为双图标安装 | *(由 D634 修订)* **修订 D406 / ADR 0232 / ADR 0204:正式与本地 DMG 只包含 PI-Desktop.app 和 Applications 链接,使用 720×440 品牌背景。ZIP 只包含 PI-Desktop.app。任何 macOS 格式(包括未签名调试工件)都不再附带打开说明或 command 助手。见 ADR 0296 / ADR 0309 与 E2E-196b。** | 标签 DMG 已签名公证(D450);打包工件不再需要未签名首次启动指引。 |
+| D634 | 移除 macOS 首次启动辅助文件 | **修订 D457 / ADR 0296 及 ADR 0232 / ADR 0204 中的 macOS 分发约定:macOS DMG 与 ZIP 均不再附带 `PI-Desktop-macOS-open.command`、`PI-Desktop-macOS-opening-help.txt`,或其他捆绑的 quarantine 清理助手/打开说明。ZIP 根目录只包含 `PI-Desktop.app`;DMG 仍为双图标安装。该规定适用于签名发布和本地或可选的未签名调试构建。见 ADR 0309 与 E2E-196b。** | 已签名发布通道不再需要未签名首次启动兜底;随调试包附带此类文件可能误导用户绕过 Gatekeeper。 |
| D450 | 签名的 macOS GitHub Release | **修订 D078 / ADR 0022:GitHub tag 发布使用身份 `Developer ID Application: XingYu Liu (DUV63RKYTW)` / 团队 `DUV63RKYTW`,通过 Actions 密钥(`CSC_LINK`、`CSC_KEY_PASSWORD`、`APPLE_ID`、`APPLE_APP_SPECIFIC_PASSWORD`、`APPLE_TEAM_ID`)对 macOS DMG/ZIP 做 Developer ID 签名、`notarytool` 公证、装订和 Gatekeeper 校验;缺少密钥则失败。无证书的本地未签名打包仍可用。`workflow_dispatch` 仅可把 `sign_macos: false` 用于未签名调试产物。打包的 macOS 走应用内 `electron-updater`(ZIP + 合并后的 `latest-mac.yml`);Linux deb/rpm 与 Windows 便携版 ZIP 仍为通知并打开发布页。禁止 afterPack/afterSign adhoc 签名(ADR 0278)。** | 正式 DMG 应无需 Gatekeeper 警告即可打开,已签名 macOS 安装可下载并重启到新 tag。见 ADR 0289、E2E-196c、E2E-067A。 |
## B. 辅助实现默认值
@@ -90,7 +91,7 @@
| D403 | 按住标题移动即可重排 | **修订 D402 / D093 / ADR 0228:鼠标和触控笔按住项目标题并移动 8px 开始重排;没有足够移动的单击仍会选中并折叠/展开。触摸不会开始重排。强调色插入线标出前/后放置位置。`ArrowUp`/`ArrowDown` 与 Escape 不变。见 ADR 0229 与 E2E-253。** | 静止按住 400ms 是移动端长按模式,比 ChatGPT 一类桌面侧边栏列表更慢。 |
| D404 | Skill 随 Agent 核心工具集下发 | **修订 D174 / D185 / ADR 0048 / ADR 0219:`Skill` 加入 Agent 模式核心工具集,因此只要技能目录非空,第一个 provider 请求就带有它的 schema。它从延迟目录中移除,不再出现在 `# On-demand tools`;其他按需能力与 `ToolSearch` 不变,Plan 与 Goal 仍然完全不提供该工具。不改协议、存储、权限或技能正文。见 ADR 0230 与 E2E-254。** | 用户输入的 `/skill-id` 与 `# Skills` 段落都要求模型调用 `Skill`,而 schema 中不存在的工具根本无法被调用;延迟注册让任何技能正文加载前都多一次发现往返(issue #204)。 |
| D405 | 顿号打开斜杠菜单 | **修订 D123 / D139 / ADR 0024:当输入框为空时,第 1 个字符提交的「、」(U+3001)会在触发检测前改写为 `/`,中文输入法因此无需切换输入方式即可打开普通斜杠菜单。只改写该位置;其他位置的「、」仍是普通标点,`@` 文件菜单不受影响。仅共享语法与渲染器改动;不改 IPC、存储或补全数据源。见 ADR 0231 与 E2E-255。** | 要唤出 `/new`、`/compact`、模式别名或某个 Skill,中文输入法用户必须在书写中途切到 ASCII 输入再切回(issue #65)。 |
-| D406 | macOS DMG 只保留打开说明 | *(由 D457 修订)* **修订 D371 / ADR 0204:macOS DMG 以 Finder 名称 `If app won't open, read this.txt` 展示打开说明,不再包含或暴露可执行的 `PI-Desktop-macOS-open.command`。macOS ZIP 安装包保留说明和助手。说明为可信未签名构建提供范围明确的终端备用命令;已签名和公证版本无需执行。见 ADR 0232 与 E2E-196b。** | DMG 应保持应用拖入 Applications 的正常安装路径简洁,同时在未签名应用打不开时提供可见且可执行的处理指引。 |
+| D406 | macOS DMG 只保留打开说明 | *(由 D457 和 D634 修订)* **修订 D371 / ADR 0204:macOS DMG 不再展示打开说明或可执行助手,macOS ZIP 也不再附带它们。原有终端备用方法仅供可信未签名构建使用;已签名和公证版本无需执行。见 ADR 0232、ADR 0296、ADR 0309 与 E2E-196b。** | DMG 应保持应用拖入 Applications 的正常安装路径简洁,同时为未签名应用打不开的问题提供可见且可执行的处理指引。 |
| D407 | 导入会话后恢复已归档项目 | **针对 issue #250 的渲染器增量行为:核心或插件导入新增项目绑定会话时,导入触发的会话刷新会规范化项目路径,并清除该项目的渲染器归档状态。无路径会话、跳过的导入、没有活动绑定的插件历史路径和普通刷新保持归档状态不变。host 项目行、IPC 通道、插件方法、存储 schema 和数据格式不变。见 ADR 0236 与 E2E-257。** | host 可以在项目下成功生成导入会话,而渲染器仍将该项目侧边栏行隐藏为已归档。只恢复新导入绑定对应的项目,可以让结果可发现,同时不会在普通刷新时削弱用户的归档选择(issue #250)。 |
| D408 | 三栏布局中优先保障 MainChat | **针对 issue #267 修订 ADR 0226 / ADR 0151 / ADR 0033:MainChat 保持 450px 硬下限;工作面板上限为动态预算(`客户端宽度 − 450px − 展开的左栏宽度`,无固定上限);中栏到达阈值时展开的左栏立即让位(`sidebar-out` 退场期间仍计入预算)。手动重开左栏优先占用右栏宽度,否则以 460px 为目标;关闭右栏只恢复由布局机制收起的左栏。原生窗口不变:预留 seam 保持 0 且不套用任何面板几何。预览模式临时卸载 MainChat 并使用窗口级 chrome 行;侧边栏折叠时,macOS 窗口模式预留 88px、全屏预留 8px 给交通灯(D433)。见 ADR 0238 与 E2E-LAYOUT-three-column-width-priority。** | 固定客户区此前没有明确的宽度优先级,侧边停靠可以把 MainChat 压到下限、使 composer 不可用;显式化让位顺序后聊天在固定窗口内保持可读,且不重新引入原生窗口增长(issue #267)。 |
| D409 | 宿主拥有的会话协作消息 | *(由 D446 修订)* **修订 ADR 0237 / ADR 0165 / ADR 0213:Rust host-core 拥有以消息 id 和真实源/目标 Session ID 为键的持久会话协作 ledger。插件驱动的 `spawn`、`send`、`status`、`result` 和 `cancel` 使用已审查的 desktop-control 网关;发送者绑定当前插件 Agent 工具调用,目标回合保留原有配置,每条投递由实际持久回合认领。完成回调持久化且最多一次,并引用已结算回合。来源信息随转录行持久化,不能在重生成中伪造、剥离或编辑。增量架构 v16 迁移在重启后保留排队工作但不无人值守重放,执行权限上限和有界自主跳数,同时保持既有 Task 系列不变。见 ADR 0239 与 E2E-PLUGIN-session-orchestrator-real-workers。** | 插件之前的创建/提示轮询路径既无法推断持久回合结果,也无法安全确认双向发送者身份。宿主拥有的 ledger 让投递、来源、回调、取消和重启行为可审计,同时不恢复已撤回的 A2A 协议。 |
@@ -473,7 +474,7 @@
| D364 | Windows portable exe without installer | *(superseded by D603)* **Amend D120 / D126 / ADR 0022: tag builds publish a Windows x64 portable exe `PI-Desktop-Portable-${version}.exe` alongside the NSIS installer `PI-Desktop-Setup-${version}.exe`. The portable target does not write `latest.yml`. Packaged portable runs (`PORTABLE_EXECUTABLE_FILE`) use notify-and-link delivery. NSIS installs keep in-app download and quit-and-install. Data stays in the existing application data directory. Portable requests user execution level.** | Company environments that whitelist a single executable cannot run the NSIS installer. Applying the NSIS updater to a portable run would install the app, so portable stays manual (ADR 0197, E2E-211). |
| D603 | Windows portable delivery uses a normal ZIP | *(amended by D628)* **Amend D364 / ADR 0022 / ADR 0197: tag builds publish a Windows x64 portable ZIP `PI-Desktop-Portable-${version}.zip` alongside the NSIS installer `PI-Desktop-Setup-${version}.exe`. The Windows release helper builds NSIS and ZIP separately, stamps ZIP app metadata with `piDistribution = "zip"`, and keeps the ZIP target out of `latest.yml`. Extracted ZIP runs use notify-and-link delivery; the updater still recognizes `PORTABLE_EXECUTABLE_FILE` for older portable executables. Data stays in the existing application data directory.** | The self-extracting portable wrapper could trigger administrator prompts and did not provide a reliable normal executable identity for the taskbar. A user-extracted ZIP launches `PI-Desktop.exe` directly and preserves the manual-update boundary. |
| D260 | 发布文档是一个版本载体 | **稳定版本号提升必须在打标签之前更新每一处带版本号的载体:双语言的应用内变更日志及其测试清单、每个工作区的 `package.json`(包括之前被第三个工作区根 `scripts/release.mjs` 跳过的 `docs/package.json`)、Cargo 工作区版本与 `host-core` 的锁文件条目、`APP_VERSION`,以及 `README.md` 和 `README.zh-CN.md` 中声明的 `<major>.<minor>.x` 发布线。`scripts/check-release-docs.mjs` 校验全部这些;`scripts/release.mjs` 在提升版本号之后运行它,只要任一载体不一致就拒绝提交或打标签,`--skip-docs-check` 仅保留给刻意的非发布性版本提升。扩展 D164。** | 仅有应用内变更日志这道闸门,导致已发布的文档落后:版本已到 `0.10.8`,两个 README 仍在宣传 `0.5.x` 线,而 `docs/package.json` 停在 `0.5.8`。标签是不可逆的,所以这项检查在标签存在之前运行,而不是作为评审礼节。 |
-| D371 | 显式的未签名 macOS 首次启动助手 | *(由 D406 和 D443 修订)* **每个 macOS 分发都附带可执行的 `PI-Desktop-macOS-open.command`,放在 DMG 上拖入 Applications 手势下方的可见首启行。它只查找 `/Applications/PI-Desktop.app` 与 `~/Applications/PI-Desktop.app`,校验 `CFBundleIdentifier` 为 `net.aiuo.pi-desktop`,仅在存在时移除 `com.apple.quarantine`,然后打开应用。永不使用 `sudo`,不接受任意路径,也不替代 Developer ID 签名或公证。** | 未签名的 macOS 通道可能被 quarantine 拦截并显示误导性的\"已损坏\"提示,而仅限终端的 `xattr -cr` 说明比启动失败所需的范围更宽(ADR 0204,E2E-196b) |
+| D371 | 显式的未签名 macOS 首次启动助手 | *(由 D406、D443 和 D634 修订)* **每个 macOS 分发过去都附带可执行的 `PI-Desktop-macOS-open.command`;该助手现在已从分发中移除。见 ADR 0204、ADR 0309 与 E2E-196b。** | 未签名的 macOS 通道可能被 quarantine 拦截并显示误导性的“已损坏”提示,而仅限终端的 `xattr -cr` 说明比启动失败所需的范围更宽(ADR 0204,E2E-196b) |
| D443 | 规范应用 ID 与 macOS 代码签名标识 | **修订 D141 / D371 / ADR 0204:应用 ID 为 `net.aiuo.pi-desktop`(`APP_ID`、electron-builder `appId`、macOS `CFBundleIdentifier`、Windows AppUserModelID)。开发用 macOS 宿主为 `net.aiuo.pi-desktop.dev`。不要在 `afterPack`/`afterSign` 对未签名包做 adhoc 签名:嵌套 Electron helper 此时尚未签名,`codesign` 会报 `code object is not signed at all`。见 ADR 0278、issue #524。** | 所有者域名为 `net.aiuo.pi-desktop`。未签名包的 Identifier 绑定推迟到有安全的 helper 签名路径之后。 |
## V. 扩展激活决策
@@ -5119,3 +5120,12 @@ Markdown 源码,不是 `text/html` 负载;对禁用行内 HTML 的外部编
- 仅改变渲染器展示:不改转录、持久化、提供商思考设置或宿主行为。参见 ADR
turn-process-and-thinking-display、`04-ux/08-component-spec.md` 和
E2E-CHAT-turn-process-and-thinking-display。
+
+## 2026-09-27 —— 移除 macOS 首次启动辅助文件(D634)
+
+- DMG 仍是应用与 Applications 链接组成的双图标安装;ZIP 根目录包含
+ `PI-Desktop.app`。两种格式均不附带打开说明或可执行的 quarantine 清理助手,
+ 本地或未签名调试构建也一样。
+- 签名、公证、装订和更新程序通道保持不变。未签名调试工件不代表通过 Gatekeeper 验证。
+- `packaging-footprint.test.mjs` 检查打包配置;E2E-196b 覆盖本机 DMG 与 ZIP 归档检查。
+- D634 修订 D457 / ADR 0296,并取代 ADR 0232 / ADR 0204 中的 macOS 分发约定。见 ADR 0309。