fix(assistant): a journey's session no longer attaches delete_journey

isHeldInJourney took every tool of the journey's controllers from the Studio
side, delete_journey among them. The Studio never offered it (its writes are
the book's), so leaving it unattached changes nothing the model sees and
keeps the denial in one place.
This commit is contained in:
Maurice
2026-10-24 22:30:29 +02:00
parent 7356de5124
commit 35c3ab4bd7
@@ -95,8 +95,13 @@ function isOfferedInJournal(name: string, className: string | undefined): boolea
return className !== undefined && JOURNAL_CONTROLLERS.has(className) && !isStudioController(className);
}
/** Whether a journey's session attaches a registered tool: what either of its pages offers. */
/**
* Whether a journey's session attaches a registered tool: what either of its
* pages offers. A tool denied in a journey's own conversation is never
* attached, though the Studio's controllers would bring it along.
*/
export function isHeldInJourney(name: string, className: string | undefined): boolean {
if (name in JOURNAL_DENIED_TOOLS) return false;
return isOfferedInJourney(name, className) || isOfferedInJournal(name, className);
}