Skip to content

Save bot profiles and create groups through the backend (Grok Bot 1.1) - #170

Open
lamazzing wants to merge 1 commit into
ScriptedAlchemy:mainfrom
lamazzing:feat/backend-profiles-and-rooms
Open

lamazzing wants to merge 1 commit into
ScriptedAlchemy:mainfrom
lamazzing:feat/backend-profiles-and-rooms

Conversation

@lamazzing

@lamazzing lamazzing commented Nov 17, 2026 •

Copy link
Copy Markdown

Grok Bot 1.1 keeps cloud bots' profiles and groups ("rooms") on the backend, and the box mirrors them. Two commands broke because of this:

  • bots update reported success, but the next sync undid the change, so descriptions never actually changed. It now does what the app does: it saves the edited fields with GrokBotService/UpdateGrokBotAgent (partialUpdate: true), then calls the box's updateAgent with editedFields, serverHeldFields and serverSavedAtMs.
  • groups create failed with 502 A Sand box session is not permitted on this endpoint, the same class of error as sendPrompt failed: 502 A Sand box session is not permitted on this endpoint. #165 / Send prompts through the Cursor backend (fixes #165) #166. It now creates the room with GrokBotService/CreateGrokBotRoom. The fields come from the app bundle's CreateGrokBotRoomRequest: agent_id set to a client nonce, name, description, member_agent_ids and human_member_user_ids. The command then waits for the box to mirror the room and applies the title and avatar.

Both calls go only to the allowlisted backend, using the app account's credentials (the same ones EnsureSandBox uses). Sessions without those credentials (GROK_BOT_GATEWAY_URL) keep the existing gateway path.

  • Tests: test/gateway-update.test.js, with the call order, request bodies, room id confirmation and no gateway createGroup when the backend succeeds. npm test passes (513).
  • Verified live against Grok Bot 1.1.0: gbot groups create created a 5-member group, and its avatar was applied with the bots update path.

This PR is independent of the port-token PR, although live use needs both, plus #166.

🤖 Generated with Claude Code

Grok Bot 1.1 keeps cloud bots' profiles and groups (rooms) on the backend, and
the box mirrors them.

- bots update: save the edited fields with GrokBotService/UpdateGrokBotAgent
  (partialUpdate) first, then call the box's updateAgent with editedFields,
  serverHeldFields and serverSavedAtMs, as the app does. A box-only write
  reported success but was undone by the next sync.
- groups create: create the room with GrokBotService/CreateGrokBotRoom
  (agentId = client nonce, name, description, memberAgentIds,
  humanMemberUserIds), wait for the box to mirror it, then apply title/avatar.
  The gateway's createGroup answers 502 "A Sand box session is not permitted
  on this endpoint" for box credentials.

Both calls go only to the allowlisted backend with the app account's
credentials; sessions without them (GROK_BOT_GATEWAY_URL) keep the gateway path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 14aeecc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
grok-bot-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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