Desktop app for designing parametric 3D models in CadQuery together with the coding agent of your choice
TypeScript 3d-modeling3d-printing3d-printing-toolsagentagentic-aiai-cadcadcadqueryclaude-codecodexelectronfemllmmacdmakeropencodeparametric-designpythonsteptext-to-cad
App: Name SOMA statt CAD-IDE (E43)
Kai-Jungsthoefel5e5d19389742
diff --git a/app/README.md b/app/README.mdindex 888aa5a..e729277 100644--- a/app/README.md+++ b/app/README.md@@ -1,11 +1,11 @@-# CAD-IDE: Desktop-App (Arbeitsname)+# SOMA: Desktop-AppElectron-App (TypeScript) für 3D-Modelle mit einem Coding-Agenten im Terminal. Plan: [../PLAN.md](../PLAN.md). Stand: **Phase 1, Schritte 1 bis 5** (Gerüst, Git und ZIP, Oberfläche nach dem Entwurf in [../design/ui-entwurf.html](../design/ui-entwurf.html), Markierung, Editor), dazu Messen.## Voraussetzungen-- Node.js 22 oder neuer, Python 3.12 mit CadQuery (Basisumgebung), `cadide` darin installiert.-- Entwicklung: die Umgebung aus Phase 0 (`prototype/phase0/setup_env.ps1`) und darin `uv pip install -e ../python`. Die App findet sie unter `%LOCALAPPDATA%\cadide-phase0\venv-full` oder über `CADIDE_PYTHON`.+- Node.js 22 oder neuer, Python 3.12 mit CadQuery (Basisumgebung), `soma` darin installiert.+- Entwicklung: die Umgebung aus Phase 0 (`prototype/phase0/setup_env.ps1`) und darin `uv pip install -e ../python`. Die App findet sie unter `%LOCALAPPDATA%\cadide-phase0\venv-full` oder über `SOMA_PYTHON`.- Hinter einem Proxy lädt Node den Electron-Download nur mit `NODE_USE_ENV_PROXY=1`:`NODE_USE_ENV_PROXY=1 node node_modules/electron/install.js` (falls `npm install` das Binary nicht geholt hat).@@ -15,7 +15,7 @@ Electron-App (TypeScript) für 3D-Modelle mit einem Coding-Agenten im Terminal.npm installnpm start # baut und startetnpm run typecheck-npm run test:unit # Bausteine ohne Electron: Dateien nach inputs/, Markierung nach .cadide/feedback/, Pfadschutz, Schreiben aus dem Editor mit Konfliktprüfung (15 Prüfungen)+npm run test:unit # Bausteine ohne Electron: Dateien nach inputs/, Markierung nach .soma/feedback/, Pfadschutz, Schreiben aus dem Editor mit Konfliktprüfung (15 Prüfungen)npm run test:smoke # echte App, unsichtbar: Projekt, Viewer, Auswahl, Panels, Terminal, Übergabe an den Agenten, Markierung (Zeichnen, Auswählen, Verschieben, Drehen, Skalieren, Farben), Auto-Build, Fehlerfall, Export, Ansichtswürfel und Drehpunkt (61 Prüfungen)npm run test:versions # Git-Verlauf, Speichern, Öffnen, Vorschau (auch markiert), Wiederherstellen, Störfälle (53 Prüfungen)npm run test:editor # Editor: Höhe und Scrollen, Speichern nur auf Wunsch mit genau einem Build (nur bei Python und inputs/), Änderungen des Agenten, Konflikte mit Sicherung, Nur lesen, CRLF, Rückfragen bei Modellwechsel und Reiter schließen (29 Prüfungen)@@ -26,20 +26,20 @@ npm test # alle sechs`SMOKE_VISIBLE=1` zeigt das Fenster. `SMOKE_VISIBLE=offscreen` zeigt es weit außerhalb des Bildschirms ohne Fokus, dann sind Screenshots (`test/versions.png`) frisch. Ein unsichtbares Fenster zeichnet nicht neu, seine Screenshots sind veraltet, die DOM-Prüfungen sind davon nicht betroffen. Mit `SMOKE_VISIBLE=offscreen` und zusätzlich `SMOKE_SHOTS=1` legt der Smoke-Test Bilder der wichtigsten Zustände in `test/shots/` ab (Arbeitsbereich, Code, Dateien, Fehler, Startseite, Agent eingeklappt, Markieren mit Textfeld, leerer Fläche, Auswahl und Farbmenü, dazu das gespeicherte Bild, wie der Agent es sieht), zum Prüfen von Änderungen an der Oberfläche.-**Windows und Netzlaufwerk:** Liegt `node_modules` auf einem Netzlaufwerk, starten die sandboxed Prozesse von Electron nicht (`launch-failed`, Code 18, schwarzes Fenster). `npm start` und der Test nutzen deshalb automatisch eine lokale Kopie von Electron unter `%LOCALAPPDATA%\cadide-dev\` (`scripts/electron-local.mjs`, einmalig rund 370 MB). Die App selbst darf auf dem Netzlaufwerk liegen. Eine installierte App muss lokal liegen, sonst zeigt sie eine Fehlermeldung.+**Windows und Netzlaufwerk:** Liegt `node_modules` auf einem Netzlaufwerk, starten die sandboxed Prozesse von Electron nicht (`launch-failed`, Code 18, schwarzes Fenster). `npm start` und der Test nutzen deshalb automatisch eine lokale Kopie von Electron unter `%LOCALAPPDATA%\soma-dev\` (`scripts/electron-local.mjs`, einmalig rund 370 MB). Die App selbst darf auf dem Netzlaufwerk liegen. Eine installierte App muss lokal liegen, sonst zeigt sie eine Fehlermeldung.## Aufbau| Pfad | Inhalt ||---|---|-| `src/main/` | Hauptprozess: `projects.ts` (offenes Projekt, Speichern, Öffnen, Verlauf, Wiederherstellen), `git.ts` (mitgeliefertes Git über dugite), `zip.ts` (ZIP schreiben und sicher entpacken), `workspace.ts` (UUID-Arbeitsordner, Projektzustand doppelt, Projekt-Check nur melden), `build.ts` (Build als Einmal-Prozess mit Entprellung, Warteschlange, Zeitlimit), `measure.ts` (langlebiger Python-Messdienst, `cadide serve`), `dialogs.ts` (native Dialoge, im Test beantwortbar), `watcher.ts`, `terminals.ts` (node-pty, `cadide` und `git` im PATH), `files.ts` (Pfadschutz, Dateien nach `inputs/`, Markierungen nach `.cadide/feedback/`, Schreiben aus dem Editor mit Konfliktprüfung und Sicherung), `agents.ts` |+| `src/main/` | Hauptprozess: `projects.ts` (offenes Projekt, Speichern, Öffnen, Verlauf, Wiederherstellen), `git.ts` (mitgeliefertes Git über dugite), `zip.ts` (ZIP schreiben und sicher entpacken), `workspace.ts` (UUID-Arbeitsordner, Projektzustand doppelt, Projekt-Check nur melden), `build.ts` (Build als Einmal-Prozess mit Entprellung, Warteschlange, Zeitlimit), `measure.ts` (langlebiger Python-Messdienst, `soma serve`), `dialogs.ts` (native Dialoge, im Test beantwortbar), `watcher.ts`, `terminals.ts` (node-pty, `soma` und `git` im PATH), `files.ts` (Pfadschutz, Dateien nach `inputs/`, Markierungen nach `.soma/feedback/`, Schreiben aus dem Editor mit Konfliktprüfung und Sicherung), `agents.ts` || `src/preload/` | Schmale, feste Schnittstelle zum Renderer (kein Node-Zugriff dort) || `src/renderer/` | Oberfläche: `main.ts` (Verdrahtung: Kopfzeile, Menüs, Auswahl, Übergabe an den Agenten, Startseite), `viewer.ts` (three.js, Klick auf Code, Ansichten, Drehpunkt, Vorschaubild, Bild für die Markierung), `viewcube.ts` (Ansichtswürfel in 3D), `markup.ts` (Zeichenfläche der Markierung, Formen als bearbeitbare Objekte), `measuretool.ts` (Messen: Ablauf, Karte, Text für den Agenten), `parts.ts` (Bauteilkarte als Baum mit Gruppen, Auge und Transparenz), `code.ts` (Code-Panel mit Editor: CodeMirror 6, Speichern auf Wunsch, Abgleich mit Änderungen des Agenten, Konflikte), `filetree.ts` (Dateien-Panel), `versions.ts` (Verlaufsleiste), `terminals.ts` (xterm.js, Tabs, Einklappen, Einfügen), `ui.ts` (Menüs, Meldungen, Helfer), `icons.ts` (Symbole), `style.css` (Farben mit fester Bedeutung, siehe Kopf der Datei) || `src/shared/` | `types.ts` Typen des IPC-Vertrags, `editable.ts` welche Dateien der Editor nur zeigt (gilt in Renderer und Hauptprozess) || `resources/template/` | Vorlage für neue Projekte: `model.py`, `AGENTS.md`, `CLAUDE.md`, `NOTES.md`, `.gitignore` |-| `../python/cadide/` | Hilfsbibliothek und Kommandozeile (`cadide build`, `cadide export`, `cadide glb` für Vorschauen, `cadide serve` Messdienst, `measure.py` exakte Werte mit OCC) |+| `../python/soma/` | Hilfsbibliothek und Kommandozeile (`soma build`, `soma export`, `soma glb` für Vorschauen, `soma serve` Messdienst, `measure.py` exakte Werte mit OCC) || `test/` | `smoke.mjs`, `versions.mjs` (Ende-zu-Ende), `unit.mjs` (ohne Electron), `harness.mjs` (App starten und steuern), `cdp.mjs` (kleiner DevTools-Client, puppeteer scheitert an Electron 44) |## Noch nicht enthalten (siehe PLAN.md, Abschnitt 10)-Projektumgebung mit `pip freeze`, Schnitt, Skills (die Knöpfe stehen schon ausgegraut da), Auto-Start des Agenten, `cadide check`, Bündelung von Python und Installer, macOS und Linux (nur Windows getestet).+Projektumgebung mit `pip freeze`, Schnitt, Skills (die Knöpfe stehen schon ausgegraut da), Auto-Start des Agenten, `soma check`, Bündelung von Python und Installer, macOS und Linux (nur Windows getestet).diff --git a/app/package-lock.json b/app/package-lock.jsonindex 7432d89..3dc9e1a 100644--- a/app/package-lock.json+++ b/app/package-lock.json@@ -1,11 +1,11 @@{- "name": "cadide-app",+ "name": "soma-app","version": "0.1.0","lockfileVersion": 3,"requires": true,"packages": {"": {- "name": "cadide-app",+ "name": "soma-app","version": "0.1.0","dependencies": {"@codemirror/autocomplete": "^6.20.3",diff --git a/app/package.json b/app/package.jsonindex 12595e0..ad080f8 100644--- a/app/package.json+++ b/app/package.json@@ -1,8 +1,8 @@{- "name": "cadide-app",+ "name": "soma-app","version": "0.1.0","private": true,- "description": "CAD-IDE (Arbeitsname): Desktop-App fuer 3D-Modelle mit KI-Agenten",+ "description": "SOMA (Solid Object Modeling with Agents): Desktop-App fuer 3D-Modelle mit KI-Agenten","main": "dist/main/main.js","scripts": {"typecheck": "tsc --noEmit",diff --git a/app/resources/template/.gitignore b/app/resources/template/.gitignoreindex 8117328..9de6e38 100644--- a/app/resources/template/.gitignore+++ b/app/resources/template/.gitignore@@ -6,9 +6,9 @@ __pycache__/*.pyc# Viewer cache and app-internal files (regenerated)-.cadide/model.glb-.cadide/model.map.json-.cadide/build.json-.cadide/zip-info.json-.cadide/feedback/-.cadide/geometry/+.soma/model.glb+.soma/model.map.json+.soma/build.json+.soma/zip-info.json+.soma/feedback/+.soma/geometry/diff --git a/app/resources/template/AGENTS.md b/app/resources/template/AGENTS.mdindex b809c7d..165c872 100644--- a/app/resources/template/AGENTS.md+++ b/app/resources/template/AGENTS.md@@ -11,17 +11,17 @@ The app shows the result in a 3D viewer next to this terminal. Notes and wishes| `model.py` | Entry point. Builds the model and registers every part. Small models live only here || `parts/` | Optional. Move parts into modules here when `model.py` gets long, import them from `model.py` || `inputs/` | Files the user brought (STEP, images). Never modify them, load them from `model.py` |-| `output/model.step` | Main result with all parts, written by `cadide build`. Never write it yourself |-| `exports/` | Single-part exports written by `cadide export` |-| `.cadide/` | App data (viewer cache, build status, feedback images). Do not edit, except reading files in `.cadide/feedback/` when the user points you to them |+| `output/model.step` | Main result with all parts, written by `soma build`. Never write it yourself |+| `exports/` | Single-part exports written by `soma export` |+| `.soma/` | App data (viewer cache, build status, feedback images). Do not edit, except reading files in `.soma/feedback/` when the user points you to them |## Rules for model.py-1. `from cadide import add_part, import_step, import_assembly`+1. `from soma import add_part, import_step, import_assembly`2. **Register every part**: `add_part("Name", workplane_or_shape)`. Unregistered geometry is invisible in the viewer and missing from exports.3. Names are unique. Umlauts are fine, they are shown as written.4. Group related parts with `group`: `add_part("Screw front", screw, group="Housing/Screws")` (nested with `/`). Groups show up in the part tree of the app and as sub-assemblies in `output/model.step`.-5. Mark a part the user brought (for example a circuit board) with `role="reference"`: it is shown semi-transparent and skipped by `cadide export --all`. Cut clearances around it, but do not export it.+5. Mark a part the user brought (for example a circuit board) with `role="reference"`: it is shown semi-transparent and skipped by `soma export --all`. Cut clearances around it, but do not export it.6. Units are millimetres, Z is up. Put dimensions in named constants at the top so the user can ask for changes ("make the wall 3 mm").7. Load user files with `import_step("inputs/board.step")`: this merges the whole file into one shape. If the file has several parts or sub-assemblies, keep them with `asm = import_assembly("inputs/board.step")` and `add_part("Board", asm, role="reference")`: every body becomes its own part with its name and color, the sub-assemblies become groups under "Board". Move an assembly with `asm.loc = cq.Location((x, y, z))`. STEP files often have their origin in a corner: check the bounding box and move the part deliberately.8. Prefer simple, readable CadQuery. Check that operations produced solids. Do not use `show_object` or `cq_editor`.@@ -32,17 +32,17 @@ Run them in this terminal. They work without the app.| Command | Purpose ||---|---|-| `cadide build` | Runs `model.py`, writes `output/model.step` and the viewer cache. **Run it after every change and read the result.** On errors it prints the file, line and message |-| `cadide export <Part> --format stl` | Exports one part (formats: step, stl, 3mf, amf, brep, iges, obj, vrml, glb, gltf, dxf, svg) |-| `cadide export --all --format step` | Exports all parts except references |+| `soma build` | Runs `model.py`, writes `output/model.step` and the viewer cache. **Run it after every change and read the result.** On errors it prints the file, line and message |+| `soma export <Part> --format stl` | Exports one part (formats: step, stl, 3mf, amf, brep, iges, obj, vrml, glb, gltf, dxf, svg) |+| `soma export --all --format step` | Exports all parts except references |-If `cadide build` fails, fix the error before doing anything else. Keep the model buildable at all times.+If `soma build` fails, fix the error before doing anything else. Keep the model buildable at all times.## Version history (git)This folder is a git repository, and the `git` on your PATH is the one the app uses. The app shows the commits as a timeline under the 3D view, so the user can look at earlier versions and restore them.-- After every meaningful iteration that **builds successfully** (`cadide build` says "Build ok"), commit it: `git add -A`, then `git commit -m "<short description>"`. Write the message in the language the user speaks. Build first, so `output/model.step` in the commit matches the code.+- After every meaningful iteration that **builds successfully** (`soma build` says "Build ok"), commit it: `git add -A`, then `git commit -m "<short description>"`. Write the message in the language the user speaks. Build first, so `output/model.step` in the commit matches the code.- Do not rewrite history: no `git reset`, `rebase`, `commit --amend` or `push --force`, no new branches, no `checkout` or `switch` to old commits. To go back to an earlier version, tell the user to use "Restore version" in the app.- Do not delete or re-create `.git` and do not remove `.gitignore`.@@ -50,13 +50,13 @@ This folder is a git repository, and the `git` on your PATH is the one the app u- Use the `python` and `pip` on your PATH. They belong to this app. **Do not create virtual environments** (`.venv`, `venv`) and do not install packages globally.- Install only what the model really needs. The app records the packages of the project.-- Do not move or rename `model.py`, and do not create your own STEP writer: the app relies on `cadide build`.+- Do not move or rename `model.py`, and do not create your own STEP writer: the app relies on `soma build`.## Feedback from the userThe app pastes short notes into your input. The user adds their own words and sends them:-- `[Markierung: .cadide/feedback/markierung-20260930-1405.png]`: a picture of the 3D view (or a blank sketch) with the user's drawings: arrows, circles, handwritten text, often with dimensions. **Open the image file and look at it**, compare it with the model, then change the code. If the note says `zeigt den älteren Stand <hash>`, the picture shows that older commit, not the current code (`git show <hash>:model.py`). Leave the images where they are.+- `[Markierung: .soma/feedback/markierung-20260930-1405.png]`: a picture of the 3D view (or a blank sketch) with the user's drawings: arrows, circles, handwritten text, often with dimensions. **Open the image file and look at it**, compare it with the model, then change the code. If the note says `zeigt den älteren Stand <hash>`, the picture shows that older commit, not the current code (`git show <hash>:model.py`). Leave the images where they are.- `[Auswahl: Bauteil "…", model.py Zeile …]`: the part the user clicked, with the lines of its `add_part` call and the clicked face.- `[Build-Fehler: …]`: the message of the last failed build.diff --git a/app/resources/template/model.py b/app/resources/template/model.pyindex 68c99f6..eb65fe1 100644--- a/app/resources/template/model.py+++ b/app/resources/template/model.py@@ -1,10 +1,10 @@"""Starter model: a small box with a lid. The agent (or you) edits this file.Rules (see AGENTS.md): every part must be registered with add_part(), names must be unique,-build with `cadide build`. Units are millimetres, Z is up.+build with `soma build`. Units are millimetres, Z is up."""import cadquery as cq-from cadide import add_part+from soma import add_part# --- parameters -------------------------------------------------------------------------LENGTH = 60.0diff --git a/app/scripts/electron-local.mjs b/app/scripts/electron-local.mjsindex b38ebc7..c3eec11 100644--- a/app/scripts/electron-local.mjs+++ b/app/scripts/electron-local.mjs@@ -16,7 +16,7 @@ export function electronExe(appDir) {if (!fs.realpathSync.native(dist).startsWith('\\\\')) return direct; // lokale Platteconst version = JSON.parse(fs.readFileSync(path.join(appDir, 'node_modules', 'electron', 'package.json'), 'utf8')).version;- const local = path.join(process.env.LOCALAPPDATA ?? os.tmpdir(), 'cadide-dev', `electron-${version}`);+ const local = path.join(process.env.LOCALAPPDATA ?? os.tmpdir(), 'soma-dev', `electron-${version}`);const stamp = path.join(local, '.kopiert');if (!fs.existsSync(stamp)) {console.log(`Electron liegt auf einem Netzlaufwerk. Lokale Kopie nach ${local} (einmalig, rund 370 MB) ...`);diff --git a/app/src/main/build.ts b/app/src/main/build.tsindex 5e097fb..53c3409 100644--- a/app/src/main/build.ts+++ b/app/src/main/build.ts@@ -9,7 +9,7 @@ const DEBOUNCE_MS = 700;const TIMEOUT_MS = 5 * 60 * 1000;/**- * Startet `cadide build` als eigenen Einmal-Prozess (E24) und haelt den Stand fest.+ * Startet `soma build` als eigenen Einmal-Prozess (E24) und haelt den Stand fest.** Regeln (E20):* - Auto-Build ist abschaltbar. Aenderungen werden entprellt.@@ -61,7 +61,7 @@ export class BuildManager extends EventEmitter {return;}this.setStatus({ state: 'building', startedAt: Date.now(), reason, result: this.status.result });- const child = spawn(pythonExe(), ['-m', 'cadide', 'build', '--project', this.dir, '--json'], {+ const child = spawn(pythonExe(), ['-m', 'soma', 'build', '--project', this.dir, '--json'], {cwd: this.dir, windowsHide: true,env: { ...process.env, PYTHONUTF8: '1', PYTHONIOENCODING: 'utf-8', PYTHONUNBUFFERED: '1' },});@@ -149,13 +149,13 @@ export function newestSourceMtime(dir: string): number {/** Ist der Quelltext neuer als das letzte Build-Ergebnis (oder gibt es noch keines)? */export function buildIsStale(dir: string): boolean {- try { return newestSourceMtime(dir) > fs.statSync(path.join(dir, '.cadide', 'build.json')).mtimeMs; } catch { return true; }+ try { return newestSourceMtime(dir) > fs.statSync(path.join(dir, '.soma', 'build.json')).mtimeMs; } catch { return true; }}-/** Führt `python -m cadide <args>` aus (z. B. glb für Vorschauen). Kein Wurf: das Ergebnis trägt den Fehler. */-export function runCadide(args: string[], cwd: string, timeoutMs = 120000): Promise<{ ok: boolean; out: string; err: string }> {+/** Führt `python -m soma <args>` aus (z. B. glb für Vorschauen). Kein Wurf: das Ergebnis trägt den Fehler. */+export function runSoma(args: string[], cwd: string, timeoutMs = 120000): Promise<{ ok: boolean; out: string; err: string }> {return new Promise((resolve) => {- const child = spawn(pythonExe(), ['-m', 'cadide', ...args], {+ const child = spawn(pythonExe(), ['-m', 'soma', ...args], {cwd, windowsHide: true, env: { ...process.env, PYTHONUTF8: '1', PYTHONIOENCODING: 'utf-8' },});let out = '', err = '';diff --git a/app/src/main/dialogs.ts b/app/src/main/dialogs.tsindex f04b569..e2df3f7 100644--- a/app/src/main/dialogs.ts+++ b/app/src/main/dialogs.ts@@ -2,10 +2,10 @@ import { app, dialog, type BrowserWindow } from 'electron';import path from 'node:path';/**- * Alle Dialoge laufen hier durch. Im Testmodus (CADIDE_TEST=1) beantwortet eine vorbereitete Warteschlange sie,+ * Alle Dialoge laufen hier durch. Im Testmodus (SOMA_TEST=1) beantwortet eine vorbereitete Warteschlange sie,* damit Tests nicht an nativen Fenstern hängen. Ist die Schlange leer, schlägt der Aufruf laut fehl.*/-const testMode = () => process.env.CADIDE_TEST === '1';+const testMode = () => process.env.SOMA_TEST === '1';const answers: unknown[] = [];export const setTestAnswers = (a: unknown[]) => { answers.length = 0; answers.push(...a); };export const pendingTestAnswers = () => answers.length;@@ -17,7 +17,7 @@ function nextAnswer<T>(what: string): T {export async function choosePath(win: BrowserWindow | null, kind: 'save' | 'open', defaultName: string): Promise<string | null> {if (testMode()) return nextAnswer<string | null>(`${kind}-Pfad`);- const filters = [{ name: 'CAD-IDE-Modell (ZIP)', extensions: ['zip'] }];+ const filters = [{ name: 'SOMA-Modell (ZIP)', extensions: ['zip'] }];const defaultPath = path.join(app.getPath('documents'), defaultName);if (kind === 'save') {const r = win ? await dialog.showSaveDialog(win, { title: 'Modell speichern', defaultPath, filters }) : await dialog.showSaveDialog({ title: 'Modell speichern', defaultPath, filters });diff --git a/app/src/main/files.ts b/app/src/main/files.tsindex 1f35356..d34b049 100644--- a/app/src/main/files.ts+++ b/app/src/main/files.ts@@ -3,7 +3,7 @@ import path from 'node:path';import { readOnlyReason } from '../shared/editable';import type { FeedbackResult, FileNode, ImportResult, WriteResult } from '../shared/types';-const HIDDEN = new Set(['.git', '.cadide', '__pycache__', 'node_modules', '.venv', 'venv', 'env']);+const HIDDEN = new Set(['.git', '.soma', '__pycache__', 'node_modules', '.venv', 'venv', 'env']);const MAX_ENTRIES = 2000;const MAX_DEPTH = 5;const MAX_IMPORT_BYTES = 500 * 1024 * 1024;@@ -36,7 +36,7 @@ export function importInputs(root: string, sources: string[]): ImportResult {}/**- * Legt ein Bild der Markierung in .cadide/feedback/ ab (E16). Dort ist es nicht in Git (E11), wandert aber mit der ZIP.+ * Legt ein Bild der Markierung in .soma/feedback/ ab (E16). Dort ist es nicht in Git (E11), wandert aber mit der ZIP.* Der Name trägt Datum und Uhrzeit, bei Gleichstand kommt „-2“ dazu. Vorhandenes wird nie überschrieben.*/export function saveFeedbackImage(root: string, png: unknown, when = new Date()): FeedbackResult {@@ -46,9 +46,9 @@ export function saveFeedbackImage(root: string, png: unknown, when = new Date())const two = (n: number) => String(n).padStart(2, '0');const stem = `markierung-${when.getFullYear()}${two(when.getMonth() + 1)}${two(when.getDate())}-${two(when.getHours())}${two(when.getMinutes())}`;try {- fs.mkdirSync(resolveInside(root, '.cadide/feedback'), { recursive: true });+ fs.mkdirSync(resolveInside(root, '.soma/feedback'), { recursive: true });for (let i = 1; ; i++) {- const rel = `.cadide/feedback/${stem}${i > 1 ? `-${i}` : ''}.png`;+ const rel = `.soma/feedback/${stem}${i > 1 ? `-${i}` : ''}.png`;try {// „wx“: entsteht die Datei zwischen Prüfung und Schreiben, schlägt das Schreiben fehl statt zu überschreibenfs.writeFileSync(resolveInside(root, rel), bytes, { flag: 'wx' });@@ -76,7 +76,7 @@ export function writeProjectText(root: string, rel: string, text: string, base:if (force && disk !== null && disk !== text) backup = backupText(backupDir, rel, disk);// Erst in eine Nebendatei, dann umbenennen: Ein Build liest so nie eine halb geschriebene Datei.// Hält ein anderes Programm die Datei offen (Windows), klappt das Umbenennen nicht, dann direkt schreiben.- const tmp = `${abs}.cadide-tmp`;+ const tmp = `${abs}.soma-tmp`;try {fs.writeFileSync(tmp, text, 'utf8');fs.renameSync(tmp, abs);@@ -113,7 +113,7 @@ export function resolveInside(root: string, rel: string): string {const outside = () => new Error(`Pfad liegt ausserhalb des Projekts: ${rel}`);if (!inside(abs, path.resolve(root))) throw outside();// Gibt es das Ziel noch nicht, zählt der nächste vorhandene Ordner darüber. Sonst könnte ein Verweis weiter oben- // (etwa .cadide als Verknüpfung nach außen) neue Dateien außerhalb des Projekts landen lassen.+ // (etwa .soma als Verknüpfung nach außen) neue Dateien außerhalb des Projekts landen lassen.let probe = abs, rest = '';while (!exists(probe) && path.dirname(probe) !== probe) { rest = rest ? path.join(path.basename(probe), rest) : path.basename(probe); probe = path.dirname(probe); }const real = rest ? path.join(fs.realpathSync(probe), rest) : fs.realpathSync(probe);diff --git a/app/src/main/git.ts b/app/src/main/git.tsindex 57f0a35..9584397 100644--- a/app/src/main/git.ts+++ b/app/src/main/git.ts@@ -11,17 +11,17 @@ export interface GitStatus { dirty: boolean; changed: number; head: string | nul* Markiert Commits der App, damit die Verlaufsleiste sie von Commits des Agenten unterscheiden kann. Der Autor taugt dafür* nicht: Agent und App committen mit derselben Git-Identität. Ältere Projekte ohne Trailer erkennt die Leiste am Betreff.*/-const APP_TRAILER = ['--trailer', 'Erstellt-von: CAD-IDE'];+const APP_TRAILER = ['--trailer', 'Erstellt-von: SOMA'];const APP_SUBJECT = /^(Neues Modell angelegt|Automatischer Snapshot beim Speichern|Sicherung vor Wiederherstellung|Stand wiederhergestellt: )/;/** Gilt für jeden Aufruf: UTF-8-Pfade lesbar, keine Zeilenenden-Umwandlung (ZIPs wandern zwischen Systemen). */const COMMON = ['-c', 'core.quotepath=false', '-c', 'core.autocrlf=false'];/*** `output/` zählt nicht als Änderung: STEP-Dateien sind nicht byte-stabil (Zeitstempel, teils Reihenfolge).- * `.cadide/geometry/` (Geometrie für das Messen) ist ein Zwischenergebnis. Ältere Projekte haben es noch nicht in der+ * `.soma/geometry/` (Geometrie für das Messen) ist ein Zwischenergebnis. Ältere Projekte haben es noch nicht in der* .gitignore, deshalb klammert die App es selbst aus, beim Status und beim Hinzufügen (siehe addAll).*/-const NOT_OUTPUT = ['--', '.', ':(exclude)output', ':(exclude).cadide/geometry'];+const NOT_OUTPUT = ['--', '.', ':(exclude)output', ':(exclude).soma/geometry'];const HASH = /^[0-9a-f]{7,40}$/;const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));@@ -52,12 +52,12 @@ export class GitRepo {}/**- * Alles vormerken außer `.cadide/geometry/`. Ein Ausschluss im Pfad (`:(exclude)…`) ginge nicht: Steht der Ordner in+ * Alles vormerken außer `.soma/geometry/`. Ein Ausschluss im Pfad (`:(exclude)…`) ginge nicht: Steht der Ordner in* der .gitignore (neue Projekte), bricht `git add` dann mit Fehler ab. Deshalb danach aus dem Index nehmen, was dort liegt.*/private async addAll(): Promise<void> {await this.mustRun(['add', '-A'], true);- await this.mustRun(['rm', '-r', '--cached', '--ignore-unmatch', '-q', '--', '.cadide/geometry'], true);+ await this.mustRun(['rm', '-r', '--cached', '--ignore-unmatch', '-q', '--', '.soma/geometry'], true);}private async mustRun(args: string[], write = false): Promise<string> {@@ -85,8 +85,8 @@ export class GitRepo {// Ohne eingerichtete Identität würden auch die Commits des Agenten scheitern.const name = await this.run(['config', 'user.name']);const email = await this.run(['config', 'user.email']);- if (!name.out.trim()) await this.mustRun(['config', '--local', 'user.name', 'CAD-IDE'], true);- if (!email.out.trim()) await this.mustRun(['config', '--local', 'user.email', 'cadide@localhost'], true);+ if (!name.out.trim()) await this.mustRun(['config', '--local', 'user.name', 'SOMA'], true);+ if (!email.out.trim()) await this.mustRun(['config', '--local', 'user.email', 'soma@localhost'], true);await this.addAll();await this.mustRun(['commit', '--allow-empty', '--no-verify', '-m', message, ...APP_TRAILER], true);return (await this.mustRun(['rev-parse', 'HEAD'])).trim();@@ -121,7 +121,7 @@ export class GitRepo {if (!r.ok) return [];return r.out.split('\x1e').map((e) => e.trim()).filter(Boolean).map((e) => {const [hash, short, author, date, subject, by = ''] = e.split('\x1f');- return { hash, short, author, date, subject, byApp: by.includes('CAD-IDE') || APP_SUBJECT.test(subject) };+ return { hash, short, author, date, subject, byApp: by.includes('SOMA') || APP_SUBJECT.test(subject) };}).reverse();}diff --git a/app/src/main/main.ts b/app/src/main/main.tsindex 0db5d29..eab0b4f 100644--- a/app/src/main/main.ts+++ b/app/src/main/main.ts@@ -11,8 +11,8 @@ import { createProject, getLastProject, isProjectId } from './workspace';// App-Daten (Arbeitsordner, Caches) gehören auf die lokale Platte. Das Roaming-Profil (%APPDATA%) kann in Firmennetzen// umgeleitet oder synchronisiert sein, das ist für Arbeitsordner und GPU-Cache ungeeignet. Tests leiten alles um.-if (process.env.CADIDE_USER_DATA) app.setPath('userData', process.env.CADIDE_USER_DATA);-else if (process.platform === 'win32' && process.env.LOCALAPPDATA) app.setPath('userData', path.join(process.env.LOCALAPPDATA, 'cadide'));+if (process.env.SOMA_USER_DATA) app.setPath('userData', process.env.SOMA_USER_DATA);+else if (process.platform === 'win32' && process.env.LOCALAPPDATA) app.setPath('userData', path.join(process.env.LOCALAPPDATA, 'soma'));let win: BrowserWindow | null = null;@@ -81,11 +81,11 @@ function registerIpc(ctl: ProjectController): void {ipcMain.handle('dialog:choose', (_e, o: { title?: unknown; message?: unknown; detail?: unknown; buttons?: unknown }) => {const buttons = Array.isArray(o?.buttons) ? o.buttons.slice(0, 4).map(String) : [];if (!buttons.length) return -1;- return choose(win, { title: String(o.title ?? 'CAD-IDE'), message: String(o.message ?? ''), detail: o.detail == null ? undefined : String(o.detail), buttons });+ return choose(win, { title: String(o.title ?? 'SOMA'), message: String(o.message ?? ''), detail: o.detail == null ? undefined : String(o.detail), buttons });});// Nur im Testmodus: vorbereitete Antworten für Dialoge (siehe dialogs.ts)- if (process.env.CADIDE_TEST === '1') {+ if (process.env.SOMA_TEST === '1') {ipcMain.handle('test:answers', (_e, a: unknown[]) => setTestAnswers(a));// Screenshot auch aus unsichtbaren Fenstern (CDP liefert dort kein Bild)ipcMain.handle('test:screenshot', async (e, file: string) => {@@ -97,11 +97,11 @@ function registerIpc(ctl: ProjectController): void {}function onRendererGone(wc: WebContents, reason: string, exitCode: number): void {- console.error(`[cadide] Renderer-Prozess beendet: Grund=${reason} Code=${exitCode}`);- if (reason === 'launch-failed' && process.env.CADIDE_HIDDEN !== '1') {+ console.error(`[soma] Renderer-Prozess beendet: Grund=${reason} Code=${exitCode}`);+ if (reason === 'launch-failed' && process.env.SOMA_HIDDEN !== '1') {// Häufigste Ursache unter Windows: das Programm liegt auf einem Netzlaufwerk. Die sandboxed Prozesse laufen mit// eingeschränktem Token, verlieren dort den Zugriff und starten nicht. Ohne Meldung bliebe nur ein schwarzes Fenster.- dialog.showErrorBox('CAD-IDE kann die Oberfläche nicht starten',+ dialog.showErrorBox('SOMA kann die Oberfläche nicht starten',`Der Anzeigeprozess ließ sich nicht starten (Code ${exitCode}).\n\nHäufige Ursache: Das Programm liegt auf einem Netzlaufwerk. ` +'Installiere oder starte es von einer lokalen Platte (z. B. C:).');app.quit();@@ -130,12 +130,12 @@ function askEditor<T>(wc: WebContents, action: 'status' | 'save' | 'discard', fa});}-/** Tests: CADIDE_HIDDEN=1 unsichtbar (zeichnet nicht neu), =offscreen angezeigt, aber weit außerhalb des Bildschirms und ohne Fokus. */-const testWindowMode = process.env.CADIDE_HIDDEN;+/** Tests: SOMA_HIDDEN=1 unsichtbar (zeichnet nicht neu), =offscreen angezeigt, aber weit außerhalb des Bildschirms und ohne Fokus. */+const testWindowMode = process.env.SOMA_HIDDEN;function createWindow(): void {win = new BrowserWindow({- width: 1600, height: 950, title: 'CAD-IDE', backgroundColor: '#121417', show: testWindowMode !== '1' && testWindowMode !== 'offscreen',+ width: 1600, height: 950, title: 'SOMA', backgroundColor: '#121417', show: testWindowMode !== '1' && testWindowMode !== 'offscreen',webPreferences: {preload: path.join(__dirname, '..', 'preload', 'preload.js'),contextIsolation: true, nodeIntegration: false, sandbox: true,@@ -149,13 +149,13 @@ function createWindow(): void {registerIpc(ctl);// Stürzt der Anzeigeprozess ab, steht der Grund im Protokoll (sonst bliebe nur ein schwarzes Fenster).wc.on('render-process-gone', (_e, d) => onRendererGone(wc, d.reason, d.exitCode));- wc.on('unresponsive', () => console.error('[cadide] Renderer reagiert nicht'));+ wc.on('unresponsive', () => console.error('[soma] Renderer reagiert nicht'));wc.on('console-message', (_e, level, message, line, source) => { if (level >= 2) console.error(`[renderer] ${message} (${source}:${line})`); });wc.once('did-finish-load', () => {// Zuletzt geöffnetes Projekt (ungespeicherter Arbeitsstand bleibt so nach einem Absturz erhalten), sonst ein neues.void (async () => {try { await ctl.open(getLastProject() ?? (await createProject()).id); }- catch (e) { console.error('[cadide] Projekt konnte nicht geöffnet werden:', e); }+ catch (e) { console.error('[soma] Projekt konnte nicht geöffnet werden:', e); }})();});win.loadFile(path.join(__dirname, '..', 'renderer', 'index.html'));diff --git a/app/src/main/measure.ts b/app/src/main/measure.tsindex 4e7aa27..2ccff50 100644--- a/app/src/main/measure.ts+++ b/app/src/main/measure.ts@@ -8,7 +8,7 @@ const REQUEST_TIMEOUT_MS = 30_000;interface Pending { resolve: (r: MeasureResponse) => void; timer: NodeJS.Timeout }/**- * Langlebiger Python-Dienst pro Projekt für exakte Messungen (E24): `python -m cadide serve`, JSON-Zeilen über+ * Langlebiger Python-Dienst pro Projekt für exakte Messungen (E24): `python -m soma serve`, JSON-Zeilen über* stdin/stdout. Er startet erst bei der ersten Messung (cadquery zu laden kostet Sekunden) und bleibt dann offen.* Stürzt er ab, gilt die laufende Anfrage als fehlgeschlagen, die nächste startet ihn neu. Fehler sind Ergebnisse,* keine Ausnahmen: Die Oberfläche zeigt sie an.@@ -45,7 +45,7 @@ export class MeasureService {private start(): Promise<void> {if (this.proc && this.ready) return this.ready;this.buf = '';- const child = spawn(pythonExe(), ['-m', 'cadide', 'serve'], {+ const child = spawn(pythonExe(), ['-m', 'soma', 'serve'], {cwd: this.cwd, windowsHide: true, stdio: ['pipe', 'pipe', 'pipe'],env: { ...process.env, PYTHONUTF8: '1', PYTHONIOENCODING: 'utf-8', PYTHONUNBUFFERED: '1' },});diff --git a/app/src/main/paths.ts b/app/src/main/paths.tsindex abaaf0f..8e57019 100644--- a/app/src/main/paths.ts+++ b/app/src/main/paths.ts@@ -2,9 +2,9 @@ import { app } from 'electron';import fs from 'node:fs';import path from 'node:path';-/** App-Daten. Fuer Tests per CADIDE_USER_DATA umleitbar, damit nichts im echten Profil landet. */+/** App-Daten. Fuer Tests per SOMA_USER_DATA umleitbar, damit nichts im echten Profil landet. */export function userDataDir(): string {- return process.env.CADIDE_USER_DATA || app.getPath('userData');+ return process.env.SOMA_USER_DATA || app.getPath('userData');}export const workspacesDir = () => path.join(userDataDir(), 'workspaces');@@ -24,11 +24,11 @@ export const thumbnailsDir = () => path.join(userDataDir(), 'thumbnails');export const templateDir = () => path.join(app.getAppPath(), 'resources', 'template');/**- * Python der Basisumgebung. Reihenfolge: CADIDE_PYTHON, Entwicklungs-Umgebung aus Phase 0, sonst `python` im PATH.+ * Python der Basisumgebung. Reihenfolge: SOMA_PYTHON, Entwicklungs-Umgebung aus Phase 0, sonst `python` im PATH.* Die mitgelieferte Basisumgebung ersetzt das spaeter (Auslieferung ist noch offen).*/export function pythonExe(): string {- if (process.env.CADIDE_PYTHON) return process.env.CADIDE_PYTHON;+ if (process.env.SOMA_PYTHON) return process.env.SOMA_PYTHON;if (process.platform === 'win32' && process.env.LOCALAPPDATA) {const dev = path.join(process.env.LOCALAPPDATA, 'cadide-phase0', 'venv-full', 'Scripts', 'python.exe');if (fs.existsSync(dev)) return dev;@@ -44,7 +44,7 @@ export function gitCmdDir(): string | null {} catch { return null; }}-/** Ordner mit python und cadide-Startprogramm, kommt bei Terminals an den Anfang von PATH. */+/** Ordner mit python und soma-Startprogramm, kommt bei Terminals an den Anfang von PATH. */export function pythonBinDir(): string | null {const exe = pythonExe();return path.isAbsolute(exe) ? path.dirname(exe) : null;diff --git a/app/src/main/projects.ts b/app/src/main/projects.tsindex 82af6d7..05f22f0 100644--- a/app/src/main/projects.ts+++ b/app/src/main/projects.ts@@ -2,7 +2,7 @@ import { shell, type BrowserWindow, type WebContents } from 'electron';import fs from 'node:fs';import path from 'node:path';import type { ExportResult, GitLog, MeasureEntity, MeasureRequest, MeasureResponse, ModelMap, OpenResult, PreviewResult, ProjectInfo, RestoreResult, SaveResult, SaveState } from '../shared/types';-import { BuildManager, buildIsStale, newestSourceMtime, runCadide } from './build';+import { BuildManager, buildIsStale, newestSourceMtime, runSoma } from './build';import { choose, choosePath } from './dialogs';import { GitRepo } from './git';import { MeasureService } from './measure';@@ -126,13 +126,13 @@ export class ProjectController {else await shell.openPath(s.dir);}- /** Einzelexport über `cadide export` (E34). Der Export baut das Modell selbst, der Viewer bleibt davon unberührt. */+ /** Einzelexport über `soma export` (E34). Der Export baut das Modell selbst, der Viewer bleibt davon unberührt. */async exportModel(format: string, part: string | null): Promise<ExportResult> {const s = this.need();if (!/^[a-z0-9]{2,5}$/.test(format)) return { ok: false, files: [], error: `Unbekanntes Format: ${format}` };// `--` vor dem Namen: Bauteilnamen dürfen mit einem Minus beginnen, ohne als Option zu geltenconst args = ['export', '--format', format, '--project', s.dir, ...(part ? ['--', part] : ['--all'])];- const r = await runCadide(args, s.dir, 5 * 60 * 1000);+ const r = await runSoma(args, s.dir, 5 * 60 * 1000);const files = [...r.out.matchAll(/^exportiert: (.+)$/gm)].map((m) => m[1].trim());if (r.ok) return { ok: true, files };const msg = (r.err || r.out).trim().split(/\r?\n/).slice(-3).join('\n');@@ -192,15 +192,15 @@ export class ProjectController {*/async openZipFile(zipPath: string): Promise<OpenResult> {let texts: Record<string, string | null>;- try { texts = await readZipTexts(zipPath, ['.cadide/project.json', ZIP_INFO_PATH]); }+ try { texts = await readZipTexts(zipPath, ['.soma/project.json', ZIP_INFO_PATH]); }catch (e) { return { cancelled: false, error: `Die ZIP lässt sich nicht lesen: ${e instanceof Error ? e.message : String(e)}` }; }let id: string;let info: ZipInfo | null = null;try {- id = (JSON.parse(texts['.cadide/project.json'] ?? '') as { id?: string }).id ?? '';+ id = (JSON.parse(texts['.soma/project.json'] ?? '') as { id?: string }).id ?? '';if (texts[ZIP_INFO_PATH]) info = JSON.parse(texts[ZIP_INFO_PATH]!) as ZipInfo;} catch { id = ''; }- if (!isProjectId(id)) return { cancelled: false, error: 'Das ist keine CAD-IDE-Datei (.cadide/project.json fehlt oder ist ungültig).' };+ if (!isProjectId(id)) return { cancelled: false, error: 'Das ist keine SOMA-Datei (.soma/project.json fehlt oder ist ungültig).' };const dir = projectDir(id);const remember = () => patchAppState(id, { zipPath, savedHead: info?.head ?? null, savedAt: Date.now() });@@ -268,7 +268,7 @@ export class ProjectController {if (!fs.existsSync(path.join(dir, 'model.glb')) || !fs.existsSync(path.join(dir, 'geometry'))) {const step = path.join(dir, 'model.step');await s.git.exportFile(hash, 'output/model.step', step);- const r = await runCadide(['glb', step, '--out', dir], s.dir);+ const r = await runSoma(['glb', step, '--out', dir], s.dir);if (!r.ok) throw new Error((r.err || r.out).trim().split('\n').pop() || 'Umwandlung fehlgeschlagen');}const glb = fs.readFileSync(path.join(dir, 'model.glb'));@@ -290,7 +290,7 @@ export class ProjectController {const s = this.need();let folder: string;const hash = (source as { preview?: unknown } | null)?.preview;- if (source === 'live') folder = path.join(s.dir, '.cadide');+ if (source === 'live') folder = path.join(s.dir, '.soma');else if (typeof hash === 'string' && /^[0-9a-f]{7,40}$/.test(hash)) folder = path.join(previewsDir(), s.id, hash);else return { ok: false, error: 'Unbekannte Quelle für die Messung.' };const r = req as { build?: unknown; a?: unknown; b?: unknown } | null;@@ -336,12 +336,12 @@ export class ProjectController {* Eingaben im Editor (`editor.dirty`) aber nur, wenn sie gespeichert werden. „Nicht speichern“ legt sie als Sicherung ab.*/async confirmClose(editor: { dirty: string[]; save(): Promise<boolean>; discard(): Promise<void> }): Promise<boolean> {- if (!this.session || process.env.CADIDE_TEST === '1') return true;+ if (!this.session || process.env.SOMA_TEST === '1') return true;const st = await this.saveState();if (!st.unsaved && !editor.dirty.length) return true;const inEditor = editor.dirty.length ? `Im Editor noch nicht gespeichert: ${editor.dirty.join(', ')}. ` : '';const c = await choose(this.getWin(), {- title: 'CAD-IDE beenden',+ title: 'SOMA beenden',message: 'Das Modell hat ungespeicherte Änderungen.',detail: `${inEditor}Der Arbeitsstand bleibt auf diesem Rechner erhalten und wird beim nächsten Start wieder geöffnet. Die ZIP-Datei wird nur beim Speichern aktualisiert.`,buttons: ['Speichern', 'Nicht speichern', 'Abbrechen'],diff --git a/app/src/main/terminals.ts b/app/src/main/terminals.tsindex 0305b8f..166b320 100644--- a/app/src/main/terminals.ts+++ b/app/src/main/terminals.ts@@ -3,9 +3,9 @@ import type { WebContents } from 'electron';import * as pty from 'node-pty';import { gitCmdDir, pythonBinDir } from './paths';-/** Umgebung fuer Terminals: Python-Basisumgebung vorn im PATH, damit `python`, `pip` und `cadide` gefunden werden. */+/** Umgebung fuer Terminals: Python-Basisumgebung vorn im PATH, damit `python`, `pip` und `soma` gefunden werden. */export function terminalEnv(projectDir: string): NodeJS.ProcessEnv {- const env: NodeJS.ProcessEnv = { ...process.env, PYTHONUTF8: '1', CADIDE_PROJECT: projectDir };+ const env: NodeJS.ProcessEnv = { ...process.env, PYTHONUTF8: '1', SOMA_PROJECT: projectDir };const key = Object.keys(env).find((k) => k.toLowerCase() === 'path') ?? 'PATH';const front: string[] = [];const bin = pythonBinDir();diff --git a/app/src/main/watcher.ts b/app/src/main/watcher.tsindex 06475fb..cd93613 100644--- a/app/src/main/watcher.ts+++ b/app/src/main/watcher.ts@@ -2,7 +2,7 @@ import fs from 'node:fs';import { affectsBuild } from '../shared/editable';/** Ordner, die nie einen Build oder eine Neuanzeige der Dateiliste ausloesen (Ausgaben wuerden sich sonst selbst anstossen). */-const IGNORED_TOP = new Set(['.git', '.cadide', 'output', 'exports', '__pycache__', 'node_modules', '.venv', 'venv', 'env']);+const IGNORED_TOP = new Set(['.git', '.soma', 'output', 'exports', '__pycache__', 'node_modules', '.venv', 'venv', 'env']);const topSegment = (rel: string) => rel.split(/[\\/]/)[0] ?? '';const isIgnored = (rel: string) => IGNORED_TOP.has(topSegment(rel)) || rel.split(/[\\/]/).includes('__pycache__');diff --git a/app/src/main/workspace.ts b/app/src/main/workspace.tsindex 3e689eb..b9415a4 100644--- a/app/src/main/workspace.ts+++ b/app/src/main/workspace.ts@@ -2,7 +2,7 @@ import { randomUUID } from 'node:crypto';import fs from 'node:fs';import path from 'node:path';import type { ProjectListEntry } from '../shared/types';-import { runCadide } from './build';+import { runSoma } from './build';import { GitRepo } from './git';import { appStateFile, backupsDir, projectStateDir, templateDir, workspacesDir } from './paths';import { extractZip } from './zip';@@ -39,7 +39,7 @@ export function projectDir(id: string): string {}const stateFile = (id: string) => path.join(projectStateDir(), `${id}.json`);-export const readProjectJson = (id: string) => readJson<ProjectJson>(path.join(projectDir(id), '.cadide', 'project.json'));+export const readProjectJson = (id: string) => readJson<ProjectJson>(path.join(projectDir(id), '.soma', 'project.json'));/** Neues Projekt: UUID-Ordner in den App-Daten (E21), Vorlage kopieren, Zustand doppelt ablegen (E27), Git-Verlauf anlegen (E7). */export async function createProject(name = 'Neues Modell'): Promise<{ id: string; dir: string }> {@@ -48,16 +48,16 @@ export async function createProject(name = 'Neues Modell'): Promise<{ id: stringfs.mkdirSync(dir, { recursive: true });fs.cpSync(templateDir(), dir, { recursive: true });const pj: ProjectJson = { id, name, api_version: API_VERSION, entry: 'model.py', main_output: 'output/model.step', created: new Date().toISOString() };- writeJson(path.join(dir, '.cadide', 'project.json'), pj);+ writeJson(path.join(dir, '.soma', 'project.json'), pj);writeJson(stateFile(id), { ...pj, app: {} } satisfies ProjectState);// Einmal bauen, bevor der Startcommit entsteht: So enthält auch der erste Stand eine output/model.step// und lässt sich im Verlauf als Vorschau öffnen. Scheitert der Build, geht das Anlegen trotzdem weiter.- await runCadide(['build', '--project', dir], dir, 90000);+ await runSoma(['build', '--project', dir], dir, 90000);try {await new GitRepo(dir).init('Neues Modell angelegt');} catch (e) {// Ohne Git bleibt das Projekt benutzbar. Der Verlauf meldet den Grund (Projekt-Check), statt das Anlegen scheitern zu lassen.- console.error('[cadide] Git-Verlauf konnte nicht angelegt werden:', e);+ console.error('[soma] Git-Verlauf konnte nicht angelegt werden:', e);}setLastProject(id);return { id, dir };@@ -76,7 +76,7 @@ export function patchAppState(id: string, patch: AppState): void {/** Benennt das Projekt um (project.json und App-Kopie). Die Änderung landet beim nächsten Snapshot im Verlauf. */export function renameProject(id: string, name: string): void {- const file = path.join(projectDir(id), '.cadide', 'project.json');+ const file = path.join(projectDir(id), '.soma', 'project.json');const pj = readJson<ProjectJson>(file);if (!pj || pj.name === name) return;writeJson(file, { ...pj, name });@@ -89,14 +89,14 @@ export function inspectProject(id: string): { name: string; problems: string[] }const dir = projectDir(id);const problems: string[] = [];if (!fs.existsSync(dir)) return { name: id, problems: ['Der Arbeitsordner existiert nicht.'] };- const pj = readJson<ProjectJson>(path.join(dir, '.cadide', 'project.json'));+ const pj = readJson<ProjectJson>(path.join(dir, '.soma', 'project.json'));const backup = readJson<ProjectState>(stateFile(id));if (!pj) {problems.push(backup- ? '.cadide/project.json fehlt oder ist unlesbar. Eine Kopie liegt in den App-Daten (nicht automatisch wiederhergestellt).'- : '.cadide/project.json fehlt oder ist unlesbar, und es gibt keine Kopie.');+ ? '.soma/project.json fehlt oder ist unlesbar. Eine Kopie liegt in den App-Daten (nicht automatisch wiederhergestellt).'+ : '.soma/project.json fehlt oder ist unlesbar, und es gibt keine Kopie.');} else if (pj.id !== id) {- problems.push('Die ID in .cadide/project.json passt nicht zum Arbeitsordner.');+ problems.push('Die ID in .soma/project.json passt nicht zum Arbeitsordner.');} else if (pj.api_version > API_VERSION) {problems.push(`Das Projekt nutzt api_version ${pj.api_version}, diese App kennt nur ${API_VERSION}.`);}@@ -115,7 +115,7 @@ export function listProjects(): ProjectListEntry[] {for (const id of fs.readdirSync(root)) {if (!isProjectId(id)) continue;const dir = path.join(root, id);- const pj = readJson<ProjectJson>(path.join(dir, '.cadide', 'project.json'));+ const pj = readJson<ProjectJson>(path.join(dir, '.soma', 'project.json'));out.push({ id, name: pj?.name ?? id.slice(0, 8), modified: fs.statSync(dir).mtimeMs });}return out.sort((a, b) => b.modified - a.modified);@@ -159,7 +159,7 @@ export async function extractProject(zipPath: string, id: string): Promise<strintry {await extractZip(zipPath, tmp);// Der Marker ist nur fürs Öffnen da. Bliebe er liegen, wäre er für Git eine unversionierte Datei ("ungespeichert").- fs.rmSync(path.join(tmp, '.cadide', 'zip-info.json'), { force: true });+ fs.rmSync(path.join(tmp, '.soma', 'zip-info.json'), { force: true });fs.renameSync(tmp, dst);} catch (e) {fs.rmSync(tmp, { recursive: true, force: true });diff --git a/app/src/main/zip.ts b/app/src/main/zip.tsindex 6a35df3..820a485 100644--- a/app/src/main/zip.ts+++ b/app/src/main/zip.ts@@ -6,13 +6,13 @@ import yazl from 'yazl';/** Marker, den die App beim Speichern in die ZIP legt. Damit erkennt sie beim Öffnen, ob der Arbeitsordner abweicht (E21). */export interface ZipInfo { savedAt: string; head: string | null; id: string; name: string }-export const ZIP_INFO_PATH = '.cadide/zip-info.json';+export const ZIP_INFO_PATH = '.soma/zip-info.json';/** Wird nie gepackt: Umgebungen und Caches (Umgebung wird aus requirements.txt neu gebaut, Cache neu erzeugt). */const SKIP_DIRS = new Set(['.venv', 'venv', 'env', '__pycache__', 'node_modules']);-const SKIP_FILES = new Set(['.cadide/model.glb', '.cadide/model.map.json', '.cadide/build.json']);+const SKIP_FILES = new Set(['.soma/model.glb', '.soma/model.map.json', '.soma/build.json']);/** Ganze Ordner, die nie gepackt werden (Pfad relativ zum Projekt): die Geometrie für das Messen entsteht beim Bauen neu. */-const SKIP_PATHS = new Set(['.cadide/geometry']);+const SKIP_PATHS = new Set(['.soma/geometry']);const MAX_UNPACKED = 2 * 1024 ** 3;function collect(root: string): string[] {diff --git a/app/src/preload/preload.ts b/app/src/preload/preload.tsindex 83dd414..fae29f4 100644--- a/app/src/preload/preload.ts+++ b/app/src/preload/preload.ts@@ -1,9 +1,9 @@import { contextBridge, ipcRenderer, webUtils } from 'electron';-import type { CadideApi } from '../shared/types';+import type { SomaApi } from '../shared/types';/** Schmale, feste Schnittstelle zwischen Renderer und Hauptprozess. Der Renderer hat keinen Node-Zugriff. */-const api: CadideApi = {- testMode: process.env.CADIDE_TEST === '1',+const api: SomaApi = {+ testMode: process.env.SOMA_TEST === '1',project: {current: () => ipcRenderer.invoke('project:current'),create: () => ipcRenderer.invoke('project:create'),@@ -58,9 +58,9 @@ const api: CadideApi = {measure: { query: (source, req) => ipcRenderer.invoke('measure:query', source, req) },dialog: { choose: (o) => ipcRenderer.invoke('dialog:choose', o) },// Nur im Testmodus: vorbereitete Antworten für native Dialoge- test: process.env.CADIDE_TEST === '1'+ test: process.env.SOMA_TEST === '1'? { answers: (a) => ipcRenderer.invoke('test:answers', a), screenshot: (f) => ipcRenderer.invoke('test:screenshot', f) }: undefined,};-contextBridge.exposeInMainWorld('cadide', api);+contextBridge.exposeInMainWorld('soma', api);diff --git a/app/src/renderer/code.ts b/app/src/renderer/code.tsindex 1a86f52..03905d5 100644--- a/app/src/renderer/code.ts+++ b/app/src/renderer/code.ts@@ -354,7 +354,7 @@ export class CodePanel {const text = this.textOf(d);d.writing = true;let r;- try { r = await window.cadide.fs.writeText(id, d.file, text, d.base, force); } catch (e) { r = { ok: false, error: errText(e) }; }+ try { r = await window.soma.fs.writeText(id, d.file, text, d.base, force); } catch (e) { r = { ok: false, error: errText(e) }; }d.writing = false;if (this.docs.get(d.file) !== d) return false;if (r.ok) {@@ -377,7 +377,7 @@ export class CodePanel {const id = this.deps.projectId();if (!id) return false;try {- const b = await window.cadide.fs.backupText(id, d.file, this.textOf(d));+ const b = await window.soma.fs.backupText(id, d.file, this.textOf(d));this.deps.toast(`Deine Fassung von ${d.file} liegt als Sicherung unter ${b}`, 'info');return true;} catch (e) {diff --git a/app/src/renderer/index.html b/app/src/renderer/index.htmlindex 8f93e7b..329707f 100644--- a/app/src/renderer/index.html+++ b/app/src/renderer/index.html@@ -3,7 +3,7 @@<head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:">-<title>CAD-IDE</title>+<title>SOMA</title><link rel="stylesheet" href="xterm.css"><link rel="stylesheet" href="style.css"></head>@@ -11,7 +11,7 @@<div id="app"><header id="topbar" class="top"><button id="btn-home" class="logo" title="Startseite" aria-label="Startseite"><i data-icon="cube" data-size="22"></i></button>- <button id="btn-doc" class="docname" title="Neu, Öffnen, Zuletzt geöffnet, Speichern unter" aria-haspopup="menu" aria-expanded="false"><b id="doc-name">CAD-IDE</b><i data-icon="down" data-size="14" data-stroke="2"></i></button>+ <button id="btn-doc" class="docname" title="Neu, Öffnen, Zuletzt geöffnet, Speichern unter" aria-haspopup="menu" aria-expanded="false"><b id="doc-name">SOMA</b><i data-icon="down" data-size="14" data-stroke="2"></i></button><span id="save-badge" class="savestate"></span><button id="problems" class="warnbadge" hidden aria-haspopup="dialog" aria-expanded="false"></button><span class="grow"></span>@@ -166,7 +166,7 @@<div id="mark-hint" class="float mk-hint"></div><div class="mk-actions"><button id="btn-mark-cancel" class="btn" title="Zeichnung verwerfen (Escape)">Abbrechen</button>- <button id="btn-mark-send" class="btn primary" title="Als PNG in .cadide/feedback/ speichern und den Pfad in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="15" data-stroke="2"></i>An Agent geben</button>+ <button id="btn-mark-send" class="btn primary" title="Als PNG in .soma/feedback/ speichern und den Pfad in die Eingabe des Agenten einfügen"><i data-icon="send" data-size="15" data-stroke="2"></i>An Agent geben</button></div></div></section>@@ -283,7 +283,7 @@</div><div id="start" class="start" hidden>- <header class="top"><span class="logo"><i data-icon="cube" data-size="22"></i></span><b class="brand">CAD-IDE</b><span class="grow"></span>+ <header class="top"><span class="logo"><i data-icon="cube" data-size="22"></i></span><b class="brand">SOMA</b><span class="grow"></span><button id="btn-start-close" class="btn">Zurück zum Modell</button></header><div class="start-body"><div class="start-grid">diff --git a/app/src/renderer/main.ts b/app/src/renderer/main.tsindex 1f96d00..b134220 100644--- a/app/src/renderer/main.ts+++ b/app/src/renderer/main.ts@@ -12,7 +12,7 @@ import { VersionsBar } from './versions';import { PickResult, Viewer, ViewName } from './viewer';hydrateIcons();-const api = window.cadide;+const api = window.soma;const viewer = new Viewer($('viewer'));viewer.attachCube($('cube-view'));@@ -374,7 +374,7 @@ async function loadModel(): Promise<void> {const seq = ++loadSeq;const msg = $('viewer-msg');try {- const [mapText, glb] = await Promise.all([api.fs.readText('.cadide/model.map.json'), api.fs.readBinary('.cadide/model.glb')]);+ const [mapText, glb] = await Promise.all([api.fs.readText('.soma/model.map.json'), api.fs.readBinary('.soma/model.glb')]);if (seq !== loadSeq) return; // neuerer Build ist schon unterwegsmap = JSON.parse(mapText) as ModelMap;textCache.clear();@@ -441,7 +441,7 @@ async function onProject(p: ProjectInfo): Promise<void> {void renderSelection();partsCard.message('Modell wird gebaut …');$('doc-name').textContent = p.name;- document.title = `CAD-IDE – ${p.name}`;+ document.title = `SOMA – ${p.name}`;$<HTMLInputElement>('chk-auto').checked = p.autoBuild;renderAuto();showProblems(p.problems);@@ -483,7 +483,7 @@ function renderSaveState(st: SaveState): void {b.replaceChildren(dot, text);b.title = st.zipPath ? `ZIP: ${st.zipPath}` : 'Noch nicht als ZIP gespeichert. Strg+S speichert.';versions.setSaved(st.zipPath ? st.savedHead : null);- document.title = `CAD-IDE – ${project?.name ?? ''}${unsaved ? ' ●' : ''}`;+ document.title = `SOMA – ${project?.name ?? ''}${unsaved ? ' ●' : ''}`;}async function refreshSaveState(): Promise<void> {@@ -701,7 +701,7 @@ function setAgentCollapsed(on: boolean): void {$('agent-strip').hidden = !on;$('split-right').hidden = on;if (!on) terminals.refit();- store.set('cadide.agentCollapsed', on ? '1' : '0');+ store.set('soma.agentCollapsed', on ? '1' : '0');}$('btn-agent-collapse').addEventListener('click', () => setAgentCollapsed(true));$('btn-agent-expand').addEventListener('click', () => setAgentCollapsed(false));@@ -748,7 +748,7 @@ async function showStart(on: boolean): Promise<void> {if (!on) return;menus.close();$('btn-start-close').hidden = !project;- $('start-note').hidden = store.get('cadide.noteSeen') === '1';+ $('start-note').hidden = store.get('soma.noteSeen') === '1';let list: { id: string; name: string; modified: number }[] = [];try { list = await api.project.list(); } catch { /* ohne Liste */ }list.sort((a, b) => b.modified - a.modified);@@ -770,7 +770,7 @@ async function showStart(on: boolean): Promise<void> {$('btn-start-close').addEventListener('click', () => showStart(false));$('start-new').addEventListener('click', () => { void doNew(); showStart(false); });$('start-open').addEventListener('click', () => { void doOpen().then((ok) => { if (ok) showStart(false); }); });-$('btn-note-ok').addEventListener('click', () => { store.set('cadide.noteSeen', '1'); $('start-note').hidden = true; });+$('btn-note-ok').addEventListener('click', () => { store.set('soma.noteSeen', '1'); $('start-note').hidden = true; });// ---- Ereignisse vom Hauptprozess --------------------------------------------------------------------------------@@ -793,9 +793,9 @@ api.versions.onChanged(() => void versions.refresh());api.project.onSaveState((st) => renderSaveState(st));// Das Projekt kommt ausschließlich über das Ereignis (der Hauptprozess öffnet es beim Start). Ein zweiter Weg würde alles doppelt aufbauen.-if (store.get('cadide.agentCollapsed') === '1') setAgentCollapsed(true);+if (store.get('soma.agentCollapsed') === '1') setAgentCollapsed(true);// Beim allerersten Start die Startseite zeigen (mit dem Hinweis auf die Rechte des Agenten). Tests überspringen das.-if (!api.testMode && store.get('cadide.startSeen') !== '1') { store.set('cadide.startSeen', '1'); void showStart(true); }+if (!api.testMode && store.get('soma.startSeen') !== '1') { store.set('soma.startSeen', '1'); void showStart(true); }// Prüfschnittstelle, nur im Testmodusif (api.testMode) {diff --git a/app/src/renderer/markup.ts b/app/src/renderer/markup.tsindex 74f67cb..3f8ec38 100644--- a/app/src/renderer/markup.ts+++ b/app/src/renderer/markup.ts@@ -586,7 +586,7 @@ export class Markup {u.blank.setAttribute('aria-pressed', String(this.blankBg));u.canvas.style.cursor = this.tool === 'select' ? 'default' : this.tool === 'text' ? 'text' : 'crosshair';u.hint.replaceChildren(this.blankBg ? 'Leere Fläche. Das Bild landet in ' : `Bild des Viewers von ${fmtWhen(this.takenAt)}. Es landet in `,- el('code', { textContent: '.cadide/feedback/' }), ', der Pfad in der Eingabe des Agenten.');+ el('code', { textContent: '.soma/feedback/' }), ', der Pfad in der Eingabe des Agenten.');}// ---- Prüfhilfen (nur für Tests) -------------------------------------------------------------------------------diff --git a/app/src/renderer/measuretool.ts b/app/src/renderer/measuretool.tsindex dfcf64a..7edf34c 100644--- a/app/src/renderer/measuretool.ts+++ b/app/src/renderer/measuretool.ts@@ -124,7 +124,7 @@ export class MeasureTool {this.render();const ent = (x: ProbeHit) => ({ part: x.partId, kind: x.kind, id: x.id, point: x.point, check: x.size ?? undefined });let r: MeasureResponse;- try { r = await window.cadide.measure.query(this.deps.source(), { build, a: ent(this.a!), ...(this.b ? { b: ent(this.b) } : {}) }); }+ try { r = await window.soma.measure.query(this.deps.source(), { build, a: ent(this.a!), ...(this.b ? { b: ent(this.b) } : {}) }); }catch (e) { r = { ok: false, error: e instanceof Error ? e.message : String(e) }; }if (seq !== this.seq) return; // inzwischen neu geklickt oder abgebrochenthis.busy = false;diff --git a/app/src/renderer/terminals.ts b/app/src/renderer/terminals.tsindex c0d80f6..9be70f1 100644--- a/app/src/renderer/terminals.ts+++ b/app/src/renderer/terminals.ts@@ -16,8 +16,8 @@ export class TerminalTabs {onStripClick: () => void = () => {};constructor(private tabBar: HTMLElement, private panes: HTMLElement, private anchor: HTMLElement, private strip: HTMLElement) {- window.cadide.term.onData((id, data) => this.tabs.get(id)?.term.write(data));- window.cadide.term.onExit((id, code) => {+ window.soma.term.onData((id, data) => this.tabs.get(id)?.term.write(data));+ window.soma.term.onExit((id, code) => {const t = this.tabs.get(id);if (!t) return;t.exited = true;@@ -29,7 +29,7 @@ export class TerminalTabs {}async add(opts: { command?: string; title?: string } = {}): Promise<number> {- const id = await window.cadide.term.create({ command: opts.command });+ const id = await window.soma.term.create({ command: opts.command });const term = new Terminal({fontFamily: '"IBM Plex Mono", "Cascadia Mono", Consolas, monospace', fontSize: 13, lineHeight: 1.2, cursorBlink: true, scrollback: 5000,theme: { background: '#0f1114', foreground: '#c9ced4', cursor: '#e6e8eb', selectionBackground: 'rgba(242,154,56,0.30)', black: '#1b1e23', brightBlack: '#7f8994' },@@ -40,8 +40,8 @@ export class TerminalTabs {pane.hidden = true;this.panes.appendChild(pane);term.open(pane);- term.onData((d) => window.cadide.term.write(id, d));- term.onResize(({ cols, rows }) => window.cadide.term.resize(id, cols, rows));+ term.onData((d) => window.soma.term.write(id, d));+ term.onResize(({ cols, rows }) => window.soma.term.resize(id, cols, rows));const agent = !!opts.command;const title = opts.title ?? (this.tabs.size ? `Terminal ${this.tabs.size + 1}` : 'Terminal');@@ -73,7 +73,7 @@ export class TerminalTabs {close(id: number): void {const t = this.tabs.get(id);if (!t) return;- window.cadide.term.kill(id);+ window.soma.term.kill(id);t.term.dispose(); t.pane.remove(); t.tab.remove();this.tabs.delete(id);if (this.active === id) {diff --git a/app/src/renderer/versions.ts b/app/src/renderer/versions.tsindex b47fb1f..07d2619 100644--- a/app/src/renderer/versions.ts+++ b/app/src/renderer/versions.ts@@ -22,7 +22,7 @@ interface Hooks {beforeRestore(): Promise<boolean>;}-const who = (c: CommitInfo) => (c.byApp ? 'CAD-IDE' : c.author);+const who = (c: CommitInfo) => (c.byApp ? 'SOMA' : c.author);/*** Verlaufsleiste unter dem Viewer (E7, E35): jeder Commit ein Punkt, ganz rechts „Jetzt“ (der Arbeitsstand).@@ -67,7 +67,7 @@ export class VersionsBar {// veralteter Stand stehen, und weil sich danach nichts mehr ändert, käme auch keine neue Abfrage.const seq = ++this.logSeq;let log: GitLog;- try { log = await window.cadide.versions.log(); } catch { return; }+ try { log = await window.soma.versions.log(); } catch { return; }if (seq !== this.logSeq) return;this.log = log;// Existiert der angezeigte Stand nicht mehr (Verlauf umgebaut), zurück zum Arbeitsstand@@ -94,7 +94,7 @@ export class VersionsBar {}const commit = this.log.commits[i];this.ui.info.textContent = 'Lade Vorschau …';- const res = await window.cadide.versions.preview(commit.hash);+ const res = await window.soma.versions.preview(commit.hash);if (seq !== this.seq) return; // inzwischen etwas anderes gewähltif (res.error) {this.hooks.toast(res.error, 'error');@@ -109,7 +109,7 @@ export class VersionsBar {private async restore(): Promise<void> {if (!this.previewHash) return;if (!(await this.hooks.beforeRestore())) return;- const r = await window.cadide.versions.restore(this.previewHash);+ const r = await window.soma.versions.restore(this.previewHash);if (r.cancelled) return;if (r.error) { this.hooks.toast(r.error, 'error'); return; }this.hooks.toast(r.commit ? 'Stand wiederhergestellt und als neuer Stand im Verlauf abgelegt.' : 'Dieser Stand war schon der aktuelle.', 'ok');diff --git a/app/src/renderer/viewer.ts b/app/src/renderer/viewer.tsindex 1d5cd07..323128e 100644--- a/app/src/renderer/viewer.ts+++ b/app/src/renderer/viewer.ts@@ -125,7 +125,7 @@ export class Viewer {const gltf = await new GLTFLoader().parseAsync(glb, '');const fresh = new Map<string, PartEntry>();gltf.scene.traverse((o) => {- const meta = (o.userData as { cadide?: PartMeta }).cadide;+ const meta = (o.userData as { soma?: PartMeta }).soma;if (!meta) return;const meshes: THREE.Mesh[] = [];const lines: THREE.LineSegments[] = [];diff --git a/app/src/shared/editable.ts b/app/src/shared/editable.tsindex cc0c29d..96edaef 100644--- a/app/src/shared/editable.ts+++ b/app/src/shared/editable.ts@@ -7,7 +7,7 @@ export function readOnlyReason(rel: string): string | null {if (/^(AGENTS|CLAUDE)\.md$/i.test(p)) return 'Wird von der App verwaltet und bei Updates ersetzt. Eigene Wünsche und Regeln gehören in NOTES.md.';if (/^\.gitignore$/i.test(p)) return 'Wird von der App verwaltet.';if (/^(output|exports)\//i.test(p)) return 'Wird beim Bauen oder Exportieren neu erzeugt.';- if (/^\.(cadide|git)(\/|$)/i.test(p)) return 'Interne Daten der App und von Git.';+ if (/^\.(soma|git)(\/|$)/i.test(p)) return 'Interne Daten der App und von Git.';return null;}diff --git a/app/src/shared/types.ts b/app/src/shared/types.tsindex 50e6679..2547909 100644--- a/app/src/shared/types.ts+++ b/app/src/shared/types.ts@@ -28,7 +28,7 @@ export interface BuildStatus {stale?: boolean;}-/** Einzelexport über `cadide export` (E34). `files` relativ zum Projekt. */+/** Einzelexport über `soma export` (E34). `files` relativ zum Projekt. */export interface ExportResult { ok: boolean; files: string[]; error?: string }/** Dateien, die per Ziehen nach inputs/ kopiert wurden (E33). */export interface ImportResult { files: string[]; errors: string[] }@@ -37,7 +37,7 @@ export interface ImportResult { files: string[]; errors: string[] }* `disk` ist ihr aktueller Inhalt (null: gelöscht). `backup`: Pfad der Sicherung der überschriebenen Fassung.*/export interface WriteResult { ok: boolean; conflict?: boolean; disk?: string | null; backup?: string; error?: string }-/** Gespeicherte Markierung (E16). `path` relativ zum Projekt, z. B. `.cadide/feedback/markierung-20260930-1405.png`. */+/** Gespeicherte Markierung (E16). `path` relativ zum Projekt, z. B. `.soma/feedback/markierung-20260930-1405.png`. */export interface FeedbackResult { ok: boolean; path?: string; error?: string }export interface FileNode { name: string; path: string; dir: boolean; children?: FileNode[] }@@ -107,7 +107,7 @@ export interface GitLog { commits: CommitInfo[]; problems: string[]; head: strinexport interface PreviewResult { commit: CommitInfo | null; glb: ArrayBuffer; map: ModelMap; error?: string }export interface RestoreResult { cancelled: boolean; commit?: string | null; safety?: string | null; error?: string }-export interface CadideApi {+export interface SomaApi {testMode: boolean;project: {current(): Promise<ProjectInfo>;@@ -131,7 +131,7 @@ export interface CadideApi {restore(hash: string): Promise<RestoreResult>;onChanged(cb: () => void): void;};- /** Nur im Testmodus (CADIDE_TEST=1) vorhanden. */+ /** Nur im Testmodus (SOMA_TEST=1) vorhanden. */test?: { answers(a: unknown[]): Promise<void>; screenshot(file: string): Promise<{ width: number; height: number }> };build: {run(): Promise<void>;@@ -149,7 +149,7 @@ export interface CadideApi {onChanged(cb: () => void): void;/** Kopiert gezogene Dateien nach inputs/. Vorhandenes wird nie überschrieben. */importFiles(files: File[]): Promise<ImportResult>;- /** Legt ein PNG der Markierung in .cadide/feedback/ ab. Vorhandenes wird nie überschrieben. */+ /** Legt ein PNG der Markierung in .soma/feedback/ ab. Vorhandenes wird nie überschrieben. */saveFeedback(png: Uint8Array): Promise<FeedbackResult>;/*** Schreibt eine Datei aus dem Editor, nur wenn sie auf der Platte noch `base` entspricht (sonst Konflikt).@@ -176,4 +176,4 @@ export interface CadideApi {dialog: { choose(o: { title: string; message: string; detail?: string; buttons: string[] }): Promise<number> };}-declare global { interface Window { cadide: CadideApi } }+declare global { interface Window { soma: SomaApi } }diff --git a/app/test/editor.mjs b/app/test/editor.mjsindex d3cfeb4..6163869 100644--- a/app/test/editor.mjs+++ b/app/test/editor.mjs@@ -199,7 +199,7 @@ try {check('Reiter schließen, „Verwerfen": Datei unverändert, Eingabe in der Sicherung', fs.readFileSync(model2, 'utf8').includes('LENGTH = 60.0') && back2.some((b) => b.includes('LENGTH = 65.0')));// 14) Späte Schreibanfrage für ein schon gewechseltes Modell: nicht ins neue schreiben, sondern sichern- const late = await ev((id) => window.cadide.fs.writeText(id, 'model.py', 'X = 1\n', null, true), proj.id);+ const late = await ev((id) => window.soma.fs.writeText(id, 'model.py', 'X = 1\n', null, true), proj.id);check('Späte Eingabe für das alte Modell: nicht ins neue geschrieben, sondern gesichert', !late.ok && /Sicherung/.test(late.error ?? '') && fs.readFileSync(model2, 'utf8').includes('LENGTH = 60.0')&& backups().includes('X = 1\n'), (late.error ?? '').slice(0, 60));diff --git a/app/test/groups.mjs b/app/test/groups.mjsindex a64cf46..2211d61 100644--- a/app/test/groups.mjs+++ b/app/test/groups.mjs@@ -10,8 +10,8 @@ const t = checker();const { check } = t;let app;-// Dasselbe Python wie die App (paths.ts): CADIDE_PYTHON oder die Entwicklungsumgebung aus Phase 0-const PY = process.env.CADIDE_PYTHON || path.join(process.env.LOCALAPPDATA ?? '', 'cadide-phase0', 'venv-full', 'Scripts', 'python.exe');+// Dasselbe Python wie die App (paths.ts): SOMA_PYTHON oder die Entwicklungsumgebung aus Phase 0+const PY = process.env.SOMA_PYTHON || path.join(process.env.LOCALAPPDATA ?? '', 'cadide-phase0', 'venv-full', 'Scripts', 'python.exe');const py = (code) => spawnSync(PY, ['-c', code], { encoding: 'utf8' });// Fremde Baugruppe wie von einem Hersteller: Platine mit Unterbaugruppe „Stecker“@@ -26,7 +26,7 @@ asm.add(sub, name="Stecker")asm.export(${JSON.stringify(file)})`;const MODEL = `import cadquery as cq-from cadide import add_part, import_assembly+from soma import add_part, import_assemblyadd_part("Boden", cq.Workplane().box(60, 40, 3), group="Gehäuse")add_part("Deckel", cq.Workplane().box(60, 40, 2).translate((0, 0, 20)), group="Gehäuse")diff --git a/app/test/harness.mjs b/app/test/harness.mjsindex 7487744..fa0d0bf 100644--- a/app/test/harness.mjs+++ b/app/test/harness.mjs@@ -17,9 +17,9 @@ export async function startApp({ port = 9333, userData, watchdogMs = 6 * 60 * 10// SMOKE_VISIBLE=1 sichtbar, =offscreen angezeigt außerhalb des Bildschirms (frische Screenshots, kein Fokusklau), sonst unsichtbarconst mode = process.env.SMOKE_VISIBLE;const visible = mode === '1';- const ud = userData ?? fs.mkdtempSync(path.join(os.tmpdir(), `cadide-${name}-`));+ const ud = userData ?? fs.mkdtempSync(path.join(os.tmpdir(), `soma-${name}-`));const child = spawn(electronExe(APP), ['.', `--remote-debugging-port=${port}`], {- cwd: APP, env: { ...process.env, CADIDE_USER_DATA: ud, CADIDE_TEST: '1', CADIDE_HIDDEN: visible ? '0' : mode === 'offscreen' ? 'offscreen' : '1' }, stdio: ['ignore', 'pipe', 'pipe'],+ cwd: APP, env: { ...process.env, SOMA_USER_DATA: ud, SOMA_TEST: '1', SOMA_HIDDEN: visible ? '0' : mode === 'offscreen' ? 'offscreen' : '1' }, stdio: ['ignore', 'pipe', 'pipe'],});let log = '';child.stdout.on('data', (d) => { log += d; });@@ -48,9 +48,9 @@ export async function startApp({ port = 9333, userData, watchdogMs = 6 * 60 * 10},domClick: (id) => ev((i) => document.getElementById(i).click(), id),/** Antworten für die nächsten nativen Dialoge (Pfade, Knopf-Indizes). */- answers: (list) => ev((a) => window.cadide.test.answers(a), list),+ answers: (list) => ev((a) => window.soma.test.answers(a), list),/** Screenshot des Fensters (über Electron, funktioniert auch bei unsichtbarem Fenster). */- screenshot: (file) => ev((f) => window.cadide.test.screenshot(f), file),+ screenshot: (file) => ev((f) => window.soma.test.screenshot(f), file),/** Beendet die App hart (wie ein Absturz). */crash() { clearTimeout(dog); page.close(); kill(); },async stop() { clearTimeout(dog); page.close(); kill(); await sleep(600); },diff --git a/app/test/measure.mjs b/app/test/measure.mjsindex da8006c..7952c7b 100644--- a/app/test/measure.mjs+++ b/app/test/measure.mjs@@ -11,7 +11,7 @@ let app;// Bekannte Maße: Platte 40 × 30 × 5 mit zwei Bohrungen Ø 6 bei x = ±10, Block 20 × 20 × 5 auf z = 15..20const MODEL = `import cadquery as cq-from cadide import add_part+from soma import add_partplate = (cq.Workplane("XY").box(40, 30, 5, centered=(True, True, False)).faces(">Z").workplane().pushPoints([(-10, 0), (10, 0)]).hole(6))@@ -97,7 +97,7 @@ try {check('„An Agent geben": Text mit Bauteil, Elementen und Wert (Punkt als Dezimalzeichen), steht im Terminal',agentText.startsWith('[Messung: Bauteil "Platte" Kante Kreis und Bauteil "Platte" Kante Kreis: Abstand der Mittelpunkte 20.000 mm') && txt.includes('[Messung: Bauteil'),agentText.slice(0, 90));- await ev((id) => window.cadide.term.write(id, '\x03'), tid);+ await ev((id) => window.soma.term.write(id, '\x03'), tid);// 6) Verdeckte Kante: Die untere hintere Kante der Platte liegt hinter der Oberseite und darf nicht getroffen werdenconst hidden = await ev((pid) => window.__t.viewer.edgesOf(pid).find((e) => e.curve === 'LINE' && Math.abs(e.mid[2]) < 1e-3 && Math.abs(e.mid[1] - 15) < 1e-3), ids.Platte);diff --git a/app/test/smoke.mjs b/app/test/smoke.mjsindex 57e1c10..3338e32 100644--- a/app/test/smoke.mjs+++ b/app/test/smoke.mjs@@ -27,7 +27,7 @@ try {const proj = await ev(() => window.__t.project());check('Projekt liegt unter <App-Daten>/workspaces/<uuid>', proj.dir.startsWith(path.join(ud, 'workspaces')) && /[0-9a-f-]{36}$/.test(proj.dir), proj.dir.slice(-45));check('Vorlagen-Dateien vorhanden (AGENTS.md, CLAUDE.md, NOTES.md, model.py …)',- ['AGENTS.md', 'CLAUDE.md', 'NOTES.md', 'model.py', '.gitignore', '.cadide/project.json', '.git/HEAD'].every((f) => fs.existsSync(path.join(proj.dir, f))));+ ['AGENTS.md', 'CLAUDE.md', 'NOTES.md', 'model.py', '.gitignore', '.soma/project.json', '.git/HEAD'].every((f) => fs.existsSync(path.join(proj.dir, f))));check('Erster Build automatisch, 2 Bauteile in der Bauteilkarte', JSON.stringify(await ev(() => window.__t.treeNames())) === '["Body","Lid"]');check('Nach dem Build kein Fehlerhinweis', (await status()).viewerMsg === '', (await status()).text);const okStatus = await status();@@ -62,13 +62,13 @@ try {await shot('3-dateien');await ev(() => window.__t.showPanel(null));- // 3) Terminal: echte Shell im Projektordner, cadide im PATH+ // 3) Terminal: echte Shell im Projektordner, soma im PATHconst tid = await ev(() => window.__t.terminals.activeId);check('Ein Terminal wurde automatisch geöffnet', await ev(() => window.__t.terminals.count) === 1);- await ev((id) => window.cadide.term.write(id, 'cadide --version\r'), tid);- const gotVersion = await waitFor('cadide --version im Terminal', (id) => /^cadide \d/m.test(window.__t.termText(id)), 20000, tid).catch(() => false);- check('Im Terminal läuft `cadide` (PATH der Basisumgebung)', !!gotVersion);- await ev((id) => window.cadide.term.write(id, 'Get-Location\r'), tid);+ await ev((id) => window.soma.term.write(id, 'soma --version\r'), tid);+ const gotVersion = await waitFor('soma --version im Terminal', (id) => /^soma \d/m.test(window.__t.termText(id)), 20000, tid).catch(() => false);+ check('Im Terminal läuft `soma` (PATH der Basisumgebung)', !!gotVersion);+ await ev((id) => window.soma.term.write(id, 'Get-Location\r'), tid);await waitFor('Get-Location', (id) => window.__t.termText(id).includes('workspaces'), 20000, tid).catch(() => {});check('Terminal startet im Projektordner', (await ev((id) => window.__t.termText(id), tid)).includes('workspaces'));// Übergabe an den Agenten: Text landet in der Eingabezeile, abgeschickt wird nicht (E11)@@ -77,10 +77,10 @@ try {const afterInsert = await ev((id) => window.__t.termText(id), tid);check('„An Agent geben" fügt den Text in die Eingabezeile ein, ohne abzuschicken', afterInsert.includes('[Auswahl: Bauteil "Lid"') && !/Auswahl:.*\n.*(nicht erkannt|not recognized)/.test(afterInsert));check('Bestätigung „In die Eingabe von Terminal eingefügt"', (await ev(() => window.__t.toast())).text.includes('In die Eingabe von Terminal eingefügt'));- await ev((id) => window.cadide.term.write(id, '\x03'), tid); // Zeile verwerfen+ await ev((id) => window.soma.term.write(id, '\x03'), tid); // Zeile verwerfen- // Markierung (E16): Viewer-Bild einfrieren, zeichnen, als PNG nach .cadide/feedback/, Pfad in die Eingabe- const dirtyBefore = (await ev(() => window.cadide.project.saveState())).dirtyFiles;+ // Markierung (E16): Viewer-Bild einfrieren, zeichnen, als PNG nach .soma/feedback/, Pfad in die Eingabe+ const dirtyBefore = (await ev(() => window.soma.project.saveState())).dirtyFiles;const lidPos = await ev((l) => { const v = window.__t.viewer, r = document.getElementById('viewer').getBoundingClientRect(), p = v.screenOf(l.id, l.face); return [p.x - r.left, p.y - r.top]; }, lidFace);await domClick('btn-mark');await waitFor('Zeichenfläche offen', () => window.__t.markup().active, 5000).catch(() => {});@@ -173,19 +173,19 @@ try {const px = (await ev(() => window.__t.markup())).pixels;await domClick('btn-mark-send');await waitFor('Markierung gespeichert', () => !window.__t.markup().active, 10000).catch(() => {});- const fbDir = path.join(proj.dir, '.cadide', 'feedback');+ const fbDir = path.join(proj.dir, '.soma', 'feedback');const fbFiles = fs.existsSync(fbDir) ? fs.readdirSync(fbDir) : [];const png = fbFiles.length === 1 ? fs.readFileSync(path.join(fbDir, fbFiles[0])) : Buffer.alloc(0);if (process.env.SMOKE_SHOTS && png.length) fs.writeFileSync(path.join(APP, 'test', 'shots', '7b-markierung-bild.png'), png); // so sieht der Agent es- check('„An Agent geben": PNG in .cadide/feedback/, so groß wie der Viewer in Gerätepixeln', /^markierung-\d{8}-\d{4}\.png$/.test(fbFiles[0] ?? '') && png.length > 2000+ check('„An Agent geben": PNG in .soma/feedback/, so groß wie der Viewer in Gerätepixeln', /^markierung-\d{8}-\d{4}\.png$/.test(fbFiles[0] ?? '') && png.length > 2000&& png.readUInt32BE(16) === px[0] && png.readUInt32BE(20) === px[1], `${fbFiles.join(',')} ${png.length > 24 ? `${png.readUInt32BE(16)}x${png.readUInt32BE(20)}` : ''}`);- await waitFor('Pfad im Terminal', (id) => window.__t.termText(id).includes('[Markierung: .cadide/feedback/markierung-'), 10000, tid).catch(() => {});- check('Pfad steht in der Eingabe des Terminals, nicht abgeschickt', (await ev((id) => window.__t.termText(id), tid)).includes(`[Markierung: .cadide/feedback/${fbFiles[0]}]`));+ await waitFor('Pfad im Terminal', (id) => window.__t.termText(id).includes('[Markierung: .soma/feedback/markierung-'), 10000, tid).catch(() => {});+ check('Pfad steht in der Eingabe des Terminals, nicht abgeschickt', (await ev((id) => window.__t.termText(id), tid)).includes(`[Markierung: .soma/feedback/${fbFiles[0]}]`));const tst = await ev(() => window.__t.toast());- check('Meldung nennt Datei und Ziel, Bauteilkarte ist zurück', tst.text.includes(`Markierung gespeichert: .cadide/feedback/${fbFiles[0]}`) && tst.text.includes('In die Eingabe von Terminal eingefügt')+ check('Meldung nennt Datei und Ziel, Bauteilkarte ist zurück', tst.text.includes(`Markierung gespeichert: .soma/feedback/${fbFiles[0]}`) && tst.text.includes('In die Eingabe von Terminal eingefügt')&& await ev(() => getComputedStyle(document.getElementById('parts')).display !== 'none'), tst.text.replace(/\s+/g, ' ').slice(0, 70));- await ev((id) => window.cadide.term.write(id, '\x03'), tid);- check('Markierung zählt nicht als ungespeicherte Änderung (nicht in Git, E11)', (await ev(() => window.cadide.project.saveState())).dirtyFiles === dirtyBefore);+ await ev((id) => window.soma.term.write(id, '\x03'), tid);+ check('Markierung zählt nicht als ungespeicherte Änderung (nicht in Git, E11)', (await ev(() => window.soma.project.saveState())).dirtyFiles === dirtyBefore);await domClick('btn-ins-mark');await waitFor('Zeichenfläche über die Übergabeleiste', () => window.__t.markup().active, 5000).catch(() => {});const viaHandoff = await ev(() => window.__t.markup().active);@@ -232,8 +232,8 @@ try {await waitFor('Auto an baut nach', () => window.__t.partCount() === 2 && window.__t.status().state === 'ok', 60000).catch(() => {});check('Auto-Build wieder an: veralteter Stand wird gleich gebaut', await ev(() => window.__t.partCount()) === 2);- // Export über das Menü (cadide export): jedes Bauteil eine Datei in exports/- const exp = await ev(() => window.cadide.build.export('stl', null));+ // Export über das Menü (soma export): jedes Bauteil eine Datei in exports/+ const exp = await ev(() => window.soma.build.export('stl', null));check('Export STL: alle Bauteile nach exports/', exp.ok && ['exports/Body.stl', 'exports/Lid.stl'].every((f) => exp.files.includes(f) && fs.existsSync(path.join(proj.dir, f))), exp.error ?? exp.files.join(','));// 7b) Ansicht: Würfel (Seite, Ecke, Ziehen), Drehpunkt per Doppelklick, Zoom zur Maus, Ansichten im Menüdiff --git a/app/test/unit.mjs b/app/test/unit.mjsindex 7e0fb51..5c813e6 100644--- a/app/test/unit.mjs+++ b/app/test/unit.mjs@@ -9,7 +9,7 @@ import { APP, checker, cleanup } from './harness.mjs';const t = checker();const { check } = t;-const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'cadide-unit-'));+const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'soma-unit-'));try {const out = path.join(tmp, 'files.mjs');@@ -45,32 +45,32 @@ try {check('inputs/ zeigt nach außen: Import wird abgelehnt, draußen landet nichts', r.files.length === 0 && fs.readdirSync(outside).length === 0, r.errors[0]?.slice(0, 70) ?? '');} else check('inputs/ als Verweis nach außen (übersprungen, Verweis nicht anlegbar)', true);- // Markierung (E16): PNG nach .cadide/feedback/, Name mit Datum und Uhrzeit, nichts wird überschrieben+ // Markierung (E16): PNG nach .soma/feedback/, Name mit Datum und Uhrzeit, nichts wird überschriebenconst png = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 1, 2, 3]);const when = new Date(2026, 8, 30, 14, 5);const f1 = saveFeedbackImage(proj, png, when), f2 = saveFeedbackImage(proj, png, when);- check('Markierung landet als markierung-JJJJMMTT-HHMM.png in .cadide/feedback/', f1.ok && f1.path === '.cadide/feedback/markierung-20260930-1405.png'+ check('Markierung landet als markierung-JJJJMMTT-HHMM.png in .soma/feedback/', f1.ok && f1.path === '.soma/feedback/markierung-20260930-1405.png'&& fs.readFileSync(path.join(proj, f1.path)).equals(Buffer.from(png)), f1.path ?? f1.error);- check('Zweite Markierung in derselben Minute: neuer Name mit -2, erste bleibt', f2.ok && f2.path === '.cadide/feedback/markierung-20260930-1405-2.png'+ check('Zweite Markierung in derselben Minute: neuer Name mit -2, erste bleibt', f2.ok && f2.path === '.soma/feedback/markierung-20260930-1405-2.png'&& fs.existsSync(path.join(proj, f1.path)), f2.path ?? f2.error);const bad = saveFeedbackImage(proj, new TextEncoder().encode('kein Bild'), when);- check('Kein PNG: abgelehnt, nichts geschrieben', !bad.ok && fs.readdirSync(path.join(proj, '.cadide', 'feedback')).length === 2, bad.error);- // .cadide als Verweis nach außen, feedback/ gibt es noch nicht: Auch der Ordner darüber zählt+ check('Kein PNG: abgelehnt, nichts geschrieben', !bad.ok && fs.readdirSync(path.join(proj, '.soma', 'feedback')).length === 2, bad.error);+ // .soma als Verweis nach außen, feedback/ gibt es noch nicht: Auch der Ordner darüber zähltconst proj3 = path.join(tmp, 'projekt3');fs.mkdirSync(proj3);let linked3 = true;- try { fs.symlinkSync(outside, path.join(proj3, '.cadide'), 'junction'); } catch { linked3 = false; }+ try { fs.symlinkSync(outside, path.join(proj3, '.soma'), 'junction'); } catch { linked3 = false; }if (linked3) {const r3 = saveFeedbackImage(proj3, png, when);- check('.cadide zeigt nach außen: Markierung abgelehnt, draußen landet nichts', !r3.ok && fs.readdirSync(outside).length === 0, r3.error?.slice(0, 70) ?? '');- } else check('.cadide als Verweis nach außen (übersprungen, Verweis nicht anlegbar)', true);+ check('.soma zeigt nach außen: Markierung abgelehnt, draußen landet nichts', !r3.ok && fs.readdirSync(outside).length === 0, r3.error?.slice(0, 70) ?? '');+ } else check('.soma als Verweis nach außen (übersprungen, Verweis nicht anlegbar)', true);// Editor: schreiben nur, wenn die Platte noch dem gelesenen Stand entspricht (der Agent schreibt an denselben Dateien)const bdir = path.join(tmp, 'sicherungen');const mp = path.join(proj, 'model.py');fs.writeFileSync(mp, 'A = 1\n');let w = writeProjectText(proj, 'model.py', 'A = 2\n', 'A = 1\n', false, bdir);- check('Editor schreibt, wenn die Platte dem gelesenen Stand entspricht', w.ok && fs.readFileSync(mp, 'utf8') === 'A = 2\n' && !fs.existsSync(`${mp}.cadide-tmp`));+ check('Editor schreibt, wenn die Platte dem gelesenen Stand entspricht', w.ok && fs.readFileSync(mp, 'utf8') === 'A = 2\n' && !fs.existsSync(`${mp}.soma-tmp`));fs.writeFileSync(mp, 'A = 3 # Agent\n');w = writeProjectText(proj, 'model.py', 'A = 4\n', 'A = 2\n', false, bdir);check('Außen geändert: Konflikt statt Überschreiben, Platte bleibt, aktueller Inhalt kommt mit', !w.ok && w.conflict && w.disk === 'A = 3 # Agent\n' && fs.readFileSync(mp, 'utf8') === 'A = 3 # Agent\n');@@ -80,13 +80,13 @@ try {fs.rmSync(mp);w = writeProjectText(proj, 'model.py', 'A = 5\n', 'A = 4\n', false, bdir);check('Außen gelöscht: Konflikt mit disk = null', !w.ok && w.conflict && w.disk === null && !fs.existsSync(mp));- const locked = ['AGENTS.md', 'CLAUDE.md', '.gitignore', 'output/model.step', 'exports/Body.stl', '.cadide/project.json', '.git/config', 'parts/../AGENTS.md'].map((r) => {+ const locked = ['AGENTS.md', 'CLAUDE.md', '.gitignore', 'output/model.step', 'exports/Body.stl', '.soma/project.json', '.git/config', 'parts/../AGENTS.md'].map((r) => {fs.mkdirSync(path.dirname(path.join(proj, r)), { recursive: true });fs.writeFileSync(path.join(proj, r), 'x');const res = writeProjectText(proj, r, 'y', 'x', true, bdir);return !res.ok && !res.conflict && fs.readFileSync(path.join(proj, r), 'utf8') === 'x';});- check('App-Dateien, Ergebnisse, .cadide und .git: Schreiben aus dem Editor abgelehnt', locked.every(Boolean), locked.join(','));+ check('App-Dateien, Ergebnisse, .soma und .git: Schreiben aus dem Editor abgelehnt', locked.every(Boolean), locked.join(','));w = writeProjectText(proj, '../draussen.py', 'x', null, true, bdir);check('Pfad außerhalb des Projekts: abgelehnt', !w.ok && !fs.existsSync(path.join(tmp, 'draussen.py')), w.error?.slice(0, 60));const b1 = backupText(bdir, 'parts/deckel.py', 'eins'), b2 = backupText(bdir, 'parts/deckel.py', 'zwei');diff --git a/app/test/versions.mjs b/app/test/versions.mjsindex 5eceafb..c348b6b 100644--- a/app/test/versions.mjs+++ b/app/test/versions.mjs@@ -11,7 +11,7 @@ import { checker, cleanup, sleep, startApp } from './harness.mjs';const t = checker();const { check } = t;-const workDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cadide-vt-'));+const workDir = fs.mkdtempSync(path.join(os.tmpdir(), 'soma-vt-'));let app;const listZip = (p) => new Promise((resolve, reject) => yauzl.open(p, { lazyEntries: true }, (e, z) => {@@ -32,7 +32,7 @@ try {const g = async (...args) => (await exec(args, dir)).stdout.trim();const modelPy = path.join(dir, 'model.py');const term = () => ev(() => window.__t.terminals.activeId);- const type = async (cmd) => { const id = await term(); await ev(([i, c]) => window.cadide.term.write(i, c + '\r'), [id, cmd]); };+ const type = async (cmd) => { const id = await term(); await ev(([i, c]) => window.soma.term.write(i, c + '\r'), [id, cmd]); };const termText = async () => ev((i) => window.__t.termText(i), await term());const zipPath = path.join(workDir, 'Testmodell.zip');const versions = () => ev(() => window.__t.versions());@@ -61,7 +61,7 @@ try {check('Commit des Agenten erscheint in der Verlaufsleiste', (await versions()).subjects.includes('Laenge auf 80'));const kinds = (await versions()).byApp;check('Leiste unterscheidet App-Stand (Start) und Agenten-Stand', kinds[0] === true && kinds[1] === false, JSON.stringify(kinds));- check('App-Commits tragen den Trailer „Erstellt-von: CAD-IDE"', (await g('log', '--format=%(trailers:key=Erstellt-von,valueonly)', 'HEAD~1')).includes('CAD-IDE'));+ check('App-Commits tragen den Trailer „Erstellt-von: SOMA"', (await g('log', '--format=%(trailers:key=Erstellt-von,valueonly)', 'HEAD~1')).includes('SOMA'));check('Commit enthält die STEP-Datei des gebauten Standes', (await g('show', '--stat', '--format=', 'HEAD')).includes('output/model.step'));// ---- 3) Speichern: Snapshot + ZIP ----@@ -73,7 +73,7 @@ try {await waitFor('gespeichert', () => window.__t.saveState() && !window.__t.saveState().unsaved && window.__t.saveState().zipPath, 60000);check('ZIP wurde geschrieben', fs.existsSync(zipPath), `${Math.round(fs.statSync(zipPath).size / 1024)} KB`);const names = await listZip(zipPath);- check('ZIP enthält Modell, .git, Projektdaten und Marker', ['model.py', '.git/HEAD', '.cadide/project.json', '.cadide/zip-info.json', 'AGENTS.md'].every((n) => names.includes(n)));+ check('ZIP enthält Modell, .git, Projektdaten und Marker', ['model.py', '.git/HEAD', '.soma/project.json', '.soma/zip-info.json', 'AGENTS.md'].every((n) => names.includes(n)));check('ZIP enthält keine Caches (GLB, Mapping, build.json, __pycache__)', !names.some((n) => /model\.glb|model\.map\.json|build\.json|__pycache__/.test(n)));await waitFor('Meldung und Name', () => window.__t.toast().text.startsWith('Gespeichert') && window.__t.project().name === 'Testmodell', 20000);check('Auto-Snapshot beim Speichern hat die Notiz gesichert', (await g('log', '-1', '--format=%s')) === 'Automatischer Snapshot beim Speichern');@@ -110,10 +110,10 @@ try {await waitFor('Zeichenfläche', () => window.__t.markup().active, 5000).catch(() => {});await domClick('btn-mark-send');const firstShort = await g('rev-parse', '--short', first);- await waitFor('Markierung im Terminal', (i) => window.__t.termText(i).includes('[Markierung: .cadide/feedback/'), 10000, await term()).catch(() => {});+ await waitFor('Markierung im Terminal', (i) => window.__t.termText(i).includes('[Markierung: .soma/feedback/'), 10000, await term()).catch(() => {});check('Markierung in der Vorschau nennt den alten Stand', (await termText()).includes(`zeigt den älteren Stand ${firstShort} "Neues Modell angelegt"]`), (await termText()).match(/\[Markierung:[^\]]*\]/)?.[0]?.slice(0, 90) ?? '');check('Nach der Markierung läuft die Vorschau weiter', !!(await versions()).previewing && await ev(() => document.getElementById('viewer').classList.contains('preview')));- await ev((i) => window.cadide.term.write(i, '\x03'), await term()); // Zeile verwerfen+ await ev((i) => window.soma.term.write(i, '\x03'), await term()); // Zeile verwerfen// ---- 5) Wiederherstellen als neuer Commit ----await app.answers([0]);@@ -129,8 +129,8 @@ try {// ---- 6) Störfall: .git verschwindet (Agent hat es gelöscht/verschoben) ----await app.domClick('btn-save');await waitFor('gespeichert nach Restore', () => !window.__t.saveState().unsaved, 60000);- check('ZIP enthält die Markierung aus .cadide/feedback/ (in Git ist sie nicht)', (await listZip(zipPath)).some((n) => /^\.cadide\/feedback\/markierung-\d{8}-\d{4}\.png$/.test(n))- && (await g('ls-files', '.cadide/feedback')) === '');+ check('ZIP enthält die Markierung aus .soma/feedback/ (in Git ist sie nicht)', (await listZip(zipPath)).some((n) => /^\.soma\/feedback\/markierung-\d{8}-\d{4}\.png$/.test(n))+ && (await g('ls-files', '.soma/feedback')) === '');fs.renameSync(path.join(dir, '.git'), path.join(dir, '.git_weg'));await waitFor('Problem gemeldet', () => window.__t.versions().problems.some((p) => p.includes('Kein Git-Verlauf')), 20000);check('Ohne .git: Verlauf meldet das Problem verständlich', (await versions()).problems[0].includes('Kein Git-Verlauf'), (await versions()).problems[0].slice(0, 50));@@ -177,7 +177,7 @@ try {// D) böse ZIP (Zip-Slip)const evil = path.join(workDir, 'boese.zip');const z = new yazl.ZipFile();- z.addBuffer(Buffer.from(JSON.stringify({ id: randomUUID() })), '.cadide/project.json');+ z.addBuffer(Buffer.from(JSON.stringify({ id: randomUUID() })), '.soma/project.json');z.addBuffer(Buffer.from('böse'), 'xx/evil.txt');z.end();const chunks = [];