Skip to content

Show GitHub login in agent me#11

Merged
hbrooks merged 1 commit into
mainfrom
hunter/me-gh-user
Jun 27, 2026
Merged

Show GitHub login in agent me#11
hbrooks merged 1 commit into
mainfrom
hunter/me-gh-user

Conversation

@hbrooks

@hbrooks hbrooks commented Jun 27, 2026

Copy link
Copy Markdown
Member

What

Follow-up to the backend change that added gh_user to GET /v1/me (ellipsis-dev/ellipsis#5331, merged).

agent me could only print the numeric GitHub account id:

customer:  ellipsis-dev (cust_dxuhgShv6FSXdWbA)
user:      24214708

Now it shows the human login when the server resolved one:

customer:  ellipsis-dev (cust_dxuhgShv6FSXdWbA)
user:      hbrooks (24214708)

Changes

  • src/lib/types.ts: add a GhUser interface and gh_user: GhUser | null to WhoAmI (loosely typed past login, matching the rest of the hand-rolled mirror types).
  • src/commands/me.ts: prefer gh_user.login (user_id) over the bare id; fall back to the id when gh_user is null; still omit the user line for API-key/sandbox principals. Rendering is extracted into an exported renderMe.
  • test/me.test.ts: covers the three cases (login resolved, id fallback, no user line for API keys).

Verification

Local run of every CI step: bun run typecheck, bun run test (89 passed, 3 new), bun run build, and bun build --compile + --version. All green.

🤖 Generated with Claude Code

`/v1/me` now returns a `gh_user` object, so `agent me` can print the human
login instead of just the numeric account id:

  user:      hbrooks (24214708)

falling back to the bare id when the server has no cached gh_user (and omitting
the user line entirely for API-key/sandbox principals, as before). Extracts the
rendering into an exported `renderMe` and covers the three cases with a test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hbrooks hbrooks merged commit 3565399 into main Jun 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant