Generators
A code document points at code in a git repository: the repository's URL, a branch, tag or commit, and the directory of the generator. Sync resolves the ref to a commit and copies that directory into the PDM, together with its manifest. The PDM always runs that copy, never the repository, so a run can be repeated even if the repository is gone or rewritten.
The manifest lists the generator's parameters, and the PDM shows them as a form. Execute checks the values against the manifest and queues a run. A worker runs the code against ClassCAD in a session of its own and uploads what the generator saved. Each result becomes a document in the generator's folder and goes through the same jobs as any part.
Same parameters, same document. A run with the same parameters on the same commit returns the run that already exists instead of making a duplicate. Different parameters make a different document.
Generated documents are read-only. To change one, change the parameters and run again, or copy it into a normal document.
Releases follow the code. A generated part can only be released if the generator version that made it is released. Releasing a code document freezes its commit.
Today a generator is TypeScript, run by Node, and makes one part or one assembly per run, from a public GitHub repository. Writing generators shows how.