feat: session-first workspace activity and installable daemon

Workspaces page:
- list the newest sessions across workspaces in the activity column; the
  daemon exposes GET /api/v1/sessions/recent as a disk projection and the
  browser enriches live rows from the per-workspace session relay
- put recent activity first below 1100px and fix the mobile page-header
  flex-basis gap

Smoke:
- pin PI2_HOST=127.0.0.1 in both smoke scripts and make the startup-line
  assertion follow the configured host; the daemon default stays 0.0.0.0

Install:
- standalone binary build/install scripts, packaging templates, CI/release
  hooks, CLI-first install docs and the supporting config/doctor changes
This commit is contained in:
yuez committed 2026-10-28 10:53:48 +08:00
1 parent fc51c3be37
commit d2e20d428a
50 files changed
+5104 -188

No files matched your search

+3 -9
View File
@@ -1,6 +1,6 @@
/** Small shared helpers for the `pi2` command line front end (and `pi2 daemon`). */
import { readFileSync, realpathSync } from "node:fs";
import { fileURLToPath } from "node:url";
import { realpathSync } from "node:fs";
import { version } from "../core/install.js";
/** Bad arguments; the CLI prints the usage block and exits 2. */
export class UsageError extends Error {
@@ -100,13 +100,7 @@ export function boolFlag(flags: Record<string, FlagValue>, name: string): boolea
/** Version of the installed package (`dist/cli/*` sits two levels below it). */
export function packageVersion(): string {
try {
const file = fileURLToPath(new URL("../../package.json", import.meta.url));
const parsed = JSON.parse(readFileSync(file, "utf8")) as { version?: unknown };
return typeof parsed.version === "string" ? parsed.version : "0.0.0";
} catch {
return "0.0.0";
}
return version();
}
export function realpathOrSelf(path: string): string {