Commit Graph

21 Commits

Author SHA1 Message Date
rishabhraj36 d9d2c60563 feat: derive agent identity from a single private-key env var 2026-06-16 13:32:04 +05:30
beubax fc3189bad1 refactor: move pop replay cache to server 2026-06-10 15:46:36 +05:30
Manoj Bajaj ad23d60754 feat: Simplify identity portability 2026-06-05 12:23:32 +05:30
Manoj Bajaj a033bfe93f chore: satisfy pylint ruff checks 2026-06-04 22:22:50 +05:30
Manoj Bajaj 10f6e8ae41 fix: Remove type checking hacks 2026-06-04 21:28:22 +05:30
Manoj Bajaj bfd84b5010 refactor: metadata doesnt need separate file 2026-06-04 19:34:26 +05:30
Manoj Bajaj b96d593883 fix: resolve pre-commit failures 2026-06-04 11:50:56 +05:30
Manoj Bajaj 668f91a54a fix: cache identity registration per daemon 2026-06-03 15:26:33 +05:30
beubax 6f0f61c372 refactor: replace file-based registry storage with a unified SQL-backed ServerStore implementation 2026-05-27 16:02:24 +05:30
beubax 84e421b5a1 refactor: centralize local identity creation 2026-05-25 17:09:40 +05:30
beubax 72e1b350cd feat: auto-create env handle identities 2026-05-25 17:05:33 +05:30
beubax 3ce32f9384 feat: support env-backed runtime identities 2026-05-25 15:23:17 +05:30
beubax c161ab96d0 feat: implement HostedAccountService for email/password authentication and JWT session management 2026-05-22 18:13:06 +05:30
Manoj Bajaj 3610a69584 refactor: enforce module boundaries — registry impls to server/, AuthService to server/
Phases A–I of TODOS.md:

- Move all five registry classes (IdentityRegistry, PrincipalRegistry,
  VaultRegistry, IdentityClaimRegistry, PrincipalVaultBindingRegistry) from
  identity/ to server/registries.py. Domain model types stay in identity/.

- Break identity/local.py → cli/ coupling: inline _read/_write_active_identity_handle
  helpers so identity/ imports nothing from cli/.

- Remove VaultRegistry + get_server_home imports from auth/service.py; refactor
  revoke() to accept explicit vault_ids from the server layer.

- Move proxy_routes() and _build_route_entry() out of AuthService into
  server/proxy_catalog.py; proxy route delegates to build_proxy_routes().

- Move AuthService from auth/service.py to server/credential_service.py so
  auth/ becomes a true leaf (no vault/, audit/, or server/ imports). Update
  all 10+ import sites in server/, cli/ test files, and the top-level __init__.

- Remove global AuthService(identity="server") from app.py. Refactor /ready
  to resolve the local identity at request time and use app.state.vault directly.

- Remove vault.home property from Vault; replace all callers with store.home.

- Update AGENTS.md architecture table to reflect new file locations.

All 293 tests pass. ruff and ty clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 5c8526a4e7d2
2026-05-20 20:46:17 +05:30
Manoj Bajaj 39c1370ec8 refactor: rename actors package to identity with semantic sub-modules
Replace authsome.actors with authsome.identity, splitting into four
focused sub-modules:
  identity/local.py     — IdentityMetadata, keys, DID helpers, create_identity
  identity/proof.py     — PoP JWT creation and validation
  identity/registry.py  — daemon IdentityRegistry (Handle → DID)
  identity/principal.py — ClaimStatus, PrincipalRegistry, VaultRegistry,
                          IdentityClaimRegistry, PrincipalVaultBindingRegistry

Update all imports across src/ and tests/. Move tests/actors/test_registry.py
to tests/identity/test_registry.py. Delete the actors/ package.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 88222782ec3b
2026-05-20 19:27:13 +05:30
beubax 81cd6751df refactor: introduce IdentityStatus enum for identity lifecycle state 2026-05-20 15:33:38 +05:30
beubax 923cc93aca feat: scope connections to vault, add claim flow and principal concept, confine UI session to principal view, and make vault/identity/principal orthogonal 2026-05-19 14:25:57 +05:30
beubax 5c98ea5412 refactor: transition to persistent storage backend for sessions, identities, and audit events with async support 2026-05-14 18:04:16 +05:30
beubax 46a981a448 feat: implement local client profile management and update error handling for session authentication 2026-05-13 15:45:04 +05:30
Manoj Bajaj d6958c8434 refactor!: unify Identity and Profile; remove profile management layer
Profile is now a pure credential namespace scoped by the Identity handle,
not an independently managed entity. The two were always 1:1 but modelled
as separate concepts; this commit makes that explicit.

Key changes:
- Add `active_identity` to GlobalConfig; `ensure_local_identity` reads it
  and errors hard if the configured handle is missing on disk (no silent
  re-creation)
- `authsome init` writes `active_identity` to config after registration
- Collapse `registered: bool` + `registration_status: str` on
  IdentityMetadata into a single `registered: bool`; add `mark_registered()`
- Remove vestigial `Identity` dataclass, `DEFAULT_IDENTITY`, `current()`
- Remove `name`, `description`, `owner_email` from IdentityMetadata (deferred
  to hosted version)
- Remove `ProfileMetadata`, `ProfileNotFoundError`, `create_profile`,
  `list_profiles`, `get_profile`, `set_default_profile`, `default_profile`
  shim in save_config — profile is a side-effect of identity registration
- Add hard-error test for missing configured identity
- Update UBIQUITOUS_LANGUAGE.md, AGENTS.md architecture section, and
  ADR 0002 to reflect current code (fix stale AuthsomeContext, AuthClient,
  config.json path, ProfileMetadata references)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 614885258a45
2026-05-13 14:29:18 +05:30
Manoj Bajaj 7ad14f60a3 feat: add did pop daemon authorization
Entire-Checkpoint: a6b771e5077a
2026-05-12 19:18:25 +05:30