feat(conversations): ask_role, ask another role and be woken by its answer #25

Merged
morten-olsen merged 3 commits from mc/af9013dc-bb4b-408b-b13d-06a9643fdf34 into main 2026-10-07 22:14:48 +02:00
Contributor

Summary

New MCP tool ask_role(roleId, question) for agents in a conversation. The call returns at once. The question lands in the same person's conversation with the target role (started if none), marked as from the asking role (from_role_id, from_role_kind = 'ask', migration 024, additive). The target agent wakes like for a person's message and is told which role asked. When its turn ends, its reply is posted in the person's chat as before and relayed to each asking role's conversation (kind answer), which wakes the asker with the answer so the conversation progresses.

Design:

  • Author stays person (runs on the person's behalf and sponsorship, ADR 0019); from_role_* records the real speaker, so no table rebuild.
  • Answers are not answered again (relay only for ask), so there is no ping-pong.
  • Same organization only; not to itself; only role principals.

Evidence

  • Service test (ask, answer, foreign org, self, non-role); run test with fake agents: developer asks reviewer, reviewer replies once, developer is woken with the answer and replies once, nothing further after 500 ms.
  • vitest run packages/server: 571 passed. eslint and tsc clean (server, web); generate:api regenerated.

Not done

Web UI does not yet label "from " (field is in the API). Slack DM copies show such messages like the person's own.

Rollback / verify

Revert; the columns are additive. After rollout: ask_role in a role's tools; asking from one role's chat shows a message in the other's chat and wakes the asker with the answer.

## Summary New MCP tool `ask_role(roleId, question)` for agents in a conversation. The call returns at once. The question lands in the same person's conversation with the target role (started if none), marked as from the asking role (`from_role_id`, `from_role_kind = 'ask'`, migration 024, additive). The target agent wakes like for a person's message and is told which role asked. When its turn ends, its reply is posted in the person's chat as before **and** relayed to each asking role's conversation (kind `answer`), which wakes the asker with the answer so the conversation progresses. Design: - Author stays `person` (runs on the person's behalf and sponsorship, ADR 0019); `from_role_*` records the real speaker, so no table rebuild. - Answers are not answered again (relay only for `ask`), so there is no ping-pong. - Same organization only; not to itself; only role principals. ## Evidence - Service test (ask, answer, foreign org, self, non-role); run test with fake agents: developer asks reviewer, reviewer replies once, developer is woken with the answer and replies once, nothing further after 500 ms. - `vitest run packages/server`: 571 passed. eslint and tsc clean (server, web); `generate:api` regenerated. ## Not done Web UI does not yet label "from <role>" (field is in the API). Slack DM copies show such messages like the person's own. ## Rollback / verify Revert; the columns are additive. After rollout: `ask_role` in a role's tools; asking from one role's chat shows a message in the other's chat and wakes the asker with the answer.
feat(conversations): let a role ask another role with ask_role
Some checks failed
ci/woodpecker/pr/quality Pipeline failed
ci/woodpecker/pr/image Pipeline was skipped
ci/woodpecker/pr/docs Pipeline was skipped
ci/woodpecker/push/quality Pipeline failed
ci/woodpecker/push/docs Pipeline was skipped
ci/woodpecker/pr/image-agent Pipeline was successful
1a03ed225f
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
paperclip changed title from feat(conversations): ask_role, a fire-and-forget question to another role to feat(conversations): ask_role, ask another role and be woken by its answer 2026-10-07 22:01:19 +02:00
feat(conversations): wake the asking role with the answer
Some checks failed
ci/woodpecker/pr/quality Pipeline failed
ci/woodpecker/pr/image Pipeline was skipped
ci/woodpecker/pr/docs Pipeline was skipped
ci/woodpecker/push/quality Pipeline failed
ci/woodpecker/push/docs Pipeline was skipped
ci/woodpecker/pr/image-agent Pipeline was successful
783771c85e
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(web): give conversation message fixtures the role fields
All checks were successful
ci/woodpecker/push/quality Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/pr/image-agent Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/image Pipeline was successful
cf7d53d014
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai/mission-control!25
No description provided.