Skip to content

feat(tools): ask_crew_access, a bot reaches another crew with the owner's OK - #194

Merged
httpsphl merged 1 commit into
mainfrom
feat/crew-access
Oct 5, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/crew-access

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Crews stay closed to each other (see #193). When the owner wants a bot to work with another crew, the bot calls ask_crew_access with the crew's name, optionally one bot's handle, what it needs (talk for now) and why.

The owner's answer (approvals.answer with input: {"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;
  • or Deny.

"For good" goes to a new crew_access table (migration 0021). It is deleted with the bot, the target bot or the crew.

With access:

  • crew_roster and send_message take crew. A bot out of reach and one that does not exist give the same error.
  • The other side can answer:
    • to a bot that has access to it;
    • or to a bot of another crew that wrote to it in the last 24 h, since replies come in a later turn.
  • complete_task works as before, because only the assignee can complete a task.
  • The envelope says 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.

…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.
@httpsphl
httpsphl enabled auto-merge October 5, 2026 15:32
@httpsphl
httpsphl merged commit 32dd884 into main Oct 5, 2026
4 checks passed
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