From 7fdfa32c7e87b7e389c104e5de118ad04671339a Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Fri, 10 Jul 2026 17:51:23 +0530 Subject: [PATCH] fix(x): copilot prompt's Composio section uses the shared connection check getComposioToolsPrompt still called the raw composio client's isConfigured; everything else (skill catalog availability, the other prompt connection blocks) goes through assembly/connections.ts, whose check wraps in try/catch -> false. On an errored config read the two could diverge: the prompt advertises Composio tools while the catalog hides the composio skill the model would need to use them. Co-Authored-By: Claude Fable 5 --- .../core/src/runtime/assembly/copilot/instructions.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/x/packages/core/src/runtime/assembly/copilot/instructions.ts b/apps/x/packages/core/src/runtime/assembly/copilot/instructions.ts index 9120851b..030f9f16 100644 --- a/apps/x/packages/core/src/runtime/assembly/copilot/instructions.ts +++ b/apps/x/packages/core/src/runtime/assembly/copilot/instructions.ts @@ -7,7 +7,6 @@ import { isSlackAvailable, } from "../connections.js"; import { composioAccountsRepo } from "../../../composio/repo.js"; -import { isConfigured as isComposioConfigured } from "../../../composio/client.js"; import { CURATED_TOOLKITS } from "@x/shared/dist/composio.js"; import { knowledgeSourcesRepo } from "../../../knowledge/sources/repo.js"; import { listApps } from "../../../apps/indexer.js"; @@ -52,7 +51,10 @@ When a question matches what an app tracks, PREFER the app over external calls: * Lists connected toolkits and explains the meta-tool discovery flow. */ async function getComposioToolsPrompt(slackConnected: boolean = false, googleConnected: boolean = false): Promise { - if (!(await isComposioConfigured())) { + // connections.js, not the raw composio client: the skill catalog's + // availability filter uses the same check, so the prompt's Composio + // section and the catalog's composio skill can never disagree. + if (!(await isComposioAvailable())) { return ''; }