Patch Changes
-
Scenarios can store an ad-hoc definition (
initialState.type: "adhoc") that compiles to a generated code-mode scenario and optimization bindings. An LSP session type-checks its value expressions, and bundled example scenarios are editable this way. (@kube, #9284) -
Transition kernels, lambdas and differential equations can be written as a bare function body ending in
return. Theexport defaultmodule form still works. (@kube, #9370) -
Add in-browser optimization that runs Optuna in a Pyodide worker, downloaded from jsDelivr and PyPI unless
pyodide.indexURLsays otherwise. The./optimizationentry addsparseOptimizationManifest,isUnknownOptimizationRunErrorandPETRINAUT_OPTIMIZATION_UNKNOWN_RUN_ERROR_CODE, and the main entry addscreateReadableStore. (@kube, #9515) -
Expose explicit browser and headless diagnostics for captured definitions, and start document observation only when subscribed. (@lunelson, #9667)
-
Add a command registry for host-rendered command palettes:
createCommandRegistryandcombineCommandRegistriesin core, andCommandRegistryProvider,useCommand,useCommandsandformatShortcutKeysin@hashintel/petrinaut/react. (@kube, #9457) -
The layout module exports canvas geometry:
compactNodeDimensions,classicNodeDimensions,getComponentInstanceHeight,getBoundsOfCenteredBoxes,getMinZoomForBoundsandZOOM_PADDING. Classic places are 104 × 104 and classic transitions 180 × 60. (@kube, #9352) -
Register the
createExperimentAI tool with its validated request schema. (@kube, #9678) -
State constraint expressions accept a trailing semicolon and no explicit
return, and a constraint with separate statements reports the missingreturn. (@kube, #9725) -
Add the
@hashintel/petrinaut-core/experimentsentry point with anExperimentBackendinterface, a worker-pool backend andselectExperimentBackend.ExperimentRequestaccepts per-run overrides inruns. (@kube, #9178) -
createJsonDocHandleacceptsSDCPNInput, a loose authoring form ofSDCPNwhose omitted extension fields the newnormalizeSDCPNfills with defaults. Both are exported from the package root. (@kube, #8926) -
File import defaults a place's
colorId,dynamicsEnabledanddifferentialEquationId, and an arc'sweight, instead of rejecting a file that omits them. (@kube, #9715) -
Transitions with weighted coloured input arcs, or with lambdas that read no tokens, do far less work per frame. Trajectories are unchanged for every seed. (@kube, #9386)
-
Metric specs can sample every run that has not errored with
sampleRuns: "notErrored". (@kube, #9685) -
Add constraint margin and state-indicator evaluators, an optional manifest
constraintPolicy, andaggregateTimesupport ingetRunValues. (@kube, #9604) -
Export
PetrinautOptimizationDirection, the objective'smaximize|minimizeunion, from the package root and the/optimizationentry. (@kube, #9653) -
Experiments split their runs across Web Workers, one per logical core minus one, with identical results at any worker count.
experimentShardCountonExperimentsProviderandshardCountoncreateMonteCarloExperimentcap the parallelism. (@kube, #9162) -
Removes
petrinautAiPrompt; hosts compose their own system prompt frompetrinautAiCapabilityGuidanceor its parts,petrinautAiCapabilitySections. (@kube, #9949) -
selectionItemTypesandcanonicalizeSelectionare available from the dependency-free@hashintel/petrinaut-core/selectionentry, so hosts can validate selections from a URL or request. (@kube, #9426) -
Export
petrinautDiagnosticsContextMessageId, the id of the diagnostics message the assistant appends after client tool results. (@lunelson, #9854) -
Adds
hashPetrinautDocument, a structural hash of a net that ignores the order of object keys and can leave out layout and other non-semantic parts. (@kube, #9935) -
Entity, net and subnet ids are UUIDs: documents with other ids get stable UUIDs when they load, older ids still resolve, and
petrinautIdSchemavalidates and converts an id field. (@kube, #9958) -
Places can declare a maximum token capacity, and a transition cannot fire if it would take an output place over capacity. (@kube, #9177)
-
An AI edit that leaves the document unchanged is reported as not applied. (@lunelson, #9537)
-
Net identifiers named after
Object.prototypemembers, such as__proto__, are rejected at import and before simulation. Place visualizer code runs under the same sandbox as scenario code. (@kube, #9222) -
Mark Space as the default starting place in the Probabilistic Satellite Launcher example. (@kube, #9764)
-
Scenario code runs in an interpreter instead of
new Function, and is stricter:==is strict, conditions take booleans, unknown place names are errors, and only.map,.reduceand.concatarray methods are available. (@kube, #9332) -
SDCPN elements accept an optional
description, and transitions, subnets, component instances and the net root accept an optional host-definedmetadatarecord of JSON values. (@CiaranMn, #9484) -
The AI assistant's documentation adds the ad-hoc scenarios, Preview, code editor and simulation panel guides, and describes snapshot validation and its diagnostics. (@kube, #9723)
-
Distribution frames carry the extent of their bins. (@kube, #9478)
-
Optimization trials run their seeded replicates in parallel, and the CLI's
--threads <n>bounds the number of workers. (@kube, #9358) -
Add validated experiment request and result schemas and a
runExperimenthost interface for up to 100,000 runs. (@kube, #9676) -
Add the Vaccination Campaign example, an SIR model with vaccination and contact reduction built for optimization demos. (@kube, #9516)
-
Reject arc creation when the referenced transition does not exist instead of treating it as an unchanged mutation. (@lunelson, #9722)
-
Add a WebGPU backend for experiments that matches the CPU engine's semantics and falls back to the CPU for nets it cannot run. A Compilation panel shows the compiled conditions, kernels and equations. (@kube, #9179)
-
Nets and optimization manifests can be imported and exported in YAML and JSON. (@kube, #9379)