Repository navigation
Native Termux remote bus: scoped UI grants and credential carry - #3861
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Core source note for slice 1 (read at58daba13e, not a phone result): the history tool also needs an explicit viewer contract, not just an approved OAuth client.
So the first-page implementation must carry the approved native client's actual read/display scope through the existing caller/read families. Decide and validate its viewer at that owner; do not inherit the Claude director identity or disguise the phone as an agent merely to satisfy the history default. Existing For owner-specific reads, keep This is context for your plan, not another implementation or transport proposal. |
eaf59b3 to
13dc440
Compare
|
debt-tools at a6eb688 passes. Warn-only, never blocks (4) |
|
debt-src at a6eb688 passes. Warn-only, never blocks (10) |
13dc440 to
7fd4da9
Compare
7fd4da9 to
8633f7d
Compare
8633f7d to
a6eb688
Compare
Current result
6 commits, 16 changed files, +1030/-94 against main, including the plan. Published head: a6eb688. The authorization/carry implementation and caller-owned history selection are pushed; the actual remote Toad attachment is the next implementation step.
Primary target: normal Toad input/rendering/scrolling on Termux, only remote Core bus data over the network. SSH is interim; mosh is parked. The maintained Android fork is separately merged and hosted-qualified. Actual phone migration and native remote-bus acceptance remain open.
Authorization: own UI caller, not a proxy agent
Before:
After:
ReadToolcapability, never an allowlist or descriptive MCP hint.claude-aiprerequisite is removed; a data reader needs no fabricated thread.ReadAuthority.history_viewerowns the thread-reader default;NoThreadCallerdecodes the existing anonymous/named viewer family.CommsHistoryTooldelegates to that owner, so a scoped UI caller can read a channel while DM history still requires a participant.One bearer format, explicit carry
Before: separate access/thread dictionaries and a resolver choosing authority by dictionary location.
After: one
ConnectorAccessfamily with distinct OAuth, local service, thread, UI, absent and retained-unattributed Director members. The retained case preserves its recorded label and prior authority; it does not fabricate which old producer issued it.The explicit installer carry preserves clients, pending approvals and codes, refresh entries, browser trust, bearer digests, expiry and thread authority. Colliding old access/thread digests refuse without rewriting input, because the old precedence depended on expiry. Runtime decoding accepts only the new format; no compatibility alias, fallback decoder or on-load converter remains beside it.
Private profile publication
GrantUiVerbandRevokeUiVerbdeclaregrant-uiandrevoke-ui; installed command success is not yet proved.The existing document transaction publishes a new private HTTPS profile before committing the bearer. A failed profile publication commits no grant. Existing files and leaf symlinks are not overwritten; the profile uses the checked-directory atomic publisher and owner-only file/directory roles. Console output contains public grant ID, root namespace, expiry and profile path, never the secret. The server's stored grant remains the authority, not profile metadata.
External credentials and shared lock behavior
ConnectorCredentialsFile;ConnectorStore.owned()derives it.StoreGuard; writer drains are one shared capability. SQLite's transaction-specific drain is unchanged.GuardedExternalStoreowns the one selected-resource borrowing loop inherited by SQLite metadata and JSON credentials. The installer's ExitStack-through-rollback lifetime is unchanged; capture drains remain separately released.The replaced resolver and copied guard/borrowing implementations are deleted rather than retained as a second path. Published per-file additions/deletions are visible in the diff; growth is primarily new authorization, carry and controls, not a claim of measured speedup.
Evidence and actual gaps
Authored controls cover:
The hosted source/tools failures at7fd exposed two nonexistent
FieldCodec.dumpscalls, an untyped old issuer label and manual endpoint validation. Head8633 uses the actual encode/compact API (also in the authored carry controls), nominalAccessLabelpreserves the former label, and yarl's origin/normalization operations own endpoint validation. The changed code also replaces jargon and removes an unused import.git diff --checkpassed and all 11 edited Python files parsed. Affected control execution, OAuth/thread/service regressions and the real selected-file carry/rollback remain open. At8633 the tools gate passed and the source gate's sole remaining blocker was one word in a comment; a6eb corrects that word after rebasing current main. Exact-head source judgment is recorded through Core, including the per-file growth explanation. Current-head hosted conclusions are read from that head's own jobs.Next implementation is the actual remote channel/page attachment at Toad's existing selection/read boundary, using the scoped MCP caller and existing conversation presentation.
Queue interactions later reuse the existing unified native-DM/channel/inbox queue owner (Tristan56446/56449); this work must not add a fourth queue.
Assumed / still to establish
Plan:
plans/NATIVE-TERMUX-REMOTE-BUS-PLAN.md.