P-MATRIX 4.0 Field Node Runtime — State Vector exchange, peer verification, local decision and enforcement for CLI Monitor integration.
Internal dependency — automatically installed with
@pmatrix/openclaw-monitor,@pmatrix/claude-code-monitor,@pmatrix/cursor-monitor,@pmatrix/gemini-cli-monitor.
- Exchange — Peer-to-peer State Vector sharing via WebSocket
- Verify — Policy digest, freshness, integrity, risk sanity
- Decide — Posture determination (maintain/caution/restrict/reject)
- PEP — Policy Enforcement Point (callback-only, non-executive)
risk_info— R(t) + 4-axis breakdownlifecycle_info— loop count, current modefreshness_evidence— timestamp, TTLintegrity_evidence— SHA-256 signaturepolicy_digest— sha256:<hex> policy hash
R(t) = 1 - (BASELINE + NORM + (1 - STABILITY) + META_CONTROL) / 4
stability is inverted: higher stability = more drift = higher risk
| Module | Purpose |
|---|---|
| state-vector-builder | SV construction + R(t) computation |
| local-verifier | Peer SV verification |
| local-decider | Posture determination |
| local-pep | Callback-based policy enforcement |
| audit-emitter | Append-only audit events |
| peer-exchange-client | WS peer exchange |
| field-guard | 4.0 activation guard |
| file-adapter | IPC file adapter |
| Variable | Required | Description |
|---|---|---|
PMATRIX_FIELD_ID |
Yes (4.0) | Field identifier |
PMATRIX_FIELD_NODE_ID |
Yes (4.0) | Node identifier |
PMATRIX_FIELD_WS_URL |
No | WS endpoint override |
Both PMATRIX_FIELD_ID and PMATRIX_FIELD_NODE_ID must be set to activate 4.0 mode.
Apache-2.0 — see LICENSE