Repository navigation
feat(trios-macos): Internet calls through the TRI-NET call stack - #2054
dmitrii-f-t27 wants to merge 3 commits into
Conversation
Spec first: apps/trios-macos/.trinity/specs/internet-calls.md (#2053). - Calls segment in the Mesh tab: call server field (validated, confirmed, never changed during a call), account binding by claimed nickname or link code, exact-nickname lookup over the Internet route only, call button on a resolved contact, incoming banner and app-level floating panel, states, mute, hang up. Mesh node IDs never get a call button. - InternetCallsModel lives for the app session (started at launch); incoming invitations are consumed only when shown, transient poll errors keep the banner, a failed decline keeps it, and every end signal (terminal status, remote departure, room closed, own status poll for answered calls) releases room and microphone once. - Build seam in clade-build: pinned TRI-NET shared Swift (TRINET_PIN), a SwiftPM-built LiveKit 2.15.2 (packages/TriOSLiveKit), -D TRIOS_CALLS, and a runnable signed bundle (executable in Contents/MacOS, QueenUILib, LiveKit dylib and frameworks); Sources/CSQLCipher found in the monorepo layout. - Info.plist: own TRI-NET identity Keychain service, microphone usage text. - Pure policy TriOSCallPolicy with XCTests; a seam integration test drives the real model and TRI-NET controller against a stub server in CI. Closes #2053 Agent: LEAD
Summary by t27-beesWorth a look
Read: 14 files, +2231 -6, the whole diff up to 60000 characters (the rest was not read). Head |
- A server change bumps a generation: a late claim, search or account result of the previous server is dropped before it reaches the Keychain, the binding or the contacts; pending operations are cancelled. The configuration is reloaded through the shared loader, which now sends a service token only to its own origin (Trinity-S-AI-DNA/tri-net#415), also after a restart. TRINET_PIN moves to f70939ab. - Every call, answer and hang-up bumps an attempt: a completion or error of a superseded attempt never tears down the current call or shows an error on it. teardownCount records each release. - Seam test (CI): delayed stub responses for create, claim, search and link; captured Authorization per host; active teardown exactly once with a server cancel; delayed A never ends B; incoming panel visible outside the Calls tab. - TriOSServerAddressProblem conforms to Error (Result needs it). Refs #2053 Agent: LEAD
…uplicate module maps Refs #2053 Agent: LEAD
Closes #2053
Spec first:
apps/trios-macos/.trinity/specs/internet-calls.md. Owner decision 2026-10-21: Internet calls between TriOS users on Mac and phone; this PR is the Mac side. It reuses TRI-NET's identity, directory, signalling and LiveKit media instead of a second call stack.What it adds
grok*tokens, labelled controls): call server field, account binding (claim a nickname, or join the phone's account with a link code), exact-nickname lookup over the Internet route only, a call button on a resolved contact only, incoming banner plus an app-level floating panel with Answer/Decline, Calling/Ringing/Connecting/Connected/Reconnecting/Ended/Failed, mute, hang up. A mesh node ID never gets a call button and never implies an account.InternetCallsModel.shared, started inapplicationDidFinishLaunching): receiving continues whatever tab is selected; an invitation is consumed only when shown (otherwise the shared poll offers it again); transient poll errors keep the banner, only authoritative absence closes it; a failed decline keeps the banner; every end signal (terminal status, remote departure, room closed, TriOS's own status poll for answered calls) releases room and microphone once, without waiting for server DeleteRoom.HTTPS address, not verified.clade-build(the build that links SQLCipher and QueenUILib;xtask builddoes not link SQLCipher and is unchanged):TRINET_PINpins the TRI-NET commit whosephone/shared/{CallIdentity,InternetCall,NicknameDirectory}.swiftare compiled in;packages/TriOSLiveKitbuilds LiveKit 2.15.2 with the TRI-NET Xcode projects' pins;-D TRIOS_CALLS; the bundle is made runnable: executable inContents/MacOS/trios, QueenUILib, LiveKit dylib and frameworks embedded, ad hoc signed and verified.Sources/CSQLCipheris now found in the monorepo layout too.TRINET_IDENTITY_KEYCHAIN_SERVICE(TriOS is its own TRI-NET device; needs phone(shared): per-origin service tokens, per-app identity Keychain service, stale account results dropped tri-net#416) andNSMicrophoneUsageDescription.Dependencies
TRINET_PIN=f6fe7d45from phone(shared): per-origin service tokens, per-app identity Keychain service, stale account results dropped tri-net#416 (per-app identity Keychain service; Internet-only exact lookup). Move it to the merge commit once 📖 Ch.AppE — Pre-reg PDF + OSF + IGLA RACE results (500w · 🔴 P0 · Appendix E) #416 lands.Evidence in this PR
TriOSCallPolicyTests(XCTest,Trios Swift CI).TriOS calls seamworkflow (macos-15): fullclade-buildwith pinned TRI-NET, Queen (gHashTag/trinity8e535bc9) and LiveKit; bundle executable,@rpathdependency closure and signature checks; seam integration test (real model + TRI-NET controller vs a stub call server);trios.appkept as an artifact for app and device QA.Not verified
No live call yet. Acceptance still needs Mac -> phone and phone -> Mac on two networks with audible two-way audio, accept/decline/cancel/end convergence, reconnect and TURN with UDP blocked, against a call API, LiveKit and TURN reachable from both networks; none has been verified from the configuration available here.
Dmitrii Fedorov (@dmitrii-f-t27)