Skip to content

feat(poppy): add the auth0 poppy commands - #1755

Draft
developerkunal wants to merge 4 commits into
feat/poppy-foundationfrom
feat/poppy-cli
Draft

developerkunal wants to merge 4 commits into
feat/poppy-foundationfrom
feat/poppy-cli

Conversation

@developerkunal

Copy link
Copy Markdown
Contributor

🔧 Changes

This is the second of two PRs that add auth0 poppy, the commands for preparing a company for personal agents with the Personal Agent Protocol (Poppy). It builds on #1754, which has the logic packages and API wrappers, so until that merges this PR is based on its branch.

New commands, all marked experimental:

  • auth0 poppy setup: checks the tenant, shows a grouped plan with before and after values, asks for confirmation, applies it, writes auth0-poppy.json and runs the doctor. --dry-run shows the plan only, and the plan ends with the exact command to apply it.
  • auth0 poppy config: builds or updates auth0-poppy.json from the tenant without changing the tenant.
  • auth0 poppy doctor: checks a site and the tenant, with the results grouped and each failure followed by a fix.
  • auth0 poppy agents register | list | show | remove: manage the agents that are allowed to act for users.

In a terminal, setup and config ask their questions one at a time and clear each one once it is answered. Without a terminal, with --no-input or in agent mode they ask nothing, and every answer has a flag. --json and --json-compact print only the JSON document.

Output goes through internal/display, like the other commands. The command reference in docs/ is updated, and the README lists the new command and the extra scopes the agents commands need.

📚 References

🔬 Testing

Table-driven unit tests and golden-file tests cover the commands and their output. Real tenant behavior is not covered yet.

This PR is a draft until #1754 merges and its go-auth0 pin moves to a release tag. After that it should be retargeted to beta.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

Adds `auth0 poppy setup`, `config` and `doctor`, and `auth0 poppy agents
register`, `list`, `show` and `remove`. Setup shows a grouped plan with
before and after values, asks the questions it needs one at a time in a
terminal, and applies the plan. Output is rendered through internal/display
and the command docs are included.

The commands are marked experimental. The agents commands need the
read:agents, create:agents and delete:agents scopes, which the README
explains.
Deleting the agent app revokes its refresh tokens, and keeping the app
does not. The help text, the confirmation prompts and the result of
`auth0 poppy agents remove` now say which of the two happened, instead of
saying the command never revokes tokens. Access tokens already issued
still stay valid until they expire.
- Remove the run header when a text or confirm prompt is interrupted.
- Erase question lines only when stderr is a terminal too.
- Count wide and fullwidth characters as two cells when wrapping.
- Check the config file issuer before asking the hint questions.
- Split WriteString calls that concatenate and use strings.FieldsSeq.
web.unscoped is a decision of the website owner, so setup and config now
collect it like the other values only the owner knows. Pass
--web-unscoped[=false], or answer a yes/no question in a terminal when the
config file has no value yet. An explicit false is kept in the file, so the
question is not asked again.

This branch has not been deployed

No deployments
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