feat(agent-world): Messaging write actions (non-DM)#12
Merged
Conversation
Wires public metadata reads for Channels, Groups, Broadcasts, and Inbox
into the Agent World shell. Encrypted DMs (Signal protocol) are gated
behind `E2E_MESSAGING_ENABLED = false` and render a "Secure direct
messages — coming soon" placeholder.
## Methods wired (Rust handlers + schemas + TS bridge)
- openhuman.tinyplace_channels_list — channels.list (ChannelQueryParams)
- openhuman.tinyplace_groups_list — groups.list (GroupQueryParams)
- openhuman.tinyplace_broadcasts_list — broadcasts.list (BroadcastQueryParams)
- openhuman.tinyplace_inbox_list — inbox.list (InboxQueryParams + owner)
- openhuman.tinyplace_inbox_counts — inbox.counts (owner)
## NOT wired (Signal / E2E deferred)
- messages.send, keys.*, conversations.* — no handler, no schema, no bridge
## UI
- MessagingSection.tsx: 5-tab chip nav (Channels / Groups / Broadcasts / Inbox / DMs)
- DMs tab renders gated "coming soon" shell (data-testid="dms-coming-soon")
- Route: /agent-world/messaging registered in AgentWorld.tsx
## Tests
- Rust: schema_and_controller_lists_match, schema_namespace_is_tinyplace,
rpc_method_names_have_correct_prefix — all pass with 9 controllers
- Vitest invokeApiClient: 22 tests (13 new for messaging methods)
- Vitest MessagingSection: 9 tests covering gated DMs state, tab nav, empty states
## Gates
- GGML_NATIVE=OFF cargo check: OK
- cargo test tinyplace: 6/6 pass
- corepack pnpm typecheck: OK
- corepack pnpm lint: 0 errors (98 pre-existing warnings)
- corepack pnpm test (31 agentworld tests): all pass
- corepack pnpm i18n:check: 0 missing, 0 extra
Resolve AgentWorld.tsx onto the new TwoPanelLayout shell (Explore + Messages). Restyle MessagingSection (5-tab gated shell) to the app theme; keep white text on bg-ocean/blue badges; preserve the gated 'secure DMs coming soon' state + testid.
Absolute /agent-world/<slug> routing. Active tab used bg-ocean (undefined) → invisible; switch to the ChipTabs bubble (Settings → Account look).
Makes the Agent World Messaging page actionable across all non-DM tabs, consuming the existing tiny.place SDK mutation methods. Encrypted DM stays fenced (E2E_MESSAGING_ENABLED untouched) — that needs the Signal protocol, which lands in the SDK separately. Write controllers (openhuman.tinyplace_*, internal-only, 1:1 schema/registration): - inbox: mark_read, mark_all_read, archive, unarchive, remove - channels: join, leave - broadcasts: subscribe, unsubscribe - groups: join, leave (leave = remove-self; SDK exposes no groups.leave) Each acts as the authenticated user (own inbox / own membership); groups-leave derives the self agent-id from the wallet signer. Renderer adds per-row action buttons via a shared useRowActions hook + RowAction/ActionErrorBanner, with refetch-on-settle and graceful PaymentRequiredError surfacing (paid channels/groups degrade until the x402 round). Channel/group message posting (post_message/fanout) deferred — needs a composer/thread UI. Tests: 10 Rust handler param-validation tests + 8 Vitest action tests.
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.
What
Makes the Agent World Messaging page actionable across all non-DM tabs, consuming the existing tiny.place SDK mutation methods. Encrypted DM stays fenced (
E2E_MESSAGING_ENABLEDuntouched) — that needs the Signal protocol, which lands in the SDK separately.Stacked on #7 (
feat/agent-world-messages).Write controllers (
openhuman.tinyplace_*, internal-only, schema/registration 1:1)groups.leave)Each acts as the authenticated user (own inbox / own membership); groups-leave derives the self agent-id from the wallet signer. Renderer adds per-row action buttons via a shared
useRowActionshook +RowAction/ActionErrorBanner, with refetch-on-settle and gracefulPaymentRequiredErrorsurfacing (paid channels/groups/broadcasts degrade until the x402 round). Channel/group message posting (post_message/fanout) deferred — needs a composer/thread UI.Tests
Verification
cargo check --locked --lib✅ ·cargo test -- tinyplace✅ 16 passed ·cargo fmt✅pnpm typecheck✅ · vitest 17 passed