ac4af582301a4e8a29245dbba767eba31334ddf9
40
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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.
|
||
|
|
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 |
||
|
|
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. |
||
|
|
25b201eb67 |
library: the Skills and MCP headings keep Select and put the rest under ⋯
ryanpascal on Discord: the Library › Skills heading had too many buttons, up to a dozen beside the sort. The heading now shows the sort, Select, Clean up and Update n when they apply, and a ⋯ (the app's row menu, openRowMenu) holding Check for updates, Update all, Group again, Collapse all / Expand all, Turn all on, Turn all off, By agent, Manage n in magpie and Remove all, in that order with separators. The MCP servers heading does the same with Turn all on, Turn all off, By agent and Remove all. A busy action stays in sight on the bar (Checking…, Grouping…, Updating…), so the wait is seen. Each menu item is the old button: its words, its title, greyed when it was, its click; Remove all is red as it was. No new words: ⋯ is the core's "More". barMore builds the menu from the buttons as they are when ⋯ is pressed, so a count or a greyed state is never stale; a hidden button is left out and the ⋯ itself is hidden when nothing is left. The tests that pressed these buttons on the bar (by-agent, every-skill, github-token, library-gone-agents, library-null-agents, library-servers-bulk, remove-all-skills, skill-fold-all, skill-git-source, skill-handover, skill-new-in-repo, skill-regroup) now open ⋯ and press the item. docs/subsystems/library.md says where the buttons are. Run (mote, through mote-run): - node --test library-bar-more.test.cjs: 22 pass (en, zh, zh-TW, ja, de at 420 and 1180 px, Chromium and WebKit): nothing moved is on the bar, ⋯'s label, one line at 1180, the menu's items and order in each language, the menu inside the window, a second ⋯ closes it, Turn all off's sheet, Check for updates posting once, the MCP heading's menu, no sideways scroll. - the 12 updated files plus library-bar-more: 176 pass before the usage fix below, the 22 reds all library-bar-more's (its second ⋯ click eaten, the cause fixed in the commit before this; then the wide window's tabs, which are the side nav's, fixed in the test). - skill-manual, list-sort, skill-gone, skill-update-edited, skill-how, library-hooks, library-pick-remove, library-row-remove, menu-first-second, i18n-keys, i18n-en-no-cjk: 127 pass, 1 fail, the "a plugin's words are its own" red that origin/main |
||
|
|
de0f5691a8 |
library: a Remote magpie's MCP server says why it isn't synced, its switch held off
treeman_26897 (Discord), on v0.1.3135: the MCP server added from a Remote magpie can't have "Sync to your other computers" turned on. That is meant: the server holds this computer's key for that Remote magpie and goes with the provider, so adoptBridges keeps it Local. But the editor showed a live switch: it turned on, Save took it, and the next read put it back off, with nothing saying why. Now a server with a bridge has the switch off and held (aria-disabled, a click does nothing), and the field's hint and the row's "Not synced" tag say "Added from a Remote magpie with this computer's key for it, so it stays on this computer", in every language. A server edited to another address or key is the user's own (keptBridge drops its bridge) and its switch works as any other's. Nothing changes in Go. Run (mote, at this tree): - node --test mcp-local-server (Chromium + WebKit, en zh zh-TW ja de, 1100 and 390 wide): 22 of 22 ok. - node --test i18n-keys: ok but "a plugin's words are its own", red the same on origin/main and filed (#5332, #5426, #5482; none of its three words are this change's). - node --test library-mcp-*, mcp-*, library-all, library-items, library-servers-bulk, library-toggle-status, old-webkit: 480 of 480 ok, both engines. Broken by hand: origin/main's library client.js under the new test: red in every language at the tag's title ("Sync never carries it to your other computers") and, with the hint and title checks taken out, at "a click doesn't turn it on" ('true' !== 'false'). Not tried: the real app with a real Remote magpie's server; the test fakes /api/library with a bridge server. Reported-by: treeman_26897 (Discord) |
||
|
|
50265256ba |
library: a note on a skill or an MCP server, the library's own (youyo.p_10001)
youyo.p_10001 on Discord: with many skills and MCP servers installed, you can't tell what each is for or which to use. A skill has the description its author wrote for models, often in English and about what it does, not why you installed it. An MCP server has nothing but its command and its tool list. So each now takes a note in the user's own words. - Server.Note and Skill.Note in library.json: one line of at most 200 characters, whitespace run together (checkNote), as a hook's description (#2011). A longer one is turned away, not cut. - The server editor has a Note field under the name. A skill's reader (2a19043af's file reader) has one over its files: Save shows once it changes, saves the file being edited with it, and a changed note is asked about before the dialog closes. SkillNote, POST skills/note. - A row shows the note in place of its command or description, so rows keep their height; the tooltip gives the note, then that line. The skills' filter matches notes. - No agent is given a note: not in any agent's MCP entry, a project's file, the MCP router's list or a skill's copied SKILL.md. - A sync carries it (CarriedSkill.Note; a server goes whole), and clearing it is carried too. An older magpie on another computer doesn't know notes: a bundle it writes has none, so a sync from it clears them. The TUI's server editor keeps a note as it was. Run at the pushed head: Run at the pushed head (on origin/main |
||
|
|
a80575cc86 |
library: an MCP server's command wraps, and the editor shows the server as JSON (hema_17384)
hema_17384 on Discord: in Library > MCP servers, the editor's Command
field was one line, so `npx -y universal-db-mcp --type sqlserver --host
... --user sa --password ... --database ...` was cut off, and they asked
to see and edit the server as JSON.
- The command is a box that wraps (lineBox, a textarea of one row that
grows with autosize). It is still one line: Enter saves, Escape
closes, and a newline is a space between words (a shell's \ before it
too, except on Windows, whose lines keep their backslashes). At 390
wide it wraps over several rows; nothing scrolls sideways.
- The editor's head has a Form | JSON switch (the app's segmented
control, not a <select>). JSON is the server as Copy config gives it
for Claude Code: {"mcpServers": {name: {type, command, args, env}}},
or {type, url, headers} for a URL, with ${NAME} references as written.
An edit there is read as a paste is (serversIn) and becomes the form's
at once. JSON that isn't one server's marks the box invalid, says so,
and keeps the dialog from saving or going back to the form, and
counts as unsaved for Cancel. The agents, sync and the startup
timeout and OAuth app stay in the form and are kept as they were.
⌘/Ctrl-Enter saves from the box; a paste into it is the box's, not
the dialog's "paste a README's JSON".
- Strings in en, zh, zh-TW, ja and de.
Run at the pushed head (on top of the note commit, which shares these
files):
Run at the pushed head (on origin/main
|
||
|
|
c0dd5838c2 |
library: the write-failure card can be hidden until a new failure (#3745)
Zachary-wW (#3745): the Library's "Some of the Library couldn't be written" card had Try again and nothing else. Their Grok Build has an AGENTS.md magpie can't stat, and every change writes every agent again, so the card stood over the page through every edit on the Instructions tab, with no way to put it away. The card has a × beside Try again now, named "Hide until something new can't be written". It hides the write failures the card lists, on every tab, and sends nothing. The page keeps what was hidden by agent and item ("grok" and "instructions"). After every answer, a read or a change, it lets go of a hidden failure that no longer stands, and a failure not hidden brings the card back with all it lists; so does a hidden one whose item was written in between and fails again. So the card stays hidden while the reporter keeps editing, though each change fails on Grok Build's file again, and a new write error shows it again. The key is not the error's text: a write goes through a temp file named anew at each try (edit.WriteAtomic), so a folder that can't be written fails with a new text at every sync, and the card would never stay hidden. Meanwhile each change's toast still names what failed, as before, and a skill that couldn't be given keeps the dot on its agent's chip. The list magpie keeps (lastProblems) is not touched. The × is named by its title, as the Library's other × buttons are. An agent's own skills in the library's way are the agent's to settle, not failures: they stay, under their own title, with no ×. The view keeps its scroll as the card goes, as render() keeps it for Try again; Chromium's scroll anchoring moved it. From the keyboard the focus goes to the card's next button, or to the tab open. On a phone the × is 44px wide and as tall as Try again. The card's title keeps its words whole: with less than 10em beside it, Try again and the × go to a line of their own (beside them, a German title at 320px broke "Bibliothek" and "geschrieben" inside). library-problems-hide.test.cjs is new. Its API answers as internal/gui/library.go does: a change's problems are its full sync's, an Instructions change keeps the rest and puts its own in, and a read gets the list with no result. Its error texts are the ones magpie's own sync gave in a sandbox HOME, through Handler in a scratch Go test (not kept): Grok Build's AGENTS.md a link into a folder magpie can't search, its folder read-only, and its skills folder read-only. Not covered: what was hidden lasts as long as the page, so a reload shows the card again. The × hides, it doesn't fold: while the card is hidden, its error texts and Try again are out of reach, though any change writes every agent again. An agent's instructions, and its whole MCP file, have no mark of their own as a skill's chip has, so with the card hidden only a change's toast names their failure (#3987). What was run (tree f98a4b99, on origin/main |
||
|
|
00098f12bf |
library: Magpie Browser's "which agents may use it" is a line of its own under its row
tao0194 on Discord (v0.1.2828, zh, panel-width window): in Library > MCP servers the magpie-browser row showed the connected ask (green dot, the question, a button per agent) inside the name's column, wrapped into a narrow strip between the command and the row's Scope and agent chips, three lines tall beside every other server's two. browserAsk's element was appended to the row's .who. It is now the row's own child: the row gets lib-asking while it shows, wraps, and the ask takes a line under the name, command and chips, from the name's left edge (the picture plus the row's gap, 37px, 38px in the window's rows) to the row's right edge. The first line keeps the name, command and chips as the other rows have them (.who flex-basis 0 above 560px). At 560px and under, where rows already wrap, a long command now ellipsizes beside the row's picture instead of taking the name to a line of its own under it; that was so for any server with a long command, and the ask's left edge follows the name. docs/subsystems/library.md says where the ask sits. library-browser-ask.test.cjs now has three agents (Codex, Zed among them) and a context7 row beside it, runs at 1100, 600, the panel's 440 and 360, and checks the ask starts under the first line, at the name's left edge, reaches the chips' right edge, that the first line is as tall as another server's, and that the name sits beside the picture. Run (mote, Playwright 1.62.0, Chromium and WebKit, en/zh/zh-TW/ja/de): - library-browser-ask.test.cjs on the old client.js/library.css: 42 of 44 red (every layout subtest; the two not-connected/given ones pass). With the change: 44 of 44 green. - The 84 GUI files that open the Library, name lib-row/lib-server or library.css, or check budgets and i18n keys: 1480 of 1480 ok, before the rebase onto |
||
|
|
2a19043afc |
library: a skill's files are read as Markdown and edited in the page (refeccd)
refeccd on Discord kept skills in ~/.agents/skills, handed them over to
magpie ("let magpie manage"), and then had nowhere to edit them: the
Library's skill view showed SKILL.md as raw text with no way to change
it. There never was an edit path; this adds one.
- GET /api/library/skill takes `file` and answers library.ReadSkillFile:
the file (SKILL.md by default), its text, the skill's folder and its
text files (UTF-8, no NUL, up to 1 MB each, 200 listed, SKILL.md first;
links, hidden folders and what installing writes left out).
- POST /api/library/skills/save {name, file, text, was} is
library.SaveSkillFile, through change(): it writes only a regular
file already in the skill's library folder (no .., no absolute path,
no link, no folder that is a link out of the skill, nothing under
node_modules/.venv/…), refuses when the file no longer holds `was`
(the text the page opened), keeps CRLF line ends, and writes with
edit.WriteAtomic. The sync after it reaches every agent: a linked
one reads the library's folder, a copy is made again. A copy edited in
an agent before the save is older, so takeEdits sets it aside in the
backups. A GitHub skill saved here reads as Changed here, so an update
asks first.
- The page (viewSkill in plugins/library/client.js) draws a Markdown
file with the Plugins page's own renderer (plugins.js exports it as
window.mdRender, 27 bytes of core script) and its front matter as
rows; other files as text. Edit swaps in a text box; Save or ⌘S/Ctrl+S
sends it; Cancel asks when there are changes. Other files are the
app's menu under the name (no native select). New code is in the
library plugin, so the core script budget is not raised.
- SkillText is gone (its only caller was the route). One new string, in
all five languages. docs/subsystems/library.md says all this.
Run on mote at the change rebased on
|
||
|
|
987e019d44 |
library: a skill off on this computer has room for its description and path (Tao)
Tao (tao0194, Discord #feedback, with a screenshot): in Library -> Skills, handoff from mattpocock/skills showed "Off on this computer" (本机已关闭) on a line under its name, and its description and the mattpocock/skills/tree/HEAD... path line were cut off. grill-me beside it, on, showed all three lines. Cause: the windowed skill list holds each row to a fixed height (51px, or 67px with a source) and counts its room from that. |
||
|
|
679bc412cb |
library: Magpie Browser's row asks which agents may use it, once connected
Magpie Browser is added with no agents (opt-in), so the router offers it to none until one is ticked, and an agent asked to use the browser reached for AppleScript instead. While its extension is connected (GET /api/library/browser, read again every 3s while the row is shown, so connecting it needs no reload) and no agent has it, its row asks "Which agents may use it? They act in your tabs, signed in as you are.", a button per agent that clicks that agent's chip (servers/agents, as a chip's click). Once one has it, the row asks nothing more. Not connected, or given to an agent already, it asks nothing. Run on mote at this head ( |
||
|
|
e44ad72cfd |
gui: a failed status dot is an x, not a red dot alone
coolmantou on Discord (#feedback), who is red-green colour-weak, could barely tell the green status dot from the red one. Under a deuteranopia or protanopia simulation the two are one olive colour, in light and dark. Making the green lighter would not help a greyscale or protan reader, so the failed state now says it by shape (Apple HIG: never colour alone). What changed - app.css: a --x-mark token (an SVG x, used as a mask). Each failed dot keeps its red and its 6-7px box, is drawn through the mask and scaled 1.5 so it reads as heavy as the round dot. Layout is unchanged. Dots: Test models (.tdot.bad), an agent's status (.ag-st.bad .ag-dot), the check-in (.ci-dot.bad), the request ledger (.led tr.bad .st .dot). - routing.css: a try or probe (.rt-req/.rt-probe.bad .to i), a step (.rt-steps li.bad::before), the preview (.ps-dst.bad > i). - library.css: a server that failed (.lib-health.err::before). A ring was not used because "not checked" is already a ring there (#2308). - Not changed: green-only dots with no red pair (gateway, keys, tiles, live), chart markers, routing's animated packets, redact's categorical facet dots. The tray has no status dots of its own. - docs/subsystems/gui-shell.md says it beside "State is shown with a dot". Tests - status-dot-shape.test.cjs (new): for all 9 pairs with the real stylesheets, in chromium and webkit, light and dark, 980 and 420 wide: the good dot has no mask, the failed one has the x mask and the good one's box, and its pixels have ink on the arms and centre and none above the centre. - library-mcp-health.test.cjs: its "a dot, not a stripe" check now expects the x for a failed server and a round dot for the rest. Run at the pushed head (mote, via mote-run) - status-dot-shape + library-mcp-health: 16 pass, 0 fail (chromium and webkit). - go test -run 'Asset|CSS|Budget|Compress|Revalidate' ./internal/gui: ok. - At |
||
|
|
e42ee3b816 |
library: Magpie Browser's extension sits in ~/Magpie Browser Extension, dragged from the sheet onto chrome://extensions
The owner, on the v0.1.2442 sheet: the extension was written to ~/.config/magpie/browser-extension, a hidden folder no one can find to choose in Load unpacked. - Set up writes it to "Magpie Browser Extension" in the home folder (browserExtDir), where Finder and Explorer show it, and shows it selected in its parent (open -R on the Mac, explorer /select, on Windows, the home folder on Linux) rather than opened, to drag from. - On the Mac the sheet has the folder itself: a press on it that moves hands the folder to the system's drag (POST /api/library/browser/drag, filedrag_darwin.go: beginDraggingSession from the key window with a file URL and the folder's icon, only while the button is still down), so it drops onto chrome://extensions as from Finder. Chromium's extensions page loads a dropped folder as unpacked (drag_and_drop_handler.ts: entry.isDirectory -> loadUnpackedFromDrag), with Developer mode on, which step 2 asks for. - Elsewhere step 3 says to drag the folder from the window that opened, or Load unpacked and choose it. - Old installs: a browser that loaded the hidden folder still does, and that folder is kept up to date as long as it has a manifest; the sheet offers set up again, into the new folder. Run at |
||
|
|
df0320156b |
library: the skill market offers every skill skills.sh lists, 60 at a time
The owner: the Library's markets had too little in them ("这两个市场的
东西都太少了"). The skill market showed at most 60, four a repository.
Now it offers every skill on skills.sh's front page (its 600 most
installed), then each one on its trending page that isn't there, with no
count of installs: trending counts recent installs only, so the card
shows none rather than a wrong one. A repository's first skill comes
before anyone's second, so the first page still isn't one author's, and
nothing is cut. A search asks skills.sh for 200, not 40. The snapshot
magpie ships with has the same 772.
The page shows 60 cards and a "Show more (N left)" button that adds 60
under them; what was shown stays where it is, and skills' about is asked
for the cards shown only. MCP's list pages the same way. Strings in zh,
zh-TW, ja and de.
Run on mote at 0de6f2e57 (origin/main
|
||
|
|
01ccbd40a0 |
library: an MCP router says which computer it is, so an agent can pick between two (packinggoodsllc_07668 on Discord)
Two magpies, one in China and one in Los Angeles, each serve the same tools through their MCP router (/mcp/magpie/hub). An agent connected to both saw two identical web fetches and couldn't pick the one in Los Angeles to reach Google. Each router now says where it is: - initialize's instructions end "This router: <name>. Each of its tools' descriptions starts with [<name>]; ...", and serverInfo.title is "Magpie MCP hub · <name>"; - each tool's description in tools/list starts "[<name>] " (once: a description that starts so already, another magpie's router behind this one, isn't given it twice). <name> is the user's words (settings.RouterNote, one line, 80 characters at most) to every caller. With none it is this computer's name, to callers on other computers only: an agent on this computer has one router at hand, and its prompts stay as they were. RouterNote is this computer's own (KeepOwn): library.json is synced, settings.json isn't, so a sync never brings the other machine's name. It is set in the Library's MCP tab, in a Router name row under the router's address (shown while the router is on): a plain field with the computer's name as placeholder, saved on Enter or leaving it, Escape puts the saved words back, an input method's Enter is its own. POST /api/settings keeps it. Translated in zh, zh-TW, ja, de. docs/subsystems/mcp-router.md has the rule. Run (mote, at |
||
|
|
788057340b |
library: Magpie Image Recognition in Discover beside Magpie Image and Web Search (matrix0487 on Discord, #4653)
matrix0487 asked on Discord (#feedback) for all three of magpie's own MCP servers, image recognition, image generation and search, in the Library's Discover. Image generation and search were there; image recognition was an address to copy in Settings only (#4653). - `magpie mcp vision` (browsermcp.RunVision) relays stdio to the gateway's /mcp/magpie/vision, as `mcp search` does. analyze_image's relative image path is made one in the agent's folder on the way (imageFrom), since the gateway can't know where the agent runs; an absolute path, ~, a URL or a drive goes as written. - library: magpie-vision is a featured, opt-in server (no agents until picked), any binary's `mcp vision` is one server (serverKey), and it gets the 120s tool timeout (selfTimeout). - Settings › Models › Images: the Image recognition row has Give agents Magpie Image Recognition… / Turn on the Library, none with recognition off or in gateway mode. The three links are one helper, libWay, used by Image generation and Web search too (no budget raised: core 1,533,011 of 1,533,105). - Never a dead tool: Discover lists all three whatever is set up, and one that can't answer yet says why (gateway.OwnUnready, set by /api/library/market/servers as `unready`): a "Not set up yet" badge on its card with the reason as its title, and the reason in its sheet (nothing set up, or turned off in Settings / Plugins). It can still be added; its tools already answer with the same reason until then. - Strings in en, zh, zh-TW, ja, de; docs/subsystems/library.md. Run, all on mote (macOS 27) through mote-run, at this head's tree (rebased on |
||
|
|
0e90572274 |
browser: Magpie Browser, agents use the user's own browser and its sign-ins
The owner asked for a browser-use MCP of magpie's own, so an agent's browser keeps working when Claude Code switches accounts, and asked that it act in the browser the user uses every day: a fresh Playwright profile is signed in to nothing. Magpie Browser is an MV3 extension (internal/browserext, ID dmlhojidlfnkgamkekjhacgkpanbkeko, pinned by its key) that the user loads once in Chrome, Edge, Arc, Brave or another Chromium browser. It holds a WebSocket to the gateway's /v1/magpie/browser/extension and carries out each tool call with chrome.debugger (the DevTools protocol) in the user's own tabs. The socket is taken only from this computer, with a loopback Host (no DNS rebinding) and the extension's own Origin; a page or another extension that connected in its place would be handed every call. Agents reach it at /mcp/magpie/browser (Streamable HTTP) or through `magpie mcp browser` (stdio), and the Library's MCP market lists it as Magpie Browser, opt-in. Like the image server it is magpie's own, but it is never served to another computer, shared and with a key or not, and never to a web page, since it acts as the user wherever they are signed in. 17 tools: navigate (url, back, forward, reload), snapshot (an accessibility tree with refs, interactive-only on ask), click, type, press, select, hover, drag, upload, scroll, wait (text, gone, seconds), dialog, evaluate, text, screenshot (page, full page, element; JPEG or PNG), console and tabs (list, new, select, close). Each agent session goes on in its own tab; a link that opens a tab is followed, and a dialog a click opens is said in the reply. The Library's sheet for it has Set up the extension…, which writes the extension to ~/.config/magpie/browser-extension pointed at this gateway and shows the folder, the three steps to load it, and whether the browser is connected, polled while the sheet is open. Run: - TestBrowserToolsInARealBrowser: the extension magpie writes, loaded in a real Chrome for Testing 141 (Playwright's chromium-1234, headless=new) with --load-extension, connects, and all 17 tools act in a real tab of a fixture site. Green on mote (macOS 27), on xiaomi-gpu (Windows 11, win-run) and in magpie-desktop (Ubuntu 24.04, wsl-run). Under a test HOME Chrome needs --use-mock-keychain / --password-store=basic, or the extension's storage waits on a keychain and it never connects. - go test ./internal/gateway -run 'Browser|ReadOnly|Image', ./internal/ browserext, ./internal/browsermcp, ./internal/library, ./internal/gui -run 'Library|Browser', ./internal/cli on mote. - GUI: library-browser-setup.test.cjs (new) in Chromium and WebKit, en, zh, zh-TW, ja, de, at 1100 and 420 wide: 22/22. With i18n-keys and every library*.test.cjs: 915 pass, 1 fail, i18n-keys' "Unmarked", red on main since |
||
|
|
20482d71ff |
library: a skill by a name the library has from elsewhere goes in beside it
mora1n on Discord: anthropics/skills' skill-creator and openai/skills'
are two skills by one name, and only the first could be added; the
second was skipped as "another skill called skill-creator, left as it
is". The library keyed being had by name in every place that asked.
Now being had is decided by source (hadSkill): the same source under any
name here, or a skill with no source (taken in from an agent's folder)
by that name with the very same files. Another skill from GitHub or a
git repository whose name is taken goes in beside it as
<name>-<owner> (skill-creator-openai), then owner-repo, repo, a number,
at most 64 bytes (freeSkillName in skill_beside.go). The library's copy
of its SKILL.md gets that name in the front matter's top-level name:
line (nameSkill), so no agent sees two skills by one name; Skill.Called
keeps the name it came with, and the carried bundle carries it. Its hash
is of the renamed copy, and checks (GitHub and git) and updates compare
what they fetch renamed the same way (fetchedHash), so it doesn't read
as edited and an update keeps the name.
The class: probe (Candidate.Have now means this skill; Candidate.As is
the name it has or would get), installFrom (listed and unlisted folder
by that name), the new-skills check (no longer drops a skill because
its name is taken), the market's had check (by name only for a skill
with no repository: none or a folder), carry, the TUI's probe list and
the GUI's probe list ("adds as {name}" with why in its title, "In the
library as {name}"; zh, zh-TW, ja, de; the tag is cut short in its row).
Old data: nothing is renamed. A skill already in the library keeps its
name, folder, SKILL.md and agent links; library.json without "called"
reads as before. Only a skill added from now on can get another name.
Not changed: a folder of the user's own is linked as it is and its
SKILL.md can't be named apart, so one by a taken name is still skipped,
now saying to rename it in its SKILL.md; and an agent's own skills
folder still holds one skill per name (an agent's own skill by the
library's name is settled by Use library / Keep agent's as before).
Run (mote, at c6fd4b37c on origin/main
|
||
|
|
4ff086d1fb |
library: the Instructions page lists a stopped WSL distro's agents (#4182)
With a WSL distro stopped, the Instructions page listed none of its agents: instructionsView built its rows from the targets only, and an agent in a stopped distro is no target (#3896). So Claude Code, Codex and the rest in WSL couldn't be switched on until the distro ran. And a switch on the page sent the agents the page listed, so switching any agent on or off while the distro was stopped took its agents off the set, and the next sync once the distro ran took magpie's part out of their files. The same way |
||
|
|
0aad5d56ac |
library: the Connect sheet's search has its glass and text on the box's middle
The owner: "这里的文字和icon竟然没有相对于输入框在垂直方向上居中". The
search box is a <label> inside the sheet, an .editor, so app.css's form
rule `.editor label { padding-top: 5px; text-align: right; font-size:
12px }` (8px under body.web) outranked `.lib-hubsearch`'s `padding: 0
8px`. With the box 28px tall, that pushed the glass and the input 2.5px
below the middle (more on a phone page).
- The box's rule is `.editor.lib-hubsheet label.lib-hubsearch`, which
outranks both, and says its own padding, alignment and size.
- The input fills the box's height with no margin.
- On a phone page (body.web, narrow) every input is 44px with 16px text,
so iOS doesn't zoom. The box grows to 44px round it rather than
squeezing the input.
library-mcp-hub now measures, in both engines, 5 languages, 1100 wide
in the app and 420 in a browser, that the glass, the input and its text
line are within 0.5px of the box's middle and the input stays in its
box. Red on the old CSS, 22/22 ("the search's glass is 2.50px off the
box's middle"). The first fix was red 12/22 at 420 (the input stayed
44px and ran 8px out of a 28px box), which is why the box grows on a
phone.
Run at this commit (its own worktree), on mote: library-mcp-hub and
i18n-keys, 26/26 ok. WebKit screenshots at zh 1100 and 420 checked by
eye: the glass and "agent 2" sit on the middle.
Not tried: the real app's WKWebView (Playwright WebKit only).
|
||
|
|
b0ab8420c1 |
library: the MCP hub's mark is magpie's bird, its address row says Hub address, and magpie-image is said to go direct
The owner, on Library > MCP servers: "我不喜欢这个logo" (the hub row's crosshair glyph), "其他应用的这个文案好莫名其妙" (the row with the hub's address was titled "Other apps"), and "我明明有两个MCP,这里为什么只显示 一个" (the Connect sheet counted linear and left magpie-image out). - The hub row and the Connect sheet's head draw magpie's bird (#bird), the one server each agent is given, in place of GLYPH.hub. - The address row is titled "Hub address"; who connects there (Cursor, VS Code, any other app) moved to its tooltip. - magpie-image is never served through the hub: it asks its agent for the project's folder (MCP roots; inHub in internal/library/mcp_hub.go). The hub's stats and the sheet's line now say "magpie-image is given to each agent directly", so the count adds up. The image-server test is one isSelf for both. - zh/zh-TW/ja/de for the three strings. Run at this commit (d8dc8a114's tree, worktree of its own), on mote: library-mcp-hub, library-mcp-health and i18n-keys, both engines, 5 languages, 1100 and 420 wide: 32/32 ok. The hub test's fixture has a magpie-image server now, and checks the bird in the row and the sheet, the "Hub address" name and the direct line. The whole library/mcp/i18n GUI set with the later two commits on top: 944 tests, 942 ok; the 2 reds are library-row-remove's chromium ja hook row (#3099, open, its trash has no box yet), not touched here. go test ./internal/gui: TestMainWindowCorners/macOS_26_SDK red on mote's macOS 27 (#3949), the rest ok. Not tried: the real app with a real magpie-image entry. |
||
|
|
c1da9ccda3 |
library: a stopped WSL distro's agents are listed, and a tick for one is written there once it runs (cybercaius on Discord)
cybercaius: with WSL not started, the Library's MCP page didn't list the agents in the distro at all, and nothing ticked for them could be kept. A stopped distro's agents are no targets (#3896: opening their files starts the distro), so they fell off the page. While a distro runs, each agent's places and what its MCP file takes are kept in wsl.json (keepShape, agent.WSLKeep, key library:<kind>). While it is stopped, Read lists its agents from that (asleepView, asleep: <distro>) with the library's ticks; one magpie never saw is listed only on rows that name it, as unseen, its chip disabled and kept by every click (keptOf). A tick on a stopped agent is kept in library.json (Takes accepts a known shape, serversAgents judges it by shape.reaches); nothing is opened or run in the distro. Woken, from KeepLinked's 30s loop, syncs once a distro the library names goes from stopped to running (wsl.exe -l --running starts nothing). The page greys a stopped agent's chip and says why in its tooltip and one line per distro; the MCP hub leaves them out. The CLI says the same on stderr (AsleepIn). en, zh, zh-TW, ja, de. Run at this tree (20695ad8b before this message; on |
||
|
|
da8039368f |
library: skills kept in ~/.agents/skills can be handed over to the library, and then turned off per agent
tnt1223 on Discord asked for the skills in ~/.agents/skills to move into
magpie's library folder and be managed there ("统一移入 magpie 的资源库文件
夹,交给 magpie 管理"), since a skill there can't be turned off for one agent
("不能决定某个 skill 是否自由开启"). Codex, Gemini CLI and the other readers
of that folder read it themselves, whatever the library ticks. Goose, Kimi
Code and Cindy use it as their own folder.
HandOverSkills (POST /api/library/skills/hand-over with names) does the
hand-over only when the user asks for it:
- A folder kept in ~/.agents/skills moves into library/skills/<name>
(moveIn). It is renamed, or, across disks, copied. A copy has to read
back the same (sameTree) before the original is set aside with the
backups. On any failure the folder stays where it was and the library's
link stays as it was.
- An entry there that only links to a folder elsewhere is removed, and
the library links straight to that folder. The folder itself stays.
- The user's own links to the skill in agents' folders are removed too,
since they would point at nothing. The library gives those agents its
own link.
- Every agent here that read the skill there (readsSharedHere, plus the
agent of each such link) is ticked. So each agent keeps the skill, now
from the library, until the user unticks it or turns it off here.
- A skill found there that isn't in the library yet is imported first.
- A name that can't be handed over is listed in Result.Unmoved, and the
other names are handed over all the same.
HandBackSkill moves the folder back and links the library to it again.
"Kept there" is now sharedEntry: the skill's own entry in the shared
folder, by its name, or, for a library link into it under another
folder's name, by that folder's name. Everything that read the old
by-name check follows it:
- SkillView.Always, plus the new Shared and SharedElsewhere fields;
- syncSkills' in-shared check;
- the shared folder's own target, which no longer gets a second link
beside such an entry. TestSharedUnderAnotherName covers this, and it
fails without the guard.
Where:
- GUI, Library > Skills: a row kept there has "Manage in magpie"
("交给 magpie 管理") in its source line. With more than one such row,
the skills heading has "Manage {n} in magpie". Each asks first, in the
page, and says:
- where the folder goes, or that only the link goes;
- which agents keep the skill, ticked;
- how to put it back.
Cancel sends nothing. The strings are in en, zh, zh-TW, ja and de.
- CLI: `magpie library skill hand-over <name…>|--all` and
`magpie library skill hand-back <name>`.
Existing users: nothing changes until they click. A library.json gains
no new key.
Run (mote, at 58e926e5d/d4b7c0586 rebased on
|
||
|
|
85d159a288 |
library: Connect an app is two tabs, agents in groups with a switch each (#2679)
The sheet behind Connect… is redesigned, closer to how Composio's MCP
router reads, and holds up with 25+ agents.
Agents tab: agents → magpie → servers drawn as icon stacks with
magpie's own bird in the middle (no accent block), one line of where
things stand ("19 of 23 agents use…", or the lone agent named), then
the agents in three groups: not connected, connected, keeping each
server's own entry. Each row is a switch (servers/agents-all
{agents:[id], on}); a kept agent shows a short word for why with the
full reason behind (i). Connect all in the bar connects the rest in
one post. With more than 8 agents a search narrows every group, and
the connected and kept groups fold to one row each ("Claude Code,
Cursor and 17 more") so the sheet fits the window.
Other apps tab: the address, then a row per app (Cursor when it isn't
an agent, VS Code, Windsurf, any JSON app) saying where its entry goes,
with Copy entry; Cursor and VS Code get Add in the app (hub-open).
Behaviour change: the switch's off takes every Library server away from
that agent (as By agent's Turn all off does), so turning it on again
gives it all of them, not the ones it had before.
"Why", "Connected" and "Not connected" moved to the core i18n.js: Go
files say them too, so i18n-keys refuses them as plugin words. zh says
已连接 / 未连接.
docs/subsystems/mcp-hub.md's GUI row describes the new sheet (and loses
a duplicated cell).
Run at 239981794 (rebased on origin/main
|
||
|
|
fe05f0a721 |
library: a skill can be turned off on this computer alone, and a sync neither carries that nor turns it on
hanslin1666 on Discord (#general 1565016936344191096) wanted a library
skill off on one computer only ("只在这台电脑上关掉"). The only way to do
that was to untick its agents, and the ticks are what a sync carries, so
every other computer lost it too. A sync from a computer that had it on
also gave it back here.
Skill.OffHere (library.json "offHere", omitempty) turns a skill off on
this computer. No agent here gets it, whatever Agents says. Every reader
that gives a skill to an agent now asks gives():
- syncSkills, including the shared ~/.agents/skills check;
- desktop_skills.go;
- skill_changed.go;
- skill_edits.go;
- behind;
- Targets.
Agents stays what a sync carries, and the page shows those chips faded.
Collect never carries OffHere, so turning a skill off changes no part a
sync uploads. Put keeps this computer's OffHere for a skill it puts, so
a sync from a computer that has it on (or that gives it to more agents)
leaves it off here.
Where to turn it off:
- GUI: a power button on the skill row (aria-pressed). When off, an
"Off on this computer" tag sits on its own line under the name; it
says why and turns the skill on when clicked.
- CLI: `magpie library skill off-here|on-here <name>`.
- TUI: the row says the skill is off.
The strings are in en, zh, zh-TW, ja and de.
Existing users: nothing changes. An older library.json has no offHere,
so every skill stays on, and a skill that was never turned off writes no
key (TestSkillOffHereOldLibraryIsOn).
Not covered:
- a project's skills;
- a library skill whose own folder is inside ~/.agents/skills, which
agents read in place;
- a skill another computer removes (the flag goes with it).
The skill's files in the library folder still update while it is off.
Docs: docs/subsystems/library.md and sync-backup.md.
Run at the parent
|
||
|
|
e0ea15b8e8 |
library: an MCP hub, one magpie server in place of every library server (#2679)
With Library → MCP → "MCP hub" on (off by default), each agent that takes an MCP server over HTTP is given one entry, magpie, at /mcp/magpie/hub/<agent>, in place of the library servers ticked for it. magpie runs those servers itself, once for every agent: a command starts on its first call and ends after 10 idle minutes, a URL server is reached with its headers and MCP sign-in. Tools are <server>__<tool>; a tool off in the library is neither listed nor run. Any other app connects at /mcp/magpie/hub, which serves every library server. Both are guarded as /mcp/magpie/tools is (local or a gateway key, no foreign page, 4 MiB, the key's limit per call). An agent that reaches no server over HTTP (Claude Desktop), has a magpie entry of its own, or sits beside a library server called magpie keeps each server's own entry, and the page says why. Off gives every agent its servers back and ends every process the hub started. GUI: a switch under the MCP list, a line of what it serves, the address, and a Connect… sheet. The sheet lists every agent magpie detects that takes MCP (not a fixed four), each with where it stands; one given none of the hub's servers has a Connect that ticks it for every server it can reach (servers/agents-all), so it gets the entry, and the sheet stays open. Then any other app: Cursor (when it isn't a detected agent), VS Code, Other, with the JSON and, in the app, "Add to …" through the app's own install link built in Go (servers/hub-open; the page never sends a link). CLI: magpie library mcp hub on|off. Design: docs/subsystems/mcp-hub.md. With #3885 ( |
||
|
|
2ff85f8a2b |
gui: a page's bar room comes out of its right padding, so both sides match
v0.1.1904 had every page keep its scrollbar's room, so nothing moves
when a page grows past the window. The owner asked whether the clear
bar now makes the sides uneven: it did, by the bar's width (8px on the
Mac, 10px on Windows and Linux), and the centred pages sat 4px to the
left.
layout.js measures the bar of a .view into --bar (again on resize, so
a text-size zoom is followed), and app.css takes it from each page's
right padding: the panel's 12px, the window's 16px, the centred pages'
max(16px, 50% - 600px) and the phone web's safe-area right. The heads
and strips that reach over the padding (Library's and Settings' sticky
heads, Providers' after-list fade, the masking record's bar) reach that
much less on the right, or they would run the page sideways. A plugin's
page, whose frame scrolls itself, shows a bar only when it needs one.
layout.js's measuring adds 254 bytes to the core's scripts; the budget is
raised by exactly that, with no room added.
page-width-steady.test.cjs now checks every page's left gap against its
right gap with the bar (chromium and webkit, the Mac's 8px bar and the
10px one, 1100 and 1600 wide) and that no page scrolls sideways; that
check found Providers' after-list fade running 4px past the page. With
v0.1.1904's CSS it is red ("agents: 16px on the left, 24px on the
right (bar 8px)", 26px with the 10px bar, 94/102 centred). page-width's
"centred" check compared paddings only, and now counts the bar too.
Run on mote at this head (f70cb6825's tree, on origin/main
|
||
|
|
a8c71f1987 |
library: an opaque logo has no white corners
The user's MCP servers page drew Linear's, Context7's and GitHub's logos (GitHub avatars, opaque) with a white fringe at each of the four corners. The tile (.mk-icon) had a white background under the picture, and its rounded clip's soft edge let that white through. The white now sits on a plate 1px inside the tile (::before, border-radius inherit), which the clip never reaches, so an opaque logo meets the row's own background at its corners. A logo with see-through parts (an .svg) still sits on white, an initial keeps its grey (no plate), and the skeleton looks as before. The same tile is the library rows' 26px/24px logo, the market cards' 36px and the market sheet's 44px. Tried first in a page of the three real avatars at 2x in WebKit and Chromium: background:none removed the fringe, clip-path inset(round) beside or instead of overflow:hidden did not. New: internal/gui/tests/market-icon-corners.test.cjs, dark theme, 2x, every language, both engines. It reads the tile's own pixels: no corner of an opaque black logo is brighter than the card plus 30, an svg tile is white along its edges, and an initial's tile is not white. Run (mote, at this commit's tree on origin/main |
||
|
|
769355ab93 |
library: an MCP server's startup timeout reaches Codex as startup_timeout_sec, a hand-written one stays (#3168, miaomiaozi)
The Library's MCP server editor has a "Startup timeout" field (seconds), shown when an agent that reads one is installed (AgentView.Startup; Codex only). It is written to Codex's [mcp_servers.<name>] startup_timeout_sec, user-wide and in a project's .codex/config.toml. Empty writes nothing, so Codex keeps its own 30s, as before. The key and its unit are from Codex's own source: RawMcpServerConfig in codex-rs/config/src/mcp_types.rs (cb2581dae8de) has startup_timeout_sec: Option<f64> in seconds, and the older startup_timeout_ms, which is read only when _sec is absent. A value the user wrote in config.toml is never written over. magpie records the value it last wrote (Applied.Startup per agent, Project.Startup per project file). A value in the entry that differs from that record, one there before magpie wrote any, or any startup_timeout_ms, is the user's (startupTheirs), and magpie leaves the key alone. Once the user takes theirs out, magpie's goes in. The TUI's server editor keeps the GUI-set value, as it does for OAuth. Other agents with a startup timeout (Grok Build, Hermes, OpenCode) and a `magpie mcp add` flag are #3536. Run, in a sandbox HOME with pinned GOMODCACHE/GOCACHE: - go test -tags nogui ./internal/library ./internal/tui: ok (162s, 16s). - New tests: TestCodexStartupTimeout, TestCodexStartupTimeoutKeepsUsers, TestCodexProjectStartupTimeout. Broken by hand, each red: every existing value counted as the user's -> "startup_timeout_sec = 120, want 45"; magpie always winning -> "= 20, want 90"; no encode (the old code) -> "= <nil>, want 120". - GUI: new mcp-startup-timeout.test.cjs, Chromium and WebKit, en zh zh-TW ja de, 1100 and 390px: 22/22; red on the old client.js (no field). The 59 GUI files the change reaches (mcp-*, library-*, i18n-keys, gui-de/ja/zh-tw, every editServer/lib-editor file): 935 of 937 pass. The red, library-row-remove's hook-row trash in Chromium, fails the same way on origin/main |
||
|
|
c417b1f4e3 |
library: a skill removed from its source is said so, and every such skill goes in one click, asked first
スライム on Discord (#help, 10-22): taste-skills took some of its skills
out, Update all reported each of them as a failure, and the only way
out was to delete them one by one.
An update or a check that reads the source whole and finds the skill's
folder (or its SKILL.md) gone now calls it removed upstream, not a
failure. GitHub tarballs and other git repositories both work this way.
- UpdateSkill returns *GoneError.
- UpdateSkills and UpdateSomeSkills list it in Result.Gone, not
Unupdated.
- A check gives status "gone".
- Each marks Skill.Gone. The mark is cleared when a check or an update
finds the skill there again.
- A fetch that failed, a skill left out of a fetch as too big, and a
folder that can't be read stay unknown, never gone (goneFrom).
Nothing is deleted by itself. RemoveGoneSkills takes the named skills
out, or every marked one when none are named, through RemoveSkills, so
the folders go to the backups. A skill found in its source again is
kept and said so.
- GUI: a "Removed upstream" tag replaces Update available and the
update icon. Update all says gone skills apart from failures. "Clean
up N" sits in the group heading, or in the bar when there is one
group, and opens a sheet naming each skill. One changed here carries
"Changed here". Strings are in en, zh, zh-TW, ja and de.
- CLI: `magpie library skill rm --gone [--yes]` asks at a terminal and
refuses without --yes otherwise. It names the ones changed here.
update and status print the hint.
- TUI: the row says "removed from <repo> · d takes it out".
- API: POST /api/library/skills/remove-gone {names}.
- Docs: the Skill updates row and Verification in
docs/subsystems/library.md.
Record for this push: 13 commits on origin/main
|
||
|
|
0dbb1a8490 |
library: subagents are written once and given to every agent in its own format, with what each agent can't bind shown (#2283, chuanchinatest)
The Library has a Subagents tab beside Hooks. A subagent is a name, a
description, a prompt, and the library's skills and MCP servers it uses.
magpie writes it to each ticked agent's user-level folder in that agent's
format, rewrites it on every change, and takes back only files it wrote.
Where each one goes (syncSubagents, subagentSpecOf):
- Claude Code: ~/.claude/agents/<n>.md, with skills and mcpServers
- Codex: $CODEX_HOME/agents/<n>.toml (name, description, developer_instructions)
- OpenCode: ~/.config/opencode/agents/<n>.md (mode: subagent)
- Gemini CLI ~/.gemini/agents, Qwen Code ~/.qwen/agents, Grok ~/.grok/agents,
Cursor ~/.cursor/agents, Copilot CLI ~/.copilot/agents/<n>.agent.md
- Factory Droid: ~/.factory/droids/<n>.md, with mcpServers
Skills and servers are named only where the agent's file can name them.
The page says, per agent, which of the two it won't bind, and that only
the Cursor app reads ~/.cursor/agents (cursor-agent reads a project's only).
Agents in WSL and agents with no user-level folder are greyed out.
The user's own files: every file is recorded by the hash of what magpie
wrote (Applied.Subagents). A same-name file of the user's is never written
over (the agent gets a problem). A file the user edited is theirs from then
on: it is neither rewritten nor removed. A carried library doesn't carry
subagents yet (as with hooks).
The Library's tabs now wrap onto a second line rather than scroll a narrow
window sideways (eight tabs in German at 560px). library-servers-bulk's
window goes from 1000 to 1100px tall to keep its stated premise that the
whole list fits.
Run:
- gofmt -l, and go vet -tags nogui for darwin, windows and linux: clean.
- go test of internal/library, internal/gui and the packages that import
internal/library, at this head: green.
Full suite: SUITE_LINE
- New tests: TestSubagentsEachAgentsFile, TestSubagentsLeaveTheUsersFiles
(covers the user editing magpie's file and then a sync), TestSubagentCheck.
- GUI: library-subagents (new) passes in Chromium and WebKit, at 1100 and
420, in en, zh, zh-TW, ja and de. Also all library-*, gui-ja, gui-de,
gui-zh-tw, i18n-keys, images-library-way, skill-* and mcp-* tests pass.
Greying out the WSL agent was broken by hand, and library-subagents
went red.
- Real binaries in a sandbox HOME against a fake upstream: each one sees
the subagent magpie wrote.
- Claude Code 2.1.300: it is listed in the system prompt.
- OpenCode 2.0.25: debug agents.
- Grok 1.0.50: grok inspect.
- Codex 0.162.1: spawn_agent's roles, with --enable multi_agent_v2. v1
showed no spawn_agent with a custom provider.
- Gemini CLI 0.63.0: <subagent> in the request.
- Qwen Code 0.21.9: its agent types.
Not tried: Factory Droid and Copilot CLI (both need a sign-in; Copilot
stops on auth before it reads agents), and the Cursor app.
|
||
|
|
24a1f92446 |
gui: Library's intro text is as wide as the cards under it, not broken off at 640px (#2319, emo172)
.lib-intro had max-width: 640px, the only cap on a paragraph in the
Library plugin's CSS. On a wide window RTK's intro broke mid-sentence
("…只输出模型需要的部分," / "节省 token。") while the RTK card under it
ran across the whole column, which read as text cut for no reason. Every
tab's intro shares the class (RTK, MCP servers, Instructions, Hooks,
Skills), so the cap goes for all of them; text-wrap: pretty keeps a last
word from standing alone on its line (ignored where unsupported). No other
change to the layout.
Test: library-intro-width.test.cjs, Chromium and WebKit, en/zh/zh-TW/ja/de,
at 1100px and 420px, on the RTK, MCP and Instructions tabs: the intro spans
its column less its 2px sides, ends where the RTK card ends, and the page
doesn't scroll sideways. With the old CSS it fails at 1100px ("intro 640px
in a 856px column"); with the fix 62/62 pass.
Run: node --test internal/gui/tests/library*.test.cjs
internal/gui/tests/view-no-sideways.test.cjs (both engines): 610 pass,
0 fail.
Full suite: SUITE_LINE
|
||
|
|
b9e5c28997 |
gui: a Library MCP server magpie can't check for a variable only its agent sets shows not checked, not a red error (#2308, ASD-max)
Codex's host-only codex_app (codex-app-tools, imported into the Library)
names ${CODEX_APP_TOOLS_PIPE_PATH} and ${CODEX_MCP_NODE_PATH}, which only
the Codex app sets when it starts the server. magpie's check expands them
from its own environment, finds them unset and returns novar before
starting anything. The page painted that red, the same as a server that
exited or doesn't answer, so a working server read as broken. Its tooltip
already said magpie can't check it there.
A novar result is now painted as not checked: a grey ring and muted
words ("CODEX_APP_TOOLS_PIPE_PATH, ... not set"), the same tooltip. Other
errors stay red. The check itself is unchanged: magpie doesn't start
codex_app with Codex's pipe, as the reporter's own probe shows Codex
turns away a peer that isn't its signed binary
(untrusted-code-signing-identity), and it doesn't learn the pipe's path.
Run: library-env-refs.test.cjs (Chromium and WebKit, en/zh/ja/de at
440px) now also checks the novar status isn't "err" and isn't the red
colour; with client.js put back to HEAD it fails. library-env-refs and
library-mcp-health pass (16). Go tests not run (no Go file changed; disk
under 6G free).
Full suite: SUITE_LINE
|
||
|
|
9829d2f553 |
gui: a hook's description is shown whole, wrapped, and written in a box that wraps (#2085, emo172)
Library › Hooks cut a hook's description to one line with an ellipsis and
no tooltip, and the editor's Description was a one-line input, so an
80–150 character Chinese description could neither be read nor seen while
written.
- The list wraps the description (at most 200 characters, the user's own
words). The row's text block takes a 240px basis, so the long text no
longer pushes the name under the glyph at narrow widths.
- The editor's Description is a textarea that wraps and grows to fit. It
stays one paragraph (library.SaveHook joins its lines), so Enter still
saves, an IME's Enter still doesn't, as in every other field there.
- Siblings left as they are on purpose: skills, subagents and market rows
hold one line with the whole text in a tooltip, because their lists are
windowed to a fixed row height and their descriptions are authors'
paragraphs, not the user's 200 characters.
Verified:
- library-hooks.test.cjs now gives a hook a 90-character Chinese
description and checks it is not clipped and wraps at 440 and 1100 (1100
in a window of its own: resizing one window across the page's breakpoint
raises a WebKit ResizeObserver-loop error under load), that the name
stays beside its glyph, and that the editor's box is a textarea showing
all of it. On the old code it fails 12/12 ("the description is cut off
at 440"); without the 240px basis, "the name is 38px off its glyph at
440".
- All 484 library*.test.cjs pass in Chromium and WebKit, en/zh/zh-TW/ja/de;
the hooks test 4x concurrently in both engines, 48/48.
- Screenshots at 440 and 1100, both engines, looked at.
Not run: Go checks (no Go changed); not tried in the built app.
|
||
|
|
aa6a0d6b20 |
library: one skill over 200 MB is left out, not the whole repository (#2062)
mikubaka88/CCFA-Skills couldn't be installed at all: "the skills in ... are
too big to install (over 200 MB)". The repository is over the 200 MB
tarball cap, so fetchSkillFiles fetched it file by file, and that refused
the whole repository once the files summed past 200 MB. One skill,
ccf-paper-writer, is 297 MB on its own (exemplar paper PDFs, llava-4d.pdf
alone 46.8 MB); the other 16 are small.
The 200 MB limit per skill stays: a skill is copied into every agent that
gets one as a copy, and treeOf stops comparing at 256 MB, so a 297 MB skill
can't be told current or edited. What changes is that one such skill no
longer blocks the rest:
- fetchSkillFiles sums each skill's files (the deepest skill folder a file
is under) and leaves out a skill over maxFetch; its files are never
asked for. Only when every skill is over it does it fail as before.
- The left-out skills reach ProbeSkills as Probe.Left (path, size), kept
per temp folder and taken once (tookLeftOut).
- The GUI's probe names each under the list ("{name} is too big to
install: 283 MB, over the 200 MB a skill may be"), or in place of "No
skills there" when nothing else is left; zh, zh-TW, ja, de. The TUI says
it in its flash.
- docs/subsystems/library.md says how a big repository is fetched.
Run:
- Real: probe of mikubaka88/CCFA-Skills under a sandbox HOME lists 16
skills and leaves out ccf-paper-writer (296736735 bytes). Not installed
into a real agent.
- gofmt -l internal/: clean. go vet ./internal/gateway ./internal/library
./internal/tui on darwin, GOOS=linux -tags nogui, GOOS=windows (set -o
pipefail): clean.
- go test -count=1 ./internal/library ./internal/tui: ok.
- TestOneSkillTooBigLeavesTheOthers (new): fails with the per-skill
leave-out turned off by hand, passes with it.
TestTooBigRepositoryChecksWhatArrives now makes every skill too big.
- skill-too-big.test.cjs (new), chromium and webkit, en 980 and zh,
zh-TW, ja 440, de 420, plus every-skill-too-big: 14/14; red (0/7 in
chromium) with client.js at origin/main. skill-*.test.cjs 190/190 and
library-*.test.cjs 484/484 in both engines.
|
||
|
|
b319657301 |
gui: a sign-in whose browser didn't open says why and shows its link, and Windows names rundll32 by its path (#2043)
xiaobaifly7: on Windows, signing in to Cloudflare's MCP server (and any
sign-in) opened no browser, and the window said to finish in the
browser until the sign-in timed out. Wails' Browser.OpenURL starts
rundll32 by its bare name, which Go looks up with PATHEXT's extensions;
a PATHEXT without .EXE (WSL passes one on as ".CPL") finds nothing, and
host.OpenURL dropped the error.
- proc.OpenBrowser starts %SystemRoot%\System32\rundll32.exe by its
path (open / xdg-open / termux-open-url elsewhere) and returns the
launcher's error. host.OpenURL falls back to it when Wails' fails, and
the CLI's account sign-in uses it.
- Windows.OpenURL returns the error. /api/signin, the plugin sign-in and
/api/library/mcp-signin answer it as openError; /api/open fails with
it, so Open again says why.
- The sign-in card shows "magpie couldn't open your browser: {error}.
Open the sign-in link below in a browser yourself." where it said
magpie opened the page, with the link already shown below; the MCP
editor shows the error with the link and a copy button. Translated
(zh, zh-TW, ja, de).
- Open again matched its sign-in by identity, so a poll that put a fresh
copy of the same sign-in in place kept the old error after a
successful retry; it now matches by id.
Run:
- TestBrowserNamesRundll32ByItsPath, TestMCPSignInSaysTheBrowserDidntOpen
and the /api/open and /api/signin tests in signin_open_2043_test.go.
Broken by hand: the bare name back in browserCommand fails the first;
openError returning "" fails the gui tests.
- On the Windows box (amd64, cmd with PATHEXT=.CPL): exec.Command
("rundll32", ...).Start() gave `exec: "rundll32": executable file not
found in %PATH%`; proc.OpenBrowser started it (nil). The proc test
binary's TestBrowserNamesRundll32ByItsPath passed there.
- signin-browser-down.test.cjs (new): the card's text, the link, no
sideways overflow, Open again failing then succeeding, and the MCP
editor's error and link, in Chromium and WebKit at 1100 and 420 in
every language: 20/20. The related sign-in GUI tests: 451/452, the
one a signin-proxy flake also on main (fixed in its own commit).
- gofmt -l clean; go vet darwin, linux -tags nogui, windows; GOOS=linux
and windows builds; go test -tags nogui ./internal/gui/
./internal/proc/ ./internal/cli/.
Not tried: the real Wails app on Windows under PATHEXT=.CPL (the
fallback path is exercised only through proc.OpenBrowser), WSL itself,
the reporter's machine. Not covered: internal/tui/sessions.go and
internal/provider/install.go start `powershell` by its bare name, which
would miss the same way under such a PATHEXT.
|
||
|
|
8da304767a |
gui: Library is a plugin's page, its script, style and words in plugins/library
P2 of docs/subsystems/plugin-runtime.md, the second page after Sessions.
- library.js and library.css move to assets/plugins/library/ (client.js,
library.css). The script registers with the kernel
(magpie.plugin("library")) and adds its page to the "page" slot. Its
hooks: open and relang load, redraw, close (its modal), dirty, discard.
What it set up at load (list scroll and resize, the modal's backdrop
and Escape, beforeunload, the stuck header, a quiet reload on focus)
runs in mount.
- app.js calls those through magpie.call instead of window.loadLibrary,
redrawLibrary, closeLibraryModal, libraryDirty and discardLibrary. It
no longer lists library in its title map, hide loop or OPEN_VIEWS; the
kernel's pages are in them.
- index.html: <main id="view-library"> goes, the kernel makes it.
library.css keeps its place in the cascade.
- The 560 strings only Library says move from i18n.js to
plugins/library/i18n.js (4 languages). i18n.js: 18826 → 16584 lines.
- plugins/library/library.go lists the client files.
- Tests that read i18n.js for a Library string read strings.cjs (i18n.js
and the plugins'): 8 library tests and mcp-editor-cancel,
mcp-oauth-app, mcp-signin-health. font-cascade, win-fonts and
assets_revalidate_test.go name the new paths.
- "Check again" stays in i18n.js: Library said it alone when the words
were split, and
|