← Back to docs

PCP · pcp

Portal PCP Daemon — Capability Detection & Event Pipeline

The PCP daemon that runs persistently, detects apps, verifies manifests, and routes capability invocations between Portal and apps.

portal-pcpdv0.2.0pcp
4.3K
Lines of Code
107
Tests
28
Files

Architecture

Binary crate with main.rs entry point. Uses pcp-core (types), pcp-registry (capability storage), pcp-ipc (app communication), pcp-push (event bus).

Overview

portal-pcpd is the central daemon for the Portal Capability Protocol. It runs as a systemd service, detects Tier 1 apps (via .desktop file X-Portal-PCP-Manifest keys) and Tier 2 apps (via AT-SPI2), verifies Ed25519 manifest signatures, registers capabilities in the pcp-registry, and routes capability invocations from Portal UI/shell to the appropriate app. It also manages the push event bus for capability state changes, health monitoring, and crash recovery.

Data Flow

Apps start → pcpd detects via .desktop/AT-SPI2 → verifies manifest → registers capabilities → Portal invokes → pcpd routes to app via IPC → response back

Dependencies

External (11)

tokio workspacetracing workspacetracing-subscriber workspacechrono workspaceuuid workspaceserde_json workspaceserde workspaceasync-trait workspacethiserror workspacenotify workspaceparking_lot workspace

Depends on all PCP crates. Runs as portal-pcpd.service, starts after portal.service.