muse_registry.py python
23 lines 759 B
Raw
sha256:4671b7f787ddbe63ced31c895b688c77ab495653b65a730b423329f26b3c1439 feat: K1-P1 complete — agent provenance, build-verification… Sonnet 4.6 patch 62 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:4671b7f787ddbe63ced31c895b688c77ab495653b65a730b423329f26b3c1439 feat: K1-P1 complete — agent provenance, build-verification… Sonnet 4.6 patch 62 days ago