1ccacad63281094de8a3372d5a507d38f9969e5c
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
116f23c784 |
plugins: an agent plugin whose agent isn't on this computer says so, not "Adds Kimi to Agents" (zzZ)
zzZ (innerscw) on Discord: Kimi no longer shows in Agents, even with the
plugin installed. Nothing in magpie regressed. Kimi Code CLI (built-in
`kimi`, ~/.kimi-code) is found on main: installed with Kimi's own
install.sh in a sandbox HOME on mote, it is listed. The plugin is
@magpie-community/agent-kimi-desktop. Its agent's folder,
~/.config/magpie-kimi, is made by its adapter only once Kimi desktop's
Work runtime has written its config.json (bootstrap() in adapter.mjs).
Until then Detected() is false, so Agents lists no row for it. All the
while, the Plugins page said "Adds Kimi to Agents".
/api/plugins's agent now has missing, looks (where magpie looks, ~ for
home) and notice (the plugin's own notice) when the agent isn't found.
The row's line says "Kimi isn't in Agents: magpie doesn't find it in
~/.config/magpie-kimi", followed by the plugin's notice ("请先打开 Kimi…").
It wraps, in muted colour, since it is not a failure. In zh, zh-TW, ja
and de as well. A found agent's row is unchanged, as are fixtures with
no `missing`.
Run on mote (mote-run):
- go test ./internal/gui -run 'TestPluginAgent|TestCoreScriptBudget|I18n|Words': ok.
- node --test plugin-agent, i18n-keys, i18n-en-no-cjk: 30 pass, Chromium
and WebKit, en/zh/zh-TW/ja/de, at 980 and 420.
- go test ./internal/gui ./internal/agent -count=1 -timeout 45m:
internal/agent ok; internal/gui red only in TestMainWindowCorners
(macOS 27, #3949).
- node --test every *plugin*.test.cjs: 1126 of 1130 pass. The 4 reds are
plugin-move-unserved's "Try again takes the models unticked", red the
same on origin/main
|
||
|
|
ed7aeb052f |
plugins: a package that declares magpie.agent is an agent, with a main or without (plugins#737)
miaocell's magpie-agent-deva ships a Bun module as its main beside its moejs agent file (deva.agent.js), because the agent needs a runtime. The market's GitHub list decided the kind by whether a main was there, so it listed the package under Providers, and the Installed row wore a Provider chip and a provider logo though the module serves no provider. Now readTagged gives Kind "agent" to any package that declares magpie.agent; middleware, page and hooks still need no main to be that kind. The file looked for in the repository is still the module Bun loads (its main), or the agent file when there is no main. The Installed row of an agent plugin wears Provider only when its module serves a provider, and its logo is the agent glyph unless it does. The moejs descriptor contract is unchanged. The community registry.json already gives kimi-desktop and reasonix-desktop (both with a main) kind agent; the plugins repo's check now fails an agent package listed as any other kind. Docs: docs/reference.md, docs/subsystems/provider-plugins.md, and site/public/docs plugins.html in en, zh and ja say an agent that needs a runtime keeps its agent file and adds a Bun main, and is listed as an agent either way. Run (on mote, at this head rebased on |
||
|
|
ce8b67de37 |
gui tests: a page's first load gets a minute, not a click's 5s (#4470)
claude-switch-only set page.setDefaultTimeout(5000) and then called page.goto with no timeout of its own, so Playwright held the first load of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a busy box (a whole-suite run at load 130-160) that load took longer and goto timed out. The same pattern is in 988 GUI test files (1174 pages): every one of them now also sets setDefaultNavigationTimeout(60000) on the same page, right after its default, so goto, reload and waitForURL wait on the load itself with room, while clicks and waits keep their short bar. group-from-model-add's own 20s navigation bar is raised to the same minute. claude-switch-only also gives its first provider row (drawn from the page's first reads) a minute before clicking it. nav-timeout.test.cjs (no browser) reads every GUI test file and names each page given a default under a minute without a navigation timeout of at least a minute, so a new file can't bring the pattern back. What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from other sessions): - node --check on every file in internal/gui/tests: all parse. - nav-timeout.test.cjs against origin/main's test files: red (names the 1174 pages); against this tree: its only reds were my own probe copies of the old files, since removed. - By hand: claude-switch-only with app.js served 7s late (a busy box's first load), --test-name-pattern "1100 en": origin/main's file 4 of 4 red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green. - claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420: 32 of 32. group-from-model-add, usage-access-key-card and i18n-keys: green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red on a 5s waitForFunction at line 115 (a wait after load, not the navigation), at load ~230. Not tried: the whole GUI suite (about 1000 files; the change is one mechanical line per page), Windows or mote (mote's browsers, #4125). |
||
|
|
18e82adc62 |
gui: the window's pages down a sidebar in groups, the open page's tabs under it, and a button to have the header's tabs instead
From 1024 points wide (SIDE_AT) the window lays its pages down the left as a Mac app's sidebar: Work (Agents, Sessions, Library), Models (Providers, Routing, Gateway), Insights (Usage), Extend (Plugins), with Settings and the gateway's address at the foot. The open page's own tabs (Usage, Library, Plugins, Settings) are listed under it, opening and folding on an iOS-like spring, and the page's strip is hidden. The header becomes a breadcrumb, and pages whose head held only tools have them in the title bar. Graphite: the open page is in the text's ink, not purple. A pressed row darkens and never shrinks. The selection under the tabs sets off as the row is pressed, on a 0.3s curve (it felt behind the finger), and is the list's only shape: a sub-row hovered or pressed has no ground of its own, which showed a block under the finger before the selection slid there. The page's tab is clicked at once, so what is typed next goes to it. The title bar's button (or ⌃⌘S, Ctrl+Shift+S), there at every width, picks the sidebar or the header's tabs. The choice is kept in localStorage magpie.navLayout (side or top) at every width, so it is laid out from the first frame; picked in a narrow window the sidebar is 184 points under 860. The two trade places in a view transition: the sidebar slides, each tab flies to its place, and the page slides as one. Without view transitions or under reduced motion, the change is at once. With nothing picked, narrower than 1024 the page beside a sidebar would be narrower than Usage's requests table needs, so the header's tabs come back. A resize drops what a click held (heldWidth). Usage's KPI strip goes two to a line by the room the page gives it (a container query), and Japanese counts wrap there. Tests whose window is 1024+ were updated for the sidebar, and docs/subsystems/gui-shell.md says how it works. Run: sidebar.test.cjs and side-toggle.test.cjs 16/16 in chromium and webkit, in en, zh, zh-TW, ja and de. Each was broken by hand (press shrink, address cut, press glide, sub-row ground, view transition, kept choice) and went red. Every page at 560 points with the sidebar picked, zh and de, both engines: nothing scrolls sideways. session-identity's ledger row sits under the footer beside the sidebar; WebKit's click doesn't scroll to it, so the test wheels it up first. Animation frames were checked from a recorded video. The 105 affected GUI files in both engines; their reds were rerun alone and fixed (filter-ime: the sub-row's click now at once; session-identity, above) or fail the same on main (tray-logos). The full GUI suite in chromium, on the rebase onto |
||
|
|
cc2092a4b0 |
plugin, gui: a market plugin's card wears the picture its package gives (magpie.icon from npm) when the market gives none
yetone: 这里的 agent plugin 为什么没有 logo. Aider's card in Discover › Agent showed the generic agent glyph: the registry entry has no icon, and the card only read the registry's, which is one of magpie's icon names. A GitHub-tagged plugin's card already read package.json's magpie.icon; a listed one didn't. - plugin: npm's /latest answer carries package.json, so NPM.Icon is its magpie.icon, an https URL or data:image URI only (ownIcon, now shared with the GitHub listing's check). - gui: listings, market and /api/plugins/npm keep that picture as an installed plugin's is (provider.RepoIcons) and send the page a file: icon, never the data URI or the remote URL. - plugins.js: card, plugin page and installed row use l.icon, then l.npm.icon. - Registry icons stay names, so older magpies aren't handed a URL they would draw as a broken mask. - docs: magpie.icon also shows on the Discover card (en, zh, ja). agent-aider 0.1.1 (magpie-community/plugins bcc94e5) gives aider.chat's icon as magpie.icon and agent.icon. Ran: - go test ./internal/plugin ./internal/gui; go test ./internal/provider alone (504s, pass); go test ./... otherwise ok. - gofmt -l; vet linux/windows ./internal/plugin. - internal/gui/tests/plugin*.test.cjs in chromium+webkit; plugin-agent's new check goes red (11 fail) with the card reading l.icon only. - Sandbox HOME with the real npm package 0.1.1: the Discover card, Installed row and Agents row all show Aider's icon, in chromium and webkit at 1100 and 420. |
||
|
|
cb406c8425 |
plugins: a plugin can add an agent magpie has no setup of its own for
Plugins could be subscription providers or gateway middleware. Now a third
kind: an agent plugin, so a user whose agent magpie doesn't ship can still
put it on magpie.
- internal/agentplug: a plugin's magpie.agent module (or a *.agent.js file)
exports agent = {id, name, config, format?, model, prefix?, bin?, dir?,
ua?, icon?, notice?} and an optional connect({gateway, model, models,
agent}) returning the other keys to write. Compiled in moejs, reloaded
when plugins.json or the file changes; why one didn't load is kept.
- internal/jsmod: module compiling (imports kept inside the plugin), moved
out of middleware so both share it.
- internal/agent/plugged.go: each becomes an Agent (Plugin set) after
magpie's own. JSON, YAML and env files are edited key by key, comments
kept; what each key held is stashed typed under plugin:<id>:<path>, and
its own model or Disconnect puts every key back. A built-in id is
refused; a connect that throws writes nothing. Key magpie-<id>; usage
names it by key or ua (usage.PluginAgents).
- GUI Plugins page: an Agent kind chip and glyph, a Discover "Agents"
section (market kind "agent"), and an installed row line "Adds X to
Agents" or why it didn't load. zh, zh-TW, ja, de strings.
- Docs: site Plugins page (en, zh, ja) "Agent plugins", reference.md,
agent-wiring.md, gateway-middleware.md.
Run:
- go test ./... (all ok); gofmt -l clean; GOOS=linux go vet -tags nogui
./... and GOOS=windows go vet ./... clean.
- TestPluggedYAML, TestPluggedJSONUnwire, TestPluggedRefused.
- GUI: plugin-agent.test.cjs 22/22 (en, zh, zh-TW, ja, de; 980 and 420;
chromium and webkit); all plugin-*.test.cjs, i18n-keys,
deprecated-subscriptions, filter-ime: 315 pass, 0 fail.
- Real use, in a sandbox HOME: an Aider plugin (~/.aider.conf.yml, prefix
openai/, connect writes openai-api-base/key) installed in a dev build;
picking DeepSeek V4.1 Flash on the Agents page wired the file keeping the
user's comment and keys; real aider 0.86.2 `--message` answered through
magpie from the real DeepSeek account; usage.jsonl recorded agent aider,
provider deepseek, 200; Disconnect restored the file byte for byte.
|