Harden Sigil: sigil/__init__.py

This commit is contained in:
bigpickle 2026-10-05 21:24:33 +08:00 committed by leora
parent 3d1087c17c
commit 17792d96fb

View File

@ -11,9 +11,12 @@ without the private key, which never leaves the agent.
chal = identity.challenge(store, "bigpickle")
signed = keys.sign(private, chal["nonce"].encode())
session = identity.verify(store, chal["nonce"], b64(signed))
# -> {"token": ..., "kind": "agent", ...}
# A human looking at the same things, through the agent
code = viewcodes.issue_code(store, "bigpickle")
# A human looking at the same things, through the agent.
# issue_code takes the agent session, not a name, so a caller cannot mint
# authority for an agent it has not proven it is.
code = viewcodes.issue_code(store, session["token"])
view = viewcodes.redeem_code(store, code["code"])
# And the rule that holds it together
@ -24,7 +27,7 @@ without the private key, which never leaves the agent.
from . import errors, identity, keys, sessions, store, viewcodes
from .store import Store
__version__ = "0.1.0"
__version__ = "0.2.0"
__all__ = [
"Store",