55b0d7c24ecb3ea01dad930e7a4eccdf48539fe5
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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
|
||
|
|
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
|
||
|
|
5a2414acdd |
plugins: every built-in plugin starts on, a new install's too
The owner (10-17): "所有的内置插件默认都应该是开启的", "尤其对新用户来说…… 不然新用户都不知道有哪些功能". Since |
||
|
|
1eaf1e890a |
gui: Sessions is a plugin's page, its script, styles and words under assets/plugins/sessions (P2)
The first page of P2 to leave app.js's core. sessions.js and sessions.css
move to assets/plugins/sessions/ (client.js, sessions.css). The page
registers through the kernel as magpie.plugin("sessions"): mount takes its
<main>, which the kernel now makes, open and relang read it again, and
reveal is the Usage page's way in. window.loadSessionsPage and
window.openSessionOnPage are gone. app.js reaches the page only through
magpie.call, and show() takes a page's title from its part. The plugin's
manifest lists i18n.js, sessions.css and client.js.
Words: the kernel's magpie.strings(dict) adds a plugin's words to I18N.
A key that is already there is logged and not taken, since the later one
would silently win. The 65 keys only the Sessions page says (own-keys over
every asset, Go and index.html) move, as written, from i18n.js to
plugins/sessions/i18n.js. tests/strings.cjs reads i18n.js and every
plugin's i18n.js as the page has them. gui-de/ja/zh-tw use it, and
i18n-keys now checks that no key is said twice across files and that a
plugin's words are in every language. TestBuiltinClientsLoaded takes a
.css entry as a <link> in <head>, and a script between kernel.js and
app.js.
Docs: plugin-runtime.md (Words, Pages moved out: Sessions), gui-shell.md,
gateway-sessions.md.
Run:
- go test ./internal/gui/ ./internal/pluginrt/ ./internal/gateway/: ok.
- gofmt clean. go vet darwin, GOOS=linux -tags nogui and GOOS=windows on
gui, pluginrt and plugins: clean.
- GUI, in both chromium and webkit, 40 files, all green:
- the sessions-* and sess-* tests, session-identity, routing-sessions,
account-mask-sessions, usage-session*, gateway-conversations;
- plugin-kernel, the plugin-move* tests, font-cascade, win-fonts;
- i18n-keys, gui-de, gui-ja, gui-zh-tw.
- session-terminal's red under parallel load is the same on origin/main
|
||
|
|
2dcc51417e |
plugins: the window gets a plugin kernel, and the Gateway page is the first page a plugin draws (P1)
P1 of docs/subsystems/plugin-runtime.md. P0 ( |
||
|
|
3ccbe6bc15 |
plugins: a runtime for built-in plugins, and Plugins › Built-in to switch them (P0)
Lxxyx on X (https://x.com/Lxxyx_/status/2109506752656150974): magpie has too much in it. This is P0 of making magpie's parts plugins, as DeepSeek Harness does: a runtime, plugins.yml, and the first five built-in plugins the user can switch off. - internal/pluginrt: a registry (Register from init), a manifest (API caret range, Requires/Provides, Essential, InUse, Apply, Parts, Defaults) and Reconcile: the plugins no longer wanted, with whatever needs a service they provided, are disposed newest first; the wanted ones are applied once their services are there. A plugin that fails or panics is failed and the rest run. TestPluginsImportOnlyCore keeps the boundary: nothing outside plugins/ imports one, none imports another. - plugins.yml (appdir.Config()): default → preset (essentials | all) → the user's rows → in use. A new install is written Essentials, a magpie that ran here before (settings.RanBefore) All, so existing users keep everything. Writes are locked, whole and keep a .bak; a file that doesn't parse is an error, never empty, and is never written over. - plugins/groups, library, otel, sessions, warmups. In P0 a plugin off is the window's alone: its page, sections and rows (data-feature) leave the window; the gateway, TUI and CLI serve the same, nothing is deleted. One in use stays on. - The window: Plugins › Built-in, the first tab, a switch per plugin; GET/POST /api/plugins/builtin; boot.js says which are off before the first paint. CLI: magpie plugin builtin [on|off <id>], plugin preset, plugin dump [--json]. - docs/subsystems/plugin-runtime.md, gui-shell.md. Run: go test ./internal/pluginrt/ ./internal/settings/ ./internal/gui/; gofmt -l; go vet ./...; GOOS=linux go vet -tags nogui ./...; GOOS=windows go vet ./.... GUI: builtins.test.cjs in Chromium and WebKit, 5 languages, 1100/800/420; list-sort, mobile-web, routing-keys-fold, routing-sessions pass. By hand under a sandbox HOME: a new install gets essentials, an existing one all, a broken plugins.yml is refused and kept, dump works. Full suite results after the rebase are in the push notes. |