Lane 10 PR 5: bot commands and /concern (#736) #885
Loading…
Reference in a new issue
No description provided.
Delete branch "build/lane10-5-commands"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #736 (lane 10). Stacked on #883 (4b). No migration.
What it builds
/recapby number (O9).GET /api/bot/guilds/{guild_id}/sessions/by-number/{n}is new, and the UUID form still works./next-session,/quests,/sessions/list,/sessions/ask) now takechannel_id/campaign_id. When it's ambiguous you get a 409 naming the campaigns, and the bot offers acampaign:choice on/next,/quests,/recap,/historyand/ask./historyand/askanswer privately./historylists sessions by number, with a real "… and N more"./askcites its sources (O16). The server computessourcesfrom the sessions it actually gave the model, never from numbers the AI writes. The reply says "From Sessions 12 and 13. It can be wrong: check the session if it matters."/noteand/helpfollow D97/D106;/record start's picker labels lead with "Session N ·";/nextshows RSVP counts./concern(O13, D160, IS-211), in a newcogs/safety.py. It's an ephemeral modal that posts to a newPOST /api/bot/safety/submissions, which writes to the same anonymous queue as the web's Table rules & safety flag.discord_user_idis only used to resolve the campaign and check membership. It isn't stored (the row has no sender column), and the route is kept out of the access log.Bot contract
Additive; it stays at v2. The changes are new routes, new optional params and new optional response fields, and
check_version_sync.pypasses. The bot client's models also gainnumberfields the backend was already sending.Checks
test_bot_safety_submission.py(13 cases, among them "the row carries no sender" and "kept out of the access log"). CI runs the full suite.bot/directory was not reformatted.changelog.d/fragment.Departures (for review)
/concernin DMs is native slash-command behaviour. No separate "DM helper" was needed. Whether Discord offers the command in DMs depends on the application's install-context settings in the Developer Portal, so that needs a manual check on a test server./note's confirmation says "Your GM" rather than naming one. A campaign can have several GMs.campaign_id) was added beyond the survey'schannel_id, to finish O9's "it asks which campaign" loop.🤖 Generated with Claude Code
- /recap now also takes a session's number, resolved to the right campaign when a guild binds more than one (O9); the same channel/campaign resolution is added to /next, /quests, /history and /ask, each with a campaign: autocomplete for when it must ask. - /history and /ask now answer privately; /history lists session numbers instead of UUIDs, with a real "… and N more" count; /ask names the sessions its answer was drawn from, worked out by Quest Board rather than the model (O16). /next shows RSVP counts. - /note and /help's words follow D97/D106; the "no campaign linked" and /record start picker wording follow the drawing. - New /concern (O13, D160, IS-211): a private Discord form, in a server or a DM, that reaches only the campaign's GMs through the same anonymous queue as the web's Table rules & safety flag. Never echoed into a channel, never logged. - Backend: GET .../sessions/by-number/{n} (additive); channel_id/campaign_id on the guild-scoped reads, 409 with campaign names when ambiguous; /sessions/ask gains `sources`; POST /api/bot/safety/submissions is /concern's door into the existing safety queue, kept out of the access log. No migration. BOT_CONTRACT_VERSION stays at 2 on both sides. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>