Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Package native Linux and Apple Silicon bundles with a user release guide
Yuechen Li4986371397a1
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.ymlindex 44922e39..e38366f4 100644--- a/.github/workflows/dotnet.yml+++ b/.github/workflows/dotnet.yml@@ -301,9 +301,20 @@ jobs:path: artifacts/local/desktop-no-argument-smokeif-no-files-found: ignore+ release-portable:+ needs: release-build+ if: ${{ !inputs.diagnostic_run_id && !inputs.qualification_run_id && needs.release-build.result == 'success' }}+ permissions:+ contents: read+ actions: read+ uses: ./.github/workflows/portable-release.yml+ with:+ product_ref: ${{ github.sha }}+ frontend_run_id: "${{ github.run_id }}"+publish:if: ${{ !inputs.diagnostic_run_id && !inputs.qualification_run_id && (startsWith(github.ref, 'refs/tags/v') || inputs.publish == true) }}- needs: [build-test, release-build, release-smoke]+ needs: [build-test, release-build, release-smoke, release-portable]runs-on: ubuntu-latestenvironment: productionpermissions:@@ -315,6 +326,14 @@ jobs:with:name: aetheris-releasepath: release+ - uses: actions/download-artifact@v4+ with:+ pattern: portable-bundle-*+ merge-multiple: true+ path: portable+ - name: Include qualified native distributions+ shell: pwsh+ run: ./scripts/Add-PortableReleaseArtifacts.ps1 -ReleaseDirectory release -PortableDirectory portable- name: Authenticate to NuGet with trusted publishingid: nuget-loginuses: NuGet/login@v1@@ -335,8 +354,8 @@ jobs:GH_TOKEN: ${{ github.token }}RELEASE_VERSION: ${{ needs.release-build.outputs.version }}run: |- gh release create "v${RELEASE_VERSION}" --target "$GITHUB_SHA" --repo "${GITHUB_REPOSITORY}" --title "Aetheris ${RELEASE_VERSION}" --latest --notes-file docs/release/${{ needs.release-build.outputs.version }}-notes.md release/Aetheris-*.zip release/aetheris-firmament-*.vsix release/SHA256SUMS.txt release/RELEASE-INVENTORY.md release/packages/*.nupkg release/packages/public-libraries/*.nupkg || \- gh release upload "v${RELEASE_VERSION}" --repo "${GITHUB_REPOSITORY}" --clobber release/Aetheris-*.zip release/aetheris-firmament-*.vsix release/SHA256SUMS.txt release/RELEASE-INVENTORY.md release/packages/*.nupkg release/packages/public-libraries/*.nupkg+ gh release create "v${RELEASE_VERSION}" --target "$GITHUB_SHA" --repo "${GITHUB_REPOSITORY}" --title "Aetheris ${RELEASE_VERSION}" --latest --notes-file docs/release/${{ needs.release-build.outputs.version }}-notes.md release/Aetheris-*.zip release/Aetheris-*.tar.gz release/aetheris-firmament-*.vsix release/SHA256SUMS.txt release/RELEASE-INVENTORY.md release/packages/*.nupkg release/packages/public-libraries/*.nupkg || \+ gh release upload "v${RELEASE_VERSION}" --repo "${GITHUB_REPOSITORY}" --clobber release/Aetheris-*.zip release/Aetheris-*.tar.gz release/aetheris-firmament-*.vsix release/SHA256SUMS.txt release/RELEASE-INVENTORY.md release/packages/*.nupkg release/packages/public-libraries/*.nupkggh release edit "v${RELEASE_VERSION}" --repo "${GITHUB_REPOSITORY}" --latest --prerelease=false --notes-file docs/release/${{ needs.release-build.outputs.version }}-notes.mddesktop-diagnostic:diff --git a/.github/workflows/portable-release.yml b/.github/workflows/portable-release.ymlnew file mode 100644index 00000000..1efd4053--- /dev/null+++ b/.github/workflows/portable-release.yml@@ -0,0 +1,151 @@+name: Portable release bundles++on:+ pull_request:+ paths:+ - '.github/workflows/portable-release.yml'+ - 'scripts/package-portable.ps1'+ - 'scripts/Test-PortableBundle.ps1'+ - 'scripts/qualify-cadmata-browser.mts'+ - 'scripts/collect-cadmata-licenses.mts'+ - 'scripts/Add-PortableReleaseArtifacts.ps1'+ workflow_dispatch:+ inputs:+ release_tag:+ description: Existing release to extend without replacing its binaries+ type: string+ default: v2.0.0+ publish:+ description: Add the two qualified bundles and update release notes+ type: boolean+ default: false+ workflow_call:+ inputs:+ product_ref:+ required: true+ type: string+ frontend_run_id:+ required: true+ type: string++permissions:+ contents: read+ actions: read++env:+ MSBUILDDISABLENODEREUSE: '1'++jobs:+ bundle:+ strategy:+ fail-fast: false+ matrix:+ include:+ - os: ubuntu-24.04+ rid: linux-x64+ - os: macos-15+ rid: osx-arm64+ runs-on: ${{ matrix.os }}+ steps:+ - uses: actions/checkout@v4+ - uses: actions/checkout@v4+ with:+ ref: ${{ inputs.product_ref || inputs.release_tag || 'v2.0.0' }}+ path: artifacts/local/product-source+ persist-credentials: false+ - uses: actions/setup-dotnet@v4+ with:+ dotnet-version: 10.0.x+ - uses: actions/setup-node@v4+ with:+ node-version: 24+ - name: Read product version and qualified frontend+ shell: pwsh+ env:+ GH_TOKEN: ${{ github.token }}+ FRONTEND_RUN: ${{ inputs.frontend_run_id }}+ RELEASE_TAG: ${{ inputs.release_tag || 'v2.0.0' }}+ run: |+ $ErrorActionPreference = 'Stop'+ $PSNativeCommandUseErrorActionPreference = $true+ [xml]$props = Get-Content artifacts/local/product-source/Directory.Build.props+ $version = [string]$props.Project.PropertyGroup.Version+ "PRODUCT_VERSION=$version" >> $env:GITHUB_ENV+ if ($env:FRONTEND_RUN) {+ gh run download $env:FRONTEND_RUN --name aetheris-release --dir artifacts/local/reference+ } else {+ if ($env:RELEASE_TAG -ne "v$version") { throw 'Source tag and product version disagree.' }+ gh release download $env:RELEASE_TAG --pattern "Aetheris-$version-win-x64.zip" --pattern SHA256SUMS.txt --dir artifacts/local/reference+ }+ $archive = Get-Item "artifacts/local/reference/Aetheris-$version-win-x64.zip"+ $expected = Get-Content artifacts/local/reference/SHA256SUMS.txt | Where-Object { $_.EndsWith(" $($archive.Name)") }+ if ($expected -ne "$( (Get-FileHash $archive.FullName -Algorithm SHA256).Hash.ToLowerInvariant() ) $($archive.Name)") { throw 'Reference ZIP checksum failed.' }+ Expand-Archive $archive.FullName artifacts/local/reference/extracted+ - name: Build full native product+ shell: pwsh+ run: |+ $PSNativeCommandUseErrorActionPreference = $true+ dotnet restore artifacts/local/product-source/Aetheris.slnx -m:1 -nr:false+ dotnet build artifacts/local/product-source/Aetheris.slnx -c Release --no-restore -m:1 -nr:false -p:UseSharedCompilation=false+ - name: Run complete native regressions+ shell: pwsh+ run: |+ $PSNativeCommandUseErrorActionPreference = $true+ dotnet test artifacts/local/product-source/Aetheris.slnx -c Release --no-build -m:1 -- RunConfiguration.MaxCpuCount=1 xUnit.ParallelizeTestCollections=false+ - name: Package and extract native distribution+ shell: pwsh+ run: |+ $PSNativeCommandUseErrorActionPreference = $true+ ./scripts/package-portable.ps1 -Runtime '${{ matrix.rid }}' -Version $env:PRODUCT_VERSION -SourceDirectory artifacts/local/product-source -ReferenceBundleDirectory artifacts/local/reference/extracted/Aetheris-win-x64 -OutputDirectory artifacts/local/portable+ New-Item -ItemType Directory artifacts/local/extracted | Out-Null+ tar -xzf "artifacts/local/portable/Aetheris-$env:PRODUCT_VERSION-${{ matrix.rid }}.tar.gz" -C artifacts/local/extracted+ ./scripts/Test-PortableBundle.ps1 -BundleDirectory 'artifacts/local/extracted/Aetheris-${{ matrix.rid }}' -SourceDirectory artifacts/local/product-source -OutputDirectory artifacts/local/native-smoke+ - name: Exercise packaged browser viewer+ shell: pwsh+ run: |+ $PSNativeCommandUseErrorActionPreference = $true+ npm ci --prefix test-support/CadmataDesktopSmoke --ignore-scripts+ node test-support/CadmataDesktopSmoke/node_modules/playwright-core/cli.js install --with-deps chromium+ node scripts/qualify-cadmata-browser.mts 'artifacts/local/extracted/Aetheris-${{ matrix.rid }}' artifacts/local/browser-smoke test-support/CadmataDesktopSmoke/node_modules/playwright-core/index.mjs artifacts/local/native-smoke/hole.step+ - uses: actions/upload-artifact@v4+ with:+ name: portable-bundle-${{ matrix.rid }}+ path: artifacts/local/portable+ if-no-files-found: error+ - uses: actions/upload-artifact@v4+ if: always()+ with:+ name: portable-evidence-${{ matrix.rid }}+ path: |+ artifacts/local/native-smoke+ artifacts/local/browser-smoke+ if-no-files-found: ignore++ publish-additional-bundles:+ if: ${{ github.event_name == 'workflow_dispatch' && inputs.publish == true }}+ needs: bundle+ runs-on: ubuntu-latest+ environment: production+ permissions:+ contents: write+ actions: read+ steps:+ - uses: actions/checkout@v4+ - uses: actions/download-artifact@v4+ with:+ pattern: portable-bundle-*+ merge-multiple: true+ path: portable+ - name: Preserve published binaries and add native bundles+ shell: pwsh+ env:+ GH_TOKEN: ${{ github.token }}+ RELEASE_TAG: ${{ inputs.release_tag }}+ run: |+ $PSNativeCommandUseErrorActionPreference = $true+ gh release download $env:RELEASE_TAG --dir release+ ./scripts/Add-PortableReleaseArtifacts.ps1 -ReleaseDirectory release -PortableDirectory portable+ $archives = @(Get-ChildItem release/*.tar.gz | ForEach-Object FullName)+ gh release upload $env:RELEASE_TAG @archives release/SHA256SUMS.txt release/RELEASE-INVENTORY.md --clobber+ $version = $env:RELEASE_TAG.TrimStart('v')+ gh release edit $env:RELEASE_TAG --notes-file "docs/release/$version-notes.md"diff --git a/docs/public/README.md b/docs/public/README.mdindex 5dc9a78c..0db3a52c 100644--- a/docs/public/README.md+++ b/docs/public/README.md@@ -13,7 +13,7 @@ system got here.## Start here1. [Getting started](getting-started.md): install the CLI and build a first part.- With the Windows release ZIP, start from the [bundle walkthrough](release-bundle.md).+ With a release bundle, start from the [bundle walkthrough](release-bundle.md).2. [Learn Firmament](learn/README.md): six short lessons, from a plate with ahole to a two-part assembly. Every example builds in CI.3. [Language reference](reference/language/README.md): every construct, itsdiff --git a/docs/public/getting-started.md b/docs/public/getting-started.mdindex 613f85d4..d5b4b8fc 100644--- a/docs/public/getting-started.md+++ b/docs/public/getting-started.md@@ -1,13 +1,13 @@# Getting Started-Aetheris 2.0.0 qualifies the managed CLI on Windows x64 and Linux x64. Install the .NET global tool with the .NET 10 SDK, or run the CLI from a source checkout:+Start with a self-contained [bundle](release-bundle.md) for Windows x64, Linux x64 or macOS Apple Silicon. It includes the compiler, Cadmata viewer, examples and runtime. If you only need the CLI, install the .NET global tool with the .NET 10 SDK:```powershelldotnet tool install --global Aetheris.CLI --version 2.0.0aetheris --help```-The release ZIP is the complete product path: run the commands below from its `Aetheris-win-x64` directory and use `.\aetheris.exe` in place of `aetheris`. It also supplies the `fixtures` used below and Cadmata for the final `view` command. For a source checkout, replace `aetheris` with `dotnet run --project Aetheris.CLI -c Release --`.+In a bundle, run the commands below from the extracted directory and use `.\aetheris.exe` (Windows) or `./aetheris` (Linux/macOS) in place of `aetheris`. The bundle supplies the `fixtures` used below and Cadmata for the final `view` command. For a source checkout, replace `aetheris` with `dotnet run --project Aetheris.CLI -c Release --`.## Build a first part@@ -21,7 +21,7 @@ aetheris analyze artifacts/local/first-part.step --jsonNormal `validate` checks syntax, binding, units, targets and capability admission, including the engineering preflight required by the domain. It can construct geometry in memory; it does not write a build artifact. A successful validation exits zero and reports `firmamentV2Validation.status: "valid"` with its validation level. `--parse-only` is a limited check and does not prove build admission. `build` writes the real geometry and AP242 artifact; its JSON includes `success`, output path, diagnostics, feature reports, and `pmiExportEvidence` describing what was actually emitted. `analyze` independently reinspects topology and semantic PMI.-Use `aetheris view ...` to open Firmament or STEP in Cadmata when using the Windows bundle.+Use `aetheris view ...` to open Firmament or STEP in Cadmata when using a bundle.## Build the canonical ordinary-CAD examplediff --git a/docs/public/reference/known-issues.md b/docs/public/reference/known-issues.mdindex eaa3b829..d74f0bb0 100644--- a/docs/public/reference/known-issues.md+++ b/docs/public/reference/known-issues.md@@ -1,6 +1,6 @@# Aetheris 2.0.0 known issues and limitations-- The managed CLI is qualified on Windows x64 and Linux x64. The self-contained desktop ZIP targets Windows x64; macOS is not qualified.+- Bundles target Windows x64, Linux x64 (glibc) and macOS arm64 (Apple Silicon). The macOS bundle is not Developer ID signed or notarized. Intel Macs, Linux arm64 and Alpine/musl have no qualified bundle. See the [launch guide](../release-bundle.md) for requirements.- `inlineSTEP` FEA supports the documented single-body imported class and stable imported face identities. Arbitrary imported containment and multi-root assembly-like STEP are rejected explicitly; some OCCT B-spline containment cases remain outside the qualified class.- The generic tessellated mass verifier can report `Unavailable` for some valid combined analytic Boss/Pocket/hole models when a face cannot be triangulated. STEP reimport, manifold checks, analytic surface inventory, bounds, and route-specific analytic volume remain available; do not interpret an unavailable tessellation estimate as a topology failure.- Composed profiles admit bounded +Z through counterbore/countersink entries with complete disjoint footprints and positive shaft length. Oriented Compose hole adapters, entry breakouts and chamfer corridors crossing a cavity transition remain explicitly rejected. Sheet Metal Counterbore and Countersink are rejected because those formed-opening semantics are not implemented.diff --git a/docs/public/reference/supported-features.md b/docs/public/reference/supported-features.mdindex 0176e94c..15bf456a 100644--- a/docs/public/reference/supported-features.md+++ b/docs/public/reference/supported-features.md@@ -1,8 +1,8 @@-# Preview 3 supported features+# Aetheris supported features-`Supported` means a qualified public path. `Bounded` means the documented subset is production-tested. `Experimental` is usable evidence without a general product promise. `Not in Preview 3` is intentionally deferred.+`Supported` means a qualified public path. `Bounded` means the documented subset is production-tested. `Experimental` is usable evidence without a general product promise. `Not supported` is intentionally deferred.-| Area | Status | Preview 3 boundary |+| Area | Status | Boundary ||---|---|---|| Firmament V2 native primitives/profiles | Bounded | Named Box/Cylinder/Frustum/RoundedBox, exact Ellipsoid, regular Polyhedron<4/6/8/12/20>, and admitted line/arc profile construction/composition || Drawing generation | Bounded | Complete nominal PDF/SVG/editable PPTX for rectangular plates/boxes with disjoint Z-through holes: stock/thickness dimensions, coordinate schedule and grouped limits. Explicit reference-only mode for incomplete PMI views; no process-capability or manufacturing-release claim. Authored Assembly drawings remain available. See [drawings](../drawings.md). |@@ -43,12 +43,11 @@| Forge Protocol v1 | Supported | List/describe/invoke embedded public templates; process JSON and file artifacts || Cadmata | Bounded | Geometry inspection, selection, semantic PMI presentation and filtering || Assemblies | Bounded | Typed Firmament assembly inspection plus explicitly identified legacy `.firmasm` compatibility |-| Platform qualification | Supported | Windows x64 bundle; NativeAOT Forge Host on `win-x64` |-| Linux/macOS release binaries | Not in Preview 3 | Framework logic tests do not constitute binary qualification |-| Post-Preview-3 feature families | Exception | Circular Sweep, Formed Wire, and Standard Products Paperclip are bounded additions; other new geometry/PMI/FEA/Forge families remain frozen |-| General smooth/rail/topology-changing loft and freeform surface features | Not in Preview 3 | The bounded two-section lofts, G1 SectionChains, and WireForm `Helix` do not qualify arbitrary smooth loft, guide rails, topology-changing correspondence, arbitrary dumb-solid editing, G2 continuity, or surface networks. |+| Platform qualification | Supported | Self-contained CLI, browser viewer and NativeAOT Forge Host on Windows x64, Linux x64 (glibc) and macOS arm64; optional dedicated window on Windows |+| Other platform binaries | Not supported | No Intel macOS, Linux arm64 or Alpine/musl bundle |+| General smooth/rail/topology-changing loft and freeform surface features | Not supported | The bounded two-section lofts, G1 SectionChains, and WireForm `Helix` do not qualify arbitrary smooth loft, guide rails, topology-changing correspondence, arbitrary dumb-solid editing, G2 continuity, or surface networks. || Through profile removal | Bounded semantic operations | Use qualified `Hole`, `Slot`, explicit `Pocket { end: ThroughAll }`, or `Remove` with `role: ThroughCut`; depth-based Pocket must leave its admitted floor |-| Arbitrary solid Boolean subtraction / hemispherical cavity | Not in Preview 3 | No public `Union`, `Subtract`, `Intersect`, CSG tree, Sphere-from-Block subtraction, or hemisphere special case |+| Arbitrary solid Boolean subtraction / hemispherical cavity | Not supported | No public `Union`, `Subtract`, `Intersect`, CSG tree, Sphere-from-Block subtraction, or hemisphere special case |## Template capability matrix@@ -64,8 +63,8 @@| Materials | Bounded by consuming domain | semantic identity can flow through existing Firmament/Forge paths; no SQLite or catalog queries in Templates || Sheet Metal product families | Supported | five embedded public families and Forge Protocol v1 exposure || Nested Templates | Bounded | acyclic concrete specialization only; Templates are not values |-| Recursive or higher-order metaprogramming | Not in Preview 3 | cycles are rejected; Template parameters are unsupported |-| Direct array/Table parameters | Not in Preview 3 | select/derive a finite Record or use bounded feature Pattern data |+| Recursive or higher-order metaprogramming | Not supported | cycles are rejected; Template parameters are unsupported |+| Direct array/Table parameters | Not supported | select/derive a finite Record or use bounded feature Pattern data || FEA specialization | Bounded by concrete Model output | an admitted specialized Model can contain existing Analysis; no generic Analysis output family || PMI specialization | Bounded by existing concrete semantics | specialized dimensions can feed existing PMI; no new PMI kinds || Forge introspection | Supported | stable ID plus generic display signature, categories, units, defaults, enum cases, Record fields, constraints, output kind, artifacts |diff --git a/docs/public/release-bundle.md b/docs/public/release-bundle.mdindex 4675b04b..c3142c47 100644--- a/docs/public/release-bundle.md+++ b/docs/public/release-bundle.md@@ -1,31 +1,69 @@-# Aetheris Windows bundle--This bundle is the `win-x64` product distribution. Run commands from the `Aetheris-win-x64` directory.--Double-click `Cadmata.exe` to open Cadmata in your existing default browser.-It starts a local service on a temporary loopback port. Close the server console-or press Ctrl+C there to stop it; closing the browser tab alone does not end the-session. `Cadmata.exe --no-browser --urls http://127.0.0.1:5090` is the explicit-headless entry point.--`Cadmata.Desktop.exe` is the optional dedicated Windows window. It uses the-shared Evergreen WebView2 Runtime and owns its server lifetime. Normal browser-mode does not need WebView2. The normal ZIP includes no browser engine, and-neither launcher installs one automatically. Both share the CAD and .NET-libraries in the bundle. See [Cadmata launch and runtime requirements](cadmata/portable-windows.md).--```powershell-.\aetheris.exe --help-.\aetheris.exe validate .\fixtures\Canonical\PMI\hole-diameter-and-datum.firmament --json-.\aetheris.exe build .\fixtures\Canonical\PMI\hole-diameter-and-datum.firmament --output .\out\first-part.step --json-.\aetheris.exe analyze .\out\first-part.step --json-.\aetheris.exe view .\out\first-part.step-.\forge-host\Aetheris.Forge.Host.exe info-.\forge-host\Aetheris.Forge.Host.exe list+# Aetheris bundles++Download a bundle to use the CAD compiler and Cadmata viewer without installing+.NET, Node.js or a development environment. Your designs stay on your computer.++| System | Archive | Viewer |+| --- | --- | --- |+| Windows x64 | `Aetheris-2.0.0-win-x64.zip` | Double-click `Cadmata.exe` |+| Linux x64 (Intel/AMD, glibc) | `Aetheris-2.0.0-linux-x64.tar.gz` | Run `./Cadmata` in the extracted folder |+| macOS arm64 (Apple Silicon) | `Aetheris-2.0.0-osx-arm64.tar.gz` | Open `Open Cadmata.command`, or run `./Cadmata` in Terminal |++Get the archives from [Releases](https://github.com/yuechen-li-dev/Aetheris/releases/tag/v2.0.0).+Extract the entire archive into a fresh local folder. Preserve executable+permissions when extracting the Linux/macOS tar archive. You can use+`tar -xzf Aetheris-2.0.0-linux-x64.tar.gz` (substitute the macOS filename on a Mac).++Cadmata opens in your existing default browser. Choose a STEP file, click+**Import STEP 242**, then orbit, select or measure the part. Use **Product Gallery**+to generate an example. A blank workspace on startup is intentional.++Keep the launcher terminal open while using the viewer. Press **Ctrl+C** there+to stop the local service. Closing the browser tab alone does not stop it.+The service uses a temporary loopback port, and the normal launcher establishes+a local session cookie. No browser engine is bundled or installed.++## Compile a part++Run these commands from the extracted directory on Linux or macOS:++```sh+./aetheris build fixtures/Canonical/PMI/hole-diameter-and-datum.firmament --output first-part.step+./aetheris analyze first-part.step --json+./aetheris view first-part.step+./forge-host/Aetheris.Forge.Host list```-The complete public guide is under `docs/public`, executable Firmament examples are under `fixtures`, and foreign-language Forge clients are under `samples/forge-interop-x1`. The default material catalog is embedded in the managed libraries.+On Windows PowerShell, use `.\aetheris.exe` and+`.\forge-host\Aetheris.Forge.Host.exe` instead of the Unix executable paths.+The example produces a plate with a hole, datum and toleranced hole diameter.+See [Getting started](getting-started.md) and [Learn Firmament](learn/README.md).++The bundle includes a local copy of this guide under `docs/public`, source+examples under `fixtures`, and Forge client examples under `samples`.+Verify binary downloads against the release's `SHA256SUMS.txt`.+The CLI-only NuGet tool and C# libraries are separate downloads; installing+`Aetheris.CLI` alone does not install the viewer.++## Requirements and limits-The ZIP is the complete end-user distribution. The `Aetheris.CLI` tool package, its dependency-closed public library set, and `aetheris-firmament-0.3.0-preview.3.vsix` are published as separate release assets rather than duplicated inside the runtime tree. Verify downloaded binary assets against the release's `SHA256SUMS.txt`.+- A modern browser with hardware acceleration is recommended. Cadmata uses WebGPU+ when available and an identified WebGL fallback otherwise. Initialization or+ device failures appear as diagnostics.+- Linux targets **x86-64 glibc** distributions supported by .NET 10, such as+ Ubuntu 24.04 or newer. Alpine/musl is not supported by this archive. The normal+ browser launch needs a graphical desktop and a working `xdg-open`.+- macOS targets **Apple Silicon** with macOS 15 or newer. Intel Macs have no bundle.+ The download is not Developer ID signed or notarized. If macOS blocks it,+ verify its checksum and use the per-app **Open Anyway** option under+ **System Settings → Privacy & Security**. Do not disable Gatekeeper globally.+- Windows also supplies an optional dedicated `Cadmata.Desktop.exe` window using+ shared Evergreen WebView2. See [Windows launch options](cadmata/portable-windows.md).+- To run an explicitly addressed server without launching a browser, use+ `./Cadmata --no-browser --urls http://127.0.0.1:5090` (`.\Cadmata.exe` on Windows).+ This explicit mode does not create the normal launcher's session cookie; keep+ it on loopback and do not expose it as an authenticated multi-user service.-Cadmata and the NativeAOT Forge Host are included. The standalone CLI NuGet tool does not include Cadmata. The desktop bundle targets Windows x64; the managed CLI also runs on Linux x64. Aetheris supports bounded geometry, Sheet Metal, PMI, FEA, and STEP-import classes; read `docs/public/reference/supported-features.md` and `docs/public/reference/known-issues.md` before relying on a boundary case.+The compiler supports documented feature combinations, not arbitrary CAD edits.+Read [Supported features](reference/supported-features.md) and+[Known issues](reference/known-issues.md) for modeling boundaries.diff --git a/docs/release/2.0.0-notes.md b/docs/release/2.0.0-notes.mdindex bd485944..9c845a7f 100644--- a/docs/release/2.0.0-notes.md+++ b/docs/release/2.0.0-notes.md@@ -1,65 +1,97 @@# Aetheris 2.0.0-Aetheris compiles Firmament source into engineering artifacts. Source can be-reviewed in Git and built in CI; the same compiler supplies validation and-structured diagnostics to the CLI, SDK and CAD application.--## Installation and artifacts--- Install the managed tool with `dotnet tool install --global Aetheris.CLI --version 2.0.0` using .NET 10.-- Windows x64 has a self-contained ZIP including browser-first Cadmata and the NativeAOT Forge Host. `Cadmata.exe` opens your existing browser; the optional `Cadmata.Desktop.exe` uses shared Evergreen WebView2. The normal ZIP contains no private Chromium/WebView2 runtime and installs none automatically.-- The portable CLI package is qualified on Windows x64 and Linux x64. Other platforms are not claimed as qualified by this release.-- The public library package set includes its complete Aetheris project dependency closure. Copeland's managed VTS/WGSL compiler family is pinned to public version 0.1.0; no sibling checkout or private feed is required.-- Verify artifacts against SHA256SUMS.txt and RELEASE-INVENTORY.md. Forge protocol and VS Code extension versions are independent of the product version.--The core CLI carries no third-party OS-native geometry, SQLite, PDFium, Skia or-Rhino runtime. PDF drawing generation remains managed. Drawing Notes use pinned-PDF.js browser assets. SQLite material storage and 3DM interoperability are-optional adapters; the latter has its own command-line tool.--## CAD inspection and interchange--Cadmata starts with a blank workspace, supports exact standard views including-top and bottom, and keeps generated product filenames for STEP downloads.-Viewport and form controls align across desktop and narrow layouts; Measure-uses the application's engineering palette. Nonfatal import diagnostics are-summarized in the UI, with full messages available in downloadable logs.--Straight/Bend WireForm STEP exports preserve analytic cylinders, toroidal-bends and circular edges with corrected boundary winding. Import derives exact-linear UV trims for their cylinder/torus rings and seams instead of fitting-redundant B-splines. Existing source-supplied trim curves remain preserved.--## Frontend integrity--Validation and build share command-level domain selection. Native V2 `model`-is a case alias for `Model`; the existing serialized and `solid`-grammar legacy-boundaries remain explicit. Unknown fields reject at their owning readers,-including assembly occurrences and Semantic publications, WireForm operations,-SectionChain construction guides, semantic requirements and projected PMI.-Wrong-dimensional profile coordinates reject instead of silently becoming-millimetres. Diagnostics retain codes and messages through the CLI JSON contract.--This release preserves the existing bounded geometry capabilities. Unsupported-operations remain errors; it does not promise arbitrary BRep booleans, general-edge blending or unrestricted STEP surgery. Assembly exports include assembly-PMI explicitly authored at assembly scope; part PMI is not implicitly promoted.-See [supported features](../public/reference/supported-features.md) and-[known issues](../public/reference/known-issues.md).--## Experimental APIs--Cloth3D, Humanoid and experimental module APIs are included at the product-version so the published graph restores completely. Their behavior remains-experimental, as documented under docs/public/experimental; a package version-is not a claim that those workflows are production-qualified. Fields and-PlasticShell retain their documented bounded capability contracts.--## Validation cost and limits--Normal validation performs the preflight required by its domain. Swept and-B-spline-heavy models can take seconds; orientation and interchange safety-checks have not been removed to improve timing. Parse-only validation is-explicitly limited and does not prove engineering build success. Original-source-mapping after expansion is still incomplete; diagnostics disclose enclosing-locations when exact provenance is unavailable.+Aetheris is a code-first CAD kernel with a browser-based viewer. Describe a+parametric part or assembly in **Firmament**, build an exact 3D model, and export+STEP files for other CAD tools or manufacturing. Keep the design in Git, review+changes in a pull request, and generate your engineering artifacts in CI.++**Cadmata**, the included viewer, lets you inspect STEP models, select faces and+edges, measure geometry, and view dimensions and tolerances. It runs locally in+your existing browser. You do not need another browser installation or a cloud+service.++## Download and start++Choose your bundle from the assets below. Each includes the compiler, Cadmata,+examples, documentation and the .NET runtime. No SDK, Node.js or checkout is needed.++| Computer | Download | Start the viewer |+| --- | --- | --- |+| Windows, Intel/AMD 64-bit | `Aetheris-2.0.0-win-x64.zip` | Extract, then double-click `Cadmata.exe` |+| Linux, Intel/AMD 64-bit | `Aetheris-2.0.0-linux-x64.tar.gz` | Extract, open the folder in a terminal, run `./Cadmata` |+| macOS, Apple Silicon (M-series) | `Aetheris-2.0.0-osx-arm64.tar.gz` | Extract, then open `Open Cadmata.command` or run `./Cadmata` in Terminal |++Choose a `.step` or `.stp` file in Cadmata and click **Import STEP 242**.+Drag to orbit, choose a standard view, or use **Measure** to inspect your model.+Try the product gallery to start with an included example.++Keep the launcher terminal open while using Cadmata. Press **Ctrl+C** there to+stop the local service; closing the browser tab alone does not stop it.+Windows also includes an optional `Cadmata.Desktop.exe` window using shared WebView2.++The macOS download is not notarized. If blocked, verify the download and use the+per-app **Open Anyway** control in **System Settings → Privacy & Security**.+See the [bundle guide](https://github.com/yuechen-li-dev/Aetheris/blob/master/docs/public/release-bundle.md)+for platform requirements and launch instructions.++## Build your first part++From the extracted bundle directory:++```sh+./aetheris build fixtures/Canonical/PMI/hole-diameter-and-datum.firmament --output first-part.step+./aetheris view first-part.step+```++On Windows PowerShell, use `.\aetheris.exe` instead of `./aetheris`.+This example makes a plate with a through hole, a datum and a toleranced diameter.+Change the dimensions in its `.firmament` file and rebuild.+[Learn Firmament](https://github.com/yuechen-li-dev/Aetheris/blob/master/docs/public/learn/README.md)+walks through parts, reusable designs and assemblies.++Already have .NET 10? Install just the CLI with+`dotnet tool install --global Aetheris.CLI --version 2.0.0`.+The CLI-only NuGet package does **not** include Cadmata. C# developers can also+use the Aetheris libraries directly from NuGet.++## Feature summary++- **Parametric parts:** primitives, profiles, extrusions, supported revolves and+ sweeps, holes, slots, pockets, fillets and chamfers.+- **Reusable designs:** typed parameters, templates, records and patterns for+ families of parts.+- **Assemblies:** parts and subassemblies connected through named interfaces,+ reference geometry and supported mates.+- **Manufacturing information:** sheet metal and flat patterns; dimensions,+ datums, tolerances and semantic PMI in STEP AP242.+- **STEP inspection and bounded editing:** import existing parts, measure them,+ inspect their topology and PMI, and revise supported recognized through holes.+- **Deliverables:** STEP, meshes including glTF/STL, and PDF/SVG/PPTX drawings+ for supported drawing classes. Export availability depends on the model and+ command; not every output is a Cadmata menu item.+- **Automation:** validation, builds, inspections and bounded structural analyses+ from scripts or CI, with structured diagnostics.++See the [feature guide](https://github.com/yuechen-li-dev/Aetheris/blob/master/docs/public/reference/supported-features.md)+for supported combinations and examples.++## Known issues++- Geometry operations support documented combinations, not arbitrary booleans,+ general edge blending or unrestricted imported-body editing.+- Automatic drawings cover specific part families. Review dimensions, datums,+ tolerances and process capability before sending a drawing to a shop.+- Some imported models are inspectable but cannot be fully edited, measured or+ re-exported. Import reports disclose limitations; original files are unchanged.+- Some valid models have no tessellated volume estimate. That alone does not mean+ their exact STEP geometry is invalid.+- Complex swept or spline-heavy validation can take seconds. Diagnostics after+ expansion sometimes identify the enclosing construct rather than the original token.+- Use a modern browser with hardware acceleration; WebGL fallback is available. Linux targets glibc, not Alpine/musl.+ Intel Macs and Linux arm64 do not have a qualified bundle in this release.+- Cloth and humanoid APIs remain experimental. Structural analysis is bounded+ linear elasticity, not general simulation or certification.++[Detailed limitations](https://github.com/yuechen-li-dev/Aetheris/blob/master/docs/public/reference/known-issues.md)+are documented separately. Aetheris is **AGPL-3.0-only**; dependency notices and+corresponding-source links are included in the bundles.diff --git a/scripts/Add-PortableReleaseArtifacts.ps1 b/scripts/Add-PortableReleaseArtifacts.ps1new file mode 100644index 00000000..ef66c864--- /dev/null+++ b/scripts/Add-PortableReleaseArtifacts.ps1@@ -0,0 +1,37 @@+param(+ [Parameter(Mandatory)][string]$ReleaseDirectory,+ [Parameter(Mandatory)][string]$PortableDirectory+)+$ErrorActionPreference = 'Stop'+$release = (Resolve-Path -LiteralPath $ReleaseDirectory).Path+$portable = (Resolve-Path -LiteralPath $PortableDirectory).Path+$lines = @(Get-Content (Join-Path $release 'SHA256SUMS.txt'))+$archives = @(Get-ChildItem -LiteralPath $portable -Recurse -Filter '*.tar.gz' -File)+if ($archives.Count -ne 2) { throw 'Expected Linux x64 and macOS arm64 archives.' }+foreach ($line in $lines) {+ if ($line -notmatch '^([0-9a-f]{64}) (.+)$') { throw "Invalid existing checksum: $line" }+ $expected = $Matches[1]; $relative = $Matches[2]+ $file = Join-Path $release $relative+ if (-not (Test-Path -LiteralPath $file)) { $file = Join-Path $release ([IO.Path]::GetFileName($relative)) }+ if ((Get-FileHash -LiteralPath $file -Algorithm SHA256).Hash.ToLowerInvariant() -ne $expected) { throw "Existing release checksum failed: $relative" }+}+$rows = @()+foreach ($archive in $archives) {+ if ($archive.Name -notmatch '^Aetheris-[0-9][\w.-]+-(linux-x64|osx-arm64)\.tar\.gz$') { throw "Unexpected portable asset: $($archive.Name)" }+ $rid = $Matches[1]+ $hash = (Get-FileHash -LiteralPath $archive.FullName -Algorithm SHA256).Hash.ToLowerInvariant()+ $receipt = Join-Path $archive.DirectoryName "SHA256SUMS-$rid.txt"+ if ((Get-Content -LiteralPath $receipt -Raw).Trim() -ne "$hash $($archive.Name)") { throw "Portable receipt mismatch: $rid" }+ $destination = Join-Path $release $archive.Name+ if (Test-Path -LiteralPath $destination) {+ if ((Get-FileHash -LiteralPath $destination -Algorithm SHA256).Hash -ne $hash) { throw "Refusing to replace published binary: $($archive.Name)" }+ } else { Copy-Item -LiteralPath $archive.FullName -Destination $destination }+ if (-not ($lines | Where-Object { $_ -eq "$hash $($archive.Name)" })) { $lines += "$hash $($archive.Name)" }+ $rows += "| ``$($archive.Name)`` | $($archive.Length) | ``$hash`` |"+}+$lines | Set-Content (Join-Path $release 'SHA256SUMS.txt') -Encoding utf8NoBOM+$inventory = Get-Content (Join-Path $release 'RELEASE-INVENTORY.md')+$table = @($inventory | Where-Object { $_.StartsWith('|') -and $_ -notmatch 'Aetheris-.+-(linux-x64|osx-arm64)\.tar\.gz' })+@('# Aetheris release inventory', '', 'SHA-256 checksums of the published binaries.', '', $table, $rows, '',+ 'Bundles: Windows x64, Linux x64 (glibc), macOS arm64 (Apple Silicon). Each includes the CLI, browser viewer, examples and native Forge Host.') |+ ForEach-Object { $_ } | Set-Content (Join-Path $release 'RELEASE-INVENTORY.md') -Encoding utf8NoBOMdiff --git a/scripts/Test-PortableBundle.ps1 b/scripts/Test-PortableBundle.ps1new file mode 100644index 00000000..9a4ef53e--- /dev/null+++ b/scripts/Test-PortableBundle.ps1@@ -0,0 +1,36 @@+param(+ [Parameter(Mandatory)][string]$BundleDirectory,+ [Parameter(Mandatory)][string]$SourceDirectory,+ [Parameter(Mandatory)][string]$OutputDirectory+)+$ErrorActionPreference = 'Stop'+$PSNativeCommandUseErrorActionPreference = $true+$bundle = (Resolve-Path -LiteralPath $BundleDirectory).Path+$source = (Resolve-Path -LiteralPath $SourceDirectory).Path+$output = [IO.Path]::GetFullPath($OutputDirectory)+New-Item -ItemType Directory -Path $output | Out-Null+$cli = Join-Path $bundle 'aetheris'+$metadata = Get-Content (Join-Path $bundle 'BUILD-METADATA.json') -Raw | ConvertFrom-Json+if ($metadata.modifiedSource -or $metadata.defaultPresentation -ne 'Browser') { throw 'Invalid portable source/presentation metadata.' }+if ((Test-Path (Join-Path $bundle 'webview2')) -or (Test-Path (Join-Path $bundle 'cadmata'))) { throw 'Private browser/duplicated server in portable bundle.' }+$env:DOTNET_ROOT = Join-Path $output 'no-installed-dotnet'+& $cli --version+Copy-Item (Join-Path $source 'fixtures/Canonical/Features/Holes/through-hole.firmament') (Join-Path $output 'hole.firmament')+$validation = & $cli validate (Join-Path $output 'hole.firmament') --json | ConvertFrom-Json+if ($validation.firmamentV2Validation.status -ne 'valid' -or @($validation.firmamentV2Validation.diagnostics).Count) { throw 'Canonical hole must validate without diagnostics.' }+& $cli build (Join-Path $output 'hole.firmament') --output (Join-Path $output 'hole.step') --json+& $cli verify (Join-Path $output 'hole.firmament') --json+& $cli build (Join-Path $source 'fixtures/Canonical/WireForm/paperclip.firmament') --output (Join-Path $output 'paperclip.step') --json+& $cli canon (Join-Path $output 'paperclip.step') --out (Join-Path $output 'paperclip-roundtrip.step') --json+$paperclip = Join-Path $output 'paperclip-roundtrip.step'+if (Select-String -LiteralPath $paperclip -SimpleMatch 'B_SPLINE' -Quiet) { throw 'Analytic paperclip acquired spline entities.' }+$paperclipHash = (Get-FileHash -LiteralPath $paperclip -Algorithm SHA256).Hash.ToLowerInvariant()+if ($paperclipHash -ne '82cf4b33274646807dfdb139728030959f36673d0c0a34ff99777be59a329a2c') { throw "Published Windows paperclip geometry parity failed: $paperclipHash" }+& $cli drawing compile (Join-Path $source 'fixtures/Canonical/Drawings/bearing-block-production-drawing.firmament') --out-dir (Join-Path $output 'drawing') --json+if (-not (Test-Path (Join-Path $output 'drawing/*.pdf')) -or -not (Test-Path (Join-Path $output 'drawing/*.pptx'))) { throw 'PDF/PPTX drawing outputs missing.' }+$forge = Join-Path $bundle 'forge-host/Aetheris.Forge.Host'+& $forge info+& $forge list+& (Join-Path $PSScriptRoot 'Test-ForgeHostTemplates.ps1') -ExecutablePath $forge -OutputDirectory (Join-Path $output 'forge')+@{ runtime=$metadata.runtime; sourceRevision=$metadata.sourceRevision; selfContained=$true; canonicalHoleDiagnostics=0;+ paperclipSha256=$paperclipHash; drawing=$true; nativeForge=$true } | ConvertTo-Json | Set-Content (Join-Path $output 'qualification.json')diff --git a/scripts/collect-cadmata-licenses.mts b/scripts/collect-cadmata-licenses.mtsindex 861fc0ca..b34e4d25 100644--- a/scripts/collect-cadmata-licenses.mts+++ b/scripts/collect-cadmata-licenses.mts@@ -1,8 +1,8 @@-import { readFile, readdir, mkdir, copyFile, writeFile, realpath } from "node:fs/promises";+import { readFile, readdir, mkdir, copyFile, writeFile, realpath, cp } from "node:fs/promises";import { join, resolve } from "node:path";import { createRequire } from "node:module";import { createHash } from "node:crypto";-const [root, stage, assetsPath] = process.argv.slice(2).map(path => resolve(path));+const [root, stage, assetsPath, frontendNotices] = process.argv.slice(2).map(path => resolve(path));const output = join(stage, "licenses");await mkdir(output, { recursive: true });const notices: string[] = [];@@ -67,11 +67,30 @@ async function visit(directory: string, includeOwnNotice = true) {}}}-await visit(join(root, "aetheris.client"), false);-await visit(join(root, "Aetheris.Web.Runtime/telos"));-for (const identity of bundled) {- if (!auditedFrontend.has(identity) && !identity.startsWith("@aetheris/"))- unresolved.push(identity + ": emitted frontend package was not found in the notice dependency graph");+if (frontendNotices) {+ // Native bundles reuse the exact qualified frontend, not a second frontend+ // build. Carry its audited frontend notices, then audit this RID's own NuGet+ // graph below. Do not inherit Windows runtime/WebView2 package notices.+ const audit = JSON.parse(await readFile(join(frontendNotices, "AUDIT.json"), "utf8"));+ if (!audit.redistributionNoticesComplete) throw new Error("Reference frontend notices are incomplete");+ assertSameInventory(await readFile(join(frontendNotices, "../wwwroot/bundled-packages.json")));+ for (const item of await readdir(frontendNotices, { withFileTypes: true })) {+ if (!item.isDirectory() || item.name.startsWith("nuget-")) continue;+ await cp(join(frontendNotices, item.name), join(output, item.name), { recursive: true });+ }+ const inherited = (await readFile(join(frontendNotices, "INDEX.txt"), "utf8")).split("\n");+ notices.push(...inherited.filter(line => line && !line.startsWith("nuget-")));+} else {+ await visit(join(root, "aetheris.client"), false);+ await visit(join(root, "Aetheris.Web.Runtime/telos"));+ for (const identity of bundled) {+ if (!auditedFrontend.has(identity) && !identity.startsWith("@aetheris/"))+ unresolved.push(identity + ": emitted frontend package was not found in the notice dependency graph");+ }+}+function assertSameInventory(reference: Buffer) {+ if (JSON.stringify(JSON.parse(reference.toString("utf8"))) !== JSON.stringify(bundle))+ throw new Error("Reused frontend inventory differs from its audited source");}const assets = JSON.parse(await readFile(assetsPath, "utf8"));for (const [identity, library] of Object.entries(assets.libraries) as [string, { type: string; path: string }][]) {diff --git a/scripts/package-portable.ps1 b/scripts/package-portable.ps1new file mode 100644index 00000000..3576a11f--- /dev/null+++ b/scripts/package-portable.ps1@@ -0,0 +1,76 @@+param(+ [Parameter(Mandatory)][ValidateSet('linux-x64', 'osx-arm64')][string]$Runtime,+ [Parameter(Mandatory)][string]$Version,+ [Parameter(Mandatory)][string]$SourceDirectory,+ [Parameter(Mandatory)][string]$ReferenceBundleDirectory,+ [Parameter(Mandatory)][string]$OutputDirectory+)+$ErrorActionPreference = 'Stop'+$PSNativeCommandUseErrorActionPreference = $true+$env:MSBUILDDISABLENODEREUSE = '1'+$source = (Resolve-Path -LiteralPath $SourceDirectory).Path+$reference = (Resolve-Path -LiteralPath $ReferenceBundleDirectory).Path+$output = [IO.Path]::GetFullPath($OutputDirectory)+$work = "$output.work"+if ((Test-Path -LiteralPath $output) -or (Test-Path -LiteralPath $work)) { throw 'Use fresh portable output/work directories.' }+$architecture = [Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString()+if (($Runtime -eq 'osx-arm64' -and (-not $IsMacOS -or $architecture -ne 'Arm64')) -or+ ($Runtime -eq 'linux-x64' -and (-not $IsLinux -or $architecture -ne 'X64'))) {+ throw "Build and qualify $Runtime on its native OS/architecture, not $([Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)."+}+$revision = (git -C $source rev-parse HEAD).Trim()+$referenceMetadata = Get-Content (Join-Path $reference 'BUILD-METADATA.json') -Raw | ConvertFrom-Json+if ($referenceMetadata.sourceRevision -ne $revision -or $referenceMetadata.modifiedSource -or $referenceMetadata.version -ne $Version) {+ throw 'Portable code and qualified reference frontend must have the same clean source/version.'+}+if (@(git -C $source status --porcelain).Count) { throw 'Portable product source is modified.' }+$bundleName = "Aetheris-$Runtime"+$bundle = Join-Path $work $bundleName+New-Item -ItemType Directory -Path $bundle, $output | Out-Null+$publishArgs = @('-c', 'Release', '-r', $Runtime, '--self-contained', 'true', '-m:1', '-nr:false',+ '-p:UseSharedCompilation=false', '-t:Rebuild', "-p:Version=$Version", '-p:DebugType=None', '-p:DebugSymbols=false')+dotnet publish (Join-Path $source 'Aetheris.CLI/Aetheris.CLI.csproj') @publishArgs -o $bundle+& (Join-Path $PSScriptRoot 'Test-CoreCliPayload.ps1') -AssetsPath (Join-Path $source 'Aetheris.CLI/obj/project.assets.json') -PublishDirectory $bundle+dotnet publish (Join-Path $source 'Aetheris.Forge.Host/Aetheris.Forge.Host.csproj') @publishArgs -p:PublishAot=true -o (Join-Path $bundle 'forge-host')+$server = Join-Path $work 'server'+dotnet publish (Join-Path $source 'Aetheris.Server/Aetheris.Server.csproj') @publishArgs -o $server+foreach ($file in Get-ChildItem -LiteralPath $server -Recurse -File) {+ $relative = [IO.Path]::GetRelativePath($server, $file.FullName)+ if ($relative -eq 'Aetheris.Forge.Host') { continue } # Referenced executable; native host lives under forge-host/.+ $destination = Join-Path $bundle $relative+ if (Test-Path -LiteralPath $destination) {+ if ((Get-FileHash -LiteralPath $destination).Hash -ne (Get-FileHash -LiteralPath $file.FullName).Hash) {+ throw "CLI and browser server disagree on shared file: $relative"+ }+ } else {+ New-Item -ItemType Directory -Force -Path (Split-Path $destination -Parent) | Out-Null+ Copy-Item -LiteralPath $file.FullName -Destination $destination+ }+}+foreach ($directory in @('wwwroot', 'fixtures', 'testdata', 'samples')) {+ Copy-Item -LiteralPath (Join-Path $reference $directory) -Destination (Join-Path $bundle $directory) -Recurse+}+New-Item -ItemType Directory -Path (Join-Path $bundle 'docs') | Out-Null+Copy-Item -LiteralPath (Join-Path $PSScriptRoot '../docs/public') -Destination (Join-Path $bundle 'docs/public') -Recurse+foreach ($name in @('LICENSE', 'THIRD_PARTY_NOTICES.md', 'CORRESPONDING-SOURCE.md')) {+ Copy-Item -LiteralPath (Join-Path $reference $name) -Destination (Join-Path $bundle $name)+}+Copy-Item -LiteralPath (Join-Path $PSScriptRoot '../docs/public/release-bundle.md') -Destination (Join-Path $bundle 'README.md')+$readme = Join-Path $bundle 'README.md'+[IO.File]::WriteAllText($readme, [regex]::Replace([IO.File]::ReadAllText($readme), '\]\((?!https?://|#)([^)]+)\)', '](docs/public/$1)'))+$packagingRevision = (git -C (Split-Path $PSScriptRoot -Parent) rev-parse HEAD).Trim()+Add-Content -LiteralPath (Join-Path $bundle 'CORRESPONDING-SOURCE.md') -Value "`nPortable packaging scripts: https://github.com/yuechen-li-dev/Aetheris/tree/$packagingRevision/scripts"+@{ version=$Version; identity="$Version+$revision"; sourceRevision=$revision; modifiedSource=$false;+ runtime=$Runtime; defaultPresentation='Browser'; webviewMode=$null; packagingRevision=$packagingRevision } |+ ConvertTo-Json | Set-Content -LiteralPath (Join-Path $bundle 'BUILD-METADATA.json')+node (Join-Path $PSScriptRoot 'collect-cadmata-licenses.mts') $source $bundle (Join-Path $source 'Aetheris.Server/obj/project.assets.json') (Join-Path $reference 'licenses')+if ($IsMacOS) {+ $launcher = Join-Path $bundle 'Open Cadmata.command'+ [IO.File]::WriteAllText($launcher, "#!/bin/sh`ncd `"`$(dirname `"`$0`")`" || exit 1`nexec ./Cadmata `"`$@`"`n", [Text.UTF8Encoding]::new($false))+ chmod +x $launcher+}+foreach ($executable in @('aetheris', 'Cadmata', 'forge-host/Aetheris.Forge.Host')) { chmod +x (Join-Path $bundle $executable) }+$archive = Join-Path $output "Aetheris-$Version-$Runtime.tar.gz"+tar -czf $archive -C $work $bundleName+$hash = (Get-FileHash -LiteralPath $archive -Algorithm SHA256).Hash.ToLowerInvariant()+"$hash $([IO.Path]::GetFileName($archive))" | Set-Content (Join-Path $output "SHA256SUMS-$Runtime.txt")diff --git a/scripts/package-release.ps1 b/scripts/package-release.ps1index 14ab723a..3c3e8c0d 100644--- a/scripts/package-release.ps1+++ b/scripts/package-release.ps1@@ -125,6 +125,8 @@ $bundleRoot = Join-Path $stage 'Aetheris-win-x64'New-Item -ItemType Directory -Force -Path (Join-Path $bundleRoot 'docs'), (Join-Path $bundleRoot 'samples') | Out-NullCopy-Item -LiteralPath (Join-Path $repoRoot 'docs/public') -Destination (Join-Path $bundleRoot 'docs/public') -RecurseCopy-Item -LiteralPath (Join-Path $repoRoot 'docs/public/release-bundle.md') -Destination (Join-Path $bundleRoot 'README.md')+$bundleReadme = Join-Path $bundleRoot 'README.md'+[IO.File]::WriteAllText($bundleReadme, [regex]::Replace([IO.File]::ReadAllText($bundleReadme), '\]\((?!https?://|#)([^)]+)\)', '](docs/public/$1)'))Copy-Item -LiteralPath (Join-Path $repoRoot 'LICENSE') -Destination (Join-Path $bundleRoot 'LICENSE')Copy-Item -LiteralPath (Join-Path $repoRoot 'THIRD_PARTY_NOTICES.md') -Destination (Join-Path $bundleRoot 'THIRD_PARTY_NOTICES.md')Copy-Item -LiteralPath (Join-Path $repoRoot 'samples/forge-interop-x1') -Destination (Join-Path $bundleRoot 'samples/forge-interop-x1') -Recursediff --git a/scripts/qualify-cadmata-browser.mts b/scripts/qualify-cadmata-browser.mtsnew file mode 100644index 00000000..bdd8da6f--- /dev/null+++ b/scripts/qualify-cadmata-browser.mts@@ -0,0 +1,69 @@+import { spawn } from "node:child_process";+import { mkdir, readFile, writeFile } from "node:fs/promises";+import { join, resolve } from "node:path";+import { pathToFileURL } from "node:url";+import assert from "node:assert/strict";++const [bundle, output, playwrightModule, step] = process.argv.slice(2).map(path => resolve(path));+const { chromium } = await import(pathToFileURL(playwrightModule).href);+await mkdir(output, { recursive: true });+const metadata = JSON.parse(await readFile(join(bundle, "BUILD-METADATA.json"), "utf8"));+const app = spawn(join(bundle, "Cadmata"), ["--no-browser", "--urls", "http://127.0.0.1:0"], {+ cwd: output, env: { ...process.env, DOTNET_ROOT: join(output, "no-installed-dotnet") },+});+let stdout = "", stderr = "";+app.stdout.on("data", chunk => stdout += chunk);+app.stderr.on("data", chunk => stderr += chunk);+const exited = new Promise<void>(resolve => app.once("exit", () => resolve()));+let browser;+const errors: string[] = [];+try {+ const deadline = Date.now() + 45000;+ let address = "";+ while (!address) {+ assert(app.exitCode === null && Date.now() < deadline, `Packaged server failed to start: ${stderr}\n${stdout}`);+ address = stdout.match(/Cadmata ready: (http:\/\/127\.0\.0\.1:\d+)/)?.[1] ?? "";+ if (!address) await new Promise(resolve => setTimeout(resolve, 200));+ }+ browser = await chromium.launch({ headless: true, args: ["--enable-unsafe-webgpu", "--use-angle=swiftshader"] });+ const context = await browser.newContext({ acceptDownloads: true });+ await context.route("**/*", route => {+ const url = route.request().url();+ return /^https?:/.test(url) && new URL(url).origin !== address ? route.abort() : route.continue();+ });+ const page = await context.newPage();+ page.setDefaultTimeout(120000);+ page.on("pageerror", error => errors.push(String(error)));+ await page.goto(address);+ await page.getByText("Ready. Select a file to import.", { exact: true }).waitFor();+ await page.screenshot({ path: join(output, "blank.png") });+ await page.locator('input[type="file"]').setInputFiles(step);+ await page.getByRole("button", { name: "Import STEP 242", exact: true }).click();+ await page.getByText("Qualified: Import complete.", { exact: true }).waitFor();+ await page.waitForFunction(() => {+ const canvas = document.querySelector<HTMLCanvasElement>("canvas");+ return JSON.parse(canvas?.dataset.telosDisplay ?? "{}").meshSurfaces > 0 &&+ document.querySelector('[data-display-host="three-telos"]')?.getAttribute("aria-busy") === "false";+ });+ const display = JSON.parse(await page.locator("canvas").getAttribute("data-telos-display") ?? "{}");+ await page.screenshot({ path: join(output, "imported.png") });+ const downloadEvent = page.waitForEvent("download");+ await page.getByRole("button", { name: "Download Canonical 242", exact: true }).click();+ const download = await downloadEvent;+ const exported = join(output, "canonical.step");+ await download.saveAs(exported);+ assert((await readFile(exported, "utf8")).startsWith("ISO-10303-21;"));+ await page.locator('input[type="file"]').setInputFiles(exported);+ await page.getByRole("button", { name: "Import STEP 242", exact: true }).click();+ await page.getByText(/^(Qualified|Inspectable|Degraded): Import complete\./).waitFor();+ assert.deepEqual(errors, []);+ await writeFile(join(output, "qualification.json"), JSON.stringify({ runtime: metadata.runtime,+ sourceRevision: metadata.sourceRevision, mode: "extracted self-contained server and headless Chromium",+ blankStartup: true, stepImport: true, display, canonicalReimport: true, errors }, null, 2));+} finally {+ await browser?.close();+ app.kill("SIGTERM");+ await Promise.race([exited, new Promise<void>(resolve => setTimeout(() => { app.kill("SIGKILL"); resolve(); }, 5000))]);+ await writeFile(join(output, "server.stdout.log"), stdout);+ await writeFile(join(output, "server.stderr.log"), stderr);+}