From e80224922d7a33156124a01d1da1ce3dc6795e22 Mon Sep 17 00:00:00 2001 From: "hash-release[bot]" <313494501+hash-release[bot]@users.noreply.github.com> Date: Sat, 5 Sep 2026 00:49:32 +0000 Subject: [PATCH] Version Packages --- .changeset/adaptive-bezier-label-midpoint.md | 5 - .changeset/adhoc-experiments.md | 5 - .../adhoc-form-editing-and-layout-fixes.md | 9 -- .changeset/adhoc-optimizations.md | 5 - .changeset/adhoc-quick-simulation.md | 5 - .changeset/adhoc-scenario-authoring.md | 6 - .changeset/adhoc-scenario-docs.md | 6 - .changeset/adhoc-scenario-form.md | 5 - .changeset/adhoc-scenario-synthesis.md | 5 - .changeset/bare-body-user-code.md | 6 - .changeset/canvas-single-render.md | 5 - .changeset/canvas-viewport-persistence.md | 5 - .changeset/command-registry.md | 6 - .changeset/core-owns-canvas-geometry.md | 5 - .changeset/drawer-graphs-before-lists.md | 5 - .changeset/experiment-parameter-sweeps.md | 5 - .changeset/experiments-backend-registry.md | 5 - .changeset/fe-1056-sdcpn-input.md | 5 - .changeset/gpu-range-sweeps.md | 6 - .changeset/heatmap-raster-magma.md | 5 - .changeset/interval-sweeps-range-slider.md | 5 - .changeset/isolated-surface-components.md | 6 - .changeset/lazy-weighted-arc-enumeration.md | 5 - .changeset/optimization-surface.md | 6 - .changeset/parallel-experiment-runs.md | 14 -- .changeset/petrinaut-controlled-navigation.md | 10 -- .../petrinaut-core-selection-vocabulary.md | 9 -- .changeset/place-token-capacity.md | 14 -- .changeset/preview-navigation-vocabularies.md | 5 - .changeset/sanitize-user-controlled-keys.md | 6 - .changeset/scenario-hir-interpreter.md | 6 - .changeset/sdcpn-description-metadata-core.md | 5 - .changeset/sdcpn-description-metadata-ui.md | 5 - .changeset/seeded-sweep-draws.md | 5 - .changeset/sidebar-row-label-width.md | 5 - .changeset/sour-baboons-sit.md | 5 - .changeset/stable-composer-controls.md | 41 ----- .changeset/storybook-real-optimizer.md | 5 - .changeset/streaming-range-sweeps.md | 6 - .changeset/sweep-compute-reuse.md | 6 - .changeset/sweep-drawer-ux.md | 6 - .changeset/sweep-surface-contour.md | 5 - .../token-independent-lambda-fast-path.md | 5 - .changeset/trial-replicates-parallel.md | 5 - .changeset/webgpu-experiment-backend.md | 6 - .changeset/worksheet-focus-primitives.md | 5 - .changeset/yaml-import-export.md | 6 - .../packages/plugin-sdcpn/CHANGELOG.md | 8 + .../packages/plugin-sdcpn/package.json | 2 +- libs/@hashintel/ds-components/CHANGELOG.md | 10 ++ libs/@hashintel/ds-components/package.json | 2 +- libs/@hashintel/petrinaut-core/CHANGELOG.md | 70 +++++++++ libs/@hashintel/petrinaut-core/package.json | 2 +- libs/@hashintel/petrinaut/CHANGELOG.md | 143 ++++++++++++++++++ libs/@hashintel/petrinaut/package.json | 2 +- 55 files changed, 235 insertions(+), 320 deletions(-) delete mode 100644 .changeset/adaptive-bezier-label-midpoint.md delete mode 100644 .changeset/adhoc-experiments.md delete mode 100644 .changeset/adhoc-form-editing-and-layout-fixes.md delete mode 100644 .changeset/adhoc-optimizations.md delete mode 100644 .changeset/adhoc-quick-simulation.md delete mode 100644 .changeset/adhoc-scenario-authoring.md delete mode 100644 .changeset/adhoc-scenario-docs.md delete mode 100644 .changeset/adhoc-scenario-form.md delete mode 100644 .changeset/adhoc-scenario-synthesis.md delete mode 100644 .changeset/bare-body-user-code.md delete mode 100644 .changeset/canvas-single-render.md delete mode 100644 .changeset/canvas-viewport-persistence.md delete mode 100644 .changeset/command-registry.md delete mode 100644 .changeset/core-owns-canvas-geometry.md delete mode 100644 .changeset/drawer-graphs-before-lists.md delete mode 100644 .changeset/experiment-parameter-sweeps.md delete mode 100644 .changeset/experiments-backend-registry.md delete mode 100644 .changeset/fe-1056-sdcpn-input.md delete mode 100644 .changeset/gpu-range-sweeps.md delete mode 100644 .changeset/heatmap-raster-magma.md delete mode 100644 .changeset/interval-sweeps-range-slider.md delete mode 100644 .changeset/isolated-surface-components.md delete mode 100644 .changeset/lazy-weighted-arc-enumeration.md delete mode 100644 .changeset/optimization-surface.md delete mode 100644 .changeset/parallel-experiment-runs.md delete mode 100644 .changeset/petrinaut-controlled-navigation.md delete mode 100644 .changeset/petrinaut-core-selection-vocabulary.md delete mode 100644 .changeset/place-token-capacity.md delete mode 100644 .changeset/preview-navigation-vocabularies.md delete mode 100644 .changeset/sanitize-user-controlled-keys.md delete mode 100644 .changeset/scenario-hir-interpreter.md delete mode 100644 .changeset/sdcpn-description-metadata-core.md delete mode 100644 .changeset/sdcpn-description-metadata-ui.md delete mode 100644 .changeset/seeded-sweep-draws.md delete mode 100644 .changeset/sidebar-row-label-width.md delete mode 100644 .changeset/sour-baboons-sit.md delete mode 100644 .changeset/stable-composer-controls.md delete mode 100644 .changeset/storybook-real-optimizer.md delete mode 100644 .changeset/streaming-range-sweeps.md delete mode 100644 .changeset/sweep-compute-reuse.md delete mode 100644 .changeset/sweep-drawer-ux.md delete mode 100644 .changeset/sweep-surface-contour.md delete mode 100644 .changeset/token-independent-lambda-fast-path.md delete mode 100644 .changeset/trial-replicates-parallel.md delete mode 100644 .changeset/webgpu-experiment-backend.md delete mode 100644 .changeset/worksheet-focus-primitives.md delete mode 100644 .changeset/yaml-import-export.md create mode 100644 libs/@hashintel/brunch-agent/packages/plugin-sdcpn/CHANGELOG.md diff --git a/.changeset/adaptive-bezier-label-midpoint.md b/.changeset/adaptive-bezier-label-midpoint.md deleted file mode 100644 index 75477c2b7c9..00000000000 --- a/.changeset/adaptive-bezier-label-midpoint.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Arc weight labels sit on the Adaptive Bezier curve instead of floating at the straight-line midpoint between the arc's endpoints. diff --git a/.changeset/adhoc-experiments.md b/.changeset/adhoc-experiments.md deleted file mode 100644 index c5217927e80..00000000000 --- a/.changeset/adhoc-experiments.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -The create-experiment drawer accepts an ad-hoc scenario when "No scenario" is selected: Initial State + Parameters defined inline compile through a generated, never-persisted scenario at experiment start. diff --git a/.changeset/adhoc-form-editing-and-layout-fixes.md b/.changeset/adhoc-form-editing-and-layout-fixes.md deleted file mode 100644 index f0313cea99a..00000000000 --- a/.changeset/adhoc-form-editing-and-layout-fixes.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Fix three defects in the ad-hoc scenario form: the optimize bounds popover -ignored every press (Min, Max, Step and Scale were uneditable, and each press -dismissed it), a focused section painted over the sticky header of the section -hosting it, and the experiment drawer's computed initial state grew unbounded -instead of scrolling in its own region. diff --git a/.changeset/adhoc-optimizations.md b/.changeset/adhoc-optimizations.md deleted file mode 100644 index 8031e5d2fd5..00000000000 --- a/.changeset/adhoc-optimizations.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -The create-optimization drawer offers "Ad-hoc (define inline)": Initial State + Parameters with Optimize selections compile to a generated, never-persisted scenario whose generated parameters the optimization manifest binds to their optimize domains. diff --git a/.changeset/adhoc-quick-simulation.md b/.changeset/adhoc-quick-simulation.md deleted file mode 100644 index d6cf68fc0c7..00000000000 --- a/.changeset/adhoc-quick-simulation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Quick simulation runs an ad-hoc scenario when none is selected: a "Define initial state" drawer in the simulation settings panel edits token counts and values that compile through a generated, never-persisted scenario. diff --git a/.changeset/adhoc-scenario-authoring.md b/.changeset/adhoc-scenario-authoring.md deleted file mode 100644 index 878f7461861..00000000000 --- a/.changeset/adhoc-scenario-authoring.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut": patch -"@hashintel/petrinaut-core": patch ---- - -Behind the new experimental "Ad-hoc scenarios" setting, the scenario creation form authors scenarios through the ad-hoc form: exposed Variables become the saved scenario's tunable parameters, and the definition persists as `initialState.type: "adhoc"`. diff --git a/.changeset/adhoc-scenario-docs.md b/.changeset/adhoc-scenario-docs.md deleted file mode 100644 index cad928b6a52..00000000000 --- a/.changeset/adhoc-scenario-docs.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut": patch -"@hashintel/petrinaut-core": patch ---- - -Add the ad-hoc scenarios user-guide page and register it with the in-app AI assistant's doc reader. diff --git a/.changeset/adhoc-scenario-form.md b/.changeset/adhoc-scenario-form.md deleted file mode 100644 index c5b65ffc9d0..00000000000 --- a/.changeset/adhoc-scenario-form.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -The ad-hoc scenario form matches the ratified prototype: gutter-cycled row kinds (fixed → dynamic → count-optimized) with quiet count strips, shared columns with a wash and derived cells, a phantom trailing row, place totals, compact Variables blocks, and Monaco expression editors type-checked live through a new ad-hoc LSP session with diagnostics rendered on closed cells. diff --git a/.changeset/adhoc-scenario-synthesis.md b/.changeset/adhoc-scenario-synthesis.md deleted file mode 100644 index af06f3503c7..00000000000 --- a/.changeset/adhoc-scenario-synthesis.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -Ad-hoc scenario synthesis: form state, deterministic `adhoc.*` parameter names, synthesis to a generated code-mode scenario plus optimized fields with typed domains, the transform to optimization-manifest bindings, row-kind cycling and shared-column transitions, place totals, and an LSP session kind that type-checks every value expression. diff --git a/.changeset/bare-body-user-code.md b/.changeset/bare-body-user-code.md deleted file mode 100644 index 1c7f71b9087..00000000000 --- a/.changeset/bare-body-user-code.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Transition kernels, lambdas, and differential equations can now be written as a bare function body ending in `return`, like metrics and scenario code: `input` (or `tokens` for dynamics) and `parameters` are in scope ambiently, with full editor type checking and completions. The `export default TransitionKernel(...)` / `Lambda(...)` / `Dynamics(...)` module form is still accepted, and the editor picks the right checking mode per form. Default templates, built-in examples, and the AI assistant now use the bare form. Visualizers are unchanged. diff --git a/.changeset/canvas-single-render.md b/.changeset/canvas-single-render.md deleted file mode 100644 index 0d17561c359..00000000000 --- a/.changeset/canvas-single-render.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -The canvas renders centered on the net from its first frame, instead of jumping there after a first paint at the origin. Component instances grow with their port count so their ports have room, and auto-layout on import no longer depends on the compact/classic setting. diff --git a/.changeset/canvas-viewport-persistence.md b/.changeset/canvas-viewport-persistence.md deleted file mode 100644 index 293b38c3f81..00000000000 --- a/.changeset/canvas-viewport-persistence.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Remember the canvas viewport per net, so switching between nets or reloading returns to the same position and zoom. diff --git a/.changeset/command-registry.md b/.changeset/command-registry.md deleted file mode 100644 index b25858de697..00000000000 --- a/.changeset/command-registry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Added a command registry for host-rendered command palettes: `createCommandRegistry()` and `combineCommandRegistries()` in core, and `CommandRegistryProvider`, `useCommand(command, { when })`, `useCommands()`, and `formatShortcutKeys()` in `@hashintel/petrinaut/react`. The editor registers its undo/redo, tool, auto-layout, search, and panel commands. Petrinaut ships no palette. diff --git a/.changeset/core-owns-canvas-geometry.md b/.changeset/core-owns-canvas-geometry.md deleted file mode 100644 index 98e6b8c0abf..00000000000 --- a/.changeset/core-owns-canvas-geometry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -The layout module exports the canvas geometry: render node dimensions (`compactNodeDimensions`, `classicNodeDimensions`, `getComponentInstanceHeight`), net bounds (`getBoundsOfCenteredBoxes`) and zoom limits (`getMinZoomForBounds`, `ZOOM_PADDING`). `layoutNodeDimensions` is now derived from the render dimensions instead of maintained by hand. diff --git a/.changeset/drawer-graphs-before-lists.md b/.changeset/drawer-graphs-before-lists.md deleted file mode 100644 index 6441dea2596..00000000000 --- a/.changeset/drawer-graphs-before-lists.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -The experiment and optimization result drawers keep the summary, navigator and surface still at the top; only the step and metric lists scroll, with the step table's header pinned. diff --git a/.changeset/experiment-parameter-sweeps.md b/.changeset/experiment-parameter-sweeps.md deleted file mode 100644 index 5fc43575bef..00000000000 --- a/.changeset/experiment-parameter-sweeps.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Experiments can sweep scenario parameters. A Sweep toggle per numeric parameter defines the values, and the results drawer gains a navigator: only the selected combination computes, in escalating run batches that stream into the charts, and visited combinations keep their results. diff --git a/.changeset/experiments-backend-registry.md b/.changeset/experiments-backend-registry.md deleted file mode 100644 index 35055f8ab12..00000000000 --- a/.changeset/experiments-backend-registry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -Add the `@hashintel/petrinaut-core/experiments` entry point: an `ExperimentBackend` interface, a worker-pool implementation of it, and `selectExperimentBackend`, which walks backends in preference order and records every refusal. diff --git a/.changeset/fe-1056-sdcpn-input.md b/.changeset/fe-1056-sdcpn-input.md deleted file mode 100644 index 9617fa2d923..00000000000 --- a/.changeset/fe-1056-sdcpn-input.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -`createJsonDocHandle` accepts `SDCPNInput`, a loose authoring variant of `SDCPN`: extension fields may be omitted and are filled with plain-net defaults by the new `normalizeSDCPN` export. `SDCPNInput` and its member types are exported from the package root. diff --git a/.changeset/gpu-range-sweeps.md b/.changeset/gpu-range-sweeps.md deleted file mode 100644 index 8cffdd341a9..00000000000 --- a/.changeset/gpu-range-sweeps.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut": patch -"@hashintel/petrinaut-core": patch ---- - -The WebGPU backend matches the CPU engine's stochastic semantics and frame numbering, streams metric frames per dispatch chunk, and runs range sweeps from a per-run parameter buffer. It sizes and calibrates metric histograms and typed-place buffers from the model and device instead of refusing or warning, and tiles experiments larger than the device's limits with bit-identical results. Sweep batch instantiation no longer blocks the main thread: scenario compilation is prepared once per experiment and per-run values travel as one typed-array plan. diff --git a/.changeset/heatmap-raster-magma.md b/.changeset/heatmap-raster-magma.md deleted file mode 100644 index d5ed667e540..00000000000 --- a/.changeset/heatmap-raster-magma.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Distribution heatmaps in experiment metric charts render as a magma-coloured density image in one draw call, so they stay fast at high run counts. diff --git a/.changeset/interval-sweeps-range-slider.md b/.changeset/interval-sweeps-range-slider.md deleted file mode 100644 index 51957c053ac..00000000000 --- a/.changeset/interval-sweeps-range-slider.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Swept parameters declare an interval instead of a value count, and the navigator becomes a range slider per parameter: the whole interval by default, resizable, collapsible to a point. A range selection samples the region and streams the merged distribution over it. The slider is a two-thumb range control local to the navigator, whose thumbs may coincide. diff --git a/.changeset/isolated-surface-components.md b/.changeset/isolated-surface-components.md deleted file mode 100644 index 8b91b4e3d56..00000000000 --- a/.changeset/isolated-surface-components.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut": patch -"@hashintel/ds-components": patch ---- - -Extract the contour plot into a `ContourSurface` component shared by the sweep and optimization surfaces, decouple `SweepNavigator` from the experiments context, and add Storybook stories for each component's states. Sweep navigation is continuous: a point selection uses a single-thumb slider, slider moves commit during the drag, and charts keep their axes, grid and size while frames stream in. `Slider` treats 0 as a real value, and `useElementSize` follows an element that mounts after the first render. diff --git a/.changeset/lazy-weighted-arc-enumeration.md b/.changeset/lazy-weighted-arc-enumeration.md deleted file mode 100644 index 54d8354342e..00000000000 --- a/.changeset/lazy-weighted-arc-enumeration.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -Weighted-arc token combinations enumerate lazily in the same lexicographic order, so a transition with a weight-2 coloured input arc no longer materialises every combination per frame. Trajectories are unchanged for every seed. diff --git a/.changeset/optimization-surface.md b/.changeset/optimization-surface.md deleted file mode 100644 index 63a61a31282..00000000000 --- a/.changeset/optimization-surface.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut": patch -"@hashintel/ds-components": patch ---- - -Optimization studies with two or more optimized numeric parameters gain a Surface section: a contour of the objective over two chosen parameters, computed locally against the study's frozen model, with the study's trials as markers. Sliders and clicks move the selected point, which refines with escalating batches. `Slider` accepts `step` and `onChangeEnd`. diff --git a/.changeset/parallel-experiment-runs.md b/.changeset/parallel-experiment-runs.md deleted file mode 100644 index 9de2a402d8b..00000000000 --- a/.changeset/parallel-experiment-runs.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Run an experiment's runs in parallel across several Web Workers. - -An experiment used to run every one of its runs in a single worker, using one core however many the machine had. Runs are independent, so they now split across one worker per logical core (minus one, so the editor stays responsive), capped at the run count. Measured at ~4x on 8 shards on a 10-core machine. - -Sharding cannot change what an experiment reports. Per-run seeds derive from the run's **global** index rather than its position within a shard, so run _i_ gets the same seed whichever worker owns it, and each worker's per-frame statistics recombine through the metric accumulator monoids (`empty`/`merge`). Output is byte-identical at every shard count while every shard still has an active run. A frame is only finalised once every still-running shard has reported it, with finished shards dropped from that watermark rather than blocking it — so once a whole shard's runs have ended early (for example by deadlock), that shard's completed runs stop contributing samples to later frames, where a single simulator would keep sampling their frozen state. - -Scalar metric frames now carry their pre-reduction accumulator state, because `frameValue` is already reduced and a mean of means is not a mean. - -Hosts can cap or pin parallelism with `experimentShardCount` on `ExperimentsProvider`, or `shardCount` on `createMonteCarloExperiment`. diff --git a/.changeset/petrinaut-controlled-navigation.md b/.changeset/petrinaut-controlled-navigation.md deleted file mode 100644 index 7ea48713a82..00000000000 --- a/.changeset/petrinaut-controlled-navigation.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Add a `navigation` prop to `Petrinaut`: a router-neutral controller through -which the host can read and drive the app location (mode, Simulate section and -resource, scenario, subnet, selection, and creation drawers), making them real -browser history destinations. A creation drawer now layers over the record -already open instead of closing it, and the hamburger menu hides **Layout** on -a read-only net. diff --git a/.changeset/petrinaut-core-selection-vocabulary.md b/.changeset/petrinaut-core-selection-vocabulary.md deleted file mode 100644 index 3981cdd0c29..00000000000 --- a/.changeset/petrinaut-core-selection-vocabulary.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -Expose the selection vocabulary as data: `selectionItemTypes` and -`canonicalizeSelection` are available from a dependency-free -`@hashintel/petrinaut-core/selection` entry, so hosts can validate and order -selection coming from a URL or an HTTP request without pulling the model or any -React code. diff --git a/.changeset/place-token-capacity.md b/.changeset/place-token-capacity.md deleted file mode 100644 index 5fd35649914..00000000000 --- a/.changeset/place-token-capacity.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Add an optional per-place token capacity. - -A place can now declare a maximum number of tokens it will hold, set from the place properties panel. Useful for supply-chain style models with finite storage. It also converts frames from growable to fixed-size, which is the precondition for a fixed-layout GPU or WASM path. - -Capacity participates in transition enablement, following the standard Petri-net capacity constraint: a transition cannot fire if doing so would take any output place above its capacity. Output tokens are applied at the end of a frame, so the check accounts for what transitions earlier in the same frame have already committed. Several transitions feeding one capped place cannot collectively overflow it. - -Deadlock detection includes the same check, so a net whose only remaining transitions are blocked by full output places is reported as deadlocked rather than stepping to `maxTime` with nothing happening. - -Nets without capacities are unaffected: the constraint tables are empty and the hot path skips them. diff --git a/.changeset/preview-navigation-vocabularies.md b/.changeset/preview-navigation-vocabularies.md deleted file mode 100644 index d3d1d1e9349..00000000000 --- a/.changeset/preview-navigation-vocabularies.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Export the `EditorGlobalMode` and `SimulateViewMode` types, so a host encoding Petrinaut's navigation state into its own router can spell both vocabularies and fail its build when either gains a member. diff --git a/.changeset/sanitize-user-controlled-keys.md b/.changeset/sanitize-user-controlled-keys.md deleted file mode 100644 index 2ad7a4951bd..00000000000 --- a/.changeset/sanitize-user-controlled-keys.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Reject net identifiers that collide with `Object.prototype` member names (`__proto__`, `constructor`, ...) at file import and before simulation, and store user-authored keys in prototype-free records. Place visualizer code now runs under the same sandbox hardening as scenario code. diff --git a/.changeset/scenario-hir-interpreter.md b/.changeset/scenario-hir-interpreter.md deleted file mode 100644 index d5bd59bb302..00000000000 --- a/.changeset/scenario-hir-interpreter.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Scenario code (parameter overrides, per-place expressions, code-mode initial state) now compiles through the HIR and runs in an interpreter: no `new Function`, no sandbox. Out-of-subset code fails with positioned errors in the editor and at compile. Stricter than the old evaluator: `==` is strict, conditions and `&&`/`||` take booleans, unknown place names in code mode are errors, and array methods beyond `.map`/`.reduce`/`.concat` are unavailable. `Array.from({ length: n }, fn)` desugars to `range(n).map(fn)`. diff --git a/.changeset/sdcpn-description-metadata-core.md b/.changeset/sdcpn-description-metadata-core.md deleted file mode 100644 index 3ef0557778e..00000000000 --- a/.changeset/sdcpn-description-metadata-core.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -SDCPN elements carry an optional `description` (places, transitions, types, subnets, component instances, and the net root) and an optional `metadata` record of JSON values (transitions, subnets, component instances, and the net root). `metadata` is host-defined and opaque to the library. Both fields validate against the entity schemas, survive file import/export, and are preserved when an `SDCPNInput` is normalized. Files written without the fields still validate. diff --git a/.changeset/sdcpn-description-metadata-ui.md b/.changeset/sdcpn-description-metadata-ui.md deleted file mode 100644 index 023c2ef016e..00000000000 --- a/.changeset/sdcpn-description-metadata-ui.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -The place, transition, component-instance, and type properties panels display and allow editing of the element's optional `description`. diff --git a/.changeset/seeded-sweep-draws.md b/.changeset/seeded-sweep-draws.md deleted file mode 100644 index 0d6366fe315..00000000000 --- a/.changeset/seeded-sweep-draws.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Range sweeps rotate each axis's low-discrepancy parameter draws by a seed-derived shift, so experiments with different seeds explore different value sequences. diff --git a/.changeset/sidebar-row-label-width.md b/.changeset/sidebar-row-label-width.md deleted file mode 100644 index ca6b3badd13..00000000000 --- a/.changeset/sidebar-row-label-width.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Sidebar list labels use the full row width and truncate with an ellipsis consistently; the row menu button only takes space while hovering the row or while its menu is open. diff --git a/.changeset/sour-baboons-sit.md b/.changeset/sour-baboons-sit.md deleted file mode 100644 index ab29191cc91..00000000000 --- a/.changeset/sour-baboons-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/ds-components": patch ---- - -Add Breadcrumb component diff --git a/.changeset/stable-composer-controls.md b/.changeset/stable-composer-controls.md deleted file mode 100644 index b6aa782f07b..00000000000 --- a/.changeset/stable-composer-controls.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Add generic host-rendered AI composer controls and a persistent inline Voice session, protected -active conversations, keyboard fallback, and one-answer buffering while the normal chat stream -settles. Add the provider-neutral `renderVoiceMode` contract and export `PetrinautAiInputMode`, with -the selected input mode and mode-change callback available to host-rendered Voice modes. Include -stable finalized-text submission, conversation identity, stop handling, schema-validated -interactive-tool text mapping, explicit separate-message targeting for corrections, and a -queue-aware voice submission path. Present text and voice through one transcript and composer whose -trailing action switches between waveform, Send, and Stop. `renderComposerControl` remains a -supported public seam for hosts that only need their own control beside the message box, -independently of Voice mode. Surface assistant request failures as error toasts instead of -transcript entries. - -Render every live Voice surface from a session snapshot the host reports through -`reportVoiceSessionState`, so hosts describe their session while Petrinaut owns its chrome. Replace -the composer with a low-profile Voice dock -- a canvas ribbon of three travelling waves, one leading -and two trailing it more faintly, fading out at both ends, opening with the microphone while -listening and moving under its own power through the same drawing path while the assistant speaks, -near flat while neither holds the turn, and naming one phase at a time -- with an announced phase and -reduced-motion behavior. Curve the raw microphone level before it drives the waves, so an ordinary -speaking level is plainly visible rather than a flicker above the line and a raised voice still has -somewhere to go. Sample the level per animation frame rather than through React, so drawing costs no -re-renders, and ease it against the frame delta so it looks the same at any refresh rate. Hold spoken -turns out of the transcript until the session ends, then reveal them together under a turn-count -divider, while typed messages and interactive tools awaiting an answer stay visible throughout. Let a -per-session Show transcription in chat action write those turns into the conversation as they land -instead. Keep every session control -- transcription, the microphone toggle, Resume, Reconnect, and -End -- in the dock, leaving the canvas toolbar untouched. Add `setMicrophoneMuted` to the Voice mode -controls and a `muted` session phase, so muting stops capture without interrupting what the assistant -is saying, unlike pausing. Surface voice recovery failures as toasts with privacy-safe diagnostic -references, and request one-time consent before the host starts the microphone. Mark persisted spoken -messages and the exact interactive-tool answer completed by Voice with an inline Voice chip ahead of -the words themselves. - -End Voice mode before submitting typed text exactly once through the shared composer, preserving the -draft if handoff fails. Pause active media before the AI panel closes and reopen the mounted session -paused. Provisional transcription and Realtime audio remain ephemeral rather than becoming -persisted chat history. diff --git a/.changeset/storybook-real-optimizer.md b/.changeset/storybook-real-optimizer.md deleted file mode 100644 index f7cde9b024a..00000000000 --- a/.changeset/storybook-real-optimizer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Storybook gains a "With real optimizer" story that runs optimization studies against a local Petrinaut Optimizer service; start it with `turbo run dev --filter @hashintel/petrinaut -- --with-optimizer-service`. diff --git a/.changeset/streaming-range-sweeps.md b/.changeset/streaming-range-sweeps.md deleted file mode 100644 index 43d63a2dc1e..00000000000 --- a/.changeset/streaming-range-sweeps.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut": patch -"@hashintel/petrinaut-core": patch ---- - -A sweep's range selection runs as one stochastic simulation over the ranges: every run draws its own value per ranged parameter, and the metric distribution over the region streams live. `ExperimentRequest` carries optional per-run overrides (`runs`), forwarded by the worker-pool backend and refused by the WebGPU backend. diff --git a/.changeset/sweep-compute-reuse.md b/.changeset/sweep-compute-reuse.md deleted file mode 100644 index b07216aaaa8..00000000000 --- a/.changeset/sweep-compute-reuse.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Sweep compute is reused and pipelined: simulation workers persist across batches, surface cells sample in batched chunks in quad-tree order across the CPU pool, the navigator's selection streams first while the ladder pipelines its rungs, and one GPU backend (device, shader, calibration) with a small preview tile serves a session's batches. The surface reads a cell's value from the last sampled frame, so terminating nets fill it; charts mount their axes when the drawer opens and apply data once per animation frame. diff --git a/.changeset/sweep-drawer-ux.md b/.changeset/sweep-drawer-ux.md deleted file mode 100644 index aafe2724876..00000000000 --- a/.changeset/sweep-drawer-ux.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut": patch -"@hashintel/petrinaut-core": patch ---- - -The frame inspector draws a frame's distribution as a canvas histogram with value and count axes. Distribution frames carry their bins' extent and heatmaps paint each bin across the rows it covers, so mixed strides no longer stripe, and streamed updates ease in instead of snapping. The sweep surface navigates by drag as well as click and marks the navigator's position, and the summary lists every batch computing in parallel. Parameter sweeps and the optimization surface are experimental settings, off by default. diff --git a/.changeset/sweep-surface-contour.md b/.changeset/sweep-surface-contour.md deleted file mode 100644 index 9b5c24e59ec..00000000000 --- a/.changeset/sweep-surface-contour.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Sweeps with two or more swept parameters gain a Surface section: a contour of a metric's final value over two chosen parameters, filled in live on a background lane. Clicking it moves the navigator to the nearest combination. diff --git a/.changeset/token-independent-lambda-fast-path.md b/.changeset/token-independent-lambda-fast-path.md deleted file mode 100644 index 5c4a630e05a..00000000000 --- a/.changeset/token-independent-lambda-fast-path.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -Transitions whose lambda reads no input tokens skip combination enumeration and evaluate the lambda once against the first tokens in place order. Trajectories are unchanged for every seed. diff --git a/.changeset/trial-replicates-parallel.md b/.changeset/trial-replicates-parallel.md deleted file mode 100644 index 958d0e224d6..00000000000 --- a/.changeset/trial-replicates-parallel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch ---- - -Optimization trials run their seeded replicates in parallel as one sharded experiment. The Monte Carlo worker protocol attaches to any thread runtime, and the CLI's `--threads ` bounds the workers, defaulting to one per core minus one. diff --git a/.changeset/webgpu-experiment-backend.md b/.changeset/webgpu-experiment-backend.md deleted file mode 100644 index 7e08ea0545e..00000000000 --- a/.changeset/webgpu-experiment-backend.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Add an experimental WebGPU compute backend for experiments, chosen per experiment behind a user setting. It runs the net's lowered HIR on the device, declines nets it cannot run so they fall back to the CPU, and agrees with the CPU in distribution rather than seed for seed. A Compilation panel, also behind a setting, shows what the compiler made of each condition, kernel and equation. diff --git a/.changeset/worksheet-focus-primitives.md b/.changeset/worksheet-focus-primitives.md deleted file mode 100644 index 35264776e58..00000000000 --- a/.changeset/worksheet-focus-primitives.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hashintel/petrinaut": patch ---- - -Add the worksheet keyboard-flow primitives (`FocusStack`, `FocusRoot`, `useFocusGrid`, `useFocusStops`): reusable arrow-key routing, per-group focus memory, and roving tab stops for panels composed of grids and controls. diff --git a/.changeset/yaml-import-export.md b/.changeset/yaml-import-export.md deleted file mode 100644 index a384cb42ada..00000000000 --- a/.changeset/yaml-import-export.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@hashintel/petrinaut-core": patch -"@hashintel/petrinaut": patch ---- - -Nets and optimization manifests can be imported and exported in YAML and JSON. diff --git a/libs/@hashintel/brunch-agent/packages/plugin-sdcpn/CHANGELOG.md b/libs/@hashintel/brunch-agent/packages/plugin-sdcpn/CHANGELOG.md new file mode 100644 index 00000000000..2de58e9fc41 --- /dev/null +++ b/libs/@hashintel/brunch-agent/packages/plugin-sdcpn/CHANGELOG.md @@ -0,0 +1,8 @@ +# @hashintel/brunch-agent-plugin-sdcpn + +## 0.0.0 + +### Patch Changes + +- Updated dependencies: + - @hashintel/petrinaut-core@0.0.5 diff --git a/libs/@hashintel/brunch-agent/packages/plugin-sdcpn/package.json b/libs/@hashintel/brunch-agent/packages/plugin-sdcpn/package.json index f8ff9d303f2..46550f6486b 100644 --- a/libs/@hashintel/brunch-agent/packages/plugin-sdcpn/package.json +++ b/libs/@hashintel/brunch-agent/packages/plugin-sdcpn/package.json @@ -1,6 +1,6 @@ { "name": "@hashintel/brunch-agent-plugin-sdcpn", - "version": "0.0.0-private", + "version": "0.0.0", "private": true, "description": "The operational-process domain typology and SDCPN target formalism: Flue-native prompt, job skill, and Petrinaut construction tools.", "license": "AGPL-3.0", diff --git a/libs/@hashintel/ds-components/CHANGELOG.md b/libs/@hashintel/ds-components/CHANGELOG.md index 235c0c2461b..ef31264197b 100644 --- a/libs/@hashintel/ds-components/CHANGELOG.md +++ b/libs/@hashintel/ds-components/CHANGELOG.md @@ -1,5 +1,15 @@ # @hashintel/ds-components +## 0.3.2 + +### Patch Changes + +- Extract the contour plot into a `ContourSurface` component shared by the sweep and optimization surfaces, decouple `SweepNavigator` from the experiments context, and add Storybook stories for each component's states. Sweep navigation is continuous: a point selection uses a single-thumb slider, slider moves commit during the drag, and charts keep their axes, grid and size while frames stream in. `Slider` treats 0 as a real value, and `useElementSize` follows an element that mounts after the first render. ([@kube](https://github.com/kube), [#9421](https://github.com/hashintel/hash/pull/9421)) + +- Optimization studies with two or more optimized numeric parameters gain a Surface section: a contour of the objective over two chosen parameters, computed locally against the study's frozen model, with the study's trials as markers. Sliders and clicks move the selected point, which refines with escalating batches. `Slider` accepts `step` and `onChangeEnd`. ([@kube](https://github.com/kube), [#9398](https://github.com/hashintel/hash/pull/9398)) + +- Add Breadcrumb component ([@alex-e-leon](https://github.com/alex-e-leon), [#9502](https://github.com/hashintel/hash/pull/9502)) + ## 0.3.1 ### Patch Changes diff --git a/libs/@hashintel/ds-components/package.json b/libs/@hashintel/ds-components/package.json index e93af487b05..c6b93b835b8 100644 --- a/libs/@hashintel/ds-components/package.json +++ b/libs/@hashintel/ds-components/package.json @@ -1,6 +1,6 @@ { "name": "@hashintel/ds-components", - "version": "0.3.1", + "version": "0.3.2", "description": "HASH Component Library built with React, Ark UI, and PandaCSS", "license": "(MIT OR Apache-2.0)", "repository": { diff --git a/libs/@hashintel/petrinaut-core/CHANGELOG.md b/libs/@hashintel/petrinaut-core/CHANGELOG.md index e72fdff3823..869919e0554 100644 --- a/libs/@hashintel/petrinaut-core/CHANGELOG.md +++ b/libs/@hashintel/petrinaut-core/CHANGELOG.md @@ -1,5 +1,75 @@ # @hashintel/petrinaut-core +## 0.0.5 + +### Patch Changes + +- Behind the new experimental "Ad-hoc scenarios" setting, the scenario creation form authors scenarios through the ad-hoc form: exposed Variables become the saved scenario's tunable parameters, and the definition persists as `initialState.type: "adhoc"`. ([@kube](https://github.com/kube), [#9368](https://github.com/hashintel/hash/pull/9368)) + +- Add the ad-hoc scenarios user-guide page and register it with the in-app AI assistant's doc reader. ([@kube](https://github.com/kube), [#9290](https://github.com/hashintel/hash/pull/9290)) + +- Ad-hoc scenario synthesis: form state, deterministic `adhoc.*` parameter names, synthesis to a generated code-mode scenario plus optimized fields with typed domains, the transform to optimization-manifest bindings, row-kind cycling and shared-column transitions, place totals, and an LSP session kind that type-checks every value expression. ([@kube](https://github.com/kube), [#9284](https://github.com/hashintel/hash/pull/9284)) + +- Transition kernels, lambdas, and differential equations can now be written as a bare function body ending in `return`, like metrics and scenario code: `input` (or `tokens` for dynamics) and `parameters` are in scope ambiently, with full editor type checking and completions. The `export default TransitionKernel(...)` / `Lambda(...)` / `Dynamics(...)` module form is still accepted, and the editor picks the right checking mode per form. Default templates, built-in examples, and the AI assistant now use the bare form. Visualizers are unchanged. ([@kube](https://github.com/kube), [#9370](https://github.com/hashintel/hash/pull/9370)) + +- Added a command registry for host-rendered command palettes: `createCommandRegistry()` and `combineCommandRegistries()` in core, and `CommandRegistryProvider`, `useCommand(command, { when })`, `useCommands()`, and `formatShortcutKeys()` in `@hashintel/petrinaut/react`. The editor registers its undo/redo, tool, auto-layout, search, and panel commands. Petrinaut ships no palette. ([@kube](https://github.com/kube), [#9457](https://github.com/hashintel/hash/pull/9457)) + +- The layout module exports the canvas geometry: render node dimensions (`compactNodeDimensions`, `classicNodeDimensions`, `getComponentInstanceHeight`), net bounds (`getBoundsOfCenteredBoxes`) and zoom limits (`getMinZoomForBounds`, `ZOOM_PADDING`). `layoutNodeDimensions` is now derived from the render dimensions instead of maintained by hand. ([@kube](https://github.com/kube), [#9352](https://github.com/hashintel/hash/pull/9352)) + +- Add the `@hashintel/petrinaut-core/experiments` entry point: an `ExperimentBackend` interface, a worker-pool implementation of it, and `selectExperimentBackend`, which walks backends in preference order and records every refusal. ([@kube](https://github.com/kube), [#9178](https://github.com/hashintel/hash/pull/9178)) + +- `createJsonDocHandle` accepts `SDCPNInput`, a loose authoring variant of `SDCPN`: extension fields may be omitted and are filled with plain-net defaults by the new `normalizeSDCPN` export. `SDCPNInput` and its member types are exported from the package root. ([@kube](https://github.com/kube), [#8926](https://github.com/hashintel/hash/pull/8926)) + +- The WebGPU backend matches the CPU engine's stochastic semantics and frame numbering, streams metric frames per dispatch chunk, and runs range sweeps from a per-run parameter buffer. It sizes and calibrates metric histograms and typed-place buffers from the model and device instead of refusing or warning, and tiles experiments larger than the device's limits with bit-identical results. Sweep batch instantiation no longer blocks the main thread: scenario compilation is prepared once per experiment and per-run values travel as one typed-array plan. ([@kube](https://github.com/kube), [#9454](https://github.com/hashintel/hash/pull/9454)) + +- Weighted-arc token combinations enumerate lazily in the same lexicographic order, so a transition with a weight-2 coloured input arc no longer materialises every combination per frame. Trajectories are unchanged for every seed. ([@kube](https://github.com/kube), [#9386](https://github.com/hashintel/hash/pull/9386)) + +- Run an experiment's runs in parallel across several Web Workers. ([@kube](https://github.com/kube), [#9162](https://github.com/hashintel/hash/pull/9162)) + + An experiment used to run every one of its runs in a single worker, using one core however many the machine had. Runs are independent, so they now split across one worker per logical core (minus one, so the editor stays responsive), capped at the run count. Measured at ~4x on 8 shards on a 10-core machine. + + Sharding cannot change what an experiment reports. Per-run seeds derive from the run's **global** index rather than its position within a shard, so run _i_ gets the same seed whichever worker owns it, and each worker's per-frame statistics recombine through the metric accumulator monoids (`empty`/`merge`). Output is byte-identical at every shard count while every shard still has an active run. A frame is only finalised once every still-running shard has reported it, with finished shards dropped from that watermark rather than blocking it — so once a whole shard's runs have ended early (for example by deadlock), that shard's completed runs stop contributing samples to later frames, where a single simulator would keep sampling their frozen state. + + Scalar metric frames now carry their pre-reduction accumulator state, because `frameValue` is already reduced and a mean of means is not a mean. + + Hosts can cap or pin parallelism with `experimentShardCount` on `ExperimentsProvider`, or `shardCount` on `createMonteCarloExperiment`. + +- Expose the selection vocabulary as data: `selectionItemTypes` and + `canonicalizeSelection` are available from a dependency-free + `@hashintel/petrinaut-core/selection` entry, so hosts can validate and order + selection coming from a URL or an HTTP request without pulling the model or any + React code. ([@kube](https://github.com/kube), [#9426](https://github.com/hashintel/hash/pull/9426)) + +- Add an optional per-place token capacity. ([@kube](https://github.com/kube), [#9177](https://github.com/hashintel/hash/pull/9177)) + + A place can now declare a maximum number of tokens it will hold, set from the place properties panel. Useful for supply-chain style models with finite storage. It also converts frames from growable to fixed-size, which is the precondition for a fixed-layout GPU or WASM path. + + Capacity participates in transition enablement, following the standard Petri-net capacity constraint: a transition cannot fire if doing so would take any output place above its capacity. Output tokens are applied at the end of a frame, so the check accounts for what transitions earlier in the same frame have already committed. Several transitions feeding one capped place cannot collectively overflow it. + + Deadlock detection includes the same check, so a net whose only remaining transitions are blocked by full output places is reported as deadlocked rather than stepping to `maxTime` with nothing happening. + + Nets without capacities are unaffected: the constraint tables are empty and the hot path skips them. + +- Reject net identifiers that collide with `Object.prototype` member names (`__proto__`, `constructor`, ...) at file import and before simulation, and store user-authored keys in prototype-free records. Place visualizer code now runs under the same sandbox hardening as scenario code. ([@kube](https://github.com/kube), [#9222](https://github.com/hashintel/hash/pull/9222)) + +- Scenario code (parameter overrides, per-place expressions, code-mode initial state) now compiles through the HIR and runs in an interpreter: no `new Function`, no sandbox. Out-of-subset code fails with positioned errors in the editor and at compile. Stricter than the old evaluator: `==` is strict, conditions and `&&`/`||` take booleans, unknown place names in code mode are errors, and array methods beyond `.map`/`.reduce`/`.concat` are unavailable. `Array.from({ length: n }, fn)` desugars to `range(n).map(fn)`. ([@kube](https://github.com/kube), [#9332](https://github.com/hashintel/hash/pull/9332)) + +- SDCPN elements carry an optional `description` (places, transitions, types, subnets, component instances, and the net root) and an optional `metadata` record of JSON values (transitions, subnets, component instances, and the net root). `metadata` is host-defined and opaque to the library. Both fields validate against the entity schemas, survive file import/export, and are preserved when an `SDCPNInput` is normalized. Files written without the fields still validate. ([@CiaranMn](https://github.com/CiaranMn), [#9484](https://github.com/hashintel/hash/pull/9484)) + +- A sweep's range selection runs as one stochastic simulation over the ranges: every run draws its own value per ranged parameter, and the metric distribution over the region streams live. `ExperimentRequest` carries optional per-run overrides (`runs`), forwarded by the worker-pool backend and refused by the WebGPU backend. ([@kube](https://github.com/kube), [#9419](https://github.com/hashintel/hash/pull/9419)) + +- Sweep compute is reused and pipelined: simulation workers persist across batches, surface cells sample in batched chunks in quad-tree order across the CPU pool, the navigator's selection streams first while the ladder pipelines its rungs, and one GPU backend (device, shader, calibration) with a small preview tile serves a session's batches. The surface reads a cell's value from the last sampled frame, so terminating nets fill it; charts mount their axes when the drawer opens and apply data once per animation frame. ([@kube](https://github.com/kube), [#9474](https://github.com/hashintel/hash/pull/9474)) + +- The frame inspector draws a frame's distribution as a canvas histogram with value and count axes. Distribution frames carry their bins' extent and heatmaps paint each bin across the rows it covers, so mixed strides no longer stripe, and streamed updates ease in instead of snapping. The sweep surface navigates by drag as well as click and marks the navigator's position, and the summary lists every batch computing in parallel. Parameter sweeps and the optimization surface are experimental settings, off by default. ([@kube](https://github.com/kube), [#9478](https://github.com/hashintel/hash/pull/9478)) + +- Transitions whose lambda reads no input tokens skip combination enumeration and evaluate the lambda once against the first tokens in place order. Trajectories are unchanged for every seed. ([@kube](https://github.com/kube), [#9389](https://github.com/hashintel/hash/pull/9389)) + +- Optimization trials run their seeded replicates in parallel as one sharded experiment. The Monte Carlo worker protocol attaches to any thread runtime, and the CLI's `--threads ` bounds the workers, defaulting to one per core minus one. ([@kube](https://github.com/kube), [#9358](https://github.com/hashintel/hash/pull/9358)) + +- Add an experimental WebGPU compute backend for experiments, chosen per experiment behind a user setting. It runs the net's lowered HIR on the device, declines nets it cannot run so they fall back to the CPU, and agrees with the CPU in distribution rather than seed for seed. A Compilation panel, also behind a setting, shows what the compiler made of each condition, kernel and equation. ([@kube](https://github.com/kube), [#9179](https://github.com/hashintel/hash/pull/9179)) + +- Nets and optimization manifests can be imported and exported in YAML and JSON. ([@kube](https://github.com/kube), [#9379](https://github.com/hashintel/hash/pull/9379)) + ## 0.0.4 ### Patch Changes diff --git a/libs/@hashintel/petrinaut-core/package.json b/libs/@hashintel/petrinaut-core/package.json index 32b4826b368..1c44bf051fe 100644 --- a/libs/@hashintel/petrinaut-core/package.json +++ b/libs/@hashintel/petrinaut-core/package.json @@ -1,6 +1,6 @@ { "name": "@hashintel/petrinaut-core", - "version": "0.0.4", + "version": "0.0.5", "description": "Headless Petrinaut core APIs", "license": "(MIT OR Apache-2.0)", "repository": { diff --git a/libs/@hashintel/petrinaut/CHANGELOG.md b/libs/@hashintel/petrinaut/CHANGELOG.md index e3fe35fe7c0..35196e497d7 100644 --- a/libs/@hashintel/petrinaut/CHANGELOG.md +++ b/libs/@hashintel/petrinaut/CHANGELOG.md @@ -1,5 +1,148 @@ # @hashintel/petrinaut +## 0.0.20 + +### Patch Changes + +- Arc weight labels sit on the Adaptive Bezier curve instead of floating at the straight-line midpoint between the arc's endpoints. ([@kube](https://github.com/kube), [#9354](https://github.com/hashintel/hash/pull/9354)) + +- The create-experiment drawer accepts an ad-hoc scenario when "No scenario" is selected: Initial State + Parameters defined inline compile through a generated, never-persisted scenario at experiment start. ([@kube](https://github.com/kube), [#9288](https://github.com/hashintel/hash/pull/9288)) + +- Fix three defects in the ad-hoc scenario form: the optimize bounds popover + ignored every press (Min, Max, Step and Scale were uneditable, and each press + dismissed it), a focused section painted over the sticky header of the section + hosting it, and the experiment drawer's computed initial state grew unbounded + instead of scrolling in its own region. ([@kube](https://github.com/kube), [#9473](https://github.com/hashintel/hash/pull/9473)) + +- The create-optimization drawer offers "Ad-hoc (define inline)": Initial State + Parameters with Optimize selections compile to a generated, never-persisted scenario whose generated parameters the optimization manifest binds to their optimize domains. ([@kube](https://github.com/kube), [#9289](https://github.com/hashintel/hash/pull/9289)) + +- Quick simulation runs an ad-hoc scenario when none is selected: a "Define initial state" drawer in the simulation settings panel edits token counts and values that compile through a generated, never-persisted scenario. ([@kube](https://github.com/kube), [#9287](https://github.com/hashintel/hash/pull/9287)) + +- Behind the new experimental "Ad-hoc scenarios" setting, the scenario creation form authors scenarios through the ad-hoc form: exposed Variables become the saved scenario's tunable parameters, and the definition persists as `initialState.type: "adhoc"`. ([@kube](https://github.com/kube), [#9368](https://github.com/hashintel/hash/pull/9368)) + +- Add the ad-hoc scenarios user-guide page and register it with the in-app AI assistant's doc reader. ([@kube](https://github.com/kube), [#9290](https://github.com/hashintel/hash/pull/9290)) + +- The ad-hoc scenario form matches the ratified prototype: gutter-cycled row kinds (fixed → dynamic → count-optimized) with quiet count strips, shared columns with a wash and derived cells, a phantom trailing row, place totals, compact Variables blocks, and Monaco expression editors type-checked live through a new ad-hoc LSP session with diagnostics rendered on closed cells. ([@kube](https://github.com/kube)) + +- Transition kernels, lambdas, and differential equations can now be written as a bare function body ending in `return`, like metrics and scenario code: `input` (or `tokens` for dynamics) and `parameters` are in scope ambiently, with full editor type checking and completions. The `export default TransitionKernel(...)` / `Lambda(...)` / `Dynamics(...)` module form is still accepted, and the editor picks the right checking mode per form. Default templates, built-in examples, and the AI assistant now use the bare form. Visualizers are unchanged. ([@kube](https://github.com/kube), [#9370](https://github.com/hashintel/hash/pull/9370)) + +- The canvas renders centered on the net from its first frame, instead of jumping there after a first paint at the origin. Component instances grow with their port count so their ports have room, and auto-layout on import no longer depends on the compact/classic setting. ([@kube](https://github.com/kube), [#9352](https://github.com/hashintel/hash/pull/9352)) + +- Remember the canvas viewport per net, so switching between nets or reloading returns to the same position and zoom. ([@kube](https://github.com/kube), [#9510](https://github.com/hashintel/hash/pull/9510)) + +- Added a command registry for host-rendered command palettes: `createCommandRegistry()` and `combineCommandRegistries()` in core, and `CommandRegistryProvider`, `useCommand(command, { when })`, `useCommands()`, and `formatShortcutKeys()` in `@hashintel/petrinaut/react`. The editor registers its undo/redo, tool, auto-layout, search, and panel commands. Petrinaut ships no palette. ([@kube](https://github.com/kube), [#9457](https://github.com/hashintel/hash/pull/9457)) + +- The experiment and optimization result drawers keep the summary, navigator and surface still at the top; only the step and metric lists scroll, with the step table's header pinned. ([@kube](https://github.com/kube), [#9422](https://github.com/hashintel/hash/pull/9422)) + +- Experiments can sweep scenario parameters. A Sweep toggle per numeric parameter defines the values, and the results drawer gains a navigator: only the selected combination computes, in escalating run batches that stream into the charts, and visited combinations keep their results. ([@kube](https://github.com/kube), [#9093](https://github.com/hashintel/hash/pull/9093)) + +- The WebGPU backend matches the CPU engine's stochastic semantics and frame numbering, streams metric frames per dispatch chunk, and runs range sweeps from a per-run parameter buffer. It sizes and calibrates metric histograms and typed-place buffers from the model and device instead of refusing or warning, and tiles experiments larger than the device's limits with bit-identical results. Sweep batch instantiation no longer blocks the main thread: scenario compilation is prepared once per experiment and per-run values travel as one typed-array plan. ([@kube](https://github.com/kube), [#9454](https://github.com/hashintel/hash/pull/9454)) + +- Distribution heatmaps in experiment metric charts render as a magma-coloured density image in one draw call, so they stay fast at high run counts. ([@kube](https://github.com/kube), [#9450](https://github.com/hashintel/hash/pull/9450)) + +- Swept parameters declare an interval instead of a value count, and the navigator becomes a range slider per parameter: the whole interval by default, resizable, collapsible to a point. A range selection samples the region and streams the merged distribution over it. The slider is a two-thumb range control local to the navigator, whose thumbs may coincide. ([@kube](https://github.com/kube), [#9396](https://github.com/hashintel/hash/pull/9396)) + +- Extract the contour plot into a `ContourSurface` component shared by the sweep and optimization surfaces, decouple `SweepNavigator` from the experiments context, and add Storybook stories for each component's states. Sweep navigation is continuous: a point selection uses a single-thumb slider, slider moves commit during the drag, and charts keep their axes, grid and size while frames stream in. `Slider` treats 0 as a real value, and `useElementSize` follows an element that mounts after the first render. ([@kube](https://github.com/kube), [#9421](https://github.com/hashintel/hash/pull/9421)) + +- Optimization studies with two or more optimized numeric parameters gain a Surface section: a contour of the objective over two chosen parameters, computed locally against the study's frozen model, with the study's trials as markers. Sliders and clicks move the selected point, which refines with escalating batches. `Slider` accepts `step` and `onChangeEnd`. ([@kube](https://github.com/kube), [#9398](https://github.com/hashintel/hash/pull/9398)) + +- Run an experiment's runs in parallel across several Web Workers. ([@kube](https://github.com/kube), [#9162](https://github.com/hashintel/hash/pull/9162)) + + An experiment used to run every one of its runs in a single worker, using one core however many the machine had. Runs are independent, so they now split across one worker per logical core (minus one, so the editor stays responsive), capped at the run count. Measured at ~4x on 8 shards on a 10-core machine. + + Sharding cannot change what an experiment reports. Per-run seeds derive from the run's **global** index rather than its position within a shard, so run _i_ gets the same seed whichever worker owns it, and each worker's per-frame statistics recombine through the metric accumulator monoids (`empty`/`merge`). Output is byte-identical at every shard count while every shard still has an active run. A frame is only finalised once every still-running shard has reported it, with finished shards dropped from that watermark rather than blocking it — so once a whole shard's runs have ended early (for example by deadlock), that shard's completed runs stop contributing samples to later frames, where a single simulator would keep sampling their frozen state. + + Scalar metric frames now carry their pre-reduction accumulator state, because `frameValue` is already reduced and a mean of means is not a mean. + + Hosts can cap or pin parallelism with `experimentShardCount` on `ExperimentsProvider`, or `shardCount` on `createMonteCarloExperiment`. + +- Add a `navigation` prop to `Petrinaut`: a router-neutral controller through + which the host can read and drive the app location (mode, Simulate section and + resource, scenario, subnet, selection, and creation drawers), making them real + browser history destinations. A creation drawer now layers over the record + already open instead of closing it, and the hamburger menu hides **Layout** on + a read-only net. ([@kube](https://github.com/kube), [#9426](https://github.com/hashintel/hash/pull/9426)) + +- Add an optional per-place token capacity. ([@kube](https://github.com/kube), [#9177](https://github.com/hashintel/hash/pull/9177)) + + A place can now declare a maximum number of tokens it will hold, set from the place properties panel. Useful for supply-chain style models with finite storage. It also converts frames from growable to fixed-size, which is the precondition for a fixed-layout GPU or WASM path. + + Capacity participates in transition enablement, following the standard Petri-net capacity constraint: a transition cannot fire if doing so would take any output place above its capacity. Output tokens are applied at the end of a frame, so the check accounts for what transitions earlier in the same frame have already committed. Several transitions feeding one capped place cannot collectively overflow it. + + Deadlock detection includes the same check, so a net whose only remaining transitions are blocked by full output places is reported as deadlocked rather than stepping to `maxTime` with nothing happening. + + Nets without capacities are unaffected: the constraint tables are empty and the hot path skips them. + +- Export the `EditorGlobalMode` and `SimulateViewMode` types, so a host encoding Petrinaut's navigation state into its own router can spell both vocabularies and fail its build when either gains a member. ([@kube](https://github.com/kube), [#9491](https://github.com/hashintel/hash/pull/9491)) + +- Reject net identifiers that collide with `Object.prototype` member names (`__proto__`, `constructor`, ...) at file import and before simulation, and store user-authored keys in prototype-free records. Place visualizer code now runs under the same sandbox hardening as scenario code. ([@kube](https://github.com/kube), [#9222](https://github.com/hashintel/hash/pull/9222)) + +- Scenario code (parameter overrides, per-place expressions, code-mode initial state) now compiles through the HIR and runs in an interpreter: no `new Function`, no sandbox. Out-of-subset code fails with positioned errors in the editor and at compile. Stricter than the old evaluator: `==` is strict, conditions and `&&`/`||` take booleans, unknown place names in code mode are errors, and array methods beyond `.map`/`.reduce`/`.concat` are unavailable. `Array.from({ length: n }, fn)` desugars to `range(n).map(fn)`. ([@kube](https://github.com/kube), [#9332](https://github.com/hashintel/hash/pull/9332)) + +- The place, transition, component-instance, and type properties panels display and allow editing of the element's optional `description`. ([@CiaranMn](https://github.com/CiaranMn), [#9484](https://github.com/hashintel/hash/pull/9484)) + +- Range sweeps rotate each axis's low-discrepancy parameter draws by a seed-derived shift, so experiments with different seeds explore different value sequences. ([@kube](https://github.com/kube), [#9435](https://github.com/hashintel/hash/pull/9435)) + +- Sidebar list labels use the full row width and truncate with an ellipsis consistently; the row menu button only takes space while hovering the row or while its menu is open. ([@kube](https://github.com/kube), [#9377](https://github.com/hashintel/hash/pull/9377)) + +- Add generic host-rendered AI composer controls and a persistent inline Voice session, protected + active conversations, keyboard fallback, and one-answer buffering while the normal chat stream + settles. Add the provider-neutral `renderVoiceMode` contract and export `PetrinautAiInputMode`, with + the selected input mode and mode-change callback available to host-rendered Voice modes. Include + stable finalized-text submission, conversation identity, stop handling, schema-validated + interactive-tool text mapping, explicit separate-message targeting for corrections, and a + queue-aware voice submission path. Present text and voice through one transcript and composer whose + trailing action switches between waveform, Send, and Stop. `renderComposerControl` remains a + supported public seam for hosts that only need their own control beside the message box, + independently of Voice mode. Surface assistant request failures as error toasts instead of + transcript entries. ([@kostandinang](https://github.com/kostandinang), [#9355](https://github.com/hashintel/hash/pull/9355)) + + Render every live Voice surface from a session snapshot the host reports through + `reportVoiceSessionState`, so hosts describe their session while Petrinaut owns its chrome. Replace + the composer with a low-profile Voice dock -- a canvas ribbon of three travelling waves, one leading + and two trailing it more faintly, fading out at both ends, opening with the microphone while + listening and moving under its own power through the same drawing path while the assistant speaks, + near flat while neither holds the turn, and naming one phase at a time -- with an announced phase and + reduced-motion behavior. Curve the raw microphone level before it drives the waves, so an ordinary + speaking level is plainly visible rather than a flicker above the line and a raised voice still has + somewhere to go. Sample the level per animation frame rather than through React, so drawing costs no + re-renders, and ease it against the frame delta so it looks the same at any refresh rate. Hold spoken + turns out of the transcript until the session ends, then reveal them together under a turn-count + divider, while typed messages and interactive tools awaiting an answer stay visible throughout. Let a + per-session Show transcription in chat action write those turns into the conversation as they land + instead. Keep every session control -- transcription, the microphone toggle, Resume, Reconnect, and + End -- in the dock, leaving the canvas toolbar untouched. Add `setMicrophoneMuted` to the Voice mode + controls and a `muted` session phase, so muting stops capture without interrupting what the assistant + is saying, unlike pausing. Surface voice recovery failures as toasts with privacy-safe diagnostic + references, and request one-time consent before the host starts the microphone. Mark persisted spoken + messages and the exact interactive-tool answer completed by Voice with an inline Voice chip ahead of + the words themselves. + + End Voice mode before submitting typed text exactly once through the shared composer, preserving the + draft if handoff fails. Pause active media before the AI panel closes and reopen the mounted session + paused. Provisional transcription and Realtime audio remain ephemeral rather than becoming + persisted chat history. + +- Storybook gains a "With real optimizer" story that runs optimization studies against a local Petrinaut Optimizer service; start it with `turbo run dev --filter @hashintel/petrinaut -- --with-optimizer-service`. ([@kube](https://github.com/kube), [#9395](https://github.com/hashintel/hash/pull/9395)) + +- A sweep's range selection runs as one stochastic simulation over the ranges: every run draws its own value per ranged parameter, and the metric distribution over the region streams live. `ExperimentRequest` carries optional per-run overrides (`runs`), forwarded by the worker-pool backend and refused by the WebGPU backend. ([@kube](https://github.com/kube), [#9419](https://github.com/hashintel/hash/pull/9419)) + +- Sweep compute is reused and pipelined: simulation workers persist across batches, surface cells sample in batched chunks in quad-tree order across the CPU pool, the navigator's selection streams first while the ladder pipelines its rungs, and one GPU backend (device, shader, calibration) with a small preview tile serves a session's batches. The surface reads a cell's value from the last sampled frame, so terminating nets fill it; charts mount their axes when the drawer opens and apply data once per animation frame. ([@kube](https://github.com/kube), [#9474](https://github.com/hashintel/hash/pull/9474)) + +- The frame inspector draws a frame's distribution as a canvas histogram with value and count axes. Distribution frames carry their bins' extent and heatmaps paint each bin across the rows it covers, so mixed strides no longer stripe, and streamed updates ease in instead of snapping. The sweep surface navigates by drag as well as click and marks the navigator's position, and the summary lists every batch computing in parallel. Parameter sweeps and the optimization surface are experimental settings, off by default. ([@kube](https://github.com/kube), [#9478](https://github.com/hashintel/hash/pull/9478)) + +- Sweeps with two or more swept parameters gain a Surface section: a contour of a metric's final value over two chosen parameters, filled in live on a background lane. Clicking it moves the navigator to the nearest combination. ([@kube](https://github.com/kube), [#9369](https://github.com/hashintel/hash/pull/9369)) + +- Add an experimental WebGPU compute backend for experiments, chosen per experiment behind a user setting. It runs the net's lowered HIR on the device, declines nets it cannot run so they fall back to the CPU, and agrees with the CPU in distribution rather than seed for seed. A Compilation panel, also behind a setting, shows what the compiler made of each condition, kernel and equation. ([@kube](https://github.com/kube), [#9179](https://github.com/hashintel/hash/pull/9179)) + +- Add the worksheet keyboard-flow primitives (`FocusStack`, `FocusRoot`, `useFocusGrid`, `useFocusStops`): reusable arrow-key routing, per-group focus memory, and roving tab stops for panels composed of grids and controls. ([@kube](https://github.com/kube), [#9411](https://github.com/hashintel/hash/pull/9411)) + +- Nets and optimization manifests can be imported and exported in YAML and JSON. ([@kube](https://github.com/kube), [#9379](https://github.com/hashintel/hash/pull/9379)) + +- Updated dependencies: + - @hashintel/petrinaut-core@0.0.5 + - @hashintel/ds-components@0.3.2 + ## Unreleased ### Patch Changes diff --git a/libs/@hashintel/petrinaut/package.json b/libs/@hashintel/petrinaut/package.json index 6bcb0ebe27d..6d4b3353350 100644 --- a/libs/@hashintel/petrinaut/package.json +++ b/libs/@hashintel/petrinaut/package.json @@ -1,6 +1,6 @@ { "name": "@hashintel/petrinaut", - "version": "0.0.19", + "version": "0.0.20", "description": "A visual editor for Petri nets", "license": "(MIT OR Apache-2.0)", "repository": {