33 Commits
Author SHA1 Message Date
dotCooCoo c2d38135a6 Window: name the default and minimum window sizes 2026-11-08 22:25:41 -08:00
dotCooCoo 472d73eb87 feat(ui): move window, dialogs, shortcuts and quit to the shared crates
Bump craft-ui to craft-libs 1b34eba and add craft-keymap, craft-dialogs,
craft-quit, craft-menu (macOS) and craft-window.

File dialogs no longer block the event loop. Shortcuts dispatch through
craft-keymap and match exactly their modifiers. On macOS, Quit asks about
unsaved work and the app quits through the platform. On a Wayland desktop
that leaves the frame to the app, the menu bar is the title bar.
2026-11-08 21:41:59 -08:00
dotCooCoo d23d6c76f1 feat(ui): check for new releases and update the app from inside it
Add Help > Check for updates... (ui.help.checkForUpdates), a check at
startup, the update prompt and result dialog from craft-update, and the
Windows update helper entry point.

A copy of the app downloaded directly was never told about a new version.
Runs driven by --control or MATERIALCRAFT_NO_PREFS skip the startup check.
Shortcuts wait while the prompt or a modal result dialog is open. The
update code builds on desktop only; the web build is unchanged.
2026-11-08 20:25:11 -08:00
chasse20 0c9321237c Fix startup path assertion 2026-11-07 19:13:51 -05:00
a0180da9b6 Reply to non-UTF8 lines on the control channel (#118)
Clients cannot tell a refused non-UTF8 request from a dropped connection, unlike malformed JSON which gets an explicit error reply.

Make the TCP control servers reply with an error for non-UTF8 lines, closing before auth and continuing after auth like bad JSON.

Test: non_utf8_line_before_auth_gets_refusal_reply failed before the change and passes after.

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-06 10:10:38 +01:00
chasse20 2adbdf4aab Merge main while preserving native graph architecture 2026-11-06 00:58:56 -05:00
chasse20 d318484b41 Checkpoint native SBS primitive workflow
Replace the legacy Rust procedural library with clean-room native primitives, typed function execution and FX-Map graphs. Save supported content as native SBS and organize the model, evaluators, codecs and editors into focused modules.

Add shared graph editing behavior, flat filtered node menus, frame and comment editing, named Explorer outputs and an original atomic sample. Document the tested scope and remaining interoperability work.
2026-11-05 18:23:06 -05:00
FredApps 56407b9470 Revert the batch rollback and restore prior main 2026-11-05 22:04:58 +01:00
Rafael Mendes a7b9194820 Revert reviewed PR batch and cancel 0.1.3 preparation
Restore tracked files to 91bb53f07a, immediately before the batch, at the maintainer request. Preserve the existing history and earlier work, including PR #38. Revert the 50 reviewed PR merges and the version bump in 441092c. The published 0.1.2 release is unchanged.
2026-11-05 17:48:14 -03:00
Rafael Mendes a55d555386 Use distinct test module names for authentication coverage 2026-11-05 14:43:40 -03:00
Rafael Mendes 1982beb6a8 Retain bounded authentication and add exact token request coverage 2026-11-05 14:43:03 -03:00
Rafael Mendes 6b6f8728c2 Bound relief workers and integrate real height previews 2026-11-05 12:25:44 -03:00
Rafael Mendes b426aa1d52 Merge branch 'fix/automation-root-aliases-55' of https://github.com/jayzed80/materialcraft into review/pr-61 2026-11-05 12:13:37 -03:00
Rafael Mendes 4f8b946f68 Merge branch 'fix/no-desktop-start' of https://github.com/smittie2000/materialcraft into review/pr-50 2026-11-05 11:36:10 -03:00
Rafael Mendes 56aaea24ae Use the bound control port and handle thread creation failures 2026-11-05 10:50:37 -03:00
Rafael Mendes f5b3fe73de Merge remote-tracking branch 'origin/main' into review/pr-42 2026-11-05 10:37:52 -03:00
SteamSmithandClaude Sonnet 5.5 26fd0a8b03 fix(control): random owner-only token file, constant-time compare, close on failed auth
The desktop control server had its own token code (hashed RandomState, default-permission
file in the shared temp dir, plain ==, unlimited guesses on one connection). It now uses the
automation crate's server_token and token_matches, which the CLI already used.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 06:39:40 -05:00
PiJellyPin 8bdae1157d Fixed Heightmap 2026-11-05 02:38:04 +01:00
jayzed80andClaude Opus bdfc3daabd cli: accept --automation-read-root / --automation-write-root (#55)
materialcraft-cli mcp and serve now take the --automation-*-root spelling
the other crafting apps use, as aliases of --read-root / --write-root. The
parser stores them under the short names, so the last root given wins
whichever spelling it used. Adds unit tests and a note in the protocol doc.

Fixes #55

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-11-04 21:58:48 +00:00
AndreIsraelAO 3947e3c6f5 Merge main into feat/22-graph-context-export 2026-11-04 17:53:40 -03:00
smittie2000andClaude Opus 5.5 5a7fe7b6b6 start_failure: an app start-up error doesn't blame the graphics
From CodeRabbit: an error from the app creator (AppCreation, e.g. a --control
file it can't write) comes after the window and renderer started, so "update
the graphics driver" doesn't apply. It now says only that the app couldn't
start; other errors keep the window/graphics text. Tested both ways (the
new test fails with the AppCreation arm disabled).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:17:30 +02:00
Chris Hassebrook d62ca9ac53 Merge branch 'main' into 49-change-to-sbs-instead-of-mcraft 2026-11-04 01:11:49 -05:00
PiJellyPin 6310230ecd Load sbs files
save, load etc.. for sbs files
2026-11-04 07:03:54 +01:00
Zachary Aflalo c97f92abff Start desktop and browser sessions with an empty graph (#29) 2026-11-04 06:17:40 +01:00
smittie2000andClaude Opus 5.5 6f73fc7c77 start_failure: say the window could not start or stopped, and offer the driver as a likely fix
The dialog is shown for any error run_native returns, including one after the
window was up, so "could not start its window" and "updating the graphics
driver usually fixes this" overstated what is known. From review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 06:50:35 +02:00
smittie2000andClaude Opus 5.5 c9e3a9ea83 fix(windows): a start that never opens a window says why instead of exiting silently
Without a usable GPU, driver or desktop, no graphics backend can create a
window and MaterialCraft exited with code 1 and nothing on screen.
The reason now goes to the log and to an error dialog, as FilmCraft does
since 0.14.0 (which unstuck it on WinGet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 23:11:04 +02:00
Simon Hull 2bd4fd35b8 Control channel: harden the token file and the app's control server
The app wrote its control token to the temp folder with default permissions from a
hash-based generator, compared it with ==, spawned unlimited threads and let an
unauthenticated client hold a connection for 10 minutes. The shared token file was opened
with create+truncate, which follows a planted symlink.

- Token files are created new (remove, then O_EXCL) with mode 0600; clients only read a
  regular, owner-only, non-symlink file.
- The app's control server uses the shared security module: OS-random token, constant-time
  compare, bounded lines, at most 16 connections, one auth attempt within 10 s, close on
  malformed JSON before auth.
- serve --port and the app bind before writing the token file.

Ported from TextureCraft 5a065c1 and 836e3f2.
2026-11-03 13:17:16 -06:00
AndreIsraelAO e816ad75bb Keep export proportions and expose size in the CLI and MCP
size is now the larger side in pixels and the other side keeps its
proportion; 0 means the graph's size. Adds --size to the CLI export,
size to the MCP outputs_export, and the docs line. The resolution combo
shows the graph's real size.

Refs #22
2026-11-03 07:29:07 -03:00
bflatasticandClaude Opus 5.5 e34b2b0597 App icon: the owner's engraved rhino on MaterialCraft teal
Vectorised with craftrules vectorize_tile.py at the shared Crafting Apps
settings (512 tile, rx=112, ink/paper/#178a9c), with every PNG, .ico and
.icns regenerated by packaging/icons.sh. The README shows the icon, and
the UI accent and web loader use the new teal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:26:14 +07:00
bflatasticandClaude Opus 5.5 288e6f22ce Beauty renders and eight new sample materials for the README
- render: an offline hq path (displaced subdivided mesh, ray-traced AO,
  shadowed key light, 3x3 supersampling) on a vignette backdrop; the
  sphere's UVs wrap twice so texels stay square
- CLI/RPC/MCP render: --tiling, --hq and --displacement
- templates: new painted metal plates, lava rock, polished marble and
  wicker weave; reworked brick wall, stone tiles, wood planks and mossy
  ground
- README: new material gallery and refreshed screenshots

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:24:11 +07:00
bflatasticandClaude Opus 5.5 416bf8dba8 CLI --set for graph inputs; typed values convert across types
Exposed inputs bound to parameters of another type (a float input on an
int parameter) were silently ignored: coerce_json now converts a typed
value's payload. cook/export/render take --set <input>=<value>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 04:59:20 +07:00
bflatasticandClaude Opus 5.5 54fc5b9571 README, AGENTS, ATTRIBUTION, roadmap and docs; web app; icons
The README in the Crafting Apps frame with real screenshots and renders made
by MaterialCraft, the agent guide with the asset and clean-room rules, the
attribution list, the parity assessment, gaps, roadmap, architecture,
control protocol, localization and file format docs. Adds the browser build
(trunk), the .ico/.icns icons and centers the 3D camera on the mesh bounds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 04:04:13 +07:00
bflatasticandClaude Opus 5.5 2648fd0334 UI shell, 3D preview renderer, automation, CLI and desktop app
The egui front end in its own crate: docked explorer, library with live node
previews, the node graph editor (thumbnails, typed ports, wiring, box select,
frames, comments, pins, node search, library drag and drop), properties with
curve and gradient editors, 2D view and a CPU PBR 3D preview with parallax
and image-based lighting. Every edit is an engine command; the control channel
adds synthetic mouse/keyboard input for agents. Adds the MCP server, the
JSON-lines RPC, the headless CLI (render, cook, export, run, batch, mcp, serve),
the desktop app, an original placeholder icon and an offscreen snapshot test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 03:54:08 +07:00