d3fc6f2bfada18e6ae7887b79ed1e4c650ca37e1
467
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7c1dc198d1 |
usage: a turn over the Responses WebSocket counts what the socket was sent, and says so
A Codex turn kept on a Responses WebSocket sends only the new items as a
delta, but the row's ↑ was the whole HTTP body magpie built before the
transport ran, so a long conversation read as ~13MB up per turn
(matrix0487 on Discord). overSocket now records what each socket write
carried (wroteSocket) and, when the turn went out on the socket alone,
replaces the HTTP figure with those bytes (sentOnSocket); a turn that fell
back to HTTP keeps the HTTP body and adds any socket write made before the
fallback. errCodexSocketAgain's retry on a new socket counts both writes.
The row remembers that it went over the socket: Record.Socket (json "ws"),
packed as Flags bit 16384 (rowSocket, added to TestRowFlagsApart). The
Requests table's protocol badge says "Responses · WS" and the details'
Protocol line "Responses · WebSocket".
Run on mote at this commit (rebased on origin/main
|
||
|
|
2c2bd15d71 |
memory: Tidy up every night, a switch in the Memory tab
The Memory tab gets a second row under Learn from conversations. It is
off by default. Switched on, the first tidy is due at the next 03:00.
Tidy now runs one at once, and Undo puts the last one back. While
distillation is off, the row has its own model picker; both rows share
one model.
Routes: POST /api/memory/dream {on}, /dream/run and /dream/undo.
GET /api/memory/distill carries "dreaming", so a tidy no longer shows
as conversations being read.
The prompt's stale rule is narrower. On the first real run it set aside
two decisions because "the work is done". Now only a note that later
notes contradict, one past its date, or one about a finished one-off
task is stale; a decision, direction or preference stays.
docs/subsystems/memory.md gets a Dreaming section.
Real run: a sandbox memory.json of 62 real distilled memories, 12 active
and one each user-written and pinned, with auto/claude-haiku-5-5 through
the live gateway.
- Before the prompt change: 12 changes in 48s, 10 merges and 2 set aside.
Both set-aside notes were decisions.
- After: 12 merges in 46s, none set aside. Each merge joins real
duplicates (three ~/.codex/sessions cleanup rules into one, the
TestFlight 1.66/1.68 pair). One went into the fixed memory, whose text
was kept word for word.
- Undo: 25 restored. memory.json's ids and statuses equal the backup
taken before the run, and every merged memory is gone.
Broken by hand, each red:
- Undo not reloading the list: library-memory 22 failed.
- Ignoring DreamSince: TestDreamsOnceANight.
- A plan applied after an error: TestDreamFailureChangesNothing.
- Tidy's fixed guard and Untidy's status check: their memory tests.
Run on mote at this tree:
- go test internal/memory, memdistill, library: ok.
- internal/gui -run 'Distill|Dream|I18n|Budget': ok.
- library-memory.test.cjs: 22/22 in both engines.
- i18n-keys and i18n-en-no-cjk: 4/4 each.
- go vet (darwin), GOOS=linux -tags nogui, GOOS=windows: ok.
Not run yet: the full suite at this head.
|
||
|
|
408db02bf2 |
memory: the automatic model's empty note uses the core "No models"
370d2fd5f gave the Library plugin its own "no model" string, and internal/agent's antigravity_test.go says those words too, so i18n-keys' "a plugin's words are its own" went red. The note now uses the core "No models", which is already translated. Run on mote: i18n-keys 4/4, i18n-en-no-cjk 4/4 and library-memory 22/22, all with the P3 GUI change in the tree too. |
||
|
|
4d12d44163 |
memory: Learn from conversations, a switch in the Memory tab
The Memory tab gets a row that reads finished conversations into
candidate memories (To review). It is off until switched on; switched
on it reads at once, then hourly (5 minutes after start, then every
hour), through the gateway this process serves under the agent
"memory", with the automatic model unless one is picked through the
app's menu. Read now runs it again; a run that stopped says why.
- memdistill: Keep (the hourly loop) and Running.
- gui: /api/memory/distill (GET, POST {on, model}), /distill/run;
distillComplete posts /v1/messages to the served gateway's handler
with the memory agent's token.
- library client: the row, its poll while a run goes, and the
memories reloaded when it ends; strings in zh, zh-TW, ja, de.
- docs/subsystems/memory.md: a Distillation section.
Run (mote, at this tree):
- go vet ./internal/gui ./internal/memdistill ./internal/memory; GOOS=linux
-tags nogui and GOOS=windows vet of gui and memdistill: clean.
- go test ./internal/gui ./internal/memdistill ./internal/memory
./internal/library: ok.
- node --test internal/gui/tests/library-memory.test.cjs: 22/22, Chromium
and WebKit, 5 languages, 980 and 420.
Broken by hand:
- the memories not reloaded after a run: the GUI test is red waiting
for the proposed memory.
- the token not the memory agent's (earlier): TestDistillCompleteThroughGateway
red on the Trace's agent.
Not tried yet: a real model's run (next), the whole GUI suite (queued
behind the suite lock on mote), the full Go suite.
|
||
|
|
2b2ee49ded |
gui: the Library's Memory tab
A tab after Instructions lists what the agents remember, in use, to review (what an agent only guessed) and archived, pinned first then newest; searches it, narrows it by where it applies, and adds, edits, pins, keeps, archives and deletes memories (Delete asks with a second click). Kind and scope are picked from the app's menu, never a <select>. A card on top switches the digest in the ticked agents' instructions on or off and names those agents, and offers Magpie Memory while it isn't in the Library. /api/memory (GET; POST saves the user's own or edits by id), /api/memory/remove and /api/memory/digest; a change publishes the digest at once and its reply carries `problem` when that failed. Words other code also says (Archived, Pin, Keep, the kinds…) are in core i18n.js; the rest in the library plugin's, in zh, zh-TW, ja and de. docs/subsystems/memory.md describes the layer. Run (mote-run): - node --test internal/gui/tests/library-memory.test.cjs, Chromium and WebKit, 5 languages, 980 and 420 wide: ok - whole GUI suite: not run at this commit; it is queued on mote for the stack head (034f249af before the rebase) - go vet ./internal/gui, GOOS darwin, linux, windows: ok Broken by hand: the pinned sort read `b.pinned - a.pinned` (NaN for an unpinned one) and the test was red in every language until `!!`. Looked at: screenshots en light 980, zh dark 980, en 420. |
||
|
|
9d4c338a67 |
gui: magpie web on a phone no longer scrolls sideways or keeps a band at its foot (#4943)
precis1onz (iOS Safari, dark, English, Usage) saw the page move sideways
and a dark band stay at the screen's foot.
- Sideways: Usage → Requests' "Split by" row (label and five choices) is
one unwrapped span, 393 to 558px wide at 375 to 430px. It was the only
thing wider than a phone in any view or language. On the phone layout
it now wraps inside the screen (app.css, phone block only).
- The band: the Requests table's stand-in scrollbar (#799) is sticky at
the view's foot, and a touch screen draws no bar in it, so it stood
there as an empty 12px band. ledHScroll now leaves it hidden on
(hover: none) and (pointer: coarse); a finger moves the table itself.
A desktop keeps it as before.
New test, phone-no-sideways.test.cjs: every view (Agents, Sessions,
Providers, Routing, Groups, Gateway, Library, Plugins, Masking, each
Usage tab, Settings' tabs) on an iPhone at 375 in en, zh, zh-TW, ja, de
and at 390 and 430 in en, in Chromium and WebKit, with long ids, emails
and paths; nothing may be wider than the screen and no empty band may
stay sticky at a view's foot. ledger-swipe now expects no bar on a
phone, and that the swipe moves the table.
Run (mote, through mote-run):
- phone-no-sideways: red on the old assets (
|
||
|
|
0d99261dcc |
sessions: the page leads to Settings › Privacy's session history
Which agents' session history magpie reads is set in Settings › Privacy,
and the Sessions page it is about led there only through its first ask's
words (the scattered settings audit after netube99 on X). Its head now has
a Settings › that opens Privacy at those rows, lit, with Back to Sessions.
Gateway mode reads no agent's history and has no such rows, so no link.
Two things it found on the way:
- Privacy's session-history rows are drawn again when their read comes
back (loadSessionReads), which took the light off a row a link had just
lit; in Chromium it was gone before it showed. The redraw now keeps the
light on the row at the same place.
- The link takes ~70px of the head (en), and eight agents' tabs, which
fit a 1200px page (面条 on Discord), had 34px to spare. The search
now gives way to the tabs, down to its 110px least, before the agent
menu takes them; a narrow window's grid head is as before. The fit
watches the head, not the tabs' box the search's width changes, so no
ResizeObserver loop.
New test sessions-to-settings.test.cjs: the link's words, inside the head,
over nothing, the page fits; it lights Privacy's row; Back returns to
Sessions; none in gateway mode. Every language, Chromium and WebKit, at
1100 and 420 wide. sessions-toolbar now counts the link among the head's
controls that must fit.
Run on mote: every Sessions GUI file (13), gateway-conversations,
gateway-mode-sessions, i18n-keys and settings-back: 192 of 192.
Broken by hand: without the link, sessions-to-settings red; without the
redraw keeping the light, red in Chromium (timeout on the lit row);
without the search giving way, sessions-toolbar red ("a wide window keeps
the one-click agent tabs").
Not tried: the real app window.
|
||
|
|
a1f2c37ea8 |
gateway: a key's limit editor says Key limits is off and turns it on
A gateway key's limit is the Key limits built-in's (budget). With it
switched off, the editor under the key's row drew as usual, and Save was
refused with "turn the plugin on" without saying where (the scattered
settings audit after netube99 on X). The editor now has a line, shown
only while budget is off (data-feature-off), saying "Off in Plugins ›
Built-in" with a Turn on that switches it on in place; the line goes and
the editor stays open with its draft.
New test gateway-key-limit-off.test.cjs: off, the line shows inside the
editor with its words and the page fits; Turn on posts {id: budget, on:
true} once and hides it; on, it is hidden. Every language, Chromium and
WebKit, at 1000 and 420 wide.
Run on mote: gateway-key-limit-off 20 of 20; gateway-key-limit,
gateway-key-limits, gateway-key-cycle and i18n-keys 38 of 38.
Broken by hand: without data-feature-off the line shows when on, red;
without Turn on's call the line never goes, red (timeout).
Not tried: the real app window.
|
||
|
|
a8aeb2cad2 |
usage: picked days can start and end at a minute
blrbrzkj on Discord asked to see usage from one time to another, not only whole days. The range menu has a start and an end time under its month (empty is the whole day; 9:30, 0930 and 09:30 all read 09:30). Picked with the days, the period is "2026-10-01T09:30..2026-10-01T18:00"; Enter applies new times to the days already picked. A time that isn't one, or an end not after the start on one day, is marked and asks for nothing. The opt says "Oct 1 09:30 – 18:00". The backend reads either end as a date or a date with its minute (usage.RangeOf, bounds); an untimed end is its next midnight. A timed range of 48 hours or less is drawn by the hour from the first's hour. CSV names drop the colons. Run (mote): node --test usage-range-times (new, chromium + webkit, en + zh), usage-range, i18n-keys, credit-days: 26/26 ok. go test ./internal/usage ./internal/gui ok (TestCoreScriptBudget fits, the periodDays comment cut to pay for its regex); gofmt clean; go vet native, GOOS=windows (usage, gui), GOOS=linux (usage) ok. Broken by hand: a timed end read as its day's midnight turns TestPickedMinutesArePeriod red. The page's own typedTime first clashed with app.js's hhmm and stopped the Usage page mounting; the GUI run caught it. Not tried: the real app with a real ledger; ja/de/zh-TW screens. Reported-by: blrbrzkj (Discord) |
||
|
|
769a625548 |
gateway: its own settings sit under a Settings head, apart from the calls
The owner (11-09): "这两个卡片为什么贴在一起?" The Recent calls list and the gateway's own settings card touched with no gap. The settings card now has a Settings row-head of its own above it (the page's 14px head margin), hidden with the card when the gateway built-in isn't found. Run on mote: gateway-own-settings.test.cjs and i18n-keys.test.cjs, Chromium and WebKit, every language, 1100 and 420 wide: 24 of 24. Broken by hand: with the head and its hide line taken out, 20 of 20 red (the head's text and the gap of at least 10px are checked). Not tried: the real app window; the full GUI suite runs with the next commit. |
||
|
|
3d49ac069e |
usage: a 24 hours period, and the period picked is kept
The Usage page's periods were Today, 7 days, 30 days and All. "Today" starts at midnight, so early in the day it shows almost nothing (mahiro233 on Discord). A "24 hours" period now sits after Today and asks the server for its rolling window, last:24h (#2075), with an hourly chart. Its empty state says "No calls in the last 24 hours." (en, zh, zh-TW, ja, de). The menu bar's credit days count it as 2. The period picked from the list is kept in localStorage and the page opens on it next time. Picked day ranges aren't kept (they go stale), and neither is a period the URL brings (?period=7d from the menu bar). Tests: usage-24h.test.cjs (new; Chromium and WebKit, en and zh, 900px): 24 hours sits after Today and asks for last:24h, its empty note, a reload opens on the kept pick, ?period=7d is not kept. Five usage tests counted the period list by index and were moved one along. Run on mote at |
||
|
|
c6331b427c |
routing: a group bound to gateway keys is theirs alone (Xerxes754)
Xerxes754 on X asked to bind a routing group to one or two gateway
keys, so other keys neither see nor use it. Before this a key could only
be held to models from its own side (naming group/<id> in its Models);
a key with no limits reached every group, and nothing on a group could
keep it from one.
A group now has Keys (key ids). Set, only those keys, and keys issued
under one of them, may use it:
- groupBarred/groupGiven in key_models.go answer it for every route that
reaches a group: chat, responses, messages, count_tokens, embeddings,
images, video, the decider and the subagent and image MCP paths. Any
other key gets 403 "bound to other gateway keys", naming the group and
the Routing page, and nothing goes upstream.
- /v1/models and /v1/models/{id} leave it out for any other key, a key
held to models that names it included. provider.GroupsBound keeps an
unbound magpie's list as before.
- A keyless request from this computer uses it, as key limits never
hold one; callerGuard now names a loopback request's key when it
sends one, so a key used locally is held too.
- SaveGroup keeps the stored keys when a save doesn't name them (the
CLI, the TUI, the card toggles); an empty list clears them. Ids are
trimmed, deduped and capped. Sharing a group leaves its keys out;
importing over one keeps them.
- GUI: Routing, a group's Edit, row "Gateway keys" (网关密钥) with a
button "Any gateway key" (任意网关密钥) that opens the app menu of the
user's keys (multi-pick); a bound key since deleted shows "key
deleted" (密钥已删除). The row shows once there is a key to bind.
/api/groups lists gatewayKeys (no browser, read-only or issued keys).
zh, zh-TW, ja, de strings.
- Not covered: a bound group nested in another group is reached through
the outer one (documented in gateway-routing.md).
Run (mote unless said), at this head rebased on
|
||
|
|
ecc16fe979 |
usage: the quick panel and the Usage page word unpriced calls alike
The quick panel's Cost said "15 个没有价格" while the Usage page's
said "15 次调用没有已知价格,未计入". Both now say "{n} calls unpriced"
("15 次调用未计价"), as the page's other cost heads already did, with
the whole sentence on hover.
Reported-by: tenacious_eagle on Discord
The Usage page's plugin already had the two count keys; they live in the
core's i18n.js now that the quick panel says them too (i18n-keys: no key
twice, a plugin's words are its own). The Overview calls tile says the
same words, so usage-unpriced-sum's tile wording follows.
Run on mote at origin/main
|
||
|
|
8607a7a029 |
library: a skill GitHub's limit left unchecked leads to the token's row
A skill check that ran into GitHub's 60-an-hour limit says "Add a
GitHub token in Settings → Network and sharing", in a status line that
fades and a tag's tooltip, and nothing there went to Settings (the
scattered settings audit after netube99 on X). The Not checked tag is
now a link when the limit was the one without a token: it opens
Settings › Network and sharing and lights the GitHub token's row. A
token's own limit has nothing to add there, so its tag stays plain.
github-token.test.cjs swaps its route between rounds with
unrouteAll({ behavior: "ignoreErrors" }): the click leaves Settings'
lazy files being served, and the old unroute made the next round's
handler fulfil a route already handled.
Run (mote, through mote-run): github-token.test.cjs, Chromium and
WebKit, en and zh, 8 of 8; github-token plus every
library-*.test.cjs before the route fix: 1211 pass, the one red that
route race.
Broken by hand: the tag never a link, 4 of 8 red (each limited case).
Not tried: the real app's window; the whole GUI suite runs after the
last of these changes.
|
||
|
|
92be1d779b |
usage: the allowances' head opens Settings › Allowances
The Usage page draws the allowances, but how they are shown (used or
left, the menu bar's figures) and their alerts are set in Settings ›
Allowances, and nothing on the page said so (the scattered settings
audit after netube99 on X). The allowances' head now has a Settings ›
link, as the Routing page has, that opens that tab and lights the
Allowance display row (now #quotaLeftRow). Wired in the usage plugin,
so the core script doesn't grow.
Run (mote, through mote-run, Chromium and WebKit, every language, 1100
and 420): settings-places, mobile-web (with an origin/main baseline;
the button is taken out until the baseline has it, as rtToSet is),
account-mask, quota-curve, i18n-keys: 89 of 89, twice. A first run had
one red whose name a tail cut off; the next two runs of the same files
were 89 of 89, so it is unnamed and not seen again.
Broken by hand: no onclick, settings-places 2 of 2 red (no row lit);
no #quotaLeftRow, 1 of 1 red.
At the pushed head (rebased on
|
||
|
|
a6e4cf7635 |
settings: what routing does sits under Models › Routing, and the Routing page opens it
The scattered settings audit after netube99 on X. Ask again after a
refusal, the Retry-After cap and the intent classifier's timeout were
under Models › Replies beside rows about a reply's content, and Busy
models last sat in Network and sharing, far from the routing it changes.
The four are now one Routing section under Models, after Replies, and the
Routing page's header has a Settings › button that opens Settings at that
section with its first row lit. The docs (reference.md, the site's
plugins page in en, zh and ja) name the new place.
Run (mote, mote-run):
- settings-places, retry-after-cap-setting, refusal-retries-setting,
classify-timeout-setting, model-load, i18n-keys and bare-ids, both
engines: all pass.
- mobile-web against origin/main
|
||
|
|
4064c10362 |
routing groups: on while Routing is off, their Built-in row says their page went with it
Routing groups have no page of their own: theirs is on Routing. With
Routing off and Routing groups on, Plugins › Built-in showed the groups
switch on and nothing anywhere to set them, and the quick start's
routing step still counted groups alone (netube99 on X, and the
scattered settings audit after it). The groups row now says "Their page
is on Routing, which is off" with Turn on Routing, which flips Routing's
own switch on the same list, and the quick start's step leaves with
either one off.
The hook lives in a new plugins/routing/settings.js, loaded after app.js,
whose featWho it extends (plugin client files load before app.js; the
first try in client.js threw "featWho is not defined" in every test).
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
7cb437ee16 |
masking: its alert sits with its other settings, and its Built-in row says when nothing is masked
The Masking alert was the one masking setting on the Masking page, under
the request list, away from every other one in Settings › Privacy (and
in Settings › Usage before that, where nb5p looked for it). It is now
the first row of Privacy's "when a value is found" list, out in gateway
mode as before. The Masking page is the list of masked requests alone.
Masking turned on with no kind, no personal data and no word of the
user's masks nothing, and its Plugins › Built-in row said only where
its settings are. It now says "Nothing is masked yet" before the link
(the scattered settings audit after netube99 on X).
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
17a94a1b00 |
gateway: its keys show for a web page listed in Settings, and Settings links to them
A web page listed under Settings › Network and sharing › Web pages that
may call magpie is refused without a gateway key, shared or not, and the
row says to use "a gateway key from Gateway". But the Gateway page drew
its keys only while Share on local network was on, so that user found a
line saying keys come with sharing and no way to make one (the scattered
settings audit after netube99 on X). The keys now show while sharing is
on or a web page is listed, the off line names web pages too, and the
Web pages row links to Gateway's keys once it has a page.
The guard in renderGatewayOwn's settings callback also redraws the whole
view only while its box is still in the page, as 5efe0e195 does for the
first draw.
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
88b541a25c |
images: every pointer names Settings › Models › Images, where the page is
The image models moved under Settings › Models, but the Library's Magpie
Image sheet, the MCP server's instructions to agents, the gateway's
"no image model" errors, the video tool's text and the docs still sent
users to "Settings › Images", a tab that no longer exists (the scattered
settings audit after netube99 on X). Every user-facing string now names
Settings › Models › Images in en, zh, zh-TW, ja and de, as do the site's
Qwen docs (en, zh, ja), llms-full.txt, the subsystem pages and comments.
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
4ddd01fe5b |
gateway page: its own settings draw nothing while the page isn't drawn
c9a1c557d's renderGatewayOwn, run again once settings are read, met a
window where the view was "gateway" but the page's template wasn't on
it, and threw on a null #gwOwn. old-webkit's "with Safari 15.0's
built-ins, the panel and the window draw every page" was red on main
from then on ("null is not an object (evaluating 'box.replaceChildren')").
Run on mote:
- old-webkit + gateway-own-settings on origin/main
|
||
|
|
c9a1c557d0 |
plugins: every built-in's row leads to where it is used, and the Gateway page holds its own setting
netube99 on X: one feature's settings are spread over pages that don't
say where the rest are. Plugins › Built-in had six rows (Key limits,
Groups, Rotation, Warm-ups, Middleware, Tools) with no page and no link,
so a user who turned one on was left to find where it shows. And the
Gateway page's one setting, Recent calls at a time, was a form under its
row in Plugins › Built-in, two pages from the calls it is about.
- pluginrt.Manifest gets Opens: the window page a built-in without a page
of its own is used on. budget → gateway (keys' limits), groups →
groups, rotation and warmups → providers (a provider's editor),
middleware and tools → plugins. builtinJSON sends it; featGo links to
that page by its sidebar name, as for a page plugin.
- A plugin with a page draws its settings there, not under its row
(renderBuiltins). The Gateway page draws its schema under Recent calls
(renderGatewayOwn), saves through /api/plugins/builtin as before, and
ends with a row "Port, allowed addresses and model ids" that opens
Settings › Network and sharing at the gateway's rows (4 languages).
Tests:
- TestBuiltinSaysWhereItsSettingsAre holds SetAt, Page and Opens per
built-in.
- builtins.test.cjs: no form in Built-in, and each Opens row's link says
its page's sidebar name. Its row reached by the wheel now counts the
window's bottom too, and frees a switch under the view's floating To
the bottom button by wheeling toward the window's middle: the rows grew
with their links, and WebKit de 420 left Usage's switch under it.
- gateway-own-settings.test.cjs (new): the setting under the calls,
translated, 20, picking 50 posts {id: gateway, config: {callsPage: 50}},
the row opens Settings › Network at #portList flashed; every language,
Chromium and WebKit, 1100 and 420, nothing past the window.
- builtin-places.test.cjs: Library's row now leads to Library.
Run at this tree (on origin/main
|
||
|
|
7a2a05c7a3 |
routing: Accounts and keys keeps each provider's heading while it says the same
freefcw on X (11-09, v0.1.3373 and v0.1.3375): magpie at 32% CPU with 2,250 idle wakeups and its webviews at 80 to 223MB; lemonkillergame and laincatx say the same of CPU and memory. The Routing page draws Accounts and keys again each second while it is in sight (countdown: its rests and resets count down). Each drawing made every provider's heading anew, icon <img> included, and patch then kept the old heading in the page. But an <img> asks for its picture as soon as its src is set, in the page or not, and the app's icons go out no-cache (revalidated), so every provider's icon was asked for again each second: through the Wails asset server in the app (a read and a sha256 of the file each time), and each a new SVG document in the webview (~0.6MB, #909). Over `magpie web` on mote, a seeded HOME with five providers on Routing: 322 requests a minute, 155 of them icons every 30s; every other page asks for 4 to 13 in 45s. A heading is now kept per provider while its icon, name and routing mode are the same, and a heading with its first row are a list of nodes, no longer a box they were moved into: the move took a kept heading or keys row out of the page each second, so patch never found it in place. Measured on mote (M5 Pro, load 50 to 90 from other sessions), the 0.1.3377 build vs this one, `magpie web` in Playwright WebKit on ?view=routing, 60s, twice each: - requests: 322 and 325 a minute -> 7 and 7 (icons: 31 each per 30s -> 0) - magpie's CPU: 0.78% and 0.73% -> 0.32% and 0.32% - magpie's RSS: 225-227MB both Test: routing-acts-idle.test.cjs, in Chromium and WebKit, en, zh, zh-TW, ja, de at 1100px and en at 420px: a resting key's countdown redraws the list, and over 3.5s no icon is asked for again and each heading is the node drawn before. 14/14 pass; with client.js before this change 0/14 (each heading is a new node). Its icon count alone passes on the old code there, since page.route's replies are kept in the browser's memory cache; the real server's requests are the numbers above. Run on mote: - every GUI file that opens Routing (181 files, both engines, at origin/main |
||
|
|
7cabf0da98 |
sessions: one place says which ids a ZCode request names, and drafts are one group (#5754)
On top of Flandern1211's cherry-picked fix (the commit before this one).
GatewayKeys gave the bare id of a ZCode session (sess_<id> in ZCode's
database, <id> in the gateway's record), but NativeIDs kept its own copy
of the keys: the management page still counted every ZCode session sent
through the gateway as a gateway-only session, its delete listed them,
and its search read them a second time. requestIDs is now the one place
that says which ids a request names a session by; GatewayKeys (Sessions
list, its spend, the stats' native set, viaOf, the manage search) and
NativeIDs (the manage page's count and delete) both read it.
ZCode runs a session started without a project in a folder it makes for
that session alone: <workspaceDirectory>/draft-<id> or <ms>-<uuid>, with
workspaceDirectory = ~/.zcode/workspace (read from ZCode 3.17.2's
out/host/index.js, downloaded from cdn-zcode.z.ai; never the live
~/.zcode). The reporter's group is renamed from "Scratch sessions" to
"Draft sessions" (草稿会话 / 草稿會話 / 下書きセッション /
Entwurfssitzungen), after ZCode's own word for them, with a GUI test of
its own. Comments no longer quote "Seen through the gateway", which
i18n-keys' plugin-words guard read as the core saying the word.
Run (mote, at this tree, rebased on
|
||
|
|
a39b63e886 |
sessions: a ZCode session is listed once, and its draft folders are one group
A ZCode request names its session by the id its database gives with a prefix stripped (sess_…, a subagent's sess_subagent_agent_…: zcodeBareID, which Titles already used for names), while GatewayKeys kept only the prefixed id. MergeExternal therefore matched no native session for any ZCode session sent through magpie's gateway, and each was a row under its folder and again a row under "Seen through the gateway" with no files behind it. On this computer's database (1,105 sessions, 3,536 gateway records) that was 70 of 70 gateway rows: 38 top-level sessions, 9 forks, 23 subagents. A group already holds its forks' and subagents' files (ocRoots), and assembleListed counts every file's calls in the row, so each of the 70 counted the same calls a second time. GatewayKeys now gives the bare id of a ZCode session and of its forks and subagents; externalAdded reads GatewayKeys instead of keeping its own copy of the keys in pairs; idInFile names ZCode, so subIDs collects the ids their own rows give (their files are in the group, no row lists them apart). The Sessions page draws a ZCode session whose folder ZCode made for that one session (~/.zcode/workspace/<draft|time>-<uuid>, one for each session started without a project) in one "Scratch sessions" group after the projects: 42 of them here were 40 folders of one session under Other folders, and they are no projects of the reader's. cwd, files and usage are untouched; a row's tooltip gives the folder it ran in. The list went from 1,286 rows to 1,216 over the same 1,213 native ones; the 70 gateway rows had 34.3M input and 2.59M output tokens and $125.66 of the ledger's cost on top of the rows that already counted those calls. A ZCode row now prices its own calls from the catalog like every other agent's, and Usage keeps the ledger's figures. Run: - go test ./internal/sessions -run 'TestZCode' -count=1: ok. - go test ./internal/gui -run 'Session|Gateway' -count=1: ok. - go build ./...; go vet ./internal/sessions: ok. - gofmt -l; git diff --check; node --check on client.js and i18n.js: clean. - go test ./internal/sessions -count=1: the same failures as without this change (TestAgySessions, TestAgyRowOnly, TestAntigravityAppFolder, TestCCListingKeepsItsNames: path separators and allocation counts on this Windows box). - go test ./internal/gui -count=1: the same failures as without this change (lody's %AppData%, pageservice's symlink privilege here). Broken by hand: - dropping the bare key puts the 70 rows back under Seen through the gateway (TestZCodeGatewayRowIsTheSessionItself fails); - leaving ZCode out of idInFile keeps a fork's and a subagent's own rows as gateway rows while the group already counts their calls. Not changed: the scratch group is worked out on the page (client.js), so Usage's folder filter still lists the draft folders by their paths; the group is ZCode's only, and other agents' per-session folders are left as they were. |
||
|
|
2b8ad61468 |
routing: a group's header counts its members on, not who one request was held to
adorable_piglet on Discord: the group magpie found for GPT-6 Astra, In order, three of its five members on (two on providers switched off), read "GPT-6 Astra · routing group · 1 on" over a Codex request answered by one member. The header counted the request's order, who that one request was weighed among. A conversation held to one member (native compaction, Strict, a sealed task, a key's models) has an order of one, so the group read as having one on. It now counts the route's group.members (GroupRef: the group's ready members as the request came); why the request went to one alone stays the first line's to say. Routing itself was not at fault: a gateway repro with five members, two providers off, routed In order over all three on. Run on origin/main |
||
|
|
f5f68b4335 |
routing: with routing groups switched off, their sidebar tab goes
yyddbds (Discord) turned Routing groups off in Plugins > Built-in and the sidebar still showed its tab. The tab was tagged with the routing plugin only (data-feature="routing"), so only switching Routing off hid it. It is now tagged "routing groups", like Routing's own "Routing groups >" button and the two "Make a routing group" buttons. The page also holds each provider's accounts and keys (pools), which stay editable with groups off. So with groups off: - ?view=groups, or a page open when groups are switched off, opens Routing (offView in app.js), not Agents; - the groups' section moves under Routing's requests, with the "turn on routing groups" note and the pools; turning them on opens the groups page again and moves the section back. Every other sidebar tab (sessions, library, routing, gateway, usage, masking) was already tagged with its own plugin; only groups was wrong. Run, on mote (macOS 27): - routing-groups-off.test.cjs (rewritten: 1200, 900 and 420px, both engines, every language): 12 of 18 red on the old code, 18 of 18 green on this one. - routing-groups-off, builtins, sidebar at the rebased head 3930a3917: green in Chromium and WebKit. - Whole GUI suite at the old base |
||
|
|
ff7d84b9b2 |
gui: a built-in's switch, settings and page lead to each other (netube99 on X)
netube99 (X, 2119721422918742222): masking is switched on in Plugins ›
Built-in, set in Settings › Privacy and seen in Insights › Masking, and
none of the three leads to the others. Web search had the same split.
One pattern for every built-in whose switch, settings and page are apart:
- pluginrt.Manifest.SetAt ("privacy #redactList") says where Settings has
its settings: redact, search, gateway and otel set one. builtins.go
sends setAt and page (its nav.page Part).
- Its Built-in row (featGo): "Settings › <tab>" and, while on, its page
("Masking"). No settings link while off when those settings hide with
the plugin (Observability).
- Its settings, while off (featOff): a first row "Off in Plugins ›
Built-in", what being off means, and Turn on. Privacy and Web search
use it; search's own off row went.
- Insights › Masking's head: "Settings › Privacy", unless Turn off
already goes there. At 600px and under its buttons wrap below the title.
- docs/subsystems/plugin-runtime.md documents SetAt.
Proposal for the owner, not built: give each feature one home with its
switch, settings and page together. This commit only links the three.
Core budget: no raise. +~1.9KB of code is paid for by shortening six
app.js comments (logo mask shelf, copy, sidebar, account models,
fitSend, the hold room).
Run on mote at fe672ce69's tree (origin/main
|
||
|
|
f2ac9ae357 |
gui: web search's three places say what each does and point to the others (netube99 on X)
netube99 (X, 2119707804370084128) couldn't tell how web search is set up:
Plugins › Built-in has a Web search switch, the Library offers search
MCPs, and Settings › Models has Web search, and none of them names the
others.
- Plugins › Built-in, Web search: while on, the row says what it
searches with ("Searches with Tavily → Brave"), or "Nothing to search
with yet" in the warning colour (builtins.go searchesNow, featWho.search).
- Settings › Models › Web search: off, its first row says so and turns
it on.
- Library, a search MCP's card: says agents call it with its own key,
and links to Settings for magpie's own search.
Tests for this commit (TestBuiltinSearchSaysWhatSearches,
websearch-places.test.cjs) come in the next commit, which generalises
the off row and the links. The record for both is there.
|
||
|
|
b475004d52 |
library: Pi's extensions and packages, switched and copied between Pis
leokon3 runs Pi on Windows and in WSL and asked for magpie's Library to manage Pi's extensions and packages. A new "Pi packages" tab in the Library lists each Pi here (this computer's and each WSL distro's), with the extensions and packages it loads, read by Pi's own rules (@earendil-works/pi-coding-agent 1.4.0). Each has a switch, written as `pi config` writes it, and a "Copy to…" menu for the other running Pis. - A package is copied as its settings.json entry; Pi installs it itself when it next starts. node_modules is never copied. A local package, and one the other Pi already has by Pi's identity (npm name, git host/path), is refused. - An extension file or folder is copied as files, without node_modules, .git or symlinks, never over one of the same name. The page says to run npm install there when it has dependencies. - A package that already picks some parts (filtered in `pi config`) shows its switch disabled. A settings.json that can't be parsed lists nothing and is never written; a stopped distro is never started; every write is backed up first. - GET/POST /api/library/pi, POST /api/library/pi/copy (notYet in the CLI parity list, stage 3: the library). Run at 29d63e2dd (this tree on origin/main c7ebb6f8d; rebased after onto |
||
|
|
9edc6506e0 |
routing: a group's editor folds what few change under Advanced
The owner found the Add group form too long. Name, In agents' lists, Models, Accounts, Rules and the classifier stay in the form; Patterns, Model lists, Routing, Rate limited, Slow to start, Every member busy, Context, Stays, Effort and Levels move into an Advanced fold (details.more, as the provider editor's). It opens by itself when the group sets any of them, remembers being opened or closed while the editor is up, and Save opens it when a typed pattern is invalid so the focus lands on it. The fold's inner grid takes the editor's label column (--ed-lab), so its labels line up with the ones above; without it English sat 30px off (group-editor-fits caught it), and at 520px and in the web layout it stacks like the rows above. edAlign now sets --ed-lab/--ed-at only when they change, and in an open fold a later change waits a frame (a closed fold only moves its chevron and follows at once): opening the fold re-measured inside the ResizeObserver callback and routing-rows-fit failed on "ResizeObserver loop completed with undelivered notifications". The GUI tests that edit those rows open Advanced first (openAdvanced in group-context, -unlists, -first-token, -patience, -defaults, -editor-align, -from-model-add); group-editor-align measures the fold's labels too. Run (Linux, WSL magpie-desktop, Chromium + WebKit, 5 languages): - the 34 GUI files red in a first run plus group-editor-fits and group-editor-selected, at this head rebased on |
||
|
|
dc098c1e82 |
library: a skill from a folder follows GitHub once installed from there (biubiu8802 on X)
biubiu8802 (X, 2119602075864903924) downloaded a skill from GitHub and put it in the Library from its folder, so it had nothing to update from and no way to link it to GitHub. Installing it from its GitHub link now links the two, the way an update of a CC Switch skill already does: the library's skill by that name takes GitHub's files and GitHub as its source. A check and an update cover it from then on, and the agents' links keep pointing at it. When its own files aren't GitHub's, they go to the backups like UpdateSkill's replace does, and the result says so. A folder of the user's it was linked to stays as it is. followsHere (skill_link.go) decides it. It links only a skill with no remote source that wasn't renamed and is that skill: it traces to this repository (CC Switch, the skills CLI's lock, a git checkout, From), or it traces nowhere and its SKILL.md has the same description as GitHub's, as an older download of it does. One traced to another repository, or an untraced one that describes something else (mora1n's case, TestInstallSetPutsAnotherByTheSameNameBeside), still goes in beside it (skill_beside.go). A had skill with the same files and no source is bound to the GitHub source it was found in, so a later install of another repository's skill by that name goes beside it, not over it (TestSameFilesByNameAreHad). The probe marks such a candidate links:true. The GUI's Add list tags it "links to GitHub" with a tooltip, and the report names "updates from GitHub now" and "files of their own kept with the backups". The TUI's probe list and result line say the same. The new strings are in zh, zh-TW, ja and de. Run on mote (macOS), on |
||
|
|
a912cdc369 |
routing: the groups page's Select and New group no longer touch
The groups page's toolbar row has gap 0, so Import, Select and the filled New group sat edge to edge: Select's hover met New group's fill (the owner's screenshot, 11-08). The buttons right of the spacer now stand 4px apart, New group 8px. Run at this head (rebased on |
||
|
|
4fac4c863b |
library: a long "In your agents" list shows its first 5 rows
The owner's Skills page listed 52 skills found in the agents, three lines each, and the list took the whole page. A list of more than 7 now shows its first 5 rows and "Show 47 more" under them; the click shows every row and "Show less" folds them again, for the session. Select shows every row to pick, and Bring in all still takes every one. MCP servers found in the agents fold the same way. Run on mote at |
||
|
|
2a64b4bcb7 |
library: a skill router, one magpie-skills skill listing an agent's skills
Like the MCP router, for skills. With the Skills tab's new "Skill router" switch on (off by default), each agent's skills folder gets one skill of magpie's, magpie-skills, in place of a link of each skill ticked for it. Its SKILL.md lists them, each with its description and the path of its SKILL.md, and the agent reads that file when a task fits. An agent then carries one skill's description in its prompt however many the Library gives it. - The entry is a link to <settings dir>/skill-router/<hash of the folder>/, which holds SKILL.md and a hidden .skills/<name> link of each listed skill (hidden, so Codex, OpenCode and Pi don't find a skill twice). Its description stays within 1024 bytes (Codex's limit), cut on a whole character. - Every skill is listed unless it is kept direct (a button on the skill, or `magpie library skill router <name> direct`; carried by a sync), is only for the user to type (disable-model-invocation), is in ~/.agents/skills, is blocked, or the agent has its own by that name. Those keep their own links. - An agent whose folder can't take it keeps every link, and the page says why: given copies, a live agent picking its own, the shared ~/.agents/skills, a Library skill called magpie-skills, or a magpie-skills of the user's (never written over). - Claude Code 2.1.316 asks before reading outside its project, its skills folder too, so magpie adds Read rules for the entry and the folders behind it to permissions.allow, records them, and takes out only its own when they go (as permissions.deny does). - The switch is this computer's alone; `magpie library skill router on|off` sets it from the CLI. - Sessions count a routed read of .skills/<name>/SKILL.md as <name> (Claude Code, Alma, Droid), and calling up magpie-skills itself as no skill, so a use counts once. - docs/subsystems/skill-router.md, with a row in the index. Run at this tree (rebased on origin/main |
||
|
|
4f3ec591ae |
browser: an extension older than magpie's is to be reloaded, says the sheet and the agent
magpie rewrites the extension's folder when an older one connects, but Chrome runs what it loaded until the extension is reloaded on chrome://extensions or the browser starts again, so a user who never does either stays on the old code. Now that is said: - Library → Magpie Browser: under "Connected to your browser · 0.1.8" a line says "Magpie Browser 0.1.9 is ready: reload Magpie Browser on chrome://extensions (edge://extensions in Edge)." Looked at from another computer (the zip install), it says to download it again, unzip it over the old folder and reload it. /api/library/browser has outdated. - The agent: the first browser answer on such a connection starts with a line telling it to have the user reload it (or download it again, for one connected with a gateway key). Once a connection. The extension still isn't made to reload itself: an unpacked one that calls chrome.runtime.reload() doesn't come back (the finding in browser.go's hello). The fake extension in the gateway's tests now says magpie's own version (it said 0.1.0, which every test would now be told about). Run (on mote): - internal/gateway TestBrowser* (new TestBrowserSaysTheExtensionIsOlder, TestBrowserSaysNothingOfACurrentExtension), ok. - internal/gui TestBrowser* (new TestBrowserStateOutdated), ok. - GUI: library-browser-setup, library-browser-away, library-browser-ask, browser-access, i18n-keys in Chromium and WebKit, every language, at 1100 and 420 wide: 127 of 128. The red is i18n-keys "a plugin's words are its own" for three keys this change doesn't touch, red on main and filed (#5332, #5482, #5426). - go vet for darwin, linux (nogui) and windows; gofmt -l clean. Broken by hand: - the once-a-connection check removed: TestBrowserSaysTheExtensionIsOlder red ("s1's next answer" has the note again). - the sheet's line never shown: library-browser-setup red, 20 of 20. - Outdated without Connected: TestBrowserStateOutdated red. Not tried: the whole GUI suite before this push (run next), and a real Chrome with an older extension loaded by hand. |
||
|
|
f99ad62a9c |
routing: the magpies fly over the cards again, off their words
The owner, 11-09: "鸟要在卡片上面". Since |
||
|
|
54af4357c3 |
usage: the agent filters show each agent's icon
The owner: Usage › Requests' agent menu listed names alone ("这里应该有
Agent的icon"). The ledger's agents already carry their icon (usageapi
Named.Icon), so the menu now draws it beside each name: an agent's own
logo, the generic one for a client magpie doesn't know (AsyncOpenAI,
Go-http-client). Sessions' agent menu does the same, from a session's
icon or, for an agent with none listed, the agent magpie knows. The
shared menu (openSessCombo) draws icons only when its options carry
them, and keeps the room blank on the All row, so every name starts at
one x; the other filters (models, folders, providers...) are unchanged.
usage-agent-filter-icons.test.cjs opens both menus in Chromium and
WebKit, en and zh: each row's icon, the All row's blank room, names at
one x, each icon on its name's line, and the search narrowing them.
Run (mote, at
|
||
|
|
82ca554be9 |
routing: a provider's accounts routed In order give a conversation back to the first
CryptoSarom on X: with a provider's accounts set to In order, a
conversation that had moved to the second account (the first was
resting) stayed on the second once the first was ready again. Only a
group's members went back to the first; a provider's own accounts never
did, because inOrder was read from the group's routing alone.
- gateway.go: inOrder comes from the provider's routing, or the group's
when the request is to a group.
- affinity.go: backToFirst compares accounts (who()) for a provider's
own accounts. For a provider it overrides only a cache that would have
kept the conversation (cacheHolds: worth keeping and still warm), so a
cold or empty cache keeps its own "cold"/"new" label.
- plugin_factory_cap_test.go: "auto, cached on B" pinned the old
stay-on-B behaviour; it now expects A, the first account, on purpose.
- GUI: the Routing affinity line for "order" without a group says the
provider goes in order and the first is ready again (all languages).
- docs/subsystems/gateway-routing.md: the In order bullet covers a
provider's own accounts.
Run on mote at this tree on aa3d11d5b; rebased onto
|
||
|
|
50eec4994a |
routing: with motion reduced, a request in flight fades instead of standing still
vantiboolean (Discord, v0.1.3327, Windows app): the Routing page "lost its animation". The screenshot: Codex, round-robin, two accounts both "answering another request…", the wires dotted and nothing moving, no bird. That is the page with motion reduced. WebView2 reports prefers-reduced-motion when Windows' "Animation effects" is off, and Settings' Reduce motion does the same in the page. Then the flowing wires' dashes, the held dot's fade and the bird all stood still, so a request in flight looked the same as one that was over. This was so before |
||
|
|
f418edffc3 |
sessions: a session's details show how full its context was, request by request
liang_yongxiang on Discord: Routing tells how full one request's context window was; does Sessions have the same, each turn's share? A session's details on the Sessions page (and in Usage's Sessions list, which draws the same details) get a Context line when the gateway sent calls of it (s.via): the Context tab's spark of its prompts, request by request against its window, and the fullest one's share beside it, toned as the tab tones it. A point's tip says "Request 2: 80K of 200K (40%)" (the tab's spark says it too now, where the window is known); a point clicked opens that request in Routing with its card. A session the gateway never saw asks nothing; one it kept no prompt of shows no line. The data is the routing history the Context tab already reads. A new GET /api/context/session?agent=&id=&from=&to= reads only the days from the session's first to its last (30 at most), through the tab's per-day cache (daysRecsLocked, split out of contextRecsLocked, so the tab's cached days are not evicted), and keeps that one session (contextOfRecsFor), with up to 1000 of its requests. The tab keeps the latest 80 sessions and would leave an older one out. Subagent and side calls are left out as the tab leaves them out; the same id under another agent is that agent's. The line's code is in plugins/usage/page.js (sessCtxLine). context.js only exports spark and health, and pays for its tip by cutting comments, so the core's scripts are 10 bytes under main's, no budget raise. Run at this head (rebased on |
||
|
|
e215d335a6 |
gateway: a gateway key can cap its requests at once; the rest wait their turn
young02036 on Discord: a provider can be given a concurrency, so why
can't a gateway key? A key now has an optional MaxConcurrency, from 1
to 1000. Left unset (every key today), nothing changes.
- access: Key and Change get MaxConcurrency, and Identity carries it, the
issuer's cap included. The concurrency-key action refuses a value
below 0 or above 1000.
- gateway (key_slots.go): every route that asks a model is held to the
key's cap, however the request came (loopback, LAN, a Remote magpie, a
Responses socket's turn). One request too many waits in the key's
queue in arrival order. It shows as "slot" in Active, and its wait goes
into the try's Queued. A request whose agent goes away while it waits
leaves the queue and sends nothing. A stream holds its slot until it
ends. serve's routes (chat, responses, messages, ollama, gemini, the
Codex backend) wait inside the try, after keepQueued, so a streaming
agent gets keepalives while it waits. The other model routes (images,
embeddings, rerank, audio, videos, search, decisions, native) wait
before their handler runs. forward and codexUpstreamOn take the slot
too, so nothing reaches a vendor without one. A key issued under
another waits for its own slot, then for its issuer's.
/v1/magpie/concurrency lists each capped key under "keys", and counts
its waiters in "waiting". A key's limit (key_limit) reports the cap.
Not held, as a provider's MaxConcurrency doesn't hold them: GET,
HEAD, OPTIONS, count_tokens, :countTokens and MCP.
TestKeySlotEveryRoute fails when a route is judged neither held nor
free.
- cli: magpie gateway-key concurrency <id> [<n>|off]. It refuses 0, a
negative, over 1000, a fraction, a word, --help or an extra argument
with its usage.
- gui: the key row gets a badge in the provider concurrency badge's
style. It opens the app's menu with No limit, 1/2/3/5/10 and Other…,
and Other… takes a number typed in place. A value that isn't a whole
number up to 1000 is refused and nothing is sent. Browser and
read-only keys have no badge. Strings are in en, zh, zh-TW, ja and
de. An unset badge, which a hover shows, gives way before the masked
key (flex-shrink 8). Without that, at 420px in en and de, the extra
badge squeezed the key until its copy button slid under the pointer
that came to drag the row, and gateway-key-arrange went red.
- docs/subsystems/gateway-routing.md describes it.
Run (on mote, at this tree on origin/main 0f8c3d867; rebased onto
|
||
|
|
eadc6cdb96 |
routing: a request with a named gateway key is drawn as that key
acezan (Discord) sent the Routing flow for an Antigravity group: a
script's requests showed only "Python-urllib", the caller's
User-Agent, on the left node. The request should be named by the
gateway key it came with.
The trace and history routes already carry callerKey (the key's id)
and callerKeyName, never the secret. The stage now groups callers by
agent plus key, so two keys behind one User-Agent are two nodes, each
in its own colour. A keyed node reads the key's name as Gateway keys
lists it now, else the name the route kept. A request with no key
keeps the agent's name, as before. The agent's icon stays, and the
tooltip names the key and then the agent. No new labels.
Siblings:
- The request rows' swatch, wire hue, the play dots and the replay
marks follow the same caller, and "Sent by" names the key.
- The tray panel's stage and its .pr-who rows name the key the same
way. The panel doesn't read /api/caller-keys, so it shows the name
the route kept; a key renamed later shows its old name there until
the next request.
- Usage already shows "agent · key name" on ledger rows and has its
own key split. Unchanged.
- The By-key and By-session group heads and the story prose ("X asked
for...") are unchanged.
Run on mote at
|
||
|
|
7a6211d047 |
providers: a model's own headers, in Model settings
axelburks on Discord: a vendor routes one model by a header of its own. A key's provider (built-in or custom) can give each model headers (settings.ModelHeaders["pid/model"]). They go on that provider's requests for that model alone, after the provider's headers and after auth: a name both have is sent once, as the model's, so a user's value is never overridden by the provider's or magpie's key header. The gateway names the model (provider.WithModel) on every route that asks one: chat on each API, translated and streamed, count_tokens, System One's decision, embeddings, images, videos and the model test. A fallback provider serving the same model id gets its own headers only. Accounts and plugins carry their sign-in's headers and take none. The editor's "Name, price and reasoning level" panel is now "Model settings" (every language), with + Add header per model, staged and made with the Save; Restore default takes them away. The rows being typed are kept out of the draft's compare, so an untouched editor still closes without asking. Broken by hand: dropping WithModel from gateway.go turns TestModelHeadersReachTheirModelOnEveryRoute red; dropping the provider id check in modelOf turns TestModelHeadersStayWithTheirProvider red. Run, on this stack over origin/main |
||
|
|
4ab1191bc9 |
routing: Routing groups opened from Routing lead back to it
Since Routing groups became a page of their own, a group chip on a request (or Routing's "Routing groups ›") switched to the groups page with nothing leading back. Without the sidebar the only way out was the tab bar, and the request you came from was gone from view. The groups toolbar now starts with "‹ Routing" (gBack). It goes back to Routing through window.show, so a dirty draft is still asked about, and focus returns to the chip or button the page was opened from. Esc does the same, except while an editor, Import, Select or a modal is open, or focus is in a text field. With the sidebar the back control shows only when the page was opened from Routing (.rt-gfrom); from the sidebar's own Groups tab the page is top level and has none. No other drill-in page in app.js binds Cmd-[, so neither does this. The label follows the language on every draw. No new layout, no accent stripe. Run (mote, playwright 1.62.0): - routing-groups-back.test.cjs (new): 30/30, Chromium and WebKit x en/zh/zh-TW/ja/de x 1280 window, 640 window, 420 web. Red on origin/main's assets (MAGPIE_ROUTING_ASSETS): no visible .rt-gback. - Broken by hand: Escape handler off -> red (chromium en 1280); the side-nav hide rule off -> red (webkit en 1280, "no back from the sidebar's own tab"). - Every routing*, sidebar*, group-*, i18n-keys, i18n-en-no-cjk, old-webkit and settings-groups file at 2d66e9f23 (main |
||
|
|
00198b26e0 |
gateway: a session's side call goes on the account its main conversation is on (#5655)
With two Claude accounts, Claude Desktop's own Sonnet calls beside an
Opus chat (desktop-beside), and Claude Code's auto mode classifier, ran
on account B while the chat was on A. Each model's conversation is kept
under its own scope (p.ID/model), so the side call was routed as a
session of its own: leastHeld, or Smart's order once its cache was cold,
put it on the account the fewest others held, and B's 5 hours drained on
calls the user never made there.
Decided (product call delegated): one session goes on one account. The
user picked one, the vendor sees one client, and the cost is one cache
write of the side call where the session goes on reading it.
withSession (affinity.go) puts first, for a request whose session a
header names, the key or account of that session's largest conversation
under another model's scope (answered within heldFor, at least
cacheWorth kept, larger than this one's own). It acts for Why first,
gone, cold, no-cache, cache and session; never mid-turn, under Strict,
for a subagent (withLead), past a rest, reserve, credits or a fallback
routing put first, nor to an account that isn't readyForNew. The trace
says Why "lead" with LeadModel, and the Routing page says "Put on
{first}, where this session's {model} is: one session goes on one
account." in en, zh, zh-TW, ja and de. docs/subsystems/gateway-routing.md
says the same.
Not fixed here: the classifier's ~110-130K cache write per call. That one
is ours too: in Claude Code's interactive mode the bridge pastes the
classifier's transcript as one block without the client's marks
(claudetui userPieces, clientCache.pasted), so only the fixed prefix
(Claude Code's system plus the appended rules, the 68,925) is read and
the rest is written again on every call. The cause and a candidate fix
are on #5585. It changes what a real Claude Code sends and can't be
checked without a real account.
Run (mote, through mote-run), at this head (aeeeed54a's tree, origin/main
|
||
|
|
2b08ccc838 |
routing: the story says why by the keys Smart sorted by (#5646)
The Routing page explained Smart's order from each window's raw reset (Weighed.Renews), while the gateway sorts by Allowance.Renewal (a credit pack's end when it runs out before the reset) and breaks hour ties by Allowance.Lapse. So a WorkBuddy account whose pack ends in 3 days was said to "renew within the same hour, so the order given stays". The trace now carries both keys (Weighed.Soon, Weighed.Lapse); renewsBy, cmpRenews, firstWhy and behindWhy compare them, with two new story lines (credits expire before the other renews; same hour but its credits expire sooner) and a row note, in en, zh, zh-TW, ja and de. "Kept in order" is said only when every key ties. A route from before soon falls back to renews and restarts. The other keys Smart reads (tier, unreached, learns, balance, use first) were already in the trace. Two accounts with one name: logoed() gave only the first its icon. Each later occurrence of the name now gets the next same-named member's own icon, so "louis and louis" shows WorkBuddy's and Zhipu's. Run (mote, via mote-run): - go test ./internal/gateway -count=1 -timeout 45m: ok (1010s), before the rebase onto |
||
|
|
b77400826a |
usage: the Overview read again keeps its cards and its place, and shows it is reading
jiabubu on Discord: a refresh of the Usage page's Overview showed nothing while it read, flashed the page and dropped cards for a moment, and pressing Usage again while on the Overview flashed it or moved its scroll. - Pressing Usage again (show() calls the plugin's open, loadUsage(true)) put the skeleton up, which hid the sections, collapsed the page and clamped its scrollTop. loadUsage now puts the skeleton up only for a first read or another period or zone (usageFor/usageKey); a page that already shows that read reads again quietly through refreshUsage, so nothing is blanked and the scroll stays. - The refresh beside the period turns while such a read is out (#usageReload.reading, after 200ms), and while every card is read (loadQuotas) each card's refresh turns (#subscriptionUsage.reading, quotaReading in page.js). A card's own busy turn is left to its own animation (:not(.busy)). No turning under reduced motion. - renderQuotas draws the cards again in one go, as their reset countdowns need, but now keeps their logo nodes (keepIcons), and the Overview's lists do too: a logo made afresh blinked out while its picture loaded. - app.js stays in its budget: a three-line comment in renderQuotas cut to one. Core 1,533,507 of 1,533,802 before the rebase on |
||
|
|
ee8f4de36c |
routing: the story's ResizeObserver waits a frame, so a wrapping Smart header isn't a loop in WebKit (#5639)
3b541a7f3's longer Smart explanation wraps to more lines at 420px. The story's ResizeObserver called holdStory, which sets the story's min-height, inside its own callback, and WebKit reported "ResizeObserver loop completed with undelivered notifications" as a pageerror. routing-order-unknown went red in webkit en and ja at 420px. The callback now does its work on the next animation frame, the same fix #3164 made for the other observers in this file. Run on mote: - routing-order-unknown, both engines: 10/10 green, de included. Before this change, webkit en and ja at 420px were red. - GUI rerun of routing-*, panel-routing* and gui-ja/de/zh-TW in both engines: 2927 pass, 20 fail. Every red is filed and fails the same at 3b541a7f3~1, or passes alone at both heads: - routing-context-fold webkit (#5586, a different observer); - routing-intent-entry (#5392); - row-swap (#3799); - story-shrinks (#3954/#4629); - routing-credits zh-TW, under load (#5161, commented); - routing-pulse-composited webkit light, under load (#5647, new). - internal/gui Go package: ok. Not changed: routing-context-fold's own observer (#5586). Refs #5639 |
||
|
|
f4179b7812 |
routing: Accounts & keys in columns keeps each provider's rows under its own name
The owner's screenshot (这里的布局直接崩坏了): below 1150px the accounts list flows in columns, and a provider's accounts ran on into the next column with no heading over them, while the line meant to part two providers stood over a column's top. Each provider's heading and rows are now one box (.rt-pgrp) that doesn't break; one with more than 12 rows may, but its heading stays with its first row. The parting line is between two boxes and is dropped in columns, where the column gap parts them. Run (mote): at |