feat(cli)!: merge the daemon into pi2 as the daemon subcommand

`pi2 daemon [start] [flags]` now starts the web-console daemon. The
`pi2d` executable, its bin entry and its entry module are removed: the
daemon keeps its lock -> token -> plugin socket -> listen -> daemon.json
lifecycle, its single stdout line (`pi2 daemon listening on ...`) and the
signal handling that leaves managed nvim instances running.

Service files are renamed to `pi2.service` / `com.pi2.daemon`, and the
smoke and e2e harnesses start the daemon through `pi2 daemon`.

BREAKING CHANGE: the `pi2d` command no longer exists; use `pi2 daemon`
(or `pi2 daemon start`). Existing systemd/launchd units installed under
the old names must be reinstalled with `pi2 install-service --write`.
This commit is contained in:
yuez committed 2026-10-22 15:47:48 +08:00
1 parent b02f4e9070
commit 7e780515ac
38 files changed
+295 -232

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
/**
* Test-only pi extension for the pi2d API/WS end-to-end suite (docs/e2e.md A11).
* Test-only pi extension for the pi2 daemon API/WS end-to-end suite (docs/e2e.md A11).
*
* The suite must prove the pre-execution attention/diff contract without a real
* terminal UI:
@@ -18,7 +18,7 @@
*
* The title payload uses the web console's documented diff shape
* `{toolName, files:[{path, before, after}]}` (see
* `pi2d/web/src/features/chat/diff.ts:diffFilesFromPayload`), so the same JSON
* `web/src/features/chat/diff.ts:diffFilesFromPayload`), so the same JSON
* drives both the plugin's attention classification and the web diff view.
*
* Determinism: the select is issued from the tool call (no timing tricks). A