A multiplexing gateway refused PATCH/DELETE /api/profiles/<name> under every
native grant, even one minted for that very profile, so the Desktop Profiles
screen could never rename or delete a profile while a gateway ran (403
profile_scope_mismatch). Separately, the Desktop's registry route appended the
ambient ?profile= (the sidebar's profile, or "__all__") to a path that already
names its profile, so SOUL reads/writes 403'd for every profile but the
active one, and for all of them in All-profiles scope.
One grant design for both:
- gateway/runtime_bootstrap.py: new `native-profile-registry` purpose
(capability `profiles:registry`), the twin of `native-profile-create`.
- native_http: that grant redeems only for PATCH/DELETE /api/profiles/<name>,
only for the profile it was minted for, never deletes or moves the
gateway's launch home (the default root's presentation-only rename stays
allowed), and is single-use. An ordinary native-http grant keeps refusing
both writes; a registry grant authorizes nothing else (401).
- Desktop: nativeGrantPurpose() mints the registry grant for those two
writes; pathWithProfileScope never adds the ambient profile to an
/api/profiles/<name>/... path (collection routes still get it).
Refs #134889 (DB-5)
Refs #134889 (DB-6)
Refs #140345
Refs #140346
Refs #140791
Refs #140719