Commit Graph

13 Commits

Author SHA1 Message Date
Manoj Bajaj d9936d5699 feat!: replace init and scan with authsome onboard
Unifies first-run setup into a single idempotent command that registers
identity, completes claim, and imports API keys from env. Persists
--base-url in client config for remote daemon connections.

Closes #434

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 02:22:10 -07:00
Ankit Ranjan 972e00c575 refactor: rename identity to agent throughout CLI and UI for improved terminology consistency 2026-06-15 17:27:10 +05:30
Manoj Bajaj 54d7c3a200 docs: Update documentation to correctly reference current authsome state 2026-06-05 14:21:35 +05:30
Manoj Bajaj 07dbb8705f feat: Update docs 2026-06-04 19:45:39 +05:30
Manoj Bajaj 52fe7dc5c3 fix: move dashboard auth flow to Next routes 2026-06-03 14:49:56 +05:30
Manoj Bajaj 0a7c379c00 docs: correct manual testing guide against the current CLI surface
The guide had drifted well beyond the deployment-flow change:

- Commands moved under the `provider` and `connections` groups
  (`provider list`, `provider inspect`, `provider register|remove|revoke`,
  `connections inspect`, `connections set-default`). Update every invocation.
- Remove the documented `get`, `export`, `--show-secret`, and `--json`
  commands/flags — none exist. `connections inspect` is always redacted
  and there is no human-table mode; output is always JSON (`{"v": 1, ...}`).
- Add sections for `scan`, `profile`, and `daemon restart`/`logs`.
- Note admin-only operations (register/revoke) and JSON-shaped expected
  output throughout; fix the `daemon status` health block (no `mode`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: b68c1ae5d66c
2026-05-29 13:25:15 +05:30
Manoj Bajaj 70e5539a59 docs: update manual testing guide for the unified claim flow
The first protected command now registers the identity and blocks on a
browser email+password registration + claim (first account = admin),
matching the single deployment flow. Also drop the removed `mode` field
from the daemon health block.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: 68b4ca3c1fc0
2026-05-29 13:21:30 +05:30
Manoj Bajaj 3719d13a96 docs: rewrite login and proxy sections in manual-testing guide
Login sections (§2–4) now include explicit human action steps — what
to open in the browser, what credentials to enter, and how to confirm
completion. Proxy section (§9) simplified to a single GitHub whoami
call through the proxy. Daemon note updated to reflect the orphaned-
process fix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: e51d7e04524d
2026-05-21 04:25:41 +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 bdf659ffff docs(cli): sync reference and manual-testing guide with 0.3.0 implementation
- cli.mdx: fix exit code table (all codes 2-9 were mapped to wrong errors);
  add profile command docs; add shell export format; fix --log-file default
  path; fix set-default to top-level command (not connection set-default);
  document --force/--yes distinction on register; update log command to
  describe tabular audit output and --raw flag; fix doctor check names;
  expand --quiet semantics note
- manual-testing.md: fix doctor expected checks (config→spec_version/identity/
  connections/integrity); fix log expected output (table not raw NDJSON);
  add --raw log test; fix connection set-default→set-default; fix --force
  register expected; fix ProviderNotFoundError exit code (3→4) and
  ConnectionNotFoundError note (exit 3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 12f601dab847
2026-05-17 16:42:24 +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
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
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