Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(forge-desktop): rebrand the desktop app to three.ws Forge with the platform theme, icon and update feed

nirholasdf474e7bfb75
diff --git a/apps/forge-desktop/.gitignore b/apps/forge-desktop/.gitignore
index 0afebef0f..3e621f804 100644
--- a/apps/forge-desktop/.gitignore
+++ b/apps/forge-desktop/.gitignore
@@ -15,7 +15,7 @@ api/*.pyc
api/**/*.pyc
api/.venv/
api/venv/
-tools/modly-cli/__pycache__/
+tools/forge-cli/__pycache__/
.hermes-e2e/
# Models (heavy, downloaded at runtime)
diff --git a/apps/forge-desktop/CONTRIBUTING.md b/apps/forge-desktop/CONTRIBUTING.md
index 20f6137f6..fa86d63fc 100644
--- a/apps/forge-desktop/CONTRIBUTING.md
+++ b/apps/forge-desktop/CONTRIBUTING.md
@@ -1,7 +1,7 @@
-# Contributing to Modly
+# Contributing to three.ws Forge
Thanks for wanting to help out! You don't need write access to the repository to
-pick up a ticket, work on it, and ship a fix — here's how the flow works.
+pick up a ticket, work on it, and ship a fix, here's how the flow works.
## Finding something to work on
@@ -13,7 +13,7 @@ pick up a ticket, work on it, and ship a fix — here's how the flow works.
## Claiming a ticket
Comment **`/assign`** on the issue you want to work on. A bot will assign it to
-you automatically — no repo permissions required.
+you automatically, no repo permissions required.
- Only one person can be assigned to an issue at a time. If it's already
assigned, ask the assignee first or wait for them to release it.
@@ -27,7 +27,7 @@ looking at the board can see what's actively being worked on.
## Submitting your work
1. **Fork** the repository and create a branch for your change.
-2. Make your change. Keep it focused — one issue, one PR.
+2. Make your change. Keep it focused, one issue, one PR.
3. Run the checks locally before opening a PR:
```bash
npm run lint
@@ -44,5 +44,5 @@ test**; once merged, it moves to **Done**.
## Getting help
If something in an issue is unclear, ask in a comment on the issue itself
-before starting — it's cheaper to clarify scope up front than to redo work
+before starting, it's cheaper to clarify scope up front than to redo work
later.
diff --git a/apps/forge-desktop/README.md b/apps/forge-desktop/README.md
index 04eb14ea1..0a6798ea3 100644
--- a/apps/forge-desktop/README.md
+++ b/apps/forge-desktop/README.md
@@ -1,17 +1,17 @@
<p align="center">
- <img src="resources/icons/icon.png" width="96" alt="Modly logo" />
+ <img src="resources/icons/icon.png" width="96" alt="three.ws Forge logo" />
</p>
-# Modly
+# three.ws Forge
**Local, open source, AI-powered image-to-3D mesh generation.**
Turn any photo into a 3D model using open source AI models running entirely on your GPU.
-Modly is a desktop application for Windows, Linux, and Apple Silicon macOS.
+three.ws Forge is a desktop application for Windows, Linux, and Apple Silicon macOS.
> Created by [Lightning Pixel](https://github.com/lightningpixel)
<p align="center">
- <img src="docs/app-screenshot.png" alt="Modly screenshot" />
+ <img src="docs/app-screenshot.png" alt="three.ws Forge screenshot" />
</p>
---
@@ -83,7 +83,7 @@ npm run build
## Extension system
-Modly supports external model and process extensions. Each extension is a GitHub repository containing a `manifest.json` plus the runtime entry files required by its type.
+three.ws Forge supports external model and process extensions. Each extension is a GitHub repository containing a `manifest.json` plus the runtime entry files required by its type.
### Official extensions
@@ -112,7 +112,7 @@ Modly supports external model and process extensions. Each extension is a GitHub
### Multiple Hugging Face repositories per model node
A model node whose weights are split across repositories can declare
-`model_sources`. Modly validates every source, downloads them sequentially in
+`model_sources`. three.ws Forge validates every source, downloads them sequentially in
one Models-page action, and considers the node installed only when every
declared check exists.
@@ -260,7 +260,7 @@ lists every variant under the node, and each one is downloaded or deleted on its
optional positive numbers, shown next to the variant when present.
- Every install downloads the shared files (`hf_include_prefixes`, with every
variant's files excluded automatically) plus one variant: the one asked for, or the
- `default` one — the first option when `default` is omitted. Files already complete
+ `default` one, the first option when `default` is omitted. Files already complete
on disk are skipped, so adding a second variant only fetches that variant.
Only declared variants are excluded from the shared pass: keep
`hf_include_prefixes` narrow enough that a variant the repository publishes but
@@ -281,7 +281,7 @@ Start with a basic workflow first. For example, on the "Workflows" tab, try: Ima
Model extensions may also declare `scene` as a node input or output. A scene is
a workspace directory containing `scene-manifest.json` with schema
-`modly.scene-manifest.v1`; it is not an arbitrary JSON file. Use the **Load
+`three-ws.forge.scene-manifest.v1`; it is not an arbitrary JSON file. Use the **Load
Scene** workflow node to select and validate an existing scene directory.
Scene-capable generators implement `generate_artifact(input_kind,
artifact_path, ...)`; legacy image generators and `POST /generate/from-image`
@@ -292,24 +292,24 @@ For this first contract, `scene` is model-only and must be declared as the singl
Model nodes may still accept multiple images and produce a scene.
-## Modly CLI
+## three.ws Forge CLI
-Agents and scripts can call a running Modly desktop app without using the UI via the stdlib-only CLI. The CLI is a thin helper over Modly's canonical automation concepts and keeps final machine-readable JSON on stdout:
+Agents and scripts can call a running three.ws Forge desktop app without using the UI via the stdlib-only CLI. The CLI is a thin helper over three.ws Forge's canonical automation concepts and keeps final machine-readable JSON on stdout:
```bash
-python tools/modly-cli/agent.py health
-python tools/modly-cli/agent.py model list
-python tools/modly-cli/agent.py workflow-run status <run_id>
-python tools/modly-cli/agent.py generate --image ./input.png --output ./export.glb
+python tools/forge-cli/agent.py health
+python tools/forge-cli/agent.py model list
+python tools/forge-cli/agent.py workflow-run status <run_id>
+python tools/forge-cli/agent.py generate --image ./input.png --output ./export.glb
```
Canonical commands are `health`, `model`, `workflow-run`, `capability`, and `process-run`. The friendly `generate` command starts `POST /workflow-runs/from-image`, polls the returned run, exports the final mesh when requested, and includes recovery metadata such as `workflow-run status ...` and `workflow-run cancel ...` in the JSON response.
-Compatibility and helper surfaces are intentionally separated: `legacy` wraps old `/generate/*` job endpoints, `dev serve-api` / `dev ensure-server` start only the FastAPI backend and do not prove Electron/Desktop bridge readiness, and `experimental comfy-image` / `experimental generate-from-workflow` are external ComfyUI orchestration helpers rather than the canonical Modly agent contract. Hidden helper aliases such as `status`, `export`, and `batch` remain parseable for scripts, but they are not presented as canonical root commands.
+Compatibility and helper surfaces are intentionally separated: `legacy` wraps old `/generate/*` job endpoints, `dev serve-api` / `dev ensure-server` start only the FastAPI backend and do not prove Electron/Desktop bridge readiness, and `experimental comfy-image` / `experimental generate-from-workflow` are external ComfyUI orchestration helpers rather than the canonical three.ws Forge agent contract. Hidden helper aliases such as `status`, `export`, and `batch` remain parseable for scripts, but they are not presented as canonical root commands.
-`experimental generate-from-workflow --workflow <name> --output <path>` treats `--output` as the final artifact location. When the ComfyUI workflow produces a downloadable 3D asset, the CLI downloads it directly; image-only workflows remain a compatibility path through Modly image-to-3D generation.
+`experimental generate-from-workflow --workflow <name> --output <path>` treats `--output` as the final artifact location. When the ComfyUI workflow produces a downloadable 3D asset, the CLI downloads it directly; image-only workflows remain a compatibility path through three.ws Forge image-to-3D generation.
-See `tools/modly-cli/SKILL.md` for the agent workflow and output contract.
+See `tools/forge-cli/SKILL.md` for the agent workflow and output contract.
---
@@ -322,7 +322,7 @@ Join the [Discord server](https://discord.gg/BvjDCvS3yr) to stay up to date with
## Sponsors
<p align="center">
- Thanks to our early sponsors for believing in Modly and helping make local AI 3D generation more accessible.
+ Thanks to our early sponsors for believing in three.ws Forge and helping make local AI 3D generation more accessible.
</p>
<p align="center">
@@ -349,10 +349,10 @@ Join the [Discord server](https://discord.gg/BvjDCvS3yr) to stay up to date with
## License
-MIT License — see [LICENSE](LICENSE) for details.
+MIT License: see [LICENSE](LICENSE) for details.
**If you fork this project and build your own app from it, you must credit the original project and its creator:**
-> Based on [Modly](https://github.com/lightningpixel/modly) by [Lightning Pixel](https://github.com/lightningpixel)
+> Based on [three.ws Forge](https://github.com/lightningpixel/modly) by [Lightning Pixel](https://github.com/lightningpixel)
This is a requirement of the MIT license attribution clause. Please keep this credit visible in your app's UI or documentation.
diff --git a/apps/forge-desktop/api/README.md b/apps/forge-desktop/api/README.md
index cdcd4d6b0..81f01b60c 100644
--- a/apps/forge-desktop/api/README.md
+++ b/apps/forge-desktop/api/README.md
@@ -1,4 +1,4 @@
-# Modly — FastAPI Backend
+# three.ws Forge: FastAPI Backend
Local Python server started and managed by Electron.
@@ -35,5 +35,5 @@ uvicorn main:app --host 127.0.0.1 --port 8765 --reload
## Model
Default: **TripoSR** (`stabilityai/TripoSR`, ~2.4 GB)
-Downloaded on first launch to `~/.modly/models/TripoSR/`.
+Downloaded on first launch to `~/.three-ws-forge/models/TripoSR/`.
To change model: edit `services/model_manager.py`.
diff --git a/apps/forge-desktop/api/main.py b/apps/forge-desktop/api/main.py
index 958ba2a02..a4f51e1f2 100644
--- a/apps/forge-desktop/api/main.py
+++ b/apps/forge-desktop/api/main.py
@@ -1,5 +1,5 @@
"""
-Modly FastAPI backend.
+three.ws Forge FastAPI backend.
Runs locally within the Electron app to provide AI inference endpoints.
"""
import logging
@@ -35,7 +35,7 @@ logging.getLogger("uvicorn.access").addFilter(_StatusFilter())
app = FastAPI(
- title="Modly API",
+ title="three.ws Forge API",
version="0.4.3",
lifespan=lifespan,
)
@@ -61,7 +61,7 @@ app.include_router(workflow_runs.router, prefix="/workflow-runs")
app.include_router(agent.router)
app.include_router(llm.router, prefix="/llm")
-# Serve generated files from workspace — dynamic so path changes take effect immediately
+# Serve generated files from workspace: dynamic so path changes take effect immediately
@app.get("/workspace/{full_path:path}")
async def serve_workspace_file(full_path: str):
import services.generator_registry as reg
diff --git a/apps/forge-desktop/api/mcp_server.py b/apps/forge-desktop/api/mcp_server.py
index fa9127cf2..283dd09de 100644
--- a/apps/forge-desktop/api/mcp_server.py
+++ b/apps/forge-desktop/api/mcp_server.py
@@ -1,6 +1,6 @@
"""
-Modly MCP Server
-Exposes Modly's capabilities as MCP tools for external agents (Claude Desktop, Codex CLI, etc.).
+three.ws Forge MCP Server
+Exposes three.ws Forge's capabilities as MCP tools for external agents (Claude Desktop, Codex CLI, etc.).
Usage:
python mcp_server.py
@@ -8,14 +8,14 @@ Usage:
Configuration in Claude Desktop (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
- "modly": {
+ "three-ws-forge": {
"command": "python",
- "args": ["C:/path/to/modly/desktop/api/mcp_server.py"]
+ "args": ["C:/path/to/forge/desktop/api/mcp_server.py"]
}
}
}
-Requires Modly's FastAPI backend to be running on http://localhost:8765.
+Requires three.ws Forge's FastAPI backend to be running on http://localhost:8765.
"""
import asyncio
@@ -27,20 +27,20 @@ from mcp.types import Tool, TextContent
API_BASE = "http://localhost:8765"
-server = Server("modly")
+server = Server("three-ws-forge")
@server.list_tools()
async def list_tools() -> list[Tool]:
return [
Tool(
- name="modly_list_models",
- description="List all 3D generation models available in Modly (downloaded and ready to use).",
+ name="forge_list_models",
+ description="List all 3D generation models available in three.ws Forge (downloaded and ready to use).",
inputSchema={"type": "object", "properties": {}},
),
Tool(
- name="modly_switch_model",
- description="Switch the active 3D generation model in Modly.",
+ name="forge_switch_model",
+ description="Switch the active 3D generation model in three.ws Forge.",
inputSchema={
"type": "object",
"properties": {
@@ -50,7 +50,7 @@ async def list_tools() -> list[Tool]:
},
),
Tool(
- name="modly_generate_from_image",
+ name="forge_generate_from_image",
description="Generate a 3D mesh from a 2D image file. Returns a job_id to track progress.",
inputSchema={
"type": "object",
@@ -73,18 +73,18 @@ async def list_tools() -> list[Tool]:
},
),
Tool(
- name="modly_get_generation_status",
+ name="forge_get_generation_status",
description="Poll the status of a 3D generation job. Call repeatedly until status is 'done' or 'error'.",
inputSchema={
"type": "object",
"properties": {
- "job_id": {"type": "string", "description": "Job ID returned by modly_generate_from_image."},
+ "job_id": {"type": "string", "description": "Job ID returned by forge_generate_from_image."},
},
"required": ["job_id"],
},
),
Tool(
- name="modly_decimate_mesh",
+ name="forge_decimate_mesh",
description="Reduce the polygon count of a mesh using quadric edge collapse decimation.",
inputSchema={
"type": "object",
@@ -102,7 +102,7 @@ async def list_tools() -> list[Tool]:
},
),
Tool(
- name="modly_smooth_mesh",
+ name="forge_smooth_mesh",
description="Apply Laplacian smoothing to a mesh. More iterations = smoother surface but less detail.",
inputSchema={
"type": "object",
@@ -113,15 +113,15 @@ async def list_tools() -> list[Tool]:
},
"iterations": {
"type": "integer",
- "description": "Number of smoothing iterations (1–20).",
+ "description": "Number of smoothing iterations (1-20).",
},
},
"required": ["path", "iterations"],
},
),
Tool(
- name="modly_import_mesh",
- description="Import a mesh file from disk into Modly's workspace (.glb, .obj, .stl, .ply).",
+ name="forge_import_mesh",
+ description="Import a mesh file from disk into three.ws Forge's workspace (.glb, .obj, .stl, .ply).",
inputSchema={
"type": "object",
"properties": {
@@ -134,13 +134,13 @@ async def list_tools() -> list[Tool]:
},
),
Tool(
- name="modly_unload_models",
+ name="forge_unload_models",
description="Unload all 3D generation models from GPU VRAM. Useful before running VRAM-intensive tasks.",
inputSchema={"type": "object", "properties": {}},
),
Tool(
- name="modly_get_settings",
- description="Get the current Modly settings (models directory, workspace directory).",
+ name="forge_get_settings",
+ description="Get the current three.ws Forge settings (models directory, workspace directory).",
inputSchema={"type": "object", "properties": {}},
),
]
@@ -153,11 +153,11 @@ async def call_tool(name: str, arguments: dict) -> list[TextContent]:
result = await _dispatch(client, name, arguments)
except httpx.ConnectError:
result = (
- "Cannot connect to Modly API at http://localhost:8765. "
- "Make sure Modly is running."
+ "Cannot connect to three.ws Forge API at http://localhost:8765. "
+ "Make sure three.ws Forge is running."
)
except httpx.HTTPStatusError as e:
- result = f"Modly API error {e.response.status_code}: {e.response.text[:300]}"
+ result = f"three.ws Forge API error {e.response.status_code}: {e.response.text[:300]}"
except Exception as e:
result = f"Error: {e}"
@@ -165,20 +165,20 @@ async def call_tool(name: str, arguments: dict) -> list[TextContent]:
async def _dispatch(client: httpx.AsyncClient, name: str, args: dict) -> str:
- if name == "modly_list_models":
+ if name == "forge_list_models":
r = await client.get(f"{API_BASE}/model/all")
r.raise_for_status()
models = [m for m in r.json() if m.get("downloaded")]
if not models:
- return "No models downloaded yet. Download one from the Models tab in Modly."
+ return "No models downloaded yet. Download one from the Models tab in three.ws Forge."
return "\n".join(f"- {m['id']}: {m.get('name', m['id'])}" for m in models)
- elif name == "modly_switch_model":
+ elif name == "forge_switch_model":
r = await client.post(f"{API_BASE}/model/switch", params={"model_id": args["model_id"]})
r.raise_for_status()
return f"Switched active model to: {args['model_id']}"
- elif name == "modly_generate_from_image":
+ elif name == "forge_generate_from_image":
image_path: str = args["image_path"]
with open(image_path, "rb") as f:
img_bytes = f.read()
@@ -201,10 +201,10 @@ async def _dispatch(client: httpx.AsyncClient, name: str, args: dict) -> str:
job_id = r.json()["job_id"]
return (
f"Generation started. Job ID: {job_id}\n"
- f"Use modly_get_generation_status with this ID to track progress."
+ f"Use forge_get_generation_status with this ID to track progress."
)
- elif name == "modly_get_generation_status":
+ elif name == "forge_get_generation_status":
r = await client.get(f"{API_BASE}/generate/status/{args['job_id']}")
r.raise_for_status()
s = r.json()
@@ -217,7 +217,7 @@ async def _dispatch(client: httpx.AsyncClient, name: str, args: dict) -> str:
parts.append(f"Error: {s['error']}")
return " | ".join(parts)
- elif name == "modly_decimate_mesh":
+ elif name == "forge_decimate_mesh":
r = await client.post(
f"{API_BASE}/optimize/mesh",
json={"path": args["path"], "target_faces": args["target_faces"]},
@@ -226,7 +226,7 @@ async def _dispatch(client: httpx.AsyncClient, name: str, args: dict) -> str:
data = r.json()
return f"Decimated mesh to {data.get('face_count', '?')} faces. New file: {data.get('url', '')}"
- elif name == "modly_smooth_mesh":
+ elif name == "forge_smooth_mesh":
r = await client.post(
f"{API_BASE}/optimize/smooth",
json={"path": args["path"], "iterations": args["iterations"]},
@@ -235,18 +235,18 @@ async def _dispatch(client: httpx.AsyncClient, name: str, args: dict) -> str:
data = r.json()
return f"Smoothed mesh ({args['iterations']} iterations). New file: {data.get('url', '')}"
- elif name == "modly_import_mesh":
+ elif name == "forge_import_mesh":
r = await client.post(f"{API_BASE}/optimize/import-by-path", json={"path": args["path"]})
r.raise_for_status()
data = r.json()
return f"Mesh imported. URL: {data.get('url', '')}"
- elif name == "modly_unload_models":
+ elif name == "forge_unload_models":
r = await client.post(f"{API_BASE}/model/unload-all")
r.raise_for_status()
return "All 3D generation models unloaded from VRAM."
- elif name == "modly_get_settings":
+ elif name == "forge_get_settings":
r = await client.get(f"{API_BASE}/settings/paths")
r.raise_for_status()
data = r.json()
diff --git a/apps/forge-desktop/api/resources/llm_catalog.json b/apps/forge-desktop/api/resources/llm_catalog.json
index 928f4a2a3..d516677ad 100644
--- a/apps/forge-desktop/api/resources/llm_catalog.json
+++ b/apps/forge-desktop/api/resources/llm_catalog.json
@@ -46,7 +46,7 @@
{
"id": "qwen3-4b",
"name": "Qwen 3 4B Instruct",
- "description": "Latest Qwen generation. Fast, excellent tool-calling for its size — the recommended starting point.",
+ "description": "Latest Qwen generation. Fast, excellent tool-calling for its size, the recommended starting point.",
"hf_repo": "unsloth/Qwen3-4B-Instruct-2507-GGUF",
"hf_filename": "Qwen3-4B-Instruct-2507-Q4_K_M.gguf",
"size_bytes": 2497281120,
@@ -97,7 +97,7 @@
{
"id": "gpt-oss-20b",
"name": "GPT-OSS 20B (OpenAI)",
- "description": "OpenAI's open-weight MoE (3.6B active params — fast for its size). Top-tier tool calling and reasoning. Best with 16 GB VRAM.",
+ "description": "OpenAI's open-weight MoE (3.6B active params, fast for its size). Top-tier tool calling and reasoning. Best with 16 GB VRAM.",
"hf_repo": "ggml-org/gpt-oss-20b-GGUF",
"hf_filename": "gpt-oss-20b-MXFP4.gguf",
"size_bytes": 12109566624,
@@ -115,7 +115,7 @@
{
"id": "qwen3-vl-4b",
"name": "Qwen 3 VL 4B (vision, light)",
- "description": "Small vision model — sees attached images while fitting in ~5 GB VRAM. Pick this over the 8B on smaller GPUs.",
+ "description": "Small vision model, sees attached images while fitting in ~5 GB VRAM. Pick this over the 8B on smaller GPUs.",
"hf_repo": "unsloth/Qwen3-VL-4B-Instruct-GGUF",
"hf_filename": "Qwen3-VL-4B-Instruct-Q4_K_M.gguf",
"hf_mmproj_filename": "mmproj-F16.gguf",
@@ -134,7 +134,7 @@
{
"id": "qwen3-vl-8b",
"name": "Qwen 3 VL 8B (vision)",
- "description": "Sees images — the agent can look at attached pictures before picking a workflow. Needs ~8 GB VRAM.",
+ "description": "Sees images, the agent can look at attached pictures before picking a workflow. Needs ~8 GB VRAM.",
"hf_repo": "unsloth/Qwen3-VL-8B-Instruct-GGUF",
"hf_filename": "Qwen3-VL-8B-Instruct-Q4_K_M.gguf",
"hf_mmproj_filename": "mmproj-F16.gguf",
@@ -152,7 +152,7 @@
{
"id": "cadquery-coder-7b",
"name": "CadQuery Coder 7B (CAD-specialized)",
- "description": "Qwen2.5-Coder-7B fine-tuned on CadQuery generation — best pick for the Text to CAD node. Community model, CC-BY-NC-SA license.",
+ "description": "Qwen2.5-Coder-7B fine-tuned on CadQuery generation, best pick for the Text to CAD node. Community model, CC-BY-NC-SA license.",
"hf_repo": "yuvit-batra/qwen2.5-coder-7b-cadquery-gguf",
"hf_filename": "qwen2.5-coder-7b-cadquery-Q4_K_M.gguf",
"size_bytes": 4680000000,
diff --git a/apps/forge-desktop/api/routers/agent.py b/apps/forge-desktop/api/routers/agent.py
index 1fb389eb6..4d9f6df95 100644
--- a/apps/forge-desktop/api/routers/agent.py
+++ b/apps/forge-desktop/api/routers/agent.py
@@ -1,5 +1,5 @@
"""
-Agent chat endpoint — runs a tool-use loop against Modly's API, on the managed
+Agent chat endpoint: runs a tool-use loop against three.ws Forge's API, on the managed
local llama.cpp server or any OpenAI-compatible provider.
"""
import asyncio
@@ -17,27 +17,27 @@ from services.llm_server import llama_pool
router = APIRouter(prefix="/agent", tags=["agent"])
-MODLY_API = "http://localhost:8765"
+THREEWS_API = "http://localhost:8765"
SYSTEM_PROMPT = """\
-You are Modly's built-in AI assistant, specialized in 3D modeling and workflow automation.
-You help users generate 3D models from images, optimize meshes, and manage workflows directly inside the Modly application.
+You are three.ws Forge's built-in AI assistant, specialized in 3D modeling and workflow automation.
+You help users generate 3D models from images, optimize meshes, and manage workflows directly inside the three.ws Forge application.
## Available tools
-- **list_models** — List all downloaded 3D generation models ready to use.
-- **unload_models** — Unload all 3D generation models from GPU VRAM to free memory.
-- **get_mesh_info** — Get info about the current mesh in the 3D viewer (path, triangle count).
-- **decimate_mesh(path, target_faces)** — Reduce the polygon count of a mesh.
-- **smooth_mesh(path, iterations)** — Apply Laplacian smoothing to a mesh.
-- **get_generation_status(job_id)** — Poll the status of an ongoing 3D generation job.
-- **list_workflows** — List all available workflows in Modly.
-- **run_workflow(workflow_id)** — Execute a workflow in Modly by its ID. If the user attached an image in their message, it will automatically be used as the workflow's input image.
-- **create_workflow(name, input_type, steps, description?)** — Create a new workflow from an ordered list of processing steps. Each step references an extension by its exact `id` and may override its params. The steps run in sequence, the output of one feeding the next. The input source is one of exactly three nodes — `image` (Image), `text` (Text), or `mesh` (Load 3D Mesh) — and an Add-to-Scene output node is appended automatically.
+- **list_models**: List all downloaded 3D generation models ready to use.
+- **unload_models**: Unload all 3D generation models from GPU VRAM to free memory.
+- **get_mesh_info**: Get info about the current mesh in the 3D viewer (path, triangle count).
+- **decimate_mesh(path, target_faces)**: Reduce the polygon count of a mesh.
+- **smooth_mesh(path, iterations)**: Apply Laplacian smoothing to a mesh.
+- **get_generation_status(job_id)**: Poll the status of an ongoing 3D generation job.
+- **list_workflows**: List all available workflows in three.ws Forge.
+- **run_workflow(workflow_id)**: Execute a workflow in three.ws Forge by its ID. If the user attached an image in their message, it will automatically be used as the workflow's input image.
+- **create_workflow(name, input_type, steps, description?)**: Create a new workflow from an ordered list of processing steps. Each step references an extension by its exact `id` and may override its params. The steps run in sequence, the output of one feeding the next. The input source is one of exactly three nodes, `image` (Image), `text` (Text), or `mesh` (Load 3D Mesh), and an Add-to-Scene output node is appended automatically.
## Rules
-- Always use tools to act on the scene — never just describe what you would do.
+- Always use tools to act on the scene, never just describe what you would do.
- If you need the current mesh path, call get_mesh_info first.
- If you need to run a workflow but don't know the ID, call list_workflows first.
- To create a workflow, ONLY use extension ids listed under "Available extensions" in the context. Never invent an id. Chain steps so each step's input type matches the previous step's output type.
@@ -107,7 +107,7 @@ TOOLS = [
},
"iterations": {
"type": "integer",
- "description": "Number of smoothing iterations (1–20). More = smoother but loses detail.",
+ "description": "Number of smoothing iterations (1-20). More = smoother but loses detail.",
},
},
"required": ["path", "iterations"],
@@ -132,7 +132,7 @@ TOOLS = [
"type": "function",
"function": {
"name": "list_workflows",
- "description": "List all workflows available in Modly.",
+ "description": "List all workflows available in three.ws Forge.",
"parameters": {"type": "object", "properties": {}},
},
},
@@ -140,7 +140,7 @@ TOOLS = [
"type": "function",
"function": {
"name": "run_workflow",
- "description": "Execute a Modly workflow by its ID. The workflow runs in the background; progress is shown in the app.",
+ "description": "Execute a three.ws Forge workflow by its ID. The workflow runs in the background; progress is shown in the app.",
"parameters": {
"type": "object",
"properties": {
@@ -155,7 +155,7 @@ TOOLS = [
"function": {
"name": "create_workflow",
"description": (
- "Create a new Modly workflow from an ordered list of steps. "
+ "Create a new three.ws Forge workflow from an ordered list of steps. "
"Each step references an extension by its exact id (see 'Available extensions' in context). "
"Steps run in sequence; do not include the input itself as a step."
),
@@ -200,7 +200,7 @@ TOOLS = [
]
-# Input kinds the agent may pick, mapped to the real Modly source-node types.
+# Input kinds the agent may pick, mapped to the real three.ws Forge source-node types.
# Keep this in sync with the node palette in WorkflowsPage.tsx.
INPUT_NODES = {
"image": {"type": "imageNode", "data": {"enabled": True, "params": {}, "showInGenerate": True}},
@@ -210,7 +210,7 @@ INPUT_NODES = {
def _build_workflow_graph(name: str, description: str, input_type: str, steps: list[dict]) -> dict:
- """Assemble a Modly workflow graph (nodes + edges) from a simplified step spec.
+ """Assemble a three.ws Forge workflow graph (nodes + edges) from a simplified step spec.
Layout: one source node (Image / Text / Load 3D Mesh), one extensionNode per
step, then an Add-to-Scene output node, all wired in a single linear chain with
@@ -266,7 +266,7 @@ async def execute_tool(name: str, arguments: dict, context: dict) -> tuple[str,
async with httpx.AsyncClient(timeout=60.0) as client:
try:
if name == "list_models":
- r = await client.get(f"{MODLY_API}/model/all")
+ r = await client.get(f"{THREEWS_API}/model/all")
r.raise_for_status()
models = [m for m in r.json() if m.get("downloaded")]
if not models:
@@ -275,7 +275,7 @@ async def execute_tool(name: str, arguments: dict, context: dict) -> tuple[str,
return f"Available models:\n{lines}", None
elif name == "unload_models":
- r = await client.post(f"{MODLY_API}/model/unload-all")
+ r = await client.post(f"{THREEWS_API}/model/unload-all")
r.raise_for_status()
return "All 3D generation models have been unloaded from VRAM.", None
@@ -291,7 +291,7 @@ async def execute_tool(name: str, arguments: dict, context: dict) -> tuple[str,
elif name == "decimate_mesh":
r = await client.post(
- f"{MODLY_API}/optimize/mesh",
+ f"{THREEWS_API}/optimize/mesh",
json={"path": arguments["path"], "target_faces": arguments["target_faces"]},
)
r.raise_for_status()
@@ -301,7 +301,7 @@ async def execute_tool(name: str, arguments: dict, context: dict) -> tuple[str,
elif name == "smooth_mesh":
r = await client.post(
- f"{MODLY_API}/optimize/smooth",
+ f"{THREEWS_API}/optimize/smooth",
json={"path": arguments["path"], "iterations": arguments["iterations"]},
)
r.raise_for_status()
@@ -310,7 +310,7 @@ async def execute_tool(name: str, arguments: dict, context: dict) -> tuple[str,
return f"Smoothed mesh ({arguments['iterations']} iterations).", payload
elif name == "get_generation_status":
- r = await client.get(f"{MODLY_API}/generate/status/{arguments['job_id']}")
+ r = await client.get(f"{THREEWS_API}/generate/status/{arguments['job_id']}")
r.raise_for_status()
s = r.json()
text = f"Status: {s['status']}, Progress: {s.get('progress', 0)}%"
@@ -393,7 +393,7 @@ class ProviderConfig(BaseModel):
class AgentChatRequest(BaseModel):
messages: list[ChatMessage]
- model: str = Field(default_factory=llm_server.default_model_id) # local: catalog/custom id — external: provider model name
+ model: str = Field(default_factory=llm_server.default_model_id) # local: catalog/custom id, external: provider model name
provider: ProviderConfig = ProviderConfig()
context: dict = {}
thinking: str = "auto" # "auto" | "on" | "off"
@@ -460,7 +460,7 @@ async def list_external_models(req: ExternalModelsRequest):
async def _unload_llm_after_workflow(request: AgentChatRequest, actions_done: list[ActionDone]) -> None:
"""Free the local LLM's VRAM once a workflow has been dispatched, so the
- workflow gets the full GPU. Best-effort — never fail the chat over it."""
+ workflow gets the full GPU. Best-effort, never fail the chat over it."""
if request.provider.type != "local":
return
if not any(a.tool == "run_workflow" for a in actions_done):
diff --git a/apps/forge-desktop/api/routers/export.py b/apps/forge-desktop/api/routers/export.py
index 854d8bf21..35dd3bba6 100644
--- a/apps/forge-desktop/api/routers/export.py
+++ b/apps/forge-desktop/api/routers/export.py
@@ -18,13 +18,13 @@ router = APIRouter(tags=["export"])
SUPPORTED = {"glb", "stl", "obj", "ply"}
# Formats OrcaSlicer's importer accepts (see the orcaslicer://open contract).
-# GLB is deliberately excluded — OrcaSlicer cannot import glTF/GLB, so a .glb
+# GLB is deliberately excluded: OrcaSlicer cannot import glTF/GLB, so a .glb
# deeplink downloads but silently fails to slice.
SLICER_FORMATS = {"stl", "obj"}
SLICER_MEDIA_TYPES = {"stl": "model/stl", "obj": "text/plain"}
# Image-to-3D output has no inherent physical scale (a single photo carries no
-# real-world size), and AI generators emit roughly unit-sized meshes — which
+# real-world size), and AI generators emit roughly unit-sized meshes: which
# import into a slicer as an invisible ~1 mm speck. Normalise the longest
# bounding-box edge to a sane, obviously-printable default; the user rescales
# in OrcaSlicer as needed.
@@ -36,7 +36,7 @@ DEFAULT_PRINT_LONGEST_MM = 50.0
UNIT_SCALE_MAX = 5.0
# Source formats whose up-axis is Y (the glTF convention). Everything else this
-# route accepts — STL, OBJ, PLY — is conventionally Z-up already.
+# route accepts: STL, OBJ, PLY, is conventionally Z-up already.
GLTF_SUFFIXES = {".glb", ".gltf"}
@@ -53,7 +53,7 @@ def _to_single_mesh(loaded: object) -> "trimesh.Trimesh":
if len(loaded.geometry) == 0:
raise HTTPException(422, "Mesh contains no geometry")
# Bake the scene-graph node transforms into a single mesh. The spelling
- # varies across trimesh versions — to_mesh()/to_geometry() are the modern
+ # varies across trimesh versions: to_mesh()/to_geometry() are the modern
# APIs (4.6+); dump(concatenate=True) is the pre-removal fallback for 4.5.
for flatten in (lambda s: s.to_mesh(), lambda s: s.to_geometry(), lambda s: s.dump(concatenate=True)):
try:
@@ -102,7 +102,7 @@ def _resolve_slicer_source(token: str) -> tuple[Path, str]:
equality test on the resolved path, so this grants no traversal and does
not widen the route to arbitrary disk paths.
- The returned suffix is the format the user actually supplied — for an import
+ The returned suffix is the format the user actually supplied, for an import
that is the pre-conversion extension, which is what decides the up-axis.
"""
try:
@@ -140,10 +140,10 @@ def export_for_slicer(fmt: str, token: str, filename: str):
The URL is intentionally path-only and ends in the real filename+extension
(e.g. ``/export/slicer/stl/<b64url-workspace-path>/model.stl``). OrcaSlicer
- downloads the URL and derives the import filename — and therefore the mesh
- format — from the URL's FINAL path segment, so a query string (``?path=...``)
+ downloads the URL and derives the import filename, and therefore the mesh
+ format, from the URL's FINAL path segment, so a query string (``?path=...``)
would corrupt the parsed extension and the model would silently fail to
- import. ``token`` is the url-safe-base64 of the source path — workspace-
+ import. ``token`` is the url-safe-base64 of the source path, workspace-
relative, or absolute for a file the user imported this session (see
``_resolve_slicer_source``); ``filename`` (e.g. ``model.stl``) is what
OrcaSlicer names the download.
@@ -158,10 +158,10 @@ def export_for_slicer(fmt: str, token: str, filename: str):
mesh = _to_single_mesh(trimesh.load(str(full_path)))
# glTF/GLB is Y-up; OrcaSlicer's world is Z-up. Rotate +90° about X so the
- # model imports standing upright instead of on its side. (Modly's own viewer
+ # model imports standing upright instead of on its side. (three.ws Forge's own viewer
# rests generated meshes on the Y=0 plane, confirming Y is the up axis.)
# STL/OBJ/PLY sources are already Z-up, so rotating them would do the very
- # thing this corrects — lay an upright model on its side.
+ # thing this corrects: lay an upright model on its side.
if source_suffix in GLTF_SUFFIXES:
mesh.apply_transform(trimesh.transformations.rotation_matrix(math.pi / 2, [1, 0, 0]))
_normalize_print_scale(mesh)
@@ -172,7 +172,7 @@ def export_for_slicer(fmt: str, token: str, filename: str):
return Response(
content=data,
media_type=SLICER_MEDIA_TYPES.get(fmt, "application/octet-stream"),
- # Fixed name (not the client-supplied segment) — keeps arbitrary input out
+ # Fixed name (not the client-supplied segment): keeps arbitrary input out
# of the response header. OrcaSlicer names the file from the URL anyway.
headers={"Content-Disposition": f'attachment; filename="model.{fmt}"'},
)
@@ -189,7 +189,7 @@ def export_mesh(fmt: str, path: str):
if not full_path.exists():
raise HTTPException(404, f"File not found: {path}")
- # GLB — serve directly, no conversion needed
+ # GLB: serve directly, no conversion needed
if fmt == "glb":
return FileResponse(str(full_path), media_type="model/gltf-binary")
diff --git a/apps/forge-desktop/api/routers/extensions.py b/apps/forge-desktop/api/routers/extensions.py
index fdfbf0e0c..e130f7e03 100644
--- a/apps/forge-desktop/api/routers/extensions.py
+++ b/apps/forge-desktop/api/routers/extensions.py
@@ -37,7 +37,7 @@ async def setup_extension(ext_id: str):
"""
Creates the isolated venv for an extension by running its setup.py.
Called automatically after installing an extension from GitHub.
- Runs setup.py with Modly's embedded Python and the detected GPU SM.
+ Runs setup.py with three.ws Forge's embedded Python and the detected GPU SM.
"""
from services.generator_registry import EXTENSIONS_DIR
@@ -61,7 +61,7 @@ async def setup_extension(ext_id: str):
flavor = "cuda" if gpu_sm else ("rocm" if gfx_target else "cpu")
# Pass arguments as JSON so setup.py sees torch_flavor. The keys mirror
- # runExtensionSetup in electron/main/ipc-handlers.ts exactly — setup.py
+ # runExtensionSetup in electron/main/ipc-handlers.ts exactly: setup.py
# scripts read the same contract whichever side launched them. Note this
# endpoint is a fallback: Electron normally runs setup.py itself, and only
# that path gets the ROCm index rewriting for extensions that ignore
@@ -79,7 +79,7 @@ async def setup_extension(ext_id: str):
"arch": _node_arch(),
})
- # Run setup.py using Modly's embedded Python (sys.executable)
+ # Run setup.py using three.ws Forge's embedded Python (sys.executable)
loop = asyncio.get_running_loop()
result = await loop.run_in_executor(
None,
@@ -115,13 +115,13 @@ async def extension_errors():
def _detect_nvidia_gpu() -> tuple[int, int]:
"""
- Returns (compute capability, max CUDA version) — e.g. (86, 124) — or (0, 0)
+ Returns (compute capability, max CUDA version), e.g. (86, 124), or (0, 0)
when there is no NVIDIA GPU.
- Asks nvidia-smi rather than torch: this process runs in Modly's main venv,
+ Asks nvidia-smi rather than torch: this process runs in three.ws Forge's main venv,
which has no torch at all (see api/requirements.txt), so a torch import
always failed here and silently reported every machine as CPU-only. Asking
- the driver also sidesteps the ROCm ambiguity — PyTorch's HIP build answers
+ the driver also sidesteps the ROCm ambiguity, PyTorch's HIP build answers
the whole torch.cuda API, reporting (12, 0) for a gfx1200 Radeon exactly
like an sm_120 Blackwell. Mirrors parseNvidiaSmi in
electron/main/gpu-detect.ts, including the driver → CUDA version table.
@@ -166,7 +166,7 @@ def _detect_nvidia_gpu() -> tuple[int, int]:
def _rocm_index_url() -> str:
"""The pip index a ROCm torch install must come from. Mirrors
resolveRocmTorchSpec in electron/main/gpu-detect.ts."""
- override = os.environ.get("MODLY_ROCM_INDEX", "").strip()
+ override = os.environ.get("THREEWS_ROCM_INDEX", "").strip()
if override:
return override
if sys.platform == "win32":
@@ -190,7 +190,7 @@ def _detect_gfx_target() -> str:
Returns the ROCm compute target (e.g. "gfx1200"), or "" when there is no AMD GPU.
Reads the kernel's KFD topology rather than asking torch: this process runs
- in Modly's main venv, which has no torch at all (see api/requirements.txt).
+ in three.ws Forge's main venv, which has no torch at all (see api/requirements.txt).
The amdgpu driver publishes the target on its own, so no ROCm install is
needed either. Mirrors electron/main/gpu-detect.ts.
"""
diff --git a/apps/forge-desktop/api/routers/generation.py b/apps/forge-desktop/api/routers/generation.py
index 73d0baae9..501083488 100644
--- a/apps/forge-desktop/api/routers/generation.py
+++ b/apps/forge-desktop/api/routers/generation.py
@@ -39,7 +39,7 @@ _job_generators: Dict[str, object] = {}
# without parking default-executor workers on a blocking lock acquisition.
_pinned_generation_executor = ThreadPoolExecutor(
max_workers=1,
- thread_name_prefix="modly-pinned-generation",
+ thread_name_prefix="forge-pinned-generation",
)
_JOB_TTL = 1800 # purge terminal jobs after 30 minutes
diff --git a/apps/forge-desktop/api/routers/llm.py b/apps/forge-desktop/api/routers/llm.py
index 33e1534cc..2e2108d7b 100644
--- a/apps/forge-desktop/api/routers/llm.py
+++ b/apps/forge-desktop/api/routers/llm.py
@@ -1,5 +1,5 @@
"""
-Local LLM engine endpoints — model catalog, GGUF downloads, llama-server lifecycle.
+Local LLM engine endpoints: model catalog, GGUF downloads, llama-server lifecycle.
Reuses the streamed/resumable downloader from routers.model.
"""
import asyncio
@@ -105,7 +105,7 @@ async def set_config(request: LlmConfigRequest):
cfg = llm_server.load_config()
cfg["max_models"] = value
llm_server.save_config(cfg)
- # A lowered limit applies immediately — small-VRAM users count on it.
+ # A lowered limit applies immediately: small-VRAM users count on it.
await asyncio.to_thread(llama_pool.enforce_limit)
return {"max_models": value, "resolved_max_models": llm_server.resolve_max_models()}
@@ -209,7 +209,7 @@ async def pause_download(model_id: str):
async def cancel_download(model_id: str):
"""Cancel an in-flight download, or clean up a paused one.
- A paused download has already left `_run_download` — its control is gone
+ A paused download has already left `_run_download`, its control is gone
from `_controls`, so setting the cancel event would be a no-op. Reporting
success there left the user with a multi-GB .part file they believed they
had deleted, so the partial files are removed here instead."""
@@ -237,7 +237,7 @@ def _discard_incomplete(entry: dict) -> list[str]:
Not just the .part: a vision model downloads weights then projector, so
cancelling during the second one left 2.5 GB of finished weights on disk
- under a model still reported as `downloaded: false` — no trash button is
+ under a model still reported as `downloaded: false`, no trash button is
offered for those, so the space could not be reclaimed from the UI at all.
A model whose files are all present is complete, not in flight, and is
never touched here (deleting it is what DELETE /llm/models/{id} is for)."""
@@ -263,7 +263,7 @@ async def _run_download(model_id: str, entry: dict, control: dict[str, threading
loop = asyncio.get_running_loop()
def _broadcast(msg: dict) -> None:
- # _progress (below) runs in a worker thread — hop back onto the loop.
+ # _progress (below) runs in a worker thread: hop back onto the loop.
def _do() -> None:
state.last_msg = msg
for q in list(state.subscribers):
@@ -272,7 +272,7 @@ async def _run_download(model_id: str, entry: dict, control: dict[str, threading
from huggingface_hub import hf_hub_url
- # Vision models ship a companion mmproj file — download it alongside the
+ # Vision models ship a companion mmproj file: download it alongside the
# weights, stored under a per-model local name (HF names collide).
files: list[tuple[str, str, int]] = [(entry["hf_filename"], entry["hf_filename"], entry.get("size_bytes") or 0)]
if entry.get("hf_mmproj_filename"):
@@ -346,7 +346,7 @@ async def download_model(model_id: str):
raise HTTPException(status_code=404, detail=f"Unknown catalog model: {model_id}")
# Reconnect-safe: if this model is already downloading, attach a new watcher
- # instead of starting a second download racing the same .part file — this is
+ # instead of starting a second download racing the same .part file: this is
# what lets the Model Library modal be closed and reopened mid-download.
state = _downloads.get(model_id)
if state is None or state.task is None or state.task.done():
diff --git a/apps/forge-desktop/api/routers/model.py b/apps/forge-desktop/api/routers/model.py
index aab4c3f4c..0457ae878 100644
--- a/apps/forge-desktop/api/routers/model.py
+++ b/apps/forge-desktop/api/routers/model.py
@@ -317,7 +317,7 @@ async def hf_download(
A HEADER, not a query param: uvicorn logs the full request
line to stdout, python-bridge.ts pipes that into runtime.log,
and `log:readAll` hands that file to the user for bug
- reports — the token used to travel all the way there.
+ reports, the token used to travel all the way there.
All fall back to the extension's manifest / environment when not supplied.
SSE format: data: {"percent": 0-100, "file": "...", "status": "..."}
@@ -490,7 +490,7 @@ def _download_file_streamed(
or os.environ.get("HUGGINGFACE_HUB_TOKEN")
or os.environ.get("HUGGING_FACE_HUB_TOKEN")
)
- headers = {"User-Agent": "modly/0.3.1"}
+ headers = {"User-Agent": "forge/0.3.1"}
if hf_token:
headers["Authorization"] = f"Bearer {hf_token}"
diff --git a/apps/forge-desktop/api/routers/optimize.py b/apps/forge-desktop/api/routers/optimize.py
index c325ff206..82ad72d92 100644
--- a/apps/forge-desktop/api/routers/optimize.py
+++ b/apps/forge-desktop/api/routers/optimize.py
@@ -173,7 +173,7 @@ def smooth_mesh(body: SmoothRequest):
@router.post("/transform")
def transform_mesh(body: TransformRequest):
# Bake an interactive-gizmo transform into the GLB at scene level so it
- # persists to export. Pure trimesh — no pymeshlab needed.
+ # persists to export. Pure trimesh: no pymeshlab needed.
input_path = _resolve_input_path(body.path)
matrix = np.asarray(body.matrix, dtype=float)
@@ -207,7 +207,7 @@ class ImportByPathRequest(BaseModel):
# Gaussian Splatting support
#
# A 3DGS .ply is a point cloud whose colour lives in SH coefficients
-# (f_dc_*), not in a texture or vertex colours — trimesh strips all of it and
+# (f_dc_*), not in a texture or vertex colours: trimesh strips all of it and
# yields a blank blob. Detect those files by their header and convert them to
# the standard binary .splat format (rowLength = 32) read by the splat viewer:
# pos 3 × float32 (offset 0)
@@ -285,7 +285,7 @@ def _convert_gaussian_ply_to_splat(ply_path: Path, out_path: str) -> None:
# Normalise into the viewer's space: a 3DGS lives in an arbitrary world
# frame (offset origin, any scale) and often has a few far-away "floater"
- # splats. Centre x/z on the robust 1–99 percentile box and scale to fit so
+ # splats. Centre x/z on the robust 1-99 percentile box and scale to fit so
# the model always lands in front of the camera (meshes get this for free
# via Box3 centring; splats don't). The gaussian sizes scale with it.
lo = np.percentile(xyz, 1, axis=0)
@@ -334,21 +334,21 @@ async def import_mesh_by_path(body: ImportByPathRequest):
return {"url": f"/optimize/serve-file?path={quote(str(file_path))}"}
if ext == "ply" and _is_gaussian_ply(file_path):
- tmp_dir = tempfile.mkdtemp(prefix="modly_import_")
+ tmp_dir = tempfile.mkdtemp(prefix="forge_import_")
output_path = os.path.join(tmp_dir, "splat.splat")
try:
_convert_gaussian_ply_to_splat(file_path, output_path)
- except Exception as err: # noqa: BLE001 — surface a clean error, never 500-crash
+ except Exception as err: # noqa: BLE001, surface a clean error, never 500-crash
raise HTTPException(400, f"Unrecognised Gaussian .ply: {err}")
return {"url": f"/optimize/serve-file?path={quote(output_path)}"}
if ext == "glb":
- # Serve the original file directly — no copy
+ # Serve the original file directly: no copy
imported_sources.register(file_path, file_path)
return {"url": f"/optimize/serve-file?path={quote(str(file_path))}"}
# Mesh ply / obj / stl: convert to GLB in a temp directory (not the workspace)
- tmp_dir = tempfile.mkdtemp(prefix="modly_import_")
+ tmp_dir = tempfile.mkdtemp(prefix="forge_import_")
output_path = os.path.join(tmp_dir, "mesh.glb")
loaded = trimesh.load(str(file_path))
loaded.export(output_path)
@@ -395,7 +395,7 @@ def ply_to_splat(path: str):
raise HTTPException(400, "Not a Gaussian .ply")
key = hashlib.md5(f"{src}:{int(src.stat().st_mtime)}:{_SPLAT_CONV_VERSION}".encode()).hexdigest()
- out = Path(tempfile.gettempdir()) / f"modly_splat_{key}.splat"
+ out = Path(tempfile.gettempdir()) / f"forge_splat_{key}.splat"
if not out.is_file():
try:
_convert_gaussian_ply_to_splat(src, str(out))
@@ -425,7 +425,7 @@ def export_mesh(path: str, format: str):
data = mesh.export(file_type=format)
stem = input_path.stem
mime = "text/plain" if format == "obj" else "application/octet-stream"
- # trimesh exports ply as bytes even in text mode — octet-stream is fine for all binary formats
+ # trimesh exports ply as bytes even in text mode: octet-stream is fine for all binary formats
return Response(
content=data,
media_type=mime,
diff --git a/apps/forge-desktop/api/routers/status.py b/apps/forge-desktop/api/routers/status.py
index e54b0a0b9..4d9a83bb7 100644
--- a/apps/forge-desktop/api/routers/status.py
+++ b/apps/forge-desktop/api/routers/status.py
@@ -5,5 +5,5 @@ router = APIRouter(tags=["health"])
@router.get("/health")
async def health():
- """Health check — used by Electron to know the API is ready."""
+ """Health check: used by Electron to know the API is ready."""
return {"status": "ok"}
diff --git a/apps/forge-desktop/api/runner.py b/apps/forge-desktop/api/runner.py
index 93feef5df..39f340b0b 100644
--- a/apps/forge-desktop/api/runner.py
+++ b/apps/forge-desktop/api/runner.py
@@ -1,14 +1,14 @@
"""
-Modly Extension Runner — generic subprocess entry point.
+three.ws Forge Extension Runner, generic subprocess entry point.
Runs inside the extension's own venv. Loaded by ExtensionProcess via:
{venv_python} {runner_path}
Environment variables (set by ExtensionProcess):
- EXTENSION_DIR — absolute path to the extension directory
- MODELS_DIR — where model weights are stored
- WORKSPACE_DIR — where generated files are saved
- MODLY_API_DIR — path to Modly's api/ dir (so generator.py can import
+ EXTENSION_DIR absolute path to the extension directory
+ MODELS_DIR where model weights are stored
+ WORKSPACE_DIR where generated files are saved
+ THREEWS_API_DIR path to three.ws Forge's api/ dir (so generator.py can import
from services.generators.base)
Protocol: newline-delimited JSON on stdin/stdout.
@@ -28,9 +28,9 @@ from pathlib import Path
# ------------------------------------------------------------------ #
EXT_DIR = Path(os.environ["EXTENSION_DIR"])
-MODELS_DIR = Path(os.environ.get("MODELS_DIR", Path.home() / ".modly" / "models"))
-WORKSPACE_DIR = Path(os.environ.get("WORKSPACE_DIR", Path.home() / ".modly" / "workspace"))
-MODLY_API_DIR = os.environ.get("MODLY_API_DIR", "")
+MODELS_DIR = Path(os.environ.get("MODELS_DIR", Path.home() / ".three-ws-forge" / "models"))
+WORKSPACE_DIR = Path(os.environ.get("WORKSPACE_DIR", Path.home() / ".three-ws-forge" / "workspace"))
+THREEWS_API_DIR = os.environ.get("THREEWS_API_DIR") or os.environ.get("MODLY_API_DIR", "")
# MODEL_DIR is set by ExtensionProcess to match its own model_dir (composite node id path).
# Falls back to MODELS_DIR/manifest_id for standalone/legacy use.
_MODEL_DIR_OVERRIDE = os.environ.get("MODEL_DIR", "")
@@ -44,10 +44,10 @@ try:
except (AttributeError, TypeError, ValueError, json.JSONDecodeError):
_SHARED_MODEL_DIRS = {}
-# Inject Modly's api/ so generator.py can do:
+# Inject three.ws Forge's api/ so generator.py can do:
# from services.generators.base import BaseGenerator, ...
-if MODLY_API_DIR and MODLY_API_DIR not in sys.path:
- sys.path.insert(0, MODLY_API_DIR)
+if THREEWS_API_DIR and THREEWS_API_DIR not in sys.path:
+ sys.path.insert(0, THREEWS_API_DIR)
# Inject ext dir so generator.py can import local vendor modules
if str(EXT_DIR) not in sys.path:
@@ -141,7 +141,7 @@ def _ensure_model_loaded(gen) -> bool:
free the shape pipeline first to make room for them. When that setup fails
(a missing `xatlas` being the common case) the generator is left with
_model = None, yet the worker process stays alive and both ExtensionProcess
- and GeneratorRegistry still consider it loaded — so load() is never called
+ and GeneratorRegistry still consider it loaded, so load() is never called
again and every later generate() dies with
TypeError: 'NoneType' object is not callable
diff --git a/apps/forge-desktop/api/schemas/generation.py b/apps/forge-desktop/api/schemas/generation.py
index 04c18c858..bd2926786 100644
--- a/apps/forge-desktop/api/schemas/generation.py
+++ b/apps/forge-desktop/api/schemas/generation.py
@@ -5,7 +5,7 @@ from pydantic import BaseModel, Field
class JobStatus(BaseModel):
job_id: str
status: Literal["pending", "running", "done", "error", "cancelled"]
- progress: int = 0 # 0–100
+ progress: int = 0 # 0-100
step: Optional[str] = None # Human-readable current step
output_url: Optional[str] = None
error: Optional[str] = None
diff --git a/apps/forge-desktop/api/services/extension_process.py b/apps/forge-desktop/api/services/extension_process.py
index 5eaed4b87..18a5f301a 100644
--- a/apps/forge-desktop/api/services/extension_process.py
+++ b/apps/forge-desktop/api/services/extension_process.py
@@ -1,5 +1,5 @@
"""
-ExtensionProcess — manages a generator running in an isolated subprocess.
+ExtensionProcess: manages a generator running in an isolated subprocess.
Each extension runs in its own venv via runner.py.
Communication is done via newline-delimited JSON on stdin/stdout.
@@ -73,16 +73,19 @@ class ExtensionProcess:
env["EXTENSION_DIR"] = str(self.ext_dir)
env["MODELS_DIR"] = str(MODELS_DIR)
env["WORKSPACE_DIR"] = str(WORKSPACE_DIR)
- env["MODLY_API_DIR"] = str(Path(__file__).parent.parent)
- # Lets extensions call back into the Modly API (e.g. /llm/chat for the shared LLM).
- env.setdefault("MODLY_API_URL", "http://127.0.0.1:8765")
+ env["THREEWS_API_DIR"] = str(Path(__file__).parent.parent)
+ # Lets extensions call back into the three.ws Forge API (e.g. /llm/chat for the shared LLM).
+ env.setdefault("THREEWS_API_URL", "http://127.0.0.1:8765")
+ # Extensions written against the upstream Modly template read these names.
+ env["MODLY_API_DIR"] = env["THREEWS_API_DIR"]
+ env.setdefault("MODLY_API_URL", env["THREEWS_API_URL"])
# Force the worker's Python stdio to UTF-8 so it matches the UTF-8
# pipe readers below regardless of the OS locale (cp1252/cp932).
env["PYTHONUTF8"] = "1"
env["PYTHONIOENCODING"] = "utf-8"
if sys.platform == "darwin":
env.setdefault("NUMBA_DISABLE_JIT", "1")
- # Must be set before the subprocess's first `import torch` — PyTorch
+ # Must be set before the subprocess's first `import torch`: PyTorch
# reads this once to decide whether MPS ops with no Metal kernel
# (e.g. 3D pooling) fall back to CPU or raise NotImplementedError.
# Setting it inside generator.py is too late, since generator.py
@@ -129,7 +132,7 @@ class ExtensionProcess:
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
- # Without these, text=True decodes with the locale codec — cp1252
+ # Without these, text=True decodes with the locale codec: cp1252
# on Windows. tqdm draws its partial blocks with U+258D/U+258F,
# whose UTF-8 bytes (0x8d/0x8f) are undefined there: the decode
# raises, _stderr_loop dies, nobody drains the pipe, and the
@@ -149,7 +152,7 @@ class ExtensionProcess:
stderr_fwd = threading.Thread(target=self._stderr_loop, args=(self._proc,), daemon=True)
stderr_fwd.start()
- # Wait for ready — runner sends params_schema in this message
+ # Wait for ready: runner sends params_schema in this message
msg = self._recv(timeout=None)
if msg.get("type") == "ready":
# Override params_schema with what the generator class actually declares
@@ -227,11 +230,11 @@ class ExtensionProcess:
"""Forward subprocess stderr to the main process stderr, emitting
one line every time we see EITHER '\\n' or '\\r'. tqdm writes live
progress updates with '\\r' only, so a newline-only iterator would
- buffer every tick until the loop exits with '\\n' — which is why
+ buffer every tick until the loop exits with '\\n', which is why
the HUD's log pane went dark during multi-minute volume decode.
No per-line extension-id prefix: the HUD log pane is a single
- truncated line, and eating 20 characters with "[modly-hy3d2-mac] "
+ truncated line, and eating 20 characters with "[forge-hy3d2-mac] "
hides the tail of the tqdm bar the user actually wants to read.
"""
stream = proc.stderr
@@ -334,7 +337,7 @@ class ExtensionProcess:
# Check for cancellation
if cancel_event and cancel_event.is_set():
if cancel_sent_at is None:
- # First observation of the cancel — ask the subprocess to stop.
+ # First observation of the cancel: ask the subprocess to stop.
try:
self._send({"action": "cancel", "id": req_id})
except Exception:
@@ -344,7 +347,7 @@ class ExtensionProcess:
else:
import time
if time.monotonic() - cancel_sent_at >= CANCEL_GRACE_SECONDS:
- # Grace period expired — the subprocess is not
+ # Grace period expired: the subprocess is not
# responding (almost certainly stuck in native code).
# Hard-kill it and drop our state so the next
# generation forces a fresh load.
diff --git a/apps/forge-desktop/api/services/generator_registry.py b/apps/forge-desktop/api/services/generator_registry.py
index 2792030e9..734c3ffd4 100644
--- a/apps/forge-desktop/api/services/generator_registry.py
+++ b/apps/forge-desktop/api/services/generator_registry.py
@@ -1,5 +1,5 @@
"""
-GeneratorRegistry — manages the lifecycle of all model adapters.
+GeneratorRegistry: manages the lifecycle of all model adapters.
Dynamically loads extensions from the extensions/ folder.
To add a new model: create a folder in extensions/ with
@@ -42,18 +42,18 @@ from services.model_sources import (
# Global paths
# ------------------------------------------------------------------ #
-_models_dir_raw = os.environ.get("MODELS_DIR") or str(Path.home() / ".modly" / "models")
-_workspace_dir_raw = os.environ.get("WORKSPACE_DIR") or str(Path.home() / ".modly" / "workspace")
+_models_dir_raw = os.environ.get("MODELS_DIR") or str(Path.home() / ".three-ws-forge" / "models")
+_workspace_dir_raw = os.environ.get("WORKSPACE_DIR") or str(Path.home() / ".three-ws-forge" / "workspace")
MODELS_DIR = Path(_models_dir_raw)
WORKSPACE_DIR = Path(_workspace_dir_raw)
MODELS_DIR.mkdir(parents=True, exist_ok=True)
WORKSPACE_DIR.mkdir(parents=True, exist_ok=True)
-# extensions/ folder — in userData (passed by Electron via EXTENSIONS_DIR)
+# extensions/ folder: in userData (passed by Electron via EXTENSIONS_DIR)
_extensions_dir_raw = os.environ.get("EXTENSIONS_DIR", "")
EXTENSIONS_DIR = Path(_extensions_dir_raw) if _extensions_dir_raw else None
-_REGISTRATION_PENDING_PREFIX = ".modly-registration-pending-"
+_REGISTRATION_PENDING_PREFIX = ".forge-registration-pending-"
_EXTENSION_ID = re.compile(r"^[a-z0-9][a-z0-9._-]*$")
_REGISTRATION_PENDING_NAME = re.compile(
rf"^{re.escape(_REGISTRATION_PENDING_PREFIX)}"
@@ -362,7 +362,7 @@ def _consume_registration_validation_capability(
"consumed": True,
}
temporary_path = root / (
- f".modly-registration-capability-{secrets.token_hex(16)}"
+ f".forge-registration-capability-{secrets.token_hex(16)}"
)
try:
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL
@@ -442,7 +442,7 @@ def _discover_extensions(
try:
# Process extensions run via Electron's process runner, not this
- # registry — skip them even when their entry file is generator.py.
+ # registry: skip them even when their entry file is generator.py.
if manifest.get("type", "model") != "model":
print(f"[Registry] Skipping '{ext_dir.name}': type "
f"'{manifest.get('type')}' is not handled by this registry")
@@ -526,8 +526,8 @@ def _discover_extensions(
# the UI attach this error to each expected model node even when
# startup could not immediately restore a locked backup.
install_interrupted = (
- (ext_dir / ".modly-incomplete").exists()
- or (ext_dir / ".modly-registration-pending").exists()
+ (ext_dir / ".forge-incomplete").exists()
+ or (ext_dir / ".forge-registration-pending").exists()
or (
_registration_pending(ext_id)
and not (
@@ -546,7 +546,7 @@ def _discover_extensions(
message = (
f"Extension '{ext_id}' has an incomplete installation "
"or interrupted runtime registration. "
- "Restart Modly to recover it, or click 'Repair' on the Models page."
+ "Restart three.ws Forge to recover it, or click 'Repair' on the Models page."
)
print(f"[Registry] ERROR: {message}")
_record_discovery_error(
@@ -637,7 +637,7 @@ def _discover_extensions(
else:
print(f"[Registry] Loaded node: {full_id} ({class_name})")
else:
- # No nodes defined — register by ext_id as fallback
+ # No nodes defined: register by ext_id as fallback
result[ext_id] = (cls_or_None, manifest, ext_dir, legacy_context)
if subprocess_mode:
if has_venv:
@@ -695,7 +695,7 @@ class GeneratorRegistry:
# Subprocess mode: venv must exist
if not _venv_python(ext_dir).is_file():
raise RuntimeError(
- "venv not found — extension needs setup. "
+ "venv not found, extension needs setup. "
"Click 'Repair' on the Models page to run setup.py."
)
# Subprocess mode: wrap in ExtensionProcess
@@ -819,13 +819,13 @@ class GeneratorRegistry:
) and not downloaded:
raise RuntimeError(
"Model sources are incomplete. Download this node's shared and private weights "
- "from the Modly Models page before generation."
+ "from the three.ws Forge Models page before generation."
)
if not gen.is_loaded():
if not downloaded:
if isinstance(gen, ExtensionProcess):
# Let the subprocess handle its own download logic during
- # load() — some extensions (e.g. mv-adapter) need custom
+ # load(): some extensions (e.g. mv-adapter) need custom
# multi-repo downloads that the standard HF endpoint can't do.
pass
else:
@@ -894,7 +894,7 @@ class GeneratorRegistry:
)
# 3D generation owns the GPU: evict the chat LLMs before anything is
# about to allocate on it. The trigger is "the target model is not
- # resident", not "the target model changed" — the common case is the
+ # resident", not "the target model changed": the common case is the
# default generator, which is already `_active_id` at boot and still
# has to load its weights. Gating on the id alone let a full LLM pool
# (2 slots, ~11.6 GB of 12) sit through an entire generation.
diff --git a/apps/forge-desktop/api/services/generators/base.py b/apps/forge-desktop/api/services/generators/base.py
index 63ded9ada..146dcd6ca 100644
--- a/apps/forge-desktop/api/services/generators/base.py
+++ b/apps/forge-desktop/api/services/generators/base.py
@@ -1,5 +1,5 @@
"""
-BaseGenerator — contract that each model adapter must implement.
+BaseGenerator: contract that each model adapter must implement.
"""
from abc import ABC, abstractmethod
import threading
@@ -19,7 +19,7 @@ def select_device() -> str:
in one place and Windows/CUDA behavior is unaffected.
PyTorch only falls back to CPU for MPS ops with no Metal kernel (e.g. 3D
- pooling) — instead of raising NotImplementedError — if
+ pooling), instead of raising NotImplementedError, if
PYTORCH_ENABLE_MPS_FALLBACK=1 is set *before the process's first `import
torch`*. That's set for every extension subprocess in
ExtensionProcess._build_env(); the setdefault() below is just a
@@ -75,7 +75,7 @@ def smooth_progress(
class BaseGenerator(ABC):
# ------------------------------------------------------------------ #
- # Metadata — override in each subclass
+ # Metadata: override in each subclass
# ------------------------------------------------------------------ #
MODEL_ID: str = ""
MODEL_NODE_ID: str = ""
diff --git a/apps/forge-desktop/api/services/imported_sources.py b/apps/forge-desktop/api/services/imported_sources.py
index a21dded52..77a11c6b9 100644
--- a/apps/forge-desktop/api/services/imported_sources.py
+++ b/apps/forge-desktop/api/services/imported_sources.py
@@ -1,7 +1,7 @@
"""Registry of meshes the user explicitly imported from outside the workspace.
`/optimize/import-by-path` serves files the user picked through the OS file
-dialog, either in place or converted into a temp dir — never from the workspace.
+dialog, either in place or converted into a temp dir, never from the workspace.
The slicer export route confines itself to the workspace by design, so those
imports would be unsliceable without widening that guard to arbitrary absolute
paths, which would be a real regression.
@@ -49,5 +49,5 @@ def is_registered(path: str | Path) -> bool:
def clear() -> None:
- """Drop every entry — for tests."""
+ """Drop every entry: for tests."""
_SOURCES.clear()
diff --git a/apps/forge-desktop/api/services/llm_server.py b/apps/forge-desktop/api/services/llm_server.py
index c41fb196a..61a3acf29 100644
--- a/apps/forge-desktop/api/services/llm_server.py
+++ b/apps/forge-desktop/api/services/llm_server.py
@@ -1,8 +1,8 @@
"""
-Local LLM engine — manages a llama.cpp `llama-server` subprocess.
+Local LLM engine: manages a llama.cpp `llama-server` subprocess.
-Everything lives under the agent directory (MODLY_LLM_DIR, set by Electron to
-the `agent` folder beside models/, extensions/, … — ~/.modly/llm/ when the API
+Everything lives under the agent directory (THREEWS_LLM_DIR, set by Electron to
+the `agent` folder beside models/, extensions/, …, ~/.three-ws-forge/llm/ when the API
runs standalone):
bin/ llama-server binary + DLLs (auto-downloaded from GitHub releases)
models/ GGUF files (catalog downloads + any custom .gguf the user drops in)
@@ -29,19 +29,19 @@ from typing import Callable, Optional
from urllib.request import Request, urlopen
import json as _json
-LLM_DIR = Path(os.environ.get("MODLY_LLM_DIR") or Path.home() / ".modly" / "llm")
+LLM_DIR = Path(os.environ.get("THREEWS_LLM_DIR") or Path.home() / ".three-ws-forge" / "llm")
BIN_DIR = LLM_DIR / "bin"
LLM_MODELS_DIR = LLM_DIR / "models"
LOGS_DIR = LLM_DIR / "logs"
-SERVER_PORT = int(os.environ.get("MODLY_LLM_PORT", "8791"))
+SERVER_PORT = int(os.environ.get("THREEWS_LLM_PORT", "8791"))
-# Modly is first and foremost a 3D-generation app: the LLM must never sit on
+# three.ws Forge is first and foremost a 3D-generation app: the LLM must never sit on
# VRAM it isn't using. Idle models are evicted after this many seconds.
-IDLE_TTL_SECONDS = int(os.environ.get("MODLY_LLM_IDLE_TTL", "300"))
+IDLE_TTL_SECONDS = int(os.environ.get("THREEWS_LLM_IDLE_TTL", "300"))
# Multi-model pool: each loaded model gets its own llama-server process on its
# own port (SERVER_PORT .. SERVER_PORT+MAX_SLOT_PORTS-1). How many may run at
-# once is user-configurable ("auto" sizes it from the GPU's VRAM — small cards
+# once is user-configurable ("auto" sizes it from the GPU's VRAM: small cards
# stay at 1, exactly like the old single-slot behavior).
MAX_SLOT_PORTS = 4
CONFIG_PATH = LLM_DIR / "config.json"
@@ -82,10 +82,10 @@ def detect_vram_gb() -> float:
def resolve_max_models() -> int:
"""How many llama-server processes may run at once.
- Priority: MODLY_LLM_MAX_MODELS env → user config → auto from VRAM.
+ Priority: THREEWS_LLM_MAX_MODELS env → user config → auto from VRAM.
Auto is deliberately conservative: 8 GB cards keep the single-slot
behavior, VRAM stays available for the 3D pipeline."""
- raw = os.environ.get("MODLY_LLM_MAX_MODELS") or load_config().get("max_models") or "auto"
+ raw = os.environ.get("THREEWS_LLM_MAX_MODELS") or load_config().get("max_models") or "auto"
if isinstance(raw, str) and raw.lower() == "auto":
# Thresholds sit just under the marketing size on purpose: a card sold
# as "12 GB" reports 12227 MiB = 11.9 GiB, so a `>= 12` test excluded
@@ -101,13 +101,13 @@ def resolve_max_models() -> int:
return max(1, min(n, MAX_SLOT_PORTS))
_BINARY_NAME = "llama-server.exe" if sys.platform == "win32" else "llama-server"
-_UA = {"User-Agent": "modly-llm"}
+_UA = {"User-Agent": "forge-llm"}
# Pinned to a known-good tag by default so installs are reproducible and never
-# silently pick up a broken/incompatible "latest" release. Set MODLY_LLM_RELEASE
+# silently pick up a broken/incompatible "latest" release. Set THREEWS_LLM_RELEASE
# to another llama.cpp tag (e.g. "b10075") to override, or to "latest" to track
# the newest release.
-_RELEASE_TAG = os.environ.get("MODLY_LLM_RELEASE", "b10075")
+_RELEASE_TAG = os.environ.get("THREEWS_LLM_RELEASE", "b10075")
_RELEASES_API = (
"https://api.github.com/repos/ggml-org/llama.cpp/releases/latest"
if _RELEASE_TAG.lower() == "latest"
@@ -199,7 +199,7 @@ def estimate_vram_mb(entry: dict) -> int:
Catalog entries declare it. A user's own GGUF doesn't, so it is derived from
the file: weights land in VRAM about 1:1, plus the KV cache and compute
buffers for a 16k context. Measured against the catalog's own numbers, whose
- declared/file ratio runs 1.22–1.32, so 1.25 + 500 MiB sits in the middle."""
+ declared/file ratio runs 1.22-1.32, so 1.25 + 500 MiB sits in the middle."""
declared = entry.get("vram_estimate_mb")
if isinstance(declared, (int, float)) and declared > 0:
return int(declared)
@@ -208,12 +208,12 @@ def estimate_vram_mb(entry: dict) -> int:
def vram_budget_mb() -> int:
- """VRAM the LLM pool may fill, in MiB — total minus what the desktop needs.
+ """VRAM the LLM pool may fill, in MiB, total minus what the desktop needs.
0 when no NVIDIA GPU is detected, which disables budgeting entirely."""
total = detect_vram_gb() * 1024
if total <= 0:
return 0
- reserve = _env_int("MODLY_LLM_VRAM_RESERVE_MB", 768)
+ reserve = _env_int("THREEWS_LLM_VRAM_RESERVE_MB", 768)
return max(0, int(total) - reserve)
@@ -231,7 +231,7 @@ def resolve_model(model_id: str) -> dict:
# The name is user/agent-supplied and this path is both loaded and
# DELETEd (DELETE /llm/models/{model_id}). Confine it to the models dir:
# on Windows a backslash is a separator too, so "custom:..\..\x.gguf"
- # would otherwise resolve — and unlink — outside it.
+ # would otherwise resolve: and unlink, outside it.
name = model_id[len("custom:"):]
path = (LLM_MODELS_DIR / name).resolve()
root = LLM_MODELS_DIR.resolve()
@@ -441,7 +441,7 @@ def install_binary(progress_cb: Callable[[dict], None], control_check: Callable[
"""Download and install the best llama-server build for this machine."""
progress_cb({"status": "Fetching latest llama.cpp release…", "percent": 0})
release = _fetch_release()
- progress_cb({"status": f"Release {release['tag_name']} — selecting build for this machine…", "percent": 1})
+ progress_cb({"status": f"Release {release['tag_name']}, selecting build for this machine…", "percent": 1})
assets = _pick_assets(release["assets"])
if not assets:
@@ -462,9 +462,9 @@ def install_binary(progress_cb: Callable[[dict], None], control_check: Callable[
# ─── Orphan prevention ────────────────────────────────────────────────────────
-# If Modly is force-killed, a plain child process would keep its model in
+# If three.ws Forge is force-killed, a plain child process would keep its model in
# memory forever. On Windows we put llama-server in a Job object with
-# KILL_ON_JOB_CLOSE (the OS kills it when Modly dies); on Linux we ask the
+# KILL_ON_JOB_CLOSE (the OS kills it when three.ws Forge dies); on Linux we ask the
# kernel to deliver SIGKILL on parent death.
_win_job_handle = None
@@ -539,13 +539,13 @@ def _linux_preexec():
def _kill_stale_server(port: int = SERVER_PORT) -> None:
- """Kill a leftover llama-server holding `port` (e.g. after a force-kill of Modly)."""
+ """Kill a leftover llama-server holding `port` (e.g. after a force-kill of three.ws Forge)."""
try:
with urlopen(Request(f"http://127.0.0.1:{port}/health", headers=_UA), timeout=1) as r:
if r.status != 200:
return
except Exception:
- return # nothing listening — the normal case
+ return # nothing listening, the normal case
try:
if sys.platform == "win32":
out = subprocess.run(
@@ -578,7 +578,7 @@ def _kill_stale_server(port: int = SERVER_PORT) -> None:
# ─── Managed server ───────────────────────────────────────────────────────────
class LlamaServerManager:
- """One llama-server slot — a single loaded GGUF on a dedicated port.
+ """One llama-server slot, a single loaded GGUF on a dedicated port.
Slots are owned by LlamaPool, which decides how many run at once, evicts
idle ones (IDLE_TTL_SECONDS), and unloads everything when the 3D pipeline
@@ -652,8 +652,8 @@ class LlamaServerManager:
"""Hold the slot for the duration of one request.
_last_used only moved when a completion *finished*, so a generation
- longer than IDLE_TTL_SECONDS — a Text-to-CAD node parked on /llm/chat,
- or an agent round on a 14B running on CPU — looked idle to the reaper,
+ longer than IDLE_TTL_SECONDS, a Text-to-CAD node parked on /llm/chat,
+ or an agent round on a 14B running on CPU, looked idle to the reaper,
which terminated the server mid-answer: truncated stream, node failed
with no message. Marking the request in flight covers the whole call,
including the prompt-eval stall before the first token."""
@@ -684,7 +684,7 @@ class LlamaServerManager:
# V-cache quantization requires flash attention (fine on CUDA).
cmd += ["-fa", "on", "-ctk", "q8_0", "-ctv", "q8_0"]
# llama-server resolves its plugin DLLs (ggml-cuda, ggml-cpu-*) relative
- # to cwd, not the exe path — running from bin/ is required.
+ # to cwd, not the exe path: running from bin/ is required.
env = {**os.environ, "PATH": str(BIN_DIR) + os.pathsep + os.environ.get("PATH", "")}
kwargs: dict = {}
if sys.platform.startswith("linux"):
@@ -758,7 +758,7 @@ class LlamaServerManager:
class LlamaPool:
- """Pool of llama-server slots — one process per loaded model, each on its
+ """Pool of llama-server slots, one process per loaded model, each on its
own port, capped by BOTH resolve_max_models() and vram_budget_mb()
(LRU eviction).
@@ -795,14 +795,14 @@ class LlamaPool:
start blocks in _wait_for_health for up to 180 s, and holding the pool
lock that long froze every other caller: /llm/status, polled by an open
Settings → Agent page, hung for the whole load, and switch_model's
- unload_all() — which exists to reclaim VRAM before a 3D model — queued
+ unload_all(), which exists to reclaim VRAM before a 3D model, queued
behind the very LLM competing for it.
Loading outside the lock means two callers can be starting different
models at the same time (an agent turn plus a workflow LLM node). A slot
being started holds no process, so it cannot be evicted to make room:
when only such loads keep the pool over its limit, this waits for one to
- land — it then becomes an ordinary eviction candidate — instead of
+ land, it then becomes an ordinary eviction candidate, instead of
putting a second model on a card sized for one.
"""
incoming_mb = spec.get("vram_mb") or 0
@@ -824,7 +824,7 @@ class LlamaPool:
# Also for a dead slot respawned in place, so reviving one
# cannot push the pool past the limit. Only alive slots that are
# not answering a request are eviction candidates, so this never
- # evicts our own — nor anyone's live stream.
+ # evicts our own: nor anyone's live stream.
self._enforce_limit_locked(reserve=1, incoming_mb=incoming_mb)
remaining = deadline - time.monotonic()
if (not self._over_capacity_locked(incoming_mb)
@@ -844,7 +844,7 @@ class LlamaPool:
)
if port is None:
# A bare next() raised StopIteration here, which surfaced to
- # the caller as "Could not start the local LLM: " — an empty
+ # the caller as "Could not start the local LLM: ": an empty
# message. Say what actually happened.
raise RuntimeError(
f"All {MAX_SLOT_PORTS} local-LLM slots are in use or starting up. "
@@ -868,7 +868,7 @@ class LlamaPool:
slot.ensure(model_id, spec)
except Exception:
if hold:
- slot.release() # nothing to answer with — do not pin the slot
+ slot.release() # nothing to answer with, do not pin the slot
with self._lock:
if self._slots.get(model_id) is slot and not slot._alive():
self._slots.pop(model_id, None)
@@ -881,7 +881,7 @@ class LlamaPool:
def _evictable_locked(self, slot: LlamaServerManager) -> bool:
"""May this slot be unloaded to make room? Shared by the limit check and
- the idle reaper, which both unload while holding the pool lock — a rule
+ the idle reaper, which both unload while holding the pool lock, a rule
applied to only one of them is a rule that does not hold.
A slot answering a request is spared because terminating it truncates
@@ -889,7 +889,7 @@ class LlamaPool:
spared for a harder reason: from the moment Popen returns it is _alive()
(the long wait is _wait_for_health, up to 180 s) while its own lock is
held by the loader, so unload() would block on that lock and freeze the
- whole pool with it — /llm/status, every ensure(), and the unload_all()
+ whole pool with it, /llm/status, every ensure(), and the unload_all()
the 3D pipeline needs to reclaim VRAM. Its cost is still counted, it
just cannot be the victim."""
return slot.busy_count == 0 and slot.port not in self._loading_ports
@@ -901,7 +901,7 @@ class LlamaPool:
The count alone was not enough. `max_models: 2` let any two models in,
so a 9 GB custom model plus a vision model on a 12 GB card oversubscribed
the card; Windows spills to shared memory instead of failing, so nothing
- errored — a cold start just went from 5 s to 24 s with no explanation.
+ errored, a cold start just went from 5 s to 24 s with no explanation.
Budgeting on declared estimates keeps the pairs that actually fit (a 4B
and a 7B come to 10.4 of 11.5 GiB) and refuses the ones that never did.
@@ -911,7 +911,7 @@ class LlamaPool:
alive.sort(key=lambda kv: kv[1]._last_used) # oldest first
# Slots reserved by a concurrent ensure() hold no process yet, so
# _alive() cannot see them. Counting only live slots let two concurrent
- # ensure() calls — an agent turn plus a workflow LLM node — each
+ # ensure() calls: an agent turn plus a workflow LLM node, each
# conclude the pool was empty and both load, which on an 8 GB card
# (max_models = 1) is exactly the oversubscription this rule prevents.
loading = [s for s in self._slots.values()
@@ -930,7 +930,7 @@ class LlamaPool:
budget = vram_budget_mb()
if not budget or not incoming_mb:
- return # no GPU detected, or an unknown estimate — count rule only
+ return # no GPU detected, or an unknown estimate, count rule only
def _committed_mb() -> int:
return sum(s.vram_mb for _mid, s in alive) + sum(s.vram_mb for s in loading)
@@ -939,7 +939,7 @@ class LlamaPool:
_evict_oldest()
def _transient_blockers_locked(self) -> bool:
- """Is the pool full only of things that end on their own — a load in
+ """Is the pool full only of things that end on their own, a load in
flight, or a slot answering a request? Those are worth waiting for; a
merely idle slot is not (it gets evicted instead)."""
return bool(self._loading_ports) or any(
@@ -1020,7 +1020,7 @@ class LlamaPool:
with self._lock:
for mid, slot in list(self._slots.items()):
if not self._evictable_locked(slot):
- continue # answering right now, or being loaded — never idle
+ continue # answering right now, or being loaded, never idle
if not slot._alive():
self._drop_dead_locked(mid, slot)
elif now - slot._last_used > IDLE_TTL_SECONDS:
diff --git a/apps/forge-desktop/api/services/mesh_ops/meshopt_runner.cjs b/apps/forge-desktop/api/services/mesh_ops/meshopt_runner.cjs
index 3436be44d..7122db7db 100644
--- a/apps/forge-desktop/api/services/mesh_ops/meshopt_runner.cjs
+++ b/apps/forge-desktop/api/services/mesh_ops/meshopt_runner.cjs
@@ -49,7 +49,7 @@ async function run(payload) {
100,
Math.round(Number(payload.params?.target_faces ?? 10000)),
)
- log(`Target: ${targetFaces} triangles — input: ${payload.inputPath}`)
+ log(`Target: ${targetFaces} triangles, input: ${payload.inputPath}`)
await MeshoptSimplifier.ready
@@ -60,7 +60,7 @@ async function run(payload) {
log(`Current triangles: ${currentFaces}`)
if (currentFaces <= targetFaces) {
- log('Already within target — skipping simplification')
+ log('Already within target, skipping simplification')
if (!payload.outputPath) {
progress(100, 'Done')
return { filePath: payload.inputPath, faceCount: currentFaces }
diff --git a/apps/forge-desktop/api/services/mesh_ops/operations.py b/apps/forge-desktop/api/services/mesh_ops/operations.py
index 7fae38459..1c6dbd29c 100644
--- a/apps/forge-desktop/api/services/mesh_ops/operations.py
+++ b/apps/forge-desktop/api/services/mesh_ops/operations.py
@@ -1,4 +1,4 @@
-"""Canonical implementations for Modly's built-in mesh operations."""
+"""Canonical implementations for three.ws Forge's built-in mesh operations."""
import json
import os
@@ -289,7 +289,7 @@ def smooth_mesh(
def _node_executable() -> tuple[str, bool]:
- configured = os.environ.get("MODLY_NODE_EXECUTABLE")
+ configured = os.environ.get("THREEWS_NODE_EXECUTABLE") or os.environ.get("MODLY_NODE_EXECUTABLE")
if configured:
executable = Path(configured)
if not executable.is_file():
@@ -301,7 +301,7 @@ def _node_executable() -> tuple[str, bool]:
executable = shutil.which("node") or shutil.which("nodejs")
if executable is None:
raise MeshOpUnavailableError(
- "mesh-optimizer requires Node.js (or Modly's Electron runtime)"
+ "mesh-optimizer requires Node.js (or three.ws Forge's Electron runtime)"
)
return executable, False
@@ -327,7 +327,7 @@ def _meshopt_dependency_dir() -> Path:
raise MeshOpUnavailableError(
"mesh-optimizer dependencies are unavailable; run `npm run build` "
- "before starting Modly from source"
+ "before starting three.ws Forge from source"
)
diff --git a/apps/forge-desktop/api/services/mesh_ops/processor.py b/apps/forge-desktop/api/services/mesh_ops/processor.py
index 9af04353c..408ff1d75 100644
--- a/apps/forge-desktop/api/services/mesh_ops/processor.py
+++ b/apps/forge-desktop/api/services/mesh_ops/processor.py
@@ -35,7 +35,7 @@ def run_processor(operation_id: str, processor_id: str) -> None:
workspace_dir = Path(
data.get("workspaceDir")
or os.environ.get("WORKSPACE_DIR")
- or Path.home() / ".modly" / "workspace"
+ or Path.home() / ".three-ws-forge" / "workspace"
)
temp_dir = Path(
data.get("tempDir")
diff --git a/apps/forge-desktop/api/services/mesh_ops/types.py b/apps/forge-desktop/api/services/mesh_ops/types.py
index 5951bfe12..4465a9d44 100644
--- a/apps/forge-desktop/api/services/mesh_ops/types.py
+++ b/apps/forge-desktop/api/services/mesh_ops/types.py
@@ -1,4 +1,4 @@
-"""Shared types for Modly mesh operations."""
+"""Shared types for three.ws Forge mesh operations."""
from copy import deepcopy
from dataclasses import dataclass, field
diff --git a/apps/forge-desktop/api/services/scene_input.py b/apps/forge-desktop/api/services/scene_input.py
index c53950502..b44e8fb2f 100644
--- a/apps/forge-desktop/api/services/scene_input.py
+++ b/apps/forge-desktop/api/services/scene_input.py
@@ -5,7 +5,7 @@ import re
import stat
from pathlib import Path, PurePosixPath, PureWindowsPath
-SCHEMA = "modly.scene-manifest.v1"
+SCHEMA = "three-ws.forge.scene-manifest.v1"
MANIFEST = "scene-manifest.json"
MAX_MANIFEST_BYTES = 1024 * 1024
MAX_REFERENCES = 4096
diff --git a/apps/forge-desktop/api/services/stdio_utf8.py b/apps/forge-desktop/api/services/stdio_utf8.py
index b0cb7219a..3be601dbf 100644
--- a/apps/forge-desktop/api/services/stdio_utf8.py
+++ b/apps/forge-desktop/api/services/stdio_utf8.py
@@ -5,7 +5,7 @@ Windows embedded Python defaults stdout/stderr/stdin to the active console
codepage (cp1252, cp932, ...). Any print() containing non-ASCII characters
(e.g. "→", "…") then crashes with UnicodeEncodeError, and reading UTF-8
output under a legacy codepage can kill pipe reader threads. Reconfiguring
-all three streams to UTF-8 makes Modly and extension workers agree with the
+all three streams to UTF-8 makes three.ws Forge and extension workers agree with the
UTF-8 pipe readers used on the Electron side.
"""
import sys
diff --git a/apps/forge-desktop/api/tests/test_agent_router.py b/apps/forge-desktop/api/tests/test_agent_router.py
index ecd2ed7c1..a1020a794 100644
--- a/apps/forge-desktop/api/tests/test_agent_router.py
+++ b/apps/forge-desktop/api/tests/test_agent_router.py
@@ -9,7 +9,7 @@ import routers.agent as agent
class _MockClientFactory:
"""Builds real AsyncClients wired to a MockTransport, so execute_tool talks to
- a fake Modly API instead of the network."""
+ a fake three.ws Forge API instead of the network."""
def __init__(self, handler) -> None:
self._handler = handler
@@ -28,7 +28,7 @@ def _run_tool(name: str, handler) -> tuple[str, object]:
class UnloadModelsErrorTests(unittest.TestCase):
"""unload_models must report a failed unload, not claim success (like every
- other POST tool and like the MCP server's modly_unload_models)."""
+ other POST tool and like the MCP server's forge_unload_models)."""
def test_http_error_is_surfaced(self) -> None:
def handler(request: httpx.Request) -> httpx.Response:
diff --git a/apps/forge-desktop/api/tests/test_export_router.py b/apps/forge-desktop/api/tests/test_export_router.py
index 2bed2a687..255c4daa2 100644
--- a/apps/forge-desktop/api/tests/test_export_router.py
+++ b/apps/forge-desktop/api/tests/test_export_router.py
@@ -106,7 +106,7 @@ class ExportForSlicerTests(unittest.TestCase):
def test_rejects_sibling_prefix_escape(self) -> None:
# A sibling dir whose name starts with the workspace dir name must not be
- # reachable — the old str.startswith containment guard would allow it.
+ # reachable: the old str.startswith containment guard would allow it.
sibling = self.workspace.parent / (self.workspace.name + "-secret")
sibling.mkdir(parents=True, exist_ok=True)
(sibling / "x.glb").write_bytes(b"nope")
@@ -148,7 +148,7 @@ class FlattenAndScaleHelperTests(unittest.TestCase):
@unittest.skipUnless(HAVE_TRIMESH, "trimesh not installed")
class ImportedSourceSlicerTests(unittest.TestCase):
- """Meshes imported from outside the workspace are sliceable — but only the
+ """Meshes imported from outside the workspace are sliceable, but only the
exact files the user picked, and never with the wrong up-axis."""
def setUp(self) -> None:
diff --git a/apps/forge-desktop/api/tests/test_extension_process.py b/apps/forge-desktop/api/tests/test_extension_process.py
index 29602cd68..0dc4c4ac5 100644
--- a/apps/forge-desktop/api/tests/test_extension_process.py
+++ b/apps/forge-desktop/api/tests/test_extension_process.py
@@ -31,7 +31,7 @@ class ExtensionProcessTests(unittest.TestCase):
scene.mkdir(parents=True)
manifest = scene / "scene-manifest.json"
manifest.write_text(json.dumps({
- "schema": "modly.scene-manifest.v1", "sceneRoot": ".", "assets": [],
+ "schema": "three-ws.forge.scene-manifest.v1", "sceneRoot": ".", "assets": [],
}))
proc = _make_proc()
calls = []
diff --git a/apps/forge-desktop/api/tests/test_extensions_router.py b/apps/forge-desktop/api/tests/test_extensions_router.py
index 8eae631d8..1efd44144 100644
--- a/apps/forge-desktop/api/tests/test_extensions_router.py
+++ b/apps/forge-desktop/api/tests/test_extensions_router.py
@@ -45,7 +45,7 @@ class ExtensionReloadRouteTests(unittest.TestCase):
capability = {
"extensionId": "pending",
"destinationName": "pending",
- "stateName": ".modly-registration-pending-pending-100",
+ "stateName": ".forge-registration-pending-pending-100",
"token": "t" * 43,
}
diff --git a/apps/forge-desktop/api/tests/test_generation_router.py b/apps/forge-desktop/api/tests/test_generation_router.py
index 3d69118c7..126f2022a 100644
--- a/apps/forge-desktop/api/tests/test_generation_router.py
+++ b/apps/forge-desktop/api/tests/test_generation_router.py
@@ -72,7 +72,7 @@ class RunGenerationWorkspaceTests(unittest.TestCase):
registry.WORKSPACE_DIR = Path(self._tmp.name) / "new_workspace"
# Keep the test hermetic against the module's import-time binding: if the
# stale name still exists (before the fix) redirect it into the temp tree
- # so the assertion — not a stray write to the real workspace — is what
+ # so the assertion: not a stray write to the real workspace, is what
# catches the bug.
self._had_stale = hasattr(generation, "WORKSPACE_DIR")
if self._had_stale:
diff --git a/apps/forge-desktop/api/tests/test_generator_registry.py b/apps/forge-desktop/api/tests/test_generator_registry.py
index b21253b7c..1d4bc7a94 100644
--- a/apps/forge-desktop/api/tests/test_generator_registry.py
+++ b/apps/forge-desktop/api/tests/test_generator_registry.py
@@ -15,7 +15,7 @@ from services.generator_registry import GeneratorRegistry
class GeneratorRegistryDiscoveryTests(unittest.TestCase):
def setUp(self) -> None:
- self._tempdir = tempfile.TemporaryDirectory(prefix="modly-registry-test-")
+ self._tempdir = tempfile.TemporaryDirectory(prefix="forge-registry-test-")
self.root = Path(self._tempdir.name)
self.extensions_dir = self.root / "extensions"
self.models_dir = self.root / "models"
@@ -80,7 +80,7 @@ class GeneratorRegistryDiscoveryTests(unittest.TestCase):
token: str = "t" * 43,
) -> dict[str, str]:
state_name = (
- f".modly-registration-pending-{extension_id}-{suffix}"
+ f".forge-registration-pending-{extension_id}-{suffix}"
)
state_path = self.extensions_dir / state_name
state_path.write_text(
@@ -607,7 +607,7 @@ class GeneratorRegistryDiscoveryTests(unittest.TestCase):
extension = self._make_extension("interrupted")
self._write_manifest(extension, extension_id="interrupted", node_ids=("one", "two"))
(extension / "generator.py").write_text("", encoding="utf-8")
- (extension / ".modly-incomplete").write_text("installing", encoding="utf-8")
+ (extension / ".forge-incomplete").write_text("installing", encoding="utf-8")
self.registry.initialize()
@@ -624,7 +624,7 @@ class GeneratorRegistryDiscoveryTests(unittest.TestCase):
" raise AssertionError('pending extension must not be loaded')\n",
encoding="utf-8",
)
- (self.extensions_dir / ".modly-registration-pending-pending-registration-100").write_text(
+ (self.extensions_dir / ".forge-registration-pending-pending-registration-100").write_text(
"validating",
encoding="utf-8",
)
@@ -802,7 +802,7 @@ class GeneratorRegistryDiscoveryTests(unittest.TestCase):
extension_type="process",
)
(extension / "processor.py").write_text("print('ok')\n", encoding="utf-8")
- (extension / ".modly-incomplete").write_text("installing", encoding="utf-8")
+ (extension / ".forge-incomplete").write_text("installing", encoding="utf-8")
self.registry.initialize()
diff --git a/apps/forge-desktop/api/tests/test_llm_downloads.py b/apps/forge-desktop/api/tests/test_llm_downloads.py
index 31d299154..d412d00fe 100644
--- a/apps/forge-desktop/api/tests/test_llm_downloads.py
+++ b/apps/forge-desktop/api/tests/test_llm_downloads.py
@@ -18,8 +18,7 @@ _VISION = {
class DiscardIncompleteTests(unittest.TestCase):
"""Cancelling a download has to leave nothing behind. A vision model fetches
weights then projector, so a cancel during the second one used to leave the
- finished weights on disk under a model still reported `downloaded: false` —
- the UI offers no trash button for those, so the space was unreclaimable."""
+ finished weights on disk under a model still reported `downloaded: false`, the UI offers no trash button for those, so the space was unreclaimable."""
def setUp(self) -> None:
self._tmp = tempfile.TemporaryDirectory()
@@ -77,7 +76,7 @@ class _FakeResponse:
class EngineDigestTests(unittest.TestCase):
"""The engine archive's files are executed, so a download whose bytes differ
- from the digest GitHub published for the asset must be refused — and must
+ from the digest GitHub published for the asset must be refused, and must
not be left behind in the temp folder."""
BODY = b"llama-server archive bytes"
diff --git a/apps/forge-desktop/api/tests/test_llm_pool_budget.py b/apps/forge-desktop/api/tests/test_llm_pool_budget.py
index 9bc34a950..29fdb5b22 100644
--- a/apps/forge-desktop/api/tests/test_llm_pool_budget.py
+++ b/apps/forge-desktop/api/tests/test_llm_pool_budget.py
@@ -133,8 +133,8 @@ class PoolBudgetTests(unittest.TestCase):
# From the moment Popen returns, a slot is _alive() while the loading
# thread still holds its lock for the whole of _wait_for_health (up to
# 180 s). unload() runs UNDER the pool lock, so evicting it there would
- # block every other pool operation — /llm/status, ensure(), and the
- # unload_all() the 3D pipeline calls to reclaim VRAM — for that long.
+ # block every other pool operation: /llm/status, ensure(), and the
+ # unload_all() the 3D pipeline calls to reclaim VRAM: for that long.
starting = _FakeSlot(last_used=0.0, vram_mb=7800, port=llm_server.SERVER_PORT)
self.pool._slots["starting"] = starting
self.pool._loading_ports.add(llm_server.SERVER_PORT)
diff --git a/apps/forge-desktop/api/tests/test_model_router.py b/apps/forge-desktop/api/tests/test_model_router.py
index 4090a0ea0..99cdff2fb 100644
--- a/apps/forge-desktop/api/tests/test_model_router.py
+++ b/apps/forge-desktop/api/tests/test_model_router.py
@@ -67,7 +67,7 @@ async def collect_events(response) -> list[dict]:
class MultiSourceRouterTests(unittest.TestCase):
def setUp(self) -> None:
- self.tempdir = tempfile.TemporaryDirectory(prefix="modly-model-router-")
+ self.tempdir = tempfile.TemporaryDirectory(prefix="forge-model-router-")
self.models_dir = Path(self.tempdir.name) / "models"
self.models_dir.mkdir()
self.old_models_dir = model_router.registry_module.MODELS_DIR
diff --git a/apps/forge-desktop/api/tests/test_model_sources.py b/apps/forge-desktop/api/tests/test_model_sources.py
index 54ecbf06e..965cf7763 100644
--- a/apps/forge-desktop/api/tests/test_model_sources.py
+++ b/apps/forge-desktop/api/tests/test_model_sources.py
@@ -96,7 +96,7 @@ class ModelSourcesTests(unittest.TestCase):
def test_requires_all_checks_and_rejects_symlinked_extension_ancestry(self) -> None:
sources = normalize_model_sources(valid_node()) or []
- with tempfile.TemporaryDirectory(prefix="modly-model-sources-") as tmp:
+ with tempfile.TemporaryDirectory(prefix="forge-model-sources-") as tmp:
models = Path(tmp) / "models"
model_root = models / "pixal3d" / "generate"
encoder = model_root / "auxiliary" / "encoder"
@@ -164,7 +164,7 @@ class ModelSourcesTests(unittest.TestCase):
}],
}]
}) or [])[0]
- with tempfile.TemporaryDirectory(prefix="modly-shared-sources-") as tmp:
+ with tempfile.TemporaryDirectory(prefix="forge-shared-sources-") as tmp:
models = Path(tmp) / "models"
group_root = models / "demo" / "_shared" / "base"
self.assertEqual(resolve_weight_group_root(models, "demo", "base"), group_root)
@@ -230,7 +230,7 @@ class ModelSourcesTests(unittest.TestCase):
with_vram = normalize_weight_variants(with_options([{**variant("Q4"), "vram_gb": 6.5}])) or {}
self.assertEqual(with_vram["options"][0]["vram_gb"], 6.5)
- with tempfile.TemporaryDirectory(prefix="modly-weight-variants-") as tmp:
+ with tempfile.TemporaryDirectory(prefix="forge-weight-variants-") as tmp:
models = Path(tmp) / "models"
dit = models / "trellis" / "generate" / "dit"
dit.mkdir(parents=True)
diff --git a/apps/forge-desktop/api/tests/test_runner.py b/apps/forge-desktop/api/tests/test_runner.py
index 084e3e7b4..3d8a24193 100644
--- a/apps/forge-desktop/api/tests/test_runner.py
+++ b/apps/forge-desktop/api/tests/test_runner.py
@@ -10,7 +10,7 @@ from contextlib import redirect_stdout
from pathlib import Path
-_tmp_ext_dir = tempfile.mkdtemp(prefix="modly-runner-test-")
+_tmp_ext_dir = tempfile.mkdtemp(prefix="forge-runner-test-")
Path(_tmp_ext_dir, "manifest.json").write_text("{}", encoding="utf-8")
os.environ.setdefault("EXTENSION_DIR", _tmp_ext_dir)
@@ -28,7 +28,7 @@ class RunnerTests(unittest.TestCase):
scene.mkdir(parents=True)
manifest = scene / "scene-manifest.json"
manifest.write_text(json.dumps({
- "schema": "modly.scene-manifest.v1", "sceneRoot": ".", "assets": [],
+ "schema": "three-ws.forge.scene-manifest.v1", "sceneRoot": ".", "assets": [],
}))
with patch.object(runner, "WORKSPACE_DIR", workspace):
typed = runner.decode_model_input({"input": {"kind": "scene", "path": str(manifest)}})
@@ -247,7 +247,7 @@ class _RunnerDriver:
"""Runs runner.main() against a throwaway extension dir."""
def __init__(self, generator_src: str, generator_class: str) -> None:
- self.ext_dir = Path(tempfile.mkdtemp(prefix="modly-texgen-test-"))
+ self.ext_dir = Path(tempfile.mkdtemp(prefix="forge-texgen-test-"))
(self.ext_dir / "generator.py").write_text(generator_src, encoding="utf-8")
(self.ext_dir / "manifest.json").write_text(
json.dumps({"id": "demo-ext", "generator_class": generator_class}),
diff --git a/apps/forge-desktop/api/tests/test_scene_generation.py b/apps/forge-desktop/api/tests/test_scene_generation.py
index 90333ca5b..d20633079 100644
--- a/apps/forge-desktop/api/tests/test_scene_generation.py
+++ b/apps/forge-desktop/api/tests/test_scene_generation.py
@@ -31,7 +31,7 @@ class SceneGenerationTests(unittest.TestCase):
self.scene = self.workspace / "Workflows" / "room"
self.scene.mkdir(parents=True)
self.manifest = self.scene / "scene-manifest.json"
- self.manifest.write_text(json.dumps({"schema": "modly.scene-manifest.v1", "sceneRoot": ".", "assets": []}))
+ self.manifest.write_text(json.dumps({"schema": "three-ws.forge.scene-manifest.v1", "sceneRoot": ".", "assets": []}))
self.registry = _Registry()
self.patches = [patch.object(generation, "generator_registry", self.registry), patch.object(registry, "WORKSPACE_DIR", self.workspace)]
for item in self.patches: item.start()
diff --git a/apps/forge-desktop/api/tests/test_scene_input.py b/apps/forge-desktop/api/tests/test_scene_input.py
index aec4bc5ec..8023f4b62 100644
--- a/apps/forge-desktop/api/tests/test_scene_input.py
+++ b/apps/forge-desktop/api/tests/test_scene_input.py
@@ -16,7 +16,7 @@ class SceneInputTests(unittest.TestCase):
(self.scene / "model.glb").write_bytes(b"mesh")
self.manifest = self.scene / "scene-manifest.json"
self.manifest.write_text(json.dumps({
- "schema": "modly.scene-manifest.v1",
+ "schema": "three-ws.forge.scene-manifest.v1",
"sceneRoot": ".",
"assets": [{"path": "model.glb"}],
}))
diff --git a/apps/forge-desktop/api/tests/test_workflow_runs_lifecycle.py b/apps/forge-desktop/api/tests/test_workflow_runs_lifecycle.py
index 474335739..964a7a3da 100644
--- a/apps/forge-desktop/api/tests/test_workflow_runs_lifecycle.py
+++ b/apps/forge-desktop/api/tests/test_workflow_runs_lifecycle.py
@@ -53,7 +53,7 @@ def _clear_job_stores() -> None:
class WorkflowRunJobLifecycleTests(unittest.TestCase):
"""The headless /workflow-runs surface shares the job dicts with /generate,
- so it must take part in the same TTL purge — otherwise long-running
+ so it must take part in the same TTL purge, otherwise long-running
automation leaks a JobStatus + Event per run forever."""
def setUp(self) -> None:
diff --git a/apps/forge-desktop/arch/decisions/AMD-ROCM-SUPPORT.md b/apps/forge-desktop/arch/decisions/AMD-ROCM-SUPPORT.md
index 09671fc76..92f3cf8cb 100644
--- a/apps/forge-desktop/arch/decisions/AMD-ROCM-SUPPORT.md
+++ b/apps/forge-desktop/arch/decisions/AMD-ROCM-SUPPORT.md
@@ -5,7 +5,7 @@
## Decision
-Modly supports AMD Radeon GPUs through ROCm on Linux and Windows. Detection is
+three.ws Forge supports AMD Radeon GPUs through ROCm on Linux and Windows. Detection is
automatic and requires no ROCm installation on the user's machine.
Scope and operating rules:
@@ -26,9 +26,9 @@ Scope and operating rules:
## Context
-Modly never installs PyTorch itself. Each extension ships a `setup.py` that
-creates its own venv and installs torch from an index it hardcodes — and those
-scripts are third-party code in separate GitHub repositories that Modly cannot
+three.ws Forge never installs PyTorch itself. Each extension ships a `setup.py` that
+creates its own venv and installs torch from an index it hardcodes, and those
+scripts are third-party code in separate GitHub repositories that three.ws Forge cannot
edit. Before this work `detectGpuInfo()` only probed `nvidia-smi`, so an AMD
machine was reported as `accelerator: 'cpu'` with `gpu_sm: 0`, which sent every
extension down its legacy CUDA 11.8 branch and installed a torch that cannot see
@@ -38,9 +38,8 @@ That leaves two distinct problems, and both have to be solved:
- Extensions that *do* understand AMD were never told. The official
`modly-hunyuan3d-mini-extension` has accepted a `torch_flavor: "rocm"` argument
- for some time; Modly simply never sent it.
-- Extensions that don't understand AMD — `triposg`, `trellis2`, and the rest —
- hardcode `--index-url .../whl/cu124` and have no branch to select. Passing an
+ for some time; three.ws Forge simply never sent it.
+- Extensions that don't understand AMD, `triposg`, `trellis2`, and the rest, hardcode `--index-url .../whl/cu124` and have no branch to select. Passing an
argument achieves nothing for them.
The wheel sources are also not symmetric across platforms. `download.pytorch.org`
@@ -66,9 +65,8 @@ rather than by the index URL, which means Windows needs the compute target
path. It also keeps them off `rembg[gpu]`, whose `onnxruntime-gpu` is
CUDA-only. Reporting a synthesised capability instead would break both.
PyTorch's HIP build answers the whole `torch.cuda` API, so
- `get_device_capability()` reports `(12, 0)` for a gfx1200 Radeon —
- indistinguishable from an sm_120 Blackwell. `api/routers/extensions.py` asks
- `nvidia-smi` rather than torch for this reason (and because Modly's main venv
+ `get_device_capability()` reports `(12, 0)` for a gfx1200 Radeon, indistinguishable from an sm_120 Blackwell. `api/routers/extensions.py` asks
+ `nvidia-smi` rather than torch for this reason (and because three.ws Forge's main venv
carries no torch at all).
- **Compute-target discovery is platform-specific.** Linux reads
`gfx_target_version` from the kernel's KFD topology, which needs no ROCm
@@ -80,7 +78,7 @@ rather than by the index URL, which means Windows needs the compute target
- **The Linux and Windows torch versions diverge.** Linux gets unpinned wheels
from the pytorch.org ROCm index (currently torch 2.11+); Windows gets a pinned
pair from AMD's index. Extension code written against torch 2.6/2.7 may not
- survive that jump, which is why `MODLY_ROCM_INDEX` and `MODLY_ROCM_TORCH_SPEC`
+ survive that jump, which is why `THREEWS_ROCM_INDEX` and `THREEWS_ROCM_TORCH_SPEC`
exist as first-class escape hatches rather than debug affordances.
- **Linux is verified, Windows is not.** On a Radeon RX 9060 XT (gfx1200),
`torch 2.13.0+rocm7.2` loads, rocBLAS and MIOpen kernels execute, 14 GB of the
@@ -92,7 +90,7 @@ rather than by the index URL, which means Windows needs the compute target
- **This work also required fixing an unrelated AppImage bug** to be verifiable
at all. `ensureStableEmbeddedPython()` copied the bundled runtime with
`fs.cp`, which rewrites relative symlinks into absolute paths pointing back at
- the ephemeral `/tmp/.mount_Modly-XXXXXX/` mount — so the "stable" copy was not
+ the ephemeral `/tmp/.mount_three.ws Forge-XXXXXX/` mount, so the "stable" copy was not
stable, and every extension venv built from it died on the next launch with a
misleading `No module named 'PIL'`. See `electron/main/copy-runtime.ts`.
- **Texture generation is out of scope.** `api/texture_baker` already carries a
diff --git a/apps/forge-desktop/arch/decisions/APPLE-SILICON-SUPPORT.md b/apps/forge-desktop/arch/decisions/APPLE-SILICON-SUPPORT.md
index c49c15351..97510b096 100644
--- a/apps/forge-desktop/arch/decisions/APPLE-SILICON-SUPPORT.md
+++ b/apps/forge-desktop/arch/decisions/APPLE-SILICON-SUPPORT.md
@@ -5,7 +5,7 @@
## Decision
-Modly supports macOS on Apple Silicon (`darwin/arm64`) as a first-class
+three.ws Forge supports macOS on Apple Silicon (`darwin/arm64`) as a first-class
platform. This ADR consolidates the runtime, packaging, extension, and
workflow rules needed to run the image-to-mesh pipeline reliably on 16 GB
unified-memory Macs.
@@ -24,7 +24,7 @@ Scope and operating rules:
## Context
-Apple Silicon changes the constraints under which Modly runs:
+Apple Silicon changes the constraints under which three.ws Forge runs:
- Unified memory means overlapping heavy GPU stages can destabilize the whole
machine on 16 GB systems.
@@ -45,7 +45,7 @@ Apple Silicon changes the constraints under which Modly runs:
## Consequences
- Packaging:
- Modly packages macOS as an Apple Silicon build path only, including the
+ three.ws Forge packages macOS as an Apple Silicon build path only, including the
embedded Python runtime in the app bundle. See `package.json:99`.
- Extension and model distribution:
@@ -86,7 +86,7 @@ Apple Silicon changes the constraints under which Modly runs:
- Subprocess lifecycle:
Extension subprocesses are owned as a full process tree. On Unix, the Python
- bridge runs as its own process-group leader and Modly kills the process group
+ bridge runs as its own process-group leader and three.ws Forge kills the process group
on quit. Free-memory/unload operations hard-stop the subprocess. Cancel first
sends a cooperative request, then escalates to a kill after a short grace
period if native code is still blocking. See `api/services/extension_process.py:78`
diff --git a/apps/forge-desktop/arch/decisions/README.md b/apps/forge-desktop/arch/decisions/README.md
index 925441ea0..00a80c52d 100644
--- a/apps/forge-desktop/arch/decisions/README.md
+++ b/apps/forge-desktop/arch/decisions/README.md
@@ -1,6 +1,6 @@
# Architecture Decisions
-This directory stores architecture decision records for Modly.
+This directory stores architecture decision records for three.ws Forge.
The current Apple Silicon support work is documented in one consolidated ADR so
the platform scope, runtime assumptions, and operational constraints stay in a
diff --git a/apps/forge-desktop/docs/running-on-amd-rocm.md b/apps/forge-desktop/docs/running-on-amd-rocm.md
index 5fe60f8aa..e28efa841 100644
--- a/apps/forge-desktop/docs/running-on-amd-rocm.md
+++ b/apps/forge-desktop/docs/running-on-amd-rocm.md
@@ -1,7 +1,7 @@
-# Running Modly on an AMD GPU (ROCm)
+# Running three.ws Forge on an AMD GPU (ROCm)
-Modly's default GPU path is NVIDIA/CUDA (plus Metal/MPS on Apple Silicon). This page
-covers the AMD path: how Modly detects a Radeon card, which PyTorch wheels it steers
+three.ws Forge's default GPU path is NVIDIA/CUDA (plus Metal/MPS on Apple Silicon). This page
+covers the AMD path: how three.ws Forge detects a Radeon card, which PyTorch wheels it steers
extensions to, and what to do when the automatic choice is wrong.
Nothing here needs a manual setup: install the app, install an extension, and the AMD
@@ -14,8 +14,8 @@ path is taken automatically when an AMD GPU is present.
| | Linux | Windows |
|---|---|---|
| GPU | RDNA 2 or newer discrete Radeon (see the table below) | same |
-| Driver | in-tree `amdgpu` kernel driver — any recent distro kernel | Adrenalin with the ROCm runtime (26.2.2 or newer) |
-| ROCm install | **not required** — the PyTorch ROCm wheels bundle their own runtime | not required |
+| Driver | in-tree `amdgpu` kernel driver, any recent distro kernel | Adrenalin with the ROCm runtime (26.2.2 or newer) |
+| ROCm install | **not required**, the PyTorch ROCm wheels bundle their own runtime | not required |
| Device access | `/dev/kfd` and `/dev/dri/renderD*` must be readable by your user | n/a |
On most distributions `/dev/kfd` is world-accessible. If it is not, add yourself to the
@@ -27,7 +27,7 @@ sudo usermod -aG render "$USER"
```
Integrated (APU) graphics are not mapped by the Windows detection table. They work on
-Linux whenever the kernel publishes a compute target, but they are not a target Modly
+Linux whenever the kernel publishes a compute target, but they are not a target three.ws Forge
tests against.
---
@@ -37,15 +37,15 @@ tests against.
Detection lives in `electron/main/gpu-detect.ts` and runs before an extension's
`setup.py`, in this order:
-1. `MODLY_TORCH_FLAVOR` (`cuda` / `rocm` / `cpu`) — an explicit override wins over everything.
+1. `THREEWS_TORCH_FLAVOR` (`cuda` / `rocm` / `cpu`): an explicit override wins over everything.
2. Apple Silicon → MPS.
3. `nvidia-smi` → CUDA. **NVIDIA keeps priority**: on a machine with both vendors,
nothing about the existing CUDA behaviour changes.
4. AMD:
- - **Linux** — reads `gfx_target_version` from the kernel's KFD topology
+ - **Linux**: reads `gfx_target_version` from the kernel's KFD topology
(`/sys/class/kfd/kfd/topology/nodes/*/properties`). No ROCm install and no external
binary involved; the `amdgpu` driver publishes this on its own.
- - **Windows** — reads the PCI device id from `Win32_VideoController` via PowerShell
+ - **Windows**: reads the PCI device id from `Win32_VideoController` via PowerShell
and maps it to a compute target.
5. Otherwise → CPU.
@@ -69,7 +69,7 @@ You can check what was detected in the logs (Settings → Logs), on the line beg
| Navi 22/23/24 | `gfx1031` / `gfx1032` / `gfx1034` | RX 6700 / 6600 / 6400 series |
On Linux the target is read from the kernel, so any AMD GPU the kernel knows about is
-picked up — the table above only bounds the *Windows* mapping. AMD officially supports
+picked up, the table above only bounds the *Windows* mapping. AMD officially supports
`gfx1030`, `gfx110x` and `gfx120x`; the RDNA 2 mid-range entries work in practice but
are not part of AMD's supported matrix.
@@ -77,8 +77,8 @@ are not part of AMD's supported matrix.
## 3. Which wheels get installed
-Modly does not install PyTorch itself — each extension's `setup.py` does, from an index
-it hardcodes. On an AMD machine Modly corrects that choice two ways:
+three.ws Forge does not install PyTorch itself, each extension's `setup.py` does, from an index
+it hardcodes. On an AMD machine three.ws Forge corrects that choice two ways:
- It passes `torch_flavor: "rocm"` in the setup arguments. Extensions that know about
AMD (the official `hunyuan3d-mini` one does) branch on it themselves.
@@ -97,7 +97,7 @@ extra rather than by the index URL.
`sm` and `cuda_version` are deliberately reported as `0` for AMD. Extensions written
before `torch_flavor` existed branch on those numbers, and `0` sends them down their
-most conservative path — which also keeps them off `rembg[gpu]`, whose `onnxruntime-gpu`
+most conservative path, which also keeps them off `rembg[gpu]`, whose `onnxruntime-gpu`
is CUDA-only.
---
@@ -109,12 +109,12 @@ what actually landed in its venv:
```bash
# Linux; adjust to your extensions directory
-EXT=~/Documents/Modly/extensions/hunyuan3d-mini
+EXT=~/Documents/three.ws Forge/extensions/hunyuan3d-mini
"$EXT/venv/bin/python" -c "import torch; print(torch.__version__, '| hip', torch.version.hip, '| avail', torch.cuda.is_available(), '|', torch.cuda.get_device_name(0))"
```
Expected: a `+rocm…` version, a non-null `hip`, `True`, and your card's name. A version
-ending in `+cu118` or `+cu124` means the AMD path was not taken — check the detection
+ending in `+cu118` or `+cu124` means the AMD path was not taken, check the detection
line in the logs.
Then confirm real VRAM is usable, not just that the device opens:
@@ -127,15 +127,15 @@ Then confirm real VRAM is usable, not just that the device opens:
## 5. Escape hatches
-All of these are environment variables read at detection time — set them before
-launching Modly.
+All of these are environment variables read at detection time, set them before
+launching three.ws Forge.
| Variable | Effect |
|---|---|
-| `MODLY_TORCH_FLAVOR` | `cuda` / `rocm` / `cpu`. Forces the path, skipping detection entirely. |
-| `MODLY_ROCM_GFX` | Forces the compute target (e.g. `gfx1201`). Needed for an AMD card the Windows table doesn't map. |
-| `MODLY_ROCM_INDEX` | Overrides the pip index, e.g. `https://download.pytorch.org/whl/rocm6.4` to fall back to torch 2.8/2.9. |
-| `MODLY_ROCM_TORCH_SPEC` | Overrides the requirements entirely, space-separated: `"torch==2.9.1 torchvision==0.24.1"`. |
+| `THREEWS_TORCH_FLAVOR` | `cuda` / `rocm` / `cpu`. Forces the path, skipping detection entirely. |
+| `THREEWS_ROCM_GFX` | Forces the compute target (e.g. `gfx1201`). Needed for an AMD card the Windows table doesn't map. |
+| `THREEWS_ROCM_INDEX` | Overrides the pip index, e.g. `https://download.pytorch.org/whl/rocm6.4` to fall back to torch 2.8/2.9. |
+| `THREEWS_ROCM_TORCH_SPEC` | Overrides the requirements entirely, space-separated: `"torch==2.9.1 torchvision==0.24.1"`. |
| `HSA_OVERRIDE_GFX_VERSION` | ROCm's own override, for cards without native kernels (e.g. `10.3.0` on an unsupported RDNA 2 part). Not needed on RDNA 3/4. |
After changing any of these, run **Repair** on the extension so its venv is rebuilt.
@@ -146,12 +146,12 @@ After changing any of these, run **Repair** on the extension so its venv is rebu
| Symptom | Cause | Fix |
|---|---|---|
-| Logs say `accelerator=cpu` on an AMD machine | `/dev/kfd` missing or unreadable (Linux), or an unmapped PCI id (Windows) | Check `ls -l /dev/kfd`; on Windows set `MODLY_ROCM_GFX` |
+| Logs say `accelerator=cpu` on an AMD machine | `/dev/kfd` missing or unreadable (Linux), or an unmapped PCI id (Windows) | Check `ls -l /dev/kfd`; on Windows set `THREEWS_ROCM_GFX` |
| `torch.__version__` ends in `+cu118` | Extension venv predates AMD support | Run **Repair** on the extension |
| `torch.cuda.is_available()` is `False` with a ROCm build | Device nodes not accessible from the process | Add your user to the `render` group, log back in |
| `HIP error: invalid device function` | Wheel has no kernels for your card | Set `HSA_OVERRIDE_GFX_VERSION` to a supported nearby target |
-| Extension imports fail after install (`diffusers`/`transformers`) | The ROCm index only carries recent torch (2.11+), newer than some extensions expect | `MODLY_ROCM_INDEX=https://download.pytorch.org/whl/rocm6.4`, then **Repair** |
-| Allocations above ~8 GB segfault on a 16 GB RX 9060 XT | [ROCm issue #6295](https://github.com/ROCm/ROCm/issues/6295) — did not reproduce on torch 2.13.0+rocm7.2 (see below) | If you hit it, pin an older stack via `MODLY_ROCM_INDEX` |
+| Extension imports fail after install (`diffusers`/`transformers`) | The ROCm index only carries recent torch (2.11+), newer than some extensions expect | `THREEWS_ROCM_INDEX=https://download.pytorch.org/whl/rocm6.4`, then **Repair** |
+| Allocations above ~8 GB segfault on a 16 GB RX 9060 XT | [ROCm issue #6295](https://github.com/ROCm/ROCm/issues/6295), did not reproduce on torch 2.13.0+rocm7.2 (see below) | If you hit it, pin an older stack via `THREEWS_ROCM_INDEX` |
---
@@ -163,7 +163,7 @@ The Linux path was measured end to end on a Radeon RX 9060 XT (Navi 44, gfx1200,
- `torch 2.13.0+rocm7.2` / `torchvision 0.28.0+rocm7.2`, HIP runtime 7.2.53211
- Detection reported `gfx1200`; `torch.cuda.is_available()` is `True` and
`get_device_properties(0).gcnArchName` is `gfx1200`
-- rocBLAS (fp16 matmul) and MIOpen (conv2d) kernels both execute — no
+- rocBLAS (fp16 matmul) and MIOpen (conv2d) kernels both execute, no
`no kernel image is available` failures
- Allocations of 4/6/8/10/12/14 GB all succeeded, filled and read back.
[ROCm #6295](https://github.com/ROCm/ROCm/issues/6295), which reports this exact
@@ -179,14 +179,14 @@ During generation PyTorch emits:
> Mem Efficient attention on Current AMD GPU is still experimental. Enable it with
> `TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1`
-Generation works without it — `scaled_dot_product_attention` falls back to a
+Generation works without it, `scaled_dot_product_attention` falls back to a
slower path. Setting `TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1` before launching
-Modly enables the memory-efficient kernels, at the cost of running code AMD still
-labels experimental on RDNA 3/4. Modly does not set it for you.
+three.ws Forge enables the memory-efficient kernels, at the cost of running code AMD still
+labels experimental on RDNA 3/4. three.ws Forge does not set it for you.
Limitations:
-- **Windows is untested** by the Modly maintainers. The wheel URLs and the `cp311`
+- **Windows is untested** by the three.ws Forge maintainers. The wheel URLs and the `cp311`
availability were verified, but no end-to-end run has been done on that path.
- **Texture generation** relies on optional native extensions (`texture_baker`,
`uv_unwrapper`) whose CUDA kernels have a HIP path but are not built as part of the
diff --git a/apps/forge-desktop/docs/running-on-jetson.md b/apps/forge-desktop/docs/running-on-jetson.md
index 4d21bdcba..57f42a0d0 100644
--- a/apps/forge-desktop/docs/running-on-jetson.md
+++ b/apps/forge-desktop/docs/running-on-jetson.md
@@ -1,11 +1,11 @@
-# Running Modly headless on an NVIDIA Jetson (AGX Orin, JetPack 6)
+# Running three.ws Forge headless on an NVIDIA Jetson (AGX Orin, JetPack 6)
-This guide explains how to run Modly's image-to-3D generation on an **NVIDIA Jetson**,
-a platform Modly does not officially target. Jetson is `aarch64` with NVIDIA's
+This guide explains how to run three.ws Forge's image-to-3D generation on an **NVIDIA Jetson**,
+a platform three.ws Forge does not officially target. Jetson is `aarch64` with NVIDIA's
Tegra/L4T CUDA stack, so the desktop installers and the stock extension `setup.py`
(which assume `x86_64` + the standard CUDA wheels) don't work as-is.
-The good news: **Modly's FastAPI backend is fully standalone and HTTP-driven**, so you
+The good news: **three.ws Forge's FastAPI backend is fully standalone and HTTP-driven**, so you
don't need Electron, a display, or the GUI. You run the backend on the Jetson and drive
it with `curl`. The only real work is building the model extension's venv with the
**Jetson-native** PyTorch and working around a broken ONNX Runtime.
@@ -13,7 +13,7 @@ it with `curl`. The only real work is building the model extension's venv with t
> Verified on: **Jetson AGX Orin Developer Kit, 64 GB, JetPack 6.2 (L4T R36.4),
> Python 3.10, CUDA 12.6, compute capability sm_87.**
> Model: the base **Hunyuan3D-2 Mini** extension (`hunyuan3d-mini`), mesh-only
-> (no texture). ~6 GB VRAM-class model; comfortable on a 32–64 GB Orin.
+> (no texture). ~6 GB VRAM-class model; comfortable on a 32-64 GB Orin.
---
@@ -48,15 +48,15 @@ free -h # confirm enough unified memory (16 GB+ recommended)
Set up working directories and environment:
```bash
-export EXTENSIONS_DIR=$HOME/.modly/extensions
-export MODELS_DIR=$HOME/.modly/models
-export WORKSPACE_DIR=$HOME/.modly/workspace
+export EXTENSIONS_DIR=$HOME/.three-ws-forge/extensions
+export MODELS_DIR=$HOME/.three-ws-forge/models
+export WORKSPACE_DIR=$HOME/.three-ws-forge/workspace
mkdir -p "$EXTENSIONS_DIR" "$MODELS_DIR" "$WORKSPACE_DIR"
```
---
-## 2. Clone Modly and build the API backend venv
+## 2. Clone three.ws Forge and build the API backend venv
The backend itself contains **no PyTorch**; it's just the FastAPI orchestrator plus
mesh post-processing (`trimesh`, `pymeshlab`). `pymeshlab` has `aarch64` wheels, so this
@@ -64,7 +64,7 @@ installs cleanly.
```bash
git clone https://github.com/lightningpixel/modly.git ~/modly
-cd ~/modly/api
+cd ~/forge/api
python3 -m venv .venv
./.venv/bin/pip install -U pip
./.venv/bin/pip install -r requirements.txt
@@ -232,10 +232,10 @@ fails, NumPy is ≥2 (see 4b).
## 5. Run the backend (headless)
```bash
-cd ~/modly/api
-EXTENSIONS_DIR=$HOME/.modly/extensions \
-MODELS_DIR=$HOME/.modly/models \
-WORKSPACE_DIR=$HOME/.modly/workspace \
+cd ~/forge/api
+EXTENSIONS_DIR=$HOME/.three-ws-forge/extensions \
+MODELS_DIR=$HOME/.three-ws-forge/models \
+WORKSPACE_DIR=$HOME/.three-ws-forge/workspace \
./.venv/bin/uvicorn main:app --host 0.0.0.0 --port 8000
```
@@ -316,7 +316,7 @@ diffusion).
## Notes for a proper upstream fix
-If Modly wants first-class Jetson support, the cleanest changes would be:
+If three.ws Forge wants first-class Jetson support, the cleanest changes would be:
1. In the extension `setup.py`, detect Tegra (`/etc/nv_tegra_release`) and install torch
from the jetson-ai-lab index for the detected JetPack/CUDA, pinning `numpy<2`.
diff --git a/apps/forge-desktop/electron/main/artifact-registry-service.test.ts b/apps/forge-desktop/electron/main/artifact-registry-service.test.ts
index 276e90a1d..bb133fdd4 100644
--- a/apps/forge-desktop/electron/main/artifact-registry-service.test.ts
+++ b/apps/forge-desktop/electron/main/artifact-registry-service.test.ts
@@ -14,7 +14,7 @@ import {
} from './artifact-registry-service.ts'
async function withWorkspace(run: (workspaceDir: string) => Promise<void>) {
- const workspaceDir = await mkdtemp(path.join(tmpdir(), 'modly-library-'))
+ const workspaceDir = await mkdtemp(path.join(tmpdir(), 'forge-library-'))
try {
await run(workspaceDir)
} finally {
@@ -67,7 +67,7 @@ test('lists Workflows and Exports assets while skipping hidden, cache, and inter
test('registers a generated scene directory through its canonical manifest artifact', () => withWorkspace(async (workspaceDir) => {
await mkdir(path.join(workspaceDir, 'Workflows/world'), { recursive: true })
await writeFile(path.join(workspaceDir, 'Workflows/world/scene-manifest.json'), JSON.stringify({
- schema: 'modly.scene-manifest.v1', sceneRoot: '.', assets: [],
+ schema: 'three-ws.forge.scene-manifest.v1', sceneRoot: '.', assets: [],
}))
const result = await listWorkspaceAssetLibrary({ workspaceDir })
assert.equal(result.success, true)
@@ -214,7 +214,7 @@ test('IPC read and open handlers forward sourceWorkspacePath without trusting ma
const handlers = new Map<string, (event: unknown, payload: unknown) => Promise<unknown>>()
registerWorkspaceAssetLibraryIpcHandlers({
ipcMain: { handle: (channel, handler) => handlers.set(channel, handler) },
- getWorkspaceDir: () => '/tmp/modly-workspace',
+ getWorkspaceDir: () => '/tmp/forge-workspace',
})
const result = await handlers.get('workspace:library:open')?.({}, {
@@ -230,7 +230,7 @@ test('registers workspace library IPC handlers with structured results', async (
const handlers = new Map<string, (event: unknown, payload: unknown) => Promise<unknown>>()
registerWorkspaceAssetLibraryIpcHandlers({
ipcMain: { handle: (channel, handler) => handlers.set(channel, handler) },
- getWorkspaceDir: () => '/tmp/modly-workspace',
+ getWorkspaceDir: () => '/tmp/forge-workspace',
})
assert.equal(typeof handlers.get('workspace:library:list'), 'function')
diff --git a/apps/forge-desktop/electron/main/bounded-file-reader.test.mjs b/apps/forge-desktop/electron/main/bounded-file-reader.test.mjs
index 030711802..b4c17b118 100644
--- a/apps/forge-desktop/electron/main/bounded-file-reader.test.mjs
+++ b/apps/forge-desktop/electron/main/bounded-file-reader.test.mjs
@@ -29,7 +29,7 @@ test('oversized scene manifests are rejected before their bytes are read', async
})
test('scene manifests at the bound are read and encoded', async () => {
- const bytes = new TextEncoder().encode('{"schema":"modly.scene-manifest.v1"}')
+ const bytes = new TextEncoder().encode('{"schema":"three-ws.forge.scene-manifest.v1"}')
const encoded = await readLocalFileBase64('/workspace/room/scene-manifest.json', {
statFile: async () => ({ size: MAX_SCENE_MANIFEST_BYTES, isFile: () => true }),
readBytes: async () => bytes,
diff --git a/apps/forge-desktop/electron/main/builtin-sync.ts b/apps/forge-desktop/electron/main/builtin-sync.ts
index e230ab72f..da5b1738f 100644
--- a/apps/forge-desktop/electron/main/builtin-sync.ts
+++ b/apps/forge-desktop/electron/main/builtin-sync.ts
@@ -17,7 +17,7 @@ function getBuiltinResourcesDir(): string {
/**
* Copies built-in extensions from app resources to userData/builtin-extensions.
- * Always overwrites — ensures built-ins are always up to date with the app version.
+ * Always overwrites, ensures built-ins are always up to date with the app version.
*/
export function syncBuiltinExtensions(): void {
const resourcesDir = getBuiltinResourcesDir()
diff --git a/apps/forge-desktop/electron/main/copy-runtime.test.mjs b/apps/forge-desktop/electron/main/copy-runtime.test.mjs
index b5dcbdb03..f98485a23 100644
--- a/apps/forge-desktop/electron/main/copy-runtime.test.mjs
+++ b/apps/forge-desktop/electron/main/copy-runtime.test.mjs
@@ -1,7 +1,7 @@
/**
* Guards the symlink property that makes the AppImage's "stable" Python copy
* actually stable. Getting this wrong is silent at copy time and only breaks on
- * the *next* launch, once the source mount is gone — so it needs a test that
+ * the *next* launch, once the source mount is gone, so it needs a test that
* checks the links rather than the copy succeeding.
*/
import test from 'node:test'
@@ -15,7 +15,7 @@ import { tmpdir } from 'node:os'
import { join, resolve, isAbsolute } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-copy-test-')), 'copy-runtime.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-copy-test-')), 'copy-runtime.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('electron/main/copy-runtime.ts')],
@@ -31,7 +31,7 @@ function loadModule() {
const { copyRuntimeTree } = loadModule()
// makeRuntime() below needs symlinkSync, which on Windows requires Developer
-// Mode (or elevation) — and the AppImage failure mode this file guards is
+// Mode (or elevation), and the AppImage failure mode this file guards is
// Linux-only anyway.
const symlinkOpts = {
skip: process.platform === 'win32' && 'symlinks require Developer Mode on Windows',
@@ -49,7 +49,7 @@ function makeRuntime(root) {
}
test('copyRuntimeTree keeps relative symlinks relative', symlinkOpts, async () => {
- const dir = mkdtempSync(join(tmpdir(), 'modly-runtime-'))
+ const dir = mkdtempSync(join(tmpdir(), 'forge-runtime-'))
const source = join(dir, 'mount', 'python-embed')
const dest = join(dir, 'stable', 'python-embed')
makeRuntime(source)
@@ -71,7 +71,7 @@ test('copyRuntimeTree keeps relative symlinks relative', symlinkOpts, async () =
test('the copy survives the source being deleted', symlinkOpts, async () => {
// This is the actual failure mode: the AppImage mount disappears between
// launches, and every venv built from the copy dies with it.
- const dir = mkdtempSync(join(tmpdir(), 'modly-runtime-'))
+ const dir = mkdtempSync(join(tmpdir(), 'forge-runtime-'))
const source = join(dir, 'mount', 'python-embed')
const dest = join(dir, 'stable', 'python-embed')
makeRuntime(source)
@@ -79,14 +79,14 @@ test('the copy survives the source being deleted', symlinkOpts, async () => {
await copyRuntimeTree(source, dest)
rmSync(join(dir, 'mount'), { recursive: true, force: true })
- // existsSync follows symlinks, so this is false for a dangling link — exactly
+ // existsSync follows symlinks, so this is false for a dangling link, exactly
// the check generator_registry.py's _venv_python(...).exists() performs.
assert.ok(existsSync(join(dest, 'bin', 'python3')), 'bin/python3 is dangling after the source went away')
assert.ok(existsSync(join(dest, 'lib', 'libpython3.11.so')), 'libpython3.11.so is dangling')
})
test('copyRuntimeTree copies regular files and directory structure', symlinkOpts, async () => {
- const dir = mkdtempSync(join(tmpdir(), 'modly-runtime-'))
+ const dir = mkdtempSync(join(tmpdir(), 'forge-runtime-'))
const source = join(dir, 'mount', 'python-embed')
const dest = join(dir, 'stable', 'python-embed')
makeRuntime(source)
diff --git a/apps/forge-desktop/electron/main/copy-runtime.ts b/apps/forge-desktop/electron/main/copy-runtime.ts
index eb062f5cc..cbb2a58dc 100644
--- a/apps/forge-desktop/electron/main/copy-runtime.ts
+++ b/apps/forge-desktop/electron/main/copy-runtime.ts
@@ -2,7 +2,7 @@
* Copying the bundled Python runtime out of an ephemeral AppImage mount.
*
* Kept apart from python-setup.ts (which imports electron) so the symlink
- * behaviour this depends on can be tested — it is subtle, silent when wrong,
+ * behaviour this depends on can be tested, it is subtle, silent when wrong,
* and only shows up on the *next* launch.
*/
@@ -14,7 +14,7 @@ import { cp } from 'fs/promises'
* `verbatimSymlinks` is the whole point. Without it `fs.cp` resolves a relative
* link (`bin/python3 -> python3.11`) into an absolute path pointing back at the
* *source* tree. When the source is an AppImage mount at
- * /tmp/.mount_Modly-XXXXXX/ — which is a different path on every launch — the
+ * /tmp/.mount_three.ws Forge-XXXXXX/, which is a different path on every launch, the
* copy silently keeps a hard dependency on a directory that is about to vanish:
*
* - `bin/python3` in the "stable" copy points into the old mount
diff --git a/apps/forge-desktop/electron/main/extension-install-recovery.test.mjs b/apps/forge-desktop/electron/main/extension-install-recovery.test.mjs
index 81fc77958..fc96a0b02 100644
--- a/apps/forge-desktop/electron/main/extension-install-recovery.test.mjs
+++ b/apps/forge-desktop/electron/main/extension-install-recovery.test.mjs
@@ -20,9 +20,9 @@ import { join, resolve } from 'node:path'
// Windows refuses symlink creation unless the process is elevated or Developer
// Mode is on, so probe once rather than letting the test report an EPERM as a
-// product failure — that turns a stock Windows checkout into a failing suite.
+// product failure, that turns a stock Windows checkout into a failing suite.
const symlinksAvailable = (() => {
- const probe = mkdtempSync(join(tmpdir(), 'modly-symlink-probe-'))
+ const probe = mkdtempSync(join(tmpdir(), 'forge-symlink-probe-'))
try {
symlinkSync(join(probe, 'target'), join(probe, 'link'), 'dir')
return true
@@ -34,7 +34,7 @@ const symlinksAvailable = (() => {
})()
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-recovery-module-')), 'extension-install-recovery.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-recovery-module-')), 'extension-install-recovery.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('electron/main/extension-install-recovery.ts')],
@@ -48,13 +48,13 @@ function loadModule() {
}
test('startup reconciliation removes all orphan incomplete folders, including corrupted names', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-recovery-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-recovery-test-'))
const corrupted = join(root, 'Broken Extension')
const valid = join(root, 'later-extension')
mkdirSync(corrupted)
mkdirSync(valid)
- writeFileSync(join(corrupted, '.modly-incomplete'), 'installing', 'utf8')
- writeFileSync(join(valid, '.modly-incomplete'), 'installing', 'utf8')
+ writeFileSync(join(corrupted, '.forge-incomplete'), 'installing', 'utf8')
+ writeFileSync(join(valid, '.forge-incomplete'), 'installing', 'utf8')
try {
const mod = loadModule()
@@ -68,13 +68,13 @@ test('startup reconciliation removes all orphan incomplete folders, including co
})
test('failed update rollback replaces the unvalidated destination with its backup', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-rollback-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-rollback-test-'))
const destination = join(root, 'pixal3d')
- const backup = join(root, '.modly-backup-pixal3d-100')
+ const backup = join(root, '.forge-backup-pixal3d-100')
mkdirSync(destination)
mkdirSync(backup)
writeFileSync(join(destination, 'version.txt'), 'new-broken', 'utf8')
- writeFileSync(join(destination, '.modly-registration-pending'), 'pending', 'utf8')
+ writeFileSync(join(destination, '.forge-registration-pending'), 'pending', 'utf8')
writeFileSync(join(backup, 'version.txt'), 'old-working', 'utf8')
try {
@@ -83,7 +83,7 @@ test('failed update rollback replaces the unvalidated destination with its backu
assert.deepEqual(result, { ok: true })
assert.equal(readFileSync(join(destination, 'version.txt'), 'utf8'), 'old-working')
- assert.equal(existsSync(join(destination, '.modly-registration-pending')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-pending')), false)
assert.equal(existsSync(backup), false)
} finally {
rmSync(root, { recursive: true, force: true })
@@ -91,14 +91,14 @@ test('failed update rollback replaces the unvalidated destination with its backu
})
test('startup restores a parked version when registration was interrupted', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-pending-recovery-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-pending-recovery-test-'))
const destination = join(root, 'pixal3d')
- const backup = join(root, '.modly-backup-pixal3d-101')
+ const backup = join(root, '.forge-backup-pixal3d-101')
mkdirSync(destination)
mkdirSync(backup)
writeFileSync(join(destination, 'version.txt'), 'new-unvalidated', 'utf8')
writeFileSync(join(backup, 'version.txt'), 'old-working', 'utf8')
- writeFileSync(join(root, '.modly-registration-pending-pixal3d-101'), 'pending', 'utf8')
+ writeFileSync(join(root, '.forge-registration-pending-pixal3d-101'), 'pending', 'utf8')
try {
const mod = loadModule()
@@ -107,7 +107,7 @@ test('startup restores a parked version when registration was interrupted', asyn
assert.equal(readFileSync(join(destination, 'version.txt'), 'utf8'), 'old-working')
assert.equal(existsSync(backup), false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-101')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-101')),
false,
)
} finally {
@@ -116,12 +116,12 @@ test('startup restores a parked version when registration was interrupted', asyn
})
test('update validation keeps pending state hidden from the destination until commit', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-update-validation-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-update-validation-test-'))
const destination = join(root, 'pixal3d')
- const backup = join(root, '.modly-backup-pixal3d-104')
+ const backup = join(root, '.forge-backup-pixal3d-104')
mkdirSync(destination)
mkdirSync(backup)
- writeFileSync(join(destination, '.modly-incomplete'), 'setup', 'utf8')
+ writeFileSync(join(destination, '.forge-incomplete'), 'setup', 'utf8')
try {
const mod = loadModule()
@@ -135,11 +135,11 @@ test('update validation keeps pending state hidden from the destination until co
assert.equal(transaction.validationCapability.destinationName, 'pixal3d')
assert.equal(
transaction.validationCapability.stateName,
- '.modly-registration-pending-pixal3d-104',
+ '.forge-registration-pending-pixal3d-104',
)
assert.ok(transaction.validationCapability.token.length >= 32)
const capabilityStat = statSync(
- join(root, '.modly-registration-pending-pixal3d-104'),
+ join(root, '.forge-registration-pending-pixal3d-104'),
)
assert.equal(capabilityStat.nlink, 1)
if (process.platform !== 'win32') {
@@ -151,11 +151,11 @@ test('update validation keeps pending state hidden from the destination until co
destination,
async () => {
validatorCalled = true
- assert.equal(existsSync(join(destination, '.modly-incomplete')), false)
- assert.equal(existsSync(join(destination, '.modly-registration-pending')), false)
- assert.equal(existsSync(join(backup, '.modly-registration-pending')), false)
+ assert.equal(existsSync(join(destination, '.forge-incomplete')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-pending')), false)
+ assert.equal(existsSync(join(backup, '.forge-registration-pending')), false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-104')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-104')),
true,
)
},
@@ -168,9 +168,9 @@ test('update validation keeps pending state hidden from the destination until co
{ ok: true },
)
assert.equal(existsSync(backup), false)
- assert.equal(existsSync(join(destination, '.modly-registration-validated')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-validated')), false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-104')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-104')),
false,
)
} finally {
@@ -179,9 +179,9 @@ test('update validation keeps pending state hidden from the destination until co
})
test('Repair transaction starts before setup and keeps state outside the destination', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-repair-validation-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-repair-validation-test-'))
const destination = join(root, 'pixal3d')
- const backup = join(root, '.modly-backup-pixal3d-105')
+ const backup = join(root, '.forge-backup-pixal3d-105')
mkdirSync(destination)
mkdirSync(backup)
@@ -199,7 +199,7 @@ test('Repair transaction starts before setup and keeps state outside the destina
quarantine: async () => {
order.push('quarantine')
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-105')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-105')),
true,
)
runtimeLoaded = false
@@ -209,11 +209,11 @@ test('Repair transaction starts before setup and keeps state outside the destina
setupCalled = true
assert.equal(runtimeLoaded, false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-105')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-105')),
true,
)
- assert.equal(existsSync(join(destination, '.modly-registration-pending')), false)
- assert.equal(existsSync(join(backup, '.modly-registration-pending')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-pending')), false)
+ assert.equal(existsSync(join(backup, '.forge-registration-pending')), false)
},
validate: async (validationCapability) => {
order.push('validate')
@@ -221,10 +221,10 @@ test('Repair transaction starts before setup and keeps state outside the destina
assert.equal(validationCapability.extensionId, 'pixal3d')
assert.equal(
validationCapability.stateName,
- '.modly-registration-pending-pixal3d-105',
+ '.forge-registration-pending-pixal3d-105',
)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-105')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-105')),
true,
)
},
@@ -234,7 +234,7 @@ test('Repair transaction starts before setup and keeps state outside the destina
assert.equal(validatorCalled, true)
assert.deepEqual(order, ['quarantine', 'setup', 'validate'])
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-105')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-105')),
false,
)
assert.equal(existsSync(backup), false)
@@ -244,7 +244,7 @@ test('Repair transaction starts before setup and keeps state outside the destina
})
test('Repair setup failure retains pending quarantine and never validates runtime', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-repair-setup-failure-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-repair-setup-failure-test-'))
const destination = join(root, 'pixal3d')
mkdirSync(destination)
@@ -261,7 +261,7 @@ test('Repair setup failure retains pending quarantine and never validates runtim
suffix: '109',
quarantine: async () => {
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-109')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-109')),
true,
)
runtimeLoaded = false
@@ -269,7 +269,7 @@ test('Repair setup failure retains pending quarantine and never validates runtim
setup: async () => {
assert.equal(runtimeLoaded, false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-109')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-109')),
true,
)
throw new Error('setup exploded')
@@ -284,17 +284,17 @@ test('Repair setup failure retains pending quarantine and never validates runtim
assert.equal(validatorCalled, false)
assert.equal(runtimeLoaded, false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-109')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-109')),
true,
)
- assert.equal(existsSync(join(destination, '.modly-registration-pending')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-pending')), false)
} finally {
rmSync(root, { recursive: true, force: true })
}
})
test('Repair validation failure re-evicts partially registered runtime state', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-repair-validation-failure-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-repair-validation-failure-test-'))
const destination = join(root, 'pixal3d')
mkdirSync(destination)
@@ -327,7 +327,7 @@ test('Repair validation failure re-evicts partially registered runtime state', a
assert.equal(quarantineCount, 2)
assert.equal(runtimeLoaded, false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-113')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-113')),
true,
)
} finally {
@@ -336,7 +336,7 @@ test('Repair validation failure re-evicts partially registered runtime state', a
})
test('fresh-install crash keeps a complete destination externally quarantined', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-fresh-crash-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-fresh-crash-test-'))
const destination = join(root, 'pixal3d')
mkdirSync(destination)
writeFileSync(join(destination, 'version.txt'), 'unvalidated', 'utf8')
@@ -354,17 +354,17 @@ test('fresh-install crash keeps a complete destination externally quarantined',
assert.equal(readFileSync(join(destination, 'version.txt'), 'utf8'), 'unvalidated')
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-106')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-106')),
true,
)
- assert.equal(existsSync(join(destination, '.modly-registration-pending')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-pending')), false)
} finally {
rmSync(root, { recursive: true, force: true })
}
})
test('new registration capability replaces older pending attempts without a quarantine gap', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-capability-rotation-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-capability-rotation-test-'))
const destination = join(root, 'pixal3d')
mkdirSync(destination)
@@ -388,11 +388,11 @@ test('new registration capability replaces older pending attempts without a quar
second.validationCapability.token,
)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-111')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-111')),
false,
)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-112')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-112')),
true,
)
} finally {
@@ -401,8 +401,8 @@ test('new registration capability replaces older pending attempts without a quar
})
test('registration capability creation never overwrites a pre-existing sidecar', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-capability-exclusive-test-'))
- const statePath = join(root, '.modly-registration-pending-pixal3d-114')
+ const root = mkdtempSync(join(tmpdir(), 'forge-capability-exclusive-test-'))
+ const statePath = join(root, '.forge-registration-pending-pixal3d-114')
writeFileSync(statePath, 'pre-existing', 'utf8')
if (process.platform !== 'win32') chmodSync(statePath, 0o644)
@@ -425,9 +425,9 @@ test('registration capability creation never overwrites a pre-existing sidecar',
})
test('registration capability creation rejects a hard-linked target', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-capability-hardlink-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-capability-hardlink-test-'))
const original = join(root, 'original')
- const statePath = join(root, '.modly-registration-pending-pixal3d-115')
+ const statePath = join(root, '.forge-registration-pending-pixal3d-115')
writeFileSync(original, 'pre-existing', 'utf8')
linkSync(original, statePath)
@@ -448,7 +448,7 @@ test('registration capability creation rejects a hard-linked target', async () =
})
test('no-backup Repair failure preserves external quarantine state', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-repair-failure-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-repair-failure-test-'))
const destination = join(root, 'pixal3d')
mkdirSync(destination)
@@ -460,17 +460,17 @@ test('no-backup Repair failure preserves external quarantine state', async () =>
)
const pendingNames = readdirSync(root).filter((name) =>
- name.startsWith('.modly-registration-pending-pixal3d-'),
+ name.startsWith('.forge-registration-pending-pixal3d-'),
)
assert.equal(pendingNames.length, 1)
- assert.equal(existsSync(join(destination, '.modly-registration-pending')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-pending')), false)
} finally {
rmSync(root, { recursive: true, force: true })
}
})
test('failed local registration validation persists quarantine for restart', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-local-validation-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-local-validation-test-'))
const destination = join(root, 'pixal3d')
mkdirSync(destination)
@@ -488,7 +488,7 @@ test('failed local registration validation persists quarantine for restart', asy
quarantine: async () => {
quarantineCount += 1
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-110')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-110')),
true,
)
runtimeLoaded = false
@@ -496,7 +496,7 @@ test('failed local registration validation persists quarantine for restart', asy
activate: async () => {
assert.equal(runtimeLoaded, false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-110')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-110')),
true,
)
},
@@ -515,17 +515,17 @@ test('failed local registration validation persists quarantine for restart', asy
assert.equal(quarantineCount, 2)
assert.equal(
receivedCapability.stateName,
- '.modly-registration-pending-pixal3d-110',
+ '.forge-registration-pending-pixal3d-110',
)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-110')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-110')),
true,
)
await mod.reconcileInterruptedExtensionInstalls(root)
assert.equal(existsSync(destination), true)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-110')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-110')),
true,
)
} finally {
@@ -534,7 +534,7 @@ test('failed local registration validation persists quarantine for restart', asy
})
test('local link transaction creates quarantine before any destination mutation', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-local-ordering-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-local-ordering-test-'))
try {
const mod = loadModule()
@@ -551,7 +551,7 @@ test('local link transaction creates quarantine before any destination mutation'
},
activate: async () => {
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-116')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-116')),
true,
)
order.push('mutate-link')
@@ -567,7 +567,7 @@ test('local link transaction creates quarantine before any destination mutation'
assert.deepEqual(order, ['quarantine', 'mutate-link', 'quarantine'])
assert.equal(validatorCalled, false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-116')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-116')),
true,
)
} finally {
@@ -576,14 +576,14 @@ test('local link transaction creates quarantine before any destination mutation'
})
test('uninstall removes backups before the destination so restart cannot resurrect it', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-uninstall-recovery-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-uninstall-recovery-test-'))
const destination = join(root, 'pixal3d')
- const backup = join(root, '.modly-backup-pixal3d-102')
+ const backup = join(root, '.forge-backup-pixal3d-102')
mkdirSync(destination)
mkdirSync(backup)
writeFileSync(join(destination, 'version.txt'), 'current', 'utf8')
writeFileSync(join(backup, 'version.txt'), 'previous', 'utf8')
- writeFileSync(join(root, '.modly-registration-pending-pixal3d-102'), 'pending', 'utf8')
+ writeFileSync(join(root, '.forge-registration-pending-pixal3d-102'), 'pending', 'utf8')
try {
const mod = loadModule()
@@ -593,7 +593,7 @@ test('uninstall removes backups before the destination so restart cannot resurre
assert.equal(existsSync(destination), false)
assert.equal(existsSync(backup), false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-102')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-102')),
false,
)
@@ -605,15 +605,15 @@ test('uninstall removes backups before the destination so restart cannot resurre
})
test('startup completes validated backup cleanup without replacing the destination', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-validated-cleanup-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-validated-cleanup-test-'))
const destination = join(root, 'pixal3d')
- const backup = join(root, '.modly-backup-pixal3d-103')
+ const backup = join(root, '.forge-backup-pixal3d-103')
mkdirSync(destination)
mkdirSync(backup)
writeFileSync(join(destination, 'version.txt'), 'new-working', 'utf8')
writeFileSync(join(backup, 'version.txt'), 'old-working', 'utf8')
- writeFileSync(join(root, '.modly-registration-pending-pixal3d-103'), 'pending', 'utf8')
- writeFileSync(join(root, '.modly-registration-validated-pixal3d-104'), 'validated', 'utf8')
+ writeFileSync(join(root, '.forge-registration-pending-pixal3d-103'), 'pending', 'utf8')
+ writeFileSync(join(root, '.forge-registration-validated-pixal3d-104'), 'validated', 'utf8')
try {
const mod = loadModule()
@@ -621,9 +621,9 @@ test('startup completes validated backup cleanup without replacing the destinati
assert.equal(readFileSync(join(destination, 'version.txt'), 'utf8'), 'new-working')
assert.equal(existsSync(backup), false)
- assert.equal(existsSync(join(destination, '.modly-registration-validated')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-validated')), false)
assert.equal(
- readdirSync(root).some((name) => name.startsWith('.modly-registration-')),
+ readdirSync(root).some((name) => name.startsWith('.forge-registration-')),
false,
)
} finally {
@@ -632,13 +632,13 @@ test('startup completes validated backup cleanup without replacing the destinati
})
test('destination validated marker cannot authorize deletion of an uncommitted backup', async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-forged-validated-test-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-forged-validated-test-'))
const destination = join(root, 'pixal3d')
- const backup = join(root, '.modly-backup-pixal3d-107')
+ const backup = join(root, '.forge-backup-pixal3d-107')
mkdirSync(destination)
mkdirSync(backup)
writeFileSync(join(destination, 'version.txt'), 'unvalidated', 'utf8')
- writeFileSync(join(destination, '.modly-registration-validated'), 'packaged', 'utf8')
+ writeFileSync(join(destination, '.forge-registration-validated'), 'packaged', 'utf8')
writeFileSync(join(backup, 'version.txt'), 'old-working', 'utf8')
try {
@@ -647,7 +647,7 @@ test('destination validated marker cannot authorize deletion of an uncommitted b
assert.equal(readFileSync(join(destination, 'version.txt'), 'utf8'), 'unvalidated')
assert.equal(readFileSync(join(backup, 'version.txt'), 'utf8'), 'old-working')
- assert.equal(existsSync(join(destination, '.modly-registration-validated')), false)
+ assert.equal(existsSync(join(destination, '.forge-registration-validated')), false)
} finally {
rmSync(root, { recursive: true, force: true })
}
@@ -658,10 +658,10 @@ test('registration transaction state never writes through a symlinked backup', {
? false
: 'symlink creation needs elevation or Developer Mode on this platform',
}, async () => {
- const root = mkdtempSync(join(tmpdir(), 'modly-symlink-state-test-'))
- const source = mkdtempSync(join(tmpdir(), 'modly-linked-source-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-symlink-state-test-'))
+ const source = mkdtempSync(join(tmpdir(), 'forge-linked-source-'))
const destination = join(root, 'pixal3d')
- const backup = join(root, '.modly-backup-pixal3d-108')
+ const backup = join(root, '.forge-backup-pixal3d-108')
mkdirSync(destination)
symlinkSync(source, backup, 'dir')
@@ -674,9 +674,9 @@ test('registration transaction state never writes through a symlinked backup', {
)
assert.equal(transaction.ok, true)
- assert.equal(existsSync(join(source, '.modly-registration-pending')), false)
+ assert.equal(existsSync(join(source, '.forge-registration-pending')), false)
assert.equal(
- existsSync(join(root, '.modly-registration-pending-pixal3d-108')),
+ existsSync(join(root, '.forge-registration-pending-pixal3d-108')),
true,
)
@@ -685,7 +685,7 @@ test('registration transaction state never writes through a symlinked backup', {
{ ok: true },
)
assert.equal(existsSync(source), true)
- assert.equal(existsSync(join(source, '.modly-registration-pending')), false)
+ assert.equal(existsSync(join(source, '.forge-registration-pending')), false)
} finally {
rmSync(root, { recursive: true, force: true })
rmSync(source, { recursive: true, force: true })
diff --git a/apps/forge-desktop/electron/main/extension-install-recovery.ts b/apps/forge-desktop/electron/main/extension-install-recovery.ts
index 58add1bac..45e355cbd 100644
--- a/apps/forge-desktop/electron/main/extension-install-recovery.ts
+++ b/apps/forge-desktop/electron/main/extension-install-recovery.ts
@@ -412,7 +412,7 @@ export async function runExtensionRepairTransaction(
)
if (!quarantined.ok) {
throw new Error(
- `Runtime registration failed, and Modly could not preserve quarantine `
+ `Runtime registration failed, and three.ws Forge could not preserve quarantine `
+ `during ${quarantined.stage}: ${String(quarantined.error)}. `
+ `Original failure: ${String(registrationError)}`,
)
@@ -421,7 +421,7 @@ export async function runExtensionRepairTransaction(
await options.quarantine()
} catch (runtimeQuarantineError) {
throw new Error(
- `Runtime registration failed, and Modly preserved filesystem quarantine but `
+ `Runtime registration failed, and three.ws Forge preserved filesystem quarantine but `
+ `could not evict partially registered runtime state: `
+ `${String(runtimeQuarantineError)}. Original failure: ${String(registrationError)}`,
)
@@ -436,9 +436,9 @@ export async function runExtensionRepairTransaction(
)
if (!cleaned.ok) {
throw new Error(
- `Runtime registration succeeded, but Modly could not finish removing the previous `
+ `Runtime registration succeeded, but three.ws Forge could not finish removing the previous `
+ `extension backup during ${cleaned.stage}: ${String(cleaned.error)}. `
- + `Restart Modly to retry the validated cleanup.`,
+ + `Restart three.ws Forge to retry the validated cleanup.`,
)
}
}
@@ -480,7 +480,7 @@ export async function runExtensionRegistrationValidationTransaction(
)
if (!quarantined.ok) {
throw new Error(
- `Runtime registration failed, and Modly could not preserve quarantine `
+ `Runtime registration failed, and three.ws Forge could not preserve quarantine `
+ `during ${quarantined.stage}: ${String(quarantined.error)}. `
+ `Original failure: ${String(registrationError)}`,
)
@@ -489,7 +489,7 @@ export async function runExtensionRegistrationValidationTransaction(
await options.quarantine()
} catch (runtimeQuarantineError) {
throw new Error(
- `Runtime registration failed, and Modly preserved filesystem quarantine but `
+ `Runtime registration failed, and three.ws Forge preserved filesystem quarantine but `
+ `could not evict partially registered runtime state: `
+ `${String(runtimeQuarantineError)}. Original failure: ${String(registrationError)}`,
)
@@ -504,9 +504,9 @@ export async function runExtensionRegistrationValidationTransaction(
)
if (!cleaned.ok) {
throw new Error(
- `Runtime registration succeeded, but Modly could not finish transaction cleanup `
+ `Runtime registration succeeded, but three.ws Forge could not finish transaction cleanup `
+ `during ${cleaned.stage}: ${String(cleaned.error)}. `
- + `Restart Modly to retry the validated cleanup.`,
+ + `Restart three.ws Forge to retry the validated cleanup.`,
)
}
}
diff --git a/apps/forge-desktop/electron/main/extension-install-utils.test.mjs b/apps/forge-desktop/electron/main/extension-install-utils.test.mjs
index ec192d713..76d1a48a6 100644
--- a/apps/forge-desktop/electron/main/extension-install-utils.test.mjs
+++ b/apps/forge-desktop/electron/main/extension-install-utils.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-ext-test-')), 'extension-install-utils.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-ext-test-')), 'extension-install-utils.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('electron/main/extension-install-utils.ts')],
diff --git a/apps/forge-desktop/electron/main/extension-path-guard.test.ts b/apps/forge-desktop/electron/main/extension-path-guard.test.ts
index 58bcdafb1..369c05adf 100644
--- a/apps/forge-desktop/electron/main/extension-path-guard.test.ts
+++ b/apps/forge-desktop/electron/main/extension-path-guard.test.ts
@@ -40,7 +40,7 @@ test('resolveExtensionPathWithinRoot confines paths to root', async () => {
test('resolvePathWithinRoot rejects canonical escapes', async () => {
const { resolvePathWithinRoot } = await loadGuard()
const root = path.join('/tmp', 'extensions-root')
- assert.equal(resolvePathWithinRoot(root, '.modly-backup-safe-123'), path.resolve(root, '.modly-backup-safe-123'))
+ assert.equal(resolvePathWithinRoot(root, '.forge-backup-safe-123'), path.resolve(root, '.forge-backup-safe-123'))
assert.throws(() => resolvePathWithinRoot(root, '../escape'), /escapes root/i)
})
@@ -53,23 +53,23 @@ test('resolvePathWithinRoot rejects leaves that resolve to the root itself', asy
test('parseExtensionBackupName extracts ids with dashes and rejects foreign names', async () => {
const { parseExtensionBackupName } = await loadGuard()
- assert.deepEqual(parseExtensionBackupName('.modly-backup-hunyuan3d-mini-1752580000000'), { extensionId: 'hunyuan3d-mini' })
- assert.deepEqual(parseExtensionBackupName('.modly-backup-x-1'), { extensionId: 'x' })
- assert.equal(parseExtensionBackupName('.modly-backup-noTimestamp'), null)
- assert.equal(parseExtensionBackupName('.modly-staging-x-1'), null)
+ assert.deepEqual(parseExtensionBackupName('.forge-backup-hunyuan3d-mini-1752580000000'), { extensionId: 'hunyuan3d-mini' })
+ assert.deepEqual(parseExtensionBackupName('.forge-backup-x-1'), { extensionId: 'x' })
+ assert.equal(parseExtensionBackupName('.forge-backup-noTimestamp'), null)
+ assert.equal(parseExtensionBackupName('.forge-staging-x-1'), null)
assert.equal(parseExtensionBackupName('regular-extension'), null)
})
test('buildExtensionBackupPath stays within root and rejects unsafe ids', async () => {
const { buildExtensionBackupPath } = await loadGuard()
const root = path.join('/tmp', 'extensions-root')
- assert.equal(buildExtensionBackupPath(root, 'mesh-process', '123'), path.resolve(root, '.modly-backup-mesh-process-123'))
+ assert.equal(buildExtensionBackupPath(root, 'mesh-process', '123'), path.resolve(root, '.forge-backup-mesh-process-123'))
assert.throws(() => buildExtensionBackupPath(root, '../escape', '123'), /path separators/i)
})
test('buildExtensionStagingPath stays within root and rejects unsafe ids', async () => {
const { buildExtensionStagingPath } = await loadGuard()
const root = path.join('/tmp', 'extensions-root')
- assert.equal(buildExtensionStagingPath(root, 'mesh-process', '42'), path.resolve(root, '.modly-staging-mesh-process-42'))
+ assert.equal(buildExtensionStagingPath(root, 'mesh-process', '42'), path.resolve(root, '.forge-staging-mesh-process-42'))
assert.throws(() => buildExtensionStagingPath(root, '../escape', '42'), /path separators/i)
})
diff --git a/apps/forge-desktop/electron/main/extension-path-guard.ts b/apps/forge-desktop/electron/main/extension-path-guard.ts
index 427b03e6c..1a202bccd 100644
--- a/apps/forge-desktop/electron/main/extension-path-guard.ts
+++ b/apps/forge-desktop/electron/main/extension-path-guard.ts
@@ -37,7 +37,7 @@ export function resolvePathWithinRoot(rootDir: string, unsafeLeaf: string): stri
const normalizedRelative = relative(resolvedRoot, resolvedCandidate).replace(/\\/g, '/')
// An empty relative path means the leaf resolved to the root itself ('', '.')
- // — never a valid child, and catastrophic for deletion call sites.
+ //, never a valid child, and catastrophic for deletion call sites.
if (normalizedRelative === '' || normalizedRelative === '..' || normalizedRelative.startsWith('../') || isAbsolute(normalizedRelative)) {
throw new Error(`Resolved path escapes root: ${unsafeLeaf}`)
}
@@ -54,17 +54,16 @@ export function resolveExtensionPathWithinRoot(rootDir: string, extensionId: unk
// for install machinery: staging copies, backups of the previous version.
// Both the Electron and Python discovery sides must skip them.
-export const EXT_BACKUP_PREFIX = '.modly-backup-'
-export const EXT_STAGING_PREFIX = '.modly-staging-'
-// Marker file inside an extension folder while its setup is still running —
-// presence after a crash means the install never completed.
-export const EXT_INCOMPLETE_MARKER = '.modly-incomplete'
+export const EXT_BACKUP_PREFIX = '.forge-backup-'
+export const EXT_STAGING_PREFIX = '.forge-staging-'
+// Marker file inside an extension folder while its setup is still running,// presence after a crash means the install never completed.
+export const EXT_INCOMPLETE_MARKER = '.forge-incomplete'
// Reserved basename for registration-pending state. Active transactions append
// "-<extension-id>-<timestamp>" and live beside extension folders so linked
// source trees are never mutated.
-export const EXT_REGISTRATION_PENDING_MARKER = '.modly-registration-pending'
+export const EXT_REGISTRATION_PENDING_MARKER = '.forge-registration-pending'
// Reserved basename for the matching validated transaction commit marker.
-export const EXT_VALIDATED_MARKER = '.modly-registration-validated'
+export const EXT_VALIDATED_MARKER = '.forge-registration-validated'
export function isInternalExtensionDirName(name: string): boolean {
return name.startsWith('.')
@@ -76,7 +75,7 @@ export function buildExtensionBackupPath(rootDir: string, extensionId: unknown,
}
// A backup dir is the previous version of an extension, parked during an
-// install swap. Its name embeds the extension id: .modly-backup-<id>-<ts>.
+// install swap. Its name embeds the extension id: .forge-backup-<id>-<ts>.
// Ids may contain '-', so strip the numeric timestamp suffix, not a naive split.
export function parseExtensionBackupName(name: string): { extensionId: string } | null {
if (!name.startsWith(EXT_BACKUP_PREFIX)) return null
diff --git a/apps/forge-desktop/electron/main/gpu-detect.test.mjs b/apps/forge-desktop/electron/main/gpu-detect.test.mjs
index 3746da5c0..4f88f63c4 100644
--- a/apps/forge-desktop/electron/main/gpu-detect.test.mjs
+++ b/apps/forge-desktop/electron/main/gpu-detect.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-gpu-test-')), 'gpu-detect.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-gpu-test-')), 'gpu-detect.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('electron/main/gpu-detect.ts')],
@@ -52,7 +52,7 @@ test('parseKfdGfxTarget skips the CPU node and reads the first GPU', () => {
test('parseKfdGfxTarget prefers the discrete GPU over an APU', () => {
// Ryzen 7840 (gfx1103, 24 SIMDs) + RX 7900 XTX (gfx1100, 384 SIMDs): the APU
- // gets the lower node number, but gfx1103 has no published wheels — the card
+ // gets the lower node number, but gfx1103 has no published wheels, the card
// with more SIMDs is the one the user bought for this.
const cpuNode = 'cpu_cores_count 16\nsimd_count 0\ngfx_target_version 0\n'
const apuNode = 'cpu_cores_count 0\nsimd_count 24\ngfx_target_version 110003\n'
@@ -127,7 +127,7 @@ test('resolveWindowsGfxTarget maps device ids by silicon, not by marketing range
assert.equal(target('7550'), 'gfx1201') // Navi 48
assert.equal(target('744C'), 'gfx1100') // Navi 31, uppercase from WMI
assert.equal(target('747e'), 'gfx1101') // Navi 32
- // 0x73f0 sells as "RX 7600M XT" but is Navi 33 — it must not land with its
+ // 0x73f0 sells as "RX 7600M XT" but is Navi 33, it must not land with its
// 0x73xx RDNA2 neighbours.
assert.equal(target('73f0'), 'gfx1102')
assert.equal(target('73bf'), 'gfx1030') // Navi 21
@@ -167,10 +167,10 @@ test('resolveRocmTorchSpec uses AMD\'s index with a device extra on Windows', ()
])
})
-test('resolveRocmTorchSpec honours MODLY_ROCM_INDEX and MODLY_ROCM_TORCH_SPEC', () => {
+test('resolveRocmTorchSpec honours THREEWS_ROCM_INDEX and THREEWS_ROCM_TORCH_SPEC', () => {
const rolledBack = mod.resolveRocmTorchSpec('linux', 'gfx1200', {
- MODLY_ROCM_INDEX: 'https://download.pytorch.org/whl/rocm6.4',
- MODLY_ROCM_TORCH_SPEC: 'torch==2.8.0 torchvision==0.23.0',
+ THREEWS_ROCM_INDEX: 'https://download.pytorch.org/whl/rocm6.4',
+ THREEWS_ROCM_TORCH_SPEC: 'torch==2.8.0 torchvision==0.23.0',
})
assert.equal(rolledBack.indexUrl, 'https://download.pytorch.org/whl/rocm6.4')
assert.deepEqual(rolledBack.specs, ['torch==2.8.0', 'torchvision==0.23.0'])
@@ -199,7 +199,7 @@ test('detectGpuInfo keeps Apple Silicon on MPS', async () => {
test('detectGpuInfo forced to rocm resolves wheels without probing hardware', async () => {
const info = await mod.detectGpuInfo({
- env: { MODLY_TORCH_FLAVOR: 'rocm', MODLY_ROCM_GFX: 'gfx1201' },
+ env: { THREEWS_TORCH_FLAVOR: 'rocm', THREEWS_ROCM_GFX: 'gfx1201' },
platform: 'linux',
arch: 'x64',
})
@@ -214,7 +214,7 @@ test('detectGpuInfo forced to rocm resolves wheels without probing hardware', as
test('detectGpuInfo forced to rocm overrides MPS on Apple Silicon', async () => {
const info = await mod.detectGpuInfo({
- env: { MODLY_TORCH_FLAVOR: 'rocm', MODLY_ROCM_GFX: 'gfx1200' },
+ env: { THREEWS_TORCH_FLAVOR: 'rocm', THREEWS_ROCM_GFX: 'gfx1200' },
platform: 'darwin',
arch: 'arm64',
})
@@ -224,7 +224,7 @@ test('detectGpuInfo forced to rocm overrides MPS on Apple Silicon', async () =>
test('detectGpuInfo forced to cuda overrides MPS on Apple Silicon', async () => {
// The override has to beat every probe, the darwin/arm64 default included.
const info = await mod.detectGpuInfo({
- env: { MODLY_TORCH_FLAVOR: 'cuda' },
+ env: { THREEWS_TORCH_FLAVOR: 'cuda' },
platform: 'darwin',
arch: 'arm64',
})
@@ -233,7 +233,7 @@ test('detectGpuInfo forced to cuda overrides MPS on Apple Silicon', async () =>
test('detectGpuInfo forced to cpu short-circuits everything', async () => {
const info = await mod.detectGpuInfo({
- env: { MODLY_TORCH_FLAVOR: 'cpu', MODLY_ROCM_GFX: 'gfx1200' },
+ env: { THREEWS_TORCH_FLAVOR: 'cpu', THREEWS_ROCM_GFX: 'gfx1200' },
platform: 'linux',
arch: 'x64',
})
@@ -243,11 +243,11 @@ test('detectGpuInfo forced to cpu short-circuits everything', async () => {
test('detectGpuInfo falls back to CPU when forced to rocm on Windows with no target', async () => {
const logs = []
const info = await mod.detectGpuInfo({
- env: { MODLY_TORCH_FLAVOR: 'rocm' },
+ env: { THREEWS_TORCH_FLAVOR: 'rocm' },
platform: 'win32',
arch: 'x64',
onLog: (line) => logs.push(line),
})
assert.equal(info.accelerator, 'cpu')
- assert.ok(logs.some((l) => l.includes('MODLY_ROCM_GFX')))
+ assert.ok(logs.some((l) => l.includes('THREEWS_ROCM_GFX')))
})
diff --git a/apps/forge-desktop/electron/main/gpu-detect.ts b/apps/forge-desktop/electron/main/gpu-detect.ts
index 44ca4531d..3fdce6970 100644
--- a/apps/forge-desktop/electron/main/gpu-detect.ts
+++ b/apps/forge-desktop/electron/main/gpu-detect.ts
@@ -4,7 +4,7 @@
* Deliberately free of electron imports: the parsing and resolution helpers are
* pure and get unit-tested by bundling this file directly (gpu-detect.test.mjs).
*
- * Modly never installs PyTorch itself — each extension's setup.py does, from an
+ * three.ws Forge never installs PyTorch itself, each extension's setup.py does, from an
* index it picks on its own. What we produce here is the information that lets
* that choice land on the right wheels: the accelerator, and for AMD the ROCm
* compute target plus the pip index/requirements the setup must end up using.
@@ -40,7 +40,7 @@ const ROCM_LINUX_INDEX = 'https://download.pytorch.org/whl/rocm7.2'
const ROCM_WINDOWS_INDEX = 'https://repo.amd.com/rocm/whl-multi-arch/'
// Pinned because AMD's index carries several ROCm builds side by side; this is
-// the newest pair published for cp311 (Modly's embedded Python) on Windows.
+// the newest pair published for cp311 (three.ws Forge's embedded Python) on Windows.
const ROCM_WINDOWS_TORCH = '2.11.0+rocm7.14.0'
const ROCM_WINDOWS_TORCHVISION = '0.26.0+rocm7.14.0'
@@ -128,7 +128,7 @@ export function formatGfxTarget(version: number): string | null {
* Node 0 is the CPU node (simd_count 0) and is skipped. Among GPU nodes the
* largest simd_count wins: on an APU + dGPU machine the APU commonly gets the
* lower node number, and its gfx target (e.g. gfx1103) often has no published
- * wheels — the discrete card is always the one with more SIMDs.
+ * wheels: the discrete card is always the one with more SIMDs.
*/
export function parseKfdGfxTarget(nodeProperties: string[]): string | null {
let best: { target: string; simdCount: number } | null = null
@@ -202,8 +202,8 @@ export function resolveWindowsGfxTarget(
/**
* The pip index and requirements an extension's torch install has to end up
- * using on this platform. `MODLY_ROCM_INDEX` and `MODLY_ROCM_TORCH_SPEC`
- * (space-separated requirements) override either half — the escape hatch when a
+ * using on this platform. `THREEWS_ROCM_INDEX` and `THREEWS_ROCM_TORCH_SPEC`
+ * (space-separated requirements) override either half, the escape hatch when a
* newer torch breaks an extension and you need to drop back to, say, rocm6.4.
*/
export function resolveRocmTorchSpec(
@@ -211,8 +211,8 @@ export function resolveRocmTorchSpec(
gfxTarget: string | null,
env: NodeJS.ProcessEnv = process.env,
): { indexUrl: string; specs: string[] } {
- const indexOverride = env['MODLY_ROCM_INDEX']?.trim()
- const specOverride = env['MODLY_ROCM_TORCH_SPEC']?.trim()
+ const indexOverride = env['THREEWS_ROCM_INDEX']?.trim()
+ const specOverride = env['THREEWS_ROCM_TORCH_SPEC']?.trim()
const isWindows = platform === 'win32'
const indexUrl = indexOverride || (isWindows ? ROCM_WINDOWS_INDEX : ROCM_LINUX_INDEX)
@@ -258,7 +258,7 @@ function cpuInfo(): GpuInfo {
/**
* AMD keeps sm/cudaVersion at 0 on purpose. Extensions that predate `torch_flavor`
* branch on those two numbers, and 0 sends them down their most conservative
- * path — which also keeps them off `rembg[gpu]`, whose onnxruntime-gpu is
+ * path: which also keeps them off `rembg[gpu]`, whose onnxruntime-gpu is
* CUDA-only. Their torch install is then corrected by the ROCm setup shim.
*/
function rocmInfo(
@@ -278,7 +278,7 @@ function rocmInfo(
}
function readFlavorOverride(env: NodeJS.ProcessEnv): TorchFlavor | null {
- const raw = env['MODLY_TORCH_FLAVOR']?.trim().toLowerCase()
+ const raw = env['THREEWS_TORCH_FLAVOR']?.trim().toLowerCase()
return raw === 'cuda' || raw === 'rocm' || raw === 'cpu' ? raw : null
}
@@ -297,7 +297,7 @@ function queryNvidiaSmi(): Promise<{ sm: number; cudaVersion: number } | null> {
/**
* Reads the compute target straight out of the kernel's KFD topology. This
- * needs no ROCm installation and no external binary — the amdgpu driver alone
+ * needs no ROCm installation and no external binary, the amdgpu driver alone
* publishes it, which is exactly the state of a machine that has only ever run
* PyTorch ROCm wheels (they bundle their own runtime).
*/
@@ -345,14 +345,14 @@ export async function detectGpuInfo(options: DetectOptions = {}): Promise<GpuInf
const log = options.onLog ?? (() => {})
const forced = readFlavorOverride(env)
- if (forced) log(`[gpu-detect] MODLY_TORCH_FLAVOR=${forced} — skipping auto-detection`)
+ if (forced) log(`[gpu-detect] THREEWS_TORCH_FLAVOR=${forced}, skipping auto-detection`)
if (forced === 'cpu') return cpuInfo()
if (forced === 'rocm') {
const { gfxTarget } = await resolveGfxTarget(env, platform)
if (!gfxTarget && platform === 'win32') {
- log('[gpu-detect] ROCm forced on Windows but no compute target found — set MODLY_ROCM_GFX (e.g. gfx1200)')
+ log('[gpu-detect] ROCm forced on Windows but no compute target found, set THREEWS_ROCM_GFX (e.g. gfx1200)')
return cpuInfo()
}
return rocmInfo(gfxTarget, platform, env)
@@ -377,14 +377,14 @@ export async function detectGpuInfo(options: DetectOptions = {}): Promise<GpuInf
const { gfxTarget, amdAdapters } = await resolveGfxTarget(env, platform)
if (gfxTarget) {
- log(`[gpu-detect] AMD GPU detected — compute target ${gfxTarget}`)
+ log(`[gpu-detect] AMD GPU detected, compute target ${gfxTarget}`)
return rocmInfo(gfxTarget, platform, env)
}
if (amdAdapters.length > 0) {
log(
`[gpu-detect] AMD GPU found (${amdAdapters.join(', ')}) but its ROCm compute target is unknown. ` +
- 'Falling back to CPU — set MODLY_ROCM_GFX (e.g. gfx1201) to force one.',
+ 'Falling back to CPU, set THREEWS_ROCM_GFX (e.g. gfx1201) to force one.',
)
}
@@ -399,7 +399,7 @@ async function resolveGfxTarget(
env: NodeJS.ProcessEnv,
platform: string,
): Promise<{ gfxTarget: string | null; amdAdapters: string[] }> {
- const override = env['MODLY_ROCM_GFX']?.trim()
+ const override = env['THREEWS_ROCM_GFX']?.trim()
if (override) return { gfxTarget: override, amdAdapters: [] }
if (platform === 'linux') return { gfxTarget: readKfdGfxTarget(), amdAdapters: [] }
if (platform === 'win32') return resolveWindowsGfxTarget(await queryWindowsVideoControllers())
diff --git a/apps/forge-desktop/electron/main/hf-token.ts b/apps/forge-desktop/electron/main/hf-token.ts
index 2ea9061af..55896fa94 100644
--- a/apps/forge-desktop/electron/main/hf-token.ts
+++ b/apps/forge-desktop/electron/main/hf-token.ts
@@ -32,17 +32,17 @@ export function initHfToken(userData: string): string {
const decrypted = decryptSecretSync(stored)
if (decrypted === null) {
// One of our blobs, but not decryptable here (different OS user/machine).
- // Leave settings.json alone — rewriting would turn an unreadable-but-intact
- // blob into a permanently lost one — and expose no token rather than
+ // Leave settings.json alone: rewriting would turn an unreadable-but-intact
+ // blob into a permanently lost one, and expose no token rather than
// handing the ciphertext out as a credential.
cached = ''
- logger.error('[hf-token] the stored Hugging Face token could not be decrypted — re-enter it in Settings → Integrations')
+ logger.error('[hf-token] the stored Hugging Face token could not be decrypted, re-enter it in Settings → Integrations')
return cached
}
cached = decrypted
// An unchanged value means it was never encrypted (saved before encryption
- // existed) — upgrade it in place.
+ // existed), upgrade it in place.
if (cached === stored) {
try {
setSettings(userData, { hfToken: encryptSecretSync(cached) })
diff --git a/apps/forge-desktop/electron/main/index.ts b/apps/forge-desktop/electron/main/index.ts
index 2f3f5b83c..031597ffc 100644
--- a/apps/forge-desktop/electron/main/index.ts
+++ b/apps/forge-desktop/electron/main/index.ts
@@ -26,7 +26,7 @@ function createWindow(): void {
minHeight: 600,
show: false,
frame: false,
- backgroundColor: '#111113',
+ backgroundColor: '#0a0a0a',
titleBarStyle: 'hidden',
icon: join(__dirname, '../../resources/icons/icon.png'),
webPreferences: {
@@ -42,7 +42,7 @@ function createWindow(): void {
mainWindow?.show()
})
- // Keep the renderer's maximize/restore icon in sync — covers the toolbar
+ // Keep the renderer's maximize/restore icon in sync, covers the toolbar
// button, double-clicking the title bar, and OS window-snap gestures.
mainWindow.on('maximize', () => mainWindow?.webContents.send('window:maximizeChanged', true))
mainWindow.on('unmaximize', () => mainWindow?.webContents.send('window:maximizeChanged', false))
@@ -75,7 +75,7 @@ function createWindow(): void {
}
}
-app.setName('Modly')
+app.setName('three.ws Forge')
process.on('uncaughtException', (err) => {
if ((err as NodeJS.ErrnoException).code === 'EPIPE') return
@@ -91,8 +91,8 @@ process.on('unhandledRejection', (reason) => {
app.whenReady().then(async () => {
archiveCurrentSession()
- logger.info(`App started — version ${app.getVersion()}`)
- electronApp.setAppUserModelId('com.modly.app')
+ logger.info(`App started, version ${app.getVersion()}`)
+ electronApp.setAppUserModelId('ws.three.forge')
// Clear Chromium disk cache on startup to recover from any corruption
await session.defaultSession.clearCache()
@@ -127,7 +127,7 @@ app.whenReady().then(async () => {
})
app.on('window-all-closed', () => {
- // Modly holds a multi-GB Python subprocess; leaving it running in the
+ // three.ws Forge holds a multi-GB Python subprocess; leaving it running in the
// Dock after the window closes (the Mac default) is the wrong behavior
// for this app. Closing the window means quit.
app.quit()
diff --git a/apps/forge-desktop/electron/main/ipc-handlers.ts b/apps/forge-desktop/electron/main/ipc-handlers.ts
index e9cac040b..5a271ee54 100644
--- a/apps/forge-desktop/electron/main/ipc-handlers.ts
+++ b/apps/forge-desktop/electron/main/ipc-handlers.ts
@@ -137,9 +137,9 @@ function runExtensionSetup(
env: {
...process.env,
PIP_CACHE_DIR: pipCacheDir,
- MODLY_TORCH_FLAVOR: torchFlavor,
- MODLY_TORCH_INDEX_URL: gpu.torchIndexUrl ?? '',
- MODLY_TORCH_SPECS: JSON.stringify(gpu.torchSpecs ?? []),
+ THREEWS_TORCH_FLAVOR: torchFlavor,
+ THREEWS_TORCH_INDEX_URL: gpu.torchIndexUrl ?? '',
+ THREEWS_TORCH_SPECS: JSON.stringify(gpu.torchSpecs ?? []),
},
})
@@ -162,7 +162,7 @@ function runExtensionSetup(
}
// Extension ids with an install currently in flight. Their folder carries the
-// incomplete marker during setup — extensions:list must not report it as
+// incomplete marker during setup, extensions:list must not report it as
// corrupted while the install is legitimately running.
const activeExtensionInstalls = new Set<string>()
const rmWithRetry = (path: string, label: string) =>
@@ -227,11 +227,11 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
const LOCKED_MODEL_FILES_ERROR = 'Model files are still locked after several attempts. Close any programs using the model and try again.'
// Logging from renderer
ipcMain.on('log:error', (_event, message: string) => logger.error(`[Renderer] ${message}`))
- ipcMain.handle('log:getPath', () => join(app.getPath('userData'), 'logs', 'modly.log'))
+ ipcMain.handle('log:getPath', () => join(app.getPath('userData'), 'logs', 'forge.log'))
ipcMain.handle('log:readAll', async (_event, session?: string) => {
const logsDir = join(app.getPath('userData'), 'logs')
const dir = session ? join(logsDir, 'sessions', session) : logsDir
- const files = ['modly.log', 'errors.log', 'runtime.log']
+ const files = ['forge.log', 'errors.log', 'runtime.log']
const result: Record<string, string> = {}
for (const file of files) {
try {
@@ -256,7 +256,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
}
})
- // Secure storage — OS-level encryption (Keychain/DPAPI/libsecret) for secrets
+ // Secure storage, OS-level encryption (Keychain/DPAPI/libsecret) for secrets
// the renderer would otherwise have to keep in plain-text localStorage (API keys).
ipcMain.handle('secure:encrypt', (_, plainText: string) => encryptSecret(plainText))
ipcMain.handle('secure:decrypt', (_, stored: string) => decryptSecret(stored))
@@ -273,7 +273,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
// Native OS notification (Windows toast / macOS Notification Center / Linux),
// for events the user wants to know about even when the window is minimized or
- // behind other apps — e.g. a generation or workflow run finishing. Routed through
+ // behind other apps, e.g. a generation or workflow run finishing. Routed through
// the main process rather than the renderer's own Notification API so it works
// the same way regardless of focus and carries the app's own icon.
ipcMain.handle('notifications:show', (_event, title: string, body: string) => {
@@ -294,10 +294,10 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
return { success: true }
})
- // Setup handlers — skipped in dev (uses .venv instead of python-embed)
+ // Setup handlers: skipped in dev (uses .venv instead of python-embed)
ipcMain.handle('setup:check', async () => {
const userData = app.getPath('userData')
- const defaultDataDir = join(app.getPath('documents'), 'Modly')
+ const defaultDataDir = join(app.getPath('documents'), 'three.ws Forge')
return {
needed: checkSetupNeeded(userData),
defaultDataDir,
@@ -514,7 +514,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
}
})
- // null means "unknown" (unreadable plan, or a node without variants) — the renderer
+ // null means "unknown" (unreadable plan, or a node without variants), the renderer
// must not read an empty array as "no variant installed".
ipcMain.handle('model:installedWeightVariants', async (_, modelId: string): Promise<string[] | null> => {
try {
@@ -841,7 +841,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
//
// The returned error only covers the shell refusing the call outright. It is
// NOT an install check: on Windows an unregistered scheme still makes
- // ShellExecuteEx succeed — the OS shows its own "You'll need a new app to open
+ // ShellExecuteEx succeed: the OS shows its own "You'll need a new app to open
// this orcaslicer link" dialog and this resolves with success. Detecting a
// missing OrcaSlicer would take a per-platform handler probe (registry on
// Windows), so the renderer must not promise the user that it knows.
@@ -900,7 +900,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
arch: process.arch,
}))
- // Settings — decrypt the HF token (migrating a legacy plaintext one) and seed
+ // Settings: decrypt the HF token (migrating a legacy plaintext one) and seed
// it into the main-process env at startup.
{
const token = initHfToken(app.getPath('userData'))
@@ -911,7 +911,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
}
ipcMain.handle('settings:get', () => {
- // hfToken is stored encrypted — hand the renderer the usable value.
+ // hfToken is stored encrypted, hand the renderer the usable value.
return { ...getSettings(app.getPath('userData')), hfToken: getHfToken() }
})
@@ -931,7 +931,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
// without requiring a full app restart.
try {
await axios.post(`${API_BASE_URL}/settings/hf-token`, { token: hfToken }, { timeout: 3000 })
- } catch { /* FastAPI may not be running yet — ignore */ }
+ } catch { /* FastAPI may not be running yet, ignore */ }
}
return { ...getSettings(app.getPath('userData')), hfToken: getHfToken() }
})
@@ -947,7 +947,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
return result.canceled ? null : result.filePaths[0]
})
- // Cache clear — deletes and recreates the gen-cache folder
+ // Cache clear: deletes and recreates the gen-cache folder
// NOTE: userData/cache (lowercase) = Chromium disk cache on Windows (case-insensitive)
// → use a dedicated subfolder to avoid collision
ipcMain.handle('cache:clear', async () => {
@@ -1122,7 +1122,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
}
})
- // Remote registry — list of trusted GitHub repo URLs
+ // Remote registry: list of trusted GitHub repo URLs
const REGISTRY_URL = 'https://raw.githubusercontent.com/lightningpixel/modly-official-extension/main/registry.json'
const REGISTRY_TTL = 5 * 60 * 1000 // 5 minutes
@@ -1144,7 +1144,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
registryCache = { repos, fetchedAt: now }
return repos
} catch {
- // Offline or fetch failed — keep previous cache, or empty
+ // Offline or fetch failed: keep previous cache, or empty
return registryCache?.repos ?? new Set()
}
}
@@ -1163,7 +1163,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
entry?: string
model_sources?: unknown
weight_groups?: unknown
- // Optional top-level fallbacks — applied to each node if not set on the node
+ // Optional top-level fallbacks, applied to each node if not set on the node
params_schema?: unknown[]
param_defaults?: Record<string, unknown>
nodes?: {
@@ -1339,9 +1339,9 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
const restored = await restoreExtensionBackup(destinationDir, backupDir, logger)
if (!restored.ok) {
throw new Error(
- `Extension update failed, and Modly could not restore the previous version `
+ `Extension update failed, and three.ws Forge could not restore the previous version `
+ `during ${restored.stage}: ${String(restored.error)}. `
- + `Restart Modly to retry recovery. Original failure: ${String(originalFailure)}`,
+ + `Restart three.ws Forge to retry recovery. Original failure: ${String(originalFailure)}`,
)
}
@@ -1352,7 +1352,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
)
if (!stateCleared.ok) {
throw new Error(
- `Extension update failed and the previous version was restored, but Modly `
+ `Extension update failed and the previous version was restored, but three.ws Forge `
+ `could not clear recovery state during ${stateCleared.stage}: `
+ `${String(stateCleared.error)}. Original failure: ${String(originalFailure)}`,
)
@@ -1368,7 +1368,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
} catch (reloadError) {
throw new Error(
`Extension update failed and the previous version was restored on disk, `
- + `but Modly could not reload it: ${String(reloadError)}. `
+ + `but three.ws Forge could not reload it: ${String(reloadError)}. `
+ `Original failure: ${String(originalFailure)}`,
)
}
@@ -1387,14 +1387,14 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
const cleaned = await cleanupValidatedExtensionBackups(extensionsDir, extensionId, logger)
if (!cleaned.ok) {
throw new Error(
- `Runtime registration succeeded, but Modly could not finish removing the previous `
+ `Runtime registration succeeded, but three.ws Forge could not finish removing the previous `
+ `extension backup during ${cleaned.stage}: ${String(cleaned.error)}. `
- + `Restart Modly to retry the validated cleanup.`,
+ + `Restart three.ws Forge to retry the validated cleanup.`,
)
}
}
- // Extensions — reads user extensions directory + built-in extensions directory
+ // Extensions: reads user extensions directory + built-in extensions directory
ipcMain.handle('extensions:list', async () => {
const userData = app.getPath('userData')
const extensionsDir = getSettings(userData).extensionsDir
@@ -1438,10 +1438,10 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
)
if (installInterrupted && activeExtensionInstalls.has(entry.name)) return null
- // Detect local extensions: check for .modly-local sentinel
+ // Detect local extensions: check for .forge-local sentinel
let localSourcePath: string | undefined
if (!isBuiltin) {
- const sentinelPath = join(entryPath, '.modly-local')
+ const sentinelPath = join(entryPath, '.forge-local')
if (existsSync(sentinelPath)) {
try {
localSourcePath = (await readFile(sentinelPath, 'utf-8')).trim()
@@ -1511,14 +1511,14 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
// 2. Download tarball via GitHub API
const tarballUrl = `https://api.github.com/repos/${owner}/${repo}/tarball/HEAD`
- tarPath = join(tmpDir, `modly-ext-${Date.now()}.tar.gz`)
- extractDir = join(tmpDir, `modly-ext-extract-${Date.now()}`)
+ tarPath = join(tmpDir, `forge-ext-${Date.now()}.tar.gz`)
+ extractDir = join(tmpDir, `forge-ext-extract-${Date.now()}`)
const response = await axios.get(tarballUrl, {
responseType: 'arraybuffer',
headers: {
'Accept': 'application/vnd.github.v3+json',
- 'User-Agent': 'Modly-App',
+ 'User-Agent': 'three.ws Forge-App',
},
onDownloadProgress: (evt) => {
const pct = evt.total ? Math.round((evt.loaded / evt.total) * 80) : 40
@@ -1563,7 +1563,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
// 5. Stage into a fresh, unique dir next to the final location (so a new
// attempt can never merge into leftovers of a previous one), mark it
// incomplete, and swap it in with atomic renames BEFORE the long setup
- // phase. setup.py then runs in the final path — venvs record absolute
+ // phase. setup.py then runs in the final path, venvs record absolute
// paths, so the folder must not move after setup. If anything dies
// mid-way, the marker + backup let the startup reconciler put the
// previous version back.
@@ -1638,14 +1638,14 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
const parked = await renameWithRetry(destDir, backupDir, 'ext-install')
if (!parked.ok) {
await rmWithRetry(stagingDir, 'ext-install')
- throw new Error('The current extension folder is locked (antivirus or a running process) — close what might be using it and try again.')
+ throw new Error('The current extension folder is locked (antivirus or a running process), close what might be using it and try again.')
}
}
const activated = await renameWithRetry(stagingDir, destDir, 'ext-install')
if (!activated.ok) {
await rmWithRetry(stagingDir, 'ext-install')
if (backupDir) await renameWithRetry(backupDir, destDir, 'ext-install')
- throw new Error('Could not move the staged extension into place — the folder is locked. Try again.')
+ throw new Error('Could not move the staged extension into place, the folder is locked. Try again.')
}
// Persist transaction state beside extension folders, never inside a
@@ -1730,9 +1730,9 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
const restored = await restoreExtensionBackup(destDir, backupDir, logger)
if (!restored.ok) {
throw new Error(
- `Extension setup failed, and Modly could not restore the previous version `
+ `Extension setup failed, and three.ws Forge could not restore the previous version `
+ `during ${restored.stage}: ${String(restored.error)}. `
- + `Restart Modly to retry recovery. Original failure: ${String(setupErr)}`,
+ + `Restart three.ws Forge to retry recovery. Original failure: ${String(setupErr)}`,
)
}
const cleared = await clearExtensionRegistrationTransaction(
@@ -1742,7 +1742,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
)
if (!cleared.ok) {
throw new Error(
- `Extension setup failed and the previous version was restored, but Modly `
+ `Extension setup failed and the previous version was restored, but three.ws Forge `
+ `could not clear recovery state during ${cleared.stage}: ${String(cleared.error)}.`,
)
}
@@ -1756,7 +1756,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
)
if (!cleared.ok) {
throw new Error(
- `Extension setup failed and its incomplete folder was removed, but Modly `
+ `Extension setup failed and its incomplete folder was removed, but three.ws Forge `
+ `could not clear recovery state during ${cleared.stage}: ${String(cleared.error)}.`,
)
}
@@ -1800,9 +1800,9 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
)
if (!quarantined.ok) {
throw new Error(
- `Runtime registration failed, and Modly could not quarantine the extension `
+ `Runtime registration failed, and three.ws Forge could not quarantine the extension `
+ `during ${quarantined.stage}: ${String(quarantined.error)}. `
- + `Restart Modly to retry recovery. Original failure: ${String(registrationError)}`,
+ + `Restart three.ws Forge to retry recovery. Original failure: ${String(registrationError)}`,
)
}
if (!isProcess) {
@@ -1811,7 +1811,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
} catch (runtimeQuarantineError) {
throw new Error(
`Runtime registration failed and filesystem quarantine was preserved, `
- + `but Modly could not evict partially registered model state: `
+ + `but three.ws Forge could not evict partially registered model state: `
+ `${String(runtimeQuarantineError)}. `
+ `Original failure: ${String(registrationError)}`,
)
@@ -1842,7 +1842,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
}
})
- // Uninstall an extension — built-ins cannot be uninstalled
+ // Uninstall an extension: built-ins cannot be uninstalled
ipcMain.handle('extensions:uninstall', async (_, extensionId: string) => {
try {
if ([...activeDownloads.keys()].some((modelId) => modelId.split('/', 1)[0] === extensionId)) {
@@ -1850,7 +1850,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
}
// Corrupted folders can carry arbitrary names (manual copies, failed
// unzips), so only enforce root confinement for the deletion path. The
- // strict id pattern still guards the built-in check — a non-conforming
+ // strict id pattern still guards the built-in check, a non-conforming
// name can never be a built-in.
const extensionsDir = getSettings(app.getPath('userData')).extensionsDir
@@ -1874,7 +1874,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
success: false,
error: removed.locked
? `Could not delete the extension ${removed.stage === 'backup' ? 'backup' : 'folder'} `
- + '— a file inside it is locked (antivirus or a running process). '
+ + ', a file inside it is locked (antivirus or a running process). '
+ 'Close what might be using it and try again.'
: `Could not uninstall the extension during ${removed.stage}: ${String(removed.error)}`,
}
@@ -1896,7 +1896,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
const extensionsDir = getSettings(app.getPath('userData')).extensionsDir
const extDir = resolveExtensionPathWithinRoot(extensionsDir, safeExtensionId)
if (!existsSync(join(extDir, 'setup.py'))) {
- return { success: false, error: 'setup.py is missing from the extension folder — the install looks incomplete. Uninstall the extension and install it again.' }
+ return { success: false, error: 'setup.py is missing from the extension folder, the install looks incomplete. Uninstall the extension and install it again.' }
}
const manifestRaw = await readFile(join(extDir, 'manifest.json'), 'utf-8')
const manifest = JSON.parse(manifestRaw) as ParsedManifest
@@ -2055,7 +2055,7 @@ export function setupIpcHandlers(pythonBridge: PythonBridge, getWindow: WindowGe
// The sentinel lives in the linked source folder. Runtime
// registration is still pending externally until validation.
- await writeFile(join(linkPath, '.modly-local'), localPath, 'utf-8')
+ await writeFile(join(linkPath, '.forge-local'), localPath, 'utf-8')
},
validate: async (validationCapability) => {
if (!isProcess) {
diff --git a/apps/forge-desktop/electron/main/logger.ts b/apps/forge-desktop/electron/main/logger.ts
index a85c855fc..2521f6a71 100644
--- a/apps/forge-desktop/electron/main/logger.ts
+++ b/apps/forge-desktop/electron/main/logger.ts
@@ -3,7 +3,7 @@ import { appendFileSync, mkdirSync, existsSync, readdirSync, statSync, renameSyn
import { join } from 'path'
const MAX_SESSIONS = 10
-const LOG_FILES = ['modly.log', 'errors.log', 'runtime.log']
+const LOG_FILES = ['forge.log', 'errors.log', 'runtime.log']
function getLogsDir(): string {
const logsDir = join(app.getPath('userData'), 'logs')
@@ -57,9 +57,9 @@ function safeConsole(fn: (msg: string) => void, msg: string): void {
}
export const logger = {
- info: (msg: string) => { safeConsole(console.log, msg); writeTo('modly.log', line('INFO', msg)) },
- warn: (msg: string) => { safeConsole(console.warn, msg); writeTo('modly.log', line('WARN', msg)) },
- error: (msg: string) => { safeConsole(console.error, msg); writeTo('modly.log', line('ERROR', msg)); writeTo('errors.log', line('ERROR', msg)) },
+ info: (msg: string) => { safeConsole(console.log, msg); writeTo('forge.log', line('INFO', msg)) },
+ warn: (msg: string) => { safeConsole(console.warn, msg); writeTo('forge.log', line('WARN', msg)) },
+ error: (msg: string) => { safeConsole(console.error, msg); writeTo('forge.log', line('ERROR', msg)); writeTo('errors.log', line('ERROR', msg)) },
python: (msg: string) => {
writeTo('runtime.log', line('RUNTIME', msg))
if (/error|exception|traceback|critical/i.test(msg)) {
diff --git a/apps/forge-desktop/electron/main/model-download-plan.test.mjs b/apps/forge-desktop/electron/main/model-download-plan.test.mjs
index 1a927cbcc..158cebd16 100644
--- a/apps/forge-desktop/electron/main/model-download-plan.test.mjs
+++ b/apps/forge-desktop/electron/main/model-download-plan.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-model-plan-module-')), 'model-plan.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-model-plan-module-')), 'model-plan.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('electron/main/model-download-plan.ts')],
@@ -21,7 +21,7 @@ function loadModule() {
}
function setupExtension(manifest) {
- const root = mkdtempSync(join(tmpdir(), 'modly-action-plan-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-action-plan-'))
const user = join(root, 'user')
const builtin = join(root, 'builtin')
const extension = join(user, manifest.id)
diff --git a/apps/forge-desktop/electron/main/model-download-plan.ts b/apps/forge-desktop/electron/main/model-download-plan.ts
index 6dc78668a..2a88d3217 100644
--- a/apps/forge-desktop/electron/main/model-download-plan.ts
+++ b/apps/forge-desktop/electron/main/model-download-plan.ts
@@ -238,7 +238,7 @@ export interface LegacyDownloadStep {
/**
* Hugging Face filter passes for one download action. A node that declares weight
* variants always fetches its shared files first (every variant excluded), then the
- * requested variant — its default one when no variant id is given. The shared pass
+ * requested variant, its default one when no variant id is given. The shared pass
* skips files already complete on disk, so it stays cheap on a resume or a second
* variant.
*/
diff --git a/apps/forge-desktop/electron/main/model-download-preload.test.mjs b/apps/forge-desktop/electron/main/model-download-preload.test.mjs
index c88ebf6b3..c4df4121c 100644
--- a/apps/forge-desktop/electron/main/model-download-preload.test.mjs
+++ b/apps/forge-desktop/electron/main/model-download-preload.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-preload-download-')), 'electron-api.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-preload-download-')), 'electron-api.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('electron/preload/electron-api.ts')],
diff --git a/apps/forge-desktop/electron/main/model-downloader.ts b/apps/forge-desktop/electron/main/model-downloader.ts
index abad7b817..0a9cf5491 100644
--- a/apps/forge-desktop/electron/main/model-downloader.ts
+++ b/apps/forge-desktop/electron/main/model-downloader.ts
@@ -1,5 +1,5 @@
/**
- * ModelDownloader — downloads models via the SSE endpoint of the Python backend.
+ * ModelDownloader: downloads models via the SSE endpoint of the Python backend.
* No longer depends on the Go API catalog.
*/
import { existsSync, readdirSync, statSync, readFileSync } from 'fs'
@@ -111,7 +111,7 @@ export function listDownloadedModels(modelsDir: string): { id: string; name: str
/**
* Download a model from HuggingFace Hub via the Python FastAPI SSE endpoint.
- * Reports progress (0–100) via the onProgress callback.
+ * Reports progress (0-100) via the onProgress callback.
*/
export async function downloadModelFromHF(
repoId: string,
@@ -131,7 +131,7 @@ export async function downloadModelFromHF(
// Header, never a query param: uvicorn logs the full request line to stdout,
// python-bridge pipes that into runtime.log, and `log:readAll` hands that file
// to the user for bug reports. The token used to ride all the way there.
- const hfToken = getHfToken() // decrypted cache — settings.json holds the ciphertext
+ const hfToken = getHfToken() // decrypted cache, settings.json holds the ciphertext
const res = await net.fetch(url, hfToken ? { headers: { 'X-HF-Token': hfToken } } : undefined)
if (!res.ok) throw new Error(`HuggingFace download failed: HTTP ${res.status}`)
await consumeDownloadStream(res, onProgress)
diff --git a/apps/forge-desktop/electron/main/model-sources.test.mjs b/apps/forge-desktop/electron/main/model-sources.test.mjs
index 751c4f563..393ea932b 100644
--- a/apps/forge-desktop/electron/main/model-sources.test.mjs
+++ b/apps/forge-desktop/electron/main/model-sources.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-model-sources-module-')), 'model-sources.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-model-sources-module-')), 'model-sources.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('electron/main/model-sources.ts')],
@@ -80,7 +80,7 @@ test('rejects unsafe destinations, unsupported providers, and non-portable sourc
test('requires every declared check and rejects symlinked extension-root ancestry', (t) => {
const { areModelSourcesDownloaded, normalizeModelSources } = loadModule()
- const root = mkdtempSync(join(tmpdir(), 'modly-model-readiness-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-model-readiness-'))
const models = join(root, 'models')
const modelRoot = join(models, 'pixal3d', 'generate')
const sources = normalizeModelSources(validNode())
@@ -149,7 +149,7 @@ test('stores and checks shared weights under the reserved extension root', () =>
resolveWeightGroupRoot,
resolveWeightStorageRoot,
} = loadModule()
- const root = mkdtempSync(join(tmpdir(), 'modly-shared-readiness-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-shared-readiness-'))
const models = join(root, 'models')
const [group] = normalizeWeightGroups({
weight_groups: [{
@@ -238,7 +238,7 @@ test('validates weight variants and rejects ambiguous or unsafe declarations', (
test('reports installed variants and lists only the files of the variant being removed', async () => {
const { installedWeightVariants, listWeightVariantFiles, normalizeWeightVariants } = loadModule()
const variants = normalizeWeightVariants(quantNode())
- const root = mkdtempSync(join(tmpdir(), 'modly-weight-variants-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-weight-variants-'))
const models = join(root, 'models')
const nodeRoot = join(models, 'trellis', 'generate')
mkdirSync(join(nodeRoot, 'dit'), { recursive: true })
diff --git a/apps/forge-desktop/electron/main/model-weight-ipc.test.mjs b/apps/forge-desktop/electron/main/model-weight-ipc.test.mjs
index b77d75bcc..8255c1e73 100644
--- a/apps/forge-desktop/electron/main/model-weight-ipc.test.mjs
+++ b/apps/forge-desktop/electron/main/model-weight-ipc.test.mjs
@@ -28,7 +28,7 @@ function deferred() {
return { promise, resolve }
}
function fixture(t) {
- const root = mkdtempSync(join(tmpdir(), 'modly-weight-ipc-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-weight-ipc-'))
t.after(() => rmSync(root, { recursive: true, force: true }))
const settings = { modelsDir: join(root, 'models'), extensionsDir: join(root, 'extensions') }
const extension = join(settings.extensionsDir, 'demo')
diff --git a/apps/forge-desktop/electron/main/process-runner-worker-exit.test.mjs b/apps/forge-desktop/electron/main/process-runner-worker-exit.test.mjs
index de1a11f1a..6b88ce42b 100644
--- a/apps/forge-desktop/electron/main/process-runner-worker-exit.test.mjs
+++ b/apps/forge-desktop/electron/main/process-runner-worker-exit.test.mjs
@@ -40,7 +40,7 @@ function loadModule() {
// so a fresh worker starts again from 1.
function makeRunner() {
const { ProcessRunner } = loadModule()
- const root = mkdtempSync(join(tmpdir(), 'modly-worker-exit-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-worker-exit-'))
const extDir = join(root, 'ext')
mkdirSync(extDir, { recursive: true })
writeFileSync(join(extDir, 'processor.js'), [
diff --git a/apps/forge-desktop/electron/main/process-runner.test.mjs b/apps/forge-desktop/electron/main/process-runner.test.mjs
index 1d72b8660..e20a4d145 100644
--- a/apps/forge-desktop/electron/main/process-runner.test.mjs
+++ b/apps/forge-desktop/electron/main/process-runner.test.mjs
@@ -71,7 +71,7 @@ function makeStdioExtension(root) {
test('a JS process runner follows the workspace after it moves', async () => {
const { getProcessRunner, terminateAllProcessRunners } = loadModule()
- const root = mkdtempSync(join(tmpdir(), 'modly-runner-js-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-runner-js-'))
const extDir = makeJsExtension(root)
const oldWorkspace = join(root, 'workspace-old')
const newWorkspace = join(root, 'workspace-new')
@@ -88,7 +88,7 @@ test('a JS process runner follows the workspace after it moves', async () => {
test('a Python process runner follows the workspace after it moves', async () => {
const { getPythonProcessRunner, terminateAllProcessRunners } = loadModule()
- const root = mkdtempSync(join(tmpdir(), 'modly-runner-py-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-runner-py-'))
const extDir = makeStdioExtension(root)
const oldWorkspace = join(root, 'workspace-old')
const newWorkspace = join(root, 'workspace-new')
@@ -105,7 +105,7 @@ test('a Python process runner follows the workspace after it moves', async () =>
test('unchanged arguments keep reusing the same warm runner', async () => {
const { getProcessRunner, terminateAllProcessRunners } = loadModule()
- const root = mkdtempSync(join(tmpdir(), 'modly-runner-reuse-'))
+ const root = mkdtempSync(join(tmpdir(), 'forge-runner-reuse-'))
const extDir = makeJsExtension(root)
const workspace = join(root, 'workspace')
try {
diff --git a/apps/forge-desktop/electron/main/process-runner.ts b/apps/forge-desktop/electron/main/process-runner.ts
index 8b012c824..9072bbc2a 100644
--- a/apps/forge-desktop/electron/main/process-runner.ts
+++ b/apps/forge-desktop/electron/main/process-runner.ts
@@ -188,8 +188,8 @@ export class ProcessRunner implements IProcessRunner {
// ─── Python ProcessRunner (subprocess, one process per run) ───────────────────
//
-// Protocol — stdin: one JSON line { input, params, workspaceDir, tempDir }
-// Protocol — stdout: JSON lines { type: 'progress'|'log'|'done'|'error', ... }
+// Protocol: stdin: one JSON line { input, params, workspaceDir, tempDir }
+// Protocol: stdout: JSON lines { type: 'progress'|'log'|'done'|'error', ... }
export class PythonProcessRunner implements IProcessRunner {
private pythonExe: string
@@ -212,6 +212,9 @@ export class PythonProcessRunner implements IProcessRunner {
onProgress?: (percent: number, label: string) => void,
onLog?: (message: string) => void,
): Promise<ProcessResult> {
+ const apiDir = app.isPackaged
+ ? join(process.resourcesPath, 'api')
+ : join(app.getAppPath(), 'api')
return new Promise((resolve, reject) => {
const proc = spawn(this.pythonExe, [this.scriptPath], {
stdio: ['pipe', 'pipe', 'pipe'],
@@ -221,11 +224,13 @@ export class PythonProcessRunner implements IProcessRunner {
// crash under legacy Windows codepages (cp1252/cp932).
PYTHONUTF8: '1',
// Built-in process nodes may import shared services from the backend.
- MODLY_API_DIR: app.isPackaged
- ? join(process.resourcesPath, 'api')
- : join(app.getAppPath(), 'api'),
+ THREEWS_API_DIR: apiDir,
// Electron is also the packaged Node runtime. meshopt_runner.cjs uses
// ELECTRON_RUN_AS_NODE when it launches this executable.
+ THREEWS_NODE_EXECUTABLE: process.execPath,
+ // Community process extensions written against the upstream Modly
+ // template read these names, so both spellings are exported.
+ MODLY_API_DIR: apiDir,
MODLY_NODE_EXECUTABLE: process.execPath,
EXTENSION_DIR: this.extDir,
WORKSPACE_DIR: this.workspaceDir,
@@ -268,7 +273,7 @@ export class PythonProcessRunner implements IProcessRunner {
reject(new Error(msg.message ?? 'Unknown error'))
}
} catch {
- // Non-JSON stdout line — treat as a log message
+ // Non-JSON stdout line, treat as a log message
onLog?.(trimmed)
}
}
@@ -298,7 +303,7 @@ export class PythonProcessRunner implements IProcessRunner {
})
}
- // Python processes are spawned per run — nothing persistent to terminate
+ // Python processes are spawned per run, nothing persistent to terminate
terminate(): void {}
}
@@ -319,8 +324,8 @@ export function getExtPythonExe(extDir: string): string | null {
const registry = new Map<string, IProcessRunner>()
// The arguments each cached runner was built with. A runner bakes them in at
-// construction, so a call with different ones — e.g. after the workspace is
-// moved in Settings, which updates paths without a restart — must not get the
+// construction, so a call with different ones, e.g. after the workspace is
+// moved in Settings, which updates paths without a restart, must not get the
// old runner back, or node output keeps landing in the previous folder.
const registryArgs = new Map<string, string>()
diff --git a/apps/forge-desktop/electron/main/python-bridge.ts b/apps/forge-desktop/electron/main/python-bridge.ts
index 87aa2b6b5..e78e39ce6 100644
--- a/apps/forge-desktop/electron/main/python-bridge.ts
+++ b/apps/forge-desktop/electron/main/python-bridge.ts
@@ -55,9 +55,10 @@ export class PythonBridge {
PYTHONUNBUFFERED: '1',
// mesh_ops uses Electron in Node mode for the existing meshoptimizer
// backend, so packaged builds do not depend on a system Node install.
- MODLY_NODE_EXECUTABLE: process.execPath,
+ THREEWS_NODE_EXECUTABLE: process.execPath,
+ MODLY_NODE_EXECUTABLE: process.execPath,
// We decode both pipes as UTF-8 below (Buffer.toString() default), and
- // the API forwards extension output — tqdm bars included — through its
+ // the API forwards extension output, tqdm bars included, through its
// own stderr. Without this the API would encode them with the Windows
// locale codec and the HUD log pane would show █ escapes.
PYTHONIOENCODING: 'utf-8',
@@ -66,7 +67,7 @@ export class PythonBridge {
WORKSPACE_DIR: this.resolveWorkspaceDir(),
EXTENSIONS_DIR: this.resolveExtensionsDir(),
// llm_server.py keeps everything of the local LLM here: engine, GGUF models, logs, config.
- MODLY_LLM_DIR: this.resolveAgentDir(),
+ THREEWS_LLM_DIR: this.resolveAgentDir(),
SELECTED_MODEL_ID: process.env['SELECTED_MODEL_ID'] ?? '',
HUGGING_FACE_HUB_TOKEN: this.resolveHfToken(),
HF_TOKEN: this.resolveHfToken(),
@@ -74,7 +75,7 @@ export class PythonBridge {
// On Unix, put the bridge in its own process group so every subprocess
// it spawns (extension runners, etc.) inherits that group. On shutdown
// we SIGKILL the whole group (negative PID) to take them all out
- // together — otherwise children get reparented to launchd and keep
+ // together, otherwise children get reparented to launchd and keep
// holding MPS-wired memory until the user kills them manually.
detached: process.platform !== 'win32',
})
@@ -218,7 +219,7 @@ export class PythonBridge {
if (existsSync(c)) return c
}
- // Never fall back to bare 'python' on Windows — it would be the user's system Python
+ // Never fall back to bare 'python' on Windows, it would be the user's system Python
if (process.platform === 'win32') {
throw new Error('Python venv not found. Please restart the application to re-run setup.')
}
@@ -253,6 +254,6 @@ export class PythonBridge {
}
private resolveHfToken(): string {
- return getHfToken() // decrypted cache — settings.json holds the ciphertext
+ return getHfToken() // decrypted cache, settings.json holds the ciphertext
}
}
diff --git a/apps/forge-desktop/electron/main/python-setup.ts b/apps/forge-desktop/electron/main/python-setup.ts
index 13e86a251..c5922a09b 100644
--- a/apps/forge-desktop/electron/main/python-setup.ts
+++ b/apps/forge-desktop/electron/main/python-setup.ts
@@ -156,7 +156,7 @@ export function markSetupDone(userData: string): void {
/**
* On Linux AppImage, process.resourcesPath resolves to an ephemeral mount point
- * (/tmp/.mount_Modly-XXXXXX/) that changes every launch, which breaks venv symlinks.
+ * (/tmp/.mount_three.ws Forge-XXXXXX/) that changes every launch, which breaks venv symlinks.
* This copies the bundled Python runtime to a stable userData path once per app version.
*/
async function ensureStableEmbeddedPython(userData: string, win: BrowserWindow): Promise<string> {
@@ -299,7 +299,7 @@ export async function runFullSetup(win: BrowserWindow, userData: string): Promis
const venvDir = getVenvDir(userData)
if (process.platform === 'linux' && app.isPackaged) {
- // AppImage: process.resourcesPath is ephemeral — copy Python to stable userData path first
+ // AppImage: process.resourcesPath is ephemeral, copy Python to stable userData path first
const pythonExe = await ensureStableEmbeddedPython(userData, win)
await createVenv(pythonExe, venvDir, win)
const venvPython = getVenvPythonExe(userData)
diff --git a/apps/forge-desktop/electron/main/secure-store.ts b/apps/forge-desktop/electron/main/secure-store.ts
index 7c70cd27f..3345f1d36 100644
--- a/apps/forge-desktop/electron/main/secure-store.ts
+++ b/apps/forge-desktop/electron/main/secure-store.ts
@@ -9,7 +9,7 @@ const PLAINTEXT_PREFIX = 'plain:'
let warnedOnce = false
// Electron 33 (pinned in package.json) only ships the synchronous safeStorage
-// API — encryptStringAsync/decryptStringAsync/isAsyncEncryptionAvailable were
+// API encryptStringAsync/decryptStringAsync/isAsyncEncryptionAvailable were
// added in a later Electron release. The sync calls are cheap (no disk I/O,
// just OS keychain/DPAPI crypto), so wrapping them in an async function here
// is only to keep the IPC handler signature uniform, not for a real await.
@@ -20,7 +20,7 @@ export function encryptSecretSync(plainText: string): string {
if (!safeStorage.isEncryptionAvailable()) {
if (!warnedOnce) {
warnedOnce = true
- logger.warn('[secure-store] OS-level encryption unavailable — storing secrets in plain text')
+ logger.warn('[secure-store] OS-level encryption unavailable, storing secrets in plain text')
}
return PLAINTEXT_PREFIX + plainText
}
@@ -31,10 +31,10 @@ export function encryptSecretSync(plainText: string): string {
/**
* True when `stored` has the shape encryptSecretSync produces: a hex blob
* starting with Chromium OSCrypt's version tag ("v10", "v11", …). The tag
- * matters — hex alone also matched plaintext API keys that happen to be hex
+ * matters: hex alone also matched plaintext API keys that happen to be hex
* (common for self-hosted endpoints), which then "failed to decrypt" and were
* wiped during the migration instead of encrypted. Used to tell "this was never encrypted" apart from "this IS one of
- * our blobs but decryption just failed" — the two must not be confused: DPAPI
+ * our blobs but decryption just failed", the two must not be confused: DPAPI
* keys are per-OS-user, so a restored backup or a different Windows account
* makes decryption fail on a perfectly valid ciphertext. Treating that as
* plaintext would hand the ciphertext out as a credential and then re-encrypt
@@ -59,7 +59,7 @@ export function decryptSecretSync(stored: string): string | null {
return safeStorage.decryptString(Buffer.from(stored, 'hex'))
} catch (err) {
logger.error(
- '[secure-store] a stored secret could not be decrypted — it was encrypted by a ' +
+ '[secure-store] a stored secret could not be decrypted, it was encrypted by a ' +
`different OS user or machine. It must be re-entered. (${err})`,
)
return null
@@ -71,7 +71,7 @@ export async function encryptSecret(plainText: string): Promise<string> {
return encryptSecretSync(plainText)
}
-/** `null` on an undecryptable blob — never the ciphertext, which callers would
+/** `null` on an undecryptable blob, never the ciphertext, which callers would
* otherwise use as a credential and re-encrypt. */
export async function decryptSecret(stored: string): Promise<string | null> {
return decryptSecretSync(stored)
diff --git a/apps/forge-desktop/electron/main/settings-store.test.mjs b/apps/forge-desktop/electron/main/settings-store.test.mjs
index 06a78fc1f..fd3cc5450 100644
--- a/apps/forge-desktop/electron/main/settings-store.test.mjs
+++ b/apps/forge-desktop/electron/main/settings-store.test.mjs
@@ -30,15 +30,15 @@ function loadModule() {
const { getSettings, setSettings, ensureAgentDir } = loadModule()
test('a fresh install puts the agent folder in userData beside the others', () => {
- const userData = mkdtempSync(join(tmpdir(), 'modly-settings-'))
+ const userData = mkdtempSync(join(tmpdir(), 'forge-settings-'))
const s = getSettings(userData)
assert.equal(s.agentDir, join(userData, 'agent'))
assert.equal(s.modelsDir, join(userData, 'models'))
})
test('an existing install gets the agent folder beside its chosen data folders', () => {
- const userData = mkdtempSync(join(tmpdir(), 'modly-settings-'))
- const base = join(userData, 'Documents', 'Modly')
+ const userData = mkdtempSync(join(tmpdir(), 'forge-settings-'))
+ const base = join(userData, 'Documents', 'three.ws Forge')
writeFileSync(join(userData, 'settings.json'), JSON.stringify({
modelsDir: join(base, 'models'),
workspaceDir: join(base, 'workspace'),
@@ -48,7 +48,7 @@ test('an existing install gets the agent folder beside its chosen data folders',
})
test('a saved agent folder is kept, and persists once any setting is written', () => {
- const userData = mkdtempSync(join(tmpdir(), 'modly-settings-'))
+ const userData = mkdtempSync(join(tmpdir(), 'forge-settings-'))
const custom = join(userData, 'elsewhere', 'agent')
writeFileSync(join(userData, 'settings.json'), JSON.stringify({ agentDir: custom }))
assert.equal(getSettings(userData).agentDir, custom)
@@ -58,8 +58,8 @@ test('a saved agent folder is kept, and persists once any setting is written', (
})
test('an existing install gets its agent folder created and pinned at startup', () => {
- const userData = mkdtempSync(join(tmpdir(), 'modly-settings-'))
- const base = join(userData, 'Documents', 'Modly')
+ const userData = mkdtempSync(join(tmpdir(), 'forge-settings-'))
+ const base = join(userData, 'Documents', 'three.ws Forge')
writeFileSync(join(userData, 'settings.json'), JSON.stringify({ modelsDir: join(base, 'models') }))
assert.equal(ensureAgentDir(userData), join(base, 'agent'))
@@ -72,7 +72,7 @@ test('an existing install gets its agent folder created and pinned at startup',
})
test('a fresh install gets its agent folder without settings.json being written', () => {
- const userData = mkdtempSync(join(tmpdir(), 'modly-settings-'))
+ const userData = mkdtempSync(join(tmpdir(), 'forge-settings-'))
assert.equal(ensureAgentDir(userData), join(userData, 'agent'))
assert.equal(existsSync(join(userData, 'agent')), true)
assert.equal(existsSync(join(userData, 'settings.json')), false)
diff --git a/apps/forge-desktop/electron/main/setup-launcher.test.mjs b/apps/forge-desktop/electron/main/setup-launcher.test.mjs
index 63d65ec2a..38b45b0ef 100644
--- a/apps/forge-desktop/electron/main/setup-launcher.test.mjs
+++ b/apps/forge-desktop/electron/main/setup-launcher.test.mjs
@@ -16,7 +16,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-launcher-test-')), 'setup-launcher.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-launcher-test-')), 'setup-launcher.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('electron/main/setup-launcher.ts')],
@@ -42,7 +42,7 @@ function findPython() {
const PYTHON = findPython()
// The launcher's _is_pip_command matches pip's executable spellings ahead of
-// the subcommand, so the stub is named pip.py — matching how extensions invoke
+// the subcommand, so the stub is named pip.py, matching how extensions invoke
// "<venv>/bin/pip".
const FAKE_PIP = `
import json, sys
@@ -53,10 +53,10 @@ with open(sys.argv[1], "w") as handle:
/**
* Runs a pip command through the launcher and returns the argv the stub
* actually received, i.e. the command after every rewrite. `invoke` picks how
- * the stand-in setup.py issues the call — the shapes real extensions use.
+ * the stand-in setup.py issues the call, the shapes real extensions use.
*/
function runThroughLauncher(pipArgs, env = {}, invoke = 'run') {
- const dir = mkdtempSync(join(tmpdir(), 'modly-launcher-run-'))
+ const dir = mkdtempSync(join(tmpdir(), 'forge-launcher-run-'))
const fakePip = join(dir, 'pip.py')
const capture = join(dir, 'captured.json')
writeFileSync(fakePip, FAKE_PIP, 'utf8')
@@ -90,9 +90,9 @@ function runThroughLauncher(pipArgs, env = {}, invoke = 'run') {
}
const ROCM_ENV = {
- MODLY_TORCH_FLAVOR: 'rocm',
- MODLY_TORCH_INDEX_URL: 'https://download.pytorch.org/whl/rocm7.2',
- MODLY_TORCH_SPECS: JSON.stringify(['torch', 'torchvision']),
+ THREEWS_TORCH_FLAVOR: 'rocm',
+ THREEWS_TORCH_INDEX_URL: 'https://download.pytorch.org/whl/rocm7.2',
+ THREEWS_TORCH_SPECS: JSON.stringify(['torch', 'torchvision']),
}
test('ROCm shim redirects a CUDA-pinned install (triposg / trellis2 shape)', { skip: !PYTHON }, () => {
@@ -116,8 +116,8 @@ test('ROCm shim rescues the CPU fallback hunyuan3d-mini forces on Windows', { sk
['install', 'torch==2.6.0', 'torchvision==0.21.0', '--index-url', 'https://download.pytorch.org/whl/cpu'],
{
...ROCM_ENV,
- MODLY_TORCH_INDEX_URL: 'https://repo.amd.com/rocm/whl-multi-arch/',
- MODLY_TORCH_SPECS: JSON.stringify([
+ THREEWS_TORCH_INDEX_URL: 'https://repo.amd.com/rocm/whl-multi-arch/',
+ THREEWS_TORCH_SPECS: JSON.stringify([
'torch[device-gfx1200]==2.11.0+rocm7.14.0',
'torchvision[device-gfx1200]==0.26.0+rocm7.14.0',
]),
@@ -134,7 +134,7 @@ test('ROCm shim rescues the CPU fallback hunyuan3d-mini forces on Windows', { sk
test('ROCm shim leaves an extension that already chose ROCm alone', { skip: !PYTHON }, () => {
// hunyuan3d-mini's own rocm branch on Linux. Its index is kept; only the
- // requirements are normalised to what Modly resolved.
+ // requirements are normalised to what three.ws Forge resolved.
const { argv } = runThroughLauncher(
['install', 'torch', 'torchvision', '--index-url', 'https://download.pytorch.org/whl/rocm7.2'],
ROCM_ENV,
@@ -216,9 +216,9 @@ test('ROCm shim does not add PyPI for a torch-only install', { skip: !PYTHON },
test('shim is inert on a CUDA machine', { skip: !PYTHON }, () => {
const original = ['install', 'torch==2.6.0', '--index-url', 'https://download.pytorch.org/whl/cu124']
const { argv } = runThroughLauncher(original, {
- MODLY_TORCH_FLAVOR: 'cuda',
- MODLY_TORCH_INDEX_URL: '',
- MODLY_TORCH_SPECS: '[]',
+ THREEWS_TORCH_FLAVOR: 'cuda',
+ THREEWS_TORCH_INDEX_URL: '',
+ THREEWS_TORCH_SPECS: '[]',
})
assert.deepEqual(argv, original)
})
@@ -244,11 +244,11 @@ test('ROCm shim covers subprocess.Popen and the args= keyword too', { skip: !PYT
test('ROCm shim matches "python -u -m pip install" too', { skip: !PYTHON }, () => {
// hunyuan3d-style scripts call pip through the interpreter; "pip" is then the
// fourth token, which the old first-three-tokens check missed.
- const dir = mkdtempSync(join(tmpdir(), 'modly-launcher-m-'))
+ const dir = mkdtempSync(join(tmpdir(), 'forge-launcher-m-'))
const capture = join(dir, 'captured.json')
writeFileSync(join(dir, 'pip.py'), [
'import json, os, sys',
- 'with open(os.environ["MODLY_TEST_CAPTURE"], "w") as handle:',
+ 'with open(os.environ["THREEWS_TEST_CAPTURE"], "w") as handle:',
' json.dump(sys.argv[1:], handle)',
].join('\n'), 'utf8')
@@ -261,7 +261,7 @@ test('ROCm shim matches "python -u -m pip install" too', { skip: !PYTHON }, () =
const result = spawnSync(PYTHON, ['-c', SETUP_LAUNCHER_SOURCE, setupPy, '{}'], {
encoding: 'utf8',
- env: { ...process.env, ...ROCM_ENV, MODLY_TEST_CAPTURE: capture, PYTHONPATH: dir },
+ env: { ...process.env, ...ROCM_ENV, THREEWS_TEST_CAPTURE: capture, PYTHONPATH: dir },
})
assert.equal(result.status, 0, `launcher failed:\n${result.stderr}`)
@@ -312,8 +312,8 @@ test('ROCm shim recognises AMD\'s Windows index as already-ROCm', { skip: !PYTHO
// ROCm index or the shim would inject a second, conflicting --index-url.
const winEnv = {
...ROCM_ENV,
- MODLY_TORCH_INDEX_URL: 'https://repo.amd.com/rocm/whl-multi-arch/',
- MODLY_TORCH_SPECS: JSON.stringify(['torch[device-gfx1200]==2.11.0+rocm7.14.0']),
+ THREEWS_TORCH_INDEX_URL: 'https://repo.amd.com/rocm/whl-multi-arch/',
+ THREEWS_TORCH_SPECS: JSON.stringify(['torch[device-gfx1200]==2.11.0+rocm7.14.0']),
}
const { argv } = runThroughLauncher(
['install', 'torch==2.6.0', '--index-url', 'https://repo.amd.com/rocm/whl-multi-arch/'],
diff --git a/apps/forge-desktop/electron/main/setup-launcher.ts b/apps/forge-desktop/electron/main/setup-launcher.ts
index a31506706..a4c65ac0b 100644
--- a/apps/forge-desktop/electron/main/setup-launcher.ts
+++ b/apps/forge-desktop/electron/main/setup-launcher.ts
@@ -4,7 +4,7 @@
* Extension setup scripts are third-party code we cannot edit, and they install
* PyTorch themselves from an index they hardcode. The launcher wraps them: it
* patches subprocess so every pip invocation passes through a few corrections
- * before it runs — dropping CUDA-only indexes on macOS, keeping the shared wheel
+ * before it runs, dropping CUDA-only indexes on macOS, keeping the shared wheel
* cache alive, and redirecting torch to ROCm wheels on AMD machines.
*
* Kept in its own module so setup-launcher.test.mjs can execute it for real
@@ -67,12 +67,12 @@ def _rewrite_command(command):
i += 1
if changed:
- print("[Modly setup compat] Removed CUDA-only PyTorch index on macOS; pip will use macOS wheels.", file=sys.stderr)
+ print("[three.ws Forge setup compat] Removed CUDA-only PyTorch index on macOS; pip will use macOS wheels.", file=sys.stderr)
return rewritten
return command
# Matches the executable spellings pip arrives under: "pip", "pip3", "pip3.11",
-# "pip.exe", or a stub script like "pip.py" — but not a requirement that merely
+# "pip.exe", or a stub script like "pip.py": but not a requirement that merely
# starts with "pip" (pipdeptree) or a script like "pipeline.py".
_PIP_BASENAME_RE = re.compile(r"^pip[0-9.]*(\\.py|\\.exe)?$", re.I)
@@ -94,22 +94,22 @@ def _is_pip_command(command):
def _strip_no_cache(command):
# Extension setup scripts often hardcode --no-cache-dir, which forces pip to
- # re-download multi-GB wheels on every retry. Modly provides a shared cache
+ # re-download multi-GB wheels on every retry. three.ws Forge provides a shared cache
# via PIP_CACHE_DIR, so drop the flag and let pip use it.
if not _is_pip_command(command):
return command
if not any(str(part) == "--no-cache-dir" for part in command):
return command
- print("[Modly setup compat] Removed --no-cache-dir so pip reuses the shared wheel cache.", file=sys.stderr)
+ print("[three.ws Forge setup compat] Removed --no-cache-dir so pip reuses the shared wheel cache.", file=sys.stderr)
return [part for part in command if str(part) != "--no-cache-dir"]
# ROCm redirect. Most extension setup.py scripts predate AMD support and
# hardcode a CUDA index (hunyuan3d-mini even forces the CPU index on Windows),
-# so on an AMD machine we swap the whole torch install for the ROCm one Modly
+# so on an AMD machine we swap the whole torch install for the ROCm one three.ws Forge
# resolved. An index the extension already pointed at ROCm is left alone.
-_ROCM_INDEX = os.environ.get("MODLY_TORCH_INDEX_URL", "")
+_ROCM_INDEX = os.environ.get("THREEWS_TORCH_INDEX_URL", "")
try:
- _ROCM_SPECS = json.loads(os.environ.get("MODLY_TORCH_SPECS", "[]"))
+ _ROCM_SPECS = json.loads(os.environ.get("THREEWS_TORCH_SPECS", "[]"))
except ValueError:
_ROCM_SPECS = []
@@ -118,7 +118,7 @@ def _is_pytorch_index(value):
def _is_rocm_index(value):
# Covers the pytorch.org rocm indexes, AMD's Windows multi-arch index, and
- # whatever MODLY_ROCM_INDEX was overridden to.
+ # whatever THREEWS_ROCM_INDEX was overridden to.
if not isinstance(value, str):
return False
if _ROCM_INDEX and value.rstrip("/") == _ROCM_INDEX.rstrip("/"):
@@ -160,7 +160,7 @@ def _has_non_torch_requirement(command):
return False
def _rewrite_rocm(command):
- if os.environ.get("MODLY_TORCH_FLAVOR") != "rocm" or not _ROCM_INDEX or not _ROCM_SPECS:
+ if os.environ.get("THREEWS_TORCH_FLAVOR") != "rocm" or not _ROCM_INDEX or not _ROCM_SPECS:
return command
if not isinstance(command, (list, tuple)):
return command
@@ -224,19 +224,19 @@ def _rewrite_rocm(command):
if _has_non_torch_requirement(command) and not any("pypi.org/simple" in str(part) for part in rewritten):
# The ROCm index only mirrors torch's own dependency closure (numpy,
# pillow…), not application packages like trimesh or diffusers. A pip
- # call that mixes both still needs PyPI reachable — also when the
+ # call that mixes both still needs PyPI reachable: also when the
# extension supplied the ROCm index itself.
index_args += ["--extra-index-url", "https://pypi.org/simple"]
injected = index_args + list(_ROCM_SPECS)
rewritten[insert_at:insert_at] = injected
- print("[Modly setup compat] Redirected PyTorch to ROCm wheels: " + " ".join(injected), file=sys.stderr)
+ print("[three.ws Forge setup compat] Redirected PyTorch to ROCm wheels: " + " ".join(injected), file=sys.stderr)
return rewritten
def _transform_command(command):
return _strip_no_cache(_rewrite_rocm(_rewrite_command(command)))
-# Every subprocess entry point — run, call, check_call, check_output, and a
-# direct subprocess.Popen(...) — constructs the module-global Popen, so patching
+# Every subprocess entry point: run, call, check_call, check_output, and a
+# direct subprocess.Popen(...): constructs the module-global Popen, so patching
# that one class covers them all exactly once, whether the command arrives
# positionally or as the args= keyword. This also holds for code that did
# "from subprocess import run" before this launcher ran: run() still looks
diff --git a/apps/forge-desktop/electron/main/updater.ts b/apps/forge-desktop/electron/main/updater.ts
index 6a582b816..64674a7ba 100644
--- a/apps/forge-desktop/electron/main/updater.ts
+++ b/apps/forge-desktop/electron/main/updater.ts
@@ -4,15 +4,15 @@ import { logger } from './logger'
type WindowGetter = () => BrowserWindow | null
-// Les builds macOS ne sont pas signés avec un Developer ID (pas de licence Apple).
-// electron-updater valide la signature du bundle avant d'appliquer une mise à
-// jour : sur darwin il échouerait systématiquement, en boucle toutes les 2 h.
-// Les utilisateurs mac mettent donc à jour manuellement via les releases GitHub.
+// macOS builds are ad-hoc signed, not Developer ID signed. electron-updater
+// validates the bundle signature before applying an update, so on darwin it
+// would fail every time, looping every 2 hours. Mac users update by
+// downloading the new DMG from https://three.ws/forge-desktop instead.
export const updatesSupported = process.platform !== 'darwin'
export function initAutoUpdater(getWindow: WindowGetter): void {
if (!updatesSupported) {
- logger.info('[updater] Disabled on macOS (unsigned build) — manual updates only')
+ logger.info('[updater] Disabled on macOS (unsigned build), manual updates only')
return
}
@@ -29,18 +29,18 @@ export function initAutoUpdater(getWindow: WindowGetter): void {
const isPatch = rMaj === iMaj && rMin === iMin
if (isPatch) {
- logger.info(`[updater] Patch ${incoming} available — downloading`)
+ logger.info(`[updater] Patch ${incoming} available, downloading`)
autoUpdater.downloadUpdate().catch((err: Error) => {
logger.error(`[updater] Download failed: ${err.message}`)
})
} else {
- logger.info(`[updater] Major/minor update ${incoming} available — notifying renderer`)
+ logger.info(`[updater] Major/minor update ${incoming} available, notifying renderer`)
getWindow()?.webContents.send('updater:major-minor-available', { version: incoming })
}
})
autoUpdater.on('update-downloaded', (info) => {
- logger.info(`[updater] Patch ${info.version} downloaded — applying now`)
+ logger.info(`[updater] Patch ${info.version} downloaded, applying now`)
getWindow()?.webContents.send('updater:applying', { version: info.version })
// Small delay so the renderer can render the "Applying…" panel before quit
setTimeout(() => {
diff --git a/apps/forge-desktop/electron/preload/electron-api.ts b/apps/forge-desktop/electron/preload/electron-api.ts
index 33944a57c..0d5f4250d 100644
--- a/apps/forge-desktop/electron/preload/electron-api.ts
+++ b/apps/forge-desktop/electron/preload/electron-api.ts
@@ -39,13 +39,13 @@ export function createElectronApi(ipcRenderer: IpcRendererLike, webFrame: WebFra
ipcRenderer.invoke('notifications:show', title, body) as Promise<{ success: boolean; error?: string }>,
},
- // Renderer UI (zoom whole page — scales every px/rem consistently)
+ // Renderer UI (zoom whole page, scales every px/rem consistently)
ui: { setZoomFactor: (factor: number) => webFrame.setZoomFactor(factor) },
// Shell utilities
shell: { openExternal: (url: string) => ipcRenderer.invoke('shell:openExternal', url) },
- // Slicer integration — open a model in OrcaSlicer via its deeplink
+ // Slicer integration: open a model in OrcaSlicer via its deeplink
slicer: {
open: (url: string): Promise<{ success: boolean; error?: string }> =>
ipcRenderer.invoke('slicer:open', url) as Promise<{ success: boolean; error?: string }>,
@@ -103,15 +103,15 @@ export function createElectronApi(ipcRenderer: IpcRendererLike, webFrame: WebFra
ipcRenderer.invoke('fs:readScreenshotDataUrl', filename) as Promise<string>,
},
- // Secure storage — OS-level encryption for secrets (API keys, …)
+ // Secure storage, OS-level encryption for secrets (API keys, …)
secureStore: {
encrypt: (plainText: string): Promise<string> => ipcRenderer.invoke('secure:encrypt', plainText) as Promise<string>,
// null = one of our blobs that couldn't be decrypted here (different OS
- // user/machine). Never the ciphertext — see secure-store.ts.
+ // user/machine). Never the ciphertext, see secure-store.ts.
decrypt: (stored: string): Promise<string | null> => ipcRenderer.invoke('secure:decrypt', stored) as Promise<string | null>,
},
- // Agent — local LLM models
+ // Agent: local LLM models
agent: {
// Opens a file picker and copies the chosen .gguf into the agent's models folder.
addModel: (): Promise<{ success: boolean; cancelled?: boolean; fileName?: string; error?: string }> =>
diff --git a/apps/forge-desktop/launch.sh b/apps/forge-desktop/launch.sh
index 56955d89b..fddd500a7 100644
--- a/apps/forge-desktop/launch.sh
+++ b/apps/forge-desktop/launch.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-echo " Modly — Production Launcher"
+echo " three.ws Forge, Production Launcher"
echo "================================"
echo
@@ -26,5 +26,5 @@ if [ ! -d "out" ]; then
fi
# Launch
-echo "Launching Modly..."
+echo "Launching three.ws Forge..."
npm run preview
diff --git a/apps/forge-desktop/package-lock.json b/apps/forge-desktop/package-lock.json
index d7b522f68..69d44db83 100644
--- a/apps/forge-desktop/package-lock.json
+++ b/apps/forge-desktop/package-lock.json
@@ -1,12 +1,13 @@
{
- "name": "modly",
- "version": "0.4.2",
+ "name": "three-ws-forge",
+ "version": "0.5.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "modly",
- "version": "0.4.2",
+ "name": "three-ws-forge",
+ "version": "0.5.0",
+ "license": "MIT",
"dependencies": {
"@electron-toolkit/utils": "^4.0.0",
"@mkkellogg/gaussian-splats-3d": "^0.4.7",
diff --git a/apps/forge-desktop/package.json b/apps/forge-desktop/package.json
index 8c3a985b6..d661d5457 100644
--- a/apps/forge-desktop/package.json
+++ b/apps/forge-desktop/package.json
@@ -1,22 +1,22 @@
{
- "name": "modly",
- "version": "0.4.3",
- "description": "Local AI-powered 3D mesh generation from images",
+ "name": "three-ws-forge",
+ "version": "0.5.0",
+ "description": "three.ws Forge: local and cloud image-to-3D generation, node workflows, and publishing to three.ws",
"main": "./out/main/index.js",
- "author": "Modly",
+ "author": "three.ws",
"private": true,
"scripts": {
"dev": "node scripts/build-builtins.mjs && electron-vite dev",
"build": "node scripts/build-builtins.mjs && electron-vite build",
"preview": "electron-vite preview",
- "prepare": "node scripts/setup-hooks.mjs",
"prepare-resources": "node scripts/download-python-embed.js",
"test": "npm run test:py && npm run test:node",
"test:py": "node scripts/run-pytests.mjs",
"test:node": "node --test --experimental-strip-types --experimental-loader ./scripts/node-ts-extensionless-loader.mjs src/shared/types/assetLibrary.test.ts src/areas/generate/assetLibraryProjection.test.ts src/areas/generate/assetLibraryService.test.ts src/areas/generate/assetLibraryUi.test.ts src/areas/generate/orcaSlicerLink.test.ts electron/main/artifact-registry-service.test.ts electron/main/extension-path-guard.test.ts electron/preload/artifact-registry-preload.test.ts && node --test electron/main/*.test.mjs src/**/*.test.mjs",
"package": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false npm run build && npm run prepare-resources && electron-builder",
"package:mac": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false npm run build && npm run prepare-resources && electron-builder --mac --arm64",
- "lint": "eslint ."
+ "lint": "eslint .",
+ "icons": "node scripts/make-icons.mjs"
},
"dependencies": {
"@electron-toolkit/utils": "^4.0.0",
@@ -62,14 +62,15 @@
"esbuild": "^0.28.0"
},
"build": {
- "appId": "com.modly.app",
- "productName": "Modly",
+ "appId": "ws.three.forge",
+ "productName": "three.ws Forge",
"directories": {
"output": "dist"
},
"afterPack": "scripts/after-pack.js",
"files": [
- "out/**/*"
+ "out/**/*",
+ "resources/icons/**/*"
],
"extraResources": [
{
@@ -89,19 +90,22 @@
"to": "builtin-extensions"
}
],
- "publish": {
- "provider": "github",
- "owner": "lightningpixel",
- "repo": "modly"
- },
+ "publish": [
+ {
+ "provider": "generic",
+ "url": "https://three.ws/releases/forge",
+ "channel": "latest"
+ }
+ ],
"nsis": {
"oneClick": false,
- "allowToChangeInstallationDirectory": true
+ "allowToChangeInstallationDirectory": true,
+ "shortcutName": "three.ws Forge"
},
"win": {
"target": "nsis",
"artifactName": "${productName}-Setup-${version}.${ext}",
- "icon": "resources/icons/icon.ico",
+ "icon": "resources/icons/icon.png",
"extraResources": [
{
"from": "resources/python-embed",
@@ -111,7 +115,7 @@
},
"mac": {
"target": "dmg",
- "icon": "resources/icons/icon.icns",
+ "icon": "resources/icons/icon.png",
"artifactName": "${productName}-${version}-arm64.${ext}",
"identity": null,
"category": "public.app-category.graphics-design",
@@ -130,7 +134,15 @@
"from": "resources/python-embed",
"to": "python-embed"
}
- ]
- }
- }
+ ],
+ "category": "Graphics",
+ "executableName": "three-ws-forge",
+ "maintainer": "three.ws <[email protected]>",
+ "vendor": "three.ws",
+ "synopsis": "Image-to-3D generation and mesh workflows on your machine or the three.ws cloud"
+ },
+ "copyright": "Copyright three.ws. Based on Modly by Lightning Pixel (MIT)."
+ },
+ "homepage": "https://three.ws/forge-desktop",
+ "license": "MIT"
}
diff --git a/apps/forge-desktop/resources/icons/icon.icns b/apps/forge-desktop/resources/icons/icon.icns
deleted file mode 100644
index 05dc19f06..000000000
Binary files a/apps/forge-desktop/resources/icons/icon.icns and /dev/null differ
diff --git a/apps/forge-desktop/resources/icons/icon.ico b/apps/forge-desktop/resources/icons/icon.ico
deleted file mode 100644
index 701edb593..000000000
Binary files a/apps/forge-desktop/resources/icons/icon.ico and /dev/null differ
diff --git a/apps/forge-desktop/resources/icons/icon.png b/apps/forge-desktop/resources/icons/icon.png
index 601d84f05..29d3387b3 100644
Binary files a/apps/forge-desktop/resources/icons/icon.png and b/apps/forge-desktop/resources/icons/icon.png differ
diff --git a/apps/forge-desktop/scripts/after-pack.js b/apps/forge-desktop/scripts/after-pack.js
index 37faeca02..a9b77abe7 100644
--- a/apps/forge-desktop/scripts/after-pack.js
+++ b/apps/forge-desktop/scripts/after-pack.js
@@ -1,17 +1,17 @@
// @ts-check
-// Signature ad-hoc du bundle macOS.
+// Ad-hoc signature for the macOS bundle.
//
-// Sans licence Apple Developer (99 $/an) on ne peut ni signer avec un Developer
-// ID ni notariser. Mais sur Apple Silicon, un binaire SANS AUCUNE signature
-// refuse de se lancer (ce n'est pas un simple avertissement Gatekeeper).
-// La signature ad-hoc (`--sign -`) est gratuite et lève ce blocage.
+// Without an Apple Developer ID the app can be neither Developer ID signed nor
+// notarized. On Apple Silicon, though, a binary with NO signature at all
+// refuses to launch (it is not just a Gatekeeper warning). An ad-hoc signature
+// (`--sign -`) is free and lifts that block.
//
-// Ce hook tourne APRÈS le packaging et AVANT la fabrication du DMG, donc la
-// signature est bien embarquée dans l'app distribuée. Comme `identity: null`
-// désactive la signature interne d'electron-builder, rien ne l'écrase ensuite.
+// This hook runs AFTER packaging and BEFORE the DMG is made, so the signature
+// is embedded in the distributed app. Because `identity: null` turns off
+// electron-builder's own signing, nothing overwrites it afterwards.
//
-// L'utilisateur verra quand même Gatekeeper au premier lancement
-// ("développeur non vérifié") : clic droit > Ouvrir, ou `xattr -cr` sur l'app.
+// The user still meets Gatekeeper on first launch ("unidentified developer"):
+// right click > Open, or run `xattr -cr` on the app.
const path = require('path')
const { execFileSync } = require('child_process')
@@ -24,18 +24,18 @@ exports.default = async function afterPack(context) {
`${context.packager.appInfo.productFilename}.app`
)
- // --deep est déprécié par Apple pour la signature réelle, mais reste la façon
- // standard d'ad-hoc signer récursivement les binaires imbriqués (Electron
- // Framework, helpers). Échouer ici doit casser le build : un DMG arm64 non
- // signé ne se lance pas, autant le savoir en CI plutôt que chez l'utilisateur.
+ // Apple deprecates --deep for real signing, but it remains the standard way
+ // to ad-hoc sign nested binaries recursively (Electron Framework, helpers).
+ // A failure here must fail the build: an unsigned arm64 DMG does not launch,
+ // and it is better to learn that at build time than on a user's machine.
execFileSync('codesign', ['--force', '--deep', '--sign', '-', appPath], {
stdio: 'inherit'
})
- // Vérifie que la signature est bien posée et que l'app est jugée valide.
+ // Confirm the signature is in place and the app is judged valid.
execFileSync('codesign', ['--verify', '--verbose=2', appPath], {
stdio: 'inherit'
})
- console.log(`[after-pack] Signature ad-hoc appliquée : ${appPath}`)
+ console.log(`[after-pack] Ad-hoc signature applied: ${appPath}`)
}
diff --git a/apps/forge-desktop/scripts/build-builtins.mjs b/apps/forge-desktop/scripts/build-builtins.mjs
index 2e9048854..0d723821b 100644
--- a/apps/forge-desktop/scripts/build-builtins.mjs
+++ b/apps/forge-desktop/scripts/build-builtins.mjs
@@ -36,7 +36,7 @@ for (const id of readdirSync(srcDir)) {
cpSync(manifestSrc, join(extOutDir, 'manifest.json'))
console.log(`[build-builtins] ${id}: manifest.json copied`)
} else {
- console.warn(`[build-builtins] ${id}: manifest.json missing — skipping`)
+ console.warn(`[build-builtins] ${id}: manifest.json missing, skipping`)
}
const pkgSrc = join(extSrcDir, 'package.json')
diff --git a/apps/forge-desktop/scripts/download-python-embed.js b/apps/forge-desktop/scripts/download-python-embed.js
index 25cbd011b..4d104d66a 100644
--- a/apps/forge-desktop/scripts/download-python-embed.js
+++ b/apps/forge-desktop/scripts/download-python-embed.js
@@ -8,7 +8,7 @@ const RESOURCES_DIR = path.join(__dirname, '..', 'resources')
const EMBED_DIR = path.join(RESOURCES_DIR, 'python-embed')
// python-build-standalone provides a full Python installation (includes venv + pip)
-// Used for ALL platforms — consistent behavior, no stripped-down embed issues.
+// Used for ALL platforms: consistent behavior, no stripped-down embed issues.
const PBS_VERSION = '3.11.9'
const PBS_RELEASE = '20240726'
@@ -32,7 +32,7 @@ function download(url, dest) {
console.log(`Downloading ${url} → ${dest}`)
const file = fs.createWriteStream(dest)
const request = (u) => {
- https.get(u, { headers: { 'User-Agent': 'modly-build' } }, (res) => {
+ https.get(u, { headers: { 'User-Agent': 'forge-build' } }, (res) => {
if (res.statusCode === 301 || res.statusCode === 302) {
request(res.headers.location)
return
diff --git a/apps/forge-desktop/scripts/make-icons.mjs b/apps/forge-desktop/scripts/make-icons.mjs
new file mode 100644
index 000000000..ff1e5fa7b
--- /dev/null
+++ b/apps/forge-desktop/scripts/make-icons.mjs
@@ -0,0 +1,46 @@
+#!/usr/bin/env node
+// Cuts the three.ws Forge app icon from the three.ws brand plate, so the
+// installer, the window, the taskbar and the update dialog wear the same mark
+// as every other three.ws desktop app.
+//
+// node apps/forge-desktop/scripts/make-icons.mjs # write
+// node apps/forge-desktop/scripts/make-icons.mjs --check # fail when the committed icon drifted
+//
+// Output: resources/icons/icon.png (1024px). electron-builder converts it to
+// .icns (macOS) and .ico (Windows) at package time, and the running app loads
+// it for the window and the update dialog.
+
+import { createHash } from 'node:crypto';
+import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
+import { createRequire } from 'node:module';
+import { dirname, join, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const HERE = dirname(fileURLToPath(import.meta.url));
+const APP = resolve(HERE, '..');
+const REPO = resolve(APP, '../..');
+const PLATE = join(REPO, 'apple/macos/ThreeWSGlance/Assets.xcassets/AppIcon.appiconset/[email protected]');
+const OUT = join(APP, 'resources/icons/icon.png');
+
+// sharp is a dependency of the monorepo root, not of this app.
+const sharp = createRequire(join(REPO, 'package.json'))('sharp');
+
+if (!existsSync(PLATE)) {
+ console.error(`[forge-icons] source missing: ${PLATE}`);
+ process.exit(1);
+}
+
+const produced = await sharp(PLATE).resize(1024, 1024).png({ compressionLevel: 9 }).toBuffer();
+const digest = (buf) => createHash('sha256').update(buf).digest('hex');
+
+if (process.argv.includes('--check')) {
+ if (!existsSync(OUT) || digest(readFileSync(OUT)) !== digest(produced)) {
+ console.error('[forge-icons] resources/icons/icon.png differs from the brand plate. Run: node apps/forge-desktop/scripts/make-icons.mjs');
+ process.exit(1);
+ }
+ console.log('[forge-icons] icon matches the brand plate');
+} else {
+ mkdirSync(dirname(OUT), { recursive: true });
+ writeFileSync(OUT, produced);
+ console.log(`[forge-icons] wrote resources/icons/icon.png (${produced.length} bytes)`);
+}
diff --git a/apps/forge-desktop/scripts/react-test-env.mjs b/apps/forge-desktop/scripts/react-test-env.mjs
index d2bd8d2e9..429da0fdc 100644
--- a/apps/forge-desktop/scripts/react-test-env.mjs
+++ b/apps/forge-desktop/scripts/react-test-env.mjs
@@ -5,7 +5,7 @@
* bugs the user actually sees have come from: a hook returning a fresh callback
* on every render made a modal re-run its effect forever, flickering and
* hammering the API. That class of bug is invisible to a type-checker and to
- * store-level tests — it only exists once a component renders more than once.
+ * store-level tests, it only exists once a component renders more than once.
*
* Deliberately built on jsdom + react-dom directly rather than a testing
* library: what we need is "render, re-render, count the effects", not queries
@@ -23,7 +23,7 @@ export function setupDom() {
const { window } = dom
// Node 24 defines some of these (`navigator`) as getter-only on globalThis,
- // so a plain assignment throws — go through defineProperty for all of them.
+ // so a plain assignment throws, go through defineProperty for all of them.
const define = (name, value) =>
Object.defineProperty(globalThis, name, { value, writable: true, configurable: true })
@@ -45,13 +45,13 @@ export function setupDom() {
* Bundle a source module and load it as CommonJS.
*
* `react` and `react-dom` stay external so the module under test and the test
- * file share one React instance — two copies produce "invalid hook call",
+ * file share one React instance, two copies produce "invalid hook call",
* which reads as a bug in the code under test and is not one.
*/
export function loadModule(entryPath) {
// Inside the project, not the system temp dir: the bundle keeps `react` as a
// bare require, and that only resolves from a path under this node_modules.
- const cacheRoot = resolve('node_modules/.cache/modly-react-tests')
+ const cacheRoot = resolve('node_modules/.cache/forge-react-tests')
mkdirSync(cacheRoot, { recursive: true })
const outfile = join(mkdtempSync(join(cacheRoot, 'm-')), 'module.cjs')
const result = buildSync({
@@ -68,8 +68,7 @@ export function loadModule(entryPath) {
}
/**
- * Render `element`, and hand back a way to re-render it with the same root —
- * which is the whole point: a hook that misbehaves does so on the SECOND render.
+ * Render `element`, and hand back a way to re-render it with the same root, * which is the whole point: a hook that misbehaves does so on the SECOND render.
*/
export async function mount(element) {
const require = createRequire(import.meta.url)
@@ -88,7 +87,7 @@ export async function mount(element) {
return {
container,
/** Re-render. The element is cloned by default: handed the very same
- * element object, React bails out and nothing re-renders — which silently
+ * element object, React bails out and nothing re-renders, which silently
* turns a re-render test into a no-op. */
rerender: async (next) => {
await act(async () => { root.render(next ?? cloneElement(element)) })
diff --git a/apps/forge-desktop/src/areas/generate/GeneratePage.tsx b/apps/forge-desktop/src/areas/generate/GeneratePage.tsx
index 76a131199..f8ceda333 100644
--- a/apps/forge-desktop/src/areas/generate/GeneratePage.tsx
+++ b/apps/forge-desktop/src/areas/generate/GeneratePage.tsx
@@ -96,7 +96,7 @@ function ExportDropdown({
}
// ---------------------------------------------------------------------------
-// ToolButton — icon-only toolbar button with tooltip + active state
+// ToolButton: icon-only toolbar button with tooltip + active state
// ---------------------------------------------------------------------------
function ToolButton({
@@ -384,7 +384,7 @@ function SmoothPopover({
<p className="text-[10px] text-zinc-500 uppercase tracking-wider">Smooth mesh</p>
<div className="flex flex-col gap-1.5">
- <label className="text-[10px] text-zinc-500">Iterations <span className="text-zinc-600">(1–20)</span></label>
+ <label className="text-[10px] text-zinc-500">Iterations <span className="text-zinc-600">(1-20)</span></label>
<input
type="number"
value={inputValue}
@@ -678,7 +678,7 @@ export default function GeneratePage(): JSX.Element {
const [gizmoMode, setGizmoMode] = useState<'translate' | 'rotate' | 'scale' | null>(null)
const dragging = useRef(false)
const [selectedPointLightId, setSelectedPointLightId] = useState<string | null>(null)
- // Populated by Viewer3D — undoes the latest live gizmo transform, if any.
+ // Populated by Viewer3D: undoes the latest live gizmo transform, if any.
const gizmoUndoRef = useRef<(() => boolean) | null>(null)
const lightSettings = useAppStore((s) => s.lightSettings)
@@ -716,8 +716,7 @@ export default function GeneratePage(): JSX.Element {
const hasModel = currentJob?.status === 'done' && !!currentJob.outputUrl
const showOpenInSlicer = hasModel && canOpenInOrcaSlicer(currentJob?.outputUrl)
- // Selecting a point light (from the 3D marker or the light panel list) —
- // also drops the active gizmo tool so it doesn't silently carry over from
+ // Selecting a point light (from the 3D marker or the light panel list), // also drops the active gizmo tool so it doesn't silently carry over from
// whatever was selected before. Switching selection directly (mesh →
// point light, or point light → point light) never passes through a
// fully-deselected state, so an effect keyed on the selection alone can't
@@ -764,7 +763,7 @@ export default function GeneratePage(): JSX.Element {
function handleExport(format: 'glb' | 'obj' | 'stl' | 'ply') {
if (!currentJob?.outputUrl) return
- const stem = `modly-${Date.now()}`
+ const stem = `forge-${Date.now()}`
const link = document.createElement('a')
if (format === 'glb') {
link.href = `${apiUrl}${currentJob.outputUrl}`
@@ -1178,7 +1177,7 @@ export default function GeneratePage(): JSX.Element {
</>
)}
- {/* Light — always visible, pushed to the right */}
+ {/* Light, always visible, pushed to the right */}
<div className="relative ml-auto">
<button
onClick={() => setOpenPanel((p) => (p === 'light' ? null : 'light'))}
@@ -1215,7 +1214,7 @@ export default function GeneratePage(): JSX.Element {
</div>
</div>
- {/* Tools bar — always visible; transform tools appear once a mesh is selected */}
+ {/* Tools bar, always visible; transform tools appear once a mesh is selected */}
<div className="flex items-center gap-2 px-3 h-10 border-b border-zinc-800 bg-surface-400 shrink-0">
{(meshSelected || selectedPointLightId) && (
<>
diff --git a/apps/forge-desktop/src/areas/generate/components/ChatPanel.tsx b/apps/forge-desktop/src/areas/generate/components/ChatPanel.tsx
index 053e780a9..66cf748ec 100644
--- a/apps/forge-desktop/src/areas/generate/components/ChatPanel.tsx
+++ b/apps/forge-desktop/src/areas/generate/components/ChatPanel.tsx
@@ -38,7 +38,7 @@ interface ActionDone {
const COLLAPSE_AFTER = 4
-// ─── Prose renderer — basic markdown-like ────────────────────────────────────
+// ─── Prose renderer, basic markdown-like ────────────────────────────────────
function ProseMessage({ content }: { content: string }): JSX.Element {
const blocks = content.split(/\n\n+/)
@@ -415,7 +415,7 @@ export default function ChatPanel(): JSX.Element {
}
} catch (e: unknown) {
const msg = e instanceof Error ? e.message : String(e)
- setError(msg.includes('fetch') ? 'Cannot reach Modly API. Is the backend running?' : msg)
+ setError(msg.includes('fetch') ? 'Cannot reach three.ws Forge API. Is the backend running?' : msg)
} finally {
setIsLoading(false)
}
@@ -559,7 +559,7 @@ export default function ChatPanel(): JSX.Element {
</div>
))}
- {/* Workflow progress card — visible while agent waits for workflow */}
+ {/* Workflow progress card, visible while agent waits for workflow */}
{pendingWorkflow && <WorkflowProgressCard name={pendingWorkflow.name} />}
{/* Loading indicator */}
@@ -619,7 +619,7 @@ export default function ChatPanel(): JSX.Element {
value={input}
onChange={(e) => { setInput(e.target.value); adjustHeight() }}
onKeyDown={handleKeyDown}
- placeholder="Ask Modly…"
+ placeholder="Ask three.ws Forge…"
rows={1}
spellCheck={false}
className="w-full bg-transparent text-[12.5px] text-zinc-200 placeholder-zinc-600 focus:outline-none resize-none leading-relaxed overflow-hidden"
@@ -663,9 +663,9 @@ export default function ChatPanel(): JSX.Element {
{showModelPicker && (
<div className="absolute bottom-full mb-2 left-0 z-50 bg-zinc-900 border border-zinc-700/60 rounded-xl shadow-xl overflow-hidden min-w-[180px]">
{!isLocal ? (
- <p className="px-3 py-2.5 text-[11px] text-zinc-500">{PROVIDERS[provider].label} — change the model in Settings → Agent.</p>
+ <p className="px-3 py-2.5 text-[11px] text-zinc-500">{PROVIDERS[provider].label}, change the model in Settings → Agent.</p>
) : localModels.length === 0 ? (
- <p className="px-3 py-2.5 text-[11px] text-zinc-500">No local model downloaded — open Settings → Agent.</p>
+ <p className="px-3 py-2.5 text-[11px] text-zinc-500">No local model downloaded, open Settings → Agent.</p>
) : (
localModels.map((m) => (
<button
diff --git a/apps/forge-desktop/src/areas/generate/components/GenerationHUD.tsx b/apps/forge-desktop/src/areas/generate/components/GenerationHUD.tsx
index 6a9314e5a..8e94e6f2f 100644
--- a/apps/forge-desktop/src/areas/generate/components/GenerationHUD.tsx
+++ b/apps/forge-desktop/src/areas/generate/components/GenerationHUD.tsx
@@ -60,7 +60,7 @@ export default function GenerationHUD(): JSX.Element | null {
const isActive = status === 'uploading' || status === 'generating'
const isVisible = status === 'uploading' || status === 'generating' || status === 'error'
- // Elapsed timer — based on currentJob.createdAt so it survives navigation
+ // Elapsed timer: based on currentJob.createdAt so it survives navigation
useEffect(() => {
if (isActive && currentJob?.createdAt) {
const id = setInterval(() => {
@@ -72,7 +72,7 @@ export default function GenerationHUD(): JSX.Element | null {
}
}, [isActive, currentJob?.createdAt])
- // tqdm log listener — parse to "Verbing (N%)" and skip non-progress noise
+ // tqdm log listener, parse to "Verbing (N%)" and skip non-progress noise
useEffect(() => {
if (isActive) {
setTqdmLog(null)
diff --git a/apps/forge-desktop/src/areas/generate/components/GenerationPanel.tsx b/apps/forge-desktop/src/areas/generate/components/GenerationPanel.tsx
index d9f4c17c4..95716a369 100644
--- a/apps/forge-desktop/src/areas/generate/components/GenerationPanel.tsx
+++ b/apps/forge-desktop/src/areas/generate/components/GenerationPanel.tsx
@@ -24,7 +24,7 @@ export default function GenerationPanel(): JSX.Element {
const status = currentJob?.status
const isActive = status === 'uploading' || status === 'generating'
- // Elapsed timer — starts when generation begins, resets on idle
+ // Elapsed timer: starts when generation begins, resets on idle
useEffect(() => {
if (isActive) {
if (!startRef.current) startRef.current = Date.now()
diff --git a/apps/forge-desktop/src/areas/generate/components/ImageUpload.tsx b/apps/forge-desktop/src/areas/generate/components/ImageUpload.tsx
index f5284f7d3..8d17e7335 100644
--- a/apps/forge-desktop/src/areas/generate/components/ImageUpload.tsx
+++ b/apps/forge-desktop/src/areas/generate/components/ImageUpload.tsx
@@ -35,7 +35,7 @@ export default function ImageUpload(): JSX.Element {
setSelectedImageData(null)
setSelectedImagePath(filePath)
} else {
- // file.path unavailable (some Electron configs) — read directly via FileReader
+ // file.path unavailable (some Electron configs), read directly via FileReader
const reader = new FileReader()
reader.onload = (ev) => {
const dataUrl = ev.target?.result as string
diff --git a/apps/forge-desktop/src/areas/generate/components/SplatViewer.tsx b/apps/forge-desktop/src/areas/generate/components/SplatViewer.tsx
index 5e4027668..22ebd976c 100644
--- a/apps/forge-desktop/src/areas/generate/components/SplatViewer.tsx
+++ b/apps/forge-desktop/src/areas/generate/components/SplatViewer.tsx
@@ -8,7 +8,7 @@ export interface SplatViewerHandle {
}
// ---------------------------------------------------------------------------
-// X/Y/Z orientation gizmo — a tiny overlay Canvas synced to the splat camera.
+// X/Y/Z orientation gizmo, a tiny overlay Canvas synced to the splat camera.
// mkkellogg runs outside R3F, so the mesh viewer's drei GizmoHelper can't be
// reused; this mirrors its look (coloured axis bubbles) driven by the live
// camera quaternion.
@@ -162,7 +162,7 @@ function frameSplatToView(viewer: any, grid: THREE.GridHelper): void {
}
// ---------------------------------------------------------------------------
-// SplatViewer — self-contained Gaussian-Splatting viewer (mkkellogg, outside
+// SplatViewer: self-contained Gaussian-Splatting viewer (mkkellogg, outside
// R3F). It owns its own canvas / scene / camera / controls, so nothing from the
// mesh viewer's pipeline can interfere. Fed a normalised binary .splat.
// ---------------------------------------------------------------------------
@@ -210,7 +210,7 @@ const SplatViewer = forwardRef<SplatViewerHandle, { url: string; autoRotate: boo
selfDrivenMode: true,
useBuiltInControls: true,
sharedMemoryForWorkers: false, // no cross-origin isolation in Electron/Vite
- gpuAcceleratedSort: false, // CPU sort — most robust across GPUs/Electron
+ gpuAcceleratedSort: false, // CPU sort, most robust across GPUs/Electron
// Frame like the mesh viewer: look at the model's centre (feet at y=0,
// head ≈ 2), from the front. This splat faces −Z after the 180° Z flip,
// so the camera sits on the −Z side to show the face, not the back.
@@ -221,7 +221,7 @@ const SplatViewer = forwardRef<SplatViewerHandle, { url: string; autoRotate: boo
viewerRef.current = viewer
// Match the mesh viewer's framing: mkkellogg defaults to fov 65, the mesh
- // Canvas uses 45 — the wider fov made the splat look smaller / distorted.
+ // Canvas uses 45: the wider fov made the splat look smaller / distorted.
if (viewer.camera) {
viewer.camera.fov = 45
viewer.camera.updateProjectionMatrix()
@@ -236,7 +236,7 @@ const SplatViewer = forwardRef<SplatViewerHandle, { url: string; autoRotate: boo
format: GaussianSplats3D.SceneFormat.Splat,
showLoadingUI: false,
progressiveLoad: false,
- rotation: [0, 0, 1, 0], // 180° about Z — 3DGS is Y-down; stands it upright while keeping the front toward the camera (X-mirror is invisible on a symmetric model)
+ rotation: [0, 0, 1, 0], // 180° about Z, 3DGS is Y-down; stands it upright while keeping the front toward the camera (X-mirror is invisible on a symmetric model)
})
.then(() => {
if (disposed) return
diff --git a/apps/forge-desktop/src/areas/generate/components/Viewer3D.tsx b/apps/forge-desktop/src/areas/generate/components/Viewer3D.tsx
index a2621cc64..438a6db37 100644
--- a/apps/forge-desktop/src/areas/generate/components/Viewer3D.tsx
+++ b/apps/forge-desktop/src/areas/generate/components/Viewer3D.tsx
@@ -8,7 +8,7 @@ import * as THREE from 'three'
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js'
import { computeBoundsTree, disposeBoundsTree, acceleratedRaycast } from 'three-mesh-bvh'
-// Patch THREE pour utiliser BVH sur tous les meshes — réduit le raycast O(N) → O(log N)
+// Patch THREE to use a BVH on every mesh, cutting raycasts from O(N) to O(log N)
THREE.BufferGeometry.prototype.computeBoundsTree = computeBoundsTree as any
THREE.BufferGeometry.prototype.disposeBoundsTree = disposeBoundsTree as any
THREE.Mesh.prototype.raycast = acceleratedRaycast
@@ -76,7 +76,7 @@ function makeLightBulbTexture(color: string, isSelected: boolean): THREE.CanvasT
const cy = size / 2
// Draws the bulb glyph (rays + circle + base). `pad` grows every part by a
- // few pixels — used to lay down an oversized violet silhouette behind the
+ // few pixels, used to lay down an oversized violet silhouette behind the
// normal-sized icon, so the outline hugs the actual glyph shape instead of
// being a plain circle around it.
const drawGlyph = (fillColor: string, pad: number) => {
@@ -119,7 +119,7 @@ function makeLightBulbTexture(color: string, isSelected: boolean): THREE.CanvasT
}
// ---------------------------------------------------------------------------
-// CanvasCapture — exposes gl.domElement ref outside Canvas
+// CanvasCapture: exposes gl.domElement ref outside Canvas
// ---------------------------------------------------------------------------
function CanvasCapture({
@@ -136,7 +136,7 @@ function CanvasCapture({
}
// ---------------------------------------------------------------------------
-// ModelErrorBoundary — catches useGLTF load failures (e.g. 404)
+// ModelErrorBoundary: catches useGLTF load failures (e.g. 404)
// ---------------------------------------------------------------------------
interface ErrorBoundaryProps {
@@ -274,7 +274,7 @@ function SceneMeshModel({
}
}, [scene])
- // Centre the mesh on the grid. Runs only on first load / model change — never
+ // Centre the mesh on the grid. Runs only on first load / model change, never
// on plain re-renders, so a live gizmo transform is not silently overwritten.
useEffect(() => {
// Clear any cached transform before measuring (useGLTF may reuse a scene
@@ -329,7 +329,7 @@ function SceneMeshModel({
break
}
case 'normals':
- // Ensure vertex normals exist — AI-generated meshes often skip this
+ // Ensure vertex normals exist, AI-generated meshes often skip this
child.geometry.computeVertexNormals()
next = new THREE.MeshNormalMaterial({ side: THREE.DoubleSide })
break
@@ -359,7 +359,7 @@ function SceneMeshModel({
}
// ---------------------------------------------------------------------------
-// Orientation gizmo — coloured bubbles only (X/Y/Z)
+// Orientation gizmo: coloured bubbles only (X/Y/Z)
// ---------------------------------------------------------------------------
function makeAxisLabelTexture(letter: string, bg: string): THREE.CanvasTexture {
@@ -432,7 +432,7 @@ function GizmoBubbles() {
}
// ---------------------------------------------------------------------------
-// Transform gizmos — custom move / rotate / scale handles (shared style)
+// Transform gizmos: custom move / rotate / scale handles (shared style)
// ---------------------------------------------------------------------------
type GizmoAxis = 'x' | 'y' | 'z'
@@ -584,7 +584,7 @@ function GizmoScaleArm({ color, active }: { color: string; active: boolean }): J
const tint = active ? lightenColor(color) : color
return (
<group>
- {/* Invisible, fat hit target — starts above the centre cube so a
+ {/* Invisible, fat hit target, starts above the centre cube so a
centre click hits the uniform-scale handle, not an axis */}
<mesh position={[0, 0.6, 0]}>
<cylinderGeometry args={[0.09, 0.09, 0.8, 8]} />
@@ -690,7 +690,7 @@ function TranslateGizmo({ object, onDragStart, onDragEnd }: { object: THREE.Obje
return (
<group ref={groupRef} renderOrder={999}>
- {/* Central origin handle (decorative — never blocks picking) */}
+ {/* Central origin handle (decorative, never blocks picking) */}
<mesh raycast={() => null} renderOrder={999}>
<sphereGeometry args={[0.05, 20, 20]} />
<meshBasicMaterial color="#e4e4e7" toneMapped={false} transparent depthTest={false} depthWrite={false} />
@@ -777,7 +777,7 @@ function ScaleGizmo({ object, onDragStart, onDragEnd }: { object: THREE.Object3D
e.stopPropagation()
const origin = new THREE.Vector3()
object.getWorldPosition(origin)
- // World length of one local unit — maps drag distance to a sensible factor.
+ // World length of one local unit, maps drag distance to a sensible factor.
const armLength = Math.max(groupRef.current?.scale.x ?? 1, 1e-4)
let axisDir: THREE.Vector3 | null = null
@@ -823,7 +823,7 @@ function ScaleGizmo({ object, onDragStart, onDragEnd }: { object: THREE.Object3D
return (
<group ref={groupRef} renderOrder={999}>
- {/* Central cube — uniform scale */}
+ {/* Central cube, uniform scale */}
<mesh {...hoverHandlers<ScaleHandleId>('xyz', setHovered, (e) => beginDrag('xyz', e))} renderOrder={999}>
<boxGeometry args={[0.12, 0.12, 0.12]} />
<meshBasicMaterial color={uniformActive ? lightenColor('#e4e4e7') : '#e4e4e7'} toneMapped={false} transparent depthTest={false} depthWrite={false} />
@@ -839,7 +839,7 @@ function ScaleGizmo({ object, onDragStart, onDragEnd }: { object: THREE.Object3D
}
// ---------------------------------------------------------------------------
-// PointLightMarker — renders a point light + billboard icon + optional gizmo
+// PointLightMarker: renders a point light + billboard icon + optional gizmo
// ---------------------------------------------------------------------------
function PointLightMarker({
@@ -960,7 +960,7 @@ export default function Viewer3D({
// plys are converted to GLB on import and workflow mesh outputs are .glb.
const isSplat = /\.(ply|splat)$/i.test(outputUrl)
- // The splat viewer needs binary .splat — route raw workspace .ply through the
+ // The splat viewer needs binary .splat, route raw workspace .ply through the
// conversion endpoint; import URLs already point at a .splat via serve-file.
const splatUrl = outputUrl.startsWith('/workspace/')
? `${apiUrl}/optimize/ply-to-splat?path=${encodeURIComponent(outputUrl.slice('/workspace/'.length))}`
@@ -974,7 +974,7 @@ export default function Viewer3D({
// eslint-disable-next-line react-hooks/exhaustive-deps -- reset only when the model changes; setters are stable
}, [modelUrl])
- // Clear the shared selection when the viewer unmounts — the store would
+ // Clear the shared selection when the viewer unmounts, the store would
// otherwise keep it set and flash a stale selection on the next mount.
useEffect(() => () => setSelected(false), [setSelected])
@@ -1010,7 +1010,7 @@ export default function Viewer3D({
: canvasRef.current?.toDataURL('image/png') ?? null
if (!dataUrl) return
const link = document.createElement('a')
- link.download = `modly-${Date.now()}.png`
+ link.download = `forge-${Date.now()}.png`
link.href = dataUrl
link.click()
}
@@ -1107,7 +1107,7 @@ export default function Viewer3D({
outputColorSpace: THREE.SRGBColorSpace,
}}
>
- <color attach="background" args={['#18181b']} />
+ <color attach="background" args={['#1a1a1a']} />
<CanvasCapture domRef={canvasRef} />
<ambientLight intensity={lightSettings.ambientIntensity ?? DEFAULT_LIGHT_SETTINGS.ambientIntensity} />
<Environment background={false}>
@@ -1183,7 +1183,7 @@ export default function Viewer3D({
</Canvas>
)}
- {/* Left toolbar — visible only when a model is loaded */}
+ {/* Left toolbar, visible only when a model is loaded */}
{modelUrl && (
<ViewerToolbar
viewMode={viewMode}
diff --git a/apps/forge-desktop/src/areas/generate/components/WorkflowPanel.tsx b/apps/forge-desktop/src/areas/generate/components/WorkflowPanel.tsx
index 14b257815..3b0cb800e 100644
--- a/apps/forge-desktop/src/areas/generate/components/WorkflowPanel.tsx
+++ b/apps/forge-desktop/src/areas/generate/components/WorkflowPanel.tsx
@@ -413,7 +413,7 @@ function ExtensionParamRow({ nodeId, ext, nodes, onPatch }: { nodeId: string; ex
onClick={() => openExtension(ext.extensionId)}
className="mt-1 text-[10px] text-amber-400 hover:text-amber-300 hover:underline"
>
- Not installed — install it
+ Not installed: install it
</button>
)}
</div>
@@ -438,7 +438,7 @@ function EmbeddedCanvas({ workflow, allExtensions }: {
const { navigate } = useNavStore()
const saveTimer = useRef<ReturnType<typeof setTimeout> | null>(null)
- // Direct patch into controlled nodes state — no React Flow store dependency
+ // Direct patch into controlled nodes state, no React Flow store dependency
const patchNode = useCallback<PatchFn>((nodeId, patch) => {
setNodes((nds) => nds.map((n) =>
n.id === nodeId ? { ...n, data: { ...n.data, ...patch } } : n,
@@ -463,8 +463,8 @@ function EmbeddedCanvas({ workflow, allExtensions }: {
}, [workflow.updatedAt])
// Persist to the store and claim the echo so the sync effect above does not
- // treat our own write as an external change. The claim is optimistic — the store
- // is updated before save() resolves — and is rolled back when the write fails, so
+ // treat our own write as an external change. The claim is optimistic, the store
+ // is updated before save() resolves, and is rolled back when the write fails, so
// a failed save never silently replaces the canvas with the last persisted version.
const saveAndClaim = useCallback((updated: Workflow) => {
const prevSyncedAt = lastSyncedAtRef.current
@@ -475,7 +475,7 @@ function EmbeddedCanvas({ workflow, allExtensions }: {
}, [])
// Debounced save to the store when local state changes (Generate→Workflows)
- // No cleanup return — lets the timer fire even if user navigates away
+ // No cleanup return: lets the timer fire even if user navigates away
useEffect(() => {
if (!didMountRef.current) { didMountRef.current = true; return }
if (saveTimer.current) clearTimeout(saveTimer.current)
@@ -511,7 +511,7 @@ function EmbeddedCanvas({ workflow, allExtensions }: {
const firstPreflightIssue = preflightIssues[0]?.message ?? null
- // Ordered nodes for params list — only those marked showInGenerate
+ // Ordered nodes for params list: only those marked showInGenerate
const sortedNodes = useMemo(
() => topoSortNodes(nodes as WFNode[], edges as WFEdge[]),
[nodes, edges],
@@ -528,7 +528,7 @@ function EmbeddedCanvas({ workflow, allExtensions }: {
return
}
// Persist the edited params so they survive remounts and are the values actually used.
- // Drop the pending debounce — this save supersedes it.
+ // Drop the pending debounce: this save supersedes it.
if (saveTimer.current) { clearTimeout(saveTimer.current); saveTimer.current = null }
const wf: Workflow = {
...workflow,
diff --git a/apps/forge-desktop/src/areas/generate/orcaSlicerLink.test.ts b/apps/forge-desktop/src/areas/generate/orcaSlicerLink.test.ts
index 514618eb2..3375b04d0 100644
--- a/apps/forge-desktop/src/areas/generate/orcaSlicerLink.test.ts
+++ b/apps/forge-desktop/src/areas/generate/orcaSlicerLink.test.ts
@@ -53,7 +53,7 @@ test('canOpenInOrcaSlicer accepts sliceable workspace meshes and rejects splats
test('canOpenInOrcaSlicer accepts an imported mesh served from outside the workspace', () => {
// `Import` serves user-picked files through /optimize/serve-file, never from
- // the workspace — excluding those made the action invisible for the most
+ // the workspace, excluding those made the action invisible for the most
// direct "I have a model, slice it" path.
assert.equal(canOpenInOrcaSlicer('/optimize/serve-file?path=%2Ftmp%2Fx.glb'), true)
assert.equal(canOpenInOrcaSlicer('/optimize/serve-file?path=C%3A%5CUsers%5CMe%5Cmage.glb'), true)
diff --git a/apps/forge-desktop/src/areas/generate/orcaSlicerLink.ts b/apps/forge-desktop/src/areas/generate/orcaSlicerLink.ts
index d5a76c9b1..91bebee01 100644
--- a/apps/forge-desktop/src/areas/generate/orcaSlicerLink.ts
+++ b/apps/forge-desktop/src/areas/generate/orcaSlicerLink.ts
@@ -1,8 +1,7 @@
// Builds the OrcaSlicer deeplink for a generated mesh.
//
// OrcaSlicer registers the `orcaslicer://open?file=<url>` scheme; its handler
-// downloads the http(s) URL in `file=` and imports it, deriving the filename —
-// and therefore the mesh format — from the URL's FINAL path segment. That means
+// downloads the http(s) URL in `file=` and imports it, deriving the filename,// and therefore the mesh format, from the URL's FINAL path segment. That means
// the served URL must be path-only and end in a real `model.<ext>` with NO
// query string, and the whole thing must be percent-encoded. OrcaSlicer cannot
// import GLB, so we point at the backend's slicer-export route which converts to
@@ -20,7 +19,7 @@ const SERVE_FILE_PREFIX = '/optimize/serve-file?path='
*/
const SLICEABLE_SOURCE = /\.(glb|gltf|obj|stl)$/i
-/** URL-safe base64 (no padding) of a UTF-8 string — matches the API's token decode. */
+/** URL-safe base64 (no padding) of a UTF-8 string, matches the API's token decode. */
export function encodeWorkspacePathToken(workspacePath: string): string {
const bytes = new TextEncoder().encode(workspacePath)
let binary = ''
@@ -34,7 +33,7 @@ export function encodeWorkspacePathToken(workspacePath: string): string {
*
* Two output shapes reach the viewer: a workspace URL (generated or
* workflow-produced meshes) and a `serve-file` URL (meshes the user imported
- * from elsewhere on disk). Both are sliceable — the API accepts the absolute
+ * from elsewhere on disk). Both are sliceable, the API accepts the absolute
* path of an import because it recorded that the user picked it themselves.
*/
function sliceableSourcePath(outputUrl: string | undefined): string | undefined {
@@ -65,9 +64,9 @@ export function canOpenInOrcaSlicer(outputUrl: string | undefined): boolean {
/**
* Build the `orcaslicer://open?file=...` deeplink for a generated mesh.
*
- * @param apiUrl Modly backend origin, e.g. `http://localhost:8765`
+ * @param apiUrl three.ws Forge backend origin, e.g. `http://localhost:8765`
* @param outputUrl workspace or serve-file URL of the mesh
- * @throws if `outputUrl` is not sliceable — guard with {@link canOpenInOrcaSlicer}
+ * @throws if `outputUrl` is not sliceable, guard with {@link canOpenInOrcaSlicer}
*/
export function buildOrcaSlicerDeepLink(apiUrl: string, outputUrl: string): string {
const sourcePath = sliceableSourcePath(outputUrl)
diff --git a/apps/forge-desktop/src/areas/models/ModelsPage.tsx b/apps/forge-desktop/src/areas/models/ModelsPage.tsx
index 7688474c1..8c165cfb5 100644
--- a/apps/forge-desktop/src/areas/models/ModelsPage.tsx
+++ b/apps/forge-desktop/src/areas/models/ModelsPage.tsx
@@ -22,7 +22,7 @@ const FILTERS: { id: FilterId; label: string }[] = [
]
const SORTS: { id: SortId; label: string }[] = [
- { id: 'name', label: 'Name (A–Z)' },
+ { id: 'name', label: 'Name (A-Z)' },
{ id: 'type', label: 'Type' },
]
@@ -86,7 +86,7 @@ export default function ModelsPage(): JSX.Element {
// ── Init ──────────────────────────────────────────────────────────────────
- // Check each model node individually via filesystem IPC — reliable regardless of API state
+ // Check each model node individually via filesystem IPC, reliable regardless of API state
async function refreshInstalledIds(exts: ModelExtension[]) {
const revision = ++installedRefreshRevision.current
const ids: string[] = []
@@ -611,7 +611,7 @@ export default function ModelsPage(): JSX.Element {
<div className="text-center">
<p className="text-sm font-medium text-zinc-400">No extensions installed</p>
<p className="text-xs text-zinc-600 mt-1">
- Install from GitHub or drop into the Modly extensions directory.
+ Install from GitHub or drop into the three.ws Forge extensions directory.
</p>
</div>
</div>
diff --git a/apps/forge-desktop/src/areas/models/components/ExtensionCard.tsx b/apps/forge-desktop/src/areas/models/components/ExtensionCard.tsx
index 5ceb729a8..9b66b4cc6 100644
--- a/apps/forge-desktop/src/areas/models/components/ExtensionCard.tsx
+++ b/apps/forge-desktop/src/areas/models/components/ExtensionCard.tsx
@@ -65,7 +65,7 @@ export function ExtensionCard({
tabIndex={0}
onClick={handleOpen}
onKeyDown={handleKey}
- aria-label={`${ext.name} — open details`}
+ aria-label={`${ext.name}, open details`}
className="relative flex flex-col min-h-[218px] p-4 rounded-2xl bg-zinc-900/60 border border-zinc-800 overflow-hidden cursor-pointer transition-all duration-150 hover:bg-zinc-900 hover:border-zinc-700 hover:-translate-y-0.5 hover:shadow-[0_14px_30px_-14px_rgba(0,0,0,0.7)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent"
>
{/* Header */}
@@ -103,7 +103,7 @@ export function ExtensionCard({
{/* Description */}
<p className="mt-3 text-xs leading-5 text-zinc-500 line-clamp-2 min-h-[2.5rem]">
- {ext.description?.trim() || '—'}
+ {ext.description?.trim() || '-'}
</p>
{/* Load error */}
diff --git a/apps/forge-desktop/src/areas/models/components/ExtensionDrawer.tsx b/apps/forge-desktop/src/areas/models/components/ExtensionDrawer.tsx
index 949d7de3e..e44dad857 100644
--- a/apps/forge-desktop/src/areas/models/components/ExtensionDrawer.tsx
+++ b/apps/forge-desktop/src/areas/models/components/ExtensionDrawer.tsx
@@ -51,7 +51,7 @@ export function ExtensionDrawer({
const isModel = ext.type === 'model'
// Built-ins are corrupted-flagged too (builtin-sync repairs them on restart),
- // but they can't be deleted — show the banner without the delete action.
+ // but they can't be deleted, show the banner without the delete action.
const isCorrupted = !!ext.corrupted
const canRepair = isExtensionRepairable(ext)
const corruptedMsg =
@@ -59,7 +59,7 @@ export function ExtensionDrawer({
? 'This extension folder has a manifest that cannot be parsed. Fix the JSON syntax in its manifest.json, or delete the folder and reinstall.'
: ext.manifestError === 'incomplete'
? 'Setup or runtime registration was interrupted. Click Repair to rebuild and validate the extension, or delete it and reinstall.'
- : 'This extension folder is incomplete (its manifest is missing) — usually the leftover of an interrupted install. Delete the folder, then install the extension again.'
+ : 'This extension folder is incomplete (its manifest is missing), usually the leftover of an interrupted install. Delete the folder, then install the extension again.'
const isLocal = typeof ext.source === 'string' && ext.source.startsWith('local://')
const localPath = isLocal ? ext.source!.replace('local://', '') : null
const { total, done, installing, hasAvailable } = extInstallSummary(ext, installedIds, downloading)
@@ -170,7 +170,7 @@ export function ExtensionDrawer({
<div className="min-w-0">
<p className="text-[12px] font-semibold text-amber-400">Corrupted installation</p>
<p className="text-[11px] leading-5 text-amber-400/80 mt-1">
- {ext.builtin ? 'This built-in extension folder is damaged — restart Modly to let it re-sync.' : corruptedMsg}
+ {ext.builtin ? 'This built-in extension folder is damaged, restart three.ws Forge to let it re-sync.' : corruptedMsg}
</p>
</div>
</div>
@@ -295,7 +295,7 @@ export function ExtensionDrawer({
</div>
</div>
- {/* Weight variants — each one installs and deletes on its own */}
+ {/* Weight variants, each one installs and deletes on its own */}
{variants && (
<div className="mt-3 pt-2.5 border-t border-zinc-800/80 flex flex-col gap-1.5">
{variants.options.map((option) => {
@@ -380,12 +380,12 @@ export function ExtensionDrawer({
<div className="text-[10.5px] font-semibold uppercase tracking-[0.07em] text-zinc-600 mb-2.5">Details</div>
<dl className="grid grid-cols-[1fr_auto] gap-x-3.5 gap-y-2.5 text-xs">
<dt className="text-zinc-600">Author</dt>
- <dd className="text-zinc-400 text-right font-mono text-[11.5px]">{ext.author ?? '—'}</dd>
+ <dd className="text-zinc-400 text-right font-mono text-[11.5px]">{ext.author ?? '-'}</dd>
<dt className="text-zinc-600">Version</dt>
- <dd className="text-zinc-400 text-right font-mono text-[11.5px]">{ext.version ? `v${ext.version}` : '—'}</dd>
+ <dd className="text-zinc-400 text-right font-mono text-[11.5px]">{ext.version ? `v${ext.version}` : '-'}</dd>
<dt className="text-zinc-600">Source</dt>
<dd className="text-zinc-400 text-right font-mono text-[11.5px] max-w-[230px] truncate" style={{ direction: 'rtl' }} title={localPath ?? ext.source ?? undefined}>
- {localPath ?? ext.source ?? (ext.builtin ? 'Built-in' : '—')}
+ {localPath ?? ext.source ?? (ext.builtin ? 'Built-in' : '-')}
</dd>
<dt className="text-zinc-600">Nodes</dt>
<dd className="text-zinc-400 text-right font-mono text-[11.5px]">{ext.nodes.length}</dd>
@@ -433,7 +433,7 @@ export function ExtensionDrawer({
<button
onClick={handleRepair}
disabled={repairing || disabled}
- title="Repair — re-run the extension environment setup"
+ title="Repair, re-run the extension environment setup"
className="inline-flex items-center gap-1.5 px-3.5 py-2.5 rounded-[9px] text-xs font-medium border border-zinc-700/60 text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800 transition-colors disabled:opacity-40 disabled:cursor-not-allowed"
>
{repairing ? (
@@ -451,7 +451,7 @@ export function ExtensionDrawer({
<button
onClick={handleSync}
disabled={syncing || disabled}
- title="Sync — reload extension from local folder"
+ title="Sync, reload extension from local folder"
className="p-2.5 rounded-[9px] border border-zinc-700/60 text-zinc-500 hover:text-orange-400 hover:bg-orange-950/30 transition-colors disabled:opacity-40 disabled:cursor-not-allowed"
>
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" className={syncing ? 'animate-spin' : ''}>
diff --git a/apps/forge-desktop/src/areas/models/components/ModelCard.tsx b/apps/forge-desktop/src/areas/models/components/ModelCard.tsx
index 753b60087..caaf0a721 100644
--- a/apps/forge-desktop/src/areas/models/components/ModelCard.tsx
+++ b/apps/forge-desktop/src/areas/models/components/ModelCard.tsx
@@ -29,7 +29,7 @@ export function ModelCard({ model, onDelete, onGenerate, disabled }: Props): JSX
{/* Size */}
<span className="text-[11px] font-medium text-zinc-400">
- {model.size_gb > 0 ? `${model.size_gb} GB` : '—'}
+ {model.size_gb > 0 ? `${model.size_gb} GB` : '-'}
</span>
{/* Actions */}
diff --git a/apps/forge-desktop/src/areas/models/utils.test.mjs b/apps/forge-desktop/src/areas/models/utils.test.mjs
index 531cfe92c..a6cd0118e 100644
--- a/apps/forge-desktop/src/areas/models/utils.test.mjs
+++ b/apps/forge-desktop/src/areas/models/utils.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-modelutils-test-')), 'utils.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-modelutils-test-')), 'utils.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/areas/models/utils.ts')],
diff --git a/apps/forge-desktop/src/areas/settings/components/AboutSection.tsx b/apps/forge-desktop/src/areas/settings/components/AboutSection.tsx
index 6ecbda131..40746ce16 100644
--- a/apps/forge-desktop/src/areas/settings/components/AboutSection.tsx
+++ b/apps/forge-desktop/src/areas/settings/components/AboutSection.tsx
@@ -13,8 +13,8 @@ export function AboutSection(): JSX.Element {
<div className="grid grid-cols-2 gap-4">
<Card>
- <Row label="Modly" description="Local 3D mesh generation app.">
- <span className="text-xs font-mono text-zinc-400">{version ? `v${version}` : '—'}</span>
+ <Row label="three.ws Forge" description="Local 3D mesh generation app.">
+ <span className="text-xs font-mono text-zinc-400">{version ? `v${version}` : '-'}</span>
</Row>
<Row label="Documentation" description="Guides and API reference.">
<LinkButton label="Open" href="https://modly3d.app" />
diff --git a/apps/forge-desktop/src/areas/settings/components/AccessibilitySection.tsx b/apps/forge-desktop/src/areas/settings/components/AccessibilitySection.tsx
index 423e63356..5618bd542 100644
--- a/apps/forge-desktop/src/areas/settings/components/AccessibilitySection.tsx
+++ b/apps/forge-desktop/src/areas/settings/components/AccessibilitySection.tsx
@@ -5,7 +5,7 @@ export function AccessibilitySection(): JSX.Element {
const { useAtkinsonFont, setUseAtkinsonFont, uiScale, setUiScale } = useAppStore()
return (
- <Section title="Accessibility" subtitle="Make Modly easier to read and use.">
+ <Section title="Accessibility" subtitle="Make three.ws Forge easier to read and use.">
<div className="grid grid-cols-2 gap-4">
<Card title="Display Font" description="Use a more legible typeface, helpful for dyslexia and low vision.">
diff --git a/apps/forge-desktop/src/areas/settings/components/AgentSection.tsx b/apps/forge-desktop/src/areas/settings/components/AgentSection.tsx
index 9376ecb47..7c7494acb 100644
--- a/apps/forge-desktop/src/areas/settings/components/AgentSection.tsx
+++ b/apps/forge-desktop/src/areas/settings/components/AgentSection.tsx
@@ -93,23 +93,23 @@ const MCP_CLIENTS: { value: McpClient; label: string; path: string; config: stri
value: 'claude',
label: 'Claude Desktop',
path: '~/.config/claude/claude_desktop_config.json',
- config: `{\n "mcpServers": {\n "modly": {\n "command": "modly-mcp"\n }\n }\n}`,
+ config: `{\n "mcpServers": {\n "three-ws-forge": {\n "command": "forge-mcp"\n }\n }\n}`,
},
{
value: 'codex',
label: 'Codex CLI',
path: '~/.codex/config.toml',
- config: `[mcp_servers.modly]\ncommand = "modly-mcp"`,
+ config: `[mcp_servers.three-ws-forge]\ncommand = "forge-mcp"`,
},
{
value: 'opencode',
label: 'OpenCode',
path: '~/.config/opencode/config.json',
- config: `{\n "$schema": "https://opencode.ai/config.json",\n "mcp": {\n "modly": {\n "type": "local",\n "command": ["modly-mcp"]\n }\n }\n}`,
+ config: `{\n "$schema": "https://opencode.ai/config.json",\n "mcp": {\n "three-ws-forge": {\n "type": "local",\n "command": ["forge-mcp"]\n }\n }\n}`,
},
]
-const MCP_INSTALL = 'npm install -g modly-cli-mcp'
+const MCP_INSTALL = 'npm install -g forge-cli-mcp'
const THINKING_OPTIONS: { value: ThinkingMode; label: string; desc: string }[] = [
{ value: 'auto', label: 'Auto', desc: 'The model decides whether to think' },
@@ -190,7 +190,7 @@ export function AgentSection(): JSX.Element {
})
const data = await res.json()
setResolvedMax(data.resolved_max_models ?? null)
- } catch { /* API unreachable — keep the optimistic value, refreshLocal will resync */ }
+ } catch { /* API unreachable, keep the optimistic value, refreshLocal will resync */ }
}
useEffect(() => { void refreshLocal() }, [refreshLocal])
@@ -238,7 +238,7 @@ export function AgentSection(): JSX.Element {
const client = MCP_CLIENTS.find((c) => c.value === mcpClient) ?? MCP_CLIENTS[0]
return (
- <Section title="Agent" subtitle="Configure the LLM powering the chat — fully local by default.">
+ <Section title="Agent" subtitle="Configure the LLM powering the chat, fully local by default.">
<div className="grid grid-cols-1 xl:grid-cols-2 gap-4 items-start">
{/* ── Left column ── */}
@@ -312,15 +312,15 @@ export function AgentSection(): JSX.Element {
) : (
<p className="px-3 py-2 rounded-lg bg-surface-500 border border-zinc-800 text-[11px] text-zinc-500">
{models.length === 0
- ? 'No model yet — open Browse… to add or download one.'
- : 'No model selected — open Browse… and select one.'}
+ ? 'No model yet, open Browse… to add or download one.'
+ : 'No model selected, open Browse… and select one.'}
</p>
)}
</Block>
<Block
label="Simultaneous models"
- hint="How many local models may stay loaded at once (one llama-server process each). Auto sizes it from your GPU's VRAM — on 8 GB cards keep 1 so 3D generation always has room."
+ hint="How many local models may stay loaded at once (one llama-server process each). Auto sizes it from your GPU's VRAM, on 8 GB cards keep 1 so 3D generation always has room."
>
<select
value={maxModels}
@@ -328,7 +328,7 @@ export function AgentSection(): JSX.Element {
className={`${inputCls} cursor-pointer`}
>
<option value="auto">
- Auto{resolvedMax != null ? ` — ${resolvedMax} model${resolvedMax > 1 ? 's' : ''}${vramGb != null ? ` (${vramGb} GB VRAM)` : ''}` : ''}
+ Auto{resolvedMax != null ? `, ${resolvedMax} model${resolvedMax > 1 ? 's' : ''}${vramGb != null ? ` (${vramGb} GB VRAM)` : ''}` : ''}
</option>
{[1, 2, 3, 4].map((n) => (
<option key={n} value={String(n)}>{n}</option>
@@ -352,7 +352,7 @@ export function AgentSection(): JSX.Element {
<Block
label={PROVIDERS[provider].noKey ? 'API key (optional)' : 'API key'}
hint={PROVIDERS[provider].noKey
- ? 'Not needed for a local Ollama — models already pulled with it are reused as-is.'
+ ? 'Not needed for a local Ollama, models already pulled with it are reused as-is.'
: 'Stored locally on this machine only.'}
>
<div className="flex gap-2">
@@ -368,13 +368,13 @@ export function AgentSection(): JSX.Element {
</button>
</div>
{extResult === 'ok' && (
- <p className="text-[11px] text-emerald-400">Connected — {extModels.length} model{extModels.length > 1 ? 's' : ''} available</p>
+ <p className="text-[11px] text-emerald-400">Connected, {extModels.length} model{extModels.length > 1 ? 's' : ''} available</p>
)}
{extResult === 'error' && (
<p className="text-[11px] text-red-400">
{provider === 'ollama'
- ? 'Could not list models — is Ollama running?'
- : `Could not list models — check the key${provider === 'custom' ? ' and URL' : ''}`}
+ ? 'Could not list models, is Ollama running?'
+ : `Could not list models, check the key${provider === 'custom' ? ' and URL' : ''}`}
</p>
)}
</Block>
@@ -383,7 +383,7 @@ export function AgentSection(): JSX.Element {
{extModels.length > 0 ? (
<select value={extModelDraft} onChange={(e) => setExtModelDraft(e.target.value)} className={`${inputCls} cursor-pointer`}>
{/* Without it the browser shows the first model while the draft
- * stays '' — Save then persisted an empty model name. */}
+ * stays '', Save then persisted an empty model name. */}
{!extModelDraft && <option value="" disabled>Select a model…</option>}
{!extModels.includes(extModelDraft) && extModelDraft && <option value={extModelDraft}>{extModelDraft}</option>}
{extModels.map((m) => <option key={m} value={m}>{m}</option>)}
@@ -404,7 +404,7 @@ export function AgentSection(): JSX.Element {
</Card>
)}
- <Card title="Thinking" description="Default mode — can be changed on the fly in the chat via the brain icon.">
+ <Card title="Thinking" description="Default mode, can be changed on the fly in the chat via the brain icon.">
<div className="px-4 py-3 flex flex-col gap-3">
{THINKING_OPTIONS.map((opt) => (
<label key={opt.value} className="flex items-start gap-3 cursor-pointer group">
@@ -430,7 +430,7 @@ export function AgentSection(): JSX.Element {
<div className="flex flex-col gap-4 min-w-0">
<Card
title="MCP server"
- description={<>Control Modly from Claude Desktop, Codex or OpenCode. Community package by <span className="text-zinc-300">DrHepa</span>.</>}
+ description={<>Control three.ws Forge from Claude Desktop, Codex or OpenCode. Community package by <span className="text-zinc-300">DrHepa</span>.</>}
aside={<Badge tone="muted">Community</Badge>}
>
<Block>
diff --git a/apps/forge-desktop/src/areas/settings/components/LogsSection.tsx b/apps/forge-desktop/src/areas/settings/components/LogsSection.tsx
index 22fdbab5f..4fb2d9221 100644
--- a/apps/forge-desktop/src/areas/settings/components/LogsSection.tsx
+++ b/apps/forge-desktop/src/areas/settings/components/LogsSection.tsx
@@ -3,7 +3,7 @@ import { useEffect, useState, useCallback } from 'react'
const LOG_FILES = [
{ id: 'errors.log', label: 'Errors', description: 'All errors from Electron and Python' },
{ id: 'runtime.log', label: 'Runtime', description: 'FastAPI / Python output' },
- { id: 'modly.log', label: 'App', description: 'General Electron logs' },
+ { id: 'forge.log', label: 'App', description: 'General Electron logs' },
]
function formatSession(id: string): string {
@@ -66,7 +66,7 @@ export function LogsSection(): JSX.Element {
<div className="flex flex-col gap-6">
<div>
<h2 className="text-sm font-semibold text-zinc-100">Logs</h2>
- <p className="text-xs text-zinc-500 mt-0.5">Application log files — share these when reporting issues.</p>
+ <p className="text-xs text-zinc-500 mt-0.5">Application log files, share these when reporting issues.</p>
</div>
{/* Session selector */}
diff --git a/apps/forge-desktop/src/areas/setup/FirstRunSetup.tsx b/apps/forge-desktop/src/areas/setup/FirstRunSetup.tsx
index 034a131c1..391bdc3c1 100644
--- a/apps/forge-desktop/src/areas/setup/FirstRunSetup.tsx
+++ b/apps/forge-desktop/src/areas/setup/FirstRunSetup.tsx
@@ -3,7 +3,7 @@ import { useAppStore, SetupProgress } from '@shared/stores/appStore'
// ─── Logo (shared) ──────────────────────────────────────────────────────────
-function ModlyLogo(): JSX.Element {
+function three.ws ForgeLogo(): JSX.Element {
return (
<div className="mb-8">
<svg width="64" height="64" viewBox="0 0 609 609" xmlns="http://www.w3.org/2000/svg">
@@ -27,8 +27,8 @@ function ModlyLogo(): JSX.Element {
function AppHeader(): JSX.Element {
return (
<>
- <ModlyLogo />
- <h1 className="text-2xl font-semibold text-zinc-100 mb-1">Modly</h1>
+ <three.ws ForgeLogo />
+ <h1 className="text-2xl font-semibold text-zinc-100 mb-1">three.ws Forge</h1>
<p className="text-sm text-zinc-500 mb-10">AI-powered 3D mesh generation</p>
</>
)
@@ -260,7 +260,7 @@ export default function FirstRunSetup(): JSX.Element {
return <InstallingPanel progress={setupProgress} />
case 'done':
- // setup done — now waiting for backend
+ // setup done, now waiting for backend
if (backendStatus === 'error') return <ErrorPanel message={backendError} />
return <StartingPanel />
@@ -291,7 +291,7 @@ export default function FirstRunSetup(): JSX.Element {
<path d="M4037 2838 c-25 -33 -443 -702 -467 -747 l-12 -24 -1384 4 c-1247 4 -1385 2 -1399 -12 -44 -44 -21 -170 42 -231 21 -20 203 -132 408 -249 385 -220 1034 -594 1310 -754 88 -51 183 -105 210 -121 28 -15 88 -49 134 -76 158 -90 177 -86 475 84 127 72 416 236 641 363 226 128 507 287 625 354 212 121 250 145 250 163 0 5 -40 73 -88 151 -49 78 -177 286 -284 462 -393 643 -407 664 -430 665 -4 0 -18 -15 -31 -32z"/>
</g>
</svg>
- <span className="text-xs font-semibold text-zinc-300">Modly</span>
+ <span className="text-xs font-semibold text-zinc-300">three.ws Forge</span>
</div>
<div className="flex-1" />
{!isMac && (
diff --git a/apps/forge-desktop/src/areas/workflows/WorkflowsPage.tsx b/apps/forge-desktop/src/areas/workflows/WorkflowsPage.tsx
index 8fc4cea61..d7e2aa9c0 100644
--- a/apps/forge-desktop/src/areas/workflows/WorkflowsPage.tsx
+++ b/apps/forge-desktop/src/areas/workflows/WorkflowsPage.tsx
@@ -37,8 +37,8 @@ import WorkflowEdge from './nodes/WorkflowEdge'
// ─── Constants ────────────────────────────────────────────────────────────────
-const DRAG_KEY = 'modly/extension-id'
-const DRAG_NODE_KEY = 'modly/node-type'
+const DRAG_KEY = 'forge/extension-id'
+const DRAG_NODE_KEY = 'forge/node-type'
const NODE_TYPES = { extensionNode: ExtensionNode, imageNode: ImageNode, textNode: TextNode, outputNode: AddToSceneNode, meshNode: Load3DMeshNode, sceneNode: LoadSceneNode, previewNode: PreviewImageNode, imagePreviewNode: ImagePreviewNode, waitNode: WaitNode, whileNode: WhileNode, forEachNode: ForEachNode }
// Loop-container node types: resizable frames whose children form a loop body.
@@ -84,7 +84,7 @@ function IoBadge({ type }: { type: 'image' | 'text' | 'mesh' | 'audio' | 'scene'
function newId(): string { return crypto.randomUUID() }
// Node clipboard (module-level so Ctrl+C in one workflow tab can be pasted in
-// another — the canvas remounts per tab but the module survives).
+// another, the canvas remounts per tab but the module survives).
const _nodeClipboard: { current: { nodes: Node[]; edges: Edge[]; pastes: number } | null } = { current: null }
function newWorkflow(): Workflow {
@@ -350,7 +350,7 @@ const BUILTIN_NODES = [
{ type: 'textNode', label: 'Text', color: '#fbbf24', description: 'Text input' },
{ type: 'meshNode', label: 'Load 3D Mesh', color: '#a78bfa', description: 'Load a 3D mesh file or use current model' },
{ type: 'sceneNode', label: 'Load Scene', color: '#f472b6', description: 'Load and validate a workspace scene directory' },
- { type: 'outputNode', label: 'Add to Scene', color: '#a78bfa', description: 'Output node — adds the mesh to the 3D scene' },
+ { type: 'outputNode', label: 'Add to Scene', color: '#a78bfa', description: 'Output node, adds the mesh to the 3D scene' },
{ type: 'previewNode', label: 'Preview Views', color: '#38bdf8', description: 'Displays multi-view image outputs in a 2×3 grid' },
{ type: 'imagePreviewNode', label: 'Preview Image', color: '#38bdf8', description: 'Displays a single image output in the workflow' },
{ type: 'waitNode', label: 'Wait', color: '#71717a', description: 'Pauses the workflow until you click Continue' },
@@ -597,7 +597,7 @@ function HelpModal({ onClose }: { onClose: () => void }) {
<section className="flex flex-col gap-2">
<h3 className="text-[11px] font-semibold uppercase tracking-wider text-zinc-500">Concept</h3>
<p className="text-[12px] text-zinc-300 leading-relaxed">
- A workflow is a <span className="text-zinc-100 font-medium">directed graph of nodes</span>. Each node receives data from its inputs (left handle) and produces a result on its output (right handle). Data flows from left to right — you connect nodes by dragging from one handle to another.
+ A workflow is a <span className="text-zinc-100 font-medium">directed graph of nodes</span>. Each node receives data from its inputs (left handle) and produces a result on its output (right handle). Data flows from left to right, you connect nodes by dragging from one handle to another.
</p>
</section>
@@ -606,7 +606,7 @@ function HelpModal({ onClose }: { onClose: () => void }) {
<div className="rounded-xl overflow-hidden border border-zinc-800">
<img src={helperImg} alt="Basic workflow example" className="w-full object-cover" />
<p className="px-3 py-2 text-[10px] text-zinc-500 bg-zinc-800/50 border-t border-zinc-800">
- Example — Image → AI model → Add to Scene
+ Example, Image → AI model → Add to Scene
</p>
</div>
)}
@@ -620,7 +620,7 @@ function HelpModal({ onClose }: { onClose: () => void }) {
<span className="inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium border border-sky-500/30 bg-sky-500/10 text-sky-400 shrink-0 mt-0.5">image</span>
<div>
<p className="text-[11px] font-medium text-zinc-200">Image</p>
- <p className="text-[11px] text-zinc-500 mt-0.5 leading-relaxed">Source node. Pick a local image file — it becomes the input of the first processing node.</p>
+ <p className="text-[11px] text-zinc-500 mt-0.5 leading-relaxed">Source node. Pick a local image file, it becomes the input of the first processing node.</p>
</div>
</div>
@@ -660,7 +660,7 @@ function HelpModal({ onClose }: { onClose: () => void }) {
</div>
<div>
<p className="text-[11px] font-medium text-zinc-200">Process extension <span className="text-[10px] font-normal text-zinc-500">(mesh processor)</span></p>
- <p className="text-[11px] text-zinc-500 mt-0.5 leading-relaxed">Transforms a mesh — examples: Optimize Mesh (polygon reduction), Export Mesh (save to file). No GPU required.</p>
+ <p className="text-[11px] text-zinc-500 mt-0.5 leading-relaxed">Transforms a mesh, examples: Optimize Mesh (polygon reduction), Export Mesh (save to file). No GPU required.</p>
</div>
</div>
@@ -795,8 +795,8 @@ function WorkflowCanvasInner({
}, [workflow.updatedAt])
// Persist and claim the echo so the sync effect above does not treat our own
- // write as an external change. The claim is optimistic — the store is updated
- // before save() resolves — and is rolled back when the write fails, so a failed
+ // write as an external change. The claim is optimistic, the store is updated
+ // before save() resolves, and is rolled back when the write fails, so a failed
// save never silently replaces the canvas with the last persisted version.
const saveAndClaim = useCallback((updated: Workflow) => {
const prevSavedAt = lastSavedAtRef.current
@@ -842,7 +842,7 @@ function WorkflowCanvasInner({
// eslint-disable-next-line react-hooks/exhaustive-deps -- debounce on editable state; latest workflow/onSave read in the timeout
}, [nodes, edges])
- // Switching tabs unmounts this page — flush the pending autosave instead of
+ // Switching tabs unmounts this page: flush the pending autosave instead of
// dropping it, otherwise an edit made within the debounce window is lost.
useEffect(() => () => {
if (saveTimer.current) clearTimeout(saveTimer.current)
@@ -936,7 +936,7 @@ function WorkflowCanvasInner({
pendingConnectionRef.current = null
return
}
- // Dropped on empty canvas — or inside a While body — opens the palette. The
+ // Dropped on empty canvas: or inside a While body, opens the palette. The
// While is a giant node, so don't treat its empty body as "dropped on a node";
// bail only on a real node or a handle.
const target = event.target as Element
@@ -1016,7 +1016,7 @@ function WorkflowCanvasInner({
return () => window.removeEventListener('keydown', onKeyDown)
}, [undo, redo])
- // Copy/paste selected nodes (Ctrl+C / Ctrl+V) — works across workflow tabs
+ // Copy/paste selected nodes (Ctrl+C / Ctrl+V), works across workflow tabs
useEffect(() => {
const onKeyDown = (e: KeyboardEvent) => {
const tag = (e.target as HTMLElement).tagName
@@ -1107,7 +1107,7 @@ function WorkflowCanvasInner({
const isExt = type === 'extensionNode'
// Skip wiring when the new node can't take the connection: a source-only node
// (Image/Text/Mesh) as target, or a sink-only node (Add to Scene/Preview) as
- // source — those have no matching handle and would orphan the edge.
+ // source, those have no matching handle and would orphan the edge.
const canWire = isSource ? !NODE_TYPES_WITHOUT_TARGET.has(type) : !NODE_TYPES_WITHOUT_SOURCE.has(type)
if (canWire) {
const edge = isSource
@@ -1190,7 +1190,7 @@ function WorkflowCanvasInner({
showToast(preflightIssues[0].message)
return
}
- // Drop the pending debounce — this save supersedes it.
+ // Drop the pending debounce: this save supersedes it.
if (saveTimer.current) { clearTimeout(saveTimer.current); saveTimer.current = null; flushSaveRef.current = null }
const wf: Workflow = { ...workflow, nodes: nodes as WFNode[], edges: edges as WFEdge[], updatedAt: new Date().toISOString() }
saveAndClaim(wf)
@@ -1323,12 +1323,12 @@ function WorkflowCanvasInner({
<svg width="11" height="11" viewBox="0 0 24 24" fill="currentColor" className="shrink-0">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
</svg>
- <span className="text-[10px] font-medium">No AI model node in this workflow — add one from the extensions panel to generate a 3D mesh.</span>
+ <span className="text-[10px] font-medium">No AI model node in this workflow, add one from the extensions panel to generate a 3D mesh.</span>
</div>
</div>
)}
- {/* Floating panel toggle — over the canvas, below the header */}
+ {/* Floating panel toggle, over the canvas, below the header */}
<button
onClick={onTogglePanel}
title={panelOpen ? 'Close extensions panel' : 'Open extensions panel'}
@@ -1370,7 +1370,7 @@ function WorkflowCanvasInner({
}
// ─── Mini graph preview ───────────────────────────────────────────────────────
-// Schematic thumbnail of a workflow's graph for the Open popup cards — plain
+// Schematic thumbnail of a workflow's graph for the Open popup cards, plain
// SVG built from stored node positions, no React Flow instance needed.
// Node tint by role, echoing the real canvas: inputs green, processing violet,
@@ -1517,8 +1517,7 @@ export default function WorkflowsPage(): JSX.Element {
return () => window.removeEventListener('mousedown', close)
}, [tabMenu])
- // Escape closes whichever popup is topmost, regardless of what's focused —
- // relying on a focused element's own onKeyDown would miss presses right after
+ // Escape closes whichever popup is topmost, regardless of what's focused, // relying on a focused element's own onKeyDown would miss presses right after
// a popup opens (before anything inside it has focus).
useEffect(() => {
const onKey = (e: KeyboardEvent): void => {
@@ -1610,7 +1609,7 @@ export default function WorkflowsPage(): JSX.Element {
key={wf.id}
draggable
onDragStart={(e) => {
- e.dataTransfer.setData('modly/workflow-id', wf.id)
+ e.dataTransfer.setData('forge/workflow-id', wf.id)
e.dataTransfer.effectAllowed = 'move'
}}
onClick={() => { openWorkflow(wf.id); setOpenListVisible(false) }}
@@ -1691,7 +1690,7 @@ export default function WorkflowsPage(): JSX.Element {
e.preventDefault()
e.stopPropagation()
setDragOverFolder(null)
- const id = e.dataTransfer.getData('modly/workflow-id')
+ const id = e.dataTransfer.getData('forge/workflow-id')
if (id) handleMoveToFolder(id, folder)
}}
className={`group flex items-center gap-2 px-4 py-2 cursor-pointer text-zinc-400 hover:text-zinc-200 transition-colors
@@ -1753,13 +1752,13 @@ export default function WorkflowsPage(): JSX.Element {
</div>
)}
{!collapsed && inFolder.length === 0 && (
- <p className="pl-11 pr-5 py-1.5 text-[10px] text-zinc-700 italic">Empty — drag workflows here</p>
+ <p className="pl-11 pr-5 py-1.5 text-[10px] text-zinc-700 italic">Empty, drag workflows here</p>
)}
</div>
)
}
- // Closing the tab of an empty workflow (no nodes) deletes it too — a blank
+ // Closing the tab of an empty workflow (no nodes) deletes it too, a blank
// "New Workflow" the user closes is throwaway, don't let them pile up on disk.
// Reads the store directly so a keyboard shortcut never acts on a stale list.
function handleCloseTab(id: string) {
@@ -1771,7 +1770,7 @@ export default function WorkflowsPage(): JSX.Element {
async function handleToggleBookmark(id: string) {
const wf = workflows.find((w) => w.id === id)
if (!wf) return
- // Not an edit — keep updatedAt so the recency sort doesn't reshuffle
+ // Not an edit: keep updatedAt so the recency sort doesn't reshuffle
await save({ ...wf, bookmarked: !wf.bookmarked })
}
@@ -1820,9 +1819,9 @@ export default function WorkflowsPage(): JSX.Element {
<div
key={wf.id}
draggable
- onDragStart={(e) => { e.dataTransfer.setData('modly/tab-id', wf.id); e.dataTransfer.effectAllowed = 'move' }}
+ onDragStart={(e) => { e.dataTransfer.setData('forge/tab-id', wf.id); e.dataTransfer.effectAllowed = 'move' }}
onDragOver={(e) => {
- if (!e.dataTransfer.types.includes('modly/tab-id')) return
+ if (!e.dataTransfer.types.includes('forge/tab-id')) return
e.preventDefault()
setDragOverTab(wf.id)
}}
@@ -1830,7 +1829,7 @@ export default function WorkflowsPage(): JSX.Element {
onDrop={(e) => {
e.preventDefault()
setDragOverTab(null)
- const dragId = e.dataTransfer.getData('modly/tab-id')
+ const dragId = e.dataTransfer.getData('forge/tab-id')
if (dragId) moveOpenTab(dragId, wf.id)
}}
onClick={() => setActive(wf.id)}
@@ -1972,7 +1971,7 @@ export default function WorkflowsPage(): JSX.Element {
document.body,
)}
- {/* Delete confirmation popup (topmost — reachable from the Open popup) */}
+ {/* Delete confirmation popup (topmost, reachable from the Open popup) */}
{deleteTarget && createPortal(
<div
className="fixed inset-0 z-[10001] flex items-center justify-center bg-zinc-950/70 backdrop-blur-sm"
@@ -2087,7 +2086,7 @@ export default function WorkflowsPage(): JSX.Element {
// Drop on the list background (not a folder) → move back to root
e.preventDefault()
setDragOverFolder(null)
- const id = e.dataTransfer.getData('modly/workflow-id')
+ const id = e.dataTransfer.getData('forge/workflow-id')
if (id) handleMoveToFolder(id, undefined)
}}
>
@@ -2095,7 +2094,7 @@ export default function WorkflowsPage(): JSX.Element {
<p className="px-5 py-6 text-center text-xs text-zinc-600 italic">No saved workflows.</p>
)}
- {/* Search results — flat list across all folders */}
+ {/* Search results, flat list across all folders */}
{openSearch.trim() !== '' && (() => {
const q = openSearch.trim().toLowerCase()
const matches = workflows
@@ -2111,7 +2110,7 @@ export default function WorkflowsPage(): JSX.Element {
)
})()}
- {/* Bookmarks — pinned section: starred folders, then starred workflows */}
+ {/* Bookmarks, pinned section: starred folders, then starred workflows */}
{openSearch.trim() === '' && (() => {
const markedFolders = [...bookmarkedFolders].filter((f) => folders.includes(f)).sort((a, b) => a.localeCompare(b))
// Starred workflows already shown inside a starred folder aren't repeated
diff --git a/apps/forge-desktop/src/areas/workflows/mockExtensions.test.mjs b/apps/forge-desktop/src/areas/workflows/mockExtensions.test.mjs
index a3edbe842..8f91438f9 100644
--- a/apps/forge-desktop/src/areas/workflows/mockExtensions.test.mjs
+++ b/apps/forge-desktop/src/areas/workflows/mockExtensions.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-workflow-ext-test-')), 'mockExtensions.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-workflow-ext-test-')), 'mockExtensions.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/areas/workflows/mockExtensions.ts')],
diff --git a/apps/forge-desktop/src/areas/workflows/nodeBehaviors.test.mjs b/apps/forge-desktop/src/areas/workflows/nodeBehaviors.test.mjs
index 2685ba43b..9337a814f 100644
--- a/apps/forge-desktop/src/areas/workflows/nodeBehaviors.test.mjs
+++ b/apps/forge-desktop/src/areas/workflows/nodeBehaviors.test.mjs
@@ -8,7 +8,7 @@ import { join, resolve } from 'node:path'
// nodeBehaviors.ts only type-imports from electron.d, so esbuild erases it.
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-nodebehaviors-test-')), 'nodeBehaviors.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-nodebehaviors-test-')), 'nodeBehaviors.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/areas/workflows/nodeBehaviors.ts')],
diff --git a/apps/forge-desktop/src/areas/workflows/nodeBehaviors.ts b/apps/forge-desktop/src/areas/workflows/nodeBehaviors.ts
index 4846eeef6..40a9bc224 100644
--- a/apps/forge-desktop/src/areas/workflows/nodeBehaviors.ts
+++ b/apps/forge-desktop/src/areas/workflows/nodeBehaviors.ts
@@ -4,15 +4,15 @@ import type { WFNode, WFEdge } from '@shared/types/electron.d'
//
// Add a new entry here when you introduce a node type that needs to participate
// in the runner's control-flow logic. The predicates and helpers below derive
-// everything they need from this table — no hardcoded type checks anywhere else.
+// everything they need from this table, no hardcoded type checks anywhere else.
//
-// • passthrough — data flows through this node unchanged. Resolvers (inputs,
+// • passthrough, data flows through this node unchanged. Resolvers (inputs,
// preflight typing) walk past it to find the real source.
-// • branchStarter — splits the run into a user-driven sub-DAG. The runner
+// • branchStarter, splits the run into a user-driven sub-DAG. The runner
// pauses on these nodes and exposes a Continue/Retry button.
-// • sceneOutput — terminal sink that gets pushed to the 3D viewer. Used by
+// • sceneOutput, terminal sink that gets pushed to the 3D viewer. Used by
// the immediate mesh-push logic during execution.
-// • branchConsumer — executes inside a Wait branch and consumes its single mesh
+// • branchConsumer, executes inside a Wait branch and consumes its single mesh
// output, so it can't be fed by more than one Wait branch.
export interface NodeBehavior {
@@ -59,7 +59,7 @@ export function resolveDataSource(
/**
* Walks backwards from `nodeId` and returns the set of nearest upstream
- * branch-starter (Wait) nodes — the first Wait found on each incoming path,
+ * branch-starter (Wait) nodes, the first Wait found on each incoming path,
* without traversing past it. Empty = no upstream Wait. Size > 1 = the node
* merges two distinct branches.
*/
@@ -83,7 +83,7 @@ export function nearestUpstreamWaits(
/**
* True if any forward path from `sourceId` reaches a sceneOutput node, walking
- * through passthrough nodes — but stopping at branch-starter (Wait) boundaries.
+ * through passthrough nodes, but stopping at branch-starter (Wait) boundaries.
* A scene output gated behind a Wait belongs to a branch that runs later, so it
* must not be treated as immediately reachable (otherwise pre-phase nodes would
* push their mesh to the viewer before the user clicks Continue).
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/AddToSceneNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/AddToSceneNode.tsx
index f28cff250..611c612c1 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/AddToSceneNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/AddToSceneNode.tsx
@@ -37,7 +37,7 @@ export default function AddToSceneNode({ id, data, selected }: { id: string; dat
}
handles={
<Handle type="target" position={Position.Left}
- style={{ background: INPUT_COLOR, width: 14, height: 14, border: '2.5px solid #18181b' }} />
+ style={{ background: INPUT_COLOR, width: 14, height: 14, border: '2.5px solid #1a1a1a' }} />
}
>
<div className="px-3 pb-3 pt-2.5">
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/BaseNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/BaseNode.tsx
index 856e528c0..fc8aa9c78 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/BaseNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/BaseNode.tsx
@@ -16,16 +16,16 @@ export interface BaseNodeProps {
icon?: ReactNode // small icon left of title
badge?: string // e.g. "built-in"
- // Optional controls — only rendered when prop is provided
+ // Optional controls: only rendered when prop is provided
enabled?: boolean // shows enable toggle
showInGenerate?: boolean // shows eye toggle
deletable?: boolean // default true
- collapsible?: boolean // default false — shows chevron, hides body when collapsed
+ collapsible?: boolean // default false, shows chevron, hides body when collapsed
defaultExpanded?: boolean // default true
// Extra slots
subheader?: ReactNode // always visible, sits between header and body (e.g. IO row)
- handles?: ReactNode // React Flow handles — rendered at root level
+ handles?: ReactNode // React Flow handles, rendered at root level
// Resize
minWidth?: number // default 180
@@ -73,7 +73,7 @@ export default function BaseNode({
handleStyle={autoHeight ? { display: 'none' } : RESIZER_HANDLE_STYLE}
/>
- {/* React Flow handles — must live at root level */}
+ {/* React Flow handles, must live at root level */}
{handles}
{/* ── Header ─────────────────────────────────────────────────────────── */}
@@ -97,7 +97,7 @@ export default function BaseNode({
)}
</div>
- {/* Eye — visible in Generate page */}
+ {/* Eye, visible in Generate page */}
{showInGenerate !== undefined && (
<button
onClick={() => updateNodeData(id, { showInGenerate: !showInGenerate })}
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/ExtensionNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/ExtensionNode.tsx
index 17e5f3fa6..192225dbc 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/ExtensionNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/ExtensionNode.tsx
@@ -31,7 +31,7 @@ const TAG_CLS: Record<string, string> = {
// ─── Param control ────────────────────────────────────────────────────────────
-// nodrag — without it, React Flow starts dragging the node on mousedown inside
+// nodrag, without it, React Flow starts dragging the node on mousedown inside
// these fields, so click-drag text selection (or opening a <select>) moves the
// node instead.
const inputCls = 'nodrag w-full bg-zinc-800 border border-zinc-700 rounded-lg px-2 py-1 text-[11px] text-zinc-200 focus:outline-none focus:border-accent/60'
@@ -178,7 +178,7 @@ export default function ExtensionNode({ id, data, selected }: { id: string; data
<line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/>
</svg>
<span className={`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium border ${TAG_CLS[ext?.output ?? ''] ?? 'border-zinc-700 bg-zinc-800 text-zinc-400'}`}>
- {ext?.output ?? '—'}
+ {ext?.output ?? '-'}
</span>
</>
)}
@@ -189,7 +189,7 @@ export default function ExtensionNode({ id, data, selected }: { id: string; data
// Single-input layout (existing behavior)
<div ref={(el) => { if (el) handleRefs.current[0] = el }} className="flex items-center justify-between px-3 py-2">
<span className={`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium border ${TAG_CLS[ext?.input ?? ''] ?? 'border-zinc-700 bg-zinc-800 text-zinc-400'}`}>
- {ext?.input ?? '—'}
+ {ext?.input ?? '-'}
</span>
{!isTerminal && (
<>
@@ -197,7 +197,7 @@ export default function ExtensionNode({ id, data, selected }: { id: string; data
<line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/>
</svg>
<span className={`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium border ${TAG_CLS[ext?.output ?? ''] ?? 'border-zinc-700 bg-zinc-800 text-zinc-400'}`}>
- {ext?.output ?? '—'}
+ {ext?.output ?? '-'}
</span>
</>
)}
@@ -213,7 +213,7 @@ export default function ExtensionNode({ id, data, selected }: { id: string; data
id={`input-${i}`}
type="target"
position={Position.Left}
- style={{ background: HANDLE_COLOR[inputType], width: 14, height: 14, border: '2.5px solid #18181b', top: handleTops[i] ?? '50%' }}
+ style={{ background: HANDLE_COLOR[inputType], width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTops[i] ?? '50%' }}
/>
))}
{!isTerminal && (
@@ -221,7 +221,7 @@ export default function ExtensionNode({ id, data, selected }: { id: string; data
id="output"
type="source"
position={Position.Right}
- style={{ background: outputColor, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTops[0] ?? '50%' }}
+ style={{ background: outputColor, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTops[0] ?? '50%' }}
/>
)}
</>
@@ -231,14 +231,14 @@ export default function ExtensionNode({ id, data, selected }: { id: string; data
id="input-0"
type="target"
position={Position.Left}
- style={{ background: HANDLE_COLOR[ext?.input ?? 'image'], width: 14, height: 14, border: '2.5px solid #18181b', top: handleTops[0] ?? '50%' }}
+ style={{ background: HANDLE_COLOR[ext?.input ?? 'image'], width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTops[0] ?? '50%' }}
/>
{!isTerminal && (
<Handle
id="output"
type="source"
position={Position.Right}
- style={{ background: outputColor, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTops[0] ?? '50%' }}
+ style={{ background: outputColor, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTops[0] ?? '50%' }}
/>
)}
</>
@@ -260,8 +260,7 @@ export default function ExtensionNode({ id, data, selected }: { id: string; data
{hasParams && (
<div className="px-3 pb-3 pt-2.5 flex flex-col gap-2">
{(() => {
- // Effective values of every param (user value or schema default) —
- // lets file-select params resolve their source folder (dir_from).
+ // Effective values of every param (user value or schema default), // lets file-select params resolve their source folder (dir_from).
const resolvedParams = Object.fromEntries(
(ext?.params ?? []).map((p) => [p.id, data.params[p.id] ?? p.default]),
)
@@ -283,7 +282,7 @@ export default function ExtensionNode({ id, data, selected }: { id: string; data
onClick={() => openExtension(ext.extensionId)}
className="nodrag mt-1 text-[10px] text-amber-400 hover:text-amber-300 hover:underline"
>
- Not installed — install it
+ Not installed: install it
</button>
)}
</div>
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/ForEachNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/ForEachNode.tsx
index 3b14d3fa4..b2457fbb9 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/ForEachNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/ForEachNode.tsx
@@ -4,7 +4,7 @@ import type { WFNodeData } from '@shared/types/electron.d'
import BaseNode from './BaseNode'
import { useWorkflowRunStore } from '../workflowRunStore'
-// For Each — an iterator source. It walks a folder alphabetically and emits one
+// For Each: an iterator source. It walks a folder alphabetically and emits one
// file per loop pass; every node wired downstream re-runs for each file. Runs to
// completion unless the user hits Stop, with an optional Pause (then Continue →
// next file / Retry → same file). A dropdown picks what it emits: image / text / mesh.
@@ -75,7 +75,7 @@ export default function ForEachNode({ id, data, selected }: { id: string; data:
}
handles={
<Handle type="source" position={Position.Right}
- style={{ background: variant.color, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTop }} />
+ style={{ background: variant.color, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTop }} />
}
>
<div className="px-3 pb-3 pt-2.5 flex flex-col gap-2">
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/ImageNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/ImageNode.tsx
index 7ff44892a..efc8178e9 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/ImageNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/ImageNode.tsx
@@ -50,7 +50,7 @@ export default function ImageNode({ id, data, selected }: { id: string; data: WF
}
handles={
<Handle type="source" position={Position.Right}
- style={{ background: OUTPUT_COLOR, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTop }} />
+ style={{ background: OUTPUT_COLOR, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTop }} />
}
>
{preview ? (
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/ImagePreviewNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/ImagePreviewNode.tsx
index 05cb79876..b027fa5a4 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/ImagePreviewNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/ImagePreviewNode.tsx
@@ -93,12 +93,12 @@ export default function ImagePreviewNode({ id, selected }: { id: string; selecte
<Handle
type="target"
position={Position.Left}
- style={{ background: IO_COLOR, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTop }}
+ style={{ background: IO_COLOR, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTop }}
/>
<Handle
type="source"
position={Position.Right}
- style={{ background: IO_COLOR, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTop }}
+ style={{ background: IO_COLOR, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTop }}
/>
</>
}
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/InputNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/InputNode.tsx
index e9bcf7817..614b745b4 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/InputNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/InputNode.tsx
@@ -38,7 +38,7 @@ export default function InputNode({ id, data, selected }: { id: string; data: WF
icon={<div className="w-2 h-2 rounded-full bg-zinc-500" />}
handles={
<Handle type="source" position={Position.Right}
- style={{ background: handleColor, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTop }} />
+ style={{ background: handleColor, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTop }} />
}
>
<div ref={toggleRowRef} className="px-3 pb-3 pt-2.5 flex gap-1.5">
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/Load3DMeshNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/Load3DMeshNode.tsx
index 1392e9b03..4b1eb350a 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/Load3DMeshNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/Load3DMeshNode.tsx
@@ -51,7 +51,7 @@ export default function Load3DMeshNode({ id, data, selected }: { id: string; dat
}
handles={
<Handle type="source" position={Position.Right}
- style={{ background: OUTPUT_COLOR, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTop }} />
+ style={{ background: OUTPUT_COLOR, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTop }} />
}
>
<div className="px-3 py-2.5 flex flex-col gap-2">
@@ -66,7 +66,7 @@ export default function Load3DMeshNode({ id, data, selected }: { id: string; dat
<span className="text-[10px] text-zinc-400">Use current model</span>
</button>
- {/* File picker — disabled when using current */}
+ {/* File picker, disabled when using current */}
{source === 'file' ? (
fileName ? (
<button
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/LoadSceneNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/LoadSceneNode.tsx
index 40f3af1c1..43844a637 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/LoadSceneNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/LoadSceneNode.tsx
@@ -86,7 +86,7 @@ export default function LoadSceneNode({ id, data, selected }: { id: string; data
<Handle
type="source"
position={Position.Right}
- style={{ background: OUTPUT_COLOR, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTop }}
+ style={{ background: OUTPUT_COLOR, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTop }}
/>
}
>
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/PreviewImageNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/PreviewImageNode.tsx
index 7d7cd4642..ae2d6c57a 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/PreviewImageNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/PreviewImageNode.tsx
@@ -41,7 +41,7 @@ export default function PreviewImageNode({ id, selected }: { id: string; selecte
<Handle
type="target"
position={Position.Left}
- style={{ background: INPUT_COLOR, width: 14, height: 14, border: '2.5px solid #18181b' }}
+ style={{ background: INPUT_COLOR, width: 14, height: 14, border: '2.5px solid #1a1a1a' }}
/>
}
>
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/TextNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/TextNode.tsx
index 6e329896d..a3d87750e 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/TextNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/TextNode.tsx
@@ -52,7 +52,7 @@ export default function TextNode({ id, data, selected }: { id: string; data: WFN
}
handles={
<Handle type="source" position={Position.Right}
- style={{ background: OUTPUT_COLOR, width: 14, height: 14, border: '2.5px solid #18181b', top: handleTop }} />
+ style={{ background: OUTPUT_COLOR, width: 14, height: 14, border: '2.5px solid #1a1a1a', top: handleTop }} />
}
>
<div className="px-3 pb-3 pt-2.5">
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/WaitNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/WaitNode.tsx
index 3f3dff725..a68119ad6 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/WaitNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/WaitNode.tsx
@@ -3,7 +3,7 @@ import type { WFNodeData } from '@shared/types/electron.d'
import { useWaitButton } from '../useWaitButton'
import BaseNode from './BaseNode'
-const HANDLE_STYLE = { background: '#71717a', width: 14, height: 14, border: '2.5px solid #18181b' }
+const HANDLE_STYLE = { background: '#71717a', width: 14, height: 14, border: '2.5px solid #1a1a1a' }
export default function WaitNode({ id, data, selected }: { id: string; data: WFNodeData; selected?: boolean }) {
const { waitState, canContinue, isRunning, label, buttonClass, statusText, onContinue } = useWaitButton(id)
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/WhileNode.tsx b/apps/forge-desktop/src/areas/workflows/nodes/WhileNode.tsx
index f3a646acc..4e22db73d 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/WhileNode.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/WhileNode.tsx
@@ -2,7 +2,7 @@ import { NodeResizer, useReactFlow } from '@xyflow/react'
import type { WFNodeData } from '@shared/types/electron.d'
import { useWorkflowRunStore } from '../workflowRunStore'
-// While container — a resizable frame that wraps the loop-body nodes.
+// While container: a resizable frame that wraps the loop-body nodes.
// Drop nodes inside it (they become children) to define the body; the runner
// re-runs that body either N times (iterations) or via the manual buttons.
export default function WhileNode({ id, data, selected }: { id: string; data: WFNodeData; selected?: boolean }) {
@@ -42,7 +42,7 @@ export default function WhileNode({ id, data, selected }: { id: string; data: WF
</svg>
<span className="text-[11px] font-semibold text-amber-300 leading-none">While</span>
- {/* Iterations counter — 0 / empty = manual only */}
+ {/* Iterations counter, 0 / empty = manual only */}
<label className="nodrag flex items-center gap-1 ml-1 text-[9px] text-amber-400/70">
<span>loop</span>
<input
@@ -63,7 +63,7 @@ export default function WhileNode({ id, data, selected }: { id: string; data: WF
<div className="flex-1" />
- {/* Continue / Retry — only while paused on this node */}
+ {/* Continue / Retry, only while paused on this node */}
{isPaused && (
<div className="nodrag flex items-center gap-1">
<button
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/WorkflowEdge.tsx b/apps/forge-desktop/src/areas/workflows/nodes/WorkflowEdge.tsx
index 90d32931b..604bfddab 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/WorkflowEdge.tsx
+++ b/apps/forge-desktop/src/areas/workflows/nodes/WorkflowEdge.tsx
@@ -23,7 +23,7 @@ export default function WorkflowEdge({
const sourceNode = getNode(source)
const targetNode = getNode(target)
- // Read targetHandle directly from edge store — reliable regardless of EdgeProps version
+ // Read targetHandle directly from edge store, reliable regardless of EdgeProps version
const thisEdge = edges.find((e) => e.id === id)
const targetHandle = thisEdge?.targetHandle
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-exporter/manifest.json b/apps/forge-desktop/src/areas/workflows/nodes/mesh-exporter/manifest.json
index 20eb7a860..025e5110e 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-exporter/manifest.json
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-exporter/manifest.json
@@ -4,7 +4,7 @@
"type": "process",
"entry": "processor.js",
"version": "1.0.0",
- "author": "Modly",
+ "author": "three.ws Forge",
"description": "Exports the mesh to a chosen format (GLB, STL, OBJ, PLY) at a specified output path.",
"nodes": [
{
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-exporter/processor.ts b/apps/forge-desktop/src/areas/workflows/nodes/mesh-exporter/processor.ts
index 4c1885611..99fc77f0e 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-exporter/processor.ts
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-exporter/processor.ts
@@ -89,7 +89,7 @@ function writeSTL(prims: PrimGeometry[], outPath: string): void {
// ─── OBJ ──────────────────────────────────────────────────────────────────────
function writeOBJ(prims: PrimGeometry[], outPath: string): void {
- const lines: string[] = ['# Exported by Modly mesh-exporter', '']
+ const lines: string[] = ['# Exported by three.ws Forge mesh-exporter', '']
let vOff = 1, vnOff = 1, vtOff = 1
for (let pi = 0; pi < prims.length; pi++) {
@@ -143,7 +143,7 @@ function writePLY(prims: PrimGeometry[], outPath: string): void {
const header = [
'ply',
'format ascii 1.0',
- 'comment Exported by Modly mesh-exporter',
+ 'comment Exported by three.ws Forge mesh-exporter',
`element vertex ${totalVerts}`,
'property float x', 'property float y', 'property float z',
...(hasNormals ? ['property float nx', 'property float ny', 'property float nz'] : []),
@@ -191,7 +191,7 @@ const processor = async (
const ext = EXT_MAP[format]
if (!ext) throw new Error(`mesh-exporter: unsupported format "${format}"`)
- context.log(`Format: ${format} — input: ${input.filePath}`)
+ context.log(`Format: ${format}, input: ${input.filePath}`)
const { NodeIO } = require('@gltf-transform/core')
const { ALL_EXTENSIONS } = require('@gltf-transform/extensions')
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-optimizer/manifest.json b/apps/forge-desktop/src/areas/workflows/nodes/mesh-optimizer/manifest.json
index e2480dda0..e8ff837f4 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-optimizer/manifest.json
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-optimizer/manifest.json
@@ -4,7 +4,7 @@
"type": "process",
"entry": "processor.py",
"version": "1.0.0",
- "author": "Modly",
+ "author": "three.ws Forge",
"description": "Reduces mesh triangle count using quadric simplification (meshoptimizer).",
"nodes": [
{
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-optimizer/processor.py b/apps/forge-desktop/src/areas/workflows/nodes/mesh-optimizer/processor.py
index c28428738..bec7e8b60 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-optimizer/processor.py
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-optimizer/processor.py
@@ -5,7 +5,7 @@ import sys
from pathlib import Path
-api_dir = os.environ.get("MODLY_API_DIR")
+api_dir = os.environ.get("THREEWS_API_DIR") or os.environ.get("MODLY_API_DIR")
if not api_dir:
for parent in Path(__file__).resolve().parents:
candidate = parent / "api"
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-remesher/manifest.json b/apps/forge-desktop/src/areas/workflows/nodes/mesh-remesher/manifest.json
index 2f4c72b6c..ca4ab9d39 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-remesher/manifest.json
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-remesher/manifest.json
@@ -4,7 +4,7 @@
"type": "process",
"entry": "processor.py",
"version": "1.0.0",
- "author": "Modly",
+ "author": "three.ws Forge",
"description": "Regularizes mesh topology with isotropic remeshing. Quad mode is quad-dominant cleanup, not character retopology.",
"nodes": [
{
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-remesher/processor.py b/apps/forge-desktop/src/areas/workflows/nodes/mesh-remesher/processor.py
index 06efb63e8..4d9f4fb26 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-remesher/processor.py
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-remesher/processor.py
@@ -1,5 +1,5 @@
"""
-Mesh Remesher — built-in process extension.
+Mesh Remesher: built-in process extension.
Protocol: reads one JSON line from stdin, writes JSON lines to stdout.
stdin : { input, params, workspaceDir, tempDir }
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-repair/manifest.json b/apps/forge-desktop/src/areas/workflows/nodes/mesh-repair/manifest.json
index fb44ef57c..b04f94142 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-repair/manifest.json
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-repair/manifest.json
@@ -4,7 +4,7 @@
"type": "process",
"entry": "processor.py",
"version": "1.2.0",
- "author": "Modly",
+ "author": "three.ws Forge",
"description": "Repairs mesh topology: removes duplicates, degenerate faces, fixes non-manifold edges, fills simple boundary holes.",
"nodes": [
{
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-repair/processor.py b/apps/forge-desktop/src/areas/workflows/nodes/mesh-repair/processor.py
index 6ff43d026..9c025514e 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-repair/processor.py
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-repair/processor.py
@@ -5,7 +5,7 @@ import sys
from pathlib import Path
-api_dir = os.environ.get("MODLY_API_DIR")
+api_dir = os.environ.get("THREEWS_API_DIR") or os.environ.get("MODLY_API_DIR")
if not api_dir:
for parent in Path(__file__).resolve().parents:
candidate = parent / "api"
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-smoother/manifest.json b/apps/forge-desktop/src/areas/workflows/nodes/mesh-smoother/manifest.json
index 4a84affc3..78c49e9b4 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-smoother/manifest.json
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-smoother/manifest.json
@@ -4,7 +4,7 @@
"type": "process",
"entry": "processor.py",
"version": "1.0.0",
- "author": "Modly",
+ "author": "three.ws Forge",
"description": "Smooths mesh vertices to reduce sharp artifacts (e.g. zipper triangles from AI-generated meshes) using Taubin smoothing.",
"nodes": [
{
diff --git a/apps/forge-desktop/src/areas/workflows/nodes/mesh-smoother/processor.py b/apps/forge-desktop/src/areas/workflows/nodes/mesh-smoother/processor.py
index b59dcb380..70efc9741 100644
--- a/apps/forge-desktop/src/areas/workflows/nodes/mesh-smoother/processor.py
+++ b/apps/forge-desktop/src/areas/workflows/nodes/mesh-smoother/processor.py
@@ -5,7 +5,7 @@ import sys
from pathlib import Path
-api_dir = os.environ.get("MODLY_API_DIR")
+api_dir = os.environ.get("THREEWS_API_DIR") or os.environ.get("MODLY_API_DIR")
if not api_dir:
for parent in Path(__file__).resolve().parents:
candidate = parent / "api"
diff --git a/apps/forge-desktop/src/areas/workflows/preflight.test.mjs b/apps/forge-desktop/src/areas/workflows/preflight.test.mjs
index 3b4df8aa8..152e21331 100644
--- a/apps/forge-desktop/src/areas/workflows/preflight.test.mjs
+++ b/apps/forge-desktop/src/areas/workflows/preflight.test.mjs
@@ -10,7 +10,7 @@ import { join, resolve } from 'node:path'
// All @shared/* imports in those files are type-only, so esbuild erases them
// and no path-alias resolution is required.
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-preflight-test-')), 'preflight.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-preflight-test-')), 'preflight.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/areas/workflows/preflight.ts')],
diff --git a/apps/forge-desktop/src/areas/workflows/preflight.ts b/apps/forge-desktop/src/areas/workflows/preflight.ts
index 068a9277b..a27eb58f8 100644
--- a/apps/forge-desktop/src/areas/workflows/preflight.ts
+++ b/apps/forge-desktop/src/areas/workflows/preflight.ts
@@ -108,7 +108,7 @@ export function validateWorkflowPreflight(
}
// A node fed by two different Wait branches can't be scheduled into a single
- // branch — it would run before either branch produces its mesh.
+ // branch, it would run before either branch produces its mesh.
if (
isBranchConsumer(node.type) &&
nearestUpstreamWaits(node.id, workflow.edges, nodeMap).size > 1
diff --git a/apps/forge-desktop/src/areas/workflows/slotInputs.test.mjs b/apps/forge-desktop/src/areas/workflows/slotInputs.test.mjs
index 16adecd22..0186b7449 100644
--- a/apps/forge-desktop/src/areas/workflows/slotInputs.test.mjs
+++ b/apps/forge-desktop/src/areas/workflows/slotInputs.test.mjs
@@ -8,7 +8,7 @@ import { join, resolve } from 'node:path'
// slotInputs.ts has no runtime imports, so esbuild bundles it standalone.
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-slotinputs-test-')), 'slotInputs.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-slotinputs-test-')), 'slotInputs.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/areas/workflows/slotInputs.ts')],
diff --git a/apps/forge-desktop/src/areas/workflows/useWaitButton.ts b/apps/forge-desktop/src/areas/workflows/useWaitButton.ts
index 873eba974..4bb33c69a 100644
--- a/apps/forge-desktop/src/areas/workflows/useWaitButton.ts
+++ b/apps/forge-desktop/src/areas/workflows/useWaitButton.ts
@@ -13,7 +13,7 @@ export interface WaitButtonModel {
// Shared derivation for the Wait Continue/Retry control, used by both the
// canvas node (WaitNode) and the params panel (WaitParamRow). Keeps the two
-// renderings in sync — they differ only in markup/sizing, not in logic.
+// renderings in sync, they differ only in markup/sizing, not in logic.
export function useWaitButton(nodeId: string): WaitButtonModel {
const waitState = useWorkflowRunStore((s) => s.waitStates[nodeId])
const runningBranchId = useWorkflowRunStore((s) => s.runningBranchId)
@@ -39,12 +39,12 @@ export function useWaitButton(nodeId: string): WaitButtonModel {
const statusText =
waitState === 'blocked' ? 'Waiting for the previous Wait to finish…' :
waitState === 'running' ? 'Branch in progress…' :
- waitState === 'done' ? 'Branch finished — Retry to re-run.' :
- waitState === 'error' ? 'Branch failed — Retry to re-run.' :
- waitState === 'pending' && runAborted ? 'Run failed upstream — fix the error and run again.' :
+ waitState === 'done' ? 'Branch finished, Retry to re-run.' :
+ waitState === 'error' ? 'Branch failed, Retry to re-run.' :
+ waitState === 'pending' && runAborted ? 'Run failed upstream, fix the error and run again.' :
waitState === 'pending' && inPrePhase ? 'Waiting for upstream nodes…' :
waitState === 'pending' && otherBranchRunning ? 'Another branch is running…' :
- waitState === 'pending' ? 'Workflow paused — click Continue to run this branch.' :
+ waitState === 'pending' ? 'Workflow paused, click Continue to run this branch.' :
'Pauses the workflow until you click Continue.'
return { waitState, canContinue, isRunning, label, buttonClass, statusText, onContinue: () => continueRun(nodeId) }
diff --git a/apps/forge-desktop/src/areas/workflows/workflowRunStore.ts b/apps/forge-desktop/src/areas/workflows/workflowRunStore.ts
index 1c64c0c58..eca659912 100644
--- a/apps/forge-desktop/src/areas/workflows/workflowRunStore.ts
+++ b/apps/forge-desktop/src/areas/workflows/workflowRunStore.ts
@@ -33,12 +33,12 @@ const IDLE: WorkflowRunState = {
const _cancel = { current: false }
const _activeJobId = { current: null as string | null }
-// While container (manual mode) pause/resume — set by continueWhile()/retryWhile().
+// While container (manual mode) pause/resume, set by continueWhile()/retryWhile().
const _resume = { current: null as (() => void) | null }
const _retry = { current: false }
// For Each auto-loop: the user asked to pause at the next iteration boundary.
const _pauseRequested = { current: false }
-// Live node params — the UI pushes edits here so a looping/paused run re-reads the
+// Live node params: the UI pushes edits here so a looping/paused run re-reads the
// latest values when a body node starts (instead of the snapshot from run start).
const _liveParams = { current: new Map<string, Record<string, unknown>>() }
@@ -95,7 +95,7 @@ async function readTextFile(filePath: string): Promise<string> {
/**
* Executable nodes reachable downstream from `startId` (its loop body). Traversal
- * stops at Wait boundaries — those nodes belong to branches, not the pre-phase loop.
+ * stops at Wait boundaries, those nodes belong to branches, not the pre-phase loop.
*/
function reachableExecutable(startId: string, edges: WFEdge[], nodeMap: Map<string, WFNode>): Set<string> {
const body = new Set<string>([startId])
@@ -121,7 +121,7 @@ function toWorkspaceUrl(filePath: string, workspaceDir: string): string | undefi
return `/workspace/${norm.slice(workspaceDir.length).replace(/^\//, '')}`
}
-// Inverse of toWorkspaceUrl — used by node components that read a `/workspace/...`
+// Inverse of toWorkspaceUrl: used by node components that read a `/workspace/...`
// output URL back off disk (e.g. to build a data: URL for a preview).
export function fromWorkspaceUrl(url: string, workspaceDir: string): string {
const wsDir = workspaceDir.replace(/\\/g, '/').replace(/\/+$/, '')
@@ -218,7 +218,7 @@ function isInsideWhile(n: WFNode, whileId: string, b: WhileBounds): boolean {
// ─── Branch identification ────────────────────────────────────────────────────
// A node belongs to Wait W's branch if its single nearest upstream Wait is W
-// (dominance). Nodes with no upstream Wait — or with multiple (merges) — execute
+// (dominance). Nodes with no upstream Wait, or with multiple (merges), execute
// in the pre-phase before any user pause.
function identifyBranches(workflow: Workflow): {
@@ -598,7 +598,7 @@ export const useWorkflowRunStore = create<WorkflowRunStore>((set, get) => {
}
const finalize = (ctx: RunContext, finalWaitStates?: Record<string, WaitState>): void => {
- // Prefer the mesh of the last branch the user actually ran — it's already in the
+ // Prefer the mesh of the last branch the user actually ran, it's already in the
// viewer, and topo order must not override the user's last action.
let outputUrl: string | undefined = ctx.lastSceneMesh
let outputPath: string | undefined
@@ -737,7 +737,7 @@ export const useWorkflowRunStore = create<WorkflowRunStore>((set, get) => {
// progress total reflects the real work (manual loops stay unbounded). While
// loops are independent. For Each loops sharing a boundary (same lastIdx) run
// in lockstep over the union of their bodies, so that union is replayed once
- // per pass — count it once, for max(files) − 1 extra passes.
+ // per pass, count it once, for max(files) − 1 extra passes.
const forEachGroups = new Map<number, LoopInfo[]>()
let loopExtraSteps = 0
for (const l of loops) {
@@ -862,7 +862,7 @@ export const useWorkflowRunStore = create<WorkflowRunStore>((set, get) => {
// share the same downstream body (e.g. an image folder + a mesh folder both
// feeding one node); they advance together, in lockstep. It only stops if
// the user hit Pause; then Continue advances to the next file(s) and Retry
- // re-runs the current one. No forced pause at the end — it just finishes.
+ // re-runs the current one. No forced pause at the end, it just finishes.
if (forEachLoops.length > 0) {
const groupBody = new Set<string>()
let jumpTo = Infinity
@@ -877,7 +877,7 @@ export const useWorkflowRunStore = create<WorkflowRunStore>((set, get) => {
// Pause every iterator of the group together (they show the same state).
const groupIds = forEachLoops.map((l) => l.whileId)
set({ activeNodeId: groupIds[0], runningBranchId: groupIds[0], pausedGroup: groupIds })
- setRunState((s) => ({ ...s, status: 'paused', blockStep: 'Paused — Continue or Retry' }))
+ setRunState((s) => ({ ...s, status: 'paused', blockStep: 'Paused, Continue or Retry' }))
await new Promise<void>((resolve) => { _resume.current = resolve })
if (_cancel.current) return 'cancel'
set({ runningBranchId: null, pausedGroup: [] })
@@ -925,7 +925,7 @@ export const useWorkflowRunStore = create<WorkflowRunStore>((set, get) => {
// runningBranchId blocks Wait branches while the pre-phase is parked here.
_retry.current = false
set({ activeNodeId: whileLoop.whileId, runningBranchId: whileLoop.whileId })
- setRunState((s) => ({ ...s, status: 'paused', blockStep: 'Loop finished — Continue or Retry' }))
+ setRunState((s) => ({ ...s, status: 'paused', blockStep: 'Loop finished, Continue or Retry' }))
await new Promise<void>((resolve) => { _resume.current = resolve })
if (_cancel.current) return 'cancel'
set({ runningBranchId: null })
@@ -960,7 +960,7 @@ export const useWorkflowRunStore = create<WorkflowRunStore>((set, get) => {
}
if (waitIds.length > 0) {
- // Hand off to the user — branches run on demand via continueRun(id).
+ // Hand off to the user: branches run on demand via continueRun(id).
set((s) => ({
activeNodeId: null,
runState: { ...s.runState, status: 'paused', blockStep: 'Pick a branch and click Continue' },
@@ -985,11 +985,11 @@ export const useWorkflowRunStore = create<WorkflowRunStore>((set, get) => {
const ws = state.waitStates[waitId]
if (ws !== 'pending' && ws !== 'done' && ws !== 'error') return
// A pending Wait only runs after a clean handoff. If the run errored in the
- // pre-phase, it never handed off — don't start a branch with missing inputs.
+ // pre-phase, it never handed off, don't start a branch with missing inputs.
if (ws === 'pending' && state.runState.status === 'error') return
const ctx = _ctx.current
if (!ctx) {
- console.warn('continueRun: no active run context — was the module hot-reloaded mid-run?')
+ console.warn('continueRun: no active run context, was the module hot-reloaded mid-run?')
return
}
@@ -1026,7 +1026,7 @@ export const useWorkflowRunStore = create<WorkflowRunStore>((set, get) => {
}
pushBranchSceneMesh(ctx, waitId)
}
- // A failed branch can never feed its descendants — surface them as error
+ // A failed branch can never feed its descendants, surface them as error
// too, otherwise they stay 'blocked' and the run hangs on 'paused' forever.
if (next === 'error') {
for (const d of descendantWaits(waitId, ctx)) {
diff --git a/apps/forge-desktop/src/areas/workflows/workflowSceneRun.test.mjs b/apps/forge-desktop/src/areas/workflows/workflowSceneRun.test.mjs
index cb43b9d55..2d946c263 100644
--- a/apps/forge-desktop/src/areas/workflows/workflowSceneRun.test.mjs
+++ b/apps/forge-desktop/src/areas/workflows/workflowSceneRun.test.mjs
@@ -6,10 +6,10 @@ import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
-const dir = mkdtempSync(join(tmpdir(), 'modly-scene-run-'))
+const dir = mkdtempSync(join(tmpdir(), 'forge-scene-run-'))
const stub = (name, source) => { const path = join(dir, name); writeFileSync(path, source); return path }
const appStoreStub = stub('app.ts', `
-export const appState: any = { apiUrl: 'http://modly.test', currentJob: null,
+export const appState: any = { apiUrl: 'http://forge.test', currentJob: null,
setCurrentJob(value: any) { this.currentJob = value },
updateCurrentJob(value: any) { this.currentJob = { ...(this.currentJob ?? {}), ...value } } }
export const useAppStore: any = (selector: any) => selector(appState)
diff --git a/apps/forge-desktop/src/areas/workflows/workflowSceneSource.test.mjs b/apps/forge-desktop/src/areas/workflows/workflowSceneSource.test.mjs
index 778e13d3e..9558d8fea 100644
--- a/apps/forge-desktop/src/areas/workflows/workflowSceneSource.test.mjs
+++ b/apps/forge-desktop/src/areas/workflows/workflowSceneSource.test.mjs
@@ -6,14 +6,14 @@ import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
-const outfile = join(mkdtempSync(join(tmpdir(), 'modly-scene-source-')), 'scene.cjs')
+const outfile = join(mkdtempSync(join(tmpdir(), 'forge-scene-source-')), 'scene.cjs')
writeFileSync(outfile, buildSync({ entryPoints: [resolve('src/areas/workflows/workflowSceneSource.ts')], bundle: true, platform: 'node', format: 'cjs', write: false }).outputFiles[0].text)
const {
applySceneValidationResult,
invalidateValidatedScenePath,
resolveSceneSourceManifest,
} = createRequire(import.meta.url)(outfile)
-const encoded = Buffer.from(JSON.stringify({ schema: 'modly.scene-manifest.v1', sceneRoot: '.', assets: [] })).toString('base64')
+const encoded = Buffer.from(JSON.stringify({ schema: 'three-ws.forge.scene-manifest.v1', sceneRoot: '.', assets: [] })).toString('base64')
test('Load Scene resolves directory and manifest without image bytes', async () => {
for (const scenePath of ['Workflows/room', 'Workflows/room/scene-manifest.json']) {
@@ -68,3 +68,10 @@ test('an async validation result cannot overwrite a subsequently edited path', a
assert.equal(currentParams.path, 'Workflows/new')
assert.equal(currentParams.manifestPath, undefined)
})
+
+test('Load Scene accepts the legacy upstream schema and normalizes it', async () => {
+ const legacy = Buffer.from(JSON.stringify({ schema: 'modly.scene-manifest.v1', sceneRoot: '.', assets: [] })).toString('base64')
+ const result = await resolveSceneSourceManifest({ scenePath: 'Workflows/room', workspaceDir: '/workspace', readFileBase64: async () => legacy })
+ assert.equal(result.ok, true)
+ assert.equal(result.manifest.schema, 'three-ws.forge.scene-manifest.v1')
+})
diff --git a/apps/forge-desktop/src/areas/workflows/workflowSceneSource.ts b/apps/forge-desktop/src/areas/workflows/workflowSceneSource.ts
index efe2b3ed0..6c2ac21f5 100644
--- a/apps/forge-desktop/src/areas/workflows/workflowSceneSource.ts
+++ b/apps/forge-desktop/src/areas/workflows/workflowSceneSource.ts
@@ -1,6 +1,11 @@
import type { SceneArtifactManifestInitialView, SceneArtifactManifestPreview, SceneArtifactManifestV1 } from '../../shared/types/artifacts'
export const SCENE_MANIFEST_FILE_NAME = 'scene-manifest.json'
+export const SCENE_MANIFEST_SCHEMA = 'three-ws.forge.scene-manifest.v1'
+// Scenes written by extensions built for upstream Modly carry the original
+// schema id. They are byte-compatible, so they load and are normalized.
+export const LEGACY_SCENE_MANIFEST_SCHEMA = 'modly.scene-manifest.v1'
+const ACCEPTED_SCENE_MANIFEST_SCHEMAS = new Set([SCENE_MANIFEST_SCHEMA, LEGACY_SCENE_MANIFEST_SCHEMA])
export type SceneSourceKind = 'manifest' | 'directory'
@@ -154,8 +159,8 @@ function validateSceneManifest(manifest: unknown): { ok: true; manifest: SceneAr
if (!isPlainObject(manifest)) {
return { ok: false, error: 'Scene manifest must be a JSON object.' }
}
- if (manifest.schema !== 'modly.scene-manifest.v1') {
- return { ok: false, error: 'Scene manifest schema must be modly.scene-manifest.v1.' }
+ if (typeof manifest.schema !== 'string' || !ACCEPTED_SCENE_MANIFEST_SCHEMAS.has(manifest.schema)) {
+ return { ok: false, error: `Scene manifest schema must be ${SCENE_MANIFEST_SCHEMA}.` }
}
const rawSceneRoot = manifest.sceneRoot
@@ -191,7 +196,7 @@ function validateSceneManifest(manifest: unknown): { ok: true; manifest: SceneAr
sceneRoot,
manifest: {
...metadata,
- schema: 'modly.scene-manifest.v1',
+ schema: SCENE_MANIFEST_SCHEMA,
sceneRoot: rawSceneRoot,
assets: manifest.assets,
...(preview !== undefined ? { preview } : {}),
diff --git a/apps/forge-desktop/src/index.html b/apps/forge-desktop/src/index.html
index 6e778cf02..3bc91a8bb 100644
--- a/apps/forge-desktop/src/index.html
+++ b/apps/forge-desktop/src/index.html
@@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: file:; connect-src 'self' blob: http://127.0.0.1:8765 http://localhost:8080 https://api.github.com; worker-src 'self' blob:" />
- <title>Modly</title>
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: file: https://three.ws https://*.three.ws https://storage.googleapis.com; connect-src 'self' blob: http://127.0.0.1:8765 http://localhost:8080 https://api.github.com https://three.ws https://*.three.ws https://storage.googleapis.com; worker-src 'self' blob:" />
+ <title>three.ws Forge</title>
</head>
<body>
<div id="root"></div>
diff --git a/apps/forge-desktop/src/main.tsx b/apps/forge-desktop/src/main.tsx
index 65e866610..0433bb051 100644
--- a/apps/forge-desktop/src/main.tsx
+++ b/apps/forge-desktop/src/main.tsx
@@ -5,7 +5,7 @@ import '@styles/globals.css'
import '@xyflow/react/dist/style.css'
window.addEventListener('error', (e) => {
- window.electron.log.error(`${e.message} — ${e.filename}:${e.lineno}`)
+ window.electron.log.error(`${e.message}, ${e.filename}:${e.lineno}`)
})
window.addEventListener('unhandledrejection', (e) => {
window.electron.log.error(`Unhandled promise rejection: ${String(e.reason)}`)
diff --git a/apps/forge-desktop/src/shared/components/layout/TopBar.tsx b/apps/forge-desktop/src/shared/components/layout/TopBar.tsx
index c73fd02a0..af4f674b8 100644
--- a/apps/forge-desktop/src/shared/components/layout/TopBar.tsx
+++ b/apps/forge-desktop/src/shared/components/layout/TopBar.tsx
@@ -36,7 +36,7 @@ export default function TopBar(): JSX.Element {
<path d="M4037 2838 c-25 -33 -443 -702 -467 -747 l-12 -24 -1384 4 c-1247 4 -1385 2 -1399 -12 -44 -44 -21 -170 42 -231 21 -20 203 -132 408 -249 385 -220 1034 -594 1310 -754 88 -51 183 -105 210 -121 28 -15 88 -49 134 -76 158 -90 177 -86 475 84 127 72 416 236 641 363 226 128 507 287 625 354 212 121 250 145 250 163 0 5 -40 73 -88 151 -49 78 -177 286 -284 462 -393 643 -407 664 -430 665 -4 0 -18 -15 -31 -32z"/>
</g>
</svg>
- <span className="text-sm font-semibold text-zinc-100">Modly</span>
+ <span className="text-sm font-semibold text-zinc-100">three.ws Forge</span>
</div>
{/* Spacer */}
@@ -58,7 +58,7 @@ export default function TopBar(): JSX.Element {
</div>
)}
- {/* Window controls — Mac uses the native traffic-light buttons on the left */}
+ {/* Window controls, Mac uses the native traffic-light buttons on the left */}
{!isMac && (
<div className="flex items-center gap-1 no-drag">
<button
diff --git a/apps/forge-desktop/src/shared/components/ui/ErrorModal.tsx b/apps/forge-desktop/src/shared/components/ui/ErrorModal.tsx
index 164ed8d01..5fd6b8469 100644
--- a/apps/forge-desktop/src/shared/components/ui/ErrorModal.tsx
+++ b/apps/forge-desktop/src/shared/components/ui/ErrorModal.tsx
@@ -29,7 +29,7 @@ export function ErrorModal(): JSX.Element | null {
<span className="text-sm font-semibold text-zinc-100">An error occurred</span>
</div>
- {/* Error message — selectable */}
+ {/* Error message, selectable */}
<div className="px-5 py-4">
<pre className="text-xs text-red-400 bg-red-950/30 border border-red-900/30 rounded-lg px-4 py-3 max-h-60 overflow-y-auto whitespace-pre-wrap break-words select-text font-mono leading-relaxed">
{errorModal}
diff --git a/apps/forge-desktop/src/shared/components/ui/ModelLibraryModal.tsx b/apps/forge-desktop/src/shared/components/ui/ModelLibraryModal.tsx
index 28d689996..7aadc19c2 100644
--- a/apps/forge-desktop/src/shared/components/ui/ModelLibraryModal.tsx
+++ b/apps/forge-desktop/src/shared/components/ui/ModelLibraryModal.tsx
@@ -25,7 +25,7 @@ type Filter = 'all' | 'fits' | 'vision' | 'cad'
// ─── Helpers ──────────────────────────────────────────────────────────────────
export function formatBytes(n?: number): string {
- return n ? fmtBytes(n) : '—'
+ return n ? fmtBytes(n) : '-'
}
type Tone = 'accent' | 'warn' | 'muted' | 'outline'
@@ -80,11 +80,11 @@ export function ModelLibraryModal({ onClose }: { onClose: () => void }): JSX.Ele
// The model list comes from the shared catalog store, so a download or delete
// here immediately updates every other picker (chat, extension params,
- // chat) and vice-versa — no independent per-surface fetch.
+ // chat) and vice-versa, no independent per-surface fetch.
const { models, refresh: refreshModels } = useLlmModels()
// Downloads live in a module-level store (src/shared/services/llmDownloads.ts)
- // so they keep running — and stay visible on reopen — after this modal closes.
+ // so they keep running, and stay visible on reopen, after this modal closes.
const downloads = useLlmDownloadsStore((s) => s.downloads)
const downloadError = useLlmDownloadsStore((s) => s.error)
const startDownload = useLlmDownloadsStore((s) => s.start)
@@ -148,7 +148,7 @@ export function ModelLibraryModal({ onClose }: { onClose: () => void }): JSX.Ele
}
}, [apiUrl, refreshModels])
- // Once, on open (and if the API URL changes) — `refresh` is stable, see
+ // Once, on open (and if the API URL changes), `refresh` is stable, see
// useLlmModels. It used to be rebuilt on every render, so this effect re-ran
// on every render and each pass forced another /llm/models + /llm/status.
useEffect(() => { void refresh() }, [refresh])
@@ -172,7 +172,7 @@ export function ModelLibraryModal({ onClose }: { onClose: () => void }): JSX.Ele
}
// Downloads run in the shared store, possibly finishing while this modal is
- // closed — refresh the model list whenever one drops out (done/error/cancelled)
+ // closed, refresh the model list whenever one drops out (done/error/cancelled)
// while we're mounted, so "downloaded" flips without waiting for a remount.
const prevDownloadIdsRef = useRef<Set<string>>(new Set())
useEffect(() => {
@@ -219,7 +219,7 @@ export function ModelLibraryModal({ onClose }: { onClose: () => void }): JSX.Ele
// own picker leaves them out, so they cannot become the agent's model here.
const nodeOnly = tags.some((t) => t === 'code' || t === 'cad')
const fit = vramFit(m.vram_estimate_mb, vramGb)
- // Size and VRAM say nothing about how well a model drives the agent — a 4B
+ // Size and VRAM say nothing about how well a model drives the agent, a 4B
// outscores a 20B here. The tooltip keeps a measured rate and an estimate
// visibly apart.
const grade = agentGrade(m)
@@ -327,7 +327,7 @@ export function ModelLibraryModal({ onClose }: { onClose: () => void }): JSX.Ele
<div>
<h2 className="text-lg font-semibold text-zinc-100 leading-tight">Models</h2>
<p className="text-xs text-zinc-500 mt-0.5">
- Local models shared by the whole app — chat agent and extensions.
+ Local models shared by the whole app, chat agent and extensions.
</p>
</div>
<div className="flex items-center gap-2 shrink-0">
@@ -372,7 +372,7 @@ export function ModelLibraryModal({ onClose }: { onClose: () => void }): JSX.Ele
{status === null && (
<p className="text-[11px] text-zinc-500 flex items-center gap-2">
- Cannot reach the Modly API.
+ Cannot reach the three.ws Forge API.
{/* The library does not poll, so a backend that was still starting
* up needs a way back in short of reopening the modal. */}
<button onClick={() => { void refresh() }} className="text-accent-light hover:underline underline-offset-2">
@@ -399,7 +399,7 @@ export function ModelLibraryModal({ onClose }: { onClose: () => void }): JSX.Ele
{
title: 'Installed',
items: installed,
- empty: filtering ? 'No installed model matches.' : 'No model installed yet — add a .gguf file or download a suggestion below.',
+ empty: filtering ? 'No installed model matches.' : 'No model installed yet, add a .gguf file or download a suggestion below.',
},
{
title: 'Suggested',
diff --git a/apps/forge-desktop/src/shared/components/ui/UpdateModal.tsx b/apps/forge-desktop/src/shared/components/ui/UpdateModal.tsx
index 3aa7dd67f..774b32eb5 100644
--- a/apps/forge-desktop/src/shared/components/ui/UpdateModal.tsx
+++ b/apps/forge-desktop/src/shared/components/ui/UpdateModal.tsx
@@ -26,10 +26,10 @@ export function UpdateModal({ currentVersion, latestVersion, onDismiss }: Update
<div className="absolute inset-0 bg-gradient-to-br from-accent/10 via-transparent to-transparent pointer-events-none" />
<div className="relative flex items-center gap-4">
- <img src={logo} alt="Modly" className="w-12 h-12 rounded-xl shrink-0" />
+ <img src={logo} alt="three.ws Forge" className="w-12 h-12 rounded-xl shrink-0" />
<div>
<h2 className="text-lg font-semibold text-zinc-100 leading-tight">New update available</h2>
- <p className="text-sm text-zinc-500 mt-0.5">A new version of Modly is ready to download.</p>
+ <p className="text-sm text-zinc-500 mt-0.5">A new version of three.ws Forge is ready to download.</p>
</div>
</div>
</div>
@@ -41,7 +41,7 @@ export function UpdateModal({ currentVersion, latestVersion, onDismiss }: Update
<div className="flex-1 flex flex-col items-center gap-1">
<span className="text-[11px] uppercase tracking-widest text-zinc-500 font-medium">Current</span>
<span className="text-base font-mono font-semibold text-zinc-400">
- {currentVersion ? `v${currentVersion}` : '—'}
+ {currentVersion ? `v${currentVersion}` : '-'}
</span>
</div>
diff --git a/apps/forge-desktop/src/shared/components/ui/agentGrade.test.mjs b/apps/forge-desktop/src/shared/components/ui/agentGrade.test.mjs
index 3ee1aee42..7b0fbbcc9 100644
--- a/apps/forge-desktop/src/shared/components/ui/agentGrade.test.mjs
+++ b/apps/forge-desktop/src/shared/components/ui/agentGrade.test.mjs
@@ -6,9 +6,9 @@ import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
-// Same bundling trick as vramFit.test.mjs — a pure helper, no React deps.
+// Same bundling trick as vramFit.test.mjs: a pure helper, no React deps.
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-agentgrade-test-')), 'agentGrade.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-agentgrade-test-')), 'agentGrade.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/shared/components/ui/agentGrade.ts')],
@@ -32,13 +32,13 @@ test('a model without a tier gets no badge at all', () => {
test('a measured model shows its own score', () => {
const g = agentGrade({ agent_tier: 'excellent', agent_score: 0.98, agent_source: 'measured' })
assert.equal(g.label, 'Agent: excellent (98%)')
- assert.match(g.title, /Modly's tool-calling suite/)
+ assert.match(g.title, /three.ws Forge's tool-calling suite/)
})
test('an unmeasured model never borrows the credibility of a measurement', () => {
const g = agentGrade({ agent_tier: 'solid', agent_score: 0.9, agent_source: 'estimate' })
assert.equal(g.label, 'Agent: solid') // no percentage
- assert.match(g.title, /not measured in Modly/)
+ assert.match(g.title, /not measured in three.ws Forge/)
})
test('the note is carried into the tooltip', () => {
diff --git a/apps/forge-desktop/src/shared/components/ui/agentGrade.ts b/apps/forge-desktop/src/shared/components/ui/agentGrade.ts
index 874b103da..72066b17f 100644
--- a/apps/forge-desktop/src/shared/components/ui/agentGrade.ts
+++ b/apps/forge-desktop/src/shared/components/ui/agentGrade.ts
@@ -1,9 +1,9 @@
/**
- * How well a model drives the agent — the one thing the model list never said.
+ * How well a model drives the agent, the one thing the model list never said.
*
* Size and VRAM are already shown, and both are poor proxies: a 4B tops the
* tool-calling tests while a 20B sits below it. `agent_tier` comes from the
- * catalog; when Modly's own eval suite has been run against the model, the
+ * catalog; when three.ws Forge's own eval suite has been run against the model, the
* measured pass rate is shown with it, and everything else is flagged as an
* estimate so the two are never confused.
*/
@@ -12,7 +12,7 @@ export type AgentTier = 'excellent' | 'solid' | 'limited'
export interface AgentGradeInput {
agent_tier?: string | null
- agent_score?: number | null // 0..1, Modly's eval suite
+ agent_score?: number | null // 0..1, three.ws Forge's eval suite
agent_note?: string | null
agent_source?: string | null // 'measured' | 'estimate'
}
@@ -35,8 +35,8 @@ export function agentGrade(m: AgentGradeInput | null | undefined): AgentGrade |
const { label, className } = TIERS[tier]
const measured = m?.agent_source === 'measured' && typeof m?.agent_score === 'number'
- const score = measured ? `${Math.round((m!.agent_score as number) * 100)}% on Modly's tool-calling suite` : null
- const title = [score ?? 'Estimated from published benchmarks — not measured in Modly', m?.agent_note]
+ const score = measured ? `${Math.round((m!.agent_score as number) * 100)}% on three.ws Forge's tool-calling suite` : null
+ const title = [score ?? 'Estimated from published benchmarks, not measured in three.ws Forge', m?.agent_note]
.filter(Boolean)
.join(' · ')
diff --git a/apps/forge-desktop/src/shared/components/ui/vramFit.test.mjs b/apps/forge-desktop/src/shared/components/ui/vramFit.test.mjs
index 551fd69d2..5247f7c89 100644
--- a/apps/forge-desktop/src/shared/components/ui/vramFit.test.mjs
+++ b/apps/forge-desktop/src/shared/components/ui/vramFit.test.mjs
@@ -6,10 +6,10 @@ import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
-// Bundle the pure vramFit helper (no React deps) into CJS — same approach as
+// Bundle the pure vramFit helper (no React deps) into CJS, same approach as
// autoWire.test.mjs / preflight.test.mjs.
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-vramfit-test-')), 'vramFit.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-vramfit-test-')), 'vramFit.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/shared/components/ui/vramFit.ts')],
diff --git a/apps/forge-desktop/src/shared/hooks/useApi.test.mjs b/apps/forge-desktop/src/shared/hooks/useApi.test.mjs
index 45afc06c5..181361cbc 100644
--- a/apps/forge-desktop/src/shared/hooks/useApi.test.mjs
+++ b/apps/forge-desktop/src/shared/hooks/useApi.test.mjs
@@ -11,7 +11,7 @@ import { join, resolve } from 'node:path'
// - appStore → useAppStore returns a fixed apiUrl (no React runtime)
// The stub modules communicate with the test through globalThis.
function loadUseApi() {
- const dir = mkdtempSync(join(tmpdir(), 'modly-useapi-test-'))
+ const dir = mkdtempSync(join(tmpdir(), 'forge-useapi-test-'))
const axiosStub = join(dir, 'axios-stub.mjs')
writeFileSync(axiosStub, `
diff --git a/apps/forge-desktop/src/shared/services/llmDownloads.ts b/apps/forge-desktop/src/shared/services/llmDownloads.ts
index 18de4412f..edd10b71e 100644
--- a/apps/forge-desktop/src/shared/services/llmDownloads.ts
+++ b/apps/forge-desktop/src/shared/services/llmDownloads.ts
@@ -2,7 +2,7 @@ import { create } from 'zustand'
import { useAppStore } from '@shared/stores/appStore'
// GGUF model downloads must survive the Model Library modal being closed and
-// reopened — the backend already keeps downloading in the background once
+// reopened, the backend already keeps downloading in the background once
// started (see api/routers/llm.py), it just needs a watcher that isn't tied to
// a component's lifecycle. This module-level store owns that watch, the same
// way agentChat.ts owns the chat's SSE stream outside React.
@@ -36,7 +36,7 @@ export async function consumeSse(url: string, onEvent: (data: SseEvent) => void,
let data: SseEvent
try { data = JSON.parse(line.slice(6)) } catch { continue /* malformed frame */ }
onEvent(data)
- // The stream stays open after an error frame — stop reading instead of
+ // The stream stays open after an error frame, stop reading instead of
// spinning on a download the server has already given up on.
if (data.error) { void reader.cancel().catch(() => {}); break outer }
}
@@ -95,7 +95,7 @@ export const useLlmDownloadsStore = create<LlmDownloadsStore>((set) => ({
async cancel(modelId) {
const apiUrl = useAppStore.getState().apiUrl
await fetch(`${apiUrl}/llm/download/cancel?model_id=${encodeURIComponent(modelId)}`, { method: 'POST' }).catch(() => {})
- // A paused download has no live watcher to hit its .finally cleanup — drop
+ // A paused download has no live watcher to hit its .finally cleanup, drop
// the row here so Cancel visibly clears it.
set((s) => ({ downloads: { ...s.downloads, [modelId]: undefined } }))
},
diff --git a/apps/forge-desktop/src/shared/stores/agentStore.ts b/apps/forge-desktop/src/shared/stores/agentStore.ts
index 23b2cfc0b..6969c9215 100644
--- a/apps/forge-desktop/src/shared/stores/agentStore.ts
+++ b/apps/forge-desktop/src/shared/stores/agentStore.ts
@@ -13,7 +13,7 @@ export interface ExternalConfig {
export const PROVIDERS: Record<ProviderId, { label: string; baseUrl: string; noKey?: boolean }> = {
local: { label: 'Local (llama.cpp)', baseUrl: '' },
- // Ollama serves an OpenAI-compatible API — reuses models already pulled with it.
+ // Ollama serves an OpenAI-compatible API, reuses models already pulled with it.
ollama: { label: 'Ollama', baseUrl: 'http://localhost:11434/v1', noKey: true },
openai: { label: 'ChatGPT (OpenAI)', baseUrl: 'https://api.openai.com/v1' },
anthropic: { label: 'Claude (Anthropic)', baseUrl: 'https://api.anthropic.com/v1' },
@@ -54,8 +54,7 @@ interface AgentSettings {
// ─── Secure persistence ────────────────────────────────────────────────────────
// External provider API keys are the one sensitive field in this store. They're
-// encrypted at rest via Electron's safeStorage (OS keychain/DPAPI/libsecret) —
-// everything else (provider, localModel, defaultThinking) stays plain, it isn't
+// encrypted at rest via Electron's safeStorage (OS keychain/DPAPI/libsecret),// everything else (provider, localModel, defaultThinking) stays plain, it isn't
// a secret. The ciphertext itself still lives in localStorage as a hex string;
// only the plaintext key never touches disk unencrypted.
@@ -125,15 +124,14 @@ export const useAgentStore = create<AgentSettings>()(
setDefaultThinking: (mode) => set({ defaultThinking: mode }),
}),
{
- name: 'modly-agent-settings',
+ name: 'forge-agent-settings',
version: 3,
storage: createJSONStorage(() => secureAgentStorage),
- // v0 stored { ollamaUrl, defaultModel } — drop them, keep only thinking.
+ // v0 stored { ollamaUrl, defaultModel }, drop them, keep only thinking.
// v2 retired the Qwen2.5/Llama3.1 catalog ids.
// v3 is a shape-less bump: the version change alone forces one re-persist
// through secureAgentStorage.setItem, which encrypts any legacy
- // plaintext API key saved before safeStorage existed. Self-limiting —
- // once stored as v3 it never re-runs, so it costs one write, not one per boot.
+ // plaintext API key saved before safeStorage existed. Self-limiting, // once stored as v3 it never re-runs, so it costs one write, not one per boot.
migrate: (persisted: unknown, version) => {
if (version === 0 && persisted && typeof persisted === 'object') {
const old = persisted as { defaultThinking?: ThinkingMode }
diff --git a/apps/forge-desktop/src/shared/stores/appStore.ts b/apps/forge-desktop/src/shared/stores/appStore.ts
index bb5ddd0e0..6af31e632 100644
--- a/apps/forge-desktop/src/shared/stores/appStore.ts
+++ b/apps/forge-desktop/src/shared/stores/appStore.ts
@@ -206,7 +206,7 @@ export const useAppStore = create<AppState>()(
set({ setupStatus: 'error', setupError: data.message })
})
- // Fire and forget — progress comes via IPC events
+ // Fire and forget: progress comes via IPC events
window.electron.setup.run()
},
@@ -308,7 +308,7 @@ export const useAppStore = create<AppState>()(
},
}),
{
- name: 'modly-store',
+ name: 'forge-store',
partialize: (state) => ({
generationOptions: state.generationOptions,
showRamIndicator: state.showRamIndicator,
diff --git a/apps/forge-desktop/src/shared/stores/extensionsStore.test.mjs b/apps/forge-desktop/src/shared/stores/extensionsStore.test.mjs
index 068dc923f..5fe953c65 100644
--- a/apps/forge-desktop/src/shared/stores/extensionsStore.test.mjs
+++ b/apps/forge-desktop/src/shared/stores/extensionsStore.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-ext-store-test-')), 'extensionsStore.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-ext-store-test-')), 'extensionsStore.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/shared/stores/extensionsStore.ts')],
diff --git a/apps/forge-desktop/src/shared/stores/llmModelsStore.react.test.mjs b/apps/forge-desktop/src/shared/stores/llmModelsStore.react.test.mjs
index b8c305f9c..ec3c9f7a9 100644
--- a/apps/forge-desktop/src/shared/stores/llmModelsStore.react.test.mjs
+++ b/apps/forge-desktop/src/shared/stores/llmModelsStore.react.test.mjs
@@ -55,8 +55,8 @@ test('refresh and the model list keep their identity across renders', async () =
test('a consumer that refreshes from an effect settles instead of looping', async () => {
// Exactly the shape of ModelLibraryModal: an effect keyed on `refresh` that
- // stores something in state. With an unstable `refresh` this rendered — and
- // fetched — without end; the modal flickered for as long as it was open.
+ // stores something in state. With an unstable `refresh` this rendered, and
+ // fetched, without end; the modal flickered for as long as it was open.
const useLlmModels = freshHook()
const calls = countingFetch()
let renders = 0
@@ -67,7 +67,7 @@ test('a consumer that refreshes from an effect settles instead of looping', asyn
renders++
// Fails fast and says why: an unstable `refresh` makes this loop forever,
// and a test that hangs for a minute before dying explains nothing.
- if (renders > 50) throw new Error('render loop — the effect keeps re-running')
+ if (renders > 50) throw new Error('render loop, the effect keeps re-running')
React.useEffect(() => { void refresh(); setStatus({ checkedAt: renders }) }, [refresh])
return null
}
diff --git a/apps/forge-desktop/src/shared/stores/llmModelsStore.test.mjs b/apps/forge-desktop/src/shared/stores/llmModelsStore.test.mjs
index 372d42bad..ba453ebb4 100644
--- a/apps/forge-desktop/src/shared/stores/llmModelsStore.test.mjs
+++ b/apps/forge-desktop/src/shared/stores/llmModelsStore.test.mjs
@@ -6,11 +6,11 @@ import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
-// Bundle the store with its real zustand dependency — same approach as
+// Bundle the store with its real zustand dependency, same approach as
// workflowsStore.test.mjs. Only fetchModels() is exercised, so the React hook
// at the bottom of the module is never rendered.
function loadStore() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-llmstore-test-')), 'llmModelsStore.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-llmstore-test-')), 'llmModelsStore.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/shared/stores/llmModelsStore.ts')],
diff --git a/apps/forge-desktop/src/shared/stores/llmModelsStore.ts b/apps/forge-desktop/src/shared/stores/llmModelsStore.ts
index 89da3ed1c..782cfaec5 100644
--- a/apps/forge-desktop/src/shared/stores/llmModelsStore.ts
+++ b/apps/forge-desktop/src/shared/stores/llmModelsStore.ts
@@ -13,9 +13,9 @@ export interface LlmModel {
downloaded: boolean
source: 'catalog' | 'custom'
tags?: string[]
- /** How well this model drives the agent — see components/ui/agentGrade.ts.
+ /** How well this model drives the agent, see components/ui/agentGrade.ts.
* `agent_score` is only shown when `agent_source` is 'measured', i.e. the
- * model was actually run against Modly's own eval suite. */
+ * model was actually run against three.ws Forge's own eval suite. */
agent_tier?: 'excellent' | 'solid' | 'limited'
agent_score?: number
agent_source?: 'measured' | 'estimate'
diff --git a/apps/forge-desktop/src/shared/stores/workflowsStore.test.mjs b/apps/forge-desktop/src/shared/stores/workflowsStore.test.mjs
index 964e5d587..dc5398fe4 100644
--- a/apps/forge-desktop/src/shared/stores/workflowsStore.test.mjs
+++ b/apps/forge-desktop/src/shared/stores/workflowsStore.test.mjs
@@ -10,7 +10,7 @@ import { join, resolve } from 'node:path'
// type-only one (electron.d) which esbuild erases. The store reads the global
// `window.electron.workflows.*` bridge, which we stub per test.
function loadStore() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-wfstore-test-')), 'workflowsStore.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-wfstore-test-')), 'workflowsStore.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/shared/stores/workflowsStore.ts')],
diff --git a/apps/forge-desktop/src/shared/stores/workflowsStore.ts b/apps/forge-desktop/src/shared/stores/workflowsStore.ts
index f6fb829cc..6715894b8 100644
--- a/apps/forge-desktop/src/shared/stores/workflowsStore.ts
+++ b/apps/forge-desktop/src/shared/stores/workflowsStore.ts
@@ -5,7 +5,7 @@ interface WorkflowsStore {
workflows: Workflow[]
loading: boolean
activeId: string | null
- /** Workflows shown as tabs. Closing a tab only removes it here — the file stays on disk. */
+ /** Workflows shown as tabs. Closing a tab only removes it here, the file stays on disk. */
openIds: string[]
/** Folder names for the workflow browser (workflows reference them via their `folder` field) */
folders: string[]
@@ -41,7 +41,7 @@ export const FOLDER_COLORS = ['#38bdf8', '#34d399', '#fbbf24', '#f87171', '#a78b
// Empty folders have no workflow referencing them, so their names (and colors)
// are persisted separately in localStorage to survive reloads.
-const FOLDERS_KEY = 'modly-workflow-folders'
+const FOLDERS_KEY = 'forge-workflow-folders'
function readStoredFolders(): { names: string[]; colors: Record<string, string>; bookmarked: string[] } {
try {
diff --git a/apps/forge-desktop/src/shared/types/artifacts.ts b/apps/forge-desktop/src/shared/types/artifacts.ts
index 57c6b8d4f..0ac9277c2 100644
--- a/apps/forge-desktop/src/shared/types/artifacts.ts
+++ b/apps/forge-desktop/src/shared/types/artifacts.ts
@@ -12,7 +12,7 @@ export interface SceneArtifactManifestInitialView {
up?: [number, number, number]
}
export interface SceneArtifactManifestV1 {
- schema: 'modly.scene-manifest.v1'
+ schema: 'three-ws.forge.scene-manifest.v1'
sceneRoot: string
assets: unknown[]
preview?: SceneArtifactManifestPreview
diff --git a/apps/forge-desktop/src/shared/types/electron.d.ts b/apps/forge-desktop/src/shared/types/electron.d.ts
index c171b6648..e899f15c5 100644
--- a/apps/forge-desktop/src/shared/types/electron.d.ts
+++ b/apps/forge-desktop/src/shared/types/electron.d.ts
@@ -53,7 +53,7 @@ export interface ModelExtension {
localPath?: string
nodes: ExtensionNode[]
weightGroups?: SharedWeightGroup[]
- /** Folder exists but is not a loadable extension — see manifestError */
+ /** Folder exists but is not a loadable extension, see manifestError */
corrupted?: boolean
/** Why the folder is corrupted: manifest gone, manifest unparseable, or install never completed */
manifestError?: 'missing' | 'invalid' | 'incomplete'
@@ -94,7 +94,7 @@ export interface ProcessExtension {
localPath?: string
entry: string
nodes: ExtensionNode[]
- /** Folder exists but is not a loadable extension — see manifestError */
+ /** Folder exists but is not a loadable extension, see manifestError */
corrupted?: boolean
/** Why the folder is corrupted: manifest gone, manifest unparseable, or install never completed */
manifestError?: 'missing' | 'invalid' | 'incomplete'
diff --git a/apps/forge-desktop/src/shared/utils/format.test.mjs b/apps/forge-desktop/src/shared/utils/format.test.mjs
index 7fa3fb8d7..17feeff1f 100644
--- a/apps/forge-desktop/src/shared/utils/format.test.mjs
+++ b/apps/forge-desktop/src/shared/utils/format.test.mjs
@@ -6,9 +6,9 @@ import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
-// format.ts has no imports — bundle it straight to CJS and require.
+// format.ts has no imports, bundle it straight to CJS and require.
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-format-test-')), 'format.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-format-test-')), 'format.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/shared/utils/format.ts')],
diff --git a/apps/forge-desktop/src/shared/utils/notification.ts b/apps/forge-desktop/src/shared/utils/notification.ts
index e51799740..0a20b4ad5 100644
--- a/apps/forge-desktop/src/shared/utils/notification.ts
+++ b/apps/forge-desktop/src/shared/utils/notification.ts
@@ -1,6 +1,6 @@
/**
* Native OS notification (Windows toast / macOS Notification Center / Linux) for
- * events worth surfacing even when the user isn't looking at the app — e.g. a
+ * events worth surfacing even when the user isn't looking at the app, e.g. a
* generation or workflow run finishing while they're in another window. Plays
* each platform's own default notification sound (the toast isn't `silent`).
*
@@ -16,10 +16,10 @@ async function notifyIfUnfocused(title: string, body: string): Promise<void> {
}
}
-export function showCompletionNotification(body: string, title = 'Modly'): Promise<void> {
+export function showCompletionNotification(body: string, title = 'three.ws Forge'): Promise<void> {
return notifyIfUnfocused(title, body)
}
-export function showErrorNotification(body: string, title = 'Modly'): Promise<void> {
+export function showErrorNotification(body: string, title = 'three.ws Forge'): Promise<void> {
return notifyIfUnfocused(title, body)
}
diff --git a/apps/forge-desktop/src/shared/utils/paramPicker.test.mjs b/apps/forge-desktop/src/shared/utils/paramPicker.test.mjs
index 5c975705d..c5db341c1 100644
--- a/apps/forge-desktop/src/shared/utils/paramPicker.test.mjs
+++ b/apps/forge-desktop/src/shared/utils/paramPicker.test.mjs
@@ -8,7 +8,7 @@ import { join, resolve } from 'node:path'
// paramPicker.ts only type-imports from electron.d, so esbuild erases it.
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-parampicker-test-')), 'paramPicker.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-parampicker-test-')), 'paramPicker.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/shared/utils/paramPicker.ts')],
@@ -55,7 +55,7 @@ test('resolvePickerIntent falls back to the folder picker when unset or unknown'
// ─── openParamPicker ───────────────────────────────────────────────────────────
-test('openParamPicker opens the image dialog for pickerIntent: image — issue #155', async () => {
+test('openParamPicker opens the image dialog for pickerIntent: image, issue #155', async () => {
const fs = fakeFs()
const picked = await openParamPicker(stringParam({ pickerIntent: 'image' }), fs)
@@ -87,7 +87,7 @@ test('PICKER_LABELS names every intent, so the browse button always has an acces
})
// ─── Call sites ────────────────────────────────────────────────────────────────
-// The bug in #155 was not in a resolver (there wasn't one) — it was the string
+// The bug in #155 was not in a resolver (there wasn't one), it was the string
// param's browse button calling selectDirectory() unconditionally. There is no
// DOM harness in this repo, so guard the wiring at the source level instead.
diff --git a/apps/forge-desktop/src/shared/utils/paramPicker.ts b/apps/forge-desktop/src/shared/utils/paramPicker.ts
index 7e3a19741..5dc1a5ddf 100644
--- a/apps/forge-desktop/src/shared/utils/paramPicker.ts
+++ b/apps/forge-desktop/src/shared/utils/paramPicker.ts
@@ -25,8 +25,8 @@ export interface ParamPickerApi {
type PickerParam = Pick<ParamSchema, 'pickerIntent' | 'picker_intent'>
/**
- * Intent a param asks for, falling back to 'folder' — the behavior every
- * `string` param had before `pickerIntent` existed — when it is unset or is a
+ * Intent a param asks for, falling back to 'folder', the behavior every
+ * `string` param had before `pickerIntent` existed, when it is unset or is a
* value this build doesn't know about.
*/
export function resolvePickerIntent(param: PickerParam | undefined): PickerIntent {
diff --git a/apps/forge-desktop/src/shared/utils/weightVariants.test.mjs b/apps/forge-desktop/src/shared/utils/weightVariants.test.mjs
index 1659391b4..001a0213f 100644
--- a/apps/forge-desktop/src/shared/utils/weightVariants.test.mjs
+++ b/apps/forge-desktop/src/shared/utils/weightVariants.test.mjs
@@ -7,7 +7,7 @@ import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
function loadModule() {
- const outfile = join(mkdtempSync(join(tmpdir(), 'modly-weight-variants-test-')), 'weightVariants.cjs')
+ const outfile = join(mkdtempSync(join(tmpdir(), 'forge-weight-variants-test-')), 'weightVariants.cjs')
const require = createRequire(import.meta.url)
const result = buildSync({
entryPoints: [resolve('src/shared/utils/weightVariants.ts')],
diff --git a/apps/forge-desktop/src/styles/globals.css b/apps/forge-desktop/src/styles/globals.css
index 9bc7baa25..d4d7960f6 100644
--- a/apps/forge-desktop/src/styles/globals.css
+++ b/apps/forge-desktop/src/styles/globals.css
@@ -1,4 +1,4 @@
-@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
@font-face {
font-family: 'Atkinson Hyperlegible';
@@ -37,8 +37,8 @@
height: 100%;
width: 100%;
overflow: hidden;
- background-color: #111113;
- color: #f4f4f5;
+ background-color: #0a0a0a;
+ color: #e8e8e8;
font-family: var(--app-font);
-webkit-font-smoothing: antialiased;
user-select: none;
@@ -49,14 +49,14 @@
width: 6px;
}
::-webkit-scrollbar-track {
- background: #18181b;
+ background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
- background: #3f3f46;
+ background: #333333;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
- background: #52525b;
+ background: #4a4a4a;
}
}
diff --git a/apps/forge-desktop/tailwind.config.js b/apps/forge-desktop/tailwind.config.js
index c061cadce..a87132d4b 100644
--- a/apps/forge-desktop/tailwind.config.js
+++ b/apps/forge-desktop/tailwind.config.js
@@ -4,22 +4,26 @@ module.exports = {
theme: {
extend: {
colors: {
+ // three.ws monochrome base (public/tokens.css: --bg-0, --bg-1, --ink).
surface: {
- 50: '#f4f4f5',
- 100: '#e4e4e7',
- 200: '#27272a',
- 300: '#1e1e21',
- 400: '#18181b',
- 500: '#111113',
+ 50: '#e8e8e8',
+ 100: '#d4d4d4',
+ 200: '#262626',
+ 300: '#1f1f1f',
+ 400: '#1a1a1a',
+ 500: '#0a0a0a',
},
+ // three.ws identity violet (public/tokens.css: --accent-violet,
+ // --accent-violet-strong, and the rgb(139, 92, 246) wallet fill).
accent: {
- DEFAULT: '#7c3aed',
- light: '#a78bfa',
- dark: '#5b21b6',
+ DEFAULT: '#8b5cf6',
+ light: '#c4b5fd',
+ dark: '#6d28d9',
}
},
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
+ display: ['Space Grotesk', 'Inter', 'system-ui', 'sans-serif'],
mono: ['JetBrains Mono', 'monospace'],
},
keyframes: {
diff --git a/apps/forge-desktop/tools/modly-cli/SKILL.md b/apps/forge-desktop/tools/forge-cli/SKILL.md
similarity index 62%
rename from apps/forge-desktop/tools/modly-cli/SKILL.md
rename to apps/forge-desktop/tools/forge-cli/SKILL.md
index 8b492a6ee..8acc2d709 100644
--- a/apps/forge-desktop/tools/modly-cli/SKILL.md
+++ b/apps/forge-desktop/tools/forge-cli/SKILL.md
@@ -1,20 +1,20 @@
---
-name: modly-cli
-description: Use when an agent needs to call a running Modly desktop instance from the terminal to generate/export image-to-3D assets through canonical JSON-first automation commands.
+name: forge-cli
+description: Use when an agent needs to call a running three.ws Forge desktop instance from the terminal to generate/export image-to-3D assets through canonical JSON-first automation commands.
version: 1.2.0
-author: Modly
+author: three.ws Forge
license: MIT
metadata:
hermes:
- tags: [modly, image-to-3d, cli, automation, agents]
+ tags: [three-ws, forge, image-to-3d, cli, automation, agents]
related_skills: []
---
-# Modly CLI
+# three.ws Forge CLI
## Overview
-Modly exposes a local API at `http://127.0.0.1:8765` while the official desktop app is running. The stdlib-only CLI at `tools/modly-cli/agent.py` is an agent helper over the canonical automation contract:
+three.ws Forge exposes a local API at `http://127.0.0.1:8765` while the official desktop app is running. The stdlib-only CLI at `tools/forge-cli/agent.py` is an agent helper over the canonical automation contract:
- `health`
- `model`
@@ -26,16 +26,16 @@ Final machine-readable JSON is printed to stdout. Progress JSON lines, when requ
## Prerequisites
-Launch the official Modly desktop app first, then check readiness:
+Launch the official three.ws Forge desktop app first, then check readiness:
```bash
-python tools/modly-cli/agent.py health
+python tools/forge-cli/agent.py health
```
Use `--compact` when another agent needs single-line JSON:
```bash
-python tools/modly-cli/agent.py --compact health
+python tools/forge-cli/agent.py --compact health
```
`GET /health` is checked before business operations. If the app is unavailable, failures are structured:
@@ -44,7 +44,7 @@ python tools/modly-cli/agent.py --compact health
{
"ok": false,
"code": "API_UNAVAILABLE",
- "message": "Cannot reach Modly API at ..."
+ "message": "Cannot reach three.ws Forge API at ..."
}
```
@@ -53,23 +53,23 @@ python tools/modly-cli/agent.py --compact health
Inspect models through `/model/*`:
```bash
-python tools/modly-cli/agent.py model list
-python tools/modly-cli/agent.py model status
-python tools/modly-cli/agent.py model params --model active
+python tools/forge-cli/agent.py model list
+python tools/forge-cli/agent.py model status
+python tools/forge-cli/agent.py model params --model active
```
Start or resume workflow runs:
```bash
-python tools/modly-cli/agent.py workflow-run start --image ./input.png --wait
-python tools/modly-cli/agent.py workflow-run status <run_id>
-python tools/modly-cli/agent.py workflow-run cancel <run_id>
+python tools/forge-cli/agent.py workflow-run start --image ./input.png --wait
+python tools/forge-cli/agent.py workflow-run status <run_id>
+python tools/forge-cli/agent.py workflow-run cancel <run_id>
```
Generate from an image and export the finished mesh:
```bash
-python tools/modly-cli/agent.py generate \
+python tools/forge-cli/agent.py generate \
--image ./input.png \
--output ./export.glb \
--progress
@@ -84,8 +84,8 @@ python tools/modly-cli/agent.py generate \
"workspace_path": "Default/model.glb",
"export_path": "/absolute/path/to/export.glb",
"meta": {
- "status_command": "python tools/modly-cli/agent.py workflow-run status ...",
- "cancel_command": "python tools/modly-cli/agent.py workflow-run cancel ...",
+ "status_command": "python tools/forge-cli/agent.py workflow-run status ...",
+ "cancel_command": "python tools/forge-cli/agent.py workflow-run cancel ...",
"legacy": false
}
}
@@ -94,14 +94,14 @@ python tools/modly-cli/agent.py generate \
Use `--no-export` when the caller only needs the workspace path. The hidden `export` helper remains available to download an existing workspace mesh, but it is not part of the canonical root command set:
```bash
-python tools/modly-cli/agent.py export --path Default/model.glb --output ./model.glb
+python tools/forge-cli/agent.py export --path Default/model.glb --output ./model.glb
```
Discover capabilities or process runs only when the running server exposes the canonical contract:
```bash
-python tools/modly-cli/agent.py capability list
-python tools/modly-cli/agent.py process-run status <run_id>
+python tools/forge-cli/agent.py capability list
+python tools/forge-cli/agent.py process-run status <run_id>
```
If the contract is absent, the CLI fails closed:
@@ -123,9 +123,9 @@ If the contract is absent, the CLI fails closed:
The old `/generate/*` endpoints are explicit compatibility commands:
```bash
-python tools/modly-cli/agent.py legacy job <job_id>
-python tools/modly-cli/agent.py legacy cancel <job_id>
-python tools/modly-cli/agent.py legacy generate --image ./input.png --output ./legacy.glb
+python tools/forge-cli/agent.py legacy job <job_id>
+python tools/forge-cli/agent.py legacy cancel <job_id>
+python tools/forge-cli/agent.py legacy generate --image ./input.png --output ./legacy.glb
```
Legacy responses include `meta.legacy: true`. Top-level `job`, `cancel`, `models`, and `params` aliases may still parse for older scripts, but they are not the documented canonical surface.
@@ -135,30 +135,30 @@ Legacy responses include `meta.legacy: true`. Top-level `job`, `cancel`, `models
Headless startup helpers live under `dev`:
```bash
-python tools/modly-cli/agent.py dev serve-api --print-command
-python tools/modly-cli/agent.py dev ensure-server
-python tools/modly-cli/agent.py dev ensure-server --start --detach
+python tools/forge-cli/agent.py dev serve-api --print-command
+python tools/forge-cli/agent.py dev ensure-server
+python tools/forge-cli/agent.py dev ensure-server --start --detach
```
These commands start or inspect only the FastAPI backend. They do not imply Electron/Desktop bridge readiness, scene operation readiness, extension process execution readiness, or full workflow support. Prefer launching the official desktop app for real agent workflows.
## Experimental ComfyUI Helpers
-ComfyUI orchestration is outside the canonical Modly contract and lives under `experimental`:
+ComfyUI orchestration is outside the canonical three.ws Forge contract and lives under `experimental`:
```bash
-python tools/modly-cli/agent.py experimental comfy-image \
+python tools/forge-cli/agent.py experimental comfy-image \
--workflow Trellis2Workflow \
--prompt "clean object render, isolated on white" \
--comfy-output ./source.png
-python tools/modly-cli/agent.py experimental generate-from-workflow \
+python tools/forge-cli/agent.py experimental generate-from-workflow \
--workflow Trellis2-Full \
--prompt "clean orthographic product render of a stylized robot toy" \
--output ./export.glb
```
-`experimental generate-from-workflow --workflow <name> --output <path>` treats `--output` as the final artifact location. If the ComfyUI history contains a downloadable `.glb`, `.gltf`, `.obj`, `.stl`, or `.ply`, the CLI downloads that asset directly and does not call Modly health or generation. If the workflow only produces an image, the CLI downloads that image and falls back through the canonical Modly workflow-run generation path. If no supported asset or image is found, it fails with `code: "NO_WORKFLOW_OUTPUT"`.
+`experimental generate-from-workflow --workflow <name> --output <path>` treats `--output` as the final artifact location. If the ComfyUI history contains a downloadable `.glb`, `.gltf`, `.obj`, `.stl`, or `.ply`, the CLI downloads that asset directly and does not call three.ws Forge health or generation. If the workflow only produces an image, the CLI downloads that image and falls back through the canonical three.ws Forge workflow-run generation path. If no supported asset or image is found, it fails with `code: "NO_WORKFLOW_OUTPUT"`.
## Hidden Helper Aliases
@@ -169,12 +169,12 @@ The top-level `status`, `export`, and `batch` helpers remain parseable for older
The hidden `batch` helper generates meshes sequentially from a directory or manifest JSON through the canonical `generate` path:
```bash
-python tools/modly-cli/agent.py batch \
+python tools/forge-cli/agent.py batch \
--input-dir ./images \
--output-dir ./meshes \
--continue-on-error
-python tools/modly-cli/agent.py batch \
+python tools/forge-cli/agent.py batch \
--manifest ./jobs.json \
--output-dir ./meshes
```
@@ -183,9 +183,9 @@ Manifest files may be a JSON list, or an object with `jobs` or `images`. Each en
## Verification Checklist
-- [ ] `python tools/modly-cli/agent.py health` returns `ok: true`.
-- [ ] `python tools/modly-cli/agent.py model list` returns model entries.
-- [ ] `python tools/modly-cli/agent.py generate --image <image> --output <mesh>` returns `ok: true`, `run.kind: workflowRun`, and recovery metadata.
+- [ ] `python tools/forge-cli/agent.py health` returns `ok: true`.
+- [ ] `python tools/forge-cli/agent.py model list` returns model entries.
+- [ ] `python tools/forge-cli/agent.py generate --image <image> --output <mesh>` returns `ok: true`, `run.kind: workflowRun`, and recovery metadata.
- [ ] The reported `export_path` exists and has non-zero size when export is enabled.
-- [ ] `python tools/modly-cli/agent.py workflow-run status <run_id>` can resume polling from metadata.
-- [ ] `python tools/modly-cli/test_agent.py` passes.
+- [ ] `python tools/forge-cli/agent.py workflow-run status <run_id>` can resume polling from metadata.
+- [ ] `python tools/forge-cli/test_agent.py` passes.
diff --git a/apps/forge-desktop/tools/modly-cli/agent.py b/apps/forge-desktop/tools/forge-cli/agent.py
similarity index 91%
rename from apps/forge-desktop/tools/modly-cli/agent.py
rename to apps/forge-desktop/tools/forge-cli/agent.py
index e424aa25b..29bd87120 100644
--- a/apps/forge-desktop/tools/modly-cli/agent.py
+++ b/apps/forge-desktop/tools/forge-cli/agent.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
-"""Minimal agent-friendly CLI for the local Modly API.
+"""Minimal agent-friendly CLI for the local three.ws Forge API.
The Electron app normally owns the FastAPI server. This tool is intentionally
-small and stdlib-only so automation agents can call a running Modly instance,
+small and stdlib-only so automation agents can call a running three.ws Forge instance,
optionally start only the FastAPI backend, and always receive parseable JSON.
"""
from __future__ import annotations
@@ -37,18 +37,18 @@ def _float_env(primary: str, fallback: str, default: float) -> float:
return default
-DEFAULT_BASE_URL = os.environ.get("MODLY_API_URL", "http://127.0.0.1:8765")
-DEFAULT_TIMEOUT_SECONDS = _int_env("MODLY_CLI_TIMEOUT", "MODLY_AGENT_TIMEOUT", 1800)
-DEFAULT_POLL_SECONDS = _float_env("MODLY_CLI_POLL_SECONDS", "MODLY_AGENT_POLL_SECONDS", 2.0)
+DEFAULT_BASE_URL = os.environ.get("THREEWS_API_URL") or os.environ.get("MODLY_API_URL", "http://127.0.0.1:8765")
+DEFAULT_TIMEOUT_SECONDS = _int_env("THREEWS_CLI_TIMEOUT", "THREEWS_AGENT_TIMEOUT", 1800)
+DEFAULT_POLL_SECONDS = _float_env("THREEWS_CLI_POLL_SECONDS", "THREEWS_AGENT_POLL_SECONDS", 2.0)
EXPORT_FORMATS = ("glb", "stl", "obj", "ply")
IMAGE_SUFFIXES = {".png", ".jpg", ".jpeg", ".webp"}
WORKFLOW_ASSET_SUFFIXES = {".glb", ".gltf", ".obj", ".stl", ".ply"}
-class ModlyCliError(RuntimeError):
+class ForgeCliError(RuntimeError):
"""Expected user/API failure that should be reported as JSON."""
- def __init__(self, message: str, *, code: str = "MODLY_CLI_ERROR", http_status: int | None = None) -> None:
+ def __init__(self, message: str, *, code: str = "THREEWS_CLI_ERROR", http_status: int | None = None) -> None:
super().__init__(message)
self.message = message
self.code = code
@@ -76,13 +76,13 @@ def _request_json(
raw = resp.read().decode("utf-8")
except urllib.error.HTTPError as exc:
detail = exc.read().decode("utf-8", errors="replace")
- raise ModlyCliError(f"HTTP {exc.code} from {url}: {detail}", code=f"HTTP_{exc.code}", http_status=exc.code) from exc
+ raise ForgeCliError(f"HTTP {exc.code} from {url}: {detail}", code=f"HTTP_{exc.code}", http_status=exc.code) from exc
except urllib.error.URLError as exc:
- raise ModlyCliError(f"Cannot reach Modly API at {url}: {exc.reason}", code="API_UNAVAILABLE") from exc
+ raise ForgeCliError(f"Cannot reach three.ws Forge API at {url}: {exc.reason}", code="API_UNAVAILABLE") from exc
try:
return json.loads(raw) if raw else {}
except json.JSONDecodeError as exc:
- raise ModlyCliError(f"Expected JSON from {url}, got: {raw[:500]}", code="INVALID_JSON_RESPONSE") from exc
+ raise ForgeCliError(f"Expected JSON from {url}, got: {raw[:500]}", code="INVALID_JSON_RESPONSE") from exc
def _download(url: str, dest: Path, *, timeout: float) -> int:
@@ -98,15 +98,15 @@ def _download(url: str, dest: Path, *, timeout: float) -> int:
total += len(chunk)
except urllib.error.HTTPError as exc:
detail = exc.read().decode("utf-8", errors="replace")
- raise ModlyCliError(f"HTTP {exc.code} while downloading {url}: {detail}", code=f"HTTP_{exc.code}", http_status=exc.code) from exc
+ raise ForgeCliError(f"HTTP {exc.code} while downloading {url}: {detail}", code=f"HTTP_{exc.code}", http_status=exc.code) from exc
except urllib.error.URLError as exc:
- raise ModlyCliError(f"Cannot download {url}: {exc.reason}", code="DOWNLOAD_FAILED") from exc
+ raise ForgeCliError(f"Cannot download {url}: {exc.reason}", code="DOWNLOAD_FAILED") from exc
except OSError as exc:
- raise ModlyCliError(f"Cannot write to {dest}: {exc}", code="WRITE_FAILED") from exc
+ raise ForgeCliError(f"Cannot write to {dest}: {exc}", code="WRITE_FAILED") from exc
def _multipart_form(fields: dict[str, str], file_field: str, file_path: Path) -> tuple[bytes, str]:
- boundary = f"----modly-cli-{time.time_ns()}"
+ boundary = f"----forge-cli-{time.time_ns()}"
parts: list[bytes] = []
for name, value in fields.items():
@@ -153,7 +153,7 @@ def _validate_workspace_path(workspace_path: str) -> str:
or any(part == ".." for part in parts)
or any(_is_windows_drive_component(part) for part in parts)
):
- raise ModlyCliError(f"Invalid workspace path: {workspace_path}", code="INVALID_WORKSPACE_PATH")
+ raise ForgeCliError(f"Invalid workspace path: {workspace_path}", code="INVALID_WORKSPACE_PATH")
return value
@@ -166,7 +166,7 @@ def _export_workspace_path(base_url: str, workspace_path: str, fmt: str, dest: P
def _try_health(base_url: str, timeout: float) -> dict[str, Any] | None:
try:
health = _request_json("GET", f"{base_url.rstrip('/')}/health", timeout=timeout)
- except ModlyCliError:
+ except ForgeCliError:
return None
return health if isinstance(health, dict) else {"raw": health}
@@ -179,7 +179,7 @@ def _require_health(base_url: str, timeout: float) -> dict[str, Any]:
def _model_catalog(base_url: str, timeout: float) -> list[dict[str, Any]]:
data = _request_json("GET", f"{base_url.rstrip('/')}/model/all", timeout=timeout)
if not isinstance(data, list):
- raise ModlyCliError(f"Expected /model/all to return a list, got: {data}", code="INVALID_MODEL_CATALOG")
+ raise ForgeCliError(f"Expected /model/all to return a list, got: {data}", code="INVALID_MODEL_CATALOG")
return [model for model in data if isinstance(model, dict)]
@@ -192,7 +192,7 @@ def _validate_model_id(base_url: str, request_timeout: float, model_id: str, mod
ids = _model_ids(models)
if model_id not in ids:
available = ", ".join(sorted(ids)) or "(none)"
- raise ModlyCliError(
+ raise ForgeCliError(
f"Unknown model id '{model_id}'. Use one of: {available}",
code="INVALID_MODEL_ID",
)
@@ -200,7 +200,7 @@ def _validate_model_id(base_url: str, request_timeout: float, model_id: str, mod
def _recovery_meta(base_url: str, run_id: str, *, legacy: bool = False, kind: str = "workflow-run", extra: dict[str, Any] | None = None) -> dict[str, Any]:
- prefix = "python tools/modly-cli/agent.py"
+ prefix = "python tools/forge-cli/agent.py"
if base_url.rstrip("/") != DEFAULT_BASE_URL.rstrip("/"):
prefix = f"{prefix} --base-url {base_url.rstrip('/')}"
if legacy:
@@ -222,14 +222,14 @@ def _recovery_meta(base_url: str, run_id: str, *, legacy: bool = False, kind: st
return meta
-def _unsupported_process(message: str = "This process is not available through the canonical process-run contract.") -> ModlyCliError:
- return ModlyCliError(message, code="UNSUPPORTED_PROCESS")
+def _unsupported_process(message: str = "This process is not available through the canonical process-run contract.") -> ForgeCliError:
+ return ForgeCliError(message, code="UNSUPPORTED_PROCESS")
def _request_supported_contract(method: str, url: str, *, timeout: float, data: bytes | None = None, headers: dict[str, str] | None = None) -> Any:
try:
return _request_json(method, url, timeout=timeout, data=data, headers=headers)
- except ModlyCliError as exc:
+ except ForgeCliError as exc:
if exc.http_status == 404:
raise _unsupported_process() from exc
raise
@@ -277,7 +277,7 @@ def _default_api_dir() -> Path | None:
if (repo_api / "main.py").exists():
return repo_api
for local in _windows_env_paths("LOCALAPPDATA"):
- installed = local / "Programs" / "Modly" / "resources" / "api"
+ installed = local / "Programs" / "three.ws Forge" / "resources" / "api"
if (installed / "main.py").exists():
return installed
return None
@@ -289,7 +289,7 @@ def _default_python(api_dir: Path) -> Path | None:
api_dir / ".venv" / "bin" / "python",
]
for appdata in _windows_env_paths("APPDATA"):
- candidates.append(appdata / "Modly" / "dependencies" / "venv" / "Scripts" / "python.exe")
+ candidates.append(appdata / "three.ws Forge" / "dependencies" / "venv" / "Scripts" / "python.exe")
candidates.append(Path(sys.executable))
for candidate in candidates:
if candidate.exists():
@@ -297,11 +297,11 @@ def _default_python(api_dir: Path) -> Path | None:
return None
-def _load_modly_settings() -> dict[str, Any]:
+def _load_forge_settings() -> dict[str, Any]:
candidates: list[Path] = []
for appdata in _windows_env_paths("APPDATA"):
- candidates.append(appdata / "Modly" / "settings.json")
- candidates.append(Path.home() / ".config" / "Modly" / "settings.json")
+ candidates.append(appdata / "three.ws Forge" / "settings.json")
+ candidates.append(Path.home() / ".config" / "three.ws Forge" / "settings.json")
for path in candidates:
if path.exists():
try:
@@ -315,19 +315,19 @@ def _load_modly_settings() -> dict[str, Any]:
def _resolve_serve_config(args: argparse.Namespace) -> tuple[Path, Path, dict[str, str], list[str], str]:
api_dir = Path(args.api_dir).expanduser().resolve() if getattr(args, "api_dir", None) else _default_api_dir()
if not api_dir or not (api_dir / "main.py").exists():
- raise ModlyCliError("Could not find Modly api directory; pass --api-dir")
+ raise ForgeCliError("Could not find three.ws Forge api directory; pass --api-dir")
python = Path(args.python).expanduser().resolve() if getattr(args, "python", None) else _default_python(api_dir)
if not python or not python.exists():
- raise ModlyCliError("Could not find Modly Python environment; pass --python")
+ raise ForgeCliError("Could not find three.ws Forge Python environment; pass --python")
- settings = _load_modly_settings()
+ settings = _load_forge_settings()
env = os.environ.copy()
hf_token = getattr(args, "hf_token", None) or settings.get("hfToken") or os.environ.get("HF_TOKEN", "")
env.update({
"PYTHONUNBUFFERED": "1",
- "MODELS_DIR": getattr(args, "models_dir", None) or settings.get("modelsDir") or str(Path.home() / ".modly" / "models"),
- "WORKSPACE_DIR": getattr(args, "workspace_dir", None) or settings.get("workspaceDir") or str(Path.home() / ".modly" / "workspace"),
+ "MODELS_DIR": getattr(args, "models_dir", None) or settings.get("modelsDir") or str(Path.home() / ".three-ws-forge" / "models"),
+ "WORKSPACE_DIR": getattr(args, "workspace_dir", None) or settings.get("workspaceDir") or str(Path.home() / ".three-ws-forge" / "workspace"),
"EXTENSIONS_DIR": getattr(args, "extensions_dir", None) or settings.get("extensionsDir") or "",
"SELECTED_MODEL_ID": getattr(args, "model", None) or os.environ.get("SELECTED_MODEL_ID", ""),
"HUGGING_FACE_HUB_TOKEN": hf_token,
@@ -396,16 +396,16 @@ def _parse_params(params_json: str | None, params_file: str | None) -> dict[str,
try:
parsed = json.loads(text)
except json.JSONDecodeError as exc:
- raise ModlyCliError(f"params must be valid JSON: {exc}") from exc
+ raise ForgeCliError(f"params must be valid JSON: {exc}") from exc
if not isinstance(parsed, dict):
- raise ModlyCliError("params must be a JSON object")
+ raise ForgeCliError("params must be a JSON object")
return parsed
def _choose_auto_model(base_url: str, request_timeout: float) -> str:
active = _request_json("GET", f"{base_url.rstrip('/')}/model/status", timeout=request_timeout)
if not isinstance(active, dict) or not active.get("id"):
- raise ModlyCliError(f"Could not resolve active model id: {active}", code="MODEL_NOT_READY")
+ raise ForgeCliError(f"Could not resolve active model id: {active}", code="MODEL_NOT_READY")
return _validate_model_id(base_url, request_timeout, str(active["id"]))
@@ -416,7 +416,7 @@ def _resolve_model_id(args: argparse.Namespace, base_url: str) -> str:
if model_id == "active":
active = _request_json("GET", f"{base_url}/model/status", timeout=args.request_timeout)
if not isinstance(active, dict) or not active.get("id"):
- raise ModlyCliError(f"Could not resolve active model id: {active}", code="MODEL_NOT_READY")
+ raise ForgeCliError(f"Could not resolve active model id: {active}", code="MODEL_NOT_READY")
return _validate_model_id(base_url, args.request_timeout, str(active["id"]))
return _validate_model_id(base_url, args.request_timeout, str(model_id))
@@ -456,9 +456,9 @@ def _load_comfy_workflow(workflow: str, *, host: str, timeout: float) -> dict[st
try:
data = json.loads(path.read_text(encoding="utf-8"))
except json.JSONDecodeError as exc:
- raise ModlyCliError(f"workflow must be valid JSON: {path}: {exc}") from exc
+ raise ForgeCliError(f"workflow must be valid JSON: {path}: {exc}") from exc
if not isinstance(data, dict):
- raise ModlyCliError(f"workflow JSON must be an object: {path}")
+ raise ForgeCliError(f"workflow JSON must be an object: {path}")
return data
candidates = [workflow, f"{workflow}.json"] if not workflow.endswith(".json") else [workflow]
@@ -467,7 +467,7 @@ def _load_comfy_workflow(workflow: str, *, host: str, timeout: float) -> dict[st
for prefix in ("/userdata/workflows/", "/api/userdata/workflows/", "/userdata/", "/api/userdata/"):
try:
data = _request_json("GET", f"{host.rstrip('/')}{prefix}{quoted}", timeout=timeout)
- except ModlyCliError:
+ except ForgeCliError:
continue
if isinstance(data, dict):
return data
@@ -492,19 +492,19 @@ def _load_comfy_workflow(workflow: str, *, host: str, timeout: float) -> dict[st
try:
data = json.loads(candidate.read_text(encoding="utf-8"))
except json.JSONDecodeError as exc:
- raise ModlyCliError(f"workflow must be valid JSON: {candidate}: {exc}") from exc
+ raise ForgeCliError(f"workflow must be valid JSON: {candidate}: {exc}") from exc
if isinstance(data, dict):
return data
- raise ModlyCliError(f"Could not find ComfyUI workflow '{workflow}'. Pass a JSON path or set COMFYUI_WORKFLOW_DIR.")
+ raise ForgeCliError(f"Could not find ComfyUI workflow '{workflow}'. Pass a JSON path or set COMFYUI_WORKFLOW_DIR.")
def _patch_comfy_workflow(workflow: dict[str, Any], *, prompt: str | None, seed: int | None) -> dict[str, Any]:
workflow = json.loads(json.dumps(workflow))
nodes = workflow.get("prompt", workflow)
if not isinstance(nodes, dict):
- raise ModlyCliError("ComfyUI workflow must be API format (top-level node-id object, or {'prompt': {...}})")
+ raise ForgeCliError("ComfyUI workflow must be API format (top-level node-id object, or {'prompt': {...}})")
if "nodes" in workflow and "links" in workflow:
- raise ModlyCliError("ComfyUI workflow is editor format; export it as API format first")
+ raise ForgeCliError("ComfyUI workflow is editor format; export it as API format first")
if prompt is not None:
patched = False
@@ -530,7 +530,7 @@ def _patch_comfy_workflow(workflow: dict[str, Any], *, prompt: str | None, seed:
if patched:
break
if not patched:
- raise ModlyCliError("Could not find a text/prompt input to patch in ComfyUI workflow")
+ raise ForgeCliError("Could not find a text/prompt input to patch in ComfyUI workflow")
if seed is not None:
for node in nodes.values():
@@ -549,11 +549,11 @@ def _run_comfy_workflow(args: argparse.Namespace) -> dict[str, Any]:
prompt = getattr(args, "prompt", None)
seed = getattr(args, "seed", None)
graph = _patch_comfy_workflow(workflow, prompt=prompt, seed=seed)
- payload = json.dumps({"prompt": graph, "client_id": "modly-cli"}).encode("utf-8")
+ payload = json.dumps({"prompt": graph, "client_id": "forge-cli"}).encode("utf-8")
queued = _request_json("POST", f"{host}/prompt", timeout=args.request_timeout, data=payload, headers={"Content-Type": "application/json"})
prompt_id = queued.get("prompt_id") if isinstance(queued, dict) else None
if not prompt_id:
- raise ModlyCliError(f"ComfyUI did not return prompt_id: {queued}")
+ raise ForgeCliError(f"ComfyUI did not return prompt_id: {queued}")
deadline = time.monotonic() + args.timeout
history: dict[str, Any] = {}
@@ -566,7 +566,7 @@ def _run_comfy_workflow(args: argparse.Namespace) -> dict[str, Any]:
print(json.dumps({"phase": "comfy", "prompt_id": prompt_id, "status": "running"}), file=sys.stderr)
time.sleep(args.poll)
if not history:
- raise ModlyCliError(f"Timed out waiting for ComfyUI prompt {prompt_id}", code="TIMEOUT")
+ raise ForgeCliError(f"Timed out waiting for ComfyUI prompt {prompt_id}", code="TIMEOUT")
return {"ok": True, "comfy_url": host, "workflow": args.workflow, "prompt_id": str(prompt_id), "history": history}
@@ -613,7 +613,7 @@ def _download_comfy_ref(host: str, ref: dict[str, Any], dest: Path, *, timeout:
def _temp_path_for_comfy_ref(ref: dict[str, Any], *, default_suffix: str) -> Path:
suffix = _comfy_ref_suffix(ref) or default_suffix
- tmp = tempfile.NamedTemporaryFile(delete=False, prefix="modly-comfy-", suffix=suffix)
+ tmp = tempfile.NamedTemporaryFile(delete=False, prefix="forge-comfy-", suffix=suffix)
tmp.close()
return Path(tmp.name)
@@ -625,7 +625,7 @@ def _download_comfy_image_output(args: argparse.Namespace, comfy: dict[str, Any]
image_ref = _find_comfy_file_ref(history, IMAGE_SUFFIXES)
if not image_ref:
- raise ModlyCliError(f"ComfyUI prompt {prompt_id} completed without a supported image output", code="NO_WORKFLOW_OUTPUT")
+ raise ForgeCliError(f"ComfyUI prompt {prompt_id} completed without a supported image output", code="NO_WORKFLOW_OUTPUT")
out_path: Path | None = getattr(args, "comfy_output", None)
if out_path:
@@ -664,7 +664,7 @@ def cmd_generate_from_workflow(args: argparse.Namespace) -> int:
asset_ref = _find_comfy_file_ref(history, WORKFLOW_ASSET_SUFFIXES)
if asset_ref:
if not args.output:
- raise ModlyCliError("--output is required when a workflow produces a direct 3D asset", code="OUTPUT_REQUIRED")
+ raise ForgeCliError("--output is required when a workflow produces a direct 3D asset", code="OUTPUT_REQUIRED")
export_dest = Path(args.output).expanduser().resolve()
bytes_written = _download_comfy_ref(host, asset_ref, export_dest, timeout=args.request_timeout)
_json_print({
@@ -708,7 +708,7 @@ def _workflow_workspace_path(status: dict[str, Any]) -> str:
output_url = str(status.get("output_url") or "")
if output_url:
return _workspace_relative_path(output_url)
- raise ModlyCliError(f"Workflow run completed without an output path: {status}", code="MISSING_OUTPUT")
+ raise ForgeCliError(f"Workflow run completed without an output path: {status}", code="MISSING_OUTPUT")
def _start_workflow_run(args: argparse.Namespace, image_path: Path, *, base_url: str, model_id: str, params: dict[str, Any]) -> tuple[str, dict[str, Any]]:
@@ -728,7 +728,7 @@ def _start_workflow_run(args: argparse.Namespace, image_path: Path, *, base_url:
)
run_id = started.get("run_id") if isinstance(started, dict) else None
if not run_id:
- raise ModlyCliError(f"Modly did not return a run_id: {started}", code="MISSING_RUN_ID")
+ raise ForgeCliError(f"three.ws Forge did not return a run_id: {started}", code="MISSING_RUN_ID")
return str(run_id), started if isinstance(started, dict) else {"raw": started}
@@ -742,14 +742,14 @@ def _poll_workflow_run(args: argparse.Namespace, *, base_url: str, run_id: str,
if state == "done":
return last_status, _workflow_workspace_path(last_status)
if state in {"error", "cancelled"}:
- raise ModlyCliError(f"Workflow run {run_id} ended with status {state}: {last_status}", code="WORKFLOW_RUN_FAILED")
+ raise ForgeCliError(f"Workflow run {run_id} ended with status {state}: {last_status}", code="WORKFLOW_RUN_FAILED")
if getattr(args, "progress", False) and not getattr(args, "quiet", False):
progress = last_status.get("progress", 0)
step = last_status.get("step", "")
print(json.dumps({"phase": progress_label, "run_id": run_id, "status": state, "progress": progress, "step": step}), file=sys.stderr)
time.sleep(args.poll)
- raise ModlyCliError(f"Timed out waiting for workflow run {run_id}. Last status: {last_status}", code="TIMEOUT")
+ raise ForgeCliError(f"Timed out waiting for workflow run {run_id}. Last status: {last_status}", code="TIMEOUT")
def _run_workflow_run(
@@ -773,7 +773,7 @@ def cmd_workflow_run_start(args: argparse.Namespace) -> int:
_require_health(base_url, args.request_timeout)
image_path = Path(args.image).expanduser().resolve()
if not image_path.exists() or not image_path.is_file():
- raise ModlyCliError(f"image file not found: {image_path}", code="IMAGE_NOT_FOUND")
+ raise ForgeCliError(f"image file not found: {image_path}", code="IMAGE_NOT_FOUND")
model_id = _resolve_model_id(args, base_url)
params = _canonical_generation_params(args)
run_id, status, rel_path = _run_workflow_run(args, image_path, base_url=base_url, model_id=model_id, params=params, wait=getattr(args, "wait", False))
@@ -842,7 +842,7 @@ def _run_generation_job(
)
job_id = started.get("job_id") if isinstance(started, dict) else None
if not job_id:
- raise ModlyCliError(f"Modly did not return a job_id: {started}")
+ raise ForgeCliError(f"three.ws Forge did not return a job_id: {started}")
deadline = time.monotonic() + args.timeout
last_status: dict[str, Any] = {}
@@ -853,17 +853,17 @@ def _run_generation_job(
if state == "done":
output_url = str(last_status.get("output_url") or "")
if not output_url:
- raise ModlyCliError(f"Job completed without output_url: {last_status}")
+ raise ForgeCliError(f"Job completed without output_url: {last_status}")
return str(job_id), last_status, _workspace_relative_path(output_url)
if state in {"error", "cancelled"}:
- raise ModlyCliError(f"Job {job_id} ended with status {state}: {last_status}")
+ raise ForgeCliError(f"Job {job_id} ended with status {state}: {last_status}")
if getattr(args, "progress", False) and not getattr(args, "quiet", False):
progress = last_status.get("progress", 0)
step = last_status.get("step", "")
print(json.dumps({"phase": progress_label, "job_id": job_id, "status": state, "progress": progress, "step": step}), file=sys.stderr)
time.sleep(args.poll)
- raise ModlyCliError(f"Timed out waiting for job {job_id}. Last status: {last_status}")
+ raise ForgeCliError(f"Timed out waiting for job {job_id}. Last status: {last_status}")
def _generate_one(args: argparse.Namespace, image_path: Path, output_path: Path | None = None) -> dict[str, Any]:
@@ -871,7 +871,7 @@ def _generate_one(args: argparse.Namespace, image_path: Path, output_path: Path
_require_health(base_url, args.request_timeout)
image_path = image_path.expanduser().resolve()
if not image_path.exists() or not image_path.is_file():
- raise ModlyCliError(f"image file not found: {image_path}", code="IMAGE_NOT_FOUND")
+ raise ForgeCliError(f"image file not found: {image_path}", code="IMAGE_NOT_FOUND")
_ensure_no_external_texture_process(args)
params = _canonical_generation_params(args)
@@ -922,7 +922,7 @@ def cmd_legacy_generate(args: argparse.Namespace) -> int:
_require_health(base_url, args.request_timeout)
image_path = Path(args.image).expanduser().resolve()
if not image_path.exists() or not image_path.is_file():
- raise ModlyCliError(f"image file not found: {image_path}", code="IMAGE_NOT_FOUND")
+ raise ForgeCliError(f"image file not found: {image_path}", code="IMAGE_NOT_FOUND")
params = _parse_params(getattr(args, "params_json", None), getattr(args, "params_file", None))
model_id = _resolve_model_id(args, base_url)
job_id, status, rel_path = _run_generation_job(
@@ -974,7 +974,7 @@ def cmd_export(args: argparse.Namespace) -> int:
def _iter_images(input_dir: Path) -> list[Path]:
if not input_dir.exists() or not input_dir.is_dir():
- raise ModlyCliError(f"input directory not found: {input_dir}")
+ raise ForgeCliError(f"input directory not found: {input_dir}")
return sorted(p for p in input_dir.iterdir() if p.is_file() and p.suffix.lower() in IMAGE_SUFFIXES)
@@ -982,10 +982,10 @@ def _manifest_jobs(path: Path, fallback_output_dir: Path | None, default_format:
try:
raw = json.loads(path.read_text(encoding="utf-8"))
except json.JSONDecodeError as exc:
- raise ModlyCliError(f"manifest must be valid JSON: {exc}") from exc
+ raise ForgeCliError(f"manifest must be valid JSON: {exc}") from exc
entries = raw.get("jobs", raw.get("images")) if isinstance(raw, dict) else raw
if not isinstance(entries, list):
- raise ModlyCliError("manifest must be a JSON list or object with a jobs/images list")
+ raise ForgeCliError("manifest must be a JSON list or object with a jobs/images list")
jobs: list[tuple[Path, Path | None, str]] = []
for index, entry in enumerate(entries):
@@ -996,14 +996,14 @@ def _manifest_jobs(path: Path, fallback_output_dir: Path | None, default_format:
elif isinstance(entry, dict):
image_value = entry.get("image") or entry.get("image_path") or entry.get("path")
if not image_value:
- raise ModlyCliError(f"manifest entry {index} is missing image")
+ raise ForgeCliError(f"manifest entry {index} is missing image")
image = Path(str(image_value))
fmt = str(entry.get("format") or default_format)
if fmt not in EXPORT_FORMATS:
- raise ModlyCliError(f"manifest entry {index} has unsupported format: {fmt}")
+ raise ForgeCliError(f"manifest entry {index} has unsupported format: {fmt}")
output = Path(str(entry["output"])) if entry.get("output") else None
else:
- raise ModlyCliError(f"manifest entry {index} must be a string or object")
+ raise ForgeCliError(f"manifest entry {index} must be a string or object")
if not image.is_absolute():
image = path.parent / image
@@ -1023,7 +1023,7 @@ def cmd_batch(args: argparse.Namespace) -> int:
jobs = _manifest_jobs(Path(args.manifest).expanduser().resolve(), output_dir, args.format)
else:
if not args.input_dir or output_dir is None:
- raise ModlyCliError("batch requires --input-dir and --output-dir, or --manifest with per-entry outputs")
+ raise ForgeCliError("batch requires --input-dir and --output-dir, or --manifest with per-entry outputs")
input_dir = Path(args.input_dir).expanduser().resolve()
jobs = [(image, output_dir / f"{image.stem}.{args.format}", args.format) for image in _iter_images(input_dir)]
@@ -1035,7 +1035,7 @@ def cmd_batch(args: argparse.Namespace) -> int:
args.format = fmt
try:
results.append(_generate_one(args, image, output))
- except ModlyCliError as exc:
+ except ForgeCliError as exc:
failures += 1
results.append({"ok": False, "image": str(image), "error": str(exc)})
if not args.continue_on_error:
@@ -1068,9 +1068,9 @@ def cmd_ensure_server(args: argparse.Namespace) -> int:
_json_print({"ok": True, "started": False, "base_url": base_url, "health": health, "meta": meta}, compact=args.compact)
return 0
if not args.start:
- message = "Modly API is not running; launch Modly or run ensure-server --start"
+ message = "three.ws Forge API is not running; launch three.ws Forge or run ensure-server --start"
if args.fail_on_unavailable:
- raise ModlyCliError(message, code="API_UNAVAILABLE")
+ raise ForgeCliError(message, code="API_UNAVAILABLE")
_json_print({"ok": False, "started": False, "base_url": base_url, "error": message, "code": "API_UNAVAILABLE", "message": message, "meta": meta}, compact=args.compact)
return 0
api_dir, _python, env, cmd, resolved_url = _resolve_serve_config(args)
@@ -1132,7 +1132,7 @@ def _add_comfy_options(parser: argparse.ArgumentParser) -> None:
parser.add_argument("--prompt", help="Prompt text to inject into the first positive text/prompt input")
parser.add_argument("--seed", type=int, help="Seed to inject into seed/noise_seed inputs")
parser.add_argument("--comfy-url", default=os.environ.get("COMFYUI_URL", "http://127.0.0.1:8188"), help="ComfyUI API URL (default: http://127.0.0.1:8188)")
- parser.add_argument("--comfy-output", help="Where to save the ComfyUI image output before passing it to Modly")
+ parser.add_argument("--comfy-output", help="Where to save the ComfyUI image output before passing it to three.ws Forge")
def _add_generation_options(parser: argparse.ArgumentParser, *, image: bool, output: bool, batch: bool = False) -> None:
@@ -1143,7 +1143,7 @@ def _add_generation_options(parser: argparse.ArgumentParser, *, image: bool, out
parser.add_argument("--no-export", action="store_true", help="Do not download/export the completed workspace mesh")
parser.add_argument("--format", choices=EXPORT_FORMATS, default="glb", help="Export format (default: glb)")
parser.add_argument("--model", default="auto", help="Model id to use, 'active', or 'auto' (default: auto)")
- parser.add_argument("--collection", default="Agent", help="Modly workspace collection (default: Agent)")
+ parser.add_argument("--collection", default="Agent", help="three.ws Forge workspace collection (default: Agent)")
parser.add_argument("--remesh", choices=["quad", "triangle", "none"], default="quad", help="Remesh mode (default: quad)")
parser.add_argument("--texture", dest="enable_texture", action="store_true", default=True, help="Enable texture generation (default)")
parser.add_argument("--no-texture", dest="enable_texture", action="store_false", help="Disable texture generation for faster geometry-only smoke tests")
@@ -1167,8 +1167,8 @@ def _add_generation_options(parser: argparse.ArgumentParser, *, image: bool, out
def _add_serve_options(parser: argparse.ArgumentParser, *, include_start: bool = False) -> None:
if include_start:
parser.add_argument("--start", action="store_true", help="Start the backend if health check fails")
- parser.add_argument("--api-dir", help="Directory containing Modly API main.py")
- parser.add_argument("--python", help="Python executable with Modly API dependencies installed")
+ parser.add_argument("--api-dir", help="Directory containing three.ws Forge API main.py")
+ parser.add_argument("--python", help="Python executable with three.ws Forge API dependencies installed")
parser.add_argument("--host", default="127.0.0.1", help="Backend host (default: 127.0.0.1)")
parser.add_argument("--port", type=int, default=8765, help="Backend port (default: 8765)")
parser.add_argument("--models-dir", help="Models directory for the backend")
@@ -1182,22 +1182,22 @@ def _add_serve_options(parser: argparse.ArgumentParser, *, include_start: bool =
class JsonArgumentParser(argparse.ArgumentParser):
def error(self, message: str) -> None:
- raise ModlyCliError(message, code="INVALID_ARGUMENTS")
+ raise ForgeCliError(message, code="INVALID_ARGUMENTS")
def build_parser() -> argparse.ArgumentParser:
parser = JsonArgumentParser(
- prog="modly-cli",
- description="Tiny stdlib-only CLI for agents calling a running Modly desktop API.",
+ prog="forge-cli",
+ description="Tiny stdlib-only CLI for agents calling a running three.ws Forge desktop API.",
)
- parser.add_argument("--base-url", default=DEFAULT_BASE_URL, help=f"Modly API URL (default: {DEFAULT_BASE_URL})")
+ parser.add_argument("--base-url", default=DEFAULT_BASE_URL, help=f"three.ws Forge API URL (default: {DEFAULT_BASE_URL})")
parser.add_argument("--request-timeout", type=float, default=30, help="Per-request timeout in seconds (default: 30)")
parser.add_argument("--compact", action="store_true", help="Print compact one-line JSON")
parser.add_argument("--quiet", action="store_true", help="Suppress progress output; final JSON is still printed")
canonical_commands = "{health,model,workflow-run,capability,process-run,generate,dev,experimental,legacy}"
sub = parser.add_subparsers(dest="command", required=True, metavar=canonical_commands)
- health = sub.add_parser("health", help="Check that Modly's local API is reachable")
+ health = sub.add_parser("health", help="Check that three.ws Forge's local API is reachable")
health.set_defaults(func=cmd_health)
status = sub.add_parser("status", help=argparse.SUPPRESS)
@@ -1338,7 +1338,7 @@ def main(argv: list[str] | None = None) -> int:
try:
args = parser.parse_args(argv)
return int(args.func(args))
- except ModlyCliError as exc:
+ except ForgeCliError as exc:
_json_print({"ok": False, "code": exc.code, "message": exc.message, "error": exc.message}, compact=getattr(args, "compact", False) if args else False)
return 1
except SystemExit as exc:
diff --git a/apps/forge-desktop/tools/modly-cli/test_agent.py b/apps/forge-desktop/tools/forge-cli/test_agent.py
similarity index 94%
rename from apps/forge-desktop/tools/modly-cli/test_agent.py
rename to apps/forge-desktop/tools/forge-cli/test_agent.py
index 9537ec1af..25f982897 100644
--- a/apps/forge-desktop/tools/modly-cli/test_agent.py
+++ b/apps/forge-desktop/tools/forge-cli/test_agent.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-"""Unit tests for the stdlib-only Modly agent CLI."""
+"""Unit tests for the stdlib-only three.ws Forge agent CLI."""
from __future__ import annotations
import importlib.util
@@ -14,7 +14,7 @@ from types import SimpleNamespace
from unittest.mock import patch
MODULE_PATH = Path(__file__).with_name("agent.py")
-SPEC = importlib.util.spec_from_file_location("modly_agent", MODULE_PATH)
+SPEC = importlib.util.spec_from_file_location("forge_agent", MODULE_PATH)
agent = importlib.util.module_from_spec(SPEC)
assert SPEC and SPEC.loader
SPEC.loader.exec_module(agent)
@@ -84,7 +84,7 @@ class CommandTests(unittest.TestCase):
args = SimpleNamespace(request_timeout=1, model="missing")
with patch.object(agent, "_request_json", fake_request):
- with self.assertRaises(agent.ModlyCliError) as ctx:
+ with self.assertRaises(agent.ForgeCliError) as ctx:
agent._resolve_model_id(args, "http://example.test")
self.assertEqual(ctx.exception.code, "INVALID_MODEL_ID")
@@ -110,7 +110,7 @@ class CommandTests(unittest.TestCase):
with patch.object(agent, "_download", side_effect=AssertionError("unsafe path should not be downloaded")):
for bad_path in bad_paths:
with self.subTest(path=bad_path):
- with self.assertRaises(agent.ModlyCliError) as ctx:
+ with self.assertRaises(agent.ForgeCliError) as ctx:
agent._export_workspace_path("http://example.test", bad_path, "glb", Path("out.glb"), timeout=1)
self.assertEqual(ctx.exception.code, "INVALID_WORKSPACE_PATH")
@@ -123,13 +123,13 @@ class CommandTests(unittest.TestCase):
]
for bad_url in bad_urls:
with self.subTest(url=bad_url):
- with self.assertRaises(agent.ModlyCliError) as ctx:
+ with self.assertRaises(agent.ForgeCliError) as ctx:
agent._workspace_relative_path(bad_url)
self.assertEqual(ctx.exception.code, "INVALID_WORKSPACE_PATH")
def test_workflow_workspace_path_rejects_unsafe_scene_candidate_path(self) -> None:
status = {"scene_candidate": {"workspace_path": "Agent/../secret.glb"}}
- with self.assertRaises(agent.ModlyCliError) as ctx:
+ with self.assertRaises(agent.ForgeCliError) as ctx:
agent._workflow_workspace_path(status)
self.assertEqual(ctx.exception.code, "INVALID_WORKSPACE_PATH")
@@ -218,14 +218,14 @@ class CommandTests(unittest.TestCase):
def fake_request(method: str, url: str, *, timeout: float, **_: object) -> object:
if url.endswith("/health"):
return {"status": "ok"}
- raise agent.ModlyCliError("missing", code="HTTP_404", http_status=404)
+ raise agent.ForgeCliError("missing", code="HTTP_404", http_status=404)
cap_args = SimpleNamespace(base_url="http://example.test", request_timeout=1, compact=True)
proc_args = SimpleNamespace(base_url="http://example.test", request_timeout=1, run_id="run-1", compact=True)
with patch.object(agent, "_request_json", fake_request):
- with self.assertRaises(agent.ModlyCliError) as cap_ctx:
+ with self.assertRaises(agent.ForgeCliError) as cap_ctx:
agent.cmd_capability_list(cap_args)
- with self.assertRaises(agent.ModlyCliError) as proc_ctx:
+ with self.assertRaises(agent.ForgeCliError) as proc_ctx:
agent.cmd_process_run_status(proc_args)
self.assertEqual(cap_ctx.exception.code, "UNSUPPORTED_PROCESS")
self.assertEqual(proc_ctx.exception.code, "UNSUPPORTED_PROCESS")
@@ -269,7 +269,7 @@ class CommandTests(unittest.TestCase):
self.assertEqual(payload["code"], "INVALID_ARGUMENTS")
self.assertIn("--bogus", payload["message"])
- def test_generate_from_workflow_downloads_direct_asset_without_modly_health(self) -> None:
+ def test_generate_from_workflow_downloads_direct_asset_without_forge_health(self) -> None:
with tempfile.TemporaryDirectory() as td:
output = Path(td) / "robot.glb"
history = {
@@ -282,7 +282,7 @@ class CommandTests(unittest.TestCase):
}
}
args = SimpleNamespace(
- base_url="http://modly.test",
+ base_url="http://forge.test",
request_timeout=1,
compact=True,
output=str(output),
@@ -292,8 +292,8 @@ class CommandTests(unittest.TestCase):
with (
patch.object(agent, "_run_comfy_workflow", return_value={"ok": True, "comfy_url": "http://comfy.test", "workflow": "Trellis2-Full", "prompt_id": "prompt-1", "history": history}),
patch.object(agent, "_download", return_value=789) as download,
- patch.object(agent, "_require_health", side_effect=AssertionError("Modly health should not run for direct asset output")),
- patch.object(agent, "_generate_one", side_effect=AssertionError("Modly generation should not run for direct asset output")),
+ patch.object(agent, "_require_health", side_effect=AssertionError("three.ws Forge health should not run for direct asset output")),
+ patch.object(agent, "_generate_one", side_effect=AssertionError("three.ws Forge generation should not run for direct asset output")),
redirect_stdout(io.StringIO()) as buf,
):
self.assertEqual(agent.cmd_generate_from_workflow(args), 0)
@@ -310,7 +310,7 @@ class CommandTests(unittest.TestCase):
self.assertIn("/view?", download.call_args.args[0])
self.assertIn("filename=robot.glb", download.call_args.args[0])
- def test_generate_from_workflow_falls_back_to_modly_for_image_only_outputs(self) -> None:
+ def test_generate_from_workflow_falls_back_to_forge_for_image_only_outputs(self) -> None:
with tempfile.TemporaryDirectory() as td:
output = Path(td) / "robot.glb"
history = {
@@ -323,7 +323,7 @@ class CommandTests(unittest.TestCase):
}
}
args = SimpleNamespace(
- base_url="http://modly.test",
+ base_url="http://forge.test",
request_timeout=1,
compact=True,
output=str(output),
@@ -349,13 +349,13 @@ class CommandTests(unittest.TestCase):
self.assertEqual(payload["output_type"], "image")
self.assertEqual(payload["comfy"]["prompt_id"], "prompt-1")
self.assertTrue(payload["meta"]["experimental"])
- health.assert_called_once_with("http://modly.test", 1)
+ health.assert_called_once_with("http://forge.test", 1)
def test_generate_from_workflow_fails_when_history_has_no_supported_output(self) -> None:
- args = SimpleNamespace(base_url="http://modly.test", request_timeout=1, compact=True, output="robot.glb", workflow="Trellis2-Full")
+ args = SimpleNamespace(base_url="http://forge.test", request_timeout=1, compact=True, output="robot.glb", workflow="Trellis2-Full")
history = {"outputs": {"4": {"text": ["done"]}}}
with patch.object(agent, "_run_comfy_workflow", return_value={"ok": True, "comfy_url": "http://comfy.test", "workflow": "Trellis2-Full", "prompt_id": "prompt-1", "history": history}):
- with self.assertRaises(agent.ModlyCliError) as ctx:
+ with self.assertRaises(agent.ForgeCliError) as ctx:
agent.cmd_generate_from_workflow(args)
self.assertEqual(ctx.exception.code, "NO_WORKFLOW_OUTPUT")
@@ -414,7 +414,7 @@ class ComfyWorkflowTests(unittest.TestCase):
workflow = {
"1": {"class_type": "LoadImage", "inputs": {"image": "photo.png"}},
}
- with self.assertRaises(agent.ModlyCliError):
+ with self.assertRaises(agent.ForgeCliError):
agent._patch_comfy_workflow(workflow, prompt="good", seed=None)
def test_patch_fallback_to_prompt_key(self) -> None:
@@ -434,7 +434,7 @@ class ComfyWorkflowTests(unittest.TestCase):
def test_rejects_editor_format(self) -> None:
workflow = {"nodes": [], "links": []}
- with self.assertRaises(agent.ModlyCliError):
+ with self.assertRaises(agent.ForgeCliError):
agent._patch_comfy_workflow(workflow, prompt="x", seed=None)
def test_prompt_wrapper(self) -> None:
@@ -455,30 +455,30 @@ class ServeConfigTests(unittest.TestCase):
repo = root / "repo"
repo.mkdir()
bad_local = root / "Default" / "AppData" / "Local"
- good_api = root / "joshu" / "AppData" / "Local" / "Programs" / "Modly" / "resources" / "api"
+ good_api = root / "joshu" / "AppData" / "Local" / "Programs" / "three.ws Forge" / "resources" / "api"
good_api.mkdir(parents=True)
(good_api / "main.py").write_text("# api", encoding="utf-8")
with patch.object(agent, "_repo_root", return_value=repo), patch.object(agent, "_windows_env_paths", return_value=[bad_local, good_api.parents[3]]):
self.assertEqual(agent._default_api_dir(), good_api)
- def test_load_modly_settings_checks_all_windows_appdata_candidates(self) -> None:
+ def test_load_forge_settings_checks_all_windows_appdata_candidates(self) -> None:
with tempfile.TemporaryDirectory() as td:
root = Path(td)
bad_roaming = root / "Default" / "AppData" / "Roaming"
good_roaming = root / "joshu" / "AppData" / "Roaming"
- settings = good_roaming / "Modly" / "settings.json"
+ settings = good_roaming / "three.ws Forge" / "settings.json"
settings.parent.mkdir(parents=True)
settings.write_text(json.dumps({"workspaceDir": "C:/workspace"}), encoding="utf-8")
with patch.object(agent, "_windows_env_paths", return_value=[bad_roaming, good_roaming]):
- self.assertEqual(agent._load_modly_settings()["workspaceDir"], "C:/workspace")
+ self.assertEqual(agent._load_forge_settings()["workspaceDir"], "C:/workspace")
def test_malformed_timeout_environment_does_not_break_module_import(self) -> None:
- spec = importlib.util.spec_from_file_location("modly_agent_bad_env", MODULE_PATH)
+ spec = importlib.util.spec_from_file_location("forge_agent_bad_env", MODULE_PATH)
module = importlib.util.module_from_spec(spec)
assert spec and spec.loader
- with patch.dict(os.environ, {"MODLY_CLI_TIMEOUT": "not-int", "MODLY_CLI_POLL_SECONDS": "not-float"}):
+ with patch.dict(os.environ, {"THREEWS_CLI_TIMEOUT": "not-int", "THREEWS_CLI_POLL_SECONDS": "not-float"}):
spec.loader.exec_module(module)
self.assertEqual(module.DEFAULT_TIMEOUT_SECONDS, 1800)
self.assertEqual(module.DEFAULT_POLL_SECONDS, 2.0)