#626 (zelong77): keptAfter scheduled the first ping 285 s after the
reply's stop event, and run() scheduled each next one 285 s after the
ping before had come back. Devin renews its cache when it takes a
request, so a 33-47 s Fable reply or a 10-20 s ping put the next ping
past the 5 minutes. In zelong77's usage.jsonl every ping 315.9 s or more
after its request was sent missed and wrote ~500k tokens again.
- roundtrip stamps sentAt before it sends; scheduleKeepalive waits
max(0, interval - (now - sentAt)), and each ping is timed from when it
was sent. A reply or ping longer than the interval is followed at once.
- The timers object carries the clock (now), so tests hold it.
#620, after 0.1.33 (zelong77, 08:18): through magpie, check A and the
grown check B still kept separate pings. magpie hands a plugin's fetch
none of the agent's own headers, so x-claude-code-session-id never
reached keepaliveKey, and magpie's translation merges Claude Code's two
user messages into one whose history grows in the middle, which firstOf
can't follow.
- keepaliveKey reads x-magpie-session first and x-magpie-subagent beside
x-claude-code-agent-id. magpie sets both on a plugin's fetch in a
release that follows this one; the host strips them from what a plugin
sends on.
- README: the timing, and the headers.
Run on mote (Bun 1.4.2, HOME=$(mktemp -d)) at this tree, on main 63cd0e4:
- packages/devin `bun test`: 189 pass, 0 fail.
- The 3 new keepalive tests on main's index.mjs: 3 fail (22 pass). The
two timing tests got 285000 where 238200 and 0 were due; the merged
check A's timer was never cleared.
- Whole repo `bun test`: 4781 pass, 0 fail. `bun scripts/check.mjs
devin`: ok.
Not tried: a real Devin account or a real Claude Code session; fake
timers and a fake Devin only. Without any session header (not Claude
Code's case once magpie sends x-magpie-session), a merged check whose
history grows in the middle still gets a new key: matching on a shared
leading block would merge different conversations that start with the
same reminder, which costs a full rewrite rather than an extra read.
14 lines
595 B
JSON
14 lines
595 B
JSON
{
|
|
"name": "@magpie-community/opencode-devin-auth",
|
|
"version": "0.1.34",
|
|
"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 } }
|
|
}
|