473 Commits

Author SHA1 Message Date
beubax 5a6c12cd75 Merge branch 'main' into feature/server-store-refactor 2026-05-27 16:06:30 +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
Tejas 35d0c62ca0 Merge pull request #343 from agentrhq/feature/vault-aes-gcm-dek-kek
feat!: replace flat master-key vault encryption with Argon2id KEK/DEK model
2026-05-27 14:33:26 +05:30
Manoj Bajaj b76903d74b feat: replace flat master-key vault encryption with Argon2id KEK/DEK model
Replaces the flat FernetEncryptionWrapper + EncryptionConfig model with a
proper envelope encryption scheme:

- MasterSecretResolver: unified resolution order (env → file → keyring →
  auto-generate) under a single AUTHSOME_MASTER_KEY env var; no separate
  passphrase vs raw-key distinction — both go through Argon2id
- DekManager: generates a random 256-bit DEK, wraps it with an
  Argon2id-derived KEK (AES-256-GCM), and stores the wrapped record in the
  KV store under __vault_meta__:__dek__ so it works with any KV backend
- AesGcmEncryptionWrapper: drop-in BaseEncryptionWrapper using AES-256-GCM
  per-value encryption via closure; replaces FernetEncryptionWrapper
- Vault: simplified — no longer owns crypto or lifecycle; receives an
  already-encrypted AsyncKeyValue; close() removed (caller manages store)
- EncryptionConfig removed from ServerConfig and models __all__
- Health route updated to report crypto_source from Vault properties
- Tests rewritten with fixtures and SimpleStore (in-memory); no DiskStore

BREAKING CHANGE: existing Fernet-encrypted vaults cannot be read back;
migration requires re-importing credentials.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: a778dfa71075
2026-05-27 14:01:42 +05:30
Manoj Bajaj 7607600eba Merge pull request #342 from agentrhq/feature/browser-sso-cookie3
feat: browser SSO via Chrome cookie reading (browser-cookie3)
2026-05-27 13:55:27 +05:30
rishabhraj36 6dbef78267 fix: ruff check 2026-05-27 13:52:31 +05:30
rishabhraj36 5ea8aa977e fix: added support for cookie expiry date 2026-05-27 13:48:16 +05:30
Manoj Bajaj 394c7a8b3a Merge pull request #337 from agentrhq/feature/api-url-list-support
refactor: support multiple API URLs per provider to allow flexible proxy routing and configuration
2026-05-27 12:46:11 +05:30
Manoj Bajaj aeb426357f feat: add browser SSO via Chrome cookie reading (browser-cookie3)
Enables authenticated access to sites like X/Twitter and LinkedIn that
use browser session cookies rather than OAuth or API keys.

Core logic lives entirely in auth/ — BrowserFlow.run_login() reads
Chrome's on-disk SQLite cookie database via browser-cookie3 (macOS
Keychain / Linux GNOME Keyring / Windows DPAPI), opens the site in the
user's default browser if no valid session exists, then polls until the
required auth cookies appear.  No separate Chrome profile, no Playwright.

- auth/browser_cookies.py: read_chrome_cookies(), cookies_are_valid(),
  normalize_jsessionid() with lazy browser-cookie3 import
- auth/flows/browser.py: BrowserFlow (begin/resume/refresh) + static
  run_login() for CLI use
- auth/models/: AuthType.BROWSER, FlowType.BROWSER, BrowserConfig,
  ExtractRule, ConnectionRecord.credentials field
- server/: register flow, header rendering, export branch, BrowserAction
  schema, _session_response wiring (~35 lines total)
- cli/main.py: 8-line elif block calling BrowserFlow.run_login()
- Bundled providers: x-browser, linkedin-browser
- 30 new tests in tests/auth/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 3753e27e5941
2026-05-27 12:27:28 +05:30
Manoj Bajaj dd252350dd chore: merge main into feature/respect-authsome-daemon-url
Resolved two conflicts:
- daemon_control.py: combined AUTHSOME_DAEMON_URL dynamic host/port
  with main's removal of the "admin" prefix from the daemon serve
  subprocess command
- admin.py: accepted deletion (daemon commands moved to top-level CLI
  in main); applied is_port_occupied() and dynamic URL message changes
  to main.py where those commands now live

Also adds .gitleaksignore for the PostHog public project API key in
analytics.py (intentionally committed, not a secret).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 85f9bdcbf1f4
2026-05-26 16:43:11 +05:30
Tejas a754640e2f Merge pull request #340 from agentrhq/feature/dashboard-at-root
refactor!: mount dashboard at / instead of /ui
2026-05-26 16:35:11 +05:30
Manoj Bajaj 397a8e8e0a Merge pull request #341 from agentrhq/refactor/making-admin-commands-top-level-again
feat: move daemon management commands from admin module to main CLI
2026-05-26 16:31:00 +05:30
Ankit Ranjan 2c43de6449 fix: remove extraneous admin command argument from daemon subprocess invocation 2026-05-26 16:29:37 +05:30
Tejas 77c7bb7b24 Merge pull request #336 from agentrhq/fix/fix-incorrect-phc-key
fix: Fix incorrect posthog key and remove unnecessary tests
2026-05-26 16:28:36 +05:30
Ankit Ranjan af356d5f4f feat: move daemon management commands from admin module to main CLI 2026-05-26 16:24:02 +05:30
rishabhraj36 f8cf93663f refactor!: mount dashboard at / instead of /ui 2026-05-26 16:17:40 +05:30
Manoj Bajaj 1ba904bf0d feat: respect AUTHSOME_DAEMON_URL in all daemon control paths
All daemon-side functions (is_daemon_responsive, ensure_daemon,
wait_for_daemon_ready, daemon_status, is_port_occupied) were
hardcoding DEFAULT_DAEMON_URL / port 7998 instead of reading the
configured URL from AUTHSOME_DAEMON_URL.

- Add _resolved_host_port() helper that parses host/port from
  resolve_daemon_url() so every call site stays consistent
- start_daemon() now passes --host/--port derived from the env to
  the daemon serve subprocess and records them in daemon.json
- admin.py port-occupied messages now show the actual daemon URL
  instead of the hardcoded "Port 7998" string

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: d29926b4634e
2026-05-26 15:59:52 +05:30
Ankit Ranjan d3446244b3 chore: remove bundled Anthropic and Gemini provider configurations 2026-05-26 14:30:21 +05:30
Ankit Ranjan 3190332b08 refactor: support multiple API URLs per provider to allow flexible proxy routing and configuration 2026-05-26 14:16:48 +05:30
Manoj Bajaj 8f8d9b9e59 fix: Fix incorrect posthog key and remove unnecessary tests 2026-05-26 13:33:54 +05:30
Ankit Ranjan e78832884f feat: add Anthropic and Gemini bundled providers 2026-05-26 13:12:59 +05:30
Manoj Bajaj 87ae0b7aee Merge pull request #334 from agentrhq/bugfix/login-json-session-details
fix: expose actionable session details in login --json
2026-05-25 18:57:48 +05:30
Ankit Ranjan d763f7f7dc feat: simplify Client ID label and implement robust cross-browser copy-to-clipboard logic 2026-05-25 18:55:47 +05:30
Ankit Ranjan 02daa8182e feat: improve copy-to-clipboard functionality with browser fallback and UI feedback 2026-05-25 18:39:05 +05:30
Ankit Ranjan c24779c6df feat: add device flow verification fields to auth schemas and CLI JSON output 2026-05-25 18:29:52 +05:30
Ankit Ranjan 0e6c7aab32 refactor: conditionally log missing credentials based on policy instead of always logging a warning 2026-05-25 18:21:17 +05:30
Manoj Bajaj 7b4b31ad4f Merge pull request #332 from agentrhq/feature/cli-command-grouping
feat: restructure CLI commands under provider and admin namespaces
2026-05-25 18:08:58 +05:30
Ankit Ranjan 7e3a63480c refactor: remove vault rekey functionality and associated endpoints 2026-05-25 18:03:47 +05:30
Ankit Ranjan 13a25f7c76 refactor: remove rekey command from admin CLI 2026-05-25 17:57:48 +05:30
Ankit Ranjan cc3271da53 Merge remote-tracking branch 'origin/main' into feature/cli-command-grouping
# Conflicts:
#	src/authsome/cli/main.py
2026-05-25 17:54:01 +05:30
Tejas b4d2ad2413 Merge branch 'main' into refactor/codebase-audit-and-improvements 2026-05-25 17:45:46 +05:30
Manoj Bajaj fb2754bded Merge pull request #325 from agentrhq/bugfix/issue-321-cli-json-errors
fix: normalize cli error handling for json output
2026-05-25 17:43:47 +05:30
Manoj Bajaj e1662b5196 Merge pull request #330 from agentrhq/feature/env-backed-identity-design
feat: env backed identity design
2026-05-25 17:36:49 +05:30
Ankit Ranjan 7855c77cee fix: update daemon process command to include admin subcommand 2026-05-25 17:28:22 +05:30
Ankit Ranjan a326e3f1c4 feat: restructure CLI commands under provider and admin namespaces 2026-05-25 17:24:37 +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
Ankit Ranjan 451729b13a refactor: remove unused ProviderDefinition import in CLI main module 2026-05-25 16:35:01 +05:30
beubax 10f17f48e3 fix: rename AUTHSOME_ADMIN_PRINCIPLES environment variable to fix typo 2026-05-25 15:40:57 +05:30
beubax 3ce32f9384 feat: support env-backed runtime identities 2026-05-25 15:23:17 +05:30
beubax e26d5841f3 feat: enable provider configuration management for hosted admins with required credential inputs and scope persistence 2026-05-25 14:39:04 +05:30
Manoj Bajaj 8ebbb0044e chore: Add todos and errors in codebase 2026-05-25 13:44:38 +05:30
Ankit Ranjan 1bbe08fdfe fix: normalize cli error handling for json output 2026-05-25 13:14:33 +05:30
Manoj Bajaj e0ea86dc99 Merge pull request #315 from agentrhq/feat/login_flow
feat: login flow
2026-05-22 18:16:17 +05:30
beubax c161ab96d0 feat: implement HostedAccountService for email/password authentication and JWT session management 2026-05-22 18:13:06 +05:30
Ankit Ranjan 8695b31efc refactor: remove PYTEST_CURRENT_TEST environment check from analytics initialization logic 2026-05-22 16:12:54 +05:30
Ankit Ranjan d1abc48f11 feat: disable analytics automatically when running under pytest and add verification tests 2026-05-22 16:06:43 +05:30
Ankit Ranjan 9d7c88fb0a feat: implement opt-out telemetry support via environment variables and add associated documentation and tests 2026-05-22 16:01:13 +05:30
Ankit Ranjan f15f7228f7 refactor: remove unused os import from analytics module 2026-05-22 15:53:36 +05:30
Ankit Ranjan 6c8d42d0ba chore: hardcode PostHog configuration values for analytics client initialization 2026-05-22 15:51:18 +05:30