-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
epic:server-foundationEpic 2: Server Foundation (ppg serve)Epic 2: Server Foundation (ppg serve)mobilePPG Mobile projectPPG Mobile project
Description
Epic 2: Server Foundation — Issue 1/5
Source: Composite — 2-agent's lifecycle + serve-auth's security
Description
Create the ppg serve command and Fastify server scaffold with plugin architecture, CORS, health endpoint, graceful shutdown, and state file management.
Acceptance Criteria
-
src/commands/serve.ts— Commander.js registration with--port,--host,--token,--daemon,--json -
src/server/index.ts— Fastify instance with CORS, plugin registration hooks - Health endpoint:
GET /healthreturns{ status: "ok", uptime, version } - Graceful shutdown on SIGTERM/SIGINT
- State file (
serve.json) with0o600permissions - Path helpers:
serveConfigPath(),servePidPath()inlib/paths.ts - QR code display on startup (token + connection URL)
- Network interface detection for LAN IP
Files to Create/Modify
src/commands/serve.ts(new)src/server/index.ts(new)src/lib/paths.ts(add serve paths)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
epic:server-foundationEpic 2: Server Foundation (ppg serve)Epic 2: Server Foundation (ppg serve)mobilePPG Mobile projectPPG Mobile project