feat(cli): agent login, logout and whoami - #1642
Open
marslavish wants to merge 17 commits into
Open
Conversation
Contributor
Author
|
New on this branch — entity-type + API-key tooling for pi (through
Review notes:
|
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 free
to 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.
Summary
agent login— interactive sign-in to the Constructive platform: backend preset picker (localnet / devnet / custom), inline email + password, mints a 5-year full_access API key.agent logoutrevokes the API key and clears the session;agent whoamishows the account with a masked key.StoredSessionshape at~/.constructive/config/agent/account.json, mode 0600. Backend choice persists next to it.CONSTRUCTIVE_*env vars override it (the CI/headless path). Tokens never enterprocess.env.agentic/pigains an optional hostsignInHint, so signed-out failure reasons sayRun `agent login` to sign in.in the CLI.src/keypress-chunks.ts).Review notes
whoami, store-backed authenticated call, env override rejection, server-side key revocation on logout — full report in the task'sqa.md(r2: 17 pass / 0 fail / 0 unverifiable).expiresIn: { years: 5 }— server policy; the 7-day re-mint check keeps keys fresh.workspace:*protocol lines for@agentic-kit/harnessand@agentic-kit/piinagentic/cli/package.jsonwere left as-is (only the new dep followsworkspace:^).