feat(operator): Discord auto-registration (--auto-register)#853
feat(operator): Discord auto-registration (--auto-register)#853chaodu-agent wants to merge 3 commits into
Conversation
When --auto-register is passed to oabctl apply:
1. Loads Discord developer token from env or SSM
2. Creates Discord application + bot via Discord API (idempotent by name)
3. Stores bot token in SSM at /oab/{ns}/{name}/discord-token
4. Adds DISCORD_TOKEN secret to ECS task definition
5. Returns OAuth invite URLs for each provisioned bot
Usage:
DISCORD_DEVELOPER_TOKEN=xxx oabctl apply -f agents/ --auto-register
|
All PRs must reference a prior Discord discussion to ensure community alignment before implementation. Please edit the PR description to include a link like: This PR will be automatically closed in 3 days if the link is not added. |
OpenAB PR ScreeningThis is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Screening reportscreening pass complete.GitHub comment: #853 (comment) IntentThis PR tries to remove the manual Discord bot provisioning step from FeatFeature work. It adds an opt-in Who It ServesDeployers and agent runtime operators. Rewritten PromptImplement an opt-in Merge PitchWorth advancing because it shortens a fragile deployer workflow. Risk is medium: deployment automation, secrets, Discord API calls, and ECS task mutation. Main reviewer concern: name-based idempotency, token reset safety, and rate-limit/error handling. Best-Practice ComparisonOpenClaw and Hermes Agent are only partially relevant because this is provisioning during Implementation Options
Comparison Table
RecommendationAdvance the balanced path. Review should focus on avoiding mutable-name-only identity, making token reset intentional, and producing clear per-agent results on Discord/API failures. |
Summary
Adds
--auto-registerflag tooabctl applythat automatically provisions Discord bots via the Discord API.Usage
What it does
DISCORD_DEVELOPER_TOKENenv var or SSMDISCORD_TOKENsecret:/oab/{ns}/{name}/discord-tokenFiles
operator/src/discord.rs— Discord API client (provision_bot, find_existing)operator/src/apply.rs— integration with apply flowoperator/src/main.rs—--auto-registerCLI flagNotes
--auto-register, behavior is unchanged (Phase 1 mode: pre-created tokens)cc @pahud