Uh oh!
There was an error while loading. Please reload this page.
remote/oidc: identity client + browser opener + login orchestrator (T3, T5) - #198
Merged
Merged
Conversation
… T5) Completes milestone-1 local primitives, composing chunk 1's PKCE + loopback: - identity_client.js: exchangeCode / refreshSession over an injectable fetch against <origin>/v1/identity/token; a 401 invalid_grant surfaces a typed InvalidGrantError. Response field is access_jwt, expires_at is ISO. No external JWKS on the client. - open_browser.js: platform opener (open / xdg-open / cmd start), detached; returns whether an opener was found (LLP 0046 D8). - oidc_login.js: loginWithBrowser() orchestrates PKCE + a random state, starts the loopback receiver, builds the /login/start URL, opens the browser (or prints the URL), awaits the code, and exchanges it for the session. No persistence; the caller stores it (LLP 0046 D2/D3). - types.d.ts: OidcSession / RefreshedAccess shared interfaces. Unit tests cover the token request bodies + response mapping, the invalid_grant typing, each platform opener, and the full PKCE->loopback->exchange orchestration including --no-browser and loopback cleanup on failure.
platypii
commented
Jun 29, 2026
ContributorAuthor
Review (independent agent review)Verdict: request-changes → addressed. The identity client and login orchestrator are faithful to the LLP 0047 wire contract (correct grants, Findings
Addressed in this PR
The |
Review follow-ups (PR #198): - spawn delivers a missing-opener failure as an async 'error' event, not a synchronous throw. Without a listener it became an uncaught exception that crashed the CLI on the D8 no-opener path. Attach child.on('error') to swallow it; document the boolean return as best-effort. - oidc_login now always prints the URL as a fallback even when the opener reported success, so a silently-failed launcher never strands the user. - test now models spawn's async 'error' emission (EventEmitter child) and asserts no process crash; keep the synchronous-throw case too.
platypiiforce-pushed
the
chunk2-identity-oidc-login
branch
from
June 29, 2026 18:36
d0ea83e to
a60d2d6CompareUh oh!
There was an error while loading. Please reload this page.
bgmcmullen added a commit
that referenced
this pull request
Aug 19, 2026
`hyp init` no longer starts an AI client on its closing question. It may
have been invoked by an installer or from a home, temp, or unrelated
directory, and handing that directory to a new agent session is not
setup's call to make. It prints the questions and names the verb; the
launch waits for an explicit `hyp ask` run from a directory the user
chose.
LLP 0198 rewritten to the printed-list decision, with #re-runnable
re-argued: it justified `hyp ask` as the durable form of a wizard menu
that no longer exists.
LLP 0203's ordering rested on the deleted launch ("may take the terminal
for good"), in #context, #offer, and #child-process. Re-argued on the
reason that survives: a prompt must not land under a block the reader has
started scrolling past. Its #frame why-not rejected a second framed
block; the frame now belongs to `hyp ask`'s menu, so the rejection is
that framing is not a wizard idiom at all.
LLP 0135's forward-ref claimed this "extends" #privacy's closing-words
rule. It narrows it: the narration stays the last thing said about
privacy, not the last thing on screen. 0198 records the cost.
Also:
- One `writeSuggestedPrompts({ stdout, footer, hasRows })` replaces three
renderers whose bodies were literal string copies, so the empty-cache
sentence cannot drift out of agreement with itself.
- `first_ask` on `wizard.finish` was derivable from `pathway` and
`cancelled`. It now carries `listed-empty`, making the rate of installs
finishing with an empty cache the signal setup contributes.
- `RunWizardFirstAskOptions.cwd` was set by nothing but a test, in a
change whose whole rationale is working directories. Dropped from the
wizard-level type; `launchClient` keeps it, with its own test.
- The four questions rewritten: one subject, one criterion, a closing
clause asking for the mechanism rather than restating the subject.
`which` for things in the recorded history, `what` for things being
proposed. The `Based on the hypaware logs.` fragment becomes a `From my
HypAware history,` clause, which names the product rather than a
dataset the user has never seen.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chunk 2 of the OIDC client login (LLP 0046-0048), completing milestone-1 primitives. Stacked on #197 (base is
chunk1-pkce-loopback); review/merge after #197.What
identity_client.js-exchangeCode/refreshSessionover an injectable fetch against<origin>/v1/identity/token; a 401invalid_grantbecomes a typedInvalidGrantError. Field isaccess_jwt,expires_atis ISO; no external JWKS (LLP 0047 wire contract).open_browser.js- platform opener (open/xdg-open/cmd start), detached; returns whether an opener was found (LLP 0046 D8).oidc_login.js-loginWithBrowser()composes PKCE + randomstate+ loopback +/login/start+ exchange, returns the session (no persistence) (LLP 0046 D2/D3).types.d.ts-OidcSession/RefreshedAccess.Tests
3 new test files, 13 tests green;
npm run typecheckclean.🤖 Generated with Claude Code