Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docs/wiki/Studios.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Boards of pictures, videos, notes, colours and links in a fast grid with section

## Tools

Tools are single-purpose pages in the studio switcher: Angles (an orbit sphere for camera angles), Remove background, Remove region (paint a mask on an image or a video frame), Frame extractor, Background change (swap a video's background from a reference picture), Storyboard and Mesh tools (split, segment, clean and remesh a model). FBX files convert to GLB on upload. GLB, glTF and FBX open and can be placed in a scene. OBJ, STL, USDZ and DAE are stored in the library but cannot be previewed or placed yet.
Tools are single-purpose pages in the studio switcher: Angles (an orbit sphere for camera angles), Remove background, Remove region (paint a mask on an image or a video frame), Frame extractor, Background change (swap a video's background from a reference picture), Storyboard and Mesh tools (split, segment, clean and remesh a model). FBX files convert to GLB on upload. GLB, glTF, FBX, OBJ and STL open and can be placed in a scene. OBJ and STL are converted to GLB in the window and show in neutral grey, because the library keeps no material file beside them. USDZ and DAE are stored in the library but cannot be previewed or placed yet.

## Library

Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

Versions follow `v*.*.*` with dots. Dates are UTC.

## 0.9.4 · 2026-11-28

### Changed

- OBJ and STL files open in the 3D viewer, show a preview and a cover, and can be placed in a scene. They are converted to GLB in the window, as FBX files are, and show in neutral grey, because the library keeps no material file beside them. Mesh tools preview them too. USDZ and DAE are still stored only.

### Fixed

- A private file restored from its backup copy is readable by you alone from the moment it is opened, as a newly written one already was.
- The library picker shows the "stored, cannot be previewed yet" note for 3D formats the viewer cannot show, as the library and the upload dialog do.

### Checked

- Type check, production build, 1186 frontend tests, 478 engine tests, the engine self-check, the version check, the skills check and the agents check pass on Linux. A small OBJ and a small STL were converted through the built app in a headless browser.
- Two assertions in the viewer's format test that said OBJ is unknown and cannot be previewed now expect the opposite. No test was added.
- Not run: the installer, the engine freeze, the desktop build, and a generation against a provider.

## 0.9.3 · 2026-11-28

### Changed
Expand Down
2 changes: 1 addition & 1 deletion LICENSES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Third-party licences · formcraft

Version v0.9.3 · 2026-11-28
Version v0.9.4 · 2026-11-28

formcraft is licensed under the Apache License, Version 2.0 (see `LICENSE`), Copyright 2026 NodeAgentc, Inc. This file lists every third-party item that ships with formcraft or is used to build it, with its version, licence, where it ships and what the licence asks of us. `NOTICE` carries the short list of obligations that travel with the app and points here.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>

<p align="center">
<img alt="version v0.9.3" src="https://img.shields.io/badge/version-v0.9.3-eef0f4?style=flat-square">
<img alt="version v0.9.4" src="https://img.shields.io/badge/version-v0.9.4-eef0f4?style=flat-square">
<img alt="TypeScript, Vite and Three.js" src="https://img.shields.io/badge/TypeScript%20%C2%B7%20Vite%20%C2%B7%20Three.js-3178c6?style=flat-square&logo=typescript&logoColor=white">
<img alt="Python and FastAPI" src="https://img.shields.io/badge/Python%20%C2%B7%20FastAPI-3776ab?style=flat-square">
<img alt="macOS, Windows and Linux" src="https://img.shields.io/badge/macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-native-2f7bf5?style=flat-square">
Expand Down Expand Up @@ -77,7 +77,7 @@
<tr>
<td width="33%" valign="top"><h4>122 catalogued models</h4>32 image · 43 video · 12 audio · 17 mesh · 5 world · 13 utility · each field, limit and price read from the provider</td>
<td width="33%" valign="top"><h4>Studios and tools</h4>Create · Canvas · Scene · Board · Edit · Angles · Remove background · Remove region · Frame extractor · Background change · Storyboard · Mesh tools</td>
<td width="33%" valign="top"><h4>Formats</h4>Opens: PNG · JPEG · WEBP · GIF · MP4 · MOV · WEBM · MP3 · WAV · GLB · glTF · FBX · SPLAT · Native: <code>.fcrft</code>. OBJ, STL, USDZ and DAE are stored in the library but cannot be previewed or placed yet. Exports: MP4 · WebM · PNG · <code>.fcrft</code>; no GIF, image sequence or mesh export yet.</td>
<td width="33%" valign="top"><h4>Formats</h4>Opens: PNG · JPEG · WEBP · GIF · MP4 · MOV · WEBM · MP3 · WAV · GLB · glTF · FBX · OBJ · STL · SPLAT · Native: <code>.fcrft</code>. GLB, glTF, FBX, OBJ and STL open and can be placed; OBJ and STL are converted to GLB in the window and show in neutral grey, because the library keeps no material file beside them. USDZ and DAE are stored in the library but cannot be previewed or placed yet. Exports: MP4 · WebM · PNG · <code>.fcrft</code>; no GIF, image sequence or mesh export yet.</td>
</tr>
</table>

Expand Down
4 changes: 2 additions & 2 deletions backend/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Living log of comment content, explainers, rationale, TODOs and removed code for the engine side of the repo. Source files stay comment-free per the owner's hashout-log rule; what they would have said lives here, indexed. Read this first, then edit code surgically.

Current build version: v0.9.3
Current build version: v0.9.4
Last updated: 2026-11-02 · v0.8.0 engine MCP (dual-era protocol, 44 tools, consent, token, bridge, engine.port, the stdio launcher and mcp mode), the export preview, and the D1 fixes (bridge disconnects and bye, approval keys, withdrawals, root checks before asking, frozen launcher). Before that, B3 v0.7.0 engine (kind edit, /api/edit capability and export sessions with a POST cancel alias, GET /api/media/{id}/probe, /api/sounds with an original synthesised set) and its F2 fix. Before that, A1 v0.6.0 catalogue (Meshy rigging and character models, pages rig and character); W1 v0.6.0 engine (a finished world keeps all its assets and `meta.world`, POST /api/media/{id}/world/complete, the starter pack routes and install job). Before that, 2026-11-01 · E1 v0.5.0 engine (canvas and board project kinds, POST /api/media/mask-video, GET /api/media/{id}/frame). Before that, F5 v0.4.0 fixes (ASCII FBX stored as a 3D model with a start-up correction of earlier items, the FBX original found from its GLB in both link directions, a visible import unhides an identical hidden item). Before that, S5 v0.4.0 engine for the Scene studio: scene projects (kind `scene`, cover upload, role and meta carried in `.fcrft`), media migration 4 (`role`, `meta`), the H.264 encoder probe and the engine encode sessions, library 3D items as mesh-tool inputs in the planner. Before that, F2 v0.3.0 fixes (the mask edit colour in the catalogue, hidden media import, a private copy of a character's image, the sog extension). Before that, v0.3.0 library and projects engine: folders, tags, favourite and hidden flags, covers for 3D objects and worlds, characters with an avatar job, prompt history read from the jobs, the .fcrft project store with its hardened reader (schema 3), the mesh-tools page key, and a window policy that lets the 3D viewers run. Before that (v0.2.0), generation: provider clients for fal and World Labs with a key check, the model catalogue and the planner (request to provider call and price), POST /api/generate with the gen.* job runners, and job lanes so long generation jobs cannot block imports and downloads. Before that (v0.1.0), E1 (Phase 3 gaps): `askLocation` setting, save-dialog downloads (`path`, `overwrite`), batch download (inline or as a `download` job), auto-download on job success, CSP on the served window. Before that, wave 2 (C6): ffmpeg found or fetched the family way, ffprobe fill-in of durations and sizes, video poster frames, `ffmpeg` in capabilities. Before that: engine core (Phase 1 skeleton, Phase 3 jobs, events, media, costs, keys)

---
Expand Down Expand Up @@ -2240,7 +2240,7 @@ From VERIFY_v0.8.0_E2E.md. A closed page's long poll could take a queued call: t

## 2026-11-28 · v0.9.3 the key file, the Python lookup and the LGPL text {#keys-v093}

- **Key file (`services/secrets.py`).** The file is opened owner-only (600, folder 700) at creation. Before, each write made a temporary file with default permissions and narrowed it afterwards. The reported store is the one the last save used and is remembered per process, so a restart works it out again. On Windows POSIX modes mean nothing; the profile folder's own permissions are the only guard, and the engine says so. Open: `core/durable.py`'s restore-from-`.bak` path still narrows permissions after writing.
- **Key file (`services/secrets.py`).** The file is opened owner-only (600, folder 700) at creation. Before, each write made a temporary file with default permissions and narrowed it afterwards. The reported store is the one the last save used and is remembered per process, so a restart works it out again. On Windows POSIX modes mean nothing; the profile folder's own permissions are the only guard, and the engine says so. Closed in v0.9.4: `core/durable.py` opens private files and their `.bak` copies with `os.open(..., 0o600)` through one helper, the temporary file with `O_EXCL` and the `.bak` with `O_TRUNC` then `fchmod` where the platform has it, so neither a normal write nor a restore leaves a moment of wider permissions. An older, looser `.bak` is narrowed on the next write. Files that are not private are unchanged.
- **Python lookup (`setup/lib.sh`, `setup/find_python.bat`).** Exactly 3.12 wins over a newer Python on PATH so an engine built from source matches what CI tests. The fallback line goes to stderr so `mcp` stdout stays clean. `fc_python` still echoes one command, so its callers are unchanged.
- **LGPL text.** `licenses/LGPL-2.1.txt` is a byte copy of the system's `/usr/share/common-licenses/LGPL-2.1` and ships through `bundle.resources`. formcompiler's `tauri_config.py` does not touch that key. No written offer and no recorded library versions.
- **Tool list check (`setup/agents.py`).** `WINDOW_TOOL_NAMES` is read from `services/agents.py` with `ast`, as `mcp_tools.py` already was, so the engine is never imported.
Expand Down
2 changes: 1 addition & 1 deletion backend/app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path

APP_NAME = "formcraft"
VERSION = "0.9.3"
VERSION = "0.9.4"
FRONTEND_PORT = 5290
BACKEND_PORT = 8290
SUBFOLDERS = ("library", "thumbs", "downloads", "db", "settings", "logs")
Expand Down
25 changes: 20 additions & 5 deletions backend/app/core/durable.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ def _say(text: str) -> None:
print(f"formcraft: {text}", file=sys.__stderr__)


def _open_private(path: Path, flags: int):
descriptor = os.open(path, os.O_WRONLY | os.O_CREAT | flags, 0o600)
if hasattr(os, "fchmod"):
try:
os.fchmod(descriptor, 0o600)
except OSError:
os.close(descriptor)
raise
return descriptor


def _parse(path: Path):
return json.loads(path.read_text(encoding="utf-8"))

Expand Down Expand Up @@ -52,15 +63,19 @@ def write_json(path: Path, data, *, private: bool = False, indent: int | None =
path.parent.mkdir(parents=True, exist_ok=True)
temporary = path.with_name(f".{path.name}.{uuid.uuid4().hex}.tmp")
try:
temporary.write_text(json.dumps(data, indent=indent), encoding="utf-8")
text = json.dumps(data, indent=indent)
if private:
with contextlib.suppress(OSError):
os.chmod(temporary, 0o600)
with os.fdopen(_open_private(temporary, os.O_EXCL), "w", encoding="utf-8") as handle:
handle.write(text)
else:
temporary.write_text(text, encoding="utf-8")
if keep_backup and path.is_file():
with contextlib.suppress(OSError):
shutil.copyfile(path, _backup(path))
if private:
os.chmod(_backup(path), 0o600)
with open(path, "rb") as source, os.fdopen(_open_private(_backup(path), os.O_TRUNC), "wb") as target:
shutil.copyfileobj(source, target)
else:
shutil.copyfile(path, _backup(path))
os.replace(temporary, path)
finally:
temporary.unlink(missing_ok=True)
4 changes: 2 additions & 2 deletions frontend/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Living log of comment content, explainers, rationale, TODOs and removed code for the frontend side of the repo. Source files stay comment-free per the owner's hashout-log rule; what they would have said lives here, anchored by file and symbol. Read the map and the table of contents first.

Current build version: v0.9.3
Current build version: v0.9.4
Last updated: 2026-11-02 · v0.8.0 command metadata, live edit commands, the automation bridge and 30 window tools, approvals with withdrawal, the Agents and Updates panels, the bridge goodbye beacon, the new icon in the splash and favicon. Before that, v0.7.0 Edit studio (engine/edit, ui/edit: contract, store and operations, renderer, effects, masks and audio mix, preview and transport, timeline, properties and assets panels, studio shell, files and export), the shared media panel in Canvas, Board and Scene (ui/panels), Add to edit in the Scene strip, lightbox and library, and the F1 and F2 fixes. Before that, v0.6.0 Scene studio from scene to shot: worlds as the environment (ui/scene/world), light and materials (view/ibl.ts, view/contact.ts, models keep their materials), the prompt bar and shot results (ui/scene/shot, replacing the Generate panel), generate into the scene (ui/scene/make), the downloadable starter pack (ui/scene/pack). Before that, 2026-11-01 · v0.5.0 Canvas studio (engine/canvas, ui/canvas: stage and tools, files, generate, results, 3D model nodes), Board studio (engine/board, ui/board: shell, grid, inspector, Present, board canvas view), Background change and video region removal (ui/tools/background-change, remove-region video mode), the app.ts wiring and `maskVideo` in io/api.ts. Before that, v0.4.0 F5 fixes (FBX conversion, pooled model renderer, Coming later), v0.4.0 Scene studio (engine/scene, ui/scene: host and view, object builders, procedural starter kit, editor chrome and files, presets and placement, outliner and inspector, timeline, posing and animation library, capture and record with mediabunny, Generate box and preview), Mesh tools and FBX conversion (ui/tools/mesh-tools.ts, ui/viewers/fbx-convert.ts, io/api-media-meta.ts), the upload dialog's 3D review step, and the app.ts wiring (mounts, studio-aware drops, close guard). Before that, v0.3.0 F1 fixes (lightbox hand-offs to Remove background, 3D object and World, Open in Scene placeholders, batch groups in the Library studio and the picker, mask polarity from the catalogue, one-step hidden import, character dedupe by content), on top of v0.3.0 Library studio (virtual grid, folders, tags, favourites, hidden items, covers), characters and prompt history, tags and favourite in the lightbox, 3D object and Gaussian splat viewers with covers, the 3D object and World pages, the tool pages (Angles, Remove background, Remove a region, Frame extractor, Storyboard) and projects (New and Open, .fcrft files, Home project lists). Before that (v0.2.0) Create pages: window model store and labels, model picker and options bar, prompt box with the mention editor and the fullscreen editor, reference deck and library modal, generation feed, lightbox, audio player and upload dialog, the Image, Video and Audio pages with the prompt store and handoffs, Behavior and Generation preferences, and gen.* job names in the job toasts. Before that (v0.1.0), E2 gap closing (job toasts, downloads with Ask where to save, Home file selection and delete, studio restore prefs, About dialog, cheatsheet hold time and pin), on top of wave 2 (title bar and menus, status bar and Jobs list, Home and importer, Preferences and panels, shortcuts panel, cheatsheet, alert sounds) and the orchestrator's integration edits in app.ts, ui/dom.ts, ui/menus.ts and styles/home.css

---
Expand Down Expand Up @@ -7148,6 +7148,6 @@ Checked in a real Chrome against the engine: a reload keeps the dock working (th
## 2026-11-28 · v0.9.3 unviewable models, the remember box and source maps {#models-v093}

- **Unviewable models.** The upload dialog and the library tile ask `modelFormat` from `ui/viewers/kinds` at run time, so the note goes away for a format the moment the viewer learns it. The tile shows its sentence as a tooltip because the existing tile CSS has no text slot. Open: `ui/library/library-modal.ts` still asks for a cover for these formats and shows no note.
- **OBJ and STL.** A conversion to GLB in the window, made the way `fbx-convert.ts` converts FBX, exists and is held back: `tests/unit/ui/viewers/kinds.test.ts` asserts that OBJ is an unknown format that cannot be previewed, and the owner decides whether those two assertions change. The library keeps no file beside an OBJ, so its material file is never found and a converted model is neutral grey.
- **OBJ and STL (shipped in v0.9.4).** A conversion to GLB in the window, made the way `fbx-convert.ts` converts FBX, with `ui/viewers/library-glb.ts` keeping the converted file in the library for reuse. The owner approved changing the two assertions in `tests/unit/ui/viewers/kinds.test.ts` that said OBJ is unknown and cannot be previewed. `ui/tools/mesh-tools.ts` goes through the viewer's own conversion. `ui/canvas/model3d/render.ts` reads only glTF and has no FBX path either, so a model as a canvas layer needs a conversion before `renderModel` for FBX, OBJ and STL alike. `ui/library/library-modal.ts` now asks `modelFormat` like the grid tile. The library keeps no file beside an OBJ, so its material file is never found and a converted model is neutral grey.
- **Remember box.** The approval dialog is built once and reused, so with no estimate the label stays in place with `visibility: hidden` and a disabled checkbox, and `finish` ignores a disabled box. Removing the label would shift the dialog.
- **Source maps (`vite.config.ts`).** Production builds emit none; `npm run dev` still serves them. `setup/freeze_backend` rebuilds a `dist` that still has `.map` files and stops if any remain.
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "formcraft-frontend",
"private": true,
"version": "0.9.3",
"version": "0.9.4",
"description": "formcraft frontend · the studio window",
"license": "Apache-2.0",
"type": "module",
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/ui/library/library-modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { t, tn } from '../i18n';
import { icon } from '../icons';
import { toast } from '../toasts';
import { coverKey, ensureCover, onCover } from '../viewers/cover';
import { modelFormat } from '../viewers/kinds';
import { batchGroups, library, type Batch } from './library-store';
import {
COL_MAX, COL_MIN, DRAG_PX, EDGE_PX, FADE_MS, FLUSH_MAX, FLUSH_MS, GLIDE_MS, KIND_ICON, MORE_MARGIN, NARROW_PX, PAGE, Pager, SCROLL_MAX, SEARCH_MS, WIDE_PX,
Expand Down Expand Up @@ -690,7 +691,7 @@ class LibraryModal extends Dialog {
const badge = q(n, '.fc-lib-badge');
const text = badgeText(m);
setText(q(n, '.fc-lib-name'), m.name);
setTitle(n, m.name);
setTitle(n, m.kind === 'model' && modelFormat(m) === null ? t('Stored in the library and can be downloaded, but cannot be previewed or placed in a scene yet.') : m.name);
setAttr(n, 'aria-label', m.name);
setText(badge, text);
setHidden(badge, !text);
Expand Down Expand Up @@ -741,6 +742,7 @@ class LibraryModal extends Dialog {
const id = node.dataset.key;
if (!id || node.dataset.thumb) return;
const m = this.byId.get(id)?.m;
if (m && m.kind === 'model' && modelFormat(m) === null) return;
const solid = m !== undefined && (m.kind === 'model' || m.kind === 'splat');
const cover = m && solid ? coverKey(m) : '';
if (m && solid && !cover) {
Expand Down
Loading
Loading