feat(kiloclaw) Plumbing for multi agent channel binding management#3813
Merged
Conversation
…s and account-scoped routes
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryAll previously identified issues have been resolved; the channel validation guards are now correctly applied in Resolved Issues
Files Reviewed (25 files)
Reviewed by claude-4.6-sonnet-20260217 · 2,634,754 tokens Review guidance: REVIEW.md from base branch |
jeanduplessis
approved these changes
Jun 8, 2026
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.
Summary
Adds agent channel-binding management to KiloClaw, end to end. The controller
now surfaces each agent's routing bindings on reads and exposes a declarative
endpoint to set an agent's channel-level default routes, delegating all routing
semantics to the OpenClaw CLI. The change is plumbed through the Durable Object,
the Worker platform route, the web internal client, and tRPC (personal and
organization namespaces). No UI is included; this is the backend for a later
binding management surface.
Changes
Controller (
services/kiloclaw/controller):advancedflag), sourced from the OpenClaw CLI. Every response that returns anagent summary carries them.
PUT /_kilo/config/agents/:agentId/bindingsthat declaratively sets anagent's channel-level default routes to exactly the requested channel set, by
diffing the CLI's view and issuing
bind/unbind.config.agents.bindings.updateand error codesagent_binding_conflict(409) andagent_binding_rollback_failed(500).operation rolls back only the routes it created (diffed against a pre-change
snapshot) and confirms restoration. An unconfirmable restoration returns 500
rather than report a clean result over changed routing.
:accountspecifier (this endpoint manages channel-level default routes only).
Cloud passthrough:
updateAgentBindingsmethod andcallGatewayControllerwidened to PUT.PUT /api/platform/agents/:agentId/bindingswith the bindingerror codes mapped through (
services/kiloclaw/src/routes/platform.ts).updateAgentBindingsin both the personal(
kiloclaw-router.ts) and organization (organization-kiloclaw-router.ts)routers, sharing
AgentBindingsInputSchema.AgentSummarytypes carrybindingsworker-side and web-side.Spec and tests:
managed-scope/concurrency limits (
.specs/kiloclaw-controller.md).smoke test exercises a binding round-trip against the pinned OpenClaw image.
Verification
Run against the pinned
openclaw@2026.5.26controller image:200, managed routes match the request)409, both agents' routing left unchanged)main(404)Visual Changes
N/A
Reviewer Notes
$include,ordering) are delegated to the version-matched OpenClaw CLI; the controller
does not edit route config directly.
advanced (peer/guild/team/roles), and externally authored routes are surfaced
in reads but left intact (see spec rule 22).
does not advertise
config.agents.bindings.update.