017cd73e87d07d4bceed3e85681f89393404aa89
1069
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
017cd73e87 |
catpaw: tests put back the fetch they found, and the rewrite keeps a Request's method, headers and body (#877, #988)
Fixes #877 (catpaw half). Test-only; no version bump. Change: catpaw's index.test.mjs saves the fetch it found and puts it back in afterAll (in a finally, so a failed server stop still restores it). Its URL-rewriting wrapper now builds `new Request(patched, input)` when handed a Request, so the method, headers and body survive the rewrite; init still applies on top. fake.mjs records each model-types request's method, an x-test-marker header and body, and a new test sends a POST Request through the wrapper and checks all three reach the fake. Kiro: its test files (usage, builderid, accounts, apikey, ...) already save and restore globalThis.fetch on main, unchanged since f379bf90; the per-file sweep below finds no kiro file leaving fetch changed. Ran (WSL magpie-desktop, Bun 1.4.2, HOME=$(mktemp -d)), at edecd806 and at edecd806 merged onto origin/main |
||
|
|
c00c4b9f6c |
agy-cli: usage timeout tests wait on the children, not a duration (#950)
Cause: "simulated Windows timeouts kill the whole tree" ran fetchUsage
with a 600ms timeout that covers both children. On a loaded machine the
fake agy's start (bun startup plus its browser-guard spawnSync) can use
most of it, so the timeout fired before the report child had logged, or
before it was even spawned, and logs[1] was undefined
("undefined is not an object (evaluating 'logs[1].pid')"). The same
budget made its sibling "version/report hangs time out" read a log the
killed version child never wrote (ENOENT). After the kill, a fixed 20ms
(and 50ms in both descendant tests) stood in for the kernel and event
loop reaping a SIGKILLed child.
Fix, test-only:
- timedOut() records each spawned child's pid itself and doubles the
timeout (600ms up to 38.4s) until the timeout lands while the child
under test runs; the taskkill assertions use the spawned report pid.
- The "gone" checks poll: waitForPidExit with a 15s bound over the
spawned pids and every pid the fixture logged (the agy under cmd.exe
on Windows); waitForNotRunning polls ps for the two descendant tests.
- agy-cli.test.mjs runs each suite with bun's --timeout 120000: bun's
5s per-test default was the next fixed wait these tests hit under the
injected delay.
- The fake agy takes TEST_START_DELAY_MS to reproduce a slow start.
Injected: TEST_START_DELAY_MS=400 on the old test (WSL magpie-desktop)
-> the #950 test red with the logs[1].pid TypeError; =900 -> it and the
hang test red with ENOENT. With this change: 20/20 at 0, 400 and 900 on
WSL, 20/20 at 0 and 900 on mote (macOS), 17/17 (3 skipped) at 0 and 900
on xiaomi-gpu (Windows).
Ran: wsl-run 'export HOME=$(mktemp -d); bun test packages/agy-cli;
bun scripts/check.mjs' -> 13 pass, 0 fail; check.mjs all ok.
Not tried: the reaping race by itself (a SIGKILLed child still listed
after 20ms) wasn't injected; it is covered by polling, not reproduced.
No source change, so no version bump.
|
||
|
|
80c9b495fc |
minimax 0.2.6: a model takes the video its config says, in magpie (#985)
configModels() and modelOf() said image or nothing: video, audio and pdf
were hard-coded false, so MiniMax-M3.1-Flash and M3 (whose model config
says modalities.input ["text","image","video"], attachment true) showed
as text and image only in magpie's /v1/models, on both sites.
Now parseModels keeps the config's modalities.input (text, image, audio,
video, pdf; unknown kinds dropped) and attachment, and the built-in list
says video for M3.1-Flash-Preview and M3. Where the plugin runs decides
what is advertised:
- magpie's host (the plugin input has `magpie`): every kind said. magpie's
gateway writes the Anthropic body and the loader's fetch sends it to
MiniMax byte for byte; the new test sends the issue's video block and
checks the upstream got the same body.
- OpenCode: @ai-sdk/anthropic builds the body and throws on a file part
that isn't an image, a PDF or text ("media type: video/mp4",
dist/index.js in 4.0.102), so video and audio stay out there and
OpenCode keeps saying the model can't read them. pdf is passed on.
Still dropping video before it reaches this plugin: magpie's gateway
(parseAnthropicRequest has no video block, and groups don't merge
Inputs): yetone/magpie#6135, the reporter's own issue.
Run at the pushed head, rebased on
|
||
|
|
4a78bec3b7 |
codearts 0.3.8: a window's runsOut is only credit its own remainder holds (#982)
usageFromStatistics took the bonus window's runsOutAt/runsOut from the soonest check-in batch while remaining/used were the whole bucket, and the total's from every non-basic batch whatever the buckets had left. So an account whose check-in was spent (bonus remaining 0) still had a total runsOut of 82.05 at tonight's midnight, and one with 2344.81 long-lived gift credits said 100 lapse in hours while the vendor's package_credit_expiring_amount was 0. magpie's routing reads a total's RunsOutAt as "what is left is lost then" (Allowance.Renewal), so these accounts were ranked ahead of ones that really lapse sooner. Now: - each bucket's lapse is its own batches' soonest, held to that bucket's package_credit_remain; an empty bucket has none; - the total's lapse is the soonest of the buckets' lapses (same Beijing day summed), never from batches of a bucket with nothing left; - the ledger fallback's batches are marked `estimated` (what was spent of a check-in isn't known): they say when, and how much is the vendor's own expiring amount, so with 0 or none said there is no lapse; the vendor's batch reads (with consumed/expired counts) are used as before; - each window carries the vendor's package_credit_expiring_amount as `expiring` when it is sent; - comments and README say the ledger keeps the date the claim names (a day on for today's check-ins); 30 days is only for a claim with none. Run (wsl-run, magpie-desktop, at this tree rebased on origin/main): bun test packages/codearts: 177 pass, 0 fail; bun scripts/check.mjs: ok. Fixtures are the issue's two accounts as filed (A: bonus 100 used, 0 left, total 82.05 left; B: 4100 / 2344.81 left, ledger grant 100 claimed 2026-11-10T16:01:04.916Z expiring 2026-11-11T16:01:03.812Z, expiring 0), clock held at 2026-11-11T10:00Z. Broken by hand: cap = Infinity in bucketLapse: the three #982 tests red (174 pass, 3 fail). cap = remain (no estimated gate): account B's test red alone (176 pass, 1 fail). Not tried: a real CodeArts account; the vendor's horizon for package_credit_expiring_amount isn't known, so vendor batch reads are not gated on it. A lagging vendor batch counter is bounded by the bucket's remainder only. Reported-by: KiMelody |
||
|
|
9ec696258d |
agy-cli 0.1.18: turned-away system lines are broken up before agy sends them, and a 429 to one is not a quota (#980)
Antigravity answers 429 "Resource has been exhausted" to a few system prompt lines whatever quota is left (Claude Code's billing line, the Claude Agent SDK, Codex's and Hermes Agent's identities, oh-my-pi's RFC 2119 line). The antigravity provider breaks them up with zero-width spaces (TURNED_AWAY / breakUp / cloak); agy-cli sent the client's system prompt to agy as written, and called the 429 an exhausted quota (rate_limit_error), so a client or routing group retried a prompt that fails every time. - cloak.mjs is a copy of antigravity's TURNED_AWAY, cloak and hint (the two-zero-width-space break-up of 11-11). Each package ships on its own, so cloak.test.mjs imports packages/antigravity's _internal and fails when the two give a different answer for any line or sample. - Every route the system text reaches agy is cloaked: the session's systemPrompt.append (session/new and session/resume), <external_system_instructions> when agy can't append, a later system or developer message in the turn or the replayed history (renderTurnMessageParts), and a system/developer notice delivered beside a tool result (extractToolResults). - What the bridge keys and hashes on is unchanged: proc.instructions, sameInstructions, instructionsIdentity, stripVolatileSystem and the session store keep the prompt as the client wrote it; cloak is applied only where the text is sent. User text is not touched. - #formatAgentError: a "code 429 ... Resource has been exhausted" with a turned-away line in the session's instructions is an invalid_request_error, "Antigravity answered 429 to this system prompt: <detail> — <hint>", with the antigravity provider's hint. Any other 429 stays rate_limit_error. - READMEs (en, zh) say so under the minimal-agent section. Run (wsl-run, magpie-desktop, HOME=$(mktemp -d), at |
||
|
|
84ee9b88cc |
sap-aicore: the token deadline test fires the exchange's deadline once fetch is entered (#984)
"token deadline bounds fetch that ignores abort" rewrote every 15000ms timer to 20ms. The credential read and the token exchange each arm their own 15000ms deadline through bounded(), so the read's deadline was cut to 20ms too. When the read took longer than that on a loaded machine, it timed out with the same "token acquisition timed out" message before fetch was ever called, and `upstream.aborted` threw on undefined. The test now keeps both timers at 15000ms, records each deadline's callback, and fires the exchange's (the second) from inside the fake fetch. It checks that two deadlines were armed and that fetch was entered before it checks the abort. The source is unchanged: a separate 15s bound on the read is intended. Run (wsl-run, magpie-desktop, Bun 1.4.2, HOME=$(mktemp -d)): - bun test packages/sap-aicore: 343 pass, 0 fail. - bun scripts/check.mjs: exit 0. Injected by hand: - A 50ms wait at the start of readCredentials' operation. The old test failed with "TypeError: undefined is not an object (evaluating 'upstream.aborted')" at 28ms, the issue's case. The new test passes with the same wait. - The exchange run without bounded() (no deadline). The new test fails. Not tried: the full root bun test run under load where it first failed. |
||
|
|
eaeca41125 |
day-card: a week, a month or all time as a receipt, with a Day/Week/Month/All switch (HeheLi29136651 on X)
usage:day takes a from (magpie with usage:day's span read); the page asks for the seven or thirty days ending on the date shown, or all, and prints the period, the days that had calls and the cost of one, in place of the streak against an average day. Arrows step a whole week or month. A magpie that answers a day and no from says to update. 0.3.0. Run: bun test packages/day-card (17 pass, the new test red before the view change). |
||
|
|
93cb4fe1c0 |
autoclaw 0.2.22: Linux overseas chat omits X-Tm; wallets decides a bare forbidden (#979)
Fixes #367.
On Linux the overseas chat leaves X-Tm out: the gateway refuses the
official "linux" value for plugin-only accounts (#367; menhouran got 200
with only X-Tm removed on x64; on arm64 only the platform values were
tried, not omission). Sign-in, refresh, wallets, check-in, CN chat and
macOS/Windows keep their headers.
An exact uncoded 403 "forbidden" (JSON or plain text) on both chat hosts
no longer reads as a dead token on its own: the wallets route decides.
It takes the token: 403 permission_error, sign-in kept. Every host
refuses it: 401, expired. Mixed or failed check: the upstream 403 goes
through with no X-Magpie-Sign-In, which magpie leaves unmarked.
signInHolds now says false only when every wallets host refused; for
sizeRefusal false and null already led to the same answer. 0.2.22.
Run at cd6da42dd (no live AutoClaw request, no credentials):
- WSL Ubuntu 24.04, Bun 1.4.2, temp HOME: bun test packages/autoclaw
117 pass 0 fail; root bun test 8189 pass 19 skip 0 fail;
bun scripts/check.mjs ok.
- Merged with origin/main
|
||
|
|
f85f9ad0b0 |
day-card 0.2.3: the receipt credits nowdex, whose share card its design follows
randyloop on X pointed out the card looks just like nowdex's share card. Its foot now has a small muted line under the magpie footer, in every language the card speaks: "Design inspired by nowdex.app" (设计灵感来自 / 設計靈感來自 / デザインは…に着想を得ています / Design inspiriert von). The README says so too. Run: bun test packages/day-card on mote (HOME=$(mktemp -d)): 16 pass; the new check is red without the credit field. Rendered the page in Playwright Chromium and WebKit with a stub bridge in en, zh, zh-TW, ja and de and looked at the PNGs: the line sits centred under the footer, inside the paper, no page errors. Not tried: the page inside the real magpie window. |
||
|
|
1ccd764e01 |
minimax 0.2.5: a chat asks for no compression, so the stream really streams (#978)
Flagwill: MiniMax answers a chat asked to compress as one gzip member
flushed at the end, so a streamed answer arrived whole. The chat request
(auth.loader's fetch, the one path every chat of both sites takes, CN and
global, streamed or not) now sets accept-encoding: identity, over any
caller value. Models, usage, check-in and the tool API keep Bun's default.
New stream.test.mjs; README "Requests"; 0.2.5 (npm and main had 0.2.4).
Run at 90fc6ff3 (Bun 1.4.2, temp HOME, WSL magpie-desktop):
- bun test packages/minimax: 151 pass 0 fail (713 expects)
- bun scripts/check.mjs: exit 0
- Windows (xiaomi-gpu, temp HOME/USERPROFILE): 151 pass 0 fail, check exit 0
- merged with origin/main
|
||
|
|
ebcff86606 |
agent-agy 0.2.0: magpie's own settings file, passed with --settings
As magpie's built-in agy does since 0cc91af3d: the plugin's config is ~/.gemini/antigravity-cli/magpie-settings.json, handed to agy with --settings, and agy's own settings.json is only read (base) for the user's own model and custom models. remote-control runs plain, as agy is. Needs magpie with agentplug's base, launch.args and launch.plain. Run: bun test packages/agent-agy (4 pass, on mote), and magpie's internal/agent TestAgyPlugin against this file. |
||
|
|
9fb09a0f41 |
orcaterm 0.1.7: a tool call the model writes as text is not sent on as the answer (#969)
orcaterm 0.1.7 reads the tool call a model writes as text (DSML, <tool_call>, <function_calls>, <function=, <invoke name=) on both the streamed and non-streamed paths. The answer stops where the call begins, and the turn ends as a text_tool_call error (an error frame when streamed, a 502 when not), so magpie can retry or try another account instead of passing the call on as prose. A call shown in a code fence or in backticks is ordinary text, as in trae. A call carried only in the thinking goes through the same guard: the call is read from the extractor that cut it (answerAndCall), so prose before it no longer hides it. An `ask` envelope reaches the client as its question with its options under it, one per line, whether it is complete JSON, hand-written with a bare line break, cut short by the stream, or appended after prose. Reviewed at 39b4ef653e89e2b3e8c2d1b803563089ba4e3e2b, every line changed since 7a49ed7c. Merge-tested with origin/main |
||
|
|
2f8e65a131 |
devin 0.1.38: a slow model list doesn't hold up quota usage (#977)
yetihan's change (fixes #976). usage() asks GetCliModelConfigs in the background (freeIDs/configsFor with wait=false), so a slow or timed-out model list no longer holds back the day and week windows that GetUserStatus already returned. Free models (notModels) are added, or the "Free models" row says why the list couldn't be read, on a later usage once the ask has settled. Other callers keep wait=true. The asks are shared through c.asking, failures back off for RETRY (60s), and the ask's own try/catch means a background failure never rejects. Reviewed at 3920118d53e7c144d9e7d54bfe6dca6069611575. Run (WSL magpie-desktop, Bun 1.4.2, fresh HOME): - bun test packages/devin: 209 pass, 0 fail; bun scripts/check.mjs: exit 0 - the same after merging origin/main into the head: 209 pass, check exit 0 - Windows (xiaomi-gpu, fresh HOME/USERPROFILE): bun test packages/devin, 209 tests, 0 fail, 9 skip - probe (not committed): 10 usages with a list that never answers make 1 GetCliModelConfigs fetch; a fetch that throws makes 1 fetch in 10 usages, the row names the error, and there is no unhandledRejection Broken by hand: restoring the blocking freeIDs/configsFor calls makes "a slow model list doesn't hold up quota usage" fail at 1017ms ("usage waited for GetCliModelConfigs"), and the edited "logged once" test hangs to its 5s timeout. Restored, both are green. Version: npm had 0.1.37 and origin/main's package.json had 0.1.37, so the bump to 0.1.38 is right. Known: a usage read on a cold host (a fresh `magpie quota refresh` process) returns the windows without notModels until the list has been read once. "with no word from Devin..." now passes without its 503 being read. Not tried: a real Devin account; Devin's API wasn't contacted. |
||
|
|
3b314dad1c |
day-card 0.2.2: a "No background" choice first, and the card fits one screen (volare18467257 on X)
volare18467257: add a no-background option first in the list, and let the card scale, since it didn't fit one screen. - Background now starts with "No background": the paper alone on nothing, a transparent PNG with no margin (the margin slider is hidden for it), swatched as a chequerboard. Named in all five languages. The default stays teal. - The card on the page is sized to the room under the toolbar (B.fit: width up to 760, no taller than the window, never below 160), on resize and when the toolbar or status line changes height. The bitmap copied or saved is unchanged. Run: bun test packages/day-card in wsl-run, 16 of 16 green; scripts/check exit 0. A Playwright harness (not committed) with a stub bridge in Chromium and WebKit: at 1000x600 the card is 403px wide and ends at 568 of 600, with no page scroll; at 1000x900 it is 650 wide, ends at 867; picking No background gives a 880x1130 bitmap (no margin) and hides the margin slider, no page errors. Broken by hand: with backgrounds.js from main the new test is red. Not tried: magpie's own window on Windows/Linux; the transparent PNG pasted into an app. |
||
|
|
4ecf633125 |
tagged: keep each listed plugin's README on dist (readmes/), so magpie's Discover page reads it from usemagpie.ai, not npm (River_WLan on X)
Run: node scripts/tagged.mjs on wsl against the real GitHub into an empty folder: 369 plugins, 369 README files (5.5MB); a second run into the same folder read none again and kept 369. Not tried: the workflow itself on Actions (dispatched after the push). |
||
|
|
fcde82d39f |
history-trim 0.1.2: trim trailing whitespace in linear time (#975)
history-trim 0.1.2. The whitespace step trimmed trailing spaces with /[ \t]+$/gm, which takes quadratic time on a long run of spaces followed by a word: 1.2 s at 40,000 spaces on Node 22. A one-pass scan replaces it. It runs after the blank-line fold, as before, and trims before every line end that `$` sees under /m (\n, \r, U+2028, U+2029 and the end of the text). The output is the same as main's. Four cases.json regressions are added: CRLF, whitespace-only lines, U+2028, and a long run of spaces before a word. What was run at 0ad27d87, merged with origin/main: - `bun test packages/history-trim` (27 pass) and `bun scripts/check.mjs` (ok), on WSL Ubuntu 24.04 and on Windows 11, each with a fresh HOME (and USERPROFILE on Windows). - main's onRequest against the PR's, on 500,000 random strings over space, tab, \n, \r, U+2028, U+2029, U+0085, \v, \f, U+00A0, U+3000, U+FEFF, U+2000 and U+200A: 0 differ, on Node 22 and Bun. - Timing at 40,000 spaces + "a": main 1,223 ms, PR 0.28 ms; 1,000,000 spaces: 7 ms (Node 22, mote). - Broken by hand: treating only LF as a line end turns the CRLF and U+2028 cases red. Trimming before the fold turns the whitespace-only-lines case red. |
||
|
|
1e060e6163 |
page-usage-tree 0.1.1: refresh warning only on a real failure, hit rate and model-detail fixes (#960)
page-usage-tree 0.1.1 (CHENZUDE): - A failed refresh is kept on the cache entry the page reads, so "Refresh failed; showing the previous data" shows when a refresh threw (on 0.1.0 it was written to an entry already replaced and never shown). Only a loader that threw counts: an older disk cache marked stale does not, and a retry from a failed entry stays failed until a loader succeeds. The page takes the server's X-Usage-Tree-Refresh on every answer, quiet follow-ups included, so the warning clears once the gateway recovers. - Hit rate uses magpie's hitPct rounding (0.9996 shows 99.96%, not 100%). - A failed per-account model-detail read keeps the account totals and says model details are incomplete (zh, en). Disk cache v8. - Not in the PR body: a /bridge.js shim served by the service (talks only to parent: hello, options.get/set, theme and visibility), request timeout 10s -> 30s, narrow breakpoint 620px -> 700px, model split on narrow screens, "permissions": [] added (same as absent), zh warnings joined with ";". Run at the reviewed head 74363201570d9f69866ac0e4afff7a2b898e6dab: - WSL (magpie-desktop), fresh HOME: bun test packages/page-usage-tree 62 pass 1 skip (parity needs a live magpie); node --test 68 pass 1 skip; bun scripts/check.mjs ok. - Windows (xiaomi-gpu), fresh HOME and USERPROFILE: bun test packages/page-usage-tree exit 0; bun scripts/check.mjs ok. CI green. - Playwright 1.62 Chromium and WebKit on WSL, sandbox server with fake data, 1280 and 420px, en and zh: a first open from a stale disk cache never shows the refresh warning; a failed manual refresh shows it, it stays while the gateway is down, and clears on the quiet follow-ups after recovery while the model-detail warning stays; no page errors, no horizontal scroll. The same probe on e3da32bed fails 3 checks (false warning on open, warning never clears, zh joined by a space). - Broken by hand: counting data.stale as failed, a retry entry forgetting the failure, and a quiet load never clearing each turn a test red. Not covered by a test: dropping warningStateChanged (render also runs renderWarnings) and the zh join between two data warnings. - Host/Origin/token handling on /api/tree unchanged from main; /bridge.js is static and behind the Host check. dist had only 0.1.0. |
||
|
|
a3bfe680d4 |
output-strategy 0.2.2: panel attribution, conversation guidance and save-state fix (#831)
output-strategy 0.2.2. The panel says the plugin is unofficial and maintained by manjughosa (README, page, registry summary). The page tells the user that saving does not rewrite an existing conversation. Unsaved changes are now counted against the saved styles, so ticking a style and unticking it again leaves the panel clean. The README says the `[Output Strategy]` marker is honoured only in system/developer instructions.
The package.json author stays "manjughosa (https://github.com/manjughosa)", as main has it. From the previous reviewed head 8cb337ef to 6110057c, that line is the only change.
What was run at 6110057c, merged with origin/main
|
||
|
|
18ce00e4ce |
agy-cli 0.1.17: a steer keeps the live agy session, so its prompt cache holds (ChrisJ_AI on X)
Reported by ChrisJ_AI on X: after 0.1.12, most turns show a normal cache ratio, but a steer / interrupt still reads 0% (303K input, 0% in his screenshot; agy's own session rows for the replay read 193K and 65.8K at 0% too, then 99% again). Cause: a user steer (text or an image beside a live tool_result, a rejected tool, a hook line) stopped the live agy session and replayed the round in a new session/new. A new session has no cache, so agy itself reported 0%. Now the bridge answers the pending MCP calls with the real results, cancels the step agy was starting, and sends only the steer as the next prompt of the same session (the answered tool results are not sent a second time). Falls back to the old replay when the session or history differs, tools grew, a result carries an image, a call is still unanswered, or the cancel does not settle. Run (WSL2 Ubuntu 24.04, Bun 1.4.2): bun test packages/agy-cli 11 of 11, smoke.mjs ALL OK; bun scripts/check.mjs agy-cli ok. smoke.mjs now asserts no new session/new (same convId, same init count), the steer text in the next prompt and the real result delivered to the MCP call, for the Esc, queued_command, standalone follow-up, text before/after the result, image, rejected tool, Skill and queued-suffix cases. Broken by hand: the same smoke.mjs against origin/main's index.mjs: 12 failures, all of those. Not tried: a real agy (signed out on this machine and in magpie's account store), so Google's cache after a steer is not measured; Windows (smoke is red there, #973); macOS. |
||
|
|
5fb28a1fd6 |
tagged: build the Discover list on dist every half hour, for desktops that can't reach GitHub (River_WLan on X)
scripts/tagged.mjs ports magpie's askTagged/readTagged (topic search, package.json, npm, entry file); the workflow pushes tagged.json to dist. Run once locally (wsl): 367 plugins, 253 with icons, 291 installed from github:, 0 unread. |
||
|
|
92e0417739 |
agy-cli 0.1.16: keep conversationKey stable across volatile openings (#947)
conversationKey stays stable when only agent-injected opening fields change (Claude Code's billing header, known clock lines in the system prompt or a <system-reminder>), so a continued chat keeps its agy session and its prompt cache. It hashes the whole stripped first message. A flattened, growing first message reuses the live session only when it continues the whole previous opening plus that session's reply on a line boundary, and then sends agy only the new tail. Closes #945. Reviewed head 56c845720026819781e198bada948cce9b926806 (one commit on main 9204c07; main |
||
|
|
9e07c70627 |
antigravity 0.1.4, antigravity-cloak 0.1.4: omp's first line, "RFC 2119 keywords: ...", is broken up, so its prompt is no longer turned away with a 429 (eric_li8983 on X)
eric_li8983's 429 RESOURCE_EXHAUSTED after 0.1.3 was not quota. On the owner's real Antigravity account (plenty of quota; "hi" with no system prompt gives 200 on gemini-3.8-flash, claude-sonnet-4-6, gemini-3-flash), oh-my-pi's real system prompt (captured from omp 's request to a local server, 10.5KB) got 429 on all three. Bisected by hand: the sentence "RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL." alone gets 429; its halves, the list without the final period, or "2120" for "2119" get 200; the prompt without that line gets 200. Broken with a zero-width space after the first and second character of each word, the whole prompt gets 200 on the same three models. The line is added to antigravity's TURNED_AWAY (with its own hint when the cloak missed a reworded copy) and to antigravity-cloak's words. Run: bun test packages/antigravity packages/antigravity-cloak on magpie-desktop (wsl-run, HOME temp): 86 pass. Broken by hand (the TURNED_AWAY entry removed): the new shape test and the 429 hint test go red, 2 fail. Real account: omp's full prompt 200 on 3 models after, 429 before. Not tried: omp's own run through magpie end to end (the user's AGENTS.md and tools were not in the captured prompt); other omp prompt lines after the cloak. Real quota 429s and the credits path are unchanged. |
||
|
|
557511d73f |
openai-decisions: OpenAI Decisions as a System One provider (#762)
New package @magpie-community/opencode-openai-decisions-auth (provider
openai-decisions, model gpt-6-luna) by genglintong: answers magpie's
System One (base /systemone through its fetch) with OpenAI's
POST /v1/decisions, converting choice/score/noul to choice/score/predicate
and back with probabilities, confidence and usage. Sign-in is a plain
OpenAI API key from the host's getAuth, read again per request.
The six points of the 11-05 review, checked at 613fc413a:
1. credentials.mjs, the saved-key reader and the keyless method are gone;
no read of providers.json, APPDATA or ~/.config/magpie anywhere.
2. A per-question {"type":"refusal"} is left out of answers; the others
and usage are kept (all refused gives answers {}). magpie's own
Decisions translation reads a missing answer as a refusal too.
3. Omitted, null or blank instructions get a non-empty default.
4. Registry entry on one line; merges cleanly with origin/main
|
||
|
|
bf302fab7d |
minimax 0.2.4: generate_image takes the catalog's area, n, output_format and reference_images (#955)
hokaii6990-boop (Windows 11, magpie 0.1.3654, plugin 0.2.3, CN site):
`magpie tool minimax_generate_image --requests '{"prompt":"...","area":"2K"}'`
answered "bad arguments: arguments.requests[0].area is not an accepted
argument", while the account's catalog schema has area, and
minimax_call_tool with the same arguments generated the image.
Our first reply said execute checks against the catalog's
input_schema_json. It does, but createConnectorTools wraps every tool's
execute in checked(t.args, args) first, and a named Matrix tool's args
are the bundled matrix-tools.json copy (2026-11-03: resolution,
input_urls, a six-value aspect_ratio). So that check refused the call
before the catalog was ever read.
- A named Matrix tool's call is now checked up front only for its two
routing fields (site, account). Its own arguments are checked once, in
execute, against the catalog entry's input_schema_json, and against the
bundled copy only when the catalog gives none. A parameter MiniMax adds
later passes without a plugin release. A priced call still never goes
out with bad arguments; the catalog read now comes first.
list_tools, tool_schema and call_tool keep their up-front check.
- The refusal names whose schema it was: "(checked against the account's
catalog schema for connector__matrix__generate_image)", or the bundled
one when the catalog gave none.
- matrix-tools.json's generate_image input_schema is the reporter's
pasted `minimax_tool_schema --json` output, byte for byte after JSON
parsing (kept as testdata/generate-image-schema-955.json). It is what
agents are shown. Its description says reference_images, not
input_urls. The other 15 tools' copies are unchanged; no fresher
bytes for them.
- README says calls are checked against the live catalog.
Run:
- wsl-run (magpie-desktop, Bun 1.4.2), HOME=$(mktemp -d):
bun test packages/minimax 148 pass 0 fail; bun scripts/check.mjs exit 0.
- win-run (xiaomi-gpu Windows 11, Bun 1.4.2), HOME and USERPROFILE a
fresh temp dir: bun test packages/minimax 148 pass 0 fail;
bun scripts/check.mjs exit 0.
- Broken by hand (wsl-run, connector-tools.test.mjs):
- 0.2.3's code and bundle: 5 red, among them the area/n/output_format/
reference_images call.
- New code with 0.2.3's bundle: only the bundled-copy test red; the
area call passes, held to the catalog.
- New bundle with the old up-front check: 3 red (the catalog's
refusal message, the no-schema fallback message, and a refusal that
now reads the catalog first).
Not tried: no MiniMax Code account here, so no real generation; the
schema is the reporter's, from one CN-site account. The global site's
catalog was not seen. Codex desktop refusing area from the advertised
schema (the reporter's second path) was not reproduced; the refreshed
copy covers it for these fields. The get_asset_url /visible/ watermark
note is split out to #974.
Reported-by: hokaii6990-boop
Refs #955
|
||
|
|
9204c079ae |
zcode 0.1.59: a reply the gift answered names the -Trial entry, so Usage, sessions and the request log show free quota was spent (WJaunita45604 on X)
Free first sent the plain model to the Start Plan under the plain name, and the gift answers under that name too, so magpie named the plan's model for both routes. trialNamed rewrites the model of a gift's whole reply or event stream to GLM-5.3-Flash-Trial; a failed reply, and a free-first replay on the coding plan, keep what came. Run: bun test dual.test.mjs on wsl (61 pass); the two new gift tests fail with the rename taken out. Not tried: a real Start Plan reply (no gift balance on this account at this hour). |
||
|
|
dbd082f6d1 |
agy-cli 0.1.15: an array tool schema whose items live only on a sibling gets an items schema Gemini accepts (klarkxy #963)
Gemini refuses an array schema with no `items`. array-items.mjs infers the items from the schema around it, or adds a permissive items schema 8 levels deep, without narrowing what the client allowed; tuple `items` lists are left as they are, with a hint. Closes #962. Reviewed head c7d3e7b8 (on |
||
|
|
738fd501d7 |
agy-cli 0.1.14: tool schema patterns are turned into RE2 or dropped, so an ECMA-262 pattern no longer aborts the turn (klarkxy #946)
Tool input schemas' `pattern` and `patternProperties` keys are translated to RE2 (re2-pattern.mjs) before they reach agy; a pattern RE2 can't hold is dropped with a hint, and `additionalProperties: false` is lifted when every patternProperties key was dropped. Closes #944. Reviewed head 99093088 (on |
||
|
|
a0b1e49113 |
agy-cli 0.1.13: an image before a live tool_result counts as the user steering (klarkxy #965)
An image the user sends with no text before a live tool_result now marks the turn as steered, so it is replayed and the image stays off the MCP result. Reviewed head 7852e288 (on |
||
|
|
7869318d6a |
agy-cli 0.1.12: a tool step's estimated cache read stops at the step before it, so a new tool result is billed as input (#971 review)
0.1.11 (#971) estimated an uncalibrated first prompt's tool steps by summing every earlier settled step's whole window as the cached prefix. Each window already holds the steps before it, so the prefix was counted once per step: from the third step on, the step's whole window, the tool result just added included, came back as a cache read. In the review's probe (four Read calls, ACP reporting cachedReadTokens 0), step 4 billed 0 input and 34,456 read, and the steps claimed 56,608 cache-read tokens that ACP never reported. The prefix is now the largest earlier settled window (the step before), so each step reads that from the cache and bills what was added since. The step test that pinned the 100% clamp now checks that step 3's uncached input covers what was added after step 2, and that its read does not exceed step 2's window. Still an estimate until ACP reports. Run (WSL2 Ubuntu 24.04, Bun 1.4.2, temp HOME): bun test packages/agy-cli 8 of 8 pass; bun scripts/check.mjs agy-cli passes. Broken by hand: origin/main's index.mjs with the new test, node --test test/usage-settlement.mjs: 25 pass, 1 fail ("第三步未缓存 input 0 应覆盖 第二步之后新增的 32"). Restored, green. Not tried: Windows (main's smoke red there is #973), macOS (mote refused ssh), a real agy. |
||
|
|
73d2006444 |
agy-cli 0.1.11: sessions survive canonicalized tool input; a first prompt's tool steps count the settled prefix as cached (ChrisJ_AI on X, klarkxy #971)
Reported by ChrisJ_AI on X: Claude Code on an agy-cli model showed 268K-input turns
at 0% cache hit, turn after turn.
Two places dropped cache reuse; both are klarkxy's #971 (closes #970):
- a follow-up turn after the client filled defaults into historical
tool_use.input (Edit's replace_all) failed matchesHistory / takeParked, so
the live agy session was retired and the whole prefix replayed;
- tool steps of a fresh process's first prompt reported every token as a
cache miss until the prompt ended (no ratio learned yet).
Run at reviewed head 27245320 (win-run, xiaomi-gpu): node --test
test/usage-settlement.mjs 26/26 pass; the same file against c27ba5f7's
index.mjs fails tests 20, 21 and 24 (red on old code). bun test
packages/agy-cli: 7 of 8 pass, smoke.mjs 1 failure of 321 checks, the same
count on
|
||
|
|
6c20f1dac7 |
antigravity 0.1.3: a refused credits ask no longer ends in "Body already used" (eric_li8983 on X)
With Use AI credits on, a 429 from the plan's quota was cancelled before the second ask with credits; when that ask was refused too, the code read the cancelled body and threw, so every retry came back as a 502 "Body already used" and the quota's 429 was never told. The refusal is read first and told when the credits ask fails or throws. Run: bun test packages/antigravity (84 pass); the new test is red on the old index.mjs (TypeError: Body already used), green on the new. Other packages that cancel a body before a retry reassign the reply (read: kiro, minimax, nous, atomcode, joycode, gcp-ai, factory); none read the cancelled one. |
||
|
|
8adf0a7d79 |
notify 0.1.4: a sidebar page to edit channels and settings, and a switch that turns every push off (meili145 on X)
The page (magpie.page) edits the plugin's options without a file: add, pause and remove channels per kind, when to send, agents, language, and an on/off switch that saves at once (new option enabled, default true; off sends no turn push and no sign-in push). Run: bun test packages/notify (67 pass; the enabled test fails on the old hook), scripts/check.mjs ok. Page tried in magpie's real window (dev build of origin/main, sandbox HOME, plugin added from the folder) in chromium: add ntfy channel, Save and the switch wrote plugins.json options, 5 languages at 1000px and 420px with no overflow. Not tried: WebKit (its launch failed on mote), a real push from the page. |
||
|
|
35468c76d7 |
wave 0.1.0: Wave Terminal as a magpie agent (#938)
Adds Wave Terminal (waveterm) as a magpie agent. connect writes one whole
"magpie" mode in ~/.config/waveterm/waveai.json (display:name, model,
the gateway's /chat/completions endpoint, openai-chat, the key, and
capabilities with images when the model takes them), so switching off
removes the mode and leaves the user's own modes alone.
Run at 2f08c0df merged with origin/main
|
||
|
|
c27ba5f700 |
agy-cli 0.1.6: every prompt's own cache reads set the ratio the next tool steps report (baranwang on X)
Tool steps estimate their cache reads from the last ratio the proc learned, and only a final, uncancelled response taught it, so a cancelled prompt left the next one's tool steps reporting every token as a cache miss. agy reports each prompt's cached reads, so recordPromptUsage now sets the ratio from them. Test: a cancelled prompt (390k of 520k cached) then a tool step reports 0.75. Red with the line off, green with it. Not captured from a real agy: the owner's agy is signed out on this machine and mote was down. A fresh conversation's first prompt still has no ratio until it ends. Ran node --test packages/agy-cli/test (2 reds on base too: cp-hook, version/report hangs), bun test packages/antigravity, scripts/check.mjs. |
||
|
|
5623d7123f |
antigravity 0.1.2: a Use AI credits switch spends Google AI credits once a plan's quota is used up (eric_li8983 on X)
Untested yet; tests to run on mote. |
||
|
|
d91f8e31a0 |
kiro 0.1.37: switches to pin an Identity Center account to one credit region (#964)
Two switches in the provider's editor, "Use us-east-1 only" and "Use
eu-central-1 only" (us-east-1-only, eu-central-1-only), pin an Identity
Center account to one credit region. They are read with input.magpie.option
at each request.
- With one on, every request goes to that region. If that region is not
enabled or is used up, the answer is a 429 naming the switch, and the
other region is never tried.
- auth.usage counts only the pinned region. If the pinned region is not
enabled or couldn't be read, a used-up window gives the reason, so the
account is left out of routing.
- The not-enabled reminder names only the pinned region.
- Both off, or both on, is the default.
Run at 38c18529 merged with main
|
||
|
|
7153e59d78 |
page-model-quota 0.1.0: the tokens each model has left, across accounts (#932)
A page that shows how many tokens each model has left across your accounts. It is estimated from magpie's quota windows (/v1/magpie/quotas) and past usage rounds: the median tokens per percent over the rounds that can be used, or one round, or "sparse". The report carries no prose. The page words everything in English or Chinese. The service binds only to loopback, checks the Host, refuses a foreign Origin, wants a per-run key for Origin null, serves index.html to navigations only, and writes nothing under HOME. page-model-quota 0.1.0.
Run at the reviewed head dd8d44164d505088efeb07d80784128134aad213, on the Windows box (mote's sshd was refusing connections):
- node --test test/*.test.mjs: 14 pass. bun test: 14 pass. bun scripts/check.mjs: exit 0. It merges cleanly with main
|
||
|
|
86d3febf9b |
factory 0.1.45: optional model ordering by company (#959)
An opt-in switch, "Group models by company", orders Factory's models by maker: Claude (Fable, Opus, Sonnet, Haiku), GPT, Gemini, Grok, GLM, Kimi, then the rest. Within a family, newer versions come first, and each Fast Mode model sits right after its base. Off, which is the default, keeps main's order byte for byte. Only a strict `true` from magpie's option turns it on. factory 0.1.45.
Run at the reviewed head fe96f7eb67b308a31ce33492fd3c5d5f19a4f5b1:
- On mote at 9b19aa76: bun test packages/factory 196 pass (main 194). Main's and this index.mjs were compared as JSON of the config hook and provider.models: off is identical to main for absent, {}, false, "true", 1, null, a throwing option and `option: 5`; on, there are 59 models, the same set, with no duplicates.
- On the Windows box at fe96f7eb (mote's sshd was refusing connections): bun test packages/factory 196 pass, bun scripts/check.mjs exit 0.
- Broken by hand at fe96f7eb: grouping always on turns both order.test.mjs tests red. Before the review's fix, it stayed green.
- npm has 0.1.44.
Not tried: in a real magpie window.
|
||
|
|
2ee2ee84f9 |
layerfs 0.10.1: recover the page service after a host handover (#961)
When plugins change, magpie retires the old plugin host and starts a new one. The old host can keep port 43717 for up to 10 minutes while it finishes calls. In 0.10.0, the new host stored its failed bind as the service, and `if (service) return` blocked every later try. Once the old host exited, the page stayed refused until the host restarted. Now a service is kept only once it is listening. A failed bind retries with backoff (1s, doubling, capped at 30s, the timer unref'd) while a store exists, and a listener that closes starts again. A failed backend start is retried too, and the first mutation's race with the empty-store check gets one more check. layerfs 0.10.1. Run at the reviewed head 6f2d484e8f3367d1d614d4be5d9a44a701165fb4, on mote (temp HOME, Bun 1.4.2): - bun test packages/layerfs: 68 pass (main: 64). page-lifecycle.test.mjs: 3 of 3 green. bun scripts/check.mjs: exit 0. - The new tests against main's index.mjs: the handover and backend-retry tests go red. - Broken by hand: dropping the backendPromise reset, the retry schedule, or storing the service before it listens each turns a test red. - Probes: a closed listener comes back; with the port held for good, the retries cap at one every 30s and leak no servers; a pending retry doesn't hold the process open. page-service.mjs is unchanged, so its Host and Origin checks cover every retry. Not covered by a test (follow-up): restarting a closed listener, sharing one startup between concurrent calls, and the store-version recheck. recheck and storeVersion overlap: either alone handles the race. |
||
|
|
f8a52a2477 |
day-card 0.2.1: the blur and dim sliders stay put while a slider is dragged (#957)
paintPicker called pop.classList.toggle("photo", B.meta(bg.bg).photo).
A pattern's photo was undefined, not false, and toggle(name, undefined)
flips the class. So each input event of the margin or blur slider hid
or showed the blur and dim sliders in turn. The reporter saw both
states with the teal backdrop picked.
Every backdrop's photo is now a boolean, and the toggle asks for
=== true.
Run, on mote:
- bun test packages/day-card: 15 pass. bun scripts/check.mjs: exit 0.
- A Playwright repro (not committed) loads the page with a stub bridge,
picks teal, fires input on the margin slider four times, then picks
alpine and drags blur, then goes back to teal. In Chromium and WebKit
the old page shows blur as false,true,false,true,false. The new page
keeps it hidden on teal and shown on alpine on every tick.
Broken by hand: with backgrounds.js from main, the new test goes red
(1 of 15).
Not tried: in magpie's own window on Windows, where the reporter is.
Reported-by: lbjxr
|
||
|
|
9001e6f082 |
factory: every droid promotion is checked inside its own window (#954)
The rate tests held one date, 2026-10-14, so a promotion starting after it was never compared with PROMOTIONS. Dropping gemini-4-carbon's line (#953, from 2026-11-10) left every test green. The new test checks each promotion droid's registry lists, inline or named, a minute after it starts, a minute before it ends and a minute after, against what configModels gives then. GPT-6 Astra's 60% off ended 2026-09-05, before PROMOTIONS was kept, and is skipped by a fixed LISTED_SINCE (2026-10-01); with no cutoff the test was red on it. 7 promotions are checked. Run on mote with a sandbox HOME: bun test packages/factory, 194 pass. Broken by hand: deleting Carbon's PROMOTIONS line turns the new test red (the old ones stay green); Argon at 0.4 turns it and two more red; the count bar at 99 shows 7 checked. Not run: the root suite (test-only change in one package; CI runs it). |
||
|
|
8ae971dedb |
factory 0.1.44: add Gemini 4 Carbon (#953)
Registers gemini-4-carbon on Factory's Google Gemini route, with the same shape as gemini-4-argon: 1M context, 65536 output, low/medium/high, a 1.6x multiplier and 50% off from 2026-11-10T16:00Z to 2026-12-01T08:00Z. Factory 0.1.44. Reviewed and run at fd9b634f41d7021715842f3db7bde28a9e8e6888: - Downloaded Droid 1.7.1 (darwin/arm64) on mote: SHA-256 761730017d94…7bd4, as the testdata says. The Carbon entry in the binary is byte for byte the testdata line, and it differs from Argon's only in id, name, the feature flag, the pricing note and the dates. - mote, sandbox HOME: `bun test packages/factory` 193 pass; `bun scripts/check.mjs factory` ok. PR CI (root suite under a temp HOME) green. - Broken by hand: Carbon at 1.5x turns 3 rate tests red. Carbon sits at index 48 of 59, after the Fast Mode block's rule; the first 24 are unchanged. - Not caught: dropping Carbon's promotion leaves every test green, since the promotion test reads only named promotion variables, not inline `promotions:[…]`. Argon has the same gap on main. Not tried: a real request. Carbon is behind Factory's Gemini4Carbon flag, unreleased in Droid 1.7.1. Co-authored-by: Mars-Sea <Mars-Sea@users.noreply.github.com> |
||
|
|
9452521770 | workbuddy 0.2.27: version bump for the check-in expiry change (cdredfox on X) | ||
|
|
3d7b67aeb3 |
workbuddy 0.2.27: check-in rewards the summary doesn't list say when they lapse (cdredfox on X)
The Credits and Total windows said when the soonest credits left run out (runsOutOf), but only over the packages the resource summary lists. A daily check-in reward (code 007, each with its own end) that only the detail lists have, beside extra credits the summary does list, was in no window and in no expiry, so Smart routing never saw those credits lapsing. runsOutOf now also counts the extra codes WorkBuddy's panel counts (EXTRA_CODES, plus the free month and gift on WorkBuddy AI) when given the site, on the extra window, and on the single window when no window of its own holds them. Run: bun test packages/workbuddy (336 pass, HOME=$(mktemp -d)); the new test fails on the old code (broken by hand: stashed index.mjs, red). Not tried: a real account (the desktop sign-in on this machine was stale, so the real list shape of a check-in reward is the 2026-10-26 fixture's, 007 "赠送积分", not seen live today). |
||
|
|
68e73c4797 |
agy-cli 0.1.5: release #951 (user text beside a live tool result)
|
||
|
|
9a96799efb |
agy-cli: user text beside a live tool result replays the round in a new prompt (#909, #951)
A user message that carried ordinary text beside a live tool_result, before
or after the result block, was refused with 400 "text beside a live
tool_result; send it after the tool response completes" (maxleebeta's
DeepSeek-harness agent, #909; Claude Science does the same). inspectToolTurn
now marks such a turn userSteered, so the bridge takes the existing replay
path: the old session is stopped, its pending calls are not resolved, and a
new session/prompt carries the round, the real tool result included. The
user's text is never spliced into an MCP function response. The same goes
for plain text after a Skill result, and for a hook line that carries "The
user sent a new message while you were working".
Still refused: an unclosed protocol notice (<system-update>... with no end
tag) on either side of the result, a companion (ARGUMENTS:, [Image: ...],
Tool loaded.) with no matching preceding tool, and an image before the first
tool_result. A turn whose tools also grew (#942) takes the same single
replay.
Changed behaviour beyond #909: a protocol notice, token line or hook-success
line placed before the tool_result (previously 400) now replays in a new
session, where the same line after the result is forwarded in-session.
Tests: compat.mjs checks both placements are userSteered, the MCP result
is unchanged, and the replay carries the instruction and the result. smoke.mjs
drives both placements and the Skill case through the fake agy and checks a
new convId whose prompt carries both. Five smoke checks that asserted 400
for text the bridge now replays were removed; the unclosed-notice 400 check
stays.
Run at head 04692ce0a74d (merged onto origin/main
|
||
|
|
d5f4214eff |
antigravity 0.1.1, antigravity-cloak 0.1.3: two zero-width spaces a word, and a 429 says it is a 429 (shzutbi1 on X)
Google turns Claude Code's billing line and "built on Anthropic's Claude Agent SDK" away again when only the first letter is broken (checked on a real Antigravity account with Claude Code 2.1.316's prompt); a break after the first and the second character of each word goes through, 3 of 3. Both packages break every run of three or more letters or digits that way. antigravity's error for a turned-away prompt said "400 ... as from an unapproved channel" about what Antigravity answered as a 429; it now says "Antigravity answered 429 to this system prompt". bun test packages/antigravity packages/antigravity-cloak on mote: pass. cases.json expectations regenerated for the new breaks. |
||
|
|
450279c4e0 |
agent-agy 0.1.0: Antigravity CLI (agy) as an agent plugin
The agent plugin magpie's built-in agy moves onto. It names agy's settings.json, where magpie's models go beside the user's own (merge: customModelsConfig.customModels), and how agy is started: GEMINI_API_KEY and GOOGLE_GEMINI_BASE_URL from magpie's gateway and --model, given by the agy function magpie puts in the user's shells. own() lists the user's own custom models by their provider. Run: bun test in packages/agent-agy (3 pass) and bun scripts/check.mjs (ok) on mote. magpie's TestAgyPlugin, TestAgyHandedToPlugin and TestAgyHandedOverUnwire load this file and pass against the magpie change that reads launch, merge, effort, wsl and aliases. A magpie without that change keeps agy its built-in's, so this package does nothing there. |
||
|
|
ea3573bfe9 |
zcode 0.1.58: an account served fewer than three is narrowed, not held; trial entries are free (#438)
takomitkm (plugins#438, 0.1.57, default settings) had the busy hold arm with one account, one agent and at most two in flight, at about five asks a minute, and arm again within a minute of its end. A coding plan model's weekly or monthly limit (1310) also rested the whole account, so its -Trial models got the cached 1310 without being asked. Busy hold. ZCode serves that account one Start Plan request at a time, so every second request was refused again at its 1s re-ask and counted toward the process-wide hold. A sustained cap with others of the same account in flight (the gate's lane busy >= 2) now narrows that account's gate to busy-1, at least one, for NARROW_FOR (5 minutes; startGate.now is its injectable clock) and counts toward no hold. A lone sustained cap still counts, so the hold stays process-wide and keeps the firewall protection: #801's caps came with up to ~10 in flight, which the gate never sends, and an account whose slots are taken elsewhere narrows 3 -> 2 -> 1 within a few caps and is then refused alone, which arms the hold as before. The queue answer says the account's current number. Rest. The models hook marks each -Trial entry free: true, so magpie's PaidBesideFree makes a coding plan model's quota refusal rest that model, not the account. Gift-only accounts' plain names stay unmarked. Side effects: the Free mark in pickers, free-preferring groups pick the trials first, and they price at 0, which they are. Run (mote, bun 1.4.2, HOME=$(mktemp -d)): packages/zcode bun test, 240 pass, 0 fail, 17 files, at this head rebased on 60acd62b; bun scripts/check.mjs exit 0. Broken by hand: - narrowing off (if (false && ...)): the three new inflight tests fail; the reporter's case shows the hold armed (until=1000000240000). - lone caps narrow too (busy < 1): seven hold tests fail (the saturated-elsewhere replay, refused-even-one-at-a-time, start.test's hold tests, dual's hold test). - free: true removed: the new gift test fails. Tests: inflight.test's reporter's case (fake caps at >= 2 in flight, injected clocks), the narrowing's expiry, and a lone refusal still arming the hold; gift.test's free trial entries. start.test's in-flight guard now uses twelve accounts of one request each, and dual.test's hold test a gate of one, so their caps stay lone ones. Not tried: a real ZCode account served one at a time; the core side (magpie's TestZCodeCodingPlanLimitLeavesTrials) is in magpie with the mover min. Reported-by: takomitkm |
||
|
|
60acd62bee |
agy-cli: a tool loaded mid-turn starts a new prompt with the round replayed (#942)
agy checks each call against the tools it listed before the prompt began. After ToolSearch loads a deferred tool, the client's next request declares it, and the bridge sent tools/list_changed and then continued the same session/prompt. agy's validator still answered `unknown tool: "<name>" — check spelling` for the rest of that prompt. When the tool-result request declares a tool the process has not listed (Proc.toolsGrew), the bridge now takes the existing changed-context path: it drops the process without resolving its calls and replays the history, the ToolSearch tool_use and its tool_result included, in a new session/prompt, where agy lists the full catalog first. The user's turn is in the replayed history once. The new process starts with the grown catalog, so the next result continues it live and nothing loops. A catalog that only loses or changes tools still continues the live turn. Tests (test/smoke.mjs, fake agy): TOOLSEARCHGROW checks calls against the tools listed at prompt start, like agy 1.5.3. The new block checks that the grown catalog starts a new session/prompt, that it replays the ToolSearch round with the user's ask once, that the old prompt never reaches the validator with the new tool, that the loaded tool's call reaches the client, and that its result continues the new session with no second replay. The "live tools change" case now removes a tool instead of adding one. Run on mote (Bun 1.4.2), at this tree: - packages/agy-cli `bun test`: 8 pass, 0 fail; smoke.mjs ALL OK (319 checks). - `bun scripts/check.mjs agy-cli`: registry.json and agy-cli ok. Broken by hand: sed removed `|| proc.toolsGrew(tools)` from the condition; smoke.mjs went 5 FAILURES (319 checks), the five new checks; restored, ALL OK. Not run: the root `bun test`. It waited behind about 20 queued suites on mote's suite.lock for over an hour, and WSL answered E_UNEXPECTED. Not tried: a real agy 1.5.3 run. Version 0.1.4. Reported-by: chrisjian <chrisjian@users.noreply.github.com> |