Repository navigation
Recompute plugin tool masks when a turn starts - #598
Conversation
A Main Bot created after the server started misses the tree's gated tools (create_team, create_child_bot): its Agent resolved before the tree adopted it, so the deny mask was computed with the Bot outside the tree and nothing recomputed it, since a direct user turn resolves no Agent. Refresh the mask on session/event turn/start (idempotent, as on a resolve, ThinkFlowLab#276) so an adopted Bot gets its tools on its next turn with no restart. Fixes ThinkFlowLab#594
|
PASS at Tier T2 ( Reviewed the diff at the tip: a Ran at this content (
CI at the tip: Not run: one-shot |
Recompute plugin tool masks when a turn starts
Fixes #594
A Main Bot that onboarding creates while
dsh webruns had nocreate_team/create_child_bot: its Agent resolved before@flybot/treeadopted it, sohidePluginToolscomputed its deny mask with the Bot outside the tree, and a direct user turn resolves no Agent, so nothing recomputed it (onlyagent/createdand Bot-to-Bot delivery did). The mask is now also recomputed when a turn starts in the Session (session/eventturn/start, before the model sees the message), the same seam the connector mask uses; an unchanged mask is left alone, so a masked tool still never flips (#276).core/test/flybot.test.jsresolves the Agent before adoption, adopts the Bot, starts a turn and asserts the mask lifts — it fails without the change.core/test/install.test.js's fixed listener list gains the newon session/event.Ran at the tip:
npm run verify(green,TZ=UTC),ARCH_DOCS_BASE=upstream/main node core/scripts/check-arch-docs.mjs,node .github/scripts/changelog.mjs check. Not run: smoke (this macOS box has nosetsid, sodev/bench.shcannot startdsh web), Desktop, real-model steward.