github hashintel/hash @hashintel/petrinaut@0.0.20

4 hours ago

Patch Changes

  • Scenarios are written in one form that defines initial state, parameters and variables inline, with type-checked expression editors. Experiments, optimizations and quick simulation can run an ad-hoc scenario defined inline when no saved scenario is selected. (@kube)

  • Hosts can register validated AI tools that run automatically against the editor. ErrorTrackerContext.captureException accepts an optional { source, tags } context, and the assistant reports its failures there. (@lunelson, #9649)

  • Transition kernels, lambdas and differential equations can be written as a bare function body ending in return. The export default module form still works. (@kube, #9370)

  • The bottom toolbar moves aside when a side panel would cover it, and collapses to its essential controls when space is narrow. (@kube, #9533)

  • ExperimentHostContext.runExperiment runs a validated experiment of up to 100,000 runs, with progress callbacks, cancellation and captured results. (@kube, #9676)

  • Hosts can inspect or refuse AI edits through aiAssistant.executeMutation, add their own assistant tab, and follow the canonical conversation history. (@lunelson, #9562)

  • Hosts can run AI tool calls themselves while the response streams, through aiAssistant.inBandBrowserTools, and apply one AI edit with executePetrinautAiMutation. (@lunelson, #9811)

  • Host assistant tools can read editor commands, current diagnostics, optimizer availability and user-guide content. (@lunelson, #9667)

  • Hosts can label assistant tabs, flag unseen tab activity, show tool results as pending or refused, show approval controls on matching tool calls, and make Stop durable before the stream is cancelled. (@lunelson, #9722)

  • Large nets play back and respond to hover faster: only changed nodes re-render, firing animations run only in view, and a closed timeline stops drawing. (@kube, #9592)

  • Hovering or selecting a node highlights its inputs in blue and its outputs in orange, and the Highlight on hover setting turns the hover highlight off. (@kube, #9591)

  • The canvas opens centred on the net and remembers each net's position and zoom. Component instances grow to fit their ports, and auto-layout on import ignores the compact/classic setting. (@kube, #9352)

  • Add a command registry for host-rendered command palettes: createCommandRegistry and combineCommandRegistries in core, and CommandRegistryProvider, useCommand, useCommands and formatShortcutKeys in @hashintel/petrinaut/react. (@kube, #9457)

  • Copying notification details shows whether the copy succeeded, with a fallback when the Clipboard API refuses it. (@kostandinang, #9792)

  • createExperiment resolves with the experiment record, which now carries the scenario it compiled (ExperimentRecord.scenario), and no longer selects it. (@kube, #9689)

  • Canvas nodes have a lighter style: places are circles, and transitions are rectangles showing an icon, the wrapped name and the transition type. Arc weight labels sit on the curve. (@kube, #9595)

  • The left panel always shows the Entities tree, which replaces the separate entity lists and the "Entities tree view" setting. (@kube, #9597)

  • Hosts can offer retries for failed experiment runs and report experiment activity to the assistant composer. (@kostandinang, #9857)

  • Experiments can sweep numeric scenario parameters over intervals. A range-slider navigator selects a point or region, metric distributions stream in live, and a Surface plots a contour over two parameters. (@kube, #9093)

  • Add aiAssistant.presentation, which selects the Brunch conversation layout: each turn's reasoning and tool calls group under a collapsible Activity row above the answer. The stock layout stays the default. (@kostandinang, #9829)

  • prepareExperiment is exported from @hashintel/petrinaut/react, so a host can resolve an experiment request against the live model without starting a run. (@kostandinang, #9771)

  • Optimization studies run from a sweep's Parameters card, replacing the Optimizations tab. A study can run in the browser, be stopped and continued with more steps, and keeps its best parameters available through View best. (@kube, #9685)

  • Cmd/Ctrl+click adds a node to the selection or removes it, and a selection box drawn with Cmd/Ctrl held adds to the selection. (@vilkinsons, #9895)

  • Experiments split their runs across Web Workers, one per logical core minus one, with identical results at any worker count. experimentShardCount on ExperimentsProvider and shardCount on createMonteCarloExperiment cap the parallelism. (@kube, #9162)

  • Update the ai dependency to 6.0.286 and @ai-sdk/react to 3.0.289. (@TimDiekmann, #9849)

  • Add a navigation prop to Petrinaut, a router-neutral controller through which a host reads and drives the editor's location as browser history. EditorGlobalMode and SimulateViewMode are exported for hosts that encode it. (@kube, #9426)

  • Editor icons come from @hashintel/ds-icons, a new dependency, with animated hover and state effects. Hosts that compile styles from @hashintel/petrinaut/panda.buildinfo.json must also include @hashintel/ds-icons/panda.buildinfo.json. (@aacarcrash, #9981)

  • New entities get UUID ids. Links, scenarios and subnet references that use older ids still resolve, and canonicalizePetrinautIds is re-exported. (@kube, #9957)

  • Add PetrinautPreview to @hashintel/petrinaut/preview: a compact read-only embed with optional Quick Simulation from precompiled HIR, and a Full view link from fullViewUrl. (@kube, #9545)

  • Allow hosts to render application-specific content in the Labs settings section. (@kostandinang, #9793)

  • Adds a palette command that starts a blank net when the host manages nets. (@kube, #9946)

  • Add a plugin API: <Petrinaut plugins> takes plugins that add buttons, top-bar items, commands, settings and UI, listed under Plugins in User settings. (@kube, #9904)

  • Add a presentationProfile prop to Petrinaut (editor or review) that hides authoring-only controls in review. (@kube, #9425)

  • Remove slots.topBarStart, slots.topBarEnd, slots.titleStyle and the viewportActions prop from <Petrinaut>, the ViewportAction type, and the built-in welcome guide with its Walkthrough* exports and setting. Plugins replace them. (@kube, #9913)

  • User Settings open in a movable, resizable dialog with keyboard-accessible sections. (@kube)

  • A place's state visualizer opens from the hovered place, with or without a run, and can be pinned while scrubbing the timeline. (@kube, #9601)

  • Places can declare a maximum token capacity, and a transition cannot fire if it would take an output place over capacity. (@kube, #9177)

  • The playback readout shows elapsed and total simulated time instead of frame numbers. (@kube, #9598)

  • Sidebar, toolbar and properties panel styling is more consistent, with clickable checkbox labels and list labels that use the full row width. (@kube, #9728)

  • Add experimental automatic arc connections, drawn from one hover handle, with curves that follow node outlines. (@kube, #9677)

  • The AI assistant docks on the right or floats as a movable, resizable panel, and Cmd/Ctrl+Shift+K toggles it. (@kube, #9659)

  • On read-only nets, property values show as text instead of disabled inputs, and a blocked edit shows a brief notice that a plugin can extend with an action. (@kube, #9596)

  • An AI edit that leaves the document unchanged is reported as not applied. (@lunelson, #9537)

  • Experiment and Scenario panels are resizable, routed and keyboard-selectable, and can open fullscreen. (@kube, #9723)

  • Net identifiers named after Object.prototype members, such as __proto__, are rejected at import and before simulation. Place visualizer code runs under the same sandbox as scenario code. (@kube, #9222)

  • 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, .reduce and .concat array methods are available. (@kube, #9332)

  • Properties panels show and edit an element's optional description. (@CiaranMn, #9484)

  • ExperimentExecutionCard is exported from @hashintel/petrinaut/ui, so host assistants can show experiment and optimization progress with the built-in UI. (@kostandinang, #9800)

  • Experiment and optimization drawers share one layout: a condensing header, a Parameters band, and fixed-height metric cards with a Chart options menu, an Enlarge button and faster distribution heatmaps. (@kube, #9607)

  • The AI assistant can run experiments and optimizations from chat, with progress, cancellation and a link to the results. (@kube, #9678)

  • Hosts can add a Voice mode to the AI assistant with renderVoiceMode and report its state with reportVoiceSessionState. PetrinautAiInputMode is exported, Voice mode controls gain setMicrophoneMuted, and renderComposerControl still adds a control beside the message box. (@kostandinang, #9355)

  • A tool stopped mid-run shows Cancelled, and a message the host has accepted no longer returns to the composer if its stream later fails. (@kostandinang, #9883)

  • Code sections expand to fill the Properties panel, and Canvas and Definitions are Edit views with browser history navigation. (@kube, #9664)

  • During a Voice session a compact dock replaces the composer, with a live waveform, microphone mute, interruption by speaking, audio and voice settings, and errors behind a warning icon. (@kostandinang, #9671)

  • UserSettingsProvider is exported from @hashintel/petrinaut/react, so hosts can read and change user settings from components above Petrinaut. (@kube, #9634)

  • Hosts can withdraw a pending voice input with an AbortSignal, and show original voice transcripts through an optional message display projection. (@kostandinang, #9836)

  • 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)

  • Restore design-system component styles in Petrinaut builds on Windows. (@aacarcrash, #9808)

  • Export keyboard-focus primitives for panels built from grids and controls: FocusStack, FocusRoot, useFocusGrid and useFocusStops. (@kube, #9411)

  • Nets and optimization manifests can be imported and exported in YAML and JSON. (@kube, #9379)

  • Updated dependencies:

    • @hashintel/petrinaut-core@0.0.5
    • @hashintel/ds-components@0.4.0
    • @hashintel/ds-icons@0.0.1
    • @hashintel/refractive@0.0.5

Don't miss a new hash release

NewReleases is sending notifications on new releases.