cloud.status() only checked for an access_token's presence, not its
freshness, so the GUI kept showing "signed in" (and the live "Add to
Slack" button) after a session had actually expired. Clicking it hit
begin_managed_connect's real fresh_access_token check, which correctly
rejected it — but the modal just printed the bare error with no way
to recover.
SlackOneClick now treats a signed_in:false response from connectManaged
as a session-expiry signal, switches into the sign-in prompt, and
auto-resumes the Slack connect once sign-in completes.
Fixes#658
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A machine joins with its own identity and holds a reverse channel to the controller.
Provider keys and connector accounts deploy sealed to the machine's pinned key.
The gallery install path hashes the manifest markdown as UTF-8, and
personas/manifest.py reads it back as UTF-8, but the temp file written
between them used Path.write_text() with no encoding. That falls back to the
locale encoding. On Linux and macOS the locale is UTF-8 and all three agree.
On Windows it is cp1252, and gallery copy routinely contains characters
cp1252 cannot represent.
Two distinct failures follow:
* CJK and emoji raise UnicodeEncodeError during the write, so the install
returns {"ok": false, "error": "'charmap' codec can't encode characters
in position ..."}.
* An em-dash or a curly quote encodes fine as a single cp1252 byte, so the
write succeeds and load_manifest_file() then fails reading it back as
UTF-8. Persona copy almost always contains these.
Pass encoding="utf-8" on the write, and make the .encode() above it explicit
so all three sites visibly agree on one encoding.
Gmail/Calendar/Drive show a disabled Coming-soon button; the server refuses the flow too.
Manual token connect and already-connected accounts are untouched.
Imported from andrewyng/aisuite@1b4bbf303e
(contents of its platform/ directory, hoisted to the repo root).
Development history prior to this commit lives in that repository.
Co-authored-by: Devika <devikaverma11@gmail.com>