Skip to content

feat(sdk): answer channel and role lookups - #141

Merged
zVapor-Dev merged 1 commit into
v3from
claude/project-thread-7r48ai
Oct 22, 2026
Merged

zVapor-Dev merged 1 commit into
v3from
claude/project-thread-7r48ai

Conversation

@zVapor-Dev

Copy link
Copy Markdown
Member

What this changes

  • sdk-js: adapter.onResources((spaceId, kind, filter, platform) => ...) and adapter.onPermissions((spaceId, userId, platform) => ...) answer the gateway's SpaceResources and SpaceMemberPermissions requests, so a remote bot's channel and role pickers get live data.
  • sdk-py: the same as on_resources and on_permissions. filter and platform are passed as keyword arguments only when the handler takes them, so def resources(space_id, kind) works. A public start() coroutine replaces the private _run_forever for bots that already run an asyncio loop; run() still wraps it.
  • Without a handler, both answer empty lists instead of a malformed result.
  • The examples and the sdk-py README connect to the standalone server's gateway port, 3002.
  • The changelog is updated.

Why

Remote bots had no way to answer these lookups, so their pickers stayed empty. The remote bots guide in the docs (Docs #1) relies on this.

Closes #138

Checklist

  • pnpm lint, pnpm turbo run typecheck, pnpm test (264), pytest (13), pnpm build, pnpm smoke:pack
  • New tests: resources and permissions over a real gateway (JS), and the Python handlers with and without the optional arguments

Requested by zVapor


Generated by Claude Code

Neither SDK handled space.resources or space.member.permissions. They
answered {}, so every remote bot's channel and role pickers were empty.

- sdk-js: onResources(spaceId, kind, filter, platform) and
  onPermissions(spaceId, userId, platform).
- sdk-py: on_resources(space_id, kind) and on_permissions(space_id, user_id),
  with filter and platform as keyword arguments for handlers that declare
  them, and a public start() coroutine for bots that already run an asyncio
  loop.
- Without a handler both answer empty lists instead of a malformed result.
- The examples connect to the standalone server's gateway port, 3002.

Closes #138

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017JdKJpQQK3XuLZTBiZ4gns
@zVapor-Dev
zVapor-Dev marked this pull request as ready for review October 22, 2026 15:53
@zVapor-Dev
zVapor-Dev merged commit dc5a432 into v3 Oct 22, 2026
1 check passed
@zVapor-Dev
zVapor-Dev deleted the claude/project-thread-7r48ai branch October 22, 2026 20:20
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.

SDKs: answer channel and role lookups

2 participants