d3fc6f2bfada18e6ae7887b79ed1e4c650ca37e1
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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
|
||
|
|
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. |