From cec2aa716809bfa3f7277eca49a55e8dcdfa97ee Mon Sep 17 00:00:00 2001 From: Tim Lingo <1timlingo@gmail.com> Date: Sat, 27 Jun 2026 14:42:57 -0500 Subject: [PATCH] =?UTF-8?q?feat(connectors):=20/api/connectors/call=20?= =?UTF-8?q?=E2=80=94=20proxy=20a=20connector=20tool=20call=20(pre-chat)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds /api/connectors/call -> connectd /mcp/call, so the app can invoke a connector tool (e.g. WhatsApp get_pairing_qr / get_login_status for the pairing UI) through the soul, keeping app->soul->connectd intact (UI never hits connectd directly) and working for future remote/hosted clients. elc-clean. NOTE: soul-core change — needs dist/soul.c regen (Will), can ride the same rebuild as PR #56. Co-Authored-By: Claude Opus 4.8 (1M context) --- routes.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/routes.el b/routes.el index 3b5b12d..f224409 100644 --- a/routes.el +++ b/routes.el @@ -335,6 +335,12 @@ fn handle_connectors(method: String, clean: String, body: String) -> String { if str_eq(clean, "/api/connectors/oauth/start") { return connectd_post("/mcp/oauth/start", body) } + // Call a connector tool directly (pre-chat), e.g. WhatsApp get_pairing_qr / get_login_status for + // the pairing UI. Body: {"name":"mcp____","input":{...}}. Keeps the app on the + // app->soul->connectd path (the UI never hits connectd directly) and works for remote/hosted apps. + if str_eq(clean, "/api/connectors/call") { + return connectd_post("/mcp/call", body) + } return "{\"ok\":false,\"error\":\"unknown connectors route\"}" }