Files
plugins/packages/devin/package.json
T
yetone 581ca13db6 devin 0.1.33: a permission check whose history grew replaces its keepalive pings (#620)
zelong77 found that Claude Code Auto's permission check left several
keepalive tasks running for one check. keepaliveKey hashed the first user
message, and the check sends the whole history in that message, so every
check got a new key. stopKeepalive(newKey) never stopped the old task,
and each reply started another one.

- The key is now the session, the Claude Code agent id and a hash of the
  instructions and the tools' names. The first user message is left out
  when the agent names a session. The lead, its permission check and a
  subagent still get keys of their own, because their instructions,
  tools or agent id differ.
- When a request names no session, the first message still tells two
  conversations apart. A first message that grew from one seen before
  (blocks appended, or text added to the last block) maps to the earlier
  key (firstOf). firstOf keeps only hashes, of 256 conversations at most.
- README: what a conversation is.

Run on mote (Bun 1.4.2, HOME=$(mktemp -d)) at this tree, on main 2595d48:
- packages/devin `bun test`: 186 pass, 0 fail.
- The new keepalive tests on main's index.mjs: 4 fail (18 pass, 4 fail).
  These are zelong77's repro, with and without session headers, plus a
  grown last text and the stay-apart case.
- Whole repo `bun test`: 4741 pass, 12 skip, 0 fail.
  `bun scripts/check.mjs`: exit 0.

Not tried: a real Devin account, or a real Claude Code Auto session. The
tests use zelong77's offline requests with fake timers and no network.
A request with no session whose first message starts with another
conversation's whole first message is taken as that conversation.
2026-11-02 14:44:55 +08:00

14 lines
595 B
JSON

{
"name": "@magpie-community/opencode-devin-auth",
"version": "0.1.33",
"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 } }
}