Devin CLI's sign-in saved metadata.cli as the boolean true. OpenCode 1's auth
schema (src/auth Api: metadata Record<String, String>, v1.19.4) drops an
auth.json entry with a non-string metadata value. The account then
disappeared and requests went past the plugin's fetch to the placeholder
URL, which returned 404. The flag is now the string "true". live() only
checks that it is truthy, so entries saved with the boolean (magpie's
mover writes one) keep working in magpie. An OpenCode 1 entry already
saved with the boolean stays dropped until the account signs in again.
Reviewed at 151c72f:
- TMPDIR=<scratch> HOME=$(mktemp -d) bun test in packages/devin: 101 pass,
0 fail. bun scripts/check.mjs devin passes.
- Probe: a sandbox XDG_DATA_HOME with a credentials.toml and a stubbed
GetUserStatus fetch, then the "Devin CLI's sign-in" method's callback.
On main, metadata is {email, plan, cli: true}, and cli is the one
non-string value. With the PR, cli is "true" and every value is a
string. live() returns the CLI's key in both cases.
- Checked that whoOfStatus gives plan, orgId and teamId as strings too.
Not tried: a real OpenCode 1 run (the schema was read from the v1.19.4
source).