NPS

English 中文版

NPS Daemon Architecture

Reference deployment topology for NPS in production. Six resident services spread across three layers; each layer is independently scalable and has distinct trust / failure boundaries.

Status — alpha.18 source / alpha.19 debt-closure boundary: npsd multiplexes HTTP and local-dev native NCP on its configured loopback port, with bounded preamble/Hello negotiation and Anchor ACK/cache. Its per-NID inbox now uses durable SQLite with restart-safe TTL, priority and acknowledgement semantics. Resident/hybrid push is deliberately declined for this ephemeral L1 profile, and full Node L1 remains unclaimed. nps-ingress implements the native TLS 1.3 / ALPN nps/1.0 / mTLS / session-NID binding transport boundary. The applicable TC-N2-Tls-01..04 family is executable; broader admission roadmap items are explicitly dispositioned and not claimed as transport capabilities. nps-runner implements inbox dispatch, portable OCI SpawnSpec resolution/execution, bounded worker lifecycle, and durable SQLite task leases with cross-process claim, restart/reclaim, terminal dedup and stale-owner fencing evidence. Full TaskFrame DAG/Saga L3 certification is not claimed; its per-case manifest records the exact boundary. Other daemon closure work is tracked separately.


The three layers

┌──────────────────────────────────────────────────────────────────────┐
│ Layer 3 — Trust anchor       (NPS Cloud, 2027 Q1+)                   │
│ ┌──────────────────┐                  ┌──────────────────┐           │
│ │ ⑤ nps-cloud-ca   │                  │ ⑥ nps-ledger     │           │
│ │ X.509 issuance   │                  │ K-of-N audit log │           │
│ │ CRL / OCSP       │                  │ tamper-evident   │           │
│ └────────┬─────────┘                  └────────┬─────────┘           │
└──────────┼─────────────────────────────────────┼─────────────────────┘
           ▼                                     ▼
┌──────────────────────────────────────────────────────────────────────┐
│ Layer 2 — Network entry       (per ingress kind, on demand)          │
│ ┌──────────────────┐                  ┌──────────────────┐           │
│ │ ③ nps-ingress    │                  │ ④ nps-registry   │           │
│ │ Public Internet  │                  │ Cross-machine    │           │
│ │ NPS-over-TLS     │                  │ NDP resolve+graph│           │
│ │ TLS + NID bind   │                  │ (L2 stage)       │           │
│ └────────┬─────────┘                  └────────┬─────────┘           │
└──────────┼─────────────────────────────────────┼─────────────────────┘
           ▼                                     ▼
┌──────────────────────────────────────────────────────────────────────┐
│ Layer 1 — Host-local          (one of each per machine)              │
│ ┌──────────────────┐                  ┌──────────────────┐           │
│ │ ① npsd           │ ◀── inbox ─────  │ ② nps-runner     │           │
│ │ NCP wire +       │                  │ FaaS scheduler   │           │
│ │ root keypair +   │ ── spawn-spec ─▶ │ ephemeral worker │           │
│ │ session reg +    │                  │ lifecycle (L3)   │           │
│ │ inbox            │                  │                  │           │
│ │ port :17433      │                  │                  │           │
│ └──────────────────┘                  └──────────────────┘           │
└──────────────────────────────────────────────────────────────────────┘

The six daemons

Layer 1 — Host-local (one of each per machine)

① npsd — Protocol ingress + state host

② nps-runner — Task scheduler / FaaS runtime (L3 stage)

Layer 2 — Network entry (per ingress kind, on demand)

③ nps-ingress — Internet ingress

④ nps-registry — Discovery registry (L2 stage, optionally hosted)

Layer 3 — Trust anchor (NPS Cloud, 2027 Q1+)

⑤ nps-cloud-ca — Certificate authority

⑥ nps-ledger — Audit / compliance log collector


Naming and binary layout

Daemon Folder Project Binary NuGet package
① tools/daemons/npsd/ Npsd.csproj npsd LabAcacia.NPS.Daemon.Npsd
② tools/daemons/nps-runner/ NpsRunner.csproj nps-runner LabAcacia.NPS.Daemon.Runner
③ tools/daemons/nps-ingress/ NpsIngress.csproj nps-ingress LabAcacia.NPS.Daemon.Ingress
④ tools/daemons/nps-registry/ NpsRegistry.csproj nps-registry LabAcacia.NPS.Daemon.Registry
⑤ tools/daemons/nps-cloud-ca/ NpsCloudCa.csproj nps-cloud-ca LabAcacia.NPS.Daemon.CloudCa
⑥ tools/daemons/nps-ledger/ NpsLedger.csproj nps-ledger LabAcacia.NPS.Daemon.Ledger

Historical alpha-to-beta phasing record

The table below preserves the alpha.4 planning snapshot; it is not a current capability matrix. Current nps-ingress and nps-runner behavior and gaps are stated in their sections above and in the daemon READMEs.

Daemon alpha.3 alpha.4 (this release) alpha.11+ beta / 1.0
npsd L1 minimum: HTTP listener on 127.0.0.1:17433, root keypair generation, /.nwm, baseline /health, AnnounceFrame on local NDP L1+: sub-NID issuance, per-NID inbox queue, NCP native-mode preamble runtime (NPS-RFC-0001) Push to resident agents Conformance with full L1 + L2
nps-runner Skeleton + Generic-Host worker; documents the inbox-watch contract Inbox poller wired through npsd Spawn lifecycle, isolation L3 conformance
nps-ingress Skeleton + HTTP listener on 0.0.0.0:443 (TLS off); documents NeuronHub integration points Anchor Node middleware (NPS-CR-0001 wiring) Reputation lookup (NPS-RFC-0004) DDoS, CGN debit
nps-registry Skeleton + HTTP listener; placeholder Resolve/Graph endpoints returning NDP-REGISTRY-UNAVAILABLE Real SQLite-backed registry: Announce / Resolve / Graph all live; TTL lazy expiry; monotonic graph seq; file or in-memory via env HA cluster mode Federation
nps-cloud-ca Skeleton; defers to tools/nip-ca-server* (six per-language OSS CAs) for actual issuance NPS-RFC-0002 X.509 + ACME wiring (skeleton; full issuance in nip-ca-server) HSM integration Cross-CA trust
nps-ledger Skeleton + in-memory log honouring the NPS-RFC-0004 Phase 1 entry shape Phase 2: SQLite persistence, RFC 9162 Merkle tree, operator-signed STH, /v1/log/proof inclusion proof endpoint STH gossip, public mirror Public log accreditation

Copyright: LabAcacia / INNO LOTUS PTY LTD · Apache 2.0