rename to tono

This commit is contained in:
2026-03-29 22:51:58 -07:00
parent 961b5d08c8
commit 52da360804
33 changed files with 82 additions and 82 deletions

View File

@@ -1,5 +1,5 @@
"""
Core data types for argonode.
Core data types for tono.
DataField mirrors Gwyddion's GwyDataField structure:
xres, yres pixel dimensions

View File

@@ -1,5 +1,5 @@
"""
Graph execution engine for argonode.
Graph execution engine for tono.
Prompt format (same as ComfyUI):
{

View File

@@ -8,10 +8,10 @@ from typing import Any, Callable
Callback = Callable[[str, Any], None]
_callbacks_var: ContextVar[dict[str, Callback | None]] = ContextVar(
"argonode_execution_callbacks",
"tono_execution_callbacks",
default={},
)
_node_id_var: ContextVar[str | None] = ContextVar("argonode_execution_node_id", default=None)
_node_id_var: ContextVar[str | None] = ContextVar("tono_execution_node_id", default=None)
_LEGACY_CALLBACK_ATTRS = {
"preview": "_broadcast_fn",

View File

@@ -1,11 +1,11 @@
"""
Entry point for argonode.
Entry point for tono.
Run with:
python -m backend.main
or simply:
python backend/main.py
from the argonode/ directory.
from the tono/ directory.
"""
import asyncio
@@ -36,7 +36,7 @@ def main() -> None:
app = create_app(loop)
log.info("=" * 60)
log.info(" argonode — Node-based image analysis")
log.info(" tono — Node-based image analysis")
log.info(" Open your browser at http://%s:%d", HOST, PORT)
log.info("=" * 60)

View File

@@ -1,5 +1,5 @@
"""
Node registry for argonode.
Node registry for tono.
Nodes are plain Python classes decorated with @register_node.
NODE_CLASS_MAPPINGS is the single source of truth consumed by

View File

@@ -1,5 +1,5 @@
"""
Shared helper functions for argonode nodes.
Shared helper functions for tono nodes.
"""
from __future__ import annotations

View File

@@ -251,7 +251,7 @@ class Save:
length = float(np.linalg.norm(n))
return n / length if length > 0 else np.array([0.0, 1.0, 0.0], dtype=np.float32)
lines = ["solid argonode"]
lines = ["solid tono"]
vertices = np.asarray(mesh.vertices, dtype=np.float32)
for face in np.asarray(mesh.faces, dtype=np.int32):
a, b, c = vertices[int(face[0])], vertices[int(face[1])], vertices[int(face[2])]
@@ -263,7 +263,7 @@ class Save:
lines.append(f" vertex {c[0]} {c[1]} {c[2]}")
lines.append(" endloop")
lines.append(" endfacet")
lines.append("endsolid argonode")
lines.append("endsolid tono")
path.write_text("\n".join(lines) + "\n", encoding="utf-8")
def _send_warning(self, message: str):

View File

@@ -1,5 +1,5 @@
"""
Plugin loader for argonode.
Plugin loader for tono.
Scans a plugins directory for .py files and packages (directories containing
__init__.py), imports each one, and lets their @register_node decorators
@@ -96,17 +96,17 @@ def _import_plugin(name: str, path: Path) -> None:
"""
Import a single plugin file (or package ``__init__.py``) via importlib.
The module is registered under ``argonode_plugins.<name>`` in
The module is registered under ``tono_plugins.<name>`` in
``sys.modules``. This namespace:
- avoids collisions with any PyPI package of the same name, and
- makes package-style plugins (with sub-modules) work correctly, because
their relative imports resolve against the ``argonode_plugins.*`` parent.
their relative imports resolve against the ``tono_plugins.*`` parent.
If the module was previously imported (e.g. on a hot-reload call after an
upload), it is deleted from ``sys.modules`` first so the file is re-executed
and any updated ``@register_node`` decorators take effect.
"""
module_name = f"argonode_plugins.{name}"
module_name = f"tono_plugins.{name}"
# Remove stale module to support hot-reload after /upload-plugin.
if module_name in sys.modules:

View File

@@ -4,7 +4,7 @@ import os
import sys
from pathlib import Path
APP_NAME = "argonode"
APP_NAME = "tono"
def project_root() -> Path:
@@ -29,7 +29,7 @@ def frontend_dist_dir() -> Path:
def app_data_dir() -> Path:
override = os.getenv("ARGONODE_APPDATA")
override = os.getenv("TONO_APPDATA")
if override:
return Path(override).expanduser().resolve()
@@ -71,11 +71,11 @@ def plugins_enabled(*, native: bool) -> bool:
Return True when the plugin system should be active.
Default behaviour: enabled on native/desktop builds, disabled for web.
Override with the ARGONODE_PLUGINS environment variable:
ARGONODE_PLUGINS=1 force on (useful for testing plugins via main.py)
ARGONODE_PLUGINS=0 force off (disable even on native builds)
Override with the TONO_PLUGINS environment variable:
TONO_PLUGINS=1 force on (useful for testing plugins via main.py)
TONO_PLUGINS=0 force off (disable even on native builds)
"""
env = os.getenv("ARGONODE_PLUGINS", "").strip().lower()
env = os.getenv("TONO_PLUGINS", "").strip().lower()
if env in ("1", "true", "yes"):
return True
if env in ("0", "false", "no"):

View File

@@ -1,5 +1,5 @@
"""
aiohttp web server for argonode.
aiohttp web server for tono.
Routes
------
@@ -355,7 +355,7 @@ def create_app(
plugins, and notify every connected WebSocket client to refresh /nodes.
Warning: uploading Python files is equivalent to remote code execution.
This endpoint is intentionally unrestricted because argonode is a
This endpoint is intentionally unrestricted because tono is a
local-first application; do not expose it on a public network.
"""
reader = await request.multipart()