Repository navigation
feat(tools): ask_crew_access, a bot reaches another crew with the owner's OK - #194
Merged
Merged
Conversation
…wner's OK Crews stay closed to each other. When the owner wants it, a bot asks with ask_crew_access: the crew, one bot of it or the whole crew, what it needs (talk) and why. The owner allows it only now (until the bot's turn ends), always for that bot, always for the crew, or declines. With access, crew_roster and send_message take crew; the other side can answer, and tasks come back. Messages and tasks across crews belong to the recipient's crew, so deleting a crew leaves nothing dangling. Spec 9.3, 10, 10.4.
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.
Crews stay closed to each other (see #193). When the owner wants a bot to work with another crew, the bot calls
ask_crew_accesswith the crew's name, optionally one bot's handle, what it needs (talkfor now) and why.The owner's answer (
approvals.answerwithinput: {"scope": ...}):once, the default with no input: in memory, until the bot's turn ends;bot: for good, only that bot (refused if the request was for the whole crew);crew: for good, the whole crew;"For good" goes to a new
crew_accesstable (migration 0021). It is deleted with the bot, the target bot or the crew.With access:
crew_rosterandsend_messagetakecrew. A bot out of reach and one that does not exist give the same error.complete_taskworks as before, because only the assignee can complete a task.from @scout of crew Ops, and its reply hint includes the crew.Storage: messages and tasks across crews belong to the recipient's crew; the result and the deadline notice belong to the requester's. Deleting either crew leaves nothing dangling, and this is tested.
UI: the app still shows the generic request card, where Allow means "only now". A follow-up PR adds the card with the three buttons and the list of lasting access in the bot's details.
Spec: 9.3, 10, new 10.4. Rules: one paragraph for every bot.
Tests:
tests/crew_access.rs(closed until allowed; only now for one bot; answer back; turn end; crew delete; always for the crew; task across crews; already allowed), plus store and service unit tests.Manual with real Claude: ask a bot to talk with a bot of another crew, allow it, and check that the other bot answers.