Repository navigation
Conversation
…ith their owner's access Adds owner_member_add, owner_member_remove and owner_member_set_role to the owner tools. Library agents are added through channelWrites.addAgents, people through addChannelMember, and removals and role changes through member administration, so the owner's session signs every command and the existing rights checks apply. Each change carries the tool call's admission (turn, agent run and owner binding) into the outbox's send, retry and replacement and into administration's pre-publish check. Outcomes are confirmed from a relay-signed roster read, rejected, or unconfirmed with the sent command's ID; a repeated addition resumes its existing Outbox item. Signed-off-by: Kyle Zemek <kylez@squareup.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
TL;DR
Owner tools can now change channel membership with the owner's access, not just read it.
owner_member_add,owner_member_removeandowner_member_set_roleroute through the app's existing member services, so the owner's session signs every command and the usual rights checks apply. A change runs only while the tool call, the agent's run and the owner's binding all still hold.What changes
Routing. Library agents are added through
channelWrites.addAgents(inventory fromsession.agentChoices). People are added throughaddChannelMember. Removals and role changes go through member administration (administerMember). The agent never gets a signer, and no other path is added.Admission.
ownerMutationActive(owner-access.ts) is true only while all of these still hold:runnerpasses its lifetime signal throughhost.ownerAccess);addChannelMembernow forwards this admission into the outbox'ssend,retryand replacement enqueue.administerMemberforwards a caller signal and admission intorun, which checks it just before publishing. When neither a signal nor a check is supplied, every change is refused.Outcomes.
confirmed: a relay-signed roster read for this call shows the result, and the answer carries the role the roster shows.rejected: nothing was changed.unconfirmed: the change may have taken effect, and the answer carries the sent command'soperationID.Administration now records the signed command ID on its operation. If the turn or binding changes before the answer is released, the tool withholds the result and says the change may have happened.
Recovery.
retry(id, active)) and never sends a second one. One still sending is only waited on.confirmedwhen the roster shows them and neverrejectedonce its Outbox item was acknowledged.Refusals.
Docs:
docs/agents.md#owner-toolsand the configuration flag description.Coverage
src/features/agents/owner-members.test.tsdrives a realcreateRelaySessionagainst a relay fixture that applies signed member commands to its roster and accepts an agent's message only from a member. Calls go throughappClientandcallSessionTool, as a harness makes them. It covers:expected_role.Unit additions:
owner.test.ts);app-client.test.ts);administration.test.ts);members.test.ts).Checked on a Linux workstation at the PR's parent:
tsc --noEmitand biome on touched files were clean. Vitest passed 1,726 tests (1 skipped) acrossowner,app-client,owner-access,owner-members,members,administration,outbox,service,config-channels,session-agent-admission, the Codex runtime andMessageComposer. The repository's pre-push hook ran types and related unit tests. Browser journeys and the native app were not exercised. The agent-authored send in the composition test is judged by the relay fixture, not by a native harness turn.Part of the owner-MCP initiative: read-only owner tools first, then membership changes through the owner's existing services. Channel management and broader writes are separate work.
🤖 Generated with Claude Code