An unreadable Devin identity no longer falls back to the shared name "Devin". `success` now names such an account `Devin · <12 hex>`, a SHA-256 of the API server and session token. The host de-duplicates plugin accounts by `metadata.email` (magpie `internal/plugin/host.js` `settle`/`whoOf`), so two different unreadable sign-ins used to replace each other's credential. Now each one keeps its own slot. Signing in again with the same key on the same server gives the same name, so it lands in the same slot. When `usage`'s `syncOrg` later reads the account, it renames the slot to the real email in place, as before. Fixes #931.
Ran (mica, bun 1.4.2, HOME=$(mktemp -d), PR head 14fa75a5 merged with origin/main 445f4143):
- bun test packages/devin: 209 pass, 0 fail; bun scripts/check.mjs devin ok
- root bun test: 8293 pass, 4 fail. The 4 are gumloop's "exclusive ledger updates > Node ..." reds that are already known on main (PR CI shows the same four). bun scripts/check.mjs: no failures
- 0.1.39 is free: npm has 0.1.38, and origin/dist tgz/ ends at 0.1.38
Broken by hand, one at a time, each made the new identity test red:
- fallback back to "Devin"
- key left out of the hash (server only)
- a random salt per sign-in (stable slot)
- the raw key in the name
Not changed / not tried: accounts saved earlier as "Devin" keep that name. A new unreadable sign-in with the same key now gets a "Devin · <hash>" slot beside the old one, where before it replaced it. The host's settle only matches by secret when neither side has a name. Not tried with a real Devin account (no vendor calls). magpie's Devin mover (migrate_side.go) only carries the built-in's saved user names and reads nothing from this fallback.
Co-authored-by: zhou.han <18181754+yetihan@users.noreply.github.com>
14 lines
595 B
JSON
14 lines
595 B
JSON
{
|
|
"name": "@magpie-community/opencode-devin-auth",
|
|
"version": "0.1.39",
|
|
"description": "Devin subscriptions (the devin CLI's account) in OpenCode and magpie",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"exports": "./index.mjs",
|
|
"files": ["index.mjs", "README.md"],
|
|
"keywords": ["opencode", "opencode-plugin", "magpie", "devin", "windsurf"],
|
|
"license": "MIT",
|
|
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/devin" },
|
|
"magpie": { "options": { "cacheKeepaliveInterval": 285, "cacheKeepaliveMaxPings": 6 } }
|
|
}
|