473 Commits

Author SHA1 Message Date
beubax 436f4920f6 refactor: make identity optional for server routes 2026-05-22 15:31:46 +05:30
beubax 35b4d3d562 refactor: clean up UI dashboard and add provider credential configuration flow support 2026-05-21 17:43:20 +05:30
Ankit Ranjan 39b3419137 refactor: delegate vault rekey persistence and validation to crypto backends 2026-05-21 15:24:08 +05:30
Ankit Ranjan 83709f4e37 fix: improve whoami robustness by handling connection failures gracefully and isolating keyring tests 2026-05-21 15:11:01 +05:30
Ankit Ranjan e7f418707a feat: implement vault rekey functionality with encryption source validation and add corresponding API and unit tests. 2026-05-21 14:50:04 +05:30
Ankit Ranjan 84f879985b Merge branch 'main' into feat/authsome-rekey 2026-05-21 14:41:37 +05:30
beubax 62b875427b Merge branch 'main' into refactor/ui 2026-05-21 14:37:14 +05:30
beubax c2be2a29ee refactor: secure /ready health endpoint by requiring authentication and scoping checks to the current user 2026-05-21 14:30:49 +05:30
beubax 8f8cbc6ed3 refactor: simplify daemon termination by removing port-based PID discovery 2026-05-21 14:02:35 +05:30
Ankit Ranjan 00bbf02cbb Merge branch 'main' into feat/authsome-rekey 2026-05-21 13:30:26 +05:30
Manoj Bajaj 76e2320c96 fix: deduplicate error class name in daemon responses and stop orphaned daemon
Two bugs found during manual testing:

- `AuthsomeError.__str__` already prepends the class name, but
  `app.py` was passing `str(exc)` as the `message` field in error
  responses. The client then reconstructed the exception with that
  string as its args[0], causing `str()` to prepend the class name a
  second time (e.g. "ProviderNotFoundError: ProviderNotFoundError: …").
  Fixed by using `Exception.__str__(exc)` so the server sends the raw
  message without the class-name prefix.

- `daemon stop` returned a no-op message when no PID file existed,
  leaving an orphaned daemon (e.g. after `rm -rf ~/.authsome`) running
  on port 7998. Added `_find_pid_by_port` as a fallback: if there is
  no PID record but a process is listening on the daemon port, it is
  terminated through the normal SIGTERM→SIGKILL path.

Also updates the manual-testing guide to reflect the secure local
browser bridge used by all login flows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 37d02f2f4c99
2026-05-21 04:22:57 +05:30
Manoj Bajaj bb5a2a6152 refactor!: Create version 0.4 which adds support for principal, identity, vault key loading precedence and many more fixes 2026-05-20 21:29:50 +05:30
Manoj Bajaj 225d7fdcfb feat: Cleanup server routes
Entire-Checkpoint: 8c525303b5f3
2026-05-20 21:06:27 +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
Manoj Bajaj d8553baabb feat: ClaimStatus lifecycle, vault_id gating, ADR 0003 alignment
- Add ClaimStatus enum (PENDING/ACCEPTED/REJECTED) to IdentityClaimRecord
  with accept_claim() and reject_claim() on IdentityClaimRegistry
- HostedOwnershipResolver.resolve() now gates vault access on ACCEPTED;
  PENDING raises 403, REJECTED raises 403 with distinct message
- ensure_claimed_identity() auto-accepts on UI form submission — the form
  IS the approval act in this release; PENDING is transit state only
- Remove AuthService vault_id fallback (vault_id or identity); _coll now
  raises ValueError if vault_id is None, making missing wiring explicit
- /ready endpoint resolves vault_id via ownership_resolver instead of
  constructing AuthService with the identity handle as a stopgap
- create_auth_service() requires explicit vault_id parameter
- Rewrite ADR 0003 and update UBIQUITOUS_LANGUAGE.md to reflect opaque
  VaultId design (single segment, not principal_handle/vault_handle)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 8f56337e3615
2026-05-20 19:26:58 +05:30
Manoj Bajaj 3951af8239 fix: correct import path and test fixture for ready endpoint
- Fix `health.py` import from non-existent `authsome.identity` to
  `authsome.actors` where `current_from_home` is defined
- Add missing `ConnectionRecord`, `AuthType`, `ConnectionStatus` imports
  in test_pop_auth.py
- Use `vault=` (not `identity=`) in `build_store_key` so the stored key
  matches the `vault:` prefix that `list_connections` searches

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: f4892f79b920
2026-05-20 19:00:33 +05:30
Manoj Bajaj 8688268d4e Merge branch 'main' into feature/principal-vault-identity-design 2026-05-20 18:55:40 +05:30
beubax 438c69f00e feat: redesign dashboard provider and connection flows 2026-05-20 18:27:43 +05:30
beubax 6a059c6bff feat: add dashboard applications and identity pages 2026-05-20 18:17:57 +05:30
beubax 57f792ce04 Merge branch 'main' into feature/principal-vault-identity-design 2026-05-20 15:37:03 +05:30
beubax 81cd6751df refactor: introduce IdentityStatus enum for identity lifecycle state 2026-05-20 15:33:38 +05:30
beubax e9ad8d031e refactor: rename VaultRecord.slug to handle 2026-05-20 15:10:13 +05:30
beubax 9affa1dc7b refactor: rename scope to vault in key construction utility and storage operations 2026-05-20 15:07:09 +05:30
Ankit Ranjan 3fa9f97c8b feat: update health check to validate connections based on active identity and add test coverage 2026-05-20 13:26:19 +05:30
Manoj Bajaj b13c2e7add Merge pull request #291 from agentrhq/better-daemon-messaging
chore: better daemon messaging
2026-05-20 12:19:43 +05:30
beubax d4d180e565 Merge branch 'main' into feature/principal-vault-identity-design 2026-05-20 12:00:37 +05:30
Tejas 575a4648fb Merge pull request #285 from agentrhq/feature/add-telemetry
feat: Add posthog telemetry events
2026-05-20 11:31:46 +05:30
Ankit Ranjan 9fc24c4735 refactor: improve daemon lifecycle management with robust start, stop, and status checks 2026-05-19 17:11:50 +05:30
Priyansh Khodiyar 857ec57205 chore: clean up stale repo references and skill provider bug
Two classes of bugs corrected, both verified against main at 69a0cb9.

Skill (skills/authsome/references/adding-provider.md):

- OAuth redirect URL was http://localhost:7999/callback. Source truth
  is http://127.0.0.1:7998/auth/callback/oauth (server/urls.py:8-9
  and the matching user-facing doc in custom-providers.mdx). Agents
  following the skill would tell users to register OAuth apps with
  a redirect URI that does not match what authsome actually serves,
  causing every PKCE login to fail.
- Step numbering had two "3." entries and no "4."; renumbered.
- Provider registration link pointed at the stale
  raw.githubusercontent.com/manojbajaj95/authsome fork; repointed
  to agentrhq.

Stale repo owner in actively-rendered surfaces:

- CONTRIBUTING.md: git clone URL.
- docs/site/README.md: link to the repo.
- docs/site/reference/bundled-providers.mdx: "open a pull request
  against" link in the upstream contribution section.
- docs/site/concepts/credential-storage.mdx: replaced
  "manojbajaj95" example label with "octocat" so the sample
  connection record reads as a generic GitHub username.
- src/authsome/ui/templates/_layout.html: dashboard sidebar
  "Support" link and topbar "GitHub" button.
- src/authsome/ui/templates/overview.html: dashboard "Contact Us"
  button on the overview page.

Out of scope:

- pyproject.toml author attribution stays as Manoj Bajaj; that is
  the actual maintainer's name, not a stale fork reference.
- CHANGELOG.md has ~100 manojbajaj95 commit URLs but release-please
  regenerates it; manual edits would be overwritten on next release.
2026-05-19 15:58:22 +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
Manoj Bajaj 8797a94b40 feat: Add posthog telemetry events
Entire-Checkpoint: f82a78beeea3
2026-05-19 12:45:59 +05:30
Ankit Ranjan 3c80c7e01e feat: implement master key rotation via rekey command and API endpoint 2026-05-18 16:15:32 +05:30
rishabhraj36 83ab4691e6 fix(proxy): address PR review feedback on mode validation and route defaults 2026-05-18 15:50:35 +05:30
rishabhraj36 21e74cd99a Merge branch 'main' into 260-feat-configurable-proxy-mode-intercept-scope-unmatched-policy 2026-05-18 02:30:53 +05:30
Manoj Bajaj 3b990e3cae fix(cli): resolve three CLI bugs and improve audit log command
- doctor: fix spec_version always showing FAIL — server returned the version
  number "3" instead of "ok", so the CLI check `val == "ok"` always failed
  on healthy installs
- register --force: was not skipping the confirmation prompt; --force now
  implies --yes so a single flag covers both server-side overwrite and client
  prompt bypass (matching gh/fly/docker convention)
- --quiet: was silencing ALL output including primary data rows; add emit()
  to ContextObj (never quiet-suppressed) and use it for list table rows and
  doctor check lines — informational headers remain quiet-suppressible
- log: switch from raw loguru client log to structured server audit log
  (NDJSON); display as human-readable table with timestamp/event/provider/
  status columns; --raw flag retains access to the client debug log
- add CLI design review report at docs/internal/cli-design-review.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: e28262984429
2026-05-17 16:33:26 +05:30
rishabhraj36 98e3a9ecea refactor(proxy): move proxy.mode from ServerConfig to ClientConfig 2026-05-16 11:34:43 +05:30
Manoj Bajaj 3929b86ea9 Merge pull request #269 from agentrhq/ui/fix
fix: client secret field made default
2026-05-15 19:08:29 +05:30
Ankit Ranjan da185352b2 refactor: rename provider host_url configuration field to api_url throughout codebase and documentation 2026-05-15 19:01:55 +05:30
Ankit Ranjan 95611099da refactor: rename host_url to api_url across provider definitions and related internal logic 2026-05-15 18:56:14 +05:30
rishabhraj36 e3a4939136 fix: client secret field made default 2026-05-15 18:53:40 +05:30
rishabhraj36 8268d6a89d fix: client secret field made default 2026-05-15 18:47:19 +05:30
rishabhraj36 b29f30b6a9 fix(proxy): restore structured audit events on deny 2026-05-15 16:18:42 +05:30
rishabhraj36 a929bea966 fix(proxy): use load_server_config after LocalAppStore.get_config removal 2026-05-15 16:12:23 +05:30
rishabhraj36 be4b3626a9 fix: ruff check 2026-05-15 15:47:12 +05:30
rishabhraj36 08a29fffa7 fix: ruff check 2026-05-15 15:43:18 +05:30
rishabhraj36 240180f6e4 fix: replaced audit for logger 2026-05-15 15:41:39 +05:30
rishabhraj36 61025fc659 Merge branch 'main' into 260-feat-configurable-proxy-mode-intercept-scope-unmatched-policy 2026-05-15 15:40:13 +05:30
beubax 5f52807b68 fix: save library version in client config 2026-05-15 14:16:34 +05:30
beubax 378fa68a42 refactor: replace remote audit logging with local file-based audit and simplify daemon configuration management 2026-05-15 13:53:24 +05:30