Improve editor, plugin updates, and window transfers for 0.1.41

This commit is contained in:
Knotty Wyvern
2026-10-21 10:42:44 -07:00
parent 68e86ab6eb
commit 42dd0fa711
56 changed files with 2313 additions and 221 deletions
+19 -12
View File
@@ -28,7 +28,7 @@ The local source folder is `../RuneStone_Terminal/` when both repositories share
No plugin starts automatically in a fresh installation.
The application build does not include these packages. Package builds include their JavaScript dependencies and terminal styles.
Build them again after source changes, then uninstall the old version and install the new ZIP.
Build them again after source changes, then select the new ZIP through Install plugin ZIP.
The old bundled switches no longer apply. Existing terminal appearance settings remain available after installation.
Formula source stays in Markdown files when the plugin is absent, disabled, or removed.
Native pseudo-terminal services remain in the desktop host. The Terminal package supplies the interface, shortcuts, and session controls.
@@ -55,7 +55,11 @@ External plugins run with RuneStone's application access. Enable only code you t
Package metadata and hashes do not verify a publisher's identity. This version has no permission sandbox or marketplace.
Scanning and installation do not execute code, install dependencies, or run installation scripts.
Plugins cannot overwrite an existing ID. Uninstall the previous package before installing another version.
A package with an installed ID updates that plugin after review. Choose Apply packages to replace its files.
The review shows the current and new versions. Updates keep plugin settings and the previous enabled state.
RuneStone stops the plugin in every window and waits for cleanup before replacement. Cleanup failure blocks replacement.
An interrupted update restores the old package unless the new catalog entry committed.
Automatic repository scans remain future work.
Each package succeeds or fails independently. The result identifies any failures.
A changed source requires a new review. Cancelling the review removes its temporary copies.
@@ -116,7 +120,8 @@ Staging directories never participate in plugin discovery.
Each reviewed candidate belongs to one window and expires after 30 minutes.
Rust checks the source and staged content hashes before publishing a complete directory.
A duplicate destination blocks publication. A crash cannot enable a partial installation.
An untracked destination blocks publication. Reviewed updates pin the installed package hash and retain a recovery journal.
A crash cannot enable a partial installation.
Removal plans belong to one window and expire after five minutes.
The backend accepts a single-use removal token when the user confirms deletion.
@@ -344,9 +349,6 @@ export function activate(api) {
| --- | --- |
| `api.id` | The installed plugin ID |
| `api.signal` | An abort signal triggered before shutdown |
| `api.i18n.locale` | Current interface language: `en`, `fr`, `ja`, or `zh-CN`. Optional API |
| `api.i18n.t(message, values?, catalogs?)` | Translate an explicit interface message with optional plugin catalogs and named placeholders |
| `api.i18n.subscribe(listener)` | Receive the current language immediately and subsequent changes. Returns cleanup and stops when the plugin is disabled |
| `contribute(key, value)` | Register a typed terminal or table formula contribution |
| `registerCommand({ id, title, run })` | Add a command to Commands in the toolbar |
| `registerCommand({ category: "open", ... })` | Add a launch action to Open tab or view |
@@ -393,12 +395,9 @@ Settings loads enabled plugins so their configuration pages remain available in
The host calls `mount(container, context)` with `context.surface` set to `"settings"` or `"view"`.
Older hosts can omit the context argument.
The optional language API shares the language selected in General settings across plugin views and windows.
Plugins supply their own catalogs for plugin-specific text. A missing message falls back to the shared host catalog, then its English source.
For example, `api.i18n?.t('Hide column', {}, { fr: { 'Hide column': 'Masquer la colonne' } }) ?? 'Hide column'`.
Use a subscription to refresh interface labels after a language change. Dispose a view's subscription when that view closes.
Translate explicit interface text only. Keep document text, filenames, board names, IDs, and keyboard identifiers unchanged.
Existing packages retain their current language until their source adopts this API and supplies catalogs.
The language setting applies to RuneStone's interface. The host does not translate plugin interfaces or supply a plugin translation API.
Plugin authors can manage translations within their own packages.
Local Autocomplete keeps temporary reference text in its editor view because that text belongs to one window.
Open Commands → Configure Local Autocomplete in that window to use reference text.
@@ -554,3 +553,11 @@ Each window keeps its own sequence. The plugin settings API shares folder and pl
Slideshow stores per-image fit, position, and overlay in .runestone-backgrounds.json beside the images. The sidecar uses schema 1 and an images object. Settings saves compare the previous file text to preserve external changes. The sidecar has a 1 MiB limit.
Portrait images show the full image over a blurred cover layer by default. Each target scales the foreground and blurred layer separately. The image editor shows a preview and lets users save or reset an override. Global settings remain the fallback for other images.
The optional background API adds readImageSettings and writeImageSettings. Temporary frames can supply blurredUrl. The plugin owns all frame URLs and releases them after replacement or shutdown.
### View launch defaults
Views can supply an optional `launch()` handler for entry through the plugin launcher or navigation button.
The handler can select a default view with `api.openView(id)`.
Explicit `api.openView` calls and restored tabs bypass the launch handler and retain their targets.
Views without a handler open as before. Older hosts ignore this optional field.
Project Management uses this handler for its fixed workspace default board.