Skip to content

GO-7368 Add ephemeral pubsub and API v2 chat status - #3298

Merged
requilence merged 5 commits into
developfrom
go-7368-pubsub
Sep 28, 2026
Merged

requilence merged 5 commits into
developfrom
go-7368-pubsub

Conversation

@requilence

@requilence requilence commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Adds encrypted, ephemeral pubsub to Heart so clients and agents can send live activity updates without storing chat messages. The integration uses any-sync v0.13.5 and the merged publishclient compatibility fix.

  • Expose PubsubPublish, PubsubSubscribe, PubsubUnsubscribe, and Event.Pubsub.Message, with verified sender identity and Space ACL encryption.
  • Add POST /v2/spaces/{space_id}/chats/{chat_id}/status, publishing {"text":"Searching documentation","data":{"tool_call":"web_search"}} to status/<chat_id>. Empty text is omitted so clients can display localized typing; data accepts any JSON value. The endpoint enforces Space/write grants and supports dry runs and idempotency.
  • Keep accepted publishes alive after the originating RPC ends, load locally subscribed Spaces before receiving, and return connected peers without waiting for unavailable routes.
  • Serialize Space teardown with subscription registration, preserve subscriptions after rejected replacements, and reject payloads that exceed the encrypted wire limit before echoing or sending.
  • Update generated protobuf/mobile bindings, OpenAPI, discovery schemas, and client documentation. Pubsub remains ephemeral with no persistence or replay; the recommended chat status expiry is enforced by receiving clients.

Validation: race suites passed across core/api/..., core/pubsub, core/publish, space/spacecore, core/anytype, core, and clientlibrary/service; protobuf packages compile. API documentation, route authorization, schema, and response-contract checks pass. Regression tests cover all six pubsub review findings, arbitrary JSON preservation, localized defaults, dry runs, permission failures, and payload boundaries.

…l pub/sub

Expose the any-sync space-scoped pub/sub engine to app clients:
- PubsubPublish/PubsubSubscribe/PubsubUnsubscribe RPCs with wildcard
  topic patterns and subId-keyed subscriptions
- Event.Pubsub.Message broadcast with verified sender identity
- payloads encrypted with the space's current ACL read key (same key
  as object changes), decrypted+verified before events are emitted
- LAN peers served via the shared DRPC server; publishes go to the
  responsible node plus LAN peers
- docs/pubsub: design doc and client developer guide (topics, cadence,
  closing messages)
@requilence
requilence merged commit e781d63 into develop Sep 28, 2026
14 of 16 checks passed
@requilence
requilence deleted the go-7368-pubsub branch September 28, 2026 11:06
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant