Commit Graph
17 Commits
Author SHA1 Message Date
yetone d33df7e21a devin 0.1.13: a call's id goes to the agent of [A-Za-z0-9_-] only, and back to Devin as Devin gave it (yetone/magpie#1304, StarMoonCity)
SWE-2 names a call after its tool and turn ("Bash:0#a65b6a5e02194b87bbc796c4428c946d"), and the plugin passed that on as the call's id. Claude Code takes a tool_use id only of [A-Za-z0-9_-]: it dropped every such call and the turn failed with "The model's tool call could not be parsed (retry also failed)". Codex and pi take any id and were fine.

An id with any other character, or one that begins "dv_", now goes out as "dv_" and its base64url (stateless, so it holds across restarts and accounts); build() turns it back into Devin's own id on the assistant's call and on the tool result that answers it, so Devin still sees the id it gave. A safe id goes both ways as it came. magpie passes a chat tool_call id through unchanged to Anthropic's tool_use.id, Responses' call_id and Chat, so the one mapping covers all three.

tool-ids.test.mjs builds Devin's reply frame from the reporter's literal id: with the change taken out, both the whole and the streamed test fail (Received: "Bash:0#a65b6a5e02194b87bbc796c4428c946d" against /^[A-Za-z0-9_-]+$/); with it, the id out is safe and the call and its result reach Devin as "Bash:0#a65b…". HOME=$(mktemp -d) bun test packages/devin: 45 pass; the 4 CLI tests in identity.test.mjs time out at 30 s on this Mac with and without the change (a script just written under $TMPDIR doesn't start: exec of a fresh /bin/sh script hangs here), and pass in CI. bun scripts/check.mjs devin passes. Not tried against a real Devin account.
2026-10-08 19:41:57 +08:00
Versun c70c9df24e devin 0.1.12: a temperature or top_p of 0 goes to Devin as 1e-6 — Devin answered every request carrying exactly 0 with 400 "an internal error occurred (trace ID …)" (in=0/out=0), on claude-opus-5-5, claude-sonnet-5-5 and swe-2 alike, streamed or not, so a caller that asks for greedy output (Hermes Agent's command approvals send temperature 0, max_tokens 16) failed on every devin/* model and, the 400 not being one magpie falls back on, never reached the next member of a group. 1e-6 is the smallest step above 0 and goes through, as do 0.1, 1 and 2; any other value is sent as it came, and none still as Devin's defaults (1, 0.95). sampling.test.mjs decodes field 8 of build()'s request: its first test fails with the fix taken out. HOME=$(mktemp -d) bun test packages/devin (45 pass, 0 fail) and bun scripts/check.mjs pass. Tried against a real Devin account through magpie: temperature 0 and top_p 0 → 400; 1e-6 → 200. (#50) 2026-10-08 17:58:41 +08:00
yetone 994d58077a devin 0.1.11: a turn's parallel tool calls split over two consecutive assistant messages keep their results (yetone/magpie#1275)
An agent can send one turn's tool calls in two assistant messages in a
row, answered together after. build() answered the first message's calls
at the second one: toolu_a went to Devin as "Tool use was interrupted and
did not produce a result." and its real result A! was dropped.
joinSplitCalls now joins an assistant message onto an assistant message
before it that made tool calls, as Anthropic reads consecutive assistant
messages and as magpie's built-in buildDevin does since 7067fce5. A call
of the split turn that really went unanswered is still answered for; two
text-only assistant messages stay two.

split-calls.test.mjs is #1275's request in Chat form: 3 of its 4 tests fail
on 0.1.10 and pass now. HOME=$(mktemp -d) bun test (43 pass, 0 fail) and
bun scripts/check.mjs pass. Not tried against a real Devin account.
2026-10-08 16:54:48 +08:00
yetone fbee8a0abf devin 0.1.10: a tool's root union whose branches are unions themselves keeps their fields, so a model can create a Codex automation (yetone/magpie#1271)
objectRoot dropped any anyOf/oneOf branch that was itself a union. Codex
desktop's automation_update (zod 4: root anyOf of view, delete, and create
and update, each a union on kind) folded to only view's mode and id, both
required, so the model was offered a tool that could only view. Found
while fixing the same fold in magpie's built-in for #1271.

A nested union branch is now folded first (up to 8 deep); a field the
root doesn't define takes every distinct schema the branches give it, as
anyOf when they differ; a field every branch requires stays required.

Verified: schema.test.mjs's new test fails on 0.1.9 (no "name" among
[id mode]) and passes now; HOME=$(mktemp -d) bun test in packages/devin:
39 pass, 0 fail.
2026-10-08 16:51:46 +08:00
yetone c9b811d288 devin 0.1.9: a tool whose parameters have anyOf, oneOf or allOf at the root goes to Devin as a plain object (yetone/magpie#1196, iron-water) — Devin's Claude models answered every request offering one with 502 "There is an issue with this request, please try a different model" (in=0/out=0), so Codex desktop, whose codex_app automation_update has a root oneOf, hung on devin/claude-opus-5-5 while swe-2 and gpt-6-1-sol were fine. build() now folds the schema as magpie's built-in folds it for Anthropic (provider.ObjectRoot, #646): allOf's branches are all merged, properties and required alike; of anyOf's and oneOf's object branches the properties are merged, a field each requires stays required, the other branches go; local $refs into $defs/definitions are followed. A schema with no root combinator is sent as it came, and the caller's own is not changed. schema.test.mjs builds from the issue's literal parameters: its three build tests fail with the fold taken out of build() (the oneOf/anyOf/allOf arrives at Devin). HOME=$(mktemp -d) bun test packages/devin (37 pass, 0 fail) and bun scripts/check.mjs devin pass. Not tried against a real Devin account. 2026-10-08 05:19:57 +08:00
yetone 3884236b21 devin tests: the two "without the CLI" images tests take the devin CLI out of reach themselves — they relied on no devin being on PATH, so on a machine with the CLI installed (~/.local/bin on PATH) provider.models took the CLI's path, returned full runtime models and both failed; CI has no CLI and stayed green. They now point PATH at an empty temp dir (removed after) and say so if /usr/local/bin or /opt/homebrew/bin holds the CLI. Test-only, no version bump; HOME=$(mktemp -d) bun test (676 pass, 0 fail) and check.mjs devin pass. 2026-10-07 01:36:01 +08:00
yetone a26f884820 devin 0.1.8: which models take images is what Devin tells its CLI's model picker (面条 on magpie's Discord: swe-2 takes images) — devin models list says nothing of images and models.dev doesn't know Devin's own ids, so swe-2, swe-1.7 and the like were listed as text-only and agents dropped their images. Once signed in, with the CLI or without it, the plugin asks GetCliModelConfigs (the read-only call the CLI's picker makes, as magpie's built-in does in devin_images.go) and puts each model's supports_images on it: a variant its own, a family and its fast run what all its variants say. It is cached as the list is (5 minutes, 1 after a failure). The config hook's list says what Devin said on 2026-10-05 (GLM-5.2/5.3, Inkling, Nemotron, DeepSeek V4 Flash and V4 Pro take none, every other one does); a model Devin says nothing of keeps models.dev's word. With the owner's real Devin account: swe-2-high/medium/max, swe-1-7, swe-1-7-medium and swe-1-7-lightning(-medium) described an inline PNG's colours through the plugin's fetch, and provider.models listed swe-2 with image input, with the CLI and without it. images.test.mjs (5 tests) fails on 0.1.7; bun test (31 pass) and bun scripts/check.mjs devin pass. 2026-10-05 13:18:46 +08:00
yetone c3ba3ef1ab devin 0.1.7: an account is named as Devin names its key, not as the devin CLI's own account (#17: on Windows, "Add another Devin account" labelled account B's token as A and replaced A's key with it)
success() named a key's account by `devin auth status`, run with APPDATA and XDG_DATA_HOME set to a data folder of the plugin's own; the Windows CLI ignores both and reads %APPDATA%\devin\credentials.toml whatever it is given, so every browser sign-in was named after the CLI's own account. familiesFor() had the same flaw: `devin models list` there lists the CLI's account's models for every key.

- success() asks GetUserStatus with the key (the call usage() makes, now shared as userStatus()) and names the account by its email (or name) and tier (TEAMS_TIER_DEVIN_PRO is "Devin Pro", else planName); a key Devin refuses (401) fails the sign-in. Only when Devin can't tell does it fall back to the CLI.
- identity() no longer trusts a CLI whose report names a credentials file outside the data folder it was given (the "File:" line); it can't tell then, and the account is "Devin".
- familiesFor() asks the CLI for a key's models only once the CLI answers for it: it reads the key's folder, and the account it names is the one GetUserStatus names. Otherwise (Windows) the account keeps the declared SNAPSHOT list, and the CLI isn't asked again for that key.

identity.test.mjs (a fake devin CLI always signed in as a@x.dev): key B is named b@x.dev; a refused key fails; with Devin unable to tell, a CLI reading its own folder doesn't name the account and one honouring the folder does; the models list isn't taken from a CLI that reads another folder or names another account, and is from one that answers for the key. They fail against 0.1.6. HOME=$(mktemp -d) bun test (474 pass) and bun scripts/check.mjs pass.
2026-10-04 17:02:17 +08:00
yetone 8f25b63718 publish from GitHub Actions with npm's trusted publishing, no one-time password [skip ci]
.github/workflows/publish.yml runs the tests (in a throwaway HOME) and
scripts/publish.sh on each package.json change pushed to main, or by hand;
npm's OIDC exchange stands in for a token and an OTP. Every package now
names magpie-community/plugins' publish.yml as its trusted publisher on
npmjs.com, and gets the repository field npm checks it against.
2026-10-03 00:00:23 +08:00
yetone 09053e36d3 devin 0.1.6: an assistant reply goes to Devin with every tool call it made (#416 on yetone/magpie: swe-2 always answered "capacity issues" on the plugin, never on the built-in) — build() let the pending list share the reply's own calls array, so answering a call took it off the reply too, and Devin got tool results with no call that asked for them from the first tool round on. pending is now a copy, as the built-in's buildDevin keeps it; with tool history the request decodes the same as the built-in's. request.test.mjs fails against 0.1.5. 2026-10-01 20:34:49 +08:00
yetone 01aee5da28 all: a usage read says what it means for the sign-in, and a renewal clears the mark whatever follows, as the built-ins did (要保证插件跟内置的所有逻辑都要一模一样) — auth.usage returns signIn on every path: expired where the built-in's quota read marked the account (Zed's /users/me 401, Factory's and MiMo's refused renewals, Qoder's refused job refresh), renewed after a renewal, which took the mark off, kept everywhere else, so magpie no longer guesses from the words 'sign in again' (Kiro's, Devin's and ZCode's usage errors marked accounts their built-ins never did) nor clears on a clean read. A request after a renewal says renewed on any status; one without says kept, as the built-ins cleared only on renewal. Kiro, Cursor, Devin, Command Code, WorkBuddy, Grok and ZCode, whose built-ins never marked an account, say kept on every answer. New tests fail against 85d7dd0's index.mjs. 2026-10-01 04:53:29 +08:00
yetone 85d7dd0d0a all: each plugin fails with its built-in's status and marks the sign-in as it did, through X-Magpie-Sign-In (要保证插件跟内置的所有逻辑都要一模一样) — Factory's and MiMo's refused renewals are the built-ins' 502 marked expired, not 401s; Qoder's vendor 403 is the built-in's 401 kept, its model list's failure a 400, its job refresh refused marked expired; Zed's retried 401 is a 401 kept, not a 403; Kiro's unreachable refresh a 401 kept; Cursor's expired trial a 401 kept; a vendor 401 WorkBuddy, Grok, Devin, Command Code and ZCode passed on no longer marks the account, as their built-ins never did, and Grok and MiMo no longer retry what their built-ins sent once. Messages take the built-ins' words. New tests fail against the previous index.mjs. 2026-10-01 04:47:03 +08:00
yetone e39f4f4dc0 devin 0.1.4: errors no longer start with "Devin: ", which magpie adds (it read "Devin: Devin: usage limit reached: …"), a stream error before anything included; an error Devin gives no words for is worded as Go's status text ("Payment Required") as the built-in's devinFailure does, where it read "HTTP 402"; an empty reply is the built-in's 502 "the reply broke off: EOF". Statuses were already the built-in's (unauthenticated 401, resource_exhausted/quota/rate limit 429, too long 400, invalid_argument 400, unavailable 503); errors.test.mjs checks them 2026-10-01 03:43:41 +08:00
yetone d8739bcdbc devin 0.1.3: the card's quota windows are "1 day" and "7 days", shown only when Devin says what is left of them (one left out is no longer taken for used up); usage no longer overwrites the row's plan ("Devin Pro", as devin auth status names it) with planName's bare "Pro"; a refused key says "Devin's sign-in has expired — sign in again"; the efforts none and minimal go as given; a variant the user picked stays, as magpie's devinCollapse keeps it; only a model models.dev says takes images gets image input 2026-10-01 03:03:01 +08:00
yetone c8f4d448df Parity with magpie's built-ins: a failed sign-in says why, CLI-backed Command Code and Devin accounts follow the CLI's key, Factory's refused renewal is a 401 in the caller's API shape
- every {type:"failed"} carries an error reason magpie shows
- commandcode/devin: accounts taken from the CLI are marked metadata.cli and re-read its credentials on each request, usage and models
- factory: a refused refresh answers 401 authentication_error (Anthropic shape on /llm/a/, OpenAI's elsewhere) instead of throwing; the whoami back-off is per account; 403 hints name the account to sign in again
- versions: factory/devin/commandcode/cursor/kiro/mimo/zed/zcode 0.1.2, workbuddy 0.1.3
2026-10-01 00:55:50 +08:00
yetone 7d641b86c4 devin 0.1.1: usage shows as magpie's built-in did — plan, period, windows and what they count, balancedevin 2026-09-30 23:03:08 +08:00
yetone 92d1af8df6 devin: Devin — the CLI's browser sign-in or its existing one, GetChatMessage over protobuf with tool descriptions moved into the prompt; tried with real requests 2026-09-30 17:10:33 +08:00