FE-1161: Petrinaut CLI#8975
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
7ac9ad3 to
db505a8
Compare
db505a8 to
8017f0c
Compare
PR SummaryMedium Risk Overview
Also adds bundled example models, Reviewed by Cursor Bugbot for commit 47a4f11. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1d89519. Configure here.

🌟 What is the purpose of this PR?
Add an internal Petrinaut CLI for Python optimization services. The CLI loads and type-checks one model once, then runs repeated simulations with different parameters, initial markings, metrics, and seeds without restarting Node for every trial.
🔍 What does this change?
@hashintel/petrinaut-cliworkspace package.compilePetrinautModelfacade in Petrinaut Core.healthz,metadata, andrunprotocol methods.🚀 Quick usage
See the Python and Optuna integration guide and the parameter, metric, and colored-token examples.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
turbo.json's have been updated to reflect this🛡 What tests cover this?
Core regression tests cover run-limit validation and generated seeds. The CLI is also verified through package type-checking, linting, building, and end-to-end protocol smoke tests.
yarn workspace @hashintel/petrinaut-core test:unit src/simulation/compiled-model.test.tsyarn workspace @hashintel/petrinaut-cli lint:tscyarn workspace @hashintel/petrinaut-cli lint:eslintyarn workspace @hashintel/petrinaut-cli buildmetadataandrunsmoke test❓ How to test this?
4242, final place token counts, and theInfected Fractionmetric.libs/@hashintel/petrinaut-cli/MODEL_EXAMPLES.mdto try colored-token models.