Skip to content

FE-1653: Ground every Brunch conversation in the current Petrinaut net - #9637

Open
kostandinang wants to merge 52 commits into
mainfrom
kostandin/fe-1653-ground-brunch-current-net
Open

FE-1653: Ground every Brunch conversation in the current Petrinaut net#9637
kostandinang wants to merge 52 commits into
mainfrom
kostandin/fe-1653-ground-brunch-current-net

Conversation

@kostandinang

@kostandinang kostandinang commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Brunch can currently ask users to attach or describe a Petri net that is already open in Petrinaut. This change grounds ordinary Brunch conversations in a fresh browser snapshot before answering requests to explain, review, or interview about the current net.

It consolidates the intended behavior from two retired workstreams into the mounted Flue path without exposing mutation tools, adding a parallel Voice context route, or caching canvas state.

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Mounts getLatestNetDefinition for every SDCPN Brunch conversation while keeping all mutation tools mode-gated.
  • Requires one fresh current-net read per net-referential user turn and rejects duplicate reads in the same continuation.
  • Uses one browser client-tool catalog for live panel transport and hydrated history.
  • Preserves current-net snapshots as correlated client-tool-result machine evidence.
  • Adds deterministic two-turn coverage proving changed snapshots, preserved call IDs, no duplicate user turns, and no provider-executed browser tools.
  • Documents on-demand grounding for typed and completed Voice input.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file

📜 Does this require a change to the docs?

The changes in this PR:

  • require changes to docs which are made as part of this PR

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • The paid-provider browser and audible Voice witness was not run because this checkout only has the repository dummy provider key. Deterministic integration tests cover the shared submission and grounding path.

🐾 Next steps

  • None required for this read-only grounding change. Automatic construction and answer provenance remain separate workstreams.

🛡 What tests cover this?

  • Brunch agent unit and production-path deterministic integration tests.
  • Petrinaut website transport and hydrated-history tests.
  • SDCPN plugin tool-gating and public-entrypoint tests.
  • Petrinaut documentation tests.

❓ How to test this?

  1. Checkout this branch above PR FE-1604: Allow Voice interruption by speaking #9619.
  2. Open an ordinary non-empty SIR net in Petrinaut with Brunch configured.
  3. Click Explain this model and confirm the answer names visible SIR elements instead of requesting an attachment.
  4. Change a visible net fact, ask again, and confirm the next answer reflects the changed state.
  5. Confirm ordinary conversations cannot call any Petrinaut mutation tool.

📹 Demo

pr-9637-current-net-demo.mp4

This 10.8-second deterministic local browser witness uses no provider credentials. It shows the SIR model grounded, a visible title change, and a second fresh-net read producing the updated answer. It is not evidence of paid-provider output.

kostandinang and others added 24 commits September 9, 2026 11:19
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated
hash Ignored Ignored Preview Sep 10, 2026 3:44pm UTC
hashdotdesign-tokens Ignored Ignored Preview Sep 10, 2026 3:44pm UTC
petrinaut Skipped Skipped Sep 10, 2026 3:44pm UTC
petrinaut-docs Skipped Skipped Sep 10, 2026 3:44pm UTC

Request Review

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/tests New or updated tests area/apps labels Sep 10, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 10, 2026 14:29 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 10, 2026 14:29 Inactive

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d1b31a9. Configure here.

Comment thread libs/@hashintel/brunch-agent/packages/plugin-sdcpn/src/flue.ts Outdated
kostandinang and others added 3 commits September 10, 2026 17:23
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 10, 2026 15:43 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 10, 2026 15:43 Inactive
@github-actions github-actions Bot removed the area/apps > hash.design Affects the `hash.design` design site (app) label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant