Roadmap 0.13, Python scripting
PY.6 Python plug-ins: a folder of Python files adds commands, in the sandbox
a Discord member Suggested. An add-on written in Python registers commands and tools; it runs in the same sandbox as scripts, so it cannot reach files or the network. Builds on PY.1.
2026-12-03 (python-13, PY.6), built in the lab (add-on python 0.2.0). Scripts > Plug-in folder: pick a folder of Python files; each file with a `# button:` or `# command:` line is added as a script of the add-on (a toolbar button, a typed command, or both), a helper file is skipped and the console says why (50 files, 100 KB each, only .py, read as text). Picking runs nothing; each plug-in starts only when its button is pressed, its command typed or Run pressed, in the same sealed worker as any script (standard library, the app's tools through `cadcraft`, no files, no network; the test proves open() and a socket fail), with the same form for its inputs. A typed command goes through api.commands.add where the app has it (CadCraft run in the real page: PLATE and HELLOPY); a name already taken is refused, never replaced. Remove takes a folder's scripts away. Tests: tools/python-test/scripts.mjs 43/0, offline.mjs 22/0 (real CPython), test_package.py 42/0, lab browser run tools/python-test/browser-py-13.mjs 94/0 (CadCraft, PartCraft, BimCraft, ModelCraft, MarkupCraft, TakeoffCraft, CivilCraft, DetailCraft). Log docs/0.13-sessions/python-13.md. Not done: a plug-in that registers tools for assistants (only commands and buttons); a command line in apps with none gets the button only; reading the folder again after a file changed is a new pick.
Community comments
No comments yet
Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.
Sign in or create a free account to add a comment.