Paths in comments, usage lines and READMEs: apps/host and apps/desktop are app/host and app/desktop since the layout move

The move of apps/ to app/ in 0.2.16 left the old names in comments, docstrings, usage lines of scripts ("python apps/desktop/scripts/stage-control.py ...", "cd apps/host") and in a few READMEs. A search of every code path (string literals, join() arguments, imports, workflows, build files) found none still pointing at apps/: the only code use of "apps" left are the Harness's own apps/cli folder and tools/layout (the move scripts, kept as they were). So this changes text only: 131 replacements in 88 files. history/apps/..., @tauri-apps/... and apps/cli are left alone. terminal/strata_control/app_policy.py writes a header line that is also in app/host/server/policy-generated.mjs; both changed together (tests/terminal/test_app_policy.py passes).
This commit is contained in:
Niko1221 committed 2026-11-20 07:11:56 +01:00
1 parent cc06e2d26d
commit 3142b66b96
88 files changed
+126 -126

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""The installed Windows app, closed every way, with a stub engine: nothing may be left running.
python apps/desktop/scripts/app-close-matrix.py --install <folder the installer wrote> [--scenarios all] [--report out.json]
python app/desktop/scripts/app-close-matrix.py --install <folder the installer wrote> [--scenarios all] [--report out.json]
For each case it starts the REAL installed `strata-desktop.exe` (its window opens), loads a stub engine through the host's API
(profile + `runtime start` under Control's owner runtime, exactly the app's path), records every process of the tree (the app,
+1 -1
View File
@@ -6,7 +6,7 @@ start-up by reading its own `.dynamic` section through a fixed offset in its cod
as a library to fix up and rewrites its RPATH; for a static PIE that moves `.dynamic` to a new segment and leaves the old place filled with a filler
byte, so the start-up code reads garbage. Reporters on #4337 see the same crash offset in every run (`rg + 0x3ffcf1`) and filler bytes (0x5A) where
`.rela.dyn` and `.dynamic` were. A static PIE whose `.dynamic` is filled does not start: tools/test_appimage_elf.py shows that on a real one.
apps/desktop/scripts/repack-appimage.sh puts the staged bytes back; this file is the check that says whether it did.
app/desktop/scripts/repack-appimage.sh puts the staged bytes back; this file is the check that says whether it did.
appimage_elf.py scan <folder> every static PIE under <folder> must have a sound .dynamic (exit 1 if not)
appimage_elf.py compare <staged-folder> <folder> the same files, byte for byte, plus what differs in their ELF headers
+1 -1
View File
@@ -4,7 +4,7 @@
# install anything whose digest does not match. Not committed output: node.exe is a ~90 MB binary.
#
# Usage:
# powershell -NoProfile -ExecutionPolicy Bypass -File apps\desktop\scripts\fetch-node.ps1
# powershell -NoProfile -ExecutionPolicy Bypass -File app\desktop\scripts\fetch-node.ps1
# ... -File fetch-node.ps1 -Check # verify what is already installed
# ... -File fetch-node.ps1 -FromFile node.zip # verify and install a zip you already have (offline)
#
+3 -3
View File
@@ -11,9 +11,9 @@
# not match the recorded digest.
#
# Usage:
# apps/desktop/scripts/fetch-node.sh # host platform
# apps/desktop/scripts/fetch-node.sh --target linux-x64
# apps/desktop/scripts/fetch-node.sh --check # verify what is already installed
# app/desktop/scripts/fetch-node.sh # host platform
# app/desktop/scripts/fetch-node.sh --target linux-x64
# app/desktop/scripts/fetch-node.sh --check # verify what is already installed
#
# The Node version must satisfy the App Host's own `engines.node` (>= 24.12.0).
set -euo pipefail
+2 -2
View File
@@ -3,7 +3,7 @@
* The first run of the installed app, headless: the host as the Tauri shell starts it (STRATA_PACKAGED=1, STRATA_NO_ACQUIRE=1,
* the staged Control, nothing installed, nothing in the per-user folders) and Chrome on its onboarding.
*
* node apps/desktop/scripts/first-run-ui.mjs [--control <staged control>] [--node <node.exe>] [--work <scratch>] [--shots <dir>]
* node app/desktop/scripts/first-run-ui.mjs [--control <staged control>] [--node <node.exe>] [--work <scratch>] [--shots <dir>]
*
* Checks, one line each (exit 1 if any fails):
* the host answers; /api/native has a real catalog (families with sizes), a recommendation and the GPUs of this PC
@@ -40,7 +40,7 @@ const check = (ok, label, detail = '') => { console.log(`${ok ? 'ok ' : 'FAIL'}
const delay = ms => new Promise(r => setTimeout(r, ms));
const freePort = async () => { const s = createServer(); await new Promise(r => s.listen(0, '127.0.0.1', r)); const p = s.address().port; await new Promise(r => s.close(r)); return p; };
for (const need of [nodeExe, join(control, 'strata.py'), join(repoHost, 'dist', 'index.html')]) if (!existsSync(need)) { console.error(`missing ${need} (run stage-control.py, fetch-node and "npm run build" in apps/host first)`); process.exit(2); }
for (const need of [nodeExe, join(control, 'strata.py'), join(repoHost, 'dist', 'index.html')]) if (!existsSync(need)) { console.error(`missing ${need} (run stage-control.py, fetch-node and "npm run build" in app/host first)`); process.exit(2); }
const dirs = { home: join(work, 'home'), appdata: join(work, 'appdata'), local: join(work, 'local'), components: join(work, 'local', 'Strata', 'components') };
for (const d of Object.values(dirs)) mkdirSync(d, { recursive: true });
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Prove the INSTALLED app layout can start and stop an engine with nothing acquired, using a stub engine.
*
* node apps/desktop/scripts/installed-flow.mjs --install <folder the installer wrote> [--work <scratch>] [--spy <acquire-spy.mjs>]
* node app/desktop/scripts/installed-flow.mjs --install <folder the installer wrote> [--work <scratch>] [--spy <acquire-spy.mjs>]
*
* It starts the installed host with the installed node.exe exactly as the Tauri shell does (STRATA_PACKAGED=1,
* STRATA_NO_ACQUIRE=1; Control found beside the host), against a scratch component folder holding a fake engine
+2 -2
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env node
/**
* Mock-ups of the Windows installer in Strata's own look: four screens (welcome, where, installing, done), light and dark, drawn with
* the app's built CSS (apps/host/dist) and brand files, then photographed with Chrome. Nothing here is built or shipped: it is what
* the app's built CSS (app/host/dist) and brand files, then photographed with Chrome. Nothing here is built or shipped: it is what
* the owner is shown before an installer is chosen.
*
* node apps/desktop/scripts/installer-mockups.mjs [--out <folder>]
* node app/desktop/scripts/installer-mockups.mjs [--out <folder>]
*/
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
import { dirname, join, resolve } from 'node:path';
+2 -2
View File
@@ -1,11 +1,11 @@
#!/usr/bin/env node
/**
* The app and installer icon, refined from the existing Strata mark (apps/host/public/brand/strata-mark-*.svg and the current
* The app and installer icon, refined from the existing Strata mark (app/host/public/brand/strata-mark-*.svg and the current
* icons/icon.png): the same three rounded bars on the same dark tile, in the same colours. Nothing is redrawn. What changes is
* how it is cut for small sizes: at 16-48 px the bars are snapped to whole pixels and made a little bolder and wider so they
* stay crisp instead of blurring; from 64 px up the geometry is the mark's own proportions.
*
* node apps/desktop/scripts/make-icons.mjs [--out <folder>] writes icon-<size>.png for every size and icon.ico
* node app/desktop/scripts/make-icons.mjs [--out <folder>] writes icon-<size>.png for every size and icon.ico
*/
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
import { dirname, join, resolve } from 'node:path';
@@ -3,7 +3,7 @@
* The installer's pictures, drawn from the app's own design: the light surface and ink colours of the app (src/styles tokens), the
* brand lockup and mark files, GT Walsheim Bold for the words (baked into the pictures, because NSIS cannot use a web font).
*
* node apps/desktop/scripts/make-installer-images.mjs [--out <folder>] [--preview <folder>]
* node app/desktop/scripts/make-installer-images.mjs [--out <folder>] [--preview <folder>]
*
* Writes sidebar.bmp (164x314, the welcome and finish pages) and header.bmp (150x57, the other pages) as 24-bit BMPs, and with
* --preview the same as PNGs at 3x.
+2 -2
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
# Write a tester's README with the checksums and sizes of the files it names, computed from the files themselves.
#
# apps/desktop/scripts/make-tester-readme.sh <template> <out.txt> --appimage <file name> --files-dir <dir> [--files-dir <dir> ...]
# app/desktop/scripts/make-tester-readme.sh <template> <out.txt> --appimage <file name> --files-dir <dir> [--files-dir <dir> ...]
#
# Why: a README that carries a hand-pasted sha256 goes stale the moment the file is rebuilt (the Ubuntu 26.04 tester compared the file
# with the old build's hash). The template holds placeholders instead, and this script fills them from the real files:
# @APPIMAGE@ the AppImage's file name
# @APP_VERSION@ the app version, read from apps/desktop/src-tauri/Cargo.toml
# @APP_VERSION@ the app version, read from app/desktop/src-tauri/Cargo.toml
# @SHA256:<name>@ sha256 of the file <name> found in one of the --files-dir folders
# @SIZE_GB:<name>@ its size in GB with one decimal
# @INCLUDE:<file>@ (alone on a line) the contents of <file> from the template's folder, with the same placeholders
+3 -3
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Put the bundled payloads back to the bytes they were staged with, inside a finished AppImage.
#
# apps/desktop/scripts/repack-appimage.sh <in.AppImage> <out.AppImage> [--resources <src-tauri/resources>] [--check]
# app/desktop/scripts/repack-appimage.sh <in.AppImage> <out.AppImage> [--resources <src-tauri/resources>] [--check]
#
# Why: Tauri hands the AppDir to linuxdeploy, which treats every ELF file under usr/lib as a library to fix up: it rewrites the RPATH of
# the engine (strata, libstrata_kq.so, libcudart), of the bundled Python and Node and of the Harness's native modules. The files then no
@@ -78,7 +78,7 @@ done
elf_and_rg_check || { echo "the restored AppDir failed the static PIE / ripgrep check; not packing" >&2; exit 1; }
# The launcher records the environment the AppImage was started from, before its own hooks add the AppImage's libraries and GTK/GIO
# settings (LD_LIBRARY_PATH, GTK_*, XDG_DATA_DIRS ...). The host gives it back to every program that is not Strata's own (zenity,
# kdialog, xdg-open, the assistant's shell): apps/host/server/external-env.mjs. Without it a system program loads the AppImage's libssl
# kdialog, xdg-open, the assistant's shell): app/host/server/external-env.mjs. Without it a system program loads the AppImage's libssl
# and dies ("OPENSSL_3.2.0 not found"). The line goes right after `this_dir=...`, ahead of every hook.
if ! grep -q STRATA_ORIGINAL_ENV "$WORK/AppDir/AppRun"; then
sed -i '/^this_dir=/a # Strata: the environment this AppImage was started from (given back to programs that are not Strata'"'"'s own)\nexport STRATA_ORIGINAL_ENV="$(env -0 | base64 -w0)"' "$WORK/AppDir/AppRun"
@@ -89,7 +89,7 @@ head -c "$OFFSET" "$IN" > "$OUT"
cat "$WORK/app.squashfs" >> "$OUT"
chmod +x "$OUT"
# The checksum is computed here, from the finished file, every time: a README or a note must take it from this file
# (apps/desktop/scripts/make-tester-readme.sh) and never from an older build.
# (app/desktop/scripts/make-tester-readme.sh) and never from an older build.
( cd "$(dirname "$OUT")" && sha256sum "$(basename "$OUT")" > "$(basename "$OUT").sha256" )
echo "repacked: $OUT ($(stat -c %s "$OUT") bytes)"
cat "$OUT.sha256"
+4 -4
View File
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
"""Stage the Control component the installer ships: src-tauri/resources/control.
python apps/desktop/scripts/stage-control.py # build the terminal bundle, stage it
python apps/desktop/scripts/stage-control.py --archive X.zip # stage an archive you already built
python apps/desktop/scripts/stage-control.py --wheelhouse DIR # build with no network (wheels from DIR)
python apps/desktop/scripts/stage-control.py --check # verify what is staged
python app/desktop/scripts/stage-control.py # build the terminal bundle, stage it
python app/desktop/scripts/stage-control.py --archive X.zip # stage an archive you already built
python app/desktop/scripts/stage-control.py --wheelhouse DIR # build with no network (wheels from DIR)
python app/desktop/scripts/stage-control.py --check # verify what is staged
What lands in `control/`: the pinned CPython 3.12.15 (python-build-standalone, digest-checked), the hash-locked wheels
(`packaging/locks/runtime-<target>-cp312.txt`, installed with --require-hashes at build time), strata_control,
+1 -1
View File
@@ -3,7 +3,7 @@
* Stage the DeepSeek Harness (pinned, MIT) as the installer's `harness/` folder: a pruned PRODUCTION install, built at
* build time, so nothing is fetched or compiled on the person's PC.
*
* node apps/desktop/scripts/stage-harness.mjs --src <built Harness checkout> [--out apps/desktop/src-tauri/resources/harness]
* node app/desktop/scripts/stage-harness.mjs --src <built Harness checkout> [--out app/desktop/src-tauri/resources/harness]
*
* <built Harness checkout> is a clone of the pinned commit after `pnpm install --frozen-lockfile` and `pnpm run build:artifacts`
* (see phaseA-tests/notes-split-s4a.md, step 1). The script never touches it: it runs `pnpm deploy --legacy --prod` into
+1 -1
View File
@@ -3,7 +3,7 @@
* Headless UI flows of the installed app against a packaged host with a FAKE installer and a FAKE engine (nothing is
* downloaded, no real engine runs; the real Control starts the fake engine through the owner runtime):
*
* node apps/desktop/scripts/ui-flows.mjs [--control <staged control>] [--node <node.exe>] [--shots <dir>] [--only download,models,tune,fail,theme]
* node app/desktop/scripts/ui-flows.mjs [--control <staged control>] [--node <node.exe>] [--shots <dir>] [--only download,models,tune,fail,theme]
*
* download the onboarding download: ONE combined bar over both files, an ETA in minutes left of Stop, Finish later closes the
* pop-up with the download still running, the Models screen shows the same progress, Stop stops it
@@ -1,3 +1,3 @@
# built by apps/desktop/scripts/stage-control.py, never committed
# built by app/desktop/scripts/stage-control.py, never committed
*
!.gitignore
@@ -1,6 +1,6 @@
# The private Node runtime is a build input, not source.
#
# It is a 117 MB platform binary that would bloat every clone and cannot be reviewed in a diff.
# `packaging/README.md` and `apps/desktop/scripts/fetch-node.sh` record exactly how to obtain it:
# `packaging/README.md` and `app/desktop/scripts/fetch-node.sh` record exactly how to obtain it:
# the official nodejs.org build for the target, verified against its published SHA-256.
/node
+4 -4
View File
@@ -295,7 +295,7 @@ fn resource_dir(app: &tauri::AppHandle) -> Result<PathBuf, String> {
return Ok(plain_path(dir));
}
}
// development: apps/desktop/src-tauri -> ../../host and ./resources
// development: app/desktop/src-tauri -> ../../host and ./resources
let manifest = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
Ok(manifest)
}
@@ -1006,14 +1006,14 @@ fn open_window(app: &tauri::App, port: u16, shell_token: &str) -> Result<(), Box
let builder = WebviewWindowBuilder::new(app, "main", WebviewUrl::External(url)).title("Strata").inner_size(1440.0, 920.0).min_inner_size(900.0, 600.0)
.devtools(devtools_wanted(std::env::var("STRATA_DEVTOOLS").ok().as_deref()));
// Dropping pictures on the chat (QA report 1, item 4). Windows: the shell's own file-drop handler is off, because with it on the system hands
// the dropped file to the shell and the page never sees it; with it off the page gets ordinary drag and drop events (apps/host DropZone), as
// the dropped file to the shell and the page never sees it; with it off the page gets ordinary drag and drop events (app/host DropZone), as
// in a browser. Linux and macOS: the page gets the drag events but WebKit gives it no files, so the handler stays on and the shell passes the
// drop on (see drop_script and hand_over_drop below).
#[cfg(windows)]
let builder = builder.disable_drag_drop_handler();
// WebKitGTK (2.50 to 2.52 at least) dereferences a null pointer in AcceleratedBackingStore::update in its UI process when a page calls
// document.startViewTransition (the web process asks the UI process to enter accelerated compositing, and the backing store is not
// there). The page itself does not call it on that engine (apps/host/src/lib/router.ts), and this line keeps any other script from doing
// there). The page itself does not call it on that engine (app/host/src/lib/router.ts), and this line keeps any other script from doing
// it either: the API is simply absent, as in older WebKit versions.
#[cfg(target_os = "linux")]
let builder = builder.initialization_script(
@@ -1223,7 +1223,7 @@ fn pointer_buttons_up(widget: &webkit2gtk::WebView) -> bool {
!mask.intersects(gtk::gdk::ModifierType::BUTTON1_MASK | gtk::gdk::ModifierType::BUTTON2_MASK | gtk::gdk::ModifierType::BUTTON3_MASK)
}
/// The script that tells the page a file drag is over the window (`state` is "enter" or "leave"); the page shows its drop box (apps/host DropZone).
/// The script that tells the page a file drag is over the window (`state` is "enter" or "leave"); the page shows its drop box (app/host DropZone).
#[cfg_attr(windows, allow(dead_code))]
fn drag_script(state: &str) -> String {
format!("window.dispatchEvent(new CustomEvent('strata:native-drag', {{ detail: '{state}' }}));")
+1 -1
View File
@@ -9,7 +9,7 @@
//! - which failures are worth a reload (the page's own renderer; not a GPU process that restarts by itself, not a frame of the page);
//! - how many automatic recoveries are allowed in a window of time (a renderer that dies again at once is not reloaded for ever);
//! - where the reload goes: the same screen first, with the sidebar previews closed once; the home screen the second time.
//! The page reads `?recovery=<n>` in apps/host/src/lib/recovery.ts. The chats are the host's: nothing here touches them.
//! The page reads `?recovery=<n>` in app/host/src/lib/recovery.ts. The chats are the host's: nothing here touches them.
/// Automatic recoveries allowed inside `WINDOW_MS`; the next failure leaves the window as it is for the person to reload.
pub const MAX_AUTOMATIC: usize = 2;
+1 -1
View File
@@ -1,7 +1,7 @@
//! The shell's own choices and the two things the host asks of it besides updates (#3402, #3477).
//!
//! `<Strata data folder>/shell-prefs.json` is written by the App Host when the person changes a setting
//! (`apps/host/server/shell-prefs.mjs`) and read here when Strata starts, before any page exists:
//! (`app/host/server/shell-prefs.mjs`) and read here when Strata starts, before any page exists:
//!
//! { "port": 0 | 1024..65535, "tray": false, "language": "en" }
//!
+1 -1
View File
@@ -10,7 +10,7 @@ You need **Node 24.12 or newer** (`engines` in `package.json`) and npm. Nothing
sibling design folder.
```sh
cd apps/host
cd app/host
npm ci
npm run build # makes dist/, which the preview and `npm run serve` need (dist/ is not checked in)
npm run preview:ui # simulated hardware and models; open http://localhost:5272/#/models
+1 -1
View File
@@ -2,7 +2,7 @@
The French texts live in src/locales/fr.json, fix-fr.json, tune-fr.json and tools-fr.json, next to the other languages.
They are edited by hand (they are the translations, not generated), so a string added to an English catalog later has no
French yet. This script lists and merges those. From apps/host:
French yet. This script lists and merges those. From app/host:
python scripts/fr_sync.py missing [out.tsv] write every English string that has no French yet
python scripts/fr_sync.py apply done.tsv merge translations, rewrite the four fr files in English key order
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/sav-<lang>.json: the notice for chats the host could not write (owner wording 11-04, #5192).
Run from apps/host: python scripts/make-chatsave-locales.py
Run from app/host: python scripts/make-chatsave-locales.py
Every entry names all nine languages; the keys are sav01.. in the order of S. sav-en.json is the English source. Placeholders ({0}) must be kept in every
language. A separate file keeps this work from colliding with the other catalogs (the same reason upd-, df2-, pick- and the others exist)."""
import json
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/dmg-<lang>.json: the surface for chat files the host cannot read (#5421).
Run from apps/host: python scripts/make-damaged-locales.py
Run from app/host: python scripts/make-damaged-locales.py
Every entry names all nine languages; the keys are dmg01.. in the order of S. dmg-en.json is the English source. Placeholders ({0}) must be kept in every
language. A separate file keeps this work from colliding with the other catalogs (the same reason sav-, upd-, df2-, pick- and the others exist)."""
import json
+1 -1
View File
@@ -1,7 +1,7 @@
"""Writes src/locales/df2-<lang>.json: the strings of the Drafting choice that came with the DFlash2 option (branch f-0291-df2-option): the plain-words
paragraph under the dropdown, the three lines about the person's graphics card, the "not on this card" and "no internet" lines, and the SSD line of the
This computer panel.
Run from apps/host: python scripts/make-df2-locales.py
Run from app/host: python scripts/make-df2-locales.py
Every entry names all nine languages; the keys are df01.. in the order of S. df2-en.json is the English source. Placeholders ({0}) must be kept in every
language. A separate file keeps this work from colliding with the other catalogs (the same reason pick-, tune-, tools-, fix-, gh-, ui- and engine- exist).
The English lines of df03-df07 and df09 are also written in strata_control/drafting.py and strata_control/drafting_fetch.py; tests/drafting.test.mjs keeps the two the same."""
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/engine-<lang>.json: the strings of Settings > Engine (the list of installed engines: switch, delete) and the words that now point to
About for updating (branch f-0291-engine-tab). Run from apps/host: python scripts/make-engine-locales.py
About for updating (branch f-0291-engine-tab). Run from app/host: python scripts/make-engine-locales.py
Every entry names all nine languages; the keys are et01.. in the order of S. engine-en.json is the English source. Placeholders ({0}, {1}) must be kept in
every language. A separate file keeps this work from colliding with the other catalogs (the same reason tune-, tools-, fix-, gh- and ui- exist)."""
import json
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/fix-<lang>.json: the interface strings that had no key in the locale files (#3479, #3825) and the strings of the 0.2.4.3 bug fixes.
Run from apps/host: python scripts/make-fix-locales.py
Run from app/host: python scripts/make-fix-locales.py
The keys are fx01.. in this order; fix-en.json is the English source. Placeholders ({0}, {1}) must be kept in every language."""
import json
from pathlib import Path
+1 -1
View File
@@ -1,6 +1,6 @@
"""Writes src/locales/gh-<lang>.json: the interface strings of the 0.2.7 GitHub items done in f-027-gh-app (the Monitor's Power card #3628,
approval notifications and the tray #3477, the finished-task sound #3586, the pinned port #3402, the interface size #3970).
Run from apps/host: python scripts/make-gh-locales.py
Run from app/host: python scripts/make-gh-locales.py
The keys are gh01.. in this order; gh-en.json is the English source. Placeholders ({0}, {1}) must be kept in every language.
A separate file keeps this work from colliding with the other catalogs (the same reason tune-, tools- and fix- exist)."""
import json
+1 -1
View File
@@ -1,7 +1,7 @@
"""Writes src/locales/gui-<lang>.json: the strings of the GUI feedback round 2 (branch f-0291-gui-fb2): the new name and hint of the "Leave room for my work"
choice (it keeps 5-8 GB of memory free; it was "Leave 20% for my work"), the memory-error sentence that names it, and the words of the compact files block
("Delivered to", "Working folder", "{0} files").
Run from apps/host: python scripts/make-gui-locales.py
Run from app/host: python scripts/make-gui-locales.py
Every entry names all nine languages; the keys are gf01.. in the order of S. gui-en.json is the English source. Placeholders ({0}) must be kept in every language.
A separate file keeps this work from colliding with the other catalogs (the same reason pick-, tune-, tools-, fix-, gh-, ui-, engine- and df2- exist)."""
import json
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/guic-<lang>.json: the strings of the 0.2.16 new-UI features of lane GUI-C (#6051 move a chat to another workspace, ...).
Run from apps/host: python scripts/make-guic-locales.py
Run from app/host: python scripts/make-guic-locales.py
The languages are the app's own list (LANGUAGES in src/lib/i18n.ts), not a list kept here: a language added there makes this script stop until
every entry below names it, so a new language is one step (add its text to each entry, run the script). Each entry names its text per language
code; the keys are guic01.. in the order of S, so a new string is always appended at the end. guic-en.json is the English source. Placeholders
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/net-<lang>.json: the line shown while a download server has not answered yet (lane NET, owner wording 11-10, W14).
Run from apps/host: python scripts/make-net-locales.py
Run from app/host: python scripts/make-net-locales.py
The English text is strata_control/netpolicy.py WORDS["waiting"] with {host} -> {0} and {seconds} -> {1}; setup prints it and
strata_control/progress_words.py hands it to the app as the install step's label. Every entry names all nine languages; keys are net01.. in
the order of S. Placeholders ({0}, {1}) must be kept in every language. The eight translations are first drafts for the owner's later look."""
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/pick-<lang>.json: the strings of the model version list (VersionPicker), the code-block preview button and the This computer panel (branch f-0291-ui-fixes2).
Run from apps/host: python scripts/make-pick-locales.py
Run from app/host: python scripts/make-pick-locales.py
Every entry names all nine languages; the keys are vp01.. in the order of S. pick-en.json is the English source. Placeholders ({0}, {1}) must be kept
in every language. A separate file keeps this work from colliding with the other catalogs (the same reason tune-, tools-, fix-, gh-, ui- and engine- exist)."""
import json
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/r3-<lang>.json: the strings added by the owner's GUI feedback round 3 (branch f-0291-ui-r3).
Run from apps/host: python scripts/make-r3-locales.py
Run from app/host: python scripts/make-r3-locales.py
Every entry names all nine languages; the keys are r3_01.. in the order of S. r3-en.json is the English source. Placeholders ({0}, {1}) must be kept in every
language. A separate file keeps this work from colliding with the other catalogs (the same reason pick-, upd-, df2- and the others exist)."""
import json
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/ui-<lang>.json: the interface strings of the 0.2.10 interface changes (branch f-0291-ui).
Run from apps/host: python scripts/make-ui-locales.py
Run from app/host: python scripts/make-ui-locales.py
Every entry names all nine languages; the keys are ui01.. in the order of S. ui-en.json is the English source. Placeholders ({0}, {1}) must be
kept in every language. A separate file keeps this work from colliding with the other catalogs (the same reason tune-, tools-, fix- and gh- exist)."""
import json
+1 -1
View File
@@ -1,5 +1,5 @@
"""Writes src/locales/upd-<lang>.json: the strings of the engine update beside a loaded model (the dialog of Settings > About, branch f-0291-ui-final).
Run from apps/host: python scripts/make-update-locales.py
Run from app/host: python scripts/make-update-locales.py
Every entry names all nine languages; the keys are upd01.. in the order of S. upd-en.json is the English source. Placeholders ({0}) must be kept in every
language. A separate file keeps this work from colliding with the other catalogs (the same reason pick-, tune-, tools-, fix-, gh-, ui-, engine- and df2- exist)."""
import json
+2 -2
View File
@@ -75,7 +75,7 @@ What the person chose is saved by `tools-settings.mjs` (inside the host's settin
- Tool groups (`tools-catalog.mjs`): each is one switch in plain words and is one or more preset plugins (`withoutDisabled`); `fetch` and `search` are the two halves of the Harness's `tool-web` (both off drops it). Goals off: `/goal` answers that goals are turned off.
- Web search needs no account. The default is DuckDuckGo's HTML result page (`../web-search-ddg.mjs`), with Bing's plain result page (`../web-search-bing.mjs`) as the second source. Manners, because DuckDuckGo refuses a program that asks fast: a browser User-Agent and the page's own request shape (Referer, Origin, Sec-Fetch-*), one request at a time per source, 2.5 to 4 s apart (random), at most 8 a minute, a 30 minute session cache per question, a cooldown after a refusal that doubles (1, 2, 4 ... 10 minutes, `Retry-After` honoured) during which that source gets no request, no lite-page follow-up after a refusal, one retry for a timeout or a 5xx, a 15 s limit. When every source refuses, the tool answers one plain sentence (`LIMITED_SENTENCE`: "Web search is limited right now. Try again in a minute, or add a search key (Exa, Perplexity or DeepSeek) in Settings -> Tools -> Web search.") plus an instruction to the model not to retry; the turn guard in `agent-bridge.mjs` (see Turn guard) stops a model that retries anyway. **The results come from DuckDuckGo or Bing**; they are not ranked or filtered here. The person may switch to Exa, Perplexity or DeepSeek with their own key (`../web-search-keyed.mjs`; DeepSeek uses the Harness's own provider): the key is saved in the settings file, reaches the agent only as the environment variable `STRATA_SEARCH_KEY`, never the profile file and never the screen (it only learns `keySet`). A keyed service without its key falls back to DuckDuckGo. The profile pins `web.searchProvider` to the chosen id so two usable backends cannot make the choice ambiguous.
- The browser: Playwright's MCP server (`@playwright/mcp`, staged next to the Harness by `apps/desktop/scripts/stage-harness.mjs`) on the person's own Chrome, Edge or Chromium (`browser-probe.mjs`), `--isolated` so it never sees their profile. Tools appear as `mcp__browser__browser_*`. In Manual, opening a page, clicking, typing, uploading, running a script in the page and closing tabs ask (plain reasons: "Open the web page ...", "Click on the page: ..."); looking (snapshot, screenshot, console, network, waiting, listing tabs) does not. Plan refuses every connected tool. The screen says plainly when no browser, or no tool server, is found.
- The browser: Playwright's MCP server (`@playwright/mcp`, staged next to the Harness by `app/desktop/scripts/stage-harness.mjs`) on the person's own Chrome, Edge or Chromium (`browser-probe.mjs`), `--isolated` so it never sees their profile. Tools appear as `mcp__browser__browser_*`. In Manual, opening a page, clicking, typing, uploading, running a script in the page and closing tabs ask (plain reasons: "Open the web page ...", "Click on the page: ..."); looking (snapshot, screenshot, console, network, waiting, listing tabs) does not. Plan refuses every connected tool. The screen says plainly when no browser, or no tool server, is found.
- The person's own tools: `instructions` (the tool returns their text; look-only, never asks), `command` (runs their command with the assistant's text in the `STRATA_INPUT` environment variable, never spliced into the command line; asks in Manual, refused in Plan) and `server` (a web address or a program, added as `mcp__custom-<name>__*`; asks in Manual). Instruction and command tools are served by `custom-tools-mcp.mjs` (stdio MCP) from a JSON file the settings module rewrites on every change, so a switch in Settings is seen without a restart.
- `strata-gate.mjs` implements the Manual/Plan rules above (`planDecision`, `browserDecision`, the look-only instruction server).
@@ -93,7 +93,7 @@ What the person chose is saved by `tools-settings.mjs` (inside the host's settin
## Thinking and the output budget
The Harness staging script (`apps/desktop/scripts/stage-harness.mjs`) applies Strata's guarded pi-ai 1.1.0 patch to its staged copy
The Harness staging script (`app/desktop/scripts/stage-harness.mjs`) applies Strata's guarded pi-ai 1.1.0 patch to its staged copy
(`harness-budget.mjs`, #3684): below 64K the context safety room is at most `min(4096, floor(contextWindow / 16))` and never more
than half the estimated remaining room, so an 8K window keeps output room after a tool result instead of ending with a one-token
cap. The caller's output cap and the one-token floor remain; windows of 64K or more keep the previous calculation. `BUNDLE.json.patches`
+1 -1
View File
@@ -3,7 +3,7 @@
*
* A helper is a child session of the chat's Harness session. This module is the pure part: it folds one child's
* `session/follow` items into
* - an `agent` frame (the shape `apps/host/src/lib/agents.ts updateAgent` merges into the chat's existing rows:
* - an `agent` frame (the shape `app/host/src/lib/agents.ts updateAgent` merges into the chat's existing rows:
* id, name, description, status, durationMs, tokens, updatedAt), and
* - tool cards, but only for a helper's request that needs the person (an approval). Everything else a helper does
* stays in its row; the transcript is not filled with the work of four helpers at once.
@@ -24,7 +24,7 @@
export const name = 'strata-gate';
export const inject = ['approval', 'permissionPresets', 'sessions', 'tools'];
/** Preset key the host writes for Manual (apps/host/server/agent/profile.mjs MODE_PRESETS). */
/** Preset key the host writes for Manual (app/host/server/agent/profile.mjs MODE_PRESETS). */
export const MANUAL_PRESET = 'strata-manual';
/** Preset key the host writes for Plan (read-only, nothing may change). */
export const PLAN_PRESET = 'strata-plan';
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* The App Host's client of the desktop shell's update bridge.
*
* The desktop app updates itself with Tauri's signed updater, which lives in the Rust shell (apps/desktop/src-tauri). The
* The desktop app updates itself with Tauri's signed updater, which lives in the Rust shell (app/desktop/src-tauri). The
* UI is served by this host, so it cannot call the shell directly; the shell opens a loopback listener, protected by a
* random token it hands only to this host (STRATA_SHELL_BRIDGE, STRATA_SHELL_TOKEN), and this module is its client.
* Outside the desktop app (a browser, a test, a source checkout) there is no bridge and `createAppUpdater` returns null.
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* The app's version, from one place. The desktop shell reports its own (apps/desktop/src-tauri/Cargo.toml, which Tauri also uses for
* The app's version, from one place. The desktop shell reports its own (app/desktop/src-tauri/Cargo.toml, which Tauri also uses for
* the installer and file names) in STRATA_APP_VERSION. Outside the app, in a source checkout, the same file is read; otherwise 'dev'.
*/
import { readFileSync } from 'node:fs';
+1 -1
View File
@@ -135,7 +135,7 @@ const control = createControl({ control: CONTROL, log: line => console.log(line)
if (control && process.platform === 'win32' && !process.env.STRATA_NO_REPAIR_ACCESS) void control.repairAccess().catch(() => {});
/* Which window shows the page (the app window or, when that cannot run, a browser tab) and what only the app window can do: app-ui.mjs. */
const appUi = createAppUi({ shutdown: () => shutdown() });
/* The app's version has one source: the desktop shell passes it (STRATA_APP_VERSION, from apps/desktop/src-tauri/Cargo.toml). Outside the app it is read from the same file in a checkout, else 'dev'. */
/* The app's version has one source: the desktop shell passes it (STRATA_APP_VERSION, from app/desktop/src-tauri/Cargo.toml). Outside the app it is read from the same file in a checkout, else 'dev'. */
function appVersion() { return appVersionFrom({ env: process.env, here: HERE }); }
const appUpdater = appUi.updater;
const shellNotifier = createShellNotifier();
+1 -1
View File
@@ -1,5 +1,5 @@
// GENERATED by `python -m strata_control.app_policy` from strata_control/speed_switches.py and strata_control/drafting.py. Do not edit it by hand:
// change the Python and regenerate; tests/terminal/test_app_policy.py and apps/host/tests/policy-generated.test.mjs fail when this file is out of date.
// change the Python and regenerate; tests/terminal/test_app_policy.py and app/host/tests/policy-generated.test.mjs fail when this file is out of date.
/** The speed switches of the app's Expert settings (strata_control/speed_switches.py app_switches()): id, words, default, the environment entries outside the default. */
export const SPEED_SWITCH_TABLE = [
{"id": "faster_long_prompts", "label": "Faster long prompts", "hint": "Reads very long prompts faster by approximating part of the work. Off by default: answers about long documents can miss or mix up details.", "default": "off", "env": {"STRATA_KVA": "1"}},
+1 -1
View File
@@ -34,7 +34,7 @@ import gtui_en from '../locales/gtui-en.json';
export const LANGUAGES=[{value:'en',label:'English'},{value:'zh',label:'中文(简体)'},{value:'ja',label:'日本語'},{value:'de',label:'Deutsch'},{value:'fr',label:'Français'},{value:'es',label:'Español'},{value:'ru',label:'Русский'},{value:'pt',label:'Português'},{value:'ko',label:'한국어'},{value:'he',label:'עברית'}] as const;
export type Language=typeof LANGUAGES[number]['value'];
/* The Tune model dialog's strings live in tune-<lang>.json (apps/host/scripts/make-tune-locales.py) so other interface work does not collide with them. */
/* The Tune model dialog's strings live in tune-<lang>.json (app/host/scripts/make-tune-locales.py) so other interface work does not collide with them. */
/* The tool-server, picture and agent-result strings of the tools and images fixes live in tools-<lang>.json for the same reason. */
/* The strings that had no key in the files above (#3479, #3825) and the 0.2.4.3 fixes live in fix-<lang>.json (scripts/make-fix-locales.py). */
const english:Record<string,string>={...baseEnglish,...tune_en,...tools_en,...fix_en,...gh_en,...ui_en,...engine_en,...pick_en,...df2_en,...upd_en,...r3_en,...pic_en,...gui_en,...sav_en,...net_en,...dmg_en,...guic_en,...fixa_en,...gtui_en};
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Files dropped on the app window on Linux and macOS. The page gets the drag events there but not the files (WebKit hides them), so the app
* shell reads the drop, hands the paths to the host, and tells the page with these two events (apps/desktop/src-tauri/src/main.rs):
* shell reads the drop, hands the paths to the host, and tells the page with these two events (app/desktop/src-tauri/src/main.rs):
* strata:native-drag detail 'enter' | 'leave' the drop box shows or goes away
* strata:native-drop detail [{ id, name, type }] the host holds each file once under its id
*/
@@ -43,7 +43,7 @@ function fixture() {
test('a four-part Control (0.1.59.1) from the feed beats the bundled 0.1.59, whether the shell names the bundled one or it sits beside the host', () => {
const f = fixture();
try {
// the Tauri shell sets STRATA_CONTROL_DIR to the bundled folder (apps/desktop/src-tauri/src/main.rs apply_runtime_policy)
// the Tauri shell sets STRATA_CONTROL_DIR to the bundled folder (app/desktop/src-tauri/src/main.rs apply_runtime_policy)
const viaShell = findControl({ env: { STRATA_CONTROL_DIR: f.bundled }, hostDir: f.hostDir, components: f.components });
assert.equal(viaShell.dir, f.updated);
assert.equal(viaShell.bundle.version, '0.1.59.1');
+1 -1
View File
@@ -1,6 +1,6 @@
// #6014, the desktop agent's side: an MCP server at an address that was restarted (the UE5 editor) forgot the session, and every tool
// call failed with "-32600 Unknown session id ...; client should reinitialize" until the model was unloaded. The staged Harness's MCP
// client is patched at staging (apps/desktop/scripts/harness-mcp-session.mjs). The fixture is the exact MIT-licensed
// client is patched at staging (app/desktop/scripts/harness-mcp-session.mjs). The fixture is the exact MIT-licensed
// @deepseek-ai/dsh-mcp-client 0.2.1-alpha.3 lib/index.js (the same DeepSeek licence as fixtures/dsh-tool-fs-search-LICENSE), run here with
// its imports stubbed and a fake MCP server behind a fake SDK client: the module's own connection, reconnect and tool code is tested.
import test from 'node:test';
@@ -1,5 +1,5 @@
// #5964: one folder the person may not read blanked a whole glob / grep in the agent ("glob search failed (exit 2): rg: ...\locked: IO
// error ... (os error 5)"). The staged Harness's search module is patched at staging (apps/desktop/scripts/harness-search-partial.mjs).
// error ... (os error 5)"). The staged Harness's search module is patched at staging (app/desktop/scripts/harness-search-partial.mjs).
// The fixture is the exact MIT-licensed @deepseek-ai/dsh-tool-fs-search 0.2.1-alpha.3 lib/index.js (fixtures/dsh-tool-fs-search-LICENSE),
// run here with its Harness imports stubbed and a fake ripgrep subprocess: the module's own run, parse and render code is what is tested.
import test from 'node:test';
+1 -1
View File
@@ -1,5 +1,5 @@
// #5079: after the desktop shell loads the page again because its renderer died, the page starts with the sidebar previews closed, once.
// The shell side (which failures reload, the limit of two in two minutes, the address) is unit-tested in apps/desktop/src-tauri/src/recovery.rs.
// The shell side (which failures reload, the limit of two in two minutes, the address) is unit-tested in app/desktop/src-tauri/src/recovery.rs.
import assert from 'node:assert/strict';
import test from 'node:test';
import { readFileSync } from 'node:fs';
+1 -1
View File
@@ -1,5 +1,5 @@
// #4533: titles with emoji and other scripts are cut without cutting a character in half, and survive a save and restore unchanged.
// (The crash itself is WebKitGTK drawing a COLRv1 colour font: apps/desktop/src-tauri/src/fontguard.rs. Needs a real WebKitGTK to show.)
// (The crash itself is WebKitGTK drawing a COLRv1 colour font: app/desktop/src-tauri/src/fontguard.rs. Needs a real WebKitGTK to show.)
import assert from 'node:assert/strict';
import test from 'node:test';
import { readFileSync } from 'node:fs';
+1 -1
View File
@@ -5242,7 +5242,7 @@ class ForcedToolChoice(unittest.TestCase):
def test_any_model_name_on_the_anthropic_route_is_the_loaded_model(self):
"""#5312: Claude Desktop sends the model name `claude-5-5-sonnet` and cannot change it; the route serves the loaded model whatever
the request calls it, and answers with that model's name (the Desktop app's own gateway is a separate check in apps/host)."""
the request calls it, and answers with that model's name (the Desktop app's own gateway is a separate check in app/host)."""
self.says("Hello there.")
for name in ("claude-5-5-sonnet", "claude-opus-4-1", "gpt-4o", "nonsense"):
for stream in (False, True):
+1 -1
View File
@@ -1,6 +1,6 @@
"""#5484: the Monitor's recent-requests table shows the VRAM hit rate column only when a request has a hit rate. On a Mac
(unified memory) and for a model wholly in VRAM the engine reports none, and a column of dashes read as something
missing. The web page (serve/web/app.js, run in node with stand-ins) and the app's Monitor (apps/host) both."""
missing. The web page (serve/web/app.js, run in node with stand-ins) and the app's Monitor (app/host) both."""
from __future__ import annotations
import json
+1 -1
View File
@@ -1,5 +1,5 @@
// serve/web/ime.js - the Enter that commits an IME conversion (Japanese, Chinese, Korean) belongs to the IME, not to the page (#5071).
// The same rule as the app's composer (apps/host/src/lib/ime-enter.ts; apps/host/tests/ime-fields.test.mjs checks that the two agree).
// The same rule as the app's composer (app/host/src/lib/ime-enter.ts; app/host/tests/ime-fields.test.mjs checks that the two agree).
//
// The browsers disagree on the order of the events when Enter commits a conversion:
// Chrome, Edge, Firefox: keydown(Enter, keyCode 229, isComposing true) -> compositionend
+1 -1
View File
@@ -10,7 +10,7 @@ from pathlib import Path
SCHEMA_VERSION = 1
#: The version people are told: the Strata app's own (apps/desktop/src-tauri/Cargo.toml `version`; tests/terminal/test_tuiqa_version.py keeps the
#: The version people are told: the Strata app's own (app/desktop/src-tauri/Cargo.toml `version`; tests/terminal/test_tuiqa_version.py keeps the
#: two equal, except for a Terminal-only release such as 0.2.3.1 or 0.2.4, whose app stays 0.2.3). `version()` below is the files' build number, which the engine-compatibility checks compare, so it stays numeric.
PRODUCT_VERSION = "0.2.17"
+2 -2
View File
@@ -2,7 +2,7 @@
There is ONE catalog: setup.py's MODELS / FAMILIES / CONTEXTS, which the desktop app reads through tools/strata_mcp.py
(`Strata.model_table`, `Strata.hardware`, `Strata.recommend`; the app page's own fit arithmetic is
apps/host/src/lib/native-fit.ts `fitOn`). This module loads that same file from the installer folder and ports `fitOn` line by
app/host/src/lib/native-fit.ts `fitOn`). This module loads that same file from the installer folder and ports `fitOn` line by
line; it holds no table of its own. Without the installer files (a Terminal bundle made before launch existed) it says so in
words instead of guessing.
"""
@@ -25,7 +25,7 @@ class CatalogUnavailable(RuntimeError):
"""The installer files (setup.py, tools/strata_mcp.py) are not there; the message is for the user."""
# --- apps/host/src/lib/native-fit.ts, ported (same constants, same rules) ------------------------------------------------
# --- app/host/src/lib/native-fit.ts, ported (same constants, same rules) ------------------------------------------------
DENSE_GB = 5.0
SYSTEM_ROOM_GB = 10.0
DENSE_EXTRA_GB = 1.0
+1 -1
View File
@@ -3,7 +3,7 @@
A model-state bar, eight tiles with sparklines (speed, GPU load, VRAM, GPU temperature, power, PCIe, CPU, disk), bars for context fill,
experts in VRAM and system RAM, and the recent requests. It reads what the browser Monitor reads: the server's `/metrics`
(live state, engine facts, the hardware sample and a minute of history per series, the last requests) as the app's
apps/host/src/lib/native-monitor.ts maps it: the context used is the current request's prompt + generated tokens while one runs, else the
app/host/src/lib/native-monitor.ts maps it: the context used is the current request's prompt + generated tokens while one runs, else the
last request's; the speed is the live rate while generating, else the last request's.
`build(metrics)` turns the raw metrics into plain numbers (None where the server did not report one: never a made-up zero);
+5 -5
View File
@@ -1,10 +1,10 @@
"""The launch-policy tables the app's host (JavaScript) reads, generated from the Python that owns them.
`strata_control` decides the speed switches (`speed_switches.py`) and which models have a Drafting choice (`drafting.py`). The app's host used to carry its own
copy of those tables. It now imports `apps/host/server/policy-generated.mjs`, which this module writes, and a test (`tests/terminal/test_app_policy.py`, and
`apps/host/tests/policy-generated.test.mjs` on the JavaScript side) fails when the committed file differs from what `render()` makes now.
copy of those tables. It now imports `app/host/server/policy-generated.mjs`, which this module writes, and a test (`tests/terminal/test_app_policy.py`, and
`app/host/tests/policy-generated.test.mjs` on the JavaScript side) fails when the committed file differs from what `render()` makes now.
python -m strata_control.app_policy # rewrite apps/host/server/policy-generated.mjs
python -m strata_control.app_policy # rewrite app/host/server/policy-generated.mjs
python -m strata_control.app_policy --check # exit 1 when it is out of date
"""
@@ -25,7 +25,7 @@ TARGET = Path(__file__).resolve().parents[1].parent / "app" / "host" / "server"
VECTORS = Path(__file__).resolve().parents[1].parent / "app" / "host" / "tests" / "data" / "policy-vectors.json"
HEADER = ("// GENERATED by `python -m strata_control.app_policy` from strata_control/speed_switches.py and strata_control/drafting.py. Do not edit it by hand:\n"
"// change the Python and regenerate; tests/terminal/test_app_policy.py and apps/host/tests/policy-generated.test.mjs fail when this file is out of date.\n")
"// change the Python and regenerate; tests/terminal/test_app_policy.py and app/host/tests/policy-generated.test.mjs fail when this file is out of date.\n")
def _entries(pairs) -> dict:
@@ -64,7 +64,7 @@ def render() -> str:
#: Cases the host's copies of the RULES (speedSwitchApplies, resolveDrafter) must answer as Python does. The table above is data and is generated; the rules are code, so the
#: answers of the Python are written down here and apps/host/tests/policy-generated.test.mjs runs the host's rules over them.
#: answers of the Python are written down here and app/host/tests/policy-generated.test.mjs runs the host's rules over them.
_CARDS = {
"rtx4090": {"name": "NVIDIA GeForce RTX 4090", "vendor": "nvidia", "arch": "89", "vram_gb": 24.0},
"rtx3060": {"name": "NVIDIA GeForce RTX 3060", "vendor": "nvidia", "arch": "86", "vram_gb": 12.0},
+1 -1
View File
@@ -4,7 +4,7 @@ Setup writes absolute paths into a run config (``cwd``, ``--expert-profile``) th
the Linux AppImage mounts its bundled Control at ``/tmp/.mount_<random>/usr/lib/Strata/control``, a new name at every start, and an app
reinstall or a Control update moves it too. A path that ends up inside a folder called ``control`` which no longer exists is pointed at the
same file in this Control when the file is there; any other value is left as it is. The app host does the same for the saved files
(apps/host/server/native-control.mjs ``repairControlPaths``); this is for a start that reads a run config itself (the update's test start).
(app/host/server/native-control.mjs ``repairControlPaths``); this is for a start that reads a run config itself (the update's test start).
"""
from __future__ import annotations
+1 -1
View File
@@ -1,6 +1,6 @@
"""The conversation context a model starts with: 128K on every card, unless the person picks another (owner, 2026-11-01).
One rule for the app (apps/host/src/lib/default-context.ts says the same), the Terminal (`strata launch`, `setup`) and the MCP tools: 128K, or the
One rule for the app (app/host/src/lib/default-context.ts says the same), the Terminal (`strata launch`, `setup`) and the MCP tools: 128K, or the
largest size the model offers when that is under 128K. The VRAM tiers that used to lower it on small
cards are gone; a card that 128K leaves little room on gets a warning, never a lower number (the engine says plainly if it cannot start).
A Mac keeps its unified-memory rule (strata_control/mac_fit.py), which the owner has not changed.
+6 -6
View File
@@ -46,8 +46,8 @@ DFLASH2_BACKENDS = ("cuda", "hip", "metal", "sycl")
#: Graphics memory each drafter takes on Qwen3.8-Flash-Next IQ3_S (GB; phaseA-tests/blackwell/RESULTS-DF2MEM.md section 1, l620, engine free memory at
#: the first graph capture): DFlash2 alone 890 MiB, the MTP layer 1082 MiB. The fit, the plan and the slot estimates use the one that is chosen.
#: `dflash2_selq4` is DFlash2 alone with the converted pack (the selector's codebooks as Q4_0 rows, 175 MiB less: the engine's drafter line 800 -> 625 MiB, section 16):
#: 715 MiB. vram_gb() says which of the two is the true figure on this computer. The apps keep copies of these numbers (apps/host/server/native-parallel.mjs and
#: apps/host/src/lib/native-fit.ts); apps/host/tests/drafting.test.mjs reads this table and fails when they differ.
#: 715 MiB. vram_gb() says which of the two is the true figure on this computer. The apps keep copies of these numbers (app/host/server/native-parallel.mjs and
#: app/host/src/lib/native-fit.ts); app/host/tests/drafting.test.mjs reads this table and fails when they differ.
DRAFTER_MIB = {"dflash2": 890, "dflash2_selq4": 715, "mtp": 1082, "off": 0}
DRAFTER_GB = {name: int(mib / 10 + 0.5) / 100 for name, mib in DRAFTER_MIB.items()} # 0.89, 0.72, 1.08, the figures the apps show (mib rounded half up to 10 MiB)
@@ -78,7 +78,7 @@ def card_class(archs: Any) -> str:
# slower measured on this kind of card: slower on every prompt
# untested the engine has the code for this card but it was never measured on it
#: What the Terminal's Drafting step and the app's paragraph under the dropdown say (the same words; apps/host/src/locales/df2-en.json, tests keep them equal).
#: What the Terminal's Drafting step and the app's paragraph under the dropdown say (the same words; app/host/src/locales/df2-en.json, tests keep them equal).
#: The numbers are measured: l620, RTX PRO 5000, Qwen3.8-Flash-Next IQ3_S, DFlash2 `--spec 6 --draft-conf 0.35` against MTP (phaseA-tests/blackwell/RESULTS-DRAFT.md section 4).
EXPLAIN_NUMBERS = ("MTP is the default. DFlash2 is another way to guess the next words ahead, for Qwen3.8-Flash-Next only. On an RTX PRO 5000 it was 7.8% faster than MTP "
"on 19 short prompts and 1.1% faster on long thinking, and faster on 21 of 23 prompts. On the short prompts the answers were identical.")
@@ -494,7 +494,7 @@ DEFAULT_CONTEXT = 131072 # --max-context when the arguments name none (the 1
SUPPORTED_FAMILIES = ("qwen", "gyro", "unsloth")
#: The model_name setup.py (and metal/setup_mac.py) write: f"{family name}-{model.lower()}": qwen3.8-flash-next-iq3_s, qwen3.8-flash-next-gyro-gyro-s,
#: qwen3.8-flash-next-unsloth-ud-q4_k_xl. (Coder is qwen3.8-flash-next-coder-iq1_m, NVFP4 qwen3.8-flash-next-nvfp4-nvfp4: neither matches.) Mirrored in
#: apps/host/server/native-settings.mjs; tests/drafting.test.mjs keeps the two the same.
#: app/host/server/native-settings.mjs; tests/drafting.test.mjs keeps the two the same.
_SUPPORTED_NAME = re.compile(r"^qwen3\.8-flash-next(-gyro-[a-z0-9._-]+|-unsloth-[a-z0-9._-]+|-(q|iq|tq)\d[a-z0-9_.]*)?$", re.IGNORECASE)
@@ -879,7 +879,7 @@ def normalize(value: Any) -> str:
ENGINE_SERVES_DFLASH2 = True
#: Why another drafter (or none) runs when the one chosen cannot: a closed set of short reasons, each one is a sentence in the interface catalog in all
#: nine languages (the line is "Drafting: MTP (<reason>)", apps/host/src/locales/df2-<lang>.json and en.json).
#: nine languages (the line is "Drafting: MTP (<reason>)", app/host/src/locales/df2-<lang>.json and en.json).
DIDNT_FIT = "DFlash2 didn't fit"
NOT_HERE = "DFlash2 isn't available in this mode"
NOT_SUPPORTED = "DFlash2 is for Qwen3.8-Flash-Next only"
@@ -1566,7 +1566,7 @@ def decide(mode: Any, *, klass: str = "other", model_name: str | None = None, fa
ONE_REQUEST_NOTE = "DFlash2 answers one request at a time, so Strata set this model to one request at a time."
#: setup could not fetch the MTP layer because the computer is offline (tools/mtp_fetch.py OFFLINE) and the start has no other drafter (owner, 11-15).
#: The app shows the same words (apps/host/server/native-control.mjs installMtpLayer).
#: The app shows the same words (app/host/server/native-control.mjs installMtpLayer).
MTP_OFFLINE_NOTE = "There is no internet connection, so the draft layer can't be downloaded now. The model starts without it."
+1 -1
View File
@@ -5,7 +5,7 @@ The rule (owner decision):
2. Only when that does not fit, or would be too tight, offer to add the second card as a layer split.
3. Let the person choose: every option comes with plain numbers and a recommended one is pre-selected (recommend, never force).
The memory arithmetic is native-fit.ts `fitOn` (apps/host/src/lib/native-fit.ts) with the same constants (a test keeps them equal):
The memory arithmetic is native-fit.ts `fitOn` (app/host/src/lib/native-fit.ts) with the same constants (a test keeps them equal):
the experts are held first in the graphics memory beyond about DENSE_GB (the dense weights, buffers and a 32K cache), then in RAM beyond
about SYSTEM_ROOM_GB left for the system; whatever is left would be read from the SSD (`spill_gb`). A split adds the memory of the extra
cards but every extra card holds its own dense layers and prompt buffers, so each one costs SPLIT_CARD_OVERHEAD_GB of that (an estimate:
+1 -1
View File
@@ -7,7 +7,7 @@ A card has one of three roles:
The engine takes the cards in stage order (`"gpu": [helper, ..., main]` with `"gpu_order": "as_given"`), so the Main card is the LAST one. This
module turns roles into that list (and back), recommends roles, and words the few warnings a person could not work out alone.
The app has the same rules in apps/host/src/lib/gpu-roles.ts; both run tests/data/gpu_roles_vectors.json.
The app has the same rules in app/host/src/lib/gpu-roles.ts; both run tests/data/gpu_roles_vectors.json.
Pure functions, no I/O.
"""
+1 -1
View File
@@ -1,6 +1,6 @@
"""Which conversation context fits a graphics card for Qwen3.6-35B-A3B (the strata-q36 engine path, GitHub #5715): the one rule setup's context
menu, the start line in serve/server.py and the app's estimate (via the catalog, tools/strata_mcp.py) use. The app's copy of the formula
(apps/host/src/lib/native-fit.ts `ownPathCacheGb` / `ownPathContextFits`) is pinned to this one by apps/host/tests/own-path-fit.test.mjs.
(app/host/src/lib/native-fit.ts `ownPathCacheGb` / `ownPathContextFits`) is pinned to this one by app/host/tests/own-path-fit.test.mjs.
need(ctx) GiB = BASE_GIB + the size's hybrid minimum + STATE_GIB + ctx x BYTES_PER_TOKEN / 2^30
fits = need(ctx) <= the card's memory as setup and the catalog read it (nvidia-smi memory.total, in GiB)
+1 -1
View File
@@ -1,7 +1,7 @@
"""Per-user state locations, one rule for the terminal and the host.
POSIX keeps $XDG_STATE_HOME (default ~/.local/state) under ``strata/``. Windows has no such place: state goes to
``%LOCALAPPDATA%\\Strata``. The Node host (apps/host/server/platform-paths.mjs) resolves the same folders.
``%LOCALAPPDATA%\\Strata``. The Node host (app/host/server/platform-paths.mjs) resolves the same folders.
"""
from __future__ import annotations
+2 -2
View File
@@ -3,7 +3,7 @@
A model whose run config has no ``vision`` section reads no pictures. The person turns "Read pictures" on (it is on by default), presses
Load, and this module does the one thing that is missing: it finds the picture file (or downloads it once, pinned, size and SHA-256
checked) and works out the run config's ``vision`` section for the engine in use. It never looks at the model's own files, never prepares
the pack or the draft layer again, never changes the data folder, and never writes the run config: the caller does (apps/host).
the pack or the draft layer again, never changes the data folder, and never writes the run config: the caller does (app/host).
pictures.fetch(config_path, ...) the whole step; returns {"mmproj", "vision", "fetched", "note"}
@@ -13,7 +13,7 @@ the folder. The data folder is the one the model's own run config names (``--pac
model's own folder, or one folder up from it (the layout of the Hugging Face repository).
Only an explicit command reaches the network (strata_control/acquisition.py). With no internet the answer is the plain sentence of
``PicturesError`` (code ``offline``) after one short probe, never a stalled bar. The apps/host caller then loads the model without
``PicturesError`` (code ``offline``) after one short probe, never a stalled bar. The app/host caller then loads the model without
pictures and says so.
``python -c "...; pictures.main(sys.argv[1:])"`` is how the app runs it: ``fetch --config FILE --engine-dir DIR --vision yes ...``
+2 -2
View File
@@ -2,7 +2,7 @@
A switch has a default (``on`` or ``off``). In its other state it writes exactly the engine environment below into the model's run config ("env"); back in
its default it removes those entries, so a default launch carries none of them and is byte for byte what 0.2.6 started. The names are the engine switch
contract (phaseA-tests/notes-027-plan.md). The app does the same in apps/host/server/native-settings.mjs (SPEED_SWITCHES); tests/terminal/test_speed_switches.py
contract (phaseA-tests/notes-027-plan.md). The app does the same in app/host/server/native-settings.mjs (SPEED_SWITCHES); tests/terminal/test_speed_switches.py
reads that file and fails when the two disagree, so the Terminal and the app cannot drift apart.
- "Faster long prompts" (Qwen KVA) is OFF by default (owner decision, 26 October): ``STRATA_KVA=1`` turns it on. A file that holds ``STRATA_KVA=0`` (the
@@ -135,7 +135,7 @@ def applicable(cfg: Mapping[str, Any] | None, gpus: Iterable[Mapping[str, Any]]
def app_switches() -> list[Switch]:
"""The switches the app shows (apps/host/server/native-settings.mjs SPEED_SWITCHES): all but the Terminal-only ones."""
"""The switches the app shows (app/host/server/native-settings.mjs SPEED_SWITCHES): all but the Terminal-only ones."""
return [s for s in SWITCHES if not s.terminal_only]
+1 -1
View File
@@ -54,7 +54,7 @@ SKEW_FREE_BYTES = 1.15
def megabytes(n) -> int:
"""Decimal megabytes (1 MB = 1,000,000 bytes), rounded half up, at least 1: the one figure for an engine's size in the Terminal, the app
(apps/host/src/lib/format.ts megabytes) and the release page. Both sides are tested on the same numbers."""
(app/host/src/lib/format.ts megabytes) and the release page. Both sides are tested on the same numbers."""
return max(1, int((n or 0) / 1_000_000 + 0.5))
+1 -1
View File
@@ -1,5 +1,5 @@
{
"_about": "Shared by tests/terminal/test_gpu_roles.py (strata_control/gpu_roles.py) and apps/host/tests/gpu-roles.test.mjs (apps/host/src/lib/gpu-roles.ts). Roles are keyed by card number.",
"_about": "Shared by tests/terminal/test_gpu_roles.py (strata_control/gpu_roles.py) and app/host/tests/gpu-roles.test.mjs (app/host/src/lib/gpu-roles.ts). Roles are keyed by card number.",
"hw": {
"one": [{"index": 0, "name": "NVIDIA GeForce RTX 4070 Ti", "vram_gb": 12, "speed": 100}],
"two": [{"index": 0, "name": "NVIDIA GeForce RTX 3060", "vram_gb": 12, "speed": 60}, {"index": 1, "name": "NVIDIA GeForce RTX 4070 Ti", "vram_gb": 12, "speed": 100}],
+1 -1
View File
@@ -1,4 +1,4 @@
"""The desktop app's version is written in one place: apps/desktop/src-tauri/Cargo.toml (Tauri reads it for the installer and file names when
"""The desktop app's version is written in one place: app/desktop/src-tauri/Cargo.toml (Tauri reads it for the installer and file names when
tauri.conf.json has no version; the shell passes it to the host as STRATA_APP_VERSION; the host reads the same file in a checkout)."""
import json
import re
+1 -1
View File
@@ -1,4 +1,4 @@
"""The tester READMEs get their checksums from the files themselves (apps/desktop/scripts/make-tester-readme.sh)."""
"""The tester READMEs get their checksums from the files themselves (app/desktop/scripts/make-tester-readme.sh)."""
import hashlib
import shutil
import subprocess
+2 -2
View File
@@ -30,7 +30,7 @@ The same command works on Windows, Linux and macOS; the golden files hold no pat
| entry | how it is driven | what is real | what is replaced |
|---|---|---|---|
| `launch` | `strata launch --model <set> --yes --no-tui` through `strata_cli.cli.main` | the whole command: settings, `Runner.run()`, the drafter step, config derivation and writing | the engine download, the model download (`ensure_model` returns the stand-in below), tuning, the server start, the drafter download |
| `app_plain` | `apps/host/server/native-control.mjs` `operation('load', {model})` in Node (`app_driver.mjs`) | the host's whole Load code, and Control's `drafting plan` / `drafting fetch` (run through `control_shim.py` on the same simulated machine) | the installer process (catalog, hardware), Control's model list / engine / profile save / start, the drafter download |
| `app_plain` | `app/host/server/native-control.mjs` `operation('load', {model})` in Node (`app_driver.mjs`) | the host's whole Load code, and Control's `drafting plan` / `drafting fetch` (run through `control_shim.py` on the same simulated machine) | the installer process (catalog, hardware), Control's model list / engine / profile save / start, the drafter download |
| `app_models` | the same with `values: {drafting: 'auto'}` (what the Models screen's Load passes) | same | same |
| `setup` | `strata_control.setup_config.config_for` (qwen / unsloth), the moved last stretch of `setup.py` main(), called with inputs built by `setup_driver.py` | the whole run-config construction: engine arguments, speed switches, cards, vision section | what `setup.py` decides before it (the cards and RAM come from the class, the context, budget, low-RAM, vision and resident choices from setup's own pure functions), the probes of the machine (`ProbeLib`), the model reader |
@@ -71,7 +71,7 @@ only place a difference is allowed, and each entry has its reason. Today:
**Request slots.** On NVIDIA 72 GB the plain Load used to write `parallel: 3` and start `--batch 3 --batch-mtp`; that was only because it ran the MTP (no drafter had been fetched).
Following Auto it runs DFlash2, which answers one request at a time, so the app writes no `parallel` there, as the Models-screen Load always did. The golden files pin it:
no app entry writes `parallel` or `--batch-mtp` in any cell. The app's own default of several request slots (`apps/host/server/native-parallel.mjs`) is for runs that are not
no app entry writes `parallel` or `--batch-mtp` in any cell. The app's own default of several request slots (`app/host/server/native-parallel.mjs`) is for runs that are not
DFlash2 and is not reached in this matrix.
## Adding a class or a set
+1 -1
View File
@@ -28,5 +28,5 @@ MODELS_SCREEN = {
#: The request-slot rule (CLEAN-1A item 1a.6, owner decision 11-07). Not a difference to allow but a fact the golden files pin: with the plain Load following Auto, NVIDIA 72 GB
#: runs DFlash2, which answers one request at a time, so the app writes no `parallel` and no `--batch ... --batch-mtp` there, exactly as the Models-screen Load always did.
#: (On main the plain Load ran the MTP and wrote `parallel: 3`; that was a consequence of the missing drafter, not a policy.) The app's own default of several request slots
#: (apps/host/server/native-parallel.mjs) applies to a run that is not DFlash2; no cell of the matrix needs it.
#: (app/host/server/native-parallel.mjs) applies to a run that is not DFlash2; no cell of the matrix needs it.
REQUEST_SLOTS = "no cell writes `parallel` from either app entry point"
+1 -1
View File
@@ -1,4 +1,4 @@
"""The app's host reads its launch-policy tables from apps/host/server/policy-generated.mjs, which strata_control/app_policy.py writes from the Python that owns them.
"""The app's host reads its launch-policy tables from app/host/server/policy-generated.mjs, which strata_control/app_policy.py writes from the Python that owns them.
A table changed in Python and not regenerated, or edited by hand in the JavaScript, fails here."""
from __future__ import annotations
@@ -1,6 +1,6 @@
"""#5240: DFlash2 on the Coder is an explicit opt-in. A DFlash2 chosen by name on the Coder starts DFlash2 with the stock pack (the Coder has no tuned pack) and no MTP
layer; Auto (and no choice) keeps the MTP on the Coder; Swift and NVFP4 stay refused (the MTP, with the NOT_SUPPORTED line); setup fetches the stock pack only for the
named choice. The app's copies (resolveDrafter) are checked against the same rule by apps/host/tests/policy-generated.test.mjs."""
named choice. The app's copies (resolveDrafter) are checked against the same rule by app/host/tests/policy-generated.test.mjs."""
from __future__ import annotations
@@ -1,6 +1,6 @@
"""One drafter per run, from every way in (owner, 2026-11-02): DFlash2 alone or the MTP alone, never both.
strata_control/drafting.py decides; the app (apps/host, through Control and serve/server.py) and the Terminal (strata launch, its Drafting step, a saved preset)
strata_control/drafting.py decides; the app (app/host, through Control and serve/server.py) and the Terminal (strata launch, its Drafting step, a saved preset)
both end at serve/server.py engine_args(). These tests lock in the engine arguments of every choice on the main backends, the old saved values, and the Terminal
path from the launch settings to the argument list. (tests/terminal/test_drafting.py has the table, the flags and the downloads one by one.)
"""
@@ -263,7 +263,7 @@ class TheShippedFiles(unittest.TestCase):
class ThePackagingLists(unittest.TestCase):
"""data/ goes into every package whole (packaging/package_terminal.py INSTALLER_DATA is the folder, not a list of files), so a choice's file is in the Terminal's installer bundle, the app's Control
component (apps/desktop/scripts/stage-control.py takes the same name) and the Mac's Control. The Mac ENGINE folder (metal/data) carries only the default file, by design: the other choices are read from Control's data/."""
component (app/desktop/scripts/stage-control.py takes the same name) and the Mac's Control. The Mac ENGINE folder (metal/data) carries only the default file, by design: the other choices are read from Control's data/."""
def test_the_installer_data_is_the_whole_folder_and_leaves_no_registered_file_out(self):
sys.path.insert(0, str(ROOT.parent / "tools" / "packaging"))
+1 -1
View File
@@ -17,7 +17,7 @@ def roles(d):
class Vectors(unittest.TestCase):
"""tests/data/gpu_roles_vectors.json is also run by apps/host/tests/gpu-roles.test.mjs against gpu-roles.ts."""
"""tests/data/gpu_roles_vectors.json is also run by app/host/tests/gpu-roles.test.mjs against gpu-roles.ts."""
def test_recommend(self):
for c in V["recommend"]:
+1 -1
View File
@@ -129,7 +129,7 @@ class CatalogRules(unittest.TestCase):
self.assertEqual((rec["family"], rec["model"]), ("qwen", "IQ3_XXS"))
def test_fit_on_matches_native_fit_ts(self):
# apps/host/src/lib/native-fit.ts: memory = experts + 1; GPU holds experts up to vram - 5; RAM holds up to ram - 10; the rest spills
# app/host/src/lib/native-fit.ts: memory = experts + 1; GPU holds experts up to vram - 5; RAM holds up to ram - 10; the rest spills
f = fit_on({"experts_gb": 42.9, "ram_needed_gb": 60}, 64.0, 12.0)
self.assertEqual((f["memoryGb"], f["vramUseGb"], f["spillGb"]), (43.9, 12.0, 0.0))
self.assertAlmostEqual(f["ramUseGb"], 35.9, places=1)
+1 -1
View File
@@ -1,4 +1,4 @@
"""One engine, one size: the Terminal and the app both say decimal megabytes, rounded half up (apps/host/tests/size-label.test.mjs has the
"""One engine, one size: the Terminal and the app both say decimal megabytes, rounded half up (app/host/tests/size-label.test.mjs has the
same numbers). 606,513,890 bytes is 607 MB in both places, never 606 in one and 607 in another."""
import unittest
@@ -1,6 +1,6 @@
"""The 0.2.7 speed features and their switches: the contract names, the defaults (Faster long prompts OFF, the other two ON), where each applies, and how the Terminal carries them.
The app (apps/host/server/native-settings.mjs SPEED_SWITCHES) and Control (strata_control/speed_switches.py) say the same thing; the last test reads the
The app (app/host/server/native-settings.mjs SPEED_SWITCHES) and Control (strata_control/speed_switches.py) say the same thing; the last test reads the
app's table with node and fails when the two differ. `strata launch` shows the environment entries as rows of its Advanced table and writes them into
the run config's "env" (`--set STRATA_KVA=1` turns Faster long prompts on); a default launch has none of them.
"""
@@ -488,7 +488,7 @@ class AppPlanEqualsTerminalPlan(Base):
self.assertIn("--no-split", out)
def test_the_hosts_calls_only_carry_no_split_when_it_is_told_to(self):
"""The app (apps/host/server/control-runtime.mjs) adds --no-split only after the split's draft layer could not be downloaded."""
"""The app (app/host/server/control-runtime.mjs) adds --no-split only after the split's draft layer could not be downloaded."""
text = (Path(__file__).resolve().parents[2].parent / "app" / "host" / "server" / "control-runtime.mjs").read_text(encoding="utf-8")
self.assertNotIn("'--no-split', '--output', 'json'", text)
self.assertNotIn("'--no-split', '--if-needed'", text)
@@ -496,7 +496,7 @@ class AppPlanEqualsTerminalPlan(Base):
class AppStartsTheSplit(Base):
"""The app's engine start (apps/host: buildConfig, then `profile` + `runtime start`) never went through the Terminal's apply_split_engine; Control now answers it
"""The app's engine start (app/host: buildConfig, then `profile` + `runtime start`) never went through the Terminal's apply_split_engine; Control now answers it
(`strata split-engine apply`, strata_control/split_engine.apply_run_config) from the same rule, engine package and draft layer."""
@staticmethod
@@ -199,7 +199,7 @@ class StartFallsBack(unittest.TestCase):
class TheAppsStartPath(unittest.TestCase):
"""The app starts a model with `strata runtime start --profile P --wait N --output json` (apps/host/server/control-runtime.mjs): the same
"""The app starts a model with `strata runtime start --profile P --wait N --output json` (app/host/server/control-runtime.mjs): the same
runtime.start, and its JSON carries the fallback and its line."""
def test_runtime_start_from_the_command_line(self):
+1 -1
View File
@@ -400,7 +400,7 @@ class CudaSpill(unittest.TestCase):
class Reserve3750(unittest.TestCase):
"""#3750: 256K context + Q4 KV on a small card. The app's reserve for a card of 16 GB or less is 1536 MiB (apps/host native-resources.mjs), no longer a fifth of the
"""#3750: 256K context + Q4 KV on a small card. The app's reserve for a card of 16 GB or less is 1536 MiB (app/host native-resources.mjs), no longer a fifth of the
card (3256 on the reporter's RX 9070 XT). The fit arithmetic prices the expert cache that is left, and it is positive at 12 GiB with the app's reserve on both
discrete backends; the old 3256 left the CUDA engine's measured base at its threshold (a start on the edge, which the reporter's 83 GB model fell over)."""
+1 -1
View File
@@ -1,4 +1,4 @@
"""Tests for apps/desktop/scripts/appimage_elf.py (#4337: the bundled ripgrep, a static PIE, crashed in the Linux AppImage).
"""Tests for app/desktop/scripts/appimage_elf.py (#4337: the bundled ripgrep, a static PIE, crashed in the Linux AppImage).
A static PIE relocates itself at start-up by reading its own `.dynamic` section. linuxdeploy's RPATH rewrite moves that section and fills the old
place; the program then does not start. The checks here: ELF files built in memory (run everywhere), and, on Linux with gcc and -static-pie, a real
+1 -1
View File
@@ -371,7 +371,7 @@ class Validation(FakeRoot):
self.assertFalse(M.mounted_drive(M.norm(raw)), raw)
def test_the_persons_own_data_folder_is_accepted_whatever_it_is_called(self):
"""The app writes the folder the person chose into the settings file (apps/host model-folder.mjs); an AI tool naming a new
"""The app writes the folder the person chose into the settings file (app/host model-folder.mjs); an AI tool naming a new
folder still needs a Strata... name."""
chosen = self.root.parent / "my-big-disk"
chosen.mkdir()
+1 -1
View File
@@ -350,7 +350,7 @@ def npm_cmd():
def host_ready(ctx, r):
"""Node, npm and apps/host/node_modules. Installs the packages with `npm ci` when they are missing."""
"""Node, npm and app/host/node_modules. Installs the packages with `npm ci` when they are missing."""
node, why = node_version()
if not node:
r.reason = why
+8 -8
View File
@@ -44,9 +44,9 @@ The desktop bundle ships a pinned standalone Node beside the App Host, so an end
(about 117 MB, an input rather than source). Fetch and verify it:
```sh
apps/desktop/scripts/fetch-node.sh # host platform
apps/desktop/scripts/fetch-node.sh --target linux-x64
apps/desktop/scripts/fetch-node.sh --check # verify what is installed
app/desktop/scripts/fetch-node.sh # host platform
app/desktop/scripts/fetch-node.sh --target linux-x64
app/desktop/scripts/fetch-node.sh --check # verify what is installed
```
The script refuses an archive whose SHA-256 differs from the digest recorded for that target. The digests come from nodejs.org's
@@ -56,7 +56,7 @@ The script refuses an archive whose SHA-256 differs from the digest recorded for
## Desktop app
```sh
cd apps/desktop
cd app/desktop
./scripts/fetch-node.sh # the sidecar (once)
npm install --prefix ../host && npm --prefix ../host run build # the UI
cargo tauri build --bundles app # macOS: Strata.app
@@ -75,7 +75,7 @@ release PC ([UPDATES.md](UPDATES.md#releasing)).
The installer carries Control, and on a Mac the Metal engine too. Neither fetches anything when it runs.
**Control** (`<install>/control`, built by `apps/desktop/scripts/stage-control.py`) is the same bundle as the Terminal archive:
**Control** (`<install>/control`, built by `app/desktop/scripts/stage-control.py`) is the same bundle as the Terminal archive:
the pinned CPython 3.12.15, the hash-locked wheels, `strata_control`, `strata_cli` and `serve`, plus a `BUNDLE.json` with the
interpreter and lock digests. The host finds it beside itself or through `STRATA_CONTROL_DIR`, runs it on its own interpreter
(`PYTHONNOUSERSITE=1`, no `PYTHONHOME` or `PYTHONPATH`) and starts a model with `strata profile create|use-config` and
@@ -108,8 +108,8 @@ the next step (exit 0, nothing started). The app shows the same warning with an
**No acquisition at run time.** `STRATA_NO_ACQUIRE=1` (set by the Tauri shell for the host, and by the host for Control) makes
`strata_control/acquisition.py` refuse pip, downloads and compiles. On the host side `server/acquisition.mjs` refuses the llama.cpp
and cloudflared fetches (a connector placed in `components/cloudflared/` is used as it is). Models the user chooses to download are a
separate, explicit action. `apps/host/tests/no-acquire.test.mjs` fails on any outbound request or installer process.
`apps/desktop/scripts/installed-flow.mjs` drives an installed app end to end.
separate, explicit action. `app/host/tests/no-acquire.test.mjs` fails on any outbound request or installer process.
`app/desktop/scripts/installed-flow.mjs` drives an installed app end to end.
## The Terminal archive
@@ -146,7 +146,7 @@ The Terminal bundles a private Python and its dependencies for `windows-x86_64`,
- **Tauri config:** an early draft used `perMachine`, `oneClick` and `deleteAppDataOnUninstall`. The Tauri schema rejects them; the
current config uses `installMode: currentUser`.
- **Repository size:** `apps/desktop/src-tauri/target` and the Node sidecar were briefly committed, which left about 324 MB in the git object
- **Repository size:** `app/desktop/src-tauri/target` and the Node sidecar were briefly committed, which left about 324 MB in the git object
store. They are untracked and ignored now. History was not rewritten.
- **Mac packaging tests:** the first DMG self-test (8/8) and the engine's 17 kernel-parity suites ran on an Apple M4 GPU in a 16 GiB Mac, with service stand-ins for signing.
Later inference measurements on larger Macs are in [MAC.md](../../docs/MAC.md).
+3 -3
View File
@@ -178,7 +178,7 @@ Back both up (a lost feed key means every installed PC needs a build with a new
Then, in git, once, in the commit that ships the first signed release (the release key id is `5d1bc23abbeffd0d`):
* the `keys` entry from `feed-key.pub.json` into `strata_control/update_keys.json`;
* the Tauri public key into `apps/desktop/src-tauri/tauri.conf.json` (`plugins.updater.pubkey`) and into `update_keys.json` as `app_minisign_public`
* the Tauri public key into `app/desktop/src-tauri/tauri.conf.json` (`plugins.updater.pubkey`) and into `update_keys.json` as `app_minisign_public`
(the Terminal verifies the app installer with it).
Only release keys live in `update_keys.json`. A tester or local-test key is never added there: it is passed with `STRATA_UPDATE_TRUSTED_KEYS`
@@ -210,7 +210,7 @@ All signing happens on the release PC, on the finished files.
# --url-prefix= (not --url-prefix "") because PowerShell 5.1 drops an empty argument. The Control version is the VERSION file
# (0.1.63), not the app version: a Control package newer than the installed one is installed by `strata update`.
# Pack Linux and Mac packages on Linux / the Mac or on Windows with this tool: it sets the execute bit from the file header either way.
cd apps/desktop && npx tauri build --bundles nsis --config src-tauri/tauri.update.conf.json # Windows installer (no engine inside)
cd app/desktop && npx tauri build --bundles nsis --config src-tauri/tauri.update.conf.json # Windows installer (no engine inside)
# Linux: tauri build --bundles appimage (no engine inside) is the AppImage
# on the release PC, per updater artifact (Windows setup .exe, Linux .AppImage, Mac Strata.app.tar.gz):
npx tauri signer sign -f <path to tauri-updater.key> <artifact> # writes <artifact>.sig
@@ -262,7 +262,7 @@ Publish as a normal release (latest): a pre-release is not found by `latest/down
Everything above runs against a folder or a loopback server: `tests/terminal/test_update_feed.py` (signatures, hashes, downgrades, selection),
`tests/terminal/test_updater.py` (end to end against a loopback HTTP feed with stub engines: update, test-start, switch; a failing test start
keeps the old engine; an interrupted download resumes; rollback; Control; the app installer's minisign check), `apps/host/tests/component-updates.test.mjs`
keeps the old engine; an interrupted download resumes; rollback; Control; the app installer's minisign check), `app/host/tests/component-updates.test.mjs`
(the Settings buttons). For a real engine on a box, build a package with `packaging/package_engine.py`, serve it from a local feed made by `packaging/make_local_feed.py`, and run `strata update --feed` against it.
### Release gate: a feed model installed from a real file
+1 -1
View File
@@ -174,7 +174,7 @@ def plan(report: dict, set_index: int, a, prev: dict) -> dict:
nm = re.sub(r"Strata-\d[\d.]*-", "Strata-%s-" % a.app_version, e["name"])
changed.append({"name": nm, "size": e["size"], "est": True, "why": "app rebuilt with the Models page text"})
step("%d" % n, "App text for the model (Models page) and the app bundles", "owner PC (Windows installer), a Linux box (AppImage), m1002 (Mac, unsigned; the owner signs)", 40,
["# edit apps/host/src (the model's name and one line), then the 0.2.11 app recipe: scripts/relwin/win_installer_rc1.ps1, the AppImage and Mac scripts",
["# edit app/host/src (the model's name and one line), then the 0.2.11 app recipe: scripts/relwin/win_installer_rc1.ps1, the AppImage and Mac scripts",
"python packaging/feed_tool.py set-app-platform --app-json latest.json --target <target> --archive <installer> --sig <installer.sig> --version %s" % a.app_version],
[c["name"] for c in changed if APP_RE.match(c["name"])])
n += 1
+1 -1
View File
@@ -121,7 +121,7 @@ TOOLS_SUBSET = (
#: (tools/strata_mcp.py reads setup.py's tables) and the install job, which downloads the model the user chose, prepares it with
#: the bundled tools and writes a run config naming "component:strata-engine". setup.py runs in its CONTROL mode there
#: (STRATA_CONTROL_INSTALL=1: no pip, no engine fetch, no compiler). Entry points; their local imports under tools/ come with them.
#: The same list the app's Control component stages (apps/desktop/scripts/stage-control.py uses these names).
#: The same list the app's Control component stages (app/desktop/scripts/stage-control.py uses these names).
INSTALLER_FILES = ("setup.py", "ref/load.py") # ref/load.py: strata_pack.py (the Q2_0 AVX-512 repack) imports it
#: calibrate: setup.py imports it after a tune (calibrate_config, and the earlier tuning that a rerun applies); it was missing from this
#: list in 0.1.47, so every launch after a tune failed (#3613, #3467). setup_tool_imports() below also reads setup.py itself, so a tools/