Skip to content

feat:Improve shell resolution and PTY spawn diagnostics#23

Open
aichy126 wants to merge 3 commits into
Leask:mainfrom
aichy126:main
Open

feat:Improve shell resolution and PTY spawn diagnostics#23
aichy126 wants to merge 3 commits into
Leask:mainfrom
aichy126:main

Conversation

@aichy126

@aichy126 aichy126 commented Apr 28, 2026

Copy link
Copy Markdown

in order to solve

#22

the error encountered

aichy126 and others added 3 commits April 28, 2026 20:19
The Apple client still authenticated the way the backend worked before
2026-04-10: it sent SHA-256(password) as a reusable bearer token. The server
hardened auth that day (ba7509a, a910f26, 6ecb8fe) and dropped password-hash
tokens, but apps/Apple was last touched on 2026-03-23 and never followed. Every
request has returned 401 since, so bootstrap died on its first heartbeat and the
app could not reach any current Tabminal host.

Implement the flow the backend actually expects:

- TabminalMobileCore: add the challenge/login/refresh calls and the
  tabminal-hmac-sha256-login-v1 responder. The HMAC is keyed with the raw bytes
  of the password digest, not its hex text, and signs the exact expiresAt string
  the server sent, so the challenge keeps expiresAt as a raw String rather than
  a re-serialized Date.
- MobileAppModel: exchange the password (or a stored refresh token) for a token
  pair, hold the access token on the endpoint, and rotate it 60s before its
  15-minute expiry from the heartbeat loop, propagating the new token to the
  host record and every workspace that holds a copy of the endpoint.
- Sub-hosts now log in against themselves. Inheriting the main host's token only
  made sense when a token was a password hash shared across hosts.
- MainHostCredentialStore: persist the rotating refresh token instead of the
  password hash. The password is never stored.
- project.yml: declare the deployment targets explicitly. xcodegen does not emit
  them for supportedDestinations targets, so builds defaulted to the SDK version
  and xcodebuild rejected any device older than the SDK.
- run-device.sh: build, sign, install and launch on a connected device.

Verified against a real host (MacMini, 3.0.40): the app completes login,
heartbeat, session create and websocket streaming, and renders live PTY output.
Package tests cover the HMAC against a vector generated from the server's own
construction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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