From e5f1f573c5551f0001404536e06252829562da3c Mon Sep 17 00:00:00 2001 From: Maurice Date: Wed, 21 Oct 2026 22:16:23 +0200 Subject: [PATCH] feat(assistant): every MCP tool of TREK, the core first and the addons on request The assistant offered 25 hand-picked tools. It now offers every tool the MCP registry holds, but a short denylist with a reason per tool (deleting the trip, share, invite and feed links, membership changes, fetching an address the model picks, documents to the provider, instance-wide categories and holidays). The scopes widen to every addon but trips:delete, the share scopes, file contents and plugins. - A tool annotated read-only runs at once, every other one waits as a change card; reads that fetch a planted address wait too. - A turn starts with the trip's core tools; use_addon_tools loads tours, road trip, journey, vacay, atlas, collections, trip chat, files, account or plugin tools for the rest of the turn. - A writing tool without a card of its own gets one from its arguments: add, change or remove, the part of TREK it works in, the trip's days, places and people named. - The boot check fails on a tool that shares, invites or publishes and is neither denied nor known to only take back. --- .../Assistant/AssistantChangeCard.tsx | 15 +- .../Assistant/AssistantChangeFields.tsx | 10 +- .../components/Assistant/assistantParts.ts | 2 + .../nest/assistant/assistant-tool-offer.ts | 205 ++++++++++++++++++ .../assistant/assistant-tools.constants.ts | 102 +++------ .../nest/assistant/assistant-tools.service.ts | 125 +++++++---- server/src/nest/assistant/assistant.prompt.ts | 3 + .../src/nest/assistant/assistant.service.ts | 3 +- .../assistant/tool-call-generic.helpers.ts | 93 ++++++++ .../assistant/tool-call-preview.helpers.ts | 10 +- server/tests/e2e/assistant.e2e.test.ts | 4 +- .../assistant/assistant-tools.service.test.ts | 113 ++++++---- .../tool-call-preview.helpers.test.ts | 30 ++- shared/src/assistant/assistant.schema.ts | 24 +- shared/src/i18n/ar/assistant.ts | 14 ++ shared/src/i18n/az/assistant.ts | 14 ++ shared/src/i18n/br/assistant.ts | 14 ++ shared/src/i18n/ca/assistant.ts | 14 ++ shared/src/i18n/cs/assistant.ts | 14 ++ shared/src/i18n/de/assistant.ts | 14 ++ shared/src/i18n/en/assistant.ts | 14 ++ shared/src/i18n/es/assistant.ts | 14 ++ shared/src/i18n/et/assistant.ts | 14 ++ shared/src/i18n/fr/assistant.ts | 14 ++ shared/src/i18n/gr/assistant.ts | 14 ++ shared/src/i18n/hu/assistant.ts | 14 ++ shared/src/i18n/id/assistant.ts | 14 ++ shared/src/i18n/it/assistant.ts | 14 ++ shared/src/i18n/ja/assistant.ts | 14 ++ shared/src/i18n/ko/assistant.ts | 14 ++ shared/src/i18n/nl/assistant.ts | 14 ++ shared/src/i18n/pl/assistant.ts | 14 ++ shared/src/i18n/ru/assistant.ts | 14 ++ shared/src/i18n/sk/assistant.ts | 14 ++ shared/src/i18n/sv/assistant.ts | 14 ++ shared/src/i18n/th/assistant.ts | 14 ++ shared/src/i18n/tr/assistant.ts | 14 ++ shared/src/i18n/uk/assistant.ts | 14 ++ shared/src/i18n/vi/assistant.ts | 14 ++ shared/src/i18n/zh-TW/assistant.ts | 14 ++ shared/src/i18n/zh/assistant.ts | 14 ++ 41 files changed, 950 insertions(+), 167 deletions(-) create mode 100644 server/src/nest/assistant/assistant-tool-offer.ts create mode 100644 server/src/nest/assistant/tool-call-generic.helpers.ts diff --git a/client/src/components/Assistant/AssistantChangeCard.tsx b/client/src/components/Assistant/AssistantChangeCard.tsx index 20382c138..7812c3e09 100644 --- a/client/src/components/Assistant/AssistantChangeCard.tsx +++ b/client/src/components/Assistant/AssistantChangeCard.tsx @@ -12,8 +12,10 @@ import { MapPinPlus, NotebookPen, PencilLine, + Plus, StickyNote, Ticket, + Trash2, TriangleAlert, Undo2, Wallet, @@ -83,6 +85,9 @@ const VERB_LOOK: Record