Skip to content

Cbh/seity contacts - #1009

Merged
replghost merged 3 commits into
feat/chat-seity-profilefrom
cbh/seity-contacts
Sep 26, 2026
Merged

replghost merged 3 commits into
feat/chat-seity-profilefrom
cbh/seity-contacts

Conversation

@corey-hathaway

Copy link
Copy Markdown

Seity contacts layer on top of #1001.

Adds profile.disclose({ reference }) / profile.retract() and profile.presentContact({ peerIdentity }): a product discloses one reference to the user's chat contacts, and a chat product shows a contact's profile by naming the contact. The host relays and stores references; no product holds another user's.

  • disclose / retract (methods 1-2, App only) store the reference in core storage (ProfileDisclosure). Only the discloser may retract.
  • Chat v2 relays it as a new content type (V2 index 21) through the actor's host-private outbox, next to payments and rich files. A per-peer watermark decides who is sent what; the product submits opaque ciphertext and cannot prepare the type itself.
  • On receive the host stores the reference per chat product (ProfileReferencesReceived) and strips the frame from the opened plaintext.
  • presentContact (method 3) substitutes the stored reference into the existing ProfilePlatform::present_profile. Host adapters are unchanged.
  • The CLI records presentations to TRUAPI_PROFILE_LOG (hash only).

Open questions (the index, several disclosing products, consent, other devices) are in docs/rfcs/profile-disclosure.md.

Tests:
disclose/retract/presentContact runtime tests, relay send/receive actor tests, codec round-trip, regenerated goldens. cargo test -p truapi -p truapi-chat-v2 -p truapi-codegen -p truapi-platform -p truapi-server -p truapi-host-cli and bun test in js/packages/truapi-host pass.

Consumed by the dotli Seity layer (#287 follow-up) and Seity's Share with contacts.

corey-hathaway and others added 3 commits September 26, 2026 15:18
…s by name

On top of `profile.present`:

- `disclose({ reference })` (method 1, App only) stores the user's own
  reference with the product that disclosed it; `retract()` (2) withdraws
  it, and only the discloser may.
- `presentContact({ peerIdentity })` (3) names a chat contact; the host
  looks up the reference that contact's host sent and hands it to the
  existing `ProfilePlatform::present_profile`. The product never holds a
  contact's reference, so it cannot read, keep, forward or substitute it.

Both kinds of reference live in core storage: `ProfileDisclosure`
(wallet-owned) and `ProfileReferencesReceived { product_id }` (cleared with
the chat product, like its roster). The chat relay that fills the latter
comes next; its write helper is here and tested.

The CLI installs a presenter that records each presentation to
`TRUAPI_PROFILE_LOG` as a SHA-256 and format prefix, never the reference.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Chat v2 half of profile disclosure, built on the actor's host-private
outbox that payments and rich files already use:

- Wire: `ProfileReference { discloser_product_id, reference: Option }` at
  V2 content index 21 (a new shared wire index; needs agreeing with native
  Chat before it ships).
- Send: `publish_profile_reference`, run on Initialize, seals one message
  per ready peer whose watermark differs from the user's disclosure, as an
  `OutgoingKind::ProfileReference` the product submits as opaque ciphertext.
  The watermark (trailing `profile_shared`, absent from older snapshots)
  advances at queue time; a withdrawal is sent to peers that hold one.
- Receive: the frame is classified and screened, stored per peer in
  `ProfileReferencesReceived` for the chat product, and cut from the opened
  plaintext (forcing a re-encode), so the product never sees it. Only live
  frames update it, never compacted history. Products cannot prepare one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The RFC for `disclose` / `retract` / `presentContact` and the Chat v2 relay
on the host-private outbox, unnumbered and in draft. Its open questions are
the known gaps of the prototype: the content-type index, several disclosing
products, consent, other devices, reconcile timing, and where references
are resolved. Each gap is also marked where it lives in the code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@corey-hathaway
corey-hathaway requested a review from a team as a code owner September 26, 2026 15:39
@github-actions github-actions Bot added documentation Improvements or additions to documentation rfc rust Pull requests that update rust code labels Sep 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CI Status: not green, 2 items need attention.

  • rust: failure
  • playground: failure
All job results
job result
android-bindings success
changes success
changeset-guard success
cli-package success
codegen success
e2e skipped
explorer success
headless-install success
host-android-bindings success
host-android-detekt success
host-wasm success
ios-bindings success
ios-swift success
licenses success
playground failure
provider-android-bindings success
release-guard success
rust failure
ts-client success
ts-debugger success
ts-host success
wasm-provider success
workflow-lint skipped

Signing credentials: failure as of 2026-09-25, a release may fail

Commit e89fd093 · run log

@github-actions

Copy link
Copy Markdown
Contributor

iOS simulator preview

Built from e89fd093a, stamped with it in TrUAPICommit.

gh run download 36252697313 --name simulator-preview-e89fd093a
unzip polkadot-app-*.app.zip
xcrun simctl install booted polkadot-app.app
xcrun simctl launch booted io.parity.polkadotapp.develop

Or download it in a browser, which arrives as a zip wrapping
the .app.zip, so it needs unzipping twice.

An arm64 simulator slice, so it needs an Apple Silicon Mac and does not
install on a device. Kept for 14 days, after which the link stops
resolving and a new push rebuilds it.

@replghost
replghost merged commit e89fd09 into feat/chat-seity-profile Sep 26, 2026
33 of 37 checks passed
@replghost
replghost deleted the cbh/seity-contacts branch September 26, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation rfc rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants