mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3373] [GUI] Add Opt-In Local Model Extension Outside The App Installation #4597
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4597
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3373
Author: @medking82
Created: 10/20/2026
Status: 🔄 Open
Base:
main← Head:codex/upstream-local-model-extension📝 Commits (7)
98f8da6Add opt-in local model extension with portable owner protocol and UI examples71e2610fix: mount one connected model card per Storage panel06d4b38docs: record installed App 0.2.2 acceptance and limitsf280c61docs: link historical Storage examples to current acceptance3d08355docs: add native launch and default agent budget follow-up1a6c5b7docs: bind completed native Tray lifecycle validation5d93f82docs(extension): reconcile final staged agent acceptance📊 Changes
33 files changed (+3990 additions, -0 deletions)
View changed files
➕
tools/local-model-extension/.gitignore(+4 -0)➕
tools/local-model-extension/README.md(+158 -0)➕
tools/local-model-extension/examples/current-model-in-app.png(+0 -0)➕
tools/local-model-extension/examples/current-model.png(+0 -0)➕
tools/local-model-extension/examples/manage-models.png(+0 -0)➕
tools/local-model-extension/examples/render.mjs(+112 -0)➕
tools/local-model-extension/examples/storage.png(+0 -0)➕
tools/local-model-extension/extension.example.json(+8 -0)➕
tools/local-model-extension/extension_bridge.mjs(+147 -0)➕
tools/local-model-extension/extension_bridge.test.mjs(+126 -0)➕
tools/local-model-extension/extension_manager.py(+219 -0)➕
tools/local-model-extension/host-preload.mjs(+34 -0)➕
tools/local-model-extension/host-preload.test.mjs(+46 -0)➕
tools/local-model-extension/launch.py(+42 -0)➕
tools/local-model-extension/owner_api.mjs(+155 -0)➕
tools/local-model-extension/owner_api.test.mjs(+155 -0)➕
tools/local-model-extension/package/manifest.json(+12 -0)➕
tools/local-model-extension/package/ui.test.mjs(+848 -0)➕
tools/local-model-extension/package/ui/api.mjs(+59 -0)➕
tools/local-model-extension/package/ui/connected.css(+4 -0)...and 13 more files
📄 Description
Problem and result
A Strata server managed outside the App can be usable through an API connection while Manage Models and Storage show no native downloads. Customizing bundled frontend files to expose that connection also conflicts with App updates.
This opt-in companion adds Current Model and isolated Connected Local Models cards while retaining the official catalog, download library and component updater. It uses the managed Tray as the sole lifecycle owner. No model files are moved or copied, and connected models do not become native prepared/downloaded rows.
Related discussion
Scope proposal #3369; depends on the optional owner protocol in #3365. Ready for review. Scope agreement has not yet been obtained; review is requested alongside that discussion. It changes no defaults. Reasoning effort stays in the official composer; the separate API effort fix is #3363.
Approach
All changes are new files under
tools/local-model-extension/, based onmainate88ee39d. Existing engine, server, frontend, setup, installer and updater files are byte-identical to that base (git diff e88ee39d -- . ':!tools/local-model-extension'is empty).An explicit external launcher adds a Node preload only to its App child. It checks the exact host entrypoint and listening port, preserves existing
NODE_OPTIONS, and serves one versioned Shadow DOM/iframe UI package through a separate namespace. Package hashes, inventory, App 0.2.x and Bridge API 1 are checked before injection. Missing, disabled, corrupt or incompatible packages leave the original host listener in place. Activation, disable and rollback are outside the App install folder.The companion accepts configurable loopback ports and physical model IDs, with optional display labels. It cross-checks the fresh owner snapshot with live API metadata. Context choices come from the actual native catalog; selected and effective values remain distinct. Idle choices are Never/5/10/30 Minutes. Explicit context, idle, preload and unload requests enter the existing Tray serial worker via atomic file IPC, with execution-time identity checks and durable acknowledgments. The companion never starts an inference server or bypasses owner drain/authentication through direct HTTP load/unload calls.
Use In Chat requires one existing App connection with the same API URL and physical ID. It preserves authentication and unrelated rows, updates confirmed display/capacity metadata, then selects the exact official picker entry after an explicit action. It does not change effort, Fast, permissions or client settings. The package contains no private model allowlist, Codex dependency, account details or local user paths.
Examples
Anonymous simulated fixtures from predecessor
98f8da6a, predating the App 0.2.2 Storage correction, rendered from the production extension assets and the actualNativeModels/SettingsStorageReact components. These are UI render examples, not evidence of inference, actual memory fit or an installed App update. Original user screenshots were not uploaded. Captions identify the simulated state; no private paths, credentials or model IDs are present.Current Model
Manage Models — the native dialog is scrolled to the connected card's actions.
Storage — native directories and download counts remain unchanged.
Current Model opened inside the App fixture. Generation source and setup instructions are in the added README; no original personal screenshot is used.
Validation
Windows 11 x64, native App/Host 0.2.2, Control/engine 0.1.47, RTX 5080, Python 3.12.10 and Node 24.12.0. Acceptance report and sanitized receipt bind source, immutable packages and observations. Current head
5d93f82de0a00e123ffc23b41315584d744f4978changes documentation only; runtime fix remains71e26101, package1.0.0-088a8606771d.Passed:
OKwith child-onlySTRATA_AGENT=off.2 !== 1; one enclosing-panel anchor fixed it. The corrected package was rechecked in the actual App, including Storage Use In Chat, both native sections/counts and scrolling.e88ee39d; diff checks passed.Failed or limited:
f273ef65: final v2 passed full Harness build/deploy/staging (9 gates), authenticated boot, 10 focused and 12 staged tests. Native App 0.2.2 completed a realreadand displayed READY-3684 (wire caps 298 / 242); four further real-model turns, including two reads, answered withstopand finished at 7106 context tokens. Its source-bound report separates native acceptance from scripted 16K compaction. Installed Harness and the Extension package remain unchanged. Combined patched-Harness/portable-companion acceptance was not run.Not run:
Limits
Scope still needs agreement in #3369; the updated issue comment requests confirmation. This is an optional external companion, not a supported general plugin API or a guarantee for arbitrary future App layouts. It requires the managed Tray candidate and one matching existing API connection. No default path, effort, Fast, permissions, updater or model library was changed. File IPC stays private; interrupted requests are not replayed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.