Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
feat(packaging): ship a two-icon signed macOS DMG
vastsa63dda56fc7c6
diff --git a/README.md b/README.mdindex 48e6543ea..02db761c3 100644--- a/README.md+++ b/README.md@@ -382,7 +382,7 @@ xattr -r -d com.apple.quarantine /Applications/PI-Desktop.app4. Open PI-Desktop again.-The DMG includes `If app won't open, read this.txt`. The ZIP also includes `PI-Desktop-macOS-open.command`, which performs the same trusted-source fallback after the app is moved to Applications.+The ZIP includes `PI-Desktop-macOS-opening-help.txt` and `PI-Desktop-macOS-open.command`, which performs the same trusted-source fallback after the app is moved to Applications. The DMG is a two-icon install and does not include that note.The command only removes Apple's quarantine attribute. Do not use it for an untrusted app.diff --git a/README.zh-CN.md b/README.zh-CN.mdindex b0e2dcaed..02c7d307a 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -484,9 +484,7 @@ xattr -r -d com.apple.quarantine /Applications/PI-Desktop.app4. 再次打开 PI-Desktop-DMG 内包含 `If app won't open, read this.txt`。--ZIP 包也包含 `PI-Desktop-macOS-open.command`,在应用移动到 Applications 后可以执行相同的 trusted-source fallback。+ZIP 包包含 `PI-Desktop-macOS-opening-help.txt` 和 `PI-Desktop-macOS-open.command`,在应用移动到 Applications 后可以执行相同的 trusted-source fallback。DMG 是双图标安装,不再放入该说明。这个命令只会移除 Apple 的 quarantine 属性。diff --git a/apps/desktop/build/dmg-background.png b/apps/desktop/build/dmg-background.pngindex e2f410baa..3f869c1e3 100644Binary files a/apps/desktop/build/dmg-background.png and b/apps/desktop/build/dmg-background.png differdiff --git a/apps/desktop/build/[email protected] b/apps/desktop/build/[email protected]index fcc723d99..33cfa71ec 100644Binary files a/apps/desktop/build/[email protected] and b/apps/desktop/build/[email protected] differdiff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 2abee0cf3..1448db696 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -173,29 +173,23 @@"dmg": {"artifactName": "PI-Desktop-${version}-${arch}.${ext}","background": "build/dmg-background.png",+ "icon": "build/icon.icns","window": {"width": 720,- "height": 500+ "height": 440},- "iconSize": 96,+ "iconSize": 128,"iconTextSize": 12,"contents": [{"x": 180,- "y": 240+ "y": 196},{"x": 540,- "y": 240,+ "y": 196,"type": "link","path": "/Applications"- },- {- "x": 470,- "y": 370,- "type": "file",- "name": "If app won't open, read this.txt",- "path": "PI-Desktop-macOS-opening-help.txt"}]},diff --git a/apps/desktop/test/packaging-footprint.test.mjs b/apps/desktop/test/packaging-footprint.test.mjsindex 90ee666fc..69e4871d2 100644--- a/apps/desktop/test/packaging-footprint.test.mjs+++ b/apps/desktop/test/packaging-footprint.test.mjs@@ -234,41 +234,35 @@ test("macOS targets follow the native architecture selected by the runner", () =assert.doesNotMatch(packageJson.scripts["dist:mac"], /--(?:arm64|x64)/);});-test("macOS installers expose DMG guidance and retain the ZIP helper", () => {+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",]);assert.equal(packageJson.build.dmg.background, "build/dmg-background.png");- assert.deepEqual(packageJson.build.dmg.window, { width: 720, height: 500 });- assert.equal(packageJson.build.dmg.iconSize, 96);+ assert.equal(packageJson.build.dmg.icon, "build/icon.icns");+ assert.deepEqual(packageJson.build.dmg.window, { width: 720, height: 440 });+ assert.equal(packageJson.build.dmg.iconSize, 128);assert.equal(packageJson.build.dmg.iconTextSize, 12);assert.deepEqual(packageJson.build.dmg.contents, [- { x: 180, y: 240 },- { x: 540, y: 240, type: "link", path: "/Applications" },- {- x: 470,- y: 370,- type: "file",- name: "If app won't open, read this.txt",- path: "PI-Desktop-macOS-opening-help.txt",- },+ { x: 180, y: 196 },+ { x: 540, y: 196, type: "link", path: "/Applications" },]);assert.doesNotMatch(JSON.stringify(packageJson.build.dmg.contents),- /PI-Desktop-macOS-open\.command|Open PI-Desktop\.command/,- "the DMG must not expose the command helper",+ /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",);assert.deepEqual([...dmgBackground.subarray(0, 8)], [137, 80, 78, 71, 13, 10, 26, 10,]);assert.equal(dmgBackground.readUInt32BE(16), 720);- assert.equal(dmgBackground.readUInt32BE(20), 500);+ assert.equal(dmgBackground.readUInt32BE(20), 440);assert.deepEqual([...dmgBackgroundRetina.subarray(0, 8)], [137, 80, 78, 71, 13, 10, 26, 10,]);assert.equal(dmgBackgroundRetina.readUInt32BE(16), 1440);- assert.equal(dmgBackgroundRetina.readUInt32BE(20), 1000);+ assert.equal(dmgBackgroundRetina.readUInt32BE(20), 880);assert.ok(macOpenScriptStat.mode & 0o111, "opening helper must be executable");assert.match(macOpenFixNote,diff --git a/docs/adr/0204-unsigned-macos-first-launch-helper.md b/docs/adr/0204-unsigned-macos-first-launch-helper.mdindex fca034d31..116a07c92 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)+- Status: Accepted (amended by D406 / ADR 0232, D450 / ADR 0289, D457 / ADR 0296)- Date: 2026-09-09- Deciders: PI-Desktop core-- Related: D078, D371, D406, D450, E2E-196b, ADR 0289+- Related: D078, D371, D406, D450, D457, E2E-196b, ADR 0289, ADR 0296## Context@@ -66,3 +66,8 @@ describes a helper that is present in the DMG.Official GitHub tag releases are Developer ID-signed and notarized. Thefirst-launch helper and opening note remain for trusted unsigned local ordebug artifacts only. Official Release DMGs must not claim they are unsigned.++## Amendment (D457 / ADR 0296)++The DMG no longer shows the opening-help note. ZIP retains the helper and+note for trusted unsigned local or debug artifacts.diff --git a/docs/adr/0232-macos-dmg-text-only-opening-guidance.md b/docs/adr/0232-macos-dmg-text-only-opening-guidance.mdindex e210f8644..2968f203c 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+- Status: Accepted (amended by D457 / [ADR 0296](0296-macos-signed-dmg-two-icon-install.md))- Date: 2026-09-12- Deciders: PI-Desktop release maintainers- Amends: D371 / [ADR 0204](0204-unsigned-macos-first-launch-helper.md)@@ -43,3 +43,8 @@ command item beside the normal installation action.Chinese Finder label, absence of the command helper from that list, and theretained ZIP helper assets. E2E-196b covers native DMG and ZIP archiveinspection on macOS.++## Amendment (D457 / ADR 0296)++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.diff --git a/docs/adr/0296-macos-signed-dmg-two-icon-install.md b/docs/adr/0296-macos-signed-dmg-two-icon-install.mdnew file mode 100644index 000000000..dff41deab--- /dev/null+++ b/docs/adr/0296-macos-signed-dmg-two-icon-install.md@@ -0,0 +1,39 @@+# ADR 0296: Signed macOS DMG is a two-icon install++- Status: Accepted+- 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++## Context++Official GitHub Release DMGs are Developer ID-signed and notarized (ADR 0289).+The DMG still showed `If app won't open, read this.txt` from ADR 0232, which+was the unsigned first-launch fallback. That note is no longer the install+path for tagged builds and made the installer look like an error dialog.++## Decision++1. The macOS DMG contains only `PI-Desktop.app` and the Applications link, on+ a branded 720×440 dark plate with 128px icons. It does not include the+ opening-help note or `PI-Desktop-macOS-open.command`.+2. The macOS ZIP package still ships both `PI-Desktop-macOS-opening-help.txt`+ and the executable helper at its root, for trusted unsigned local or debug+ artifacts. Helper bounds from ADR 0204 are unchanged.+3. The DMG artwork is generated by `scripts/make-dmg-background.py` from the+ canonical app icon. Do not hand-edit the PNG pair.++## Consequences++- A tagged DMG is a single drag-to-Applications gesture.+- Unsigned local DMGs no longer carry the in-volume note; use the ZIP helper+ or the documented `xattr` command.+- Finder still localizes the Applications alias; the plate caption is English+ plus a quiet Chinese line.++## Verification++`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.diff --git a/docs/adr/README.md b/docs/adr/README.mdindex ab360400f..d1f5a2783 100644--- a/docs/adr/README.md+++ b/docs/adr/README.md@@ -254,7 +254,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 (amends D371 / ADR 0204) |+| 0232 | Keep macOS DMG opening guidance text-only | Accepted (amended by 0296; amends D371 / ADR 0204) || 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 |@@ -323,4 +323,5 @@ 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) || turn-process-and-thinking-display | [Turn process and thinking presentation](turn-process-and-thinking-display.md) | Accepted |diff --git a/docs/spec/05-security/01-security.md b/docs/spec/05-security/01-security.mdindex 9e0c4172b..37090f4f9 100644--- a/docs/spec/05-security/01-security.md+++ b/docs/spec/05-security/01-security.md@@ -184,14 +184,14 @@ explicit local/LAN endpoints; the market path does not widen that policy.fails closed; automatic failures stay ambient and explicit checks expose theerror.- Unsigned macOS distributions keep a narrow first-launch fallback for trusted- sources. The DMG exposes only a text note named `If app won't open, read this.txt`; it gives- the manual `com.apple.quarantine` command and says signed/notarized builds do- not need it. The ZIP package also includes the executable helper, which- searches only `/Applications/PI-Desktop.app` and `~/Applications/PI-Desktop.app`,+ 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 acceptsno arbitrary path, uses no privilege escalation, and is not a substitute for- Developer ID signing or notarization.+ Developer ID signing or notarization. The note gives the manual+ `com.apple.quarantine` command and says signed/notarized builds do not need it.- Localized product "what's new" text (D164/D345) is selected in Main from theshipped changelog catalog and attached to `UpdateState.releaseNotes`. Therenderer cannot supply a notes URL, feed, or remote body; missing catalogdiff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex c40911066..fc445ae9a 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -286,16 +286,16 @@ identify the platform validation still needed.ZIP artifacts for at least one native architecture; a test macOS account cancopy an app into `/Applications` or `~/Applications`.- **Steps**: 1) Open the DMG and inspect its root and layout. 2) Confirm the- app and Applications link form the main row, and `If app won't open, read this.txt` is the- only secondary item. 3) Confirm the DMG has no command helper. 4) Inspect+ 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) Inspectthe ZIP root without extracting the application contents and confirm it hasboth `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.-- **Expected**: The DMG contains the branded 720×500 background, the app,- Applications link, and the text-only opening note displayed as- `If app won't open, read this.txt`; it does not contain or expose the command helper. The- ZIP contains the helper and the same note at its root. The note includes+- **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`, explainsthat the fallback is only for a trusted unsigned artifact when macOS reportsthat the app is damaged or does not open, and says signed/notarized builds dodiff --git a/docs/spec/06-delivery/06-release-runbook.md b/docs/spec/06-delivery/06-release-runbook.mdindex a2585e095..8303cb22a 100644--- a/docs/spec/06-delivery/06-release-runbook.md+++ b/docs/spec/06-delivery/06-release-runbook.md@@ -250,22 +250,18 @@ asset names and matching checksums. Before upload, each macOS runner requiresexactly one architecture-labelled DMG and ZIP (including blockmaps) and rejectsany unlabelled or wrong-architecture macOS artifact.-The DMG uses a branded 720×500 background with a clear drag-to-Applications-gesture. The app and Applications link occupy the main row; the first-launch-opening note sits in a secondary row so the unsigned-build path is discoverable-without making it the normal installation action. The note is displayed as-`If app won't open, read this.txt`; the DMG does not include the executable command helper.--Every macOS DMG includes the companion-`PI-Desktop-macOS-opening-help.txt` at the package root under that display-name. The macOS ZIP includes both that note and the executable-`PI-Desktop-macOS-open.command`. 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:+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:```shxattr -r -d com.apple.quarantine /Applications/PI-Desktop.appdiff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.mdindex f026211cb..584aefbbf 100644--- a/docs/spec/08-meta/decisions-log.md+++ b/docs/spec/08-meta/decisions-log.md@@ -25,6 +25,7 @@ This log freezes previously open questions into concrete decisions.| D447 | Headless runtime boundary | **Amend ADR 0205 rollout R2 prerequisites (ADR 0284): the Electron-independent runtime layer under the Agent Host module lives in `packages/host-runtime` — the host-core and sidecar stdio transports, the restart supervisor (process-model §4 policy), the durable turn lifecycle (`RuntimeService` as the module's `RuntimePort`: `session.beginTurn` → user row → prompt → `session.endTurn`, abort lock, stale-terminal guard, single-flight finalization), transcript persistence with the D299 checkpoint, a headless launch resolver over host-core's own registries, approved Plan/Goal dispatch (D189), and the host-core adapters for `SessionPort` / `QueueStore` / `permissions.pending`. Electron main keeps thin adapters (binary and bundle locations, `ELECTRON_RUN_AS_NODE`, redacted stderr, schema/glibc diagnoses, renderer status pushes) and its own local prompt path. `TurnStartRequest` gains an optional `userMessageId`. No IPC, sidecar, host-core, Plugin SDK, default, or persisted-data change.** | `pi-host` must run the same lifecycle invariants as the desktop without Electron; a second implementation of abort locks, stale terminal events, and queue release after durable settlement would drift from the one the desktop already fixed || D448 | RACP-WS transport and device pairing | **Amend ADR 0205 rollout R2 (ADR 0285): `packages/racp` holds both ends of the normative `RACP-WS` binding. `RacpServer` dispatches every catalog operation through its role rule onto the Agent Host module and a `RacpHostOperations` interface the Host implements; `RacpClient` correlates requests, answers server-initiated requests, tracks the last durable cursor per session, reconnects with bounded backoff, and fails the dropped connection's in-flight calls with `HOST_DISCONNECTED` instead of re-sending them. Authentication is the header profile with Host-issued `pdt1.` device tokens and single-use, expiring `ppt1.` pairing tokens (hashed, constant-time compared; never in a URL); `connection/pair` mints an `owner` device. `connection/pair`, `project/register`, `project/browse`, `server.hostId`, the `events/closed` notification, and the codes `PAIRING_FAILED`, `PAIRING_TOKEN_EXPIRED`, `CAPABILITY_UNAVAILABLE`, `REMOTE_PATH_NOT_FOUND`, `REMOTE_PATH_FORBIDDEN`, `HOST_DISCONNECTED`, `HOST_BOOTSTRAP_FAILED`, `HOST_VERSION_MISMATCH`, `REMOTE_AUTH_FAILED`, `REMOTE_CONNECTION_FAILED`, `REMOTE_FORWARD_FAILED` join the contract (spec §14a). The bind refuses non-loopback addresses; attachments and the tool relay are advertised unavailable.** | The SSH-tunnel topology needs a server `pi-host` can bind and a client the desktop can run, with the pairing the security spec describes; the conformance behaviors that need no machine boundary become package tests || 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. |+| 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. || 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 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@@ -84,7 +85,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 | **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)* **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. || 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. |diff --git a/docs/zh-CN/adr/index.md b/docs/zh-CN/adr/index.mdindex 7670f883f..c88389d93 100644--- a/docs/zh-CN/adr/index.md+++ b/docs/zh-CN/adr/index.md@@ -58,7 +58,7 @@ ADR 记录那些不应被静默改变的架构选择。中文入口与英文索| [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) | DMG 只显示“如果打不开请看”说明,ZIP 保留首次启动助手 |+| [ADR 0232:macOS DMG 只保留打开说明](/adr/0232-macos-dmg-text-only-opening-guidance) | 由 ADR 0296 修订:DMG 现为双图标安装;ZIP 仍保留首次启动助手 || [ADR 0252:插件的宿主回合结束事件](/adr/0252-plugin-host-turn-end-event) | 宿主在每次已开始的回合结束时向插件宣告一次 `session:turnEnded`,携带回合身份与终止原因 |## 完整索引@@ -271,7 +271,7 @@ ADR 记录那些不应被静默改变的架构选择。中文入口与英文索| 0203 | [桌面操作的本地 MCP 控制平面](/adr/0203-local-mcp-control-plane) | 已接受(由 D372 修订) || 0204 | [未签名 macOS 首次启动助手](/adr/0204-unsigned-macos-first-launch-helper) | 已接受(由 D406 / ADR 0232 修订) || 0205 | [远程 Agent 控制使用专用的 Host 边界](/adr/0205-remote-agent-control-boundary) | 已接受待实现(MVP 之后;由 D376 修订) |-| 0232 | [macOS DMG 只保留打开说明](/adr/0232-macos-dmg-text-only-opening-guidance) | 已接受(修订 D371 / ADR 0204) |+| 0232 | [macOS DMG 只保留打开说明](/adr/0232-macos-dmg-text-only-opening-guidance) | 已接受(由 D457 / ADR 0296 修订;修订 D371 / ADR 0204) || 0241 | [文件视图改为 vendor 的可更新插件](/adr/0241-vendored-updatable-file-view-plugin) | 已接受(取代 ADR 0105;issue #304) || 0242 | [仅增量且合并的流式更新](/adr/0242-delta-only-streaming-updates) | 已接受(修订 0127 / 0130 / 0149 / 0153;issue #299) || 0243 | [技能市场公网 HTTPS 目录拉取](/adr/0243-skill-market-public-https-catalog) | 已接受(修订 ADR 0009;issue #287 / PR #290) |@@ -301,6 +301,7 @@ 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) |## 什么时候看 ADRdiff --git a/docs/zh-CN/spec/05-security/01-security.md b/docs/zh-CN/spec/05-security/01-security.mdindex 253915667..f8539073e 100644--- a/docs/zh-CN/spec/05-security/01-security.md+++ b/docs/zh-CN/spec/05-security/01-security.md@@ -154,12 +154,12 @@ MCP 市场只接受无凭据的公网 HTTPS 源和目录端点。Main 在每次- 客户端不携带 GitHub 令牌。私人或其他无法访问的提要关闭失败;自动故障保持在环境状态,显式检查会暴露错误。-- 未签名 macOS 分发包为可信来源保留范围明确的首次启动兜底路径。DMG 只展示名为- `If app won't open, read this.txt` 的文本说明,其中给出手动的 `com.apple.quarantine` 命令,并说明- 已签名/公证版本无需执行。ZIP 安装包还包含可执行助手:它只搜索+- 未签名 macOS 分发包为可信来源保留范围明确的首次启动兜底路径。DMG 是双图标安装,+ 不再放入该说明。ZIP 安装包包含文本说明和可执行助手:它只搜索`/Applications/PI-Desktop.app` 和 `~/Applications/PI-Desktop.app`,并在删除前先校验`CFBundleIdentifier=net.aiuo.pi-desktop`,再删除唯一的 `com.apple.quarantine` 属性并- 打开应用。它不接受任意路径,不提升权限,也不替代 Developer ID 签名或公证。+ 打开应用。它不接受任意路径,不提升权限,也不替代 Developer ID 签名或公证。说明给出+ 手动的 `com.apple.quarantine` 命令,并说明已签名/公证版本无需执行。- 本地化产品“新增内容”文本 (D164/D345) 在 Main 中从已发布变更日志目录并附加到 `UpdateState.releaseNotes`。的渲染器无法提供注释 URL、提要或远程主体;缺少目录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.mdindex c19e9d571..176d3e516 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@@ -3494,14 +3494,13 @@ IPC 请求无法关闭。- **先决条件**:默认未签名的 macOS 发布已为至少一个本机架构生成 DMG 和 ZIP 工件;测试 macOS 账户可以将应用复制到 `/Applications` 或 `~/Applications`。-- **步骤**:1) 打开 DMG 并检查根目录和布局。2) 确认应用与 Applications 链接位于主- 区域,且下方唯一的辅助项是 `If app won't open, read this.txt`。3) 确认 DMG 不含 command 助手。+- **步骤**: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×500 背景,包含应用、Applications 链接和显示为- `If app won't open, read this.txt` 的纯文本说明,不包含或暴露 command 助手。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`,diff --git a/docs/zh-CN/spec/06-delivery/06-release-runbook.md b/docs/zh-CN/spec/06-delivery/06-release-runbook.mdindex 55f982545..364bcee82 100644--- a/docs/zh-CN/spec/06-delivery/06-release-runbook.md+++ b/docs/zh-CN/spec/06-delivery/06-release-runbook.md@@ -204,18 +204,15 @@ Intel x64 通道发布 `PI-Desktop-<version>-x64.dmg` 和上传前,每个 macOS 运行器必须恰好生成一个带架构后缀的 DMG 和 ZIP(包括blockmap),任何无后缀或架构错误的 macOS 工件都会使发布失败。-DMG 使用带有品牌视觉的 720×500 背景,并明确展示拖入 Applications 的安装手势。-应用和 Applications 链接位于主区域;打开说明位于下方的辅助区域,这样未签名构建的-处理路径可被发现,但不会被误认为正常安装动作。说明显示为 `If app won't open, read this.txt`;-DMG 不包含可执行的 command 助手。--每个 macOS DMG 的安装包根目录都会包含配套的-`PI-Desktop-macOS-opening-help.txt`,显示名为 `If app won't open, read this.txt`。macOS ZIP-还包含该说明和可执行的 `PI-Desktop-macOS-open.command`。将 `PI-Desktop.app` 移动到-`/Applications` 或 `~/Applications` 后,ZIP 用户可以双击该助手。它只搜索这两个-固定位置,在存在时递归删除唯一的 `com.apple.quarantine` 属性,然后打开 PI-Desktop。-在执行前它会校验 `CFBundleIdentifier=net.aiuo.pi-desktop`。它不会使用 `sudo`,也不-接受任意应用路径。标准系统位置的终端备用命令为:+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`,也不接受任意应用路径。+标准系统位置的终端备用命令为:```shxattr -r -d com.apple.quarantine /Applications/PI-Desktop.appdiff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.mdindex 5436f66e5..780747edd 100644--- a/docs/zh-CN/spec/08-meta/decisions-log.md+++ b/docs/zh-CN/spec/08-meta/decisions-log.md@@ -29,6 +29,7 @@| D448 | RACP-WS 传输与设备配对 | **修订 ADR 0205 里程碑 R2(ADR 0285):`packages/racp` 同时承载规范绑定 `RACP-WS` 的两端。`RacpServer` 按目录的角色规则把每个操作分发到 Agent Host 模块与 Host 实现的 `RacpHostOperations` 接口;`RacpClient` 关联请求、应答服务端发起的请求、按会话记录最后的持久游标、以有界退避重连,并让断开连接上未完成的调用以 `HOST_DISCONNECTED` 失败而不是重发。认证采用 header profile:Host 签发的 `pdt1.` 设备令牌与一次性、有时限的 `ppt1.` 配对令牌(散列存储、常量时间比较、绝不出现在 URL 中);`connection/pair` 铸造 `owner` 设备。`connection/pair`、`project/register`、`project/browse`、`server.hostId`、`events/closed` 通知,以及错误码 `PAIRING_FAILED`、`PAIRING_TOKEN_EXPIRED`、`CAPABILITY_UNAVAILABLE`、`REMOTE_PATH_NOT_FOUND`、`REMOTE_PATH_FORBIDDEN`、`HOST_DISCONNECTED`、`HOST_BOOTSTRAP_FAILED`、`HOST_VERSION_MISMATCH`、`REMOTE_AUTH_FAILED`、`REMOTE_CONNECTION_FAILED`、`REMOTE_FORWARD_FAILED` 进入契约(规格 §14a)。绑定拒绝非回环地址;附件与工具中继宣告为不可用。** | SSH 隧道拓扑需要 `pi-host` 能绑定的服务端和桌面能运行的客户端,以及安全规格描述的配对;不需要机器边界的一致性行为成为包内测试 || 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。 || 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 portable 仍为通知并打开发布页。禁止 afterPack/afterSign adhoc 签名(ADR 0278)。** | 正式 DMG 应无需 Gatekeeper 警告即可打开,已签名 macOS 安装可下载并重启到新 tag。见 ADR 0289、E2E-196c、E2E-067A。 |+| 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);安装盘上的未签名打开说明读起来像报错。 |## B. 辅助实现默认值@@ -87,7 +88,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 只保留打开说明 | **修订 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 修订)* **修订 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 的正常安装路径简洁,同时在未签名应用打不开时提供可见且可执行的处理指引。 || 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 协议。 |diff --git a/packages/shared/src/changelog-de.ts b/packages/shared/src/changelog-de.tsindex a13d00018..4ddda4106 100644--- a/packages/shared/src/changelog-de.ts+++ b/packages/shared/src/changelog-de.ts@@ -13,6 +13,7 @@ export const deEntries: ChangelogEntry[] = ["Skills und MCP-Server anderer Agent-Tools lassen sich scannen und gesammelt importieren.","Das macOS-Menüleisten-Extra bleibt auf einem nativen Statusitem, mit begrenzten Tray-Sitzungs-Shortcuts.","Offizielle macOS-Builds sind signiert und notariell beglaubigt und unterstützen In-App-Updates.",+ "Die signierte macOS-DMG ist eine Zwei-Symbol-Installation; der Hinweis für unsignierte Starts bleibt nur im ZIP.","Review öffnet sich nur auf ausdrückliche Aktion; das Öffnen einer Sitzung landet bei der neuesten Runde.","Eine blockierte Sendewarteschlange wird wiederhergestellt, gefälschte Steering-Origins werden ignoriert.",],diff --git a/packages/shared/src/changelog-es.ts b/packages/shared/src/changelog-es.tsindex 01f81fb23..0fa8ceedc 100644--- a/packages/shared/src/changelog-es.ts+++ b/packages/shared/src/changelog-es.ts@@ -13,6 +13,7 @@ export const esEntries: ChangelogEntry[] = ["Escanea e importa en lote skills y servidores MCP de otras herramientas de agente.","El extra de la barra de menús de macOS usa un status item nativo, con atajos de sesión acotados en la bandeja.","Las compilaciones oficiales de macOS van firmadas y notarizadas, con actualizaciones in-app.",+ "La DMG firmada de macOS instala con dos iconos; la nota de apertura sin firmar queda solo en el ZIP.","Review se abre solo cuando lo pides, y al abrir una sesión aterrizas en el último turno.","Recupera una cola de envío atascada e ignora orígenes de steering falsificados.",],diff --git a/packages/shared/src/changelog-fr.ts b/packages/shared/src/changelog-fr.tsindex bf7f546cb..a97f36b1d 100644--- a/packages/shared/src/changelog-fr.ts+++ b/packages/shared/src/changelog-fr.ts@@ -13,6 +13,7 @@ export const frEntries: ChangelogEntry[] = ["Analysez et importez en lot les skills et serveurs MCP d'autres outils d'agent.","L'extra de la barre de menus macOS reste sur un status item natif, avec des raccourcis de session limités dans le plateau.","Les builds macOS officiels sont signés, notariés, et gèrent les mises à jour in-app.",+ "La DMG macOS signée s'installe en deux icônes ; la note d'ouverture non signée reste uniquement dans le ZIP.","Review ne s'ouvre que sur action explicite, et l'ouverture d'une session atterrit sur le dernier tour.","Une file d'envoi bloquée se rétablit, et les origines de steering falsifiées sont ignorées.",],diff --git a/packages/shared/src/changelog-ko.ts b/packages/shared/src/changelog-ko.tsindex e034d5fdf..cac6bc5b9 100644--- a/packages/shared/src/changelog-ko.ts+++ b/packages/shared/src/changelog-ko.ts@@ -13,6 +13,7 @@ export const koEntries: ChangelogEntry[] = ["다른 에이전트 도구의 스킬과 MCP 서버를 스캔해 일괄 가져올 수 있습니다.","macOS 메뉴 막대 엑스트라는 네이티브 상태 항목을 쓰고, 트레이에 제한된 세션 바로가기를 둡니다.","공식 macOS 빌드는 서명·공증되며 앱 내 업데이트를 지원합니다.",+ "서명된 macOS DMG는 아이콘 두 개로 설치하며, 미서명 실행 안내는 ZIP에만 남습니다.","Review는 직접 열 때만 나타나고, 세션을 열면 최신 턴에 착지합니다.","멈춘 전송 큐를 복구하고, 위조된 스티어링 origin은 무시합니다.",],diff --git a/packages/shared/src/changelog-tr.ts b/packages/shared/src/changelog-tr.tsindex 915c83060..5f9288b17 100644--- a/packages/shared/src/changelog-tr.ts+++ b/packages/shared/src/changelog-tr.ts@@ -13,6 +13,7 @@ export const trEntries: ChangelogEntry[] = ["Diğer ajan araçlarındaki skill ve MCP sunucularını tarayıp toplu içe aktarın.","macOS menü çubuğu eklentisi yerel bir durum öğesinde kalır; tepside sınırlı oturum kısayolları vardır.","Resmi macOS derlemeleri imzalanır, noter onaylanır ve uygulama içi güncellemeyi destekler.",+ "İmzalı macOS DMG iki simgeyle kurulur; imzasız açılış notu yalnızca ZIP'te kalır.","Review yalnızca siz isteyince açılır; oturum açınca en son tura iner.","Takılı bir gönderim kuyruğunu kurtarır ve sahte steering kökenlerini yok sayar.",],diff --git a/packages/shared/src/changelog.ts b/packages/shared/src/changelog.tsindex 2ed165181..89c1b8c26 100644--- a/packages/shared/src/changelog.ts+++ b/packages/shared/src/changelog.ts@@ -40,6 +40,7 @@ const enEntries: ChangelogEntry[] = ["Scan and batch-import skills and MCP servers from other agent tools.","Keep the macOS menu-bar extra on a native status item, with bounded tray session shortcuts.","Ship signed and notarized official macOS builds with in-app updates.",+ "Install from a two-icon signed macOS DMG; the unsigned-opening note stays in the ZIP only.","Open Review only when you ask, and land on the latest turn when opening a session.","Recover a stuck send queue, and ignore forged steering origin.",],@@ -821,6 +822,7 @@ const zhCNEntries: ChangelogEntry[] = ["可扫描并批量导入其他 Agent 工具里的 Skills 和 MCP 服务器。","macOS 菜单栏额外项改用原生状态项,并提供有上限的托盘会话快捷入口。","官方 macOS 构建改为签名、公证,并支持应用内更新。",+ "已签名的 macOS DMG 改为双图标拖入 Applications 安装,未签名打开说明只保留在 ZIP 里。","仅在主动打开时显示 Review 面板,打开会话时落在最新一轮。","卡住的发送队列可自动恢复,并忽略伪造来源的转向消息。",],@@ -1602,6 +1604,7 @@ const zhTWEntries: ChangelogEntry[] = ["可掃描並批次匯入其他 Agent 工具裡的 Skills 和 MCP 伺服器。","macOS 選單列額外項改用原生狀態項,並提供有上限的托盤工作階段捷徑。","官方 macOS 建置改為簽名、公證,並支援應用程式內更新。",+ "已簽名的 macOS DMG 改為雙圖示拖入 Applications 安裝,未簽名開啟說明只保留在 ZIP 裡。","僅在主動開啟時顯示 Review 面板,開啟工作階段時落在最新一輪。","卡住的傳送佇列可自動恢復,並忽略偽造來源的轉向訊息。",],diff --git a/scripts/make-dmg-background.py b/scripts/make-dmg-background.pynew file mode 100755index 000000000..93cad7196--- /dev/null+++ b/scripts/make-dmg-background.py@@ -0,0 +1,195 @@+#!/usr/bin/env python3+"""Paint the macOS DMG background used by electron-builder.++The Finder window is 720x440 with a 128px two-icon install row. This script+emits the 1x plate and the 1440x880 retina companion that electron-builder+picks up as ``[email protected]``.++Run: python3 scripts/make-dmg-background.py+"""++from __future__ import annotations++import math+from pathlib import Path++from PIL import Image, ImageDraw, ImageFilter, ImageFont++ROOT = Path(__file__).resolve().parent.parent+BUILD = ROOT / "apps" / "desktop" / "build"+ICON_SOURCE = BUILD / "icon_1024.png"++# Logical 1x coordinates. Keep in sync with apps/desktop/package.json build.dmg.+WIDTH = 720+HEIGHT = 440+SCALE = 2+APP = (180, 196)+APPLICATIONS = (540, 196)+ICON_SIZE = 128++PLATE = (24, 24, 24, 255)+LIFT = (52, 52, 52, 255)+RING = (255, 255, 255, 42)+INK = (255, 255, 255, 255)+MUTED = (180, 180, 180, 255)+FAINT = (120, 120, 120, 255)+ARROW = (232, 232, 232, 255)+++def _px(value: float) -> int:+ return int(round(value * SCALE))+++def _font(path: str, size: float, index: int = 0) -> ImageFont.FreeTypeFont | ImageFont.ImageFont:+ try:+ return ImageFont.truetype(path, _px(size), index=index)+ except OSError:+ return ImageFont.load_default()+++def _center_text(+ draw: ImageDraw.ImageDraw,+ text: str,+ cy: float,+ font: ImageFont.ImageFont,+ fill: tuple[int, int, int, int],+) -> None:+ x0, y0, x1, y1 = draw.textbbox((0, 0), text, font=font)+ x = _px(WIDTH / 2) - (x1 - x0) // 2 - x0+ y = _px(cy) - (y1 - y0) // 2 - y0+ draw.text((x, y), text, font=font, fill=fill)+++def _radial(size: int, color: tuple[int, int, int, int], inner: float = 0.18) -> Image.Image:+ layer = Image.new("RGBA", (size, size), (0, 0, 0, 0))+ pixels = layer.load()+ radius = (size - 1) / 2+ cx = cy = radius+ red, green, blue, alpha = color+ for y in range(size):+ dy = (y - cy) / radius+ for x in range(size):+ dist = math.hypot((x - cx) / radius, dy)+ if dist >= 1:+ continue+ if dist <= inner:+ falloff = 1.0+ else:+ t = (dist - inner) / (1.0 - inner)+ falloff = (1.0 - t) * (1.0 - t)+ pixels[x, y] = (red, green, blue, int(alpha * falloff))+ return layer+++def _paste(base: Image.Image, layer: Image.Image, cx: float, cy: float) -> None:+ x = _px(cx) - layer.width // 2+ y = _px(cy) - layer.height // 2+ base.alpha_composite(layer, (x, y))+++def _grain(size: tuple[int, int]) -> Image.Image:+ noise = Image.effect_noise(size, 18).convert("L")+ layer = Image.new("RGBA", size, (255, 255, 255, 0))+ layer.putalpha(noise.point(lambda value: 10 if value > 140 else 0))+ return layer+++def _ring(base: Image.Image, cx: float, cy: float) -> None:+ diameter = _px(ICON_SIZE + 16)+ pad = Image.new("RGBA", (diameter, diameter), (0, 0, 0, 0))+ draw = ImageDraw.Draw(pad)+ inset = max(1, _px(1.25))+ draw.ellipse(+ (inset, inset, diameter - inset - 1, diameter - inset - 1),+ outline=RING,+ width=max(1, _px(1.25)),+ )+ _paste(base, pad, cx, cy)+++def _arrow(base: Image.Image) -> None:+ layer = Image.new("RGBA", (_px(WIDTH), _px(HEIGHT)), (0, 0, 0, 0))+ draw = ImageDraw.Draw(layer)+ y = _px(APP[1])+ x0 = _px(APP[0] + 86)+ x1 = _px(APPLICATIONS[0] - 98)+ stroke = max(3, _px(2.5))+ draw.line((x0, y, x1 - _px(14), y), fill=ARROW, width=stroke)+ head = [+ (x1 - _px(20), y - _px(12)),+ (x1 + _px(2), y),+ (x1 - _px(20), y + _px(12)),+ (x1 - _px(13), y),+ ]+ draw.polygon(head, fill=ARROW)+ base.alpha_composite(layer.filter(ImageFilter.GaussianBlur(0.4)))+++def _wordmark(base: Image.Image) -> None:+ mark_size = _px(26)+ with Image.open(ICON_SOURCE) as source:+ mark = source.convert("RGBA").resize((mark_size, mark_size), Image.LANCZOS)++ title_font = _font("/System/Library/Fonts/HelveticaNeue.ttc", 21, index=10)+ caption_font = _font("/System/Library/Fonts/HelveticaNeue.ttc", 13, index=0)+ zh_font = _font("/System/Library/Fonts/Hiragino Sans GB.ttc", 12, index=0)++ draw = ImageDraw.Draw(base)+ title = "PI-Desktop"+ x0, y0, x1, y1 = draw.textbbox((0, 0), title, font=title_font)+ gap = _px(10)+ cluster_w = mark_size + gap + (x1 - x0)+ left = _px(WIDTH / 2) - cluster_w // 2+ top = _px(42) - mark_size // 2+ base.alpha_composite(mark, (left, top))+ draw.text(+ (left + mark_size + gap - x0, _px(42) - (y1 - y0) // 2 - y0),+ title,+ font=title_font,+ fill=INK,+ )+ _center_text(draw, "Drag to Applications to install", 328, caption_font, MUTED)+ _center_text(draw, "拖到「应用程序」完成安装", 352, zh_font, FAINT)+++def render() -> Image.Image:+ canvas = Image.new("RGBA", (_px(WIDTH), _px(HEIGHT)), PLATE)+ _paste(+ canvas,+ _radial(_px(920), LIFT, inner=0.16).filter(ImageFilter.GaussianBlur(_px(36))),+ WIDTH / 2,+ HEIGHT / 2 + 12,+ )+ for cx, cy in (APP, APPLICATIONS):+ _paste(+ canvas,+ _radial(_px(188), (255, 255, 255, 16), inner=0.28).filter(+ ImageFilter.GaussianBlur(_px(10))+ ),+ cx,+ cy,+ )+ _ring(canvas, cx, cy)+ canvas.alpha_composite(_grain(canvas.size))+ _arrow(canvas)+ _wordmark(canvas)+ return canvas+++def main() -> None:+ if not ICON_SOURCE.is_file():+ raise FileNotFoundError(f"canonical logo is missing: {ICON_SOURCE}")++ BUILD.mkdir(parents=True, exist_ok=True)+ retina = render()+ one_x = retina.resize((WIDTH, HEIGHT), Image.LANCZOS)+ retina_path = BUILD / "[email protected]"+ one_x_path = BUILD / "dmg-background.png"+ retina.save(retina_path, format="PNG", optimize=True)+ one_x.save(one_x_path, format="PNG", optimize=True)+ print(f"wrote {one_x_path} ({WIDTH}x{HEIGHT})")+ print(f"wrote {retina_path} ({_px(WIDTH)}x{_px(HEIGHT)})")+++if __name__ == "__main__":+ main()