From 35c3ab4bd764d945a9253f294916df99328eaf20 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 24 Oct 2026 22:30:29 +0200 Subject: [PATCH] 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. --- server/src/nest/assistant/assistant-journey-offer.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/nest/assistant/assistant-journey-offer.ts b/server/src/nest/assistant/assistant-journey-offer.ts index 6b243f36f..f69cf56d3 100644 --- a/server/src/nest/assistant/assistant-journey-offer.ts +++ b/server/src/nest/assistant/assistant-journey-offer.ts @@ -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); }