Skip to content

Improve the mesh SDK with public mesh discovery, blocking APIs, and native examples#331

Draft
i386 wants to merge 13 commits into
mainfrom
jd/sdk-improvements
Draft

Improve the mesh SDK with public mesh discovery, blocking APIs, and native examples#331
i386 wants to merge 13 commits into
mainfrom
jd/sdk-improvements

Conversation

@i386
Copy link
Copy Markdown
Collaborator

@i386 i386 commented Apr 18, 2026

Summary

  • Let Rust, Swift, and Kotlin SDK consumers discover all public meshes on Nostr, smart-auto connect to the best public mesh, or join a specific discovered mesh by invite token.
  • Add blocking mesh client APIs and real invite-token mesh transport so native SDK smoke tests exercise model listing and chat over the mesh instead of a localhost-only fallback.
  • Expand the native SDK surface with clearer FFI errors, refreshed generated bindings, a Swift owner-key helper, and a tested Swift example runner for the example app.

SDK

  • Add mesh-api discovery helpers for public mesh queries, smart auto-connect, and building a client from a discovered mesh.
  • Extend the UniFFI surface with public mesh query/result DTOs plus auto-connect helpers.
  • Update the Swift and Kotlin wrappers, docs, and generated bindings to expose the new discovery and connect flows.

Runtime

  • Replace the embedded client's localhost-only path with invite-token mesh transport in mesh-client, including model listing and chat over the mesh connection.
  • Add blocking join, list-models, status, disconnect, and reconnect helpers used by the FFI worker thread.
  • Tighten native smoke behavior so the live SDK test picks a model that is actually returned by the mesh.

Swift Example

  • Add a reusable MeshExampleRunner and unit tests for the Swift example app.
  • Add a Swift helper to generate owner keypair bytes for the example flow.
  • Update the XCFramework build script to better support the example and release packaging flow.

Testing

  • cargo fmt --all -- --check
  • cargo test -p mesh-api -p mesh-api-ffi --lib --tests
  • cargo test -p mesh-llm-client --lib --tests
  • ./sdk/kotlin/scripts/generate-kotlin-bindings.sh
  • ./sdk/swift/scripts/generate-swift-bindings.sh

@i386 i386 marked this pull request as draft April 18, 2026 04:19
@i386 i386 changed the title Add public mesh discovery and smart auto-connect to the SDK Improve the mesh SDK with public mesh discovery, blocking APIs, and native examples Apr 18, 2026
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