mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-25 10:42:45 +00:00
The rpiv ask_user_question adapter kept one `active` state for the whole session and opened its question card at tool start. Two consequences: - A questionnaire pi rejects against its own schema caps (header > 16, label > 60) still rendered a card, because this adapter's schema had no caps. The user sees a second, identical form with no tool behind it, and interacting with it resolves against the live questionnaire. - A card for a finished or foreign call cancelled the live questionnaire: `respondToPermission` only compared against the single active callId, and any deny set `cancelled`, which the provider package turns into "User declined to answer questions" with zero recorded answers. Now the adapter mirrors pi's caps so a rejected call never opens a form, tracks one form per callId, opens the form when the tool actually asks (its first dialog) instead of at tool start, and resolves dialogs of an ended call with an empty reply instead of touching a live form. Tests: 4 new cases (cap-rejected call opens nothing, two concurrent questionnaires stay independent, stale form resolves nothing, form opens on ask). 7 of the 9 cases in this file fail against the previous implementation.