Repository navigation
TensorFold Web: a small local web app, and tensorfold web to open it - #1781
Conversation
faeb580 to
0a0f4cf
Compare
|
This is ready for 1.2.5. @Stephane-Eden, thank you: TensorFold Web is your TensorFold Studio, and every commit here carries your Since the adoption, the branch has been reworked to match our desktop app and our code rules:
Rebased onto |
|
Looking forward to testing it out! |
A small local web app for picking a model that fits, running it, watching it, chatting and connecting tools, adopted under its Apache-2.0 license (web/LICENSE, web/NOTICE): the package and its command are tensorfold-web, the Python package tensorfold_web, and it lives in web/. Co-authored-by: Stephane-Eden <[email protected]>
TensorFold's server now refuses a request whose Origin is not its own address (zig/src/server/request_guard.zig), so chat through TensorFold Web's relay got 403. The relay now drops Origin. TensorFold Web's own gate still refuses cross-site changes before the relay runs. Tested against a mocked engine that applies main's Origin rule. Co-authored-by: Stephane-Eden <[email protected]>
Main still accepts --slide and --slide-graph (zig/src/server/cli.zig:100-101), but it now refuses --slide before loading when the server has no key (zig/src/server/slide_key.zig, called from main.zig:102), and exits 2. The TensorFold Web made a key only when sharing was on, so a local copy that learns never started. Starting such a copy now creates a key if Settings has none and saves it, as sharing does. The key reaches the engine through TENSORFOLD_API_KEY, never the command line, and the relay and the lessons present it. Tested with a mocked start that checks main's key rule. Co-authored-by: Stephane-Eden <[email protected]>
Main's serving line no longer matched TensorFold Web's pattern: the drafts
field is a phrase ("MTP + copies", "DFlash2 (repo) + copies", "none",
"off") and the context can be "unlimited" (zig/src/server/serve.zig:247,
draft_line.zig). Ready state already came from GET /health. With a key,
/health is only {"status": "ok"}, so TensorFold Web now also reads GET /v1/load
(load_metrics.zig) for the served model, the parked state, the lanes and
the running and waiting requests. /v1/models stays as the fallback for an
engine without /v1/load, and a 401 there reads as an unauthorized key.
The serving line stays only as the fallback for what no endpoint gives,
the context and the load time, and now parses main's format as well as
1.0.x's.
Tested against a mocked keyed main server and main's serving lines.
Co-authored-by: Stephane-Eden <[email protected]>
The Teach screen now says that teaching works on Nemotron 3.5 Lightning only. A lesson for a served copy of another family is refused with 409, naming the family the copy's config gives. Such a copy starts without --slide, with a note in the engine log, and needs no key. Copy creation already refused other bases. This is TensorFold Web's own limit. Main's --slide also teaches Qwen3.8 Flash Next on a GB10 (docs/living-weights.md). The Teach line is edited in ui/src and in the built page alike. Run npm run build in web/ui to regenerate the page. Co-authored-by: Stephane-Eden <[email protected]>
Every response now carries X-Frame-Options: DENY and a Content-Security-Policy with frame-ancestors 'none', the gate's own refusals and the relay's responses included. An engine page relayed through /engine/ keeps its own policy, with its frame-ancestors replaced. The page frames none of its own pages, so nothing it shows is lost. Co-authored-by: Stephane-Eden <[email protected]>
The one install TensorFold Web runs itself (Bench's Install button) was
already `uv tool install tool-eval-bench==2.8.0`. The commands it prints
for people to run were not: Bench's "not installed" error and the
service's "install it for good first" hint. They now name the exact
version: tool-eval-bench==2.8.0, and tensorfold-web=={__version__}.
A test reads every install command in the Python sources, the page
sources and the built page, and fails on one without ==.
Co-authored-by: Stephane-Eden <[email protected]>
It says where TensorFold Web comes from, that it was renamed, and the changes made in adopting it. LICENSE is unchanged. Co-authored-by: Stephane-Eden <[email protected]>
Co-authored-by: Stephane-Eden <[email protected]>
Co-authored-by: Stephane-Eden <[email protected]>
Split HTTP registration, engine telemetry, benchmark modes, lessons and report rendering by responsibility. Keep the behavior cases and share their fixtures. Make loopback tests independent of host DNS and proxy settings. Co-authored-by: Stephane-Eden <[email protected]>
Generate both themes from the desktop preset and resolver. Use the same surfaces, type, content-pane seam and controls. Remove redundant fonts and block comments, and verify every generated runtime token in both modes. Co-authored-by: Stephane-Eden <[email protected]>
Commit the resolved Python environment and the production UI built from the shared desktop theme. Co-authored-by: Stephane-Eden <[email protected]>
Defer Hub size refresh until Discover is opened. Connect engine and peer RPCs directly so loopback requests cannot be captured by a system proxy. Limit recommendations to native families and report the build version for the development stand-in. Retain red/green startup and proxy regressions, check the catalog against native capabilities, and keep Python comments to one line. Co-authored-by: Stephane-Eden <[email protected]>
Open a fresh chat with a bottom composer and a conversation sidebar. Group model discovery, learning and API tools under Models, place benchmarks beside search, and open compute controls in a drawer. Give Settings its own section list and move the setup checklist there. Preserve existing actions and shortcuts, shorten repeated copy, retire Home and its styles, and enforce source size and single-line comment rules. Generate the stand-in version from the native build metadata. Co-authored-by: Stephane-Eden <[email protected]>
Ship the rebuilt UI with the existing dependency locks and retained third-party notices. Co-authored-by: Stephane-Eden <[email protected]>
Keep screen and card explanations to a single sentence, including model and API recipe descriptions. Use the machine engine version for every Settings label, with the flags version only as a fallback. Shorten the Teach comment and remove an over-wide inline comment. Co-authored-by: Stephane-Eden <[email protected]>
Check all five optional Web packages before loading Web fixtures or test modules. Collect an explicitly skipped item per module when they are absent, so standalone and root collection both finish cleanly. Count UTF-8 bytes and indentation in maintained comment-width checks. Co-authored-by: Stephane-Eden <[email protected]>
Co-authored-by: Stephane-Eden <[email protected]>
0a0f4cf to
005ec1a
Compare
|
Thank you @Stephane-Eden. This is merged into main with your commits under your own name, so you're credited as a TensorFold contributor. |
|
Thanks @Stephane-Eden! TensorFold Web, adopted from your TensorFold Studio, is in TensorFold 1.2.5, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.5 |
TensorFold Web is a small local web app: pick a model that fits, run it, watch it, chat, and connect your tools. It lives in
web/, and the CLI getstensorfold web:tensorfold-webis installed, the command runs it.uv tool install, pinned to the same release (git+…@v<version>#subdirectory=web).TENSORFOLD_WEB_NO_PROMPT=1, it prints the command instead.It's adopted from @Stephane-Eden's project (Apache-2.0;
web/LICENSEandweb/NOTICEsay where from and what changed), with fixes for current TensorFold:Origin.--slidenow requires./healthand/v1/load, not from log lines.Every commit carries Stephane's co-author credit, and he's added to the Contributors list.
Draft until:
web/uv.lockis generated:cd web && uv lock.web/tensorfold_web/ui_dist) is rebuilt withnpm ci && npm run build.The web workflow's pytest/ruff and wheel jobs run here. The CLI's 12 host tests pass (
zig build test-web-cli-host).