H-6763: Add a generic Petrinaut composer submission API - #9355
H-6763: Add a generic Petrinaut composer submission API#9355kostandinang wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
359afce to
5ce8bb3
Compare
3152049 to
5b2cf27
Compare
Expose stable host-owned composer controls, conversation identity, and schema-validated text mapping through the existing AI SDK chat path. Record the app-owned OpenAI voice boundary and the production contracts that gate rollout. Amp-Thread-ID: https://ampcode.com/threads/T-01a03fb3-fd3d-737f-b4c6-1fc9282950bf Co-authored-by: Amp <amp@ampcode.com>
Preserve automatic pending-tool correlation for ordinary submissions while letting explicit corrections bypass a pending interactive ask. Document and test the generic target contract at the Petrinaut boundary. Amp-Thread-ID: https://ampcode.com/threads/T-01a03fb3-fd3d-737f-b4c6-1fc9282950bf Co-authored-by: Amp <amp@ampcode.com>
5b2cf27 to
3e9d09b
Compare
PR SummaryMedium Risk Overview
Docs and governance record the boundary in ADR-0009, S-012, the Petrinaut integration attach contract (fourth seam: composer submission), steering/index updates, user guide, changeset, and changelog. Reviewed by Cursor Bugbot for commit 0e49270. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3e9d09b. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>


🌟 What is the purpose of this PR?
Add a provider-neutral API for controls embedded in Petrinaut's AI composer. A host can submit finalized text—voice transcripts are the first consumer—through the same AI SDK conversation and correlated interactive-tool path used by keyboard submissions.
This PR deliberately contains no OpenAI, audio, or Brunch-specific runtime code.
🔗 Related links
🚫 Blocked by
🔍 What does this change?
renderComposerControl, allowing an application-owned control to render beside the Petrinaut composer.submitTextandstopcallbacks.useChatID, whether supplied by the host or generated by the SDK.useChatinstance.target: "message"explicitly submits a normal message without consuming a pending tool, which supports later correction turns.fromComposerTextmapper.Stack record: direct base
359afceabaac841b8e6d88f877e5daaf92026528; #9345 head146d7895d41eaf7092571ff36b4b08bba7cc18ed; #9346 head359afceabaac841b8e6d88f877e5daaf92026528.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
The existing AI-assistant guide has no screenshot for this surface, so no screenshot is made stale.
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
🛡 What tests cover this?
ai-assistant-panel.test.tsx,ai-assistant-contents.test.tsx, and the interactive-tool registry tests cover effective/generated conversation identity, callback freshness, shared keyboard/control submission, stable IDs, mapping validation, correlated tool output, ambiguity, duplicate suppression, explicit message targeting, and stop behavior.Validation run
Results: 214 Petrinaut tests, 4 website tests, 12 transport tests, and 35 Brunch tests passed. Lint, typecheck, build, formatting, and architecture-doc checks passed. Transport emitted 4 inherited
no-await-in-loopwarnings and Brunch emitted 12 inherited warnings.The direct-base no-ElevenLabs audit and
git diff --checkpassed. No package, lockfile, environment, or deployment configuration changed. No provider credential check applies to this PR.❓ How to test this?
yarn workspace @hashintel/petrinaut test:unit --run src/ui/views/Editor/panels/ai-assistant-panel.test.tsx.target: "message"leaves a pending tool untouched.📹 Demo
Not applicable: this PR adds a host integration API without a new standalone user experience.