muse_registry.py python
23 lines 759 B
Raw
sha256:c07f2f34a0db9f43fe866f157d1935322008545ff8940c06c7c921eb219c55ab NXP-b DONE: independent BV-r2 pass + ISR (SD-17) Human minor ⚠ breaking 2 days ago
1 """Optional Muse agent-key registry seam (§P0.4 / §P0.7).
2
3 The kit verifies signatures; Muse owns key custody. Under Muse-backed regimes,
4 ``human_ref`` may resolve via an injected registry in tests or future adapters.
5 """
6
7 from __future__ import annotations
8
9 from typing import Protocol
10
11
12 class MuseAgentKeyRegistry(Protocol):
13 """Resolve an agent public key from a human owner reference."""
14
15 def resolve_pubkey(self, *, human_ref: str, agent_id: str) -> str | None:
16 """Return ``ed25519:<base64>`` pubkey token or None when unknown."""
17
18
19 class NullMuseAgentKeyRegistry:
20 """Default registry: no Muse lookup (entry-embedded pubkey only)."""
21
22 def resolve_pubkey(self, *, human_ref: str, agent_id: str) -> str | None:
23 return None
File History 1 commit
sha256:c07f2f34a0db9f43fe866f157d1935322008545ff8940c06c7c921eb219c55ab NXP-b DONE: independent BV-r2 pass + ISR (SD-17) Human minor 2 days ago