Compile plugin scripts only in a sandbox; plugins read their own metadata
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
The server never runs plugin code. It compiled plugin scripts in the request's thread whenever it validated a manifest (every whole-document validation, each changed moment of a patch, catalogue reads), and validated stack metadata for plugins centrally, which made plugin changes rebuild the whole index. - Manifest validation no longer compiles. The server compiles scripts new to a timeline, pull request or publication in worker threads holding only the compiler (dist/plugin-compile-worker.mjs), with no environment, 64 MiB and 2 s per script; a worker past a limit is replaced. Built-in scripts and a timeline's current ones are not compiled again. - validateStackMetadata is gone from the core. The stack field reads any value, shows the entries it can, and shows a stack with unreadable entries read-only so editing never drops them; its editor still checks what it writes. - Changing a timeline's plugins saves in place. Closes #157. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/895c6b9423d0cb1dd7cb13968febf9e587f2650b
Related
Open Compile plugin scripts only in a sandbox; plugins read their own metadata in the timeline