Repository navigation
feat(macos): sign in with OpenClaw ID and approve this Mac as your device - #197630
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Renders (real SwiftUI views, fixture data, sandboxed render harness; not live)
mac-a02-where mac-a03-sign-in mac-a04-signing-in mac-a05-claw-picker mac-a06-choose-approval mac-a07-compare-code mac-a08-compare-code-confirmed mac-a09-owner-connected mac-b01-kit-entry-light (mockup) mac-b02-kit-connected mac-d01-settings-migrate mac-d02-migrate-confirm mac-e01-settings-owner mac-e02-stop-tools-confirm mac-e03-remove-mac-confirm mac-e04-settings-owner-tools-off mac-e05-start-tools-confirm mac-f01-claw-offline mac-f02-denied mac-f03-expired mac-f04-kit-invalid mac-f05-no-claws mac-f06-member-needs-invite mac-f07-sign-in-failed |
92649f3 to
b64a0ad
Compare
3d4dabc to
605dc4a
Compare
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
b64a0ad to
989fb2e
Compare
605dc4a to
f450624
Compare
989fb2e to
59b3f23
Compare
f450624 to
3def66d
Compare
59b3f23 to
c65af21
Compare
3def66d to
ec30bb0
Compare
c65af21 to
eae42e5
Compare
ec30bb0 to
2028e51
Compare
eae42e5 to
44f9a99
Compare
2028e51 to
33297cd
Compare
44f9a99 to
cdd5423
Compare
33297cd to
468ad34
Compare
…emoval, renew the Discovery session - open the sealed SAS handoff only after the person confirms the six digits on this Mac; a mismatch aborts - finish local removal when the revocation's answer is lost but the claw no longer lists this Mac - offer Sign in again when a tools-off Mac's Discovery session ended - read the node key and session on every route verification - check the recovery-kit deadline right before each signature
e38f39d to
a1df6f4
Compare
…vice (openclaw#197630) * wip: sign-in-first OpenClaw ID enrollment on macOS * wip: tests and renders for sign-in-first enrollment * test(macos): keep the render fixture's approval wait pending * style(macos): wrap sign-in-first OpenClaw ID code within Swift lint limits * style(apple): apply SwiftFormat to sign-in-first OpenClaw ID code * test(apple): unnest the handoff vector lookup * test(apple): unwrap before the throwing field reads * fix(macos): confirm the OpenClaw ID code on the Mac, reconcile self-removal, renew the Discovery session - open the sealed SAS handoff only after the person confirms the six digits on this Mac; a mismatch aborts - finish local removal when the revocation's answer is lost but the claw no longer lists this Mac - offer Sign in again when a tools-off Mac's Discovery session ended - read the node key and session on every route verification - check the recovery-kit deadline right before each signature * test(apple): long-poll the scripted mailbox; wrap the tools re-add call * fix(apple): pass the OpenClaw ID pin and listed key as tuples in device trust checks * style(apple): satisfy strict iOS SwiftLint in OpenClaw ID device enrollment * fix(macos): keep the OpenClaw ID sign-in callback off the main actor * fix(macos): preserve atomic OpenClaw ID enrollment completion * fix(macos): show migration failure without success copy







































What Problem This Solves
A Mac can join an OpenClaw ID claw only as a node with a separate invite, and nobody signs in. That isn't how a person uses their own Mac. Josh approved sign-in-first enrollment on 2026-11-11: the person signs in and the Mac becomes their own device.
User Impact
Not live-testable yet:
DulSrXtaYtPaLEnzEyHGuAHpVNWmaNbf), but Discovery staging only accepts its tokens after openclaw/discovery#14 is deployed.startandadd_owner_deviceneeds openclaw/discovery#13 and this protocol stack (feat(openclaw-id): approve an app's node together with its owner device #197573) deployed.Stacking: stacked on #197585 (
feat/ocid-mac-ocid-connection). The protocol side is #197573 (nodeon the SASstartand onadd_owner_device, and the approver UI).Member invite join is not in this PR. It goes in a second stacked PR to keep this one reviewable. A member account that picks a claw here gets "Ask for an invite" instead.
Why This Change Was Made
The Mac follows the protocol's "Owner device node" design (enrollment.md). It holds three keys, each in its own Keychain service, and none of them ever goes over the node bridge:
Enrollment works like this:
startcarriesnode {peer_key: W_node, description}, so the compared digits bind all three keys and the tool surface. Before the Mac opens the sealed handoff, the person must confirm the digits on the Mac too. The handoff's binding must then verify under its root for this claw and hostname, and its cert must name this D and W.OwnerDeviceCertandadd_owner_device {cert, node}at snapshot seq + 1, and they're sent as aroot_statement. Aseq_conflictnotice is answered by re-signing at the re-read verified snapshot's seq + 1 (up to 3 times).Stringcan't be zeroed either.node_peer_keys. The existing join-completion owner then switches the primary connection and opens the dashboard.The Swift ports (JCS statements, kit decode, R derivation, SAS commitment, transcript, code, AES-GCM handoff and peer-key proof) are checked byte for byte against vectors generated from the TypeScript protocol at #197573.
Evidence
All build and test runs were on the Mac Studio in a separate checkout, built with
OPENCLAW_IROH_NATIVE=1.swift build --build-testsforapps/shared/OpenClawKitand forapps/macos(both green).OpenClawIDfilter, 45 tests in 6 suites, 8 consecutive green runs at3d4dabcb9221.OpenClawIDOwnerEnrollmentTestschecks the kit, root, SAS and statement vectors.sandbox-exec: no network or Keychain).OnboardingOpenClawIDSignInTests: build config, the callback's state and issuer checks, claw routing by relationship, no claws, cancelled sign-in, invalid kit installs nothing, the automatic approval wait, and switching to the kit cancels the wait.scripts/format-swift.sh macosandscripts/lint-swift.sh macosare clean. The native i18n baseline was regenerated.OnboardingPageTests"verified node setup…" hangs in the sandbox insideDashboardManager.sharedinit. It hangs the same way on feat(macos): OpenClaw ID primary connection + dashboard proxy #197585's head.Renders are real views with fixture data from the sandboxed render harness; screenshots: #197630 (comment) (local copies:
~/.openclaw/workspace/reports/ocid-mac-sign-in-first-mockups/impl/). Recovery-kit entry can't be rendered there:NSSecureTextFieldblocks on the window-server lookup the sandbox denies. Its render is the mockup of the same view.Live-proof checklist (blocked on discovery#13 + #14 deploy)
gateway-owner-profile.ts,openclawIdOwner). The Mac's chat should land there with owner/admin scopes, not as an accountless person. Personal-profile mapping is OCF-510, out of scope.Known gaps
Screenshots: inspected before/after comparison.