Skip to content

feat(server): restore Connect MCP pairing scopes - #56

Open
nullStack65 wants to merge 2 commits into
mainfrom
cursor/restore-connect-pairing-529f
Open

nullStack65 wants to merge 2 commits into
mainfrom
cursor/restore-connect-pairing-529f

Conversation

@nullStack65

Copy link
Copy Markdown
Owner

What Changed

An environment again advertises Connect MCP pairing and can exchange a pairing code for a session.

  • GET /.well-known/oauth-authorization-server lists the pairing scopes (orchestration:read, orchestration:operate, and the rest of the standard client set for full access).
  • POST /oauth/mcp/token exchanges a pairing code. access: "auto" grants read and operate, which is what another machine needs to drive this one. t3code-peer-link is the software id a peer registers with.
  • CI runs scripts/connect-pairing-smoke.ts against the built server bundle and fails if that discovery path is missing.

Why

This fork diverged from upstream at d7819c18 (2026-09-22, desktop 0.0.42). Upstream T3 0.1.8 (bf469bb) added MCP pairing scopes after that, in the OAuth discovery document and the pairing-code exchange. The fork already had Clerk and the relay, but not those scopes or /.well-known/oauth-authorization-server on the environment, so another machine could not complete a Connect pairing and drive this one.

Merging all of 0.1.8 would take the thousands of unrelated commits since the split and collide with the fork's own patches. This keeps those patches and restores only the pairing surface, mapped onto the scopes this fork already enforces. Upstream's settings:write and source-control:write are not scopes here; full access is the fork's standard client set.

Installing the fixed build on the Air

The Air (account kara3) is Apple Silicon. This fork does not follow upstream's update channel, and desktop in-app update is off (no latest-mac.yml).

  1. After this is on main, run Fork release with include_macos_arm64 set.
  2. Download T3-Code-<version>-arm64.dmg from the nullStack65/t3code GitHub Release and check SHA256SUMS.
  3. Open the DMG, copy the app into Applications, and use Gatekeeper's Open action if the build is unsigned.
  4. Install over the existing app. User data and existing pairings stay, because the app id is unchanged.
  5. On the host, enable T3 Connect under Settings → Connections. On the Air, sign in to the same account and choose that environment, or redeem a pairing code.

Details are in docs/operations/fork-release.md.

UI Changes

No UI change.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Provenance

Model: Grok 4.7
Task: feature

Open in Web Open in Cursor 

The fork diverged from upstream on 2026-09-22, before T3 0.1.8 taught an
environment to advertise MCP pairing scopes and exchange a pairing code.
Another machine could not link and drive this one. This adds that discovery
endpoint and code exchange on the fork's existing auth scopes, without
merging the rest of upstream.

Model: Grok 4.7
Task: feature
Agent: cursor
Co-authored-by: Kameron Smith <nullStack65@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nullStack65

Copy link
Copy Markdown
Owner Author

Closing and reopening so CI runs under nullStack65 after Actions was re-enabled for this repo (only CI and Fork release). Head remains 30fd059.

@nullStack65

Copy link
Copy Markdown
Owner Author

START: Build and install PR 56 locally on Jeff Air, exact head 30fd059. Run typecheck, tests, pairing smoke, arm64 DMG; fsync recovery record before app replacement. No push, merge, CI wait, or upstream release install.

@nullStack65

Copy link
Copy Markdown
Owner Author

CHECKPOINT: HTTPS clone/fetch complete; detached HEAD verified exactly 30fd059. Dependency command: vp env exec --node 24.13.1 --package-manager pnpm@11.10.0 vp i (running). Existing app confirmed com.t3tools.t3code version 0.1.9-assemblyai.2; no app replacement yet.

@nullStack65

Copy link
Copy Markdown
Owner Author

RESULT: BLOCKED on Jeff Air disk capacity at exact detached head 30fd059. Dependency command vp env exec --node 24.13.1 --package-manager pnpm@11.10.0 vp i stopped with exit 143 when free space fell below 500 MiB (716 resolved, 261 downloaded, 0 added). Typecheck, tests, JS build, pairing smoke and DMG packaging NOT RUN; no pass/fail counts or artifact hashes available. Original com.t3tools.t3code app version 0.1.9-assemblyai.2 untouched; no replacement or launch attempted. Required result and postinstall JSON records fsynced under /Users/kara3/closura-repos/. No writable secondary volume found. Unblock: free disk space on Air; recommend at least 10 GB available, then resume exact-source build. No push, merge or CI wait. secret_scan: not_performed.

@nullStack65

Copy link
Copy Markdown
Owner Author

START cleanup/resume: User authorized only regenerable development caches to free about 15 GB on Jeff Air, stop if less than 10 GB can be freed. Preserve personal files/browser profiles. Resume source 30fd059, local checks and arm64 build, fsynced recovery then installation; no push/merge.

@nullStack65

Copy link
Copy Markdown
Owner Author

Frozen 2026-11-22 CEO portfolio audit — cash-path priority; can reopen at the Dec 18 runway check.

@nullStack65 nullStack65 reopened this Nov 22, 2026
@nullStack65

Copy link
Copy Markdown
Owner Author

FINDING

Note

🤖 gpt-6.1-sol responding on behalf of nullStack65

Initial independent source review of PR 56, authored originally by Grok 4.7. No earlier substantive pass was present (CodeRabbit explicitly skipped). This is the single full pass; later verification is limited to its finding and repair delta. Reviewed requirements are the existing PR body and all 13 changed files, traced through pairing credential subset enforcement, HTTP route composition, contracts and built-bundle smoke.

Base main a777dad; merge base 05993d8. No critical or important behavioral defect established by this source pass. The reported nit is an own-change CI failure and will be repaired. Other red checks remain separate, not waived.

CI evidence: https://github.com/nullStack65/t3code/actions/runs/45000001539 . Logs establish the Knip finding plus other failures outside this PR scope. No local runtime acceptance claimed in this review; focused validation follows the repair. UI/device/remote installed acceptance remains unverified.

Merge is held: main .github/workflows/mobile-eas-production.yml has push branches:[main], matching changed paths and an EAS production job (token-dependent). Current default release/native-0.1.10 has CI only; this PR still targets main. No release, production workflow dispatch or merge is authorized by this result.

{
  "reviewed_head": "30fd059f21d56484f4fdb54ef4b8dbc5fd0a8fd9",
  "reviewer": "gpt-6.1-sol / Codex in T3; independent of original implementer",
  "findings": [
    {
      "id": "R1-N1",
      "severity": "nit",
      "summary": "Five internal pairing helpers are exported and MCP_PAIRING_SCOPES aliases another exported constant; Knip rejects both. Remove helper exports and give the public list its own array.",
      "outcome": "open"
    }
  ]
}

Model: gpt-6.1-sol
Task: repair
Agent: CLO-694 ready PR owner
@nullStack65

Copy link
Copy Markdown
Owner Author

RESULT

Note

🤖 gpt-6.1-sol responding on behalf of nullStack65

Focused closure of R1-N1 on current head 0928682245be264762f4e2482b9f68fe2aefa766. This retains the single initial independent pass at #56 (comment); no new full pass. The repair author checked only the declaration/array delta against 30fd059f21d56484f4fdb54ef4b8dbc5fd0a8fd9, with unchanged base main at a777dad1ae1f471f503cb27a099b3b22e0545a52 (merge base 05993d81acd2eec0081e2b396bc52bc993bb2bf3).

Five unused helper exports are now module-local. The public pairing scope array retains identical values and readonly tuple typing without aliasing another export. Two files changed, +6/-8. Existing HTTP pairing, scope contract and bundle smoke unit suites pass: 3 files, 3 tests. Focused formatting and lint pass. Contracts and server typechecks report no errors (server exit 0). Scoped Node 24.22.3 Knip reproduces the old 7 unused exports plus 1 duplicate alias, then reports only two unchanged baseline exports: expandHomePathFromWith and layerDisabled. Knip remains exit 1; full CI is not green. The repair guard records one formatting failure and a second attempt that passed the own-change checks; no third attempt.

Merge remains blocked by publishing scope and CI. The existing main workflow .github/workflows/mobile-eas-production.yml matches pushes to main for packages/contracts/** and scripts/**; it can run production OTA/store submission when configured. It is byte-identical on this PR. The actual default release/native-0.1.10 has no direct publishing workflow, but this PR targets main. No merge, release or deployment performed. Other CI failures in release patch handling, relay/migration tests, import tests and desktop loading are outside this declaration repair. No gates waived or workflows cancelled. Built-server smoke, device/remote acceptance and browser verification remain unverified, tracked in the owning batch.

{
  "reviewed_head": "30fd059f21d56484f4fdb54ef4b8dbc5fd0a8fd9",
  "current_head": "0928682245be264762f4e2482b9f68fe2aefa766",
  "reviewer": "gpt-6.1-sol / Codex in T3; original independent pass retained, nit closure by repair author",
  "findings": [
    {
      "id": "R1-N1",
      "severity": "nit",
      "summary": "Pairing helpers are module-local; MCP_PAIRING_SCOPES has its own readonly array. Own-change Knip findings cleared.",
      "outcome": "fixed",
      "rechecked_head": "0928682245be264762f4e2482b9f68fe2aefa766"
    }
  ]
}

This branch has not been deployed

No deployments
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.

2 participants