denchclaw 2.5.2 → 2.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (592) hide show
  1. package/README.md +8 -0
  2. package/apps/web/.next/standalone/apps/web/.next/BUILD_ID +1 -1
  3. package/apps/web/.next/standalone/apps/web/.next/app-build-manifest.json +160 -167
  4. package/apps/web/.next/standalone/apps/web/.next/app-path-routes-manifest.json +33 -34
  5. package/apps/web/.next/standalone/apps/web/.next/build-manifest.json +2 -2
  6. package/apps/web/.next/standalone/apps/web/.next/cache/config.json +3 -3
  7. package/apps/web/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
  8. package/apps/web/.next/standalone/apps/web/.next/required-server-files.json +1 -1
  9. package/apps/web/.next/standalone/apps/web/.next/routes-manifest.json +1 -1
  10. package/apps/web/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/cron/route_client-reference-manifest.js +1 -1
  12. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/proxy/route_client-reference-manifest.js +1 -1
  13. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/route_client-reference-manifest.js +1 -1
  14. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/serve/[...path]/route_client-reference-manifest.js +1 -1
  15. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/store/route_client-reference-manifest.js +1 -1
  16. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/webhooks/[...path]/route_client-reference-manifest.js +1 -1
  17. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/active/route.js.nft.json +1 -1
  18. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/active/route_client-reference-manifest.js +1 -1
  19. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route.js +1 -1
  20. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route.js.nft.json +1 -1
  21. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route_client-reference-manifest.js +1 -1
  22. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/runs/route.js.nft.json +1 -1
  23. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/runs/route_client-reference-manifest.js +1 -1
  24. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route.js +1 -1
  25. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route.js.nft.json +1 -1
  26. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route_client-reference-manifest.js +1 -1
  27. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stream/route.js.nft.json +1 -1
  28. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stream/route_client-reference-manifest.js +1 -1
  29. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/subagents/route.js.nft.json +1 -1
  30. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/subagents/route_client-reference-manifest.js +1 -1
  31. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/callback/route.js +8 -8
  32. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/callback/route.js.nft.json +1 -1
  33. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/callback/route_client-reference-manifest.js +1 -1
  34. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connect/route_client-reference-manifest.js +1 -1
  35. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connections/route.js +1 -1
  36. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connections/route.js.nft.json +1 -1
  37. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connections/route_client-reference-manifest.js +1 -1
  38. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/disconnect/route.js +1 -1
  39. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/disconnect/route.js.nft.json +1 -1
  40. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/disconnect/route_client-reference-manifest.js +1 -1
  41. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/status/route.js +7 -1
  42. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/status/route.js.nft.json +1 -1
  43. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/status/route_client-reference-manifest.js +1 -1
  44. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/toolkits/route_client-reference-manifest.js +1 -1
  45. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/[jobId]/runs/route_client-reference-manifest.js +1 -1
  46. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/route_client-reference-manifest.js +1 -1
  47. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/[sessionId]/route_client-reference-manifest.js +1 -1
  48. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/search-transcript/route_client-reference-manifest.js +1 -1
  49. package/apps/web/.next/standalone/apps/web/.next/server/app/api/feedback/route.js +1 -1
  50. package/apps/web/.next/standalone/apps/web/.next/server/app/api/feedback/route_client-reference-manifest.js +1 -1
  51. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/channels/route_client-reference-manifest.js +1 -1
  52. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/route.js.nft.json +1 -1
  53. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/route_client-reference-manifest.js +1 -1
  54. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/stream/route.js.nft.json +1 -1
  55. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/stream/route_client-reference-manifest.js +1 -1
  56. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/sessions/[id]/route_client-reference-manifest.js +1 -1
  57. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/sessions/route_client-reference-manifest.js +1 -1
  58. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/[id]/toggle/route.js.nft.json +1 -1
  59. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/[id]/toggle/route_client-reference-manifest.js +1 -1
  60. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/repair/route.js.nft.json +1 -1
  61. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/repair/route_client-reference-manifest.js +1 -1
  62. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/route.js.nft.json +1 -1
  63. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/route_client-reference-manifest.js +1 -1
  64. package/apps/web/.next/standalone/apps/web/.next/server/app/api/memories/route_client-reference-manifest.js +1 -1
  65. package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/route_client-reference-manifest.js +1 -1
  66. package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/switch/route_client-reference-manifest.js +1 -1
  67. package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/[sessionId]/route_client-reference-manifest.js +1 -1
  68. package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  69. package/apps/web/.next/standalone/apps/web/.next/server/app/api/settings/cloud/route.js +1 -1
  70. package/apps/web/.next/standalone/apps/web/.next/server/app/api/settings/cloud/route.js.nft.json +1 -1
  71. package/apps/web/.next/standalone/apps/web/.next/server/app/api/settings/cloud/route_client-reference-manifest.js +1 -1
  72. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/content/route_client-reference-manifest.js +1 -1
  73. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/route.js +1 -1
  74. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/route_client-reference-manifest.js +1 -1
  75. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/browse/route_client-reference-manifest.js +1 -1
  76. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
  77. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/route.js +1 -1
  78. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  79. package/apps/web/.next/standalone/apps/web/.next/server/app/api/terminal/port/route_client-reference-manifest.js +1 -1
  80. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/speech/route.js +1 -1
  81. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/speech/route.js.nft.json +1 -1
  82. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/speech/route_client-reference-manifest.js +1 -1
  83. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/transcribe/route.js +1 -1
  84. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/transcribe/route.js.nft.json +1 -1
  85. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/transcribe/route_client-reference-manifest.js +1 -1
  86. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/voices/route.js +1 -1
  87. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/voices/route.js.nft.json +1 -1
  88. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/voices/route_client-reference-manifest.js +1 -1
  89. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/messages/route_client-reference-manifest.js +1 -1
  90. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/route.js.nft.json +1 -1
  91. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/route_client-reference-manifest.js +1 -1
  92. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/route.js +1 -1
  93. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/route_client-reference-manifest.js +1 -1
  94. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/assets/[...path]/route_client-reference-manifest.js +1 -1
  95. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse/route_client-reference-manifest.js +1 -1
  96. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse-file/route_client-reference-manifest.js +1 -1
  97. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/context/route_client-reference-manifest.js +1 -1
  98. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/copy/route_client-reference-manifest.js +1 -1
  99. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/introspect/route_client-reference-manifest.js +1 -1
  100. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/query/route_client-reference-manifest.js +1 -1
  101. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/delete/route.js +1 -1
  102. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/delete/route_client-reference-manifest.js +1 -1
  103. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/execute/route_client-reference-manifest.js +1 -1
  104. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/file/route_client-reference-manifest.js +1 -1
  105. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/init/route.js +1 -1
  106. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/init/route_client-reference-manifest.js +1 -1
  107. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/link-preview/route_client-reference-manifest.js +1 -1
  108. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/list/route_client-reference-manifest.js +1 -1
  109. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/mkdir/route_client-reference-manifest.js +1 -1
  110. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/move/route_client-reference-manifest.js +1 -1
  111. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/actions/route_client-reference-manifest.js +1 -1
  112. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/actions/runs/route_client-reference-manifest.js +1 -1
  113. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/display-field/route_client-reference-manifest.js +1 -1
  114. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/content/route_client-reference-manifest.js +1 -1
  115. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/route_client-reference-manifest.js +1 -1
  116. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/bulk-delete/route_client-reference-manifest.js +1 -1
  117. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/options/route_client-reference-manifest.js +1 -1
  118. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/route.js +1 -1
  119. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/route_client-reference-manifest.js +1 -1
  120. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/enum-rename/route_client-reference-manifest.js +1 -1
  121. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/route_client-reference-manifest.js +1 -1
  122. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/reorder/route_client-reference-manifest.js +1 -1
  123. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/route_client-reference-manifest.js +1 -1
  124. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/route_client-reference-manifest.js +1 -1
  125. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/views/route_client-reference-manifest.js +1 -1
  126. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/open-file/route_client-reference-manifest.js +1 -1
  127. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/path-info/route_client-reference-manifest.js +1 -1
  128. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/query/route_client-reference-manifest.js +1 -1
  129. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/raw-file/route_client-reference-manifest.js +1 -1
  130. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/rename/route_client-reference-manifest.js +1 -1
  131. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/reports/execute/route.js +1 -1
  132. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/reports/execute/route_client-reference-manifest.js +1 -1
  133. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/search-index/route_client-reference-manifest.js +1 -1
  134. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/suggest-files/route_client-reference-manifest.js +1 -1
  135. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/switch/route.js +1 -1
  136. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/switch/route_client-reference-manifest.js +1 -1
  137. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/thumbnail/route_client-reference-manifest.js +1 -1
  138. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/tree/route_client-reference-manifest.js +1 -1
  139. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/upload/route.js +1 -1
  140. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/upload/route_client-reference-manifest.js +1 -1
  141. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/virtual-file/route_client-reference-manifest.js +1 -1
  142. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/watch/route_client-reference-manifest.js +1 -1
  143. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/write-binary/route_client-reference-manifest.js +1 -1
  144. package/apps/web/.next/standalone/apps/web/.next/server/app/page.js +9 -8
  145. package/apps/web/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  146. package/apps/web/.next/standalone/apps/web/.next/server/app/workspace/page.js +1 -1
  147. package/apps/web/.next/standalone/apps/web/.next/server/app/workspace/page_client-reference-manifest.js +1 -1
  148. package/apps/web/.next/standalone/apps/web/.next/server/app-paths-manifest.json +33 -34
  149. package/apps/web/.next/standalone/apps/web/.next/server/chunks/6426.js +3 -3
  150. package/apps/web/.next/standalone/apps/web/.next/server/chunks/6787.js +1 -1
  151. package/apps/web/.next/standalone/apps/web/.next/server/chunks/687.js +4 -4
  152. package/apps/web/.next/standalone/apps/web/.next/server/chunks/7488.js +1 -1
  153. package/apps/web/.next/standalone/apps/web/.next/server/chunks/7515.js +1 -0
  154. package/apps/web/.next/standalone/apps/web/.next/server/chunks/8306.js +1 -1
  155. package/apps/web/.next/standalone/apps/web/.next/server/functions-config-manifest.json +18 -19
  156. package/apps/web/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  157. package/apps/web/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  158. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/apps/cron/{route-982235d988e17f31.js → route-3f5324f861724fe4.js} +1 -1
  159. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/apps/proxy/{route-982235d988e17f31.js → route-3f5324f861724fe4.js} +1 -1
  160. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/apps/{route-982235d988e17f31.js → route-3f5324f861724fe4.js} +1 -1
  161. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/apps/serve/[...path]/{route-982235d988e17f31.js → route-3f5324f861724fe4.js} +1 -1
  162. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/apps/store/route-3f5324f861724fe4.js +1 -0
  163. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/apps/webhooks/[...path]/route-3f5324f861724fe4.js +1 -0
  164. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/active/route-3f5324f861724fe4.js +1 -0
  165. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/route-3f5324f861724fe4.js +1 -0
  166. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/runs/route-3f5324f861724fe4.js +1 -0
  167. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/stop/route-3f5324f861724fe4.js +1 -0
  168. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/stream/route-3f5324f861724fe4.js +1 -0
  169. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/subagents/route-3f5324f861724fe4.js +1 -0
  170. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/callback/route-3f5324f861724fe4.js +1 -0
  171. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/connect/route-3f5324f861724fe4.js +1 -0
  172. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/connections/route-3f5324f861724fe4.js +1 -0
  173. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/disconnect/route-3f5324f861724fe4.js +1 -0
  174. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/status/route-3f5324f861724fe4.js +1 -0
  175. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/toolkits/route-3f5324f861724fe4.js +1 -0
  176. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/cron/jobs/[jobId]/runs/route-3f5324f861724fe4.js +1 -0
  177. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/cron/jobs/route-3f5324f861724fe4.js +1 -0
  178. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/cron/runs/[sessionId]/route-3f5324f861724fe4.js +1 -0
  179. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/cron/runs/search-transcript/route-3f5324f861724fe4.js +1 -0
  180. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/feedback/route-3f5324f861724fe4.js +1 -0
  181. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/channels/route-3f5324f861724fe4.js +1 -0
  182. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/chat/route-3f5324f861724fe4.js +1 -0
  183. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/chat/stream/route-3f5324f861724fe4.js +1 -0
  184. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/sessions/[id]/route-3f5324f861724fe4.js +1 -0
  185. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/sessions/route-3f5324f861724fe4.js +1 -0
  186. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/integrations/[id]/toggle/route-3f5324f861724fe4.js +1 -0
  187. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/integrations/repair/route-3f5324f861724fe4.js +1 -0
  188. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/integrations/route-3f5324f861724fe4.js +1 -0
  189. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/memories/route-3f5324f861724fe4.js +1 -0
  190. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/profiles/route-3f5324f861724fe4.js +1 -0
  191. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/profiles/switch/route-3f5324f861724fe4.js +1 -0
  192. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/sessions/[sessionId]/route-3f5324f861724fe4.js +1 -0
  193. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/sessions/route-3f5324f861724fe4.js +1 -0
  194. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/settings/cloud/route-3f5324f861724fe4.js +1 -0
  195. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/[slug]/content/route-3f5324f861724fe4.js +1 -0
  196. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/[slug]/route-3f5324f861724fe4.js +1 -0
  197. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/browse/route-3f5324f861724fe4.js +1 -0
  198. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/install/route-3f5324f861724fe4.js +1 -0
  199. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/route-3f5324f861724fe4.js +1 -0
  200. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/terminal/port/route-3f5324f861724fe4.js +1 -0
  201. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/voice/speech/route-3f5324f861724fe4.js +1 -0
  202. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/voice/transcribe/route-3f5324f861724fe4.js +1 -0
  203. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/voice/voices/route-3f5324f861724fe4.js +1 -0
  204. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/web-sessions/[id]/messages/route-3f5324f861724fe4.js +1 -0
  205. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/web-sessions/[id]/route-3f5324f861724fe4.js +1 -0
  206. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/web-sessions/route-3f5324f861724fe4.js +1 -0
  207. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/assets/[...path]/route-3f5324f861724fe4.js +1 -0
  208. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/browse/route-3f5324f861724fe4.js +1 -0
  209. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/browse-file/route-3f5324f861724fe4.js +1 -0
  210. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/context/route-3f5324f861724fe4.js +1 -0
  211. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/copy/route-3f5324f861724fe4.js +1 -0
  212. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/db/introspect/route-3f5324f861724fe4.js +1 -0
  213. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/db/query/route-3f5324f861724fe4.js +1 -0
  214. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/delete/route-3f5324f861724fe4.js +1 -0
  215. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/execute/route-3f5324f861724fe4.js +1 -0
  216. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/file/route-3f5324f861724fe4.js +1 -0
  217. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/init/route-3f5324f861724fe4.js +1 -0
  218. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/link-preview/route-3f5324f861724fe4.js +1 -0
  219. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/list/route-3f5324f861724fe4.js +1 -0
  220. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/mkdir/route-3f5324f861724fe4.js +1 -0
  221. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/move/route-3f5324f861724fe4.js +1 -0
  222. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/actions/route-3f5324f861724fe4.js +1 -0
  223. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/actions/runs/route-3f5324f861724fe4.js +1 -0
  224. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/display-field/route-3f5324f861724fe4.js +1 -0
  225. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/[id]/content/route-3f5324f861724fe4.js +1 -0
  226. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/[id]/route-3f5324f861724fe4.js +1 -0
  227. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/bulk-delete/route-3f5324f861724fe4.js +1 -0
  228. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/options/route-3f5324f861724fe4.js +1 -0
  229. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/route-3f5324f861724fe4.js +1 -0
  230. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/[fieldId]/enum-rename/route-3f5324f861724fe4.js +1 -0
  231. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/[fieldId]/route-3f5324f861724fe4.js +1 -0
  232. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/reorder/route-3f5324f861724fe4.js +1 -0
  233. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/route-3f5324f861724fe4.js +1 -0
  234. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/route-3f5324f861724fe4.js +1 -0
  235. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/views/route-3f5324f861724fe4.js +1 -0
  236. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/open-file/route-3f5324f861724fe4.js +1 -0
  237. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/path-info/route-3f5324f861724fe4.js +1 -0
  238. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/query/route-3f5324f861724fe4.js +1 -0
  239. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/raw-file/route-3f5324f861724fe4.js +1 -0
  240. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/rename/route-3f5324f861724fe4.js +1 -0
  241. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/reports/execute/route-3f5324f861724fe4.js +1 -0
  242. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/search-index/route-3f5324f861724fe4.js +1 -0
  243. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/suggest-files/route-3f5324f861724fe4.js +1 -0
  244. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/switch/route-3f5324f861724fe4.js +1 -0
  245. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/thumbnail/route-3f5324f861724fe4.js +1 -0
  246. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/tree/route-3f5324f861724fe4.js +1 -0
  247. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/upload/route-3f5324f861724fe4.js +1 -0
  248. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/virtual-file/route-3f5324f861724fe4.js +1 -0
  249. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/watch/route-3f5324f861724fe4.js +1 -0
  250. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/write-binary/route-3f5324f861724fe4.js +1 -0
  251. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/{layout-4e33b3503af94c5b.js → layout-f3680ff738cac0bb.js} +1 -1
  252. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/page-9d91562ada53b3ef.js +1 -0
  253. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/workspace/page-449a49cbf2cfee70.js +1 -0
  254. package/apps/web/.next/standalone/apps/web/.next/static/css/74b1299abb24af0e.css +1 -0
  255. package/apps/web/.next/standalone/apps/web/.next/static/oj1WoDEuGOF0TNojiymK5/_buildManifest.js +1 -0
  256. package/apps/web/.next/standalone/apps/web/app/components/__fixtures__/composio-empty-final-reply.jsonl +4 -0
  257. package/apps/web/.next/standalone/apps/web/public/dench-integrations-icon.png +0 -0
  258. package/apps/web/.next/standalone/apps/web/server.js +1 -1
  259. package/apps/web/.next/standalone/extensions/apollo-enrichment/index.ts +4 -26
  260. package/apps/web/.next/standalone/extensions/dench-ai-gateway/composio-bridge.ts +152 -426
  261. package/apps/web/.next/standalone/extensions/dench-ai-gateway/config-patch.ts +7 -4
  262. package/apps/web/.next/standalone/extensions/dench-ai-gateway/index.test.ts +280 -220
  263. package/apps/web/.next/standalone/extensions/dench-ai-gateway/index.ts +2 -2
  264. package/apps/web/.next/standalone/extensions/dench-identity/composio-cheat-sheet.test.ts +19 -111
  265. package/apps/web/.next/standalone/extensions/dench-identity/composio-cheat-sheet.ts +63 -108
  266. package/apps/web/.next/standalone/extensions/dench-identity/composio-tool-search.ts +322 -0
  267. package/apps/web/.next/standalone/extensions/dench-identity/index.test.ts +461 -55
  268. package/apps/web/.next/standalone/extensions/dench-identity/index.ts +1316 -200
  269. package/apps/web/.next/standalone/extensions/exa-search/index.ts +4 -27
  270. package/apps/web/.next/standalone/extensions/posthog-analytics/lib/build-env.js +1 -1
  271. package/apps/web/.next/standalone/extensions/shared/composio-search-context.ts +134 -0
  272. package/apps/web/.next/standalone/extensions/shared/dench-auth.ts +47 -0
  273. package/apps/web/.next/standalone/package.json +1 -1
  274. package/apps/web/.next/static/chunks/app/api/apps/cron/route-3f5324f861724fe4.js +1 -0
  275. package/apps/web/.next/static/chunks/app/api/apps/proxy/route-3f5324f861724fe4.js +1 -0
  276. package/apps/web/.next/static/chunks/app/api/apps/route-3f5324f861724fe4.js +1 -0
  277. package/apps/web/.next/static/chunks/app/api/apps/serve/[...path]/route-3f5324f861724fe4.js +1 -0
  278. package/apps/web/.next/static/chunks/app/api/apps/store/route-3f5324f861724fe4.js +1 -0
  279. package/apps/web/.next/static/chunks/app/api/apps/webhooks/[...path]/route-3f5324f861724fe4.js +1 -0
  280. package/apps/web/.next/static/chunks/app/api/chat/active/route-3f5324f861724fe4.js +1 -0
  281. package/apps/web/.next/static/chunks/app/api/chat/route-3f5324f861724fe4.js +1 -0
  282. package/apps/web/.next/static/chunks/app/api/chat/runs/route-3f5324f861724fe4.js +1 -0
  283. package/apps/web/.next/static/chunks/app/api/chat/stop/route-3f5324f861724fe4.js +1 -0
  284. package/apps/web/.next/static/chunks/app/api/chat/stream/route-3f5324f861724fe4.js +1 -0
  285. package/apps/web/.next/static/chunks/app/api/chat/subagents/route-3f5324f861724fe4.js +1 -0
  286. package/apps/web/.next/static/chunks/app/api/composio/callback/route-3f5324f861724fe4.js +1 -0
  287. package/apps/web/.next/static/chunks/app/api/composio/connect/route-3f5324f861724fe4.js +1 -0
  288. package/apps/web/.next/static/chunks/app/api/composio/connections/route-3f5324f861724fe4.js +1 -0
  289. package/apps/web/.next/static/chunks/app/api/composio/disconnect/route-3f5324f861724fe4.js +1 -0
  290. package/apps/web/.next/static/chunks/app/api/composio/status/route-3f5324f861724fe4.js +1 -0
  291. package/apps/web/.next/static/chunks/app/api/composio/toolkits/route-3f5324f861724fe4.js +1 -0
  292. package/apps/web/.next/static/chunks/app/api/cron/jobs/[jobId]/runs/route-3f5324f861724fe4.js +1 -0
  293. package/apps/web/.next/static/chunks/app/api/cron/jobs/route-3f5324f861724fe4.js +1 -0
  294. package/apps/web/.next/static/chunks/app/api/cron/runs/[sessionId]/route-3f5324f861724fe4.js +1 -0
  295. package/apps/web/.next/static/chunks/app/api/cron/runs/search-transcript/route-3f5324f861724fe4.js +1 -0
  296. package/apps/web/.next/static/chunks/app/api/feedback/route-3f5324f861724fe4.js +1 -0
  297. package/apps/web/.next/static/chunks/app/api/gateway/channels/route-3f5324f861724fe4.js +1 -0
  298. package/apps/web/.next/static/chunks/app/api/gateway/chat/route-3f5324f861724fe4.js +1 -0
  299. package/apps/web/.next/static/chunks/app/api/gateway/chat/stream/route-3f5324f861724fe4.js +1 -0
  300. package/apps/web/.next/static/chunks/app/api/gateway/sessions/[id]/route-3f5324f861724fe4.js +1 -0
  301. package/apps/web/.next/static/chunks/app/api/gateway/sessions/route-3f5324f861724fe4.js +1 -0
  302. package/apps/web/.next/static/chunks/app/api/integrations/[id]/toggle/route-3f5324f861724fe4.js +1 -0
  303. package/apps/web/.next/static/chunks/app/api/integrations/repair/route-3f5324f861724fe4.js +1 -0
  304. package/apps/web/.next/static/chunks/app/api/integrations/route-3f5324f861724fe4.js +1 -0
  305. package/apps/web/.next/static/chunks/app/api/memories/route-3f5324f861724fe4.js +1 -0
  306. package/apps/web/.next/static/chunks/app/api/profiles/route-3f5324f861724fe4.js +1 -0
  307. package/apps/web/.next/static/chunks/app/api/profiles/switch/route-3f5324f861724fe4.js +1 -0
  308. package/apps/web/.next/static/chunks/app/api/sessions/[sessionId]/route-3f5324f861724fe4.js +1 -0
  309. package/apps/web/.next/static/chunks/app/api/sessions/route-3f5324f861724fe4.js +1 -0
  310. package/apps/web/.next/static/chunks/app/api/settings/cloud/route-3f5324f861724fe4.js +1 -0
  311. package/apps/web/.next/static/chunks/app/api/skills/[slug]/content/route-3f5324f861724fe4.js +1 -0
  312. package/apps/web/.next/static/chunks/app/api/skills/[slug]/route-3f5324f861724fe4.js +1 -0
  313. package/apps/web/.next/static/chunks/app/api/skills/browse/route-3f5324f861724fe4.js +1 -0
  314. package/apps/web/.next/static/chunks/app/api/skills/install/route-3f5324f861724fe4.js +1 -0
  315. package/apps/web/.next/static/chunks/app/api/skills/route-3f5324f861724fe4.js +1 -0
  316. package/apps/web/.next/static/chunks/app/api/terminal/port/route-3f5324f861724fe4.js +1 -0
  317. package/apps/web/.next/static/chunks/app/api/voice/speech/route-3f5324f861724fe4.js +1 -0
  318. package/apps/web/.next/static/chunks/app/api/voice/transcribe/route-3f5324f861724fe4.js +1 -0
  319. package/apps/web/.next/static/chunks/app/api/voice/voices/route-3f5324f861724fe4.js +1 -0
  320. package/apps/web/.next/static/chunks/app/api/web-sessions/[id]/messages/route-3f5324f861724fe4.js +1 -0
  321. package/apps/web/.next/static/chunks/app/api/web-sessions/[id]/route-3f5324f861724fe4.js +1 -0
  322. package/apps/web/.next/static/chunks/app/api/web-sessions/route-3f5324f861724fe4.js +1 -0
  323. package/apps/web/.next/static/chunks/app/api/workspace/assets/[...path]/route-3f5324f861724fe4.js +1 -0
  324. package/apps/web/.next/static/chunks/app/api/workspace/browse/route-3f5324f861724fe4.js +1 -0
  325. package/apps/web/.next/static/chunks/app/api/workspace/browse-file/route-3f5324f861724fe4.js +1 -0
  326. package/apps/web/.next/static/chunks/app/api/workspace/context/route-3f5324f861724fe4.js +1 -0
  327. package/apps/web/.next/static/chunks/app/api/workspace/copy/route-3f5324f861724fe4.js +1 -0
  328. package/apps/web/.next/static/chunks/app/api/workspace/db/introspect/route-3f5324f861724fe4.js +1 -0
  329. package/apps/web/.next/static/chunks/app/api/workspace/db/query/route-3f5324f861724fe4.js +1 -0
  330. package/apps/web/.next/static/chunks/app/api/workspace/delete/route-3f5324f861724fe4.js +1 -0
  331. package/apps/web/.next/static/chunks/app/api/workspace/execute/route-3f5324f861724fe4.js +1 -0
  332. package/apps/web/.next/static/chunks/app/api/workspace/file/route-3f5324f861724fe4.js +1 -0
  333. package/apps/web/.next/static/chunks/app/api/workspace/init/route-3f5324f861724fe4.js +1 -0
  334. package/apps/web/.next/static/chunks/app/api/workspace/link-preview/route-3f5324f861724fe4.js +1 -0
  335. package/apps/web/.next/static/chunks/app/api/workspace/list/route-3f5324f861724fe4.js +1 -0
  336. package/apps/web/.next/static/chunks/app/api/workspace/mkdir/route-3f5324f861724fe4.js +1 -0
  337. package/apps/web/.next/static/chunks/app/api/workspace/move/route-3f5324f861724fe4.js +1 -0
  338. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/actions/route-3f5324f861724fe4.js +1 -0
  339. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/actions/runs/route-3f5324f861724fe4.js +1 -0
  340. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/display-field/route-3f5324f861724fe4.js +1 -0
  341. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/[id]/content/route-3f5324f861724fe4.js +1 -0
  342. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/[id]/route-3f5324f861724fe4.js +1 -0
  343. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/bulk-delete/route-3f5324f861724fe4.js +1 -0
  344. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/options/route-3f5324f861724fe4.js +1 -0
  345. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/route-3f5324f861724fe4.js +1 -0
  346. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/[fieldId]/enum-rename/route-3f5324f861724fe4.js +1 -0
  347. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/[fieldId]/route-3f5324f861724fe4.js +1 -0
  348. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/reorder/route-3f5324f861724fe4.js +1 -0
  349. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/route-3f5324f861724fe4.js +1 -0
  350. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/route-3f5324f861724fe4.js +1 -0
  351. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/views/route-3f5324f861724fe4.js +1 -0
  352. package/apps/web/.next/static/chunks/app/api/workspace/open-file/route-3f5324f861724fe4.js +1 -0
  353. package/apps/web/.next/static/chunks/app/api/workspace/path-info/route-3f5324f861724fe4.js +1 -0
  354. package/apps/web/.next/static/chunks/app/api/workspace/query/route-3f5324f861724fe4.js +1 -0
  355. package/apps/web/.next/static/chunks/app/api/workspace/raw-file/route-3f5324f861724fe4.js +1 -0
  356. package/apps/web/.next/static/chunks/app/api/workspace/rename/route-3f5324f861724fe4.js +1 -0
  357. package/apps/web/.next/static/chunks/app/api/workspace/reports/execute/route-3f5324f861724fe4.js +1 -0
  358. package/apps/web/.next/static/chunks/app/api/workspace/search-index/route-3f5324f861724fe4.js +1 -0
  359. package/apps/web/.next/static/chunks/app/api/workspace/suggest-files/route-3f5324f861724fe4.js +1 -0
  360. package/apps/web/.next/static/chunks/app/api/workspace/switch/route-3f5324f861724fe4.js +1 -0
  361. package/apps/web/.next/static/chunks/app/api/workspace/thumbnail/route-3f5324f861724fe4.js +1 -0
  362. package/apps/web/.next/static/chunks/app/api/workspace/tree/route-3f5324f861724fe4.js +1 -0
  363. package/apps/web/.next/static/chunks/app/api/workspace/upload/route-3f5324f861724fe4.js +1 -0
  364. package/apps/web/.next/static/chunks/app/api/workspace/virtual-file/route-3f5324f861724fe4.js +1 -0
  365. package/apps/web/.next/static/chunks/app/api/workspace/watch/route-3f5324f861724fe4.js +1 -0
  366. package/apps/web/.next/static/chunks/app/api/workspace/write-binary/route-3f5324f861724fe4.js +1 -0
  367. package/apps/web/.next/static/chunks/app/{layout-4e33b3503af94c5b.js → layout-f3680ff738cac0bb.js} +1 -1
  368. package/apps/web/.next/static/chunks/app/page-9d91562ada53b3ef.js +1 -0
  369. package/apps/web/.next/static/chunks/app/workspace/page-449a49cbf2cfee70.js +1 -0
  370. package/apps/web/.next/static/css/74b1299abb24af0e.css +1 -0
  371. package/apps/web/.next/static/oj1WoDEuGOF0TNojiymK5/_buildManifest.js +1 -0
  372. package/apps/web/public/dench-integrations-icon.png +0 -0
  373. package/dist/{cli-name-CoW7mNz-.js → cli-name-Sz-5E3q2.js} +1 -1
  374. package/dist/entry.js +9 -2
  375. package/dist/{program-C4ijUMvC.js → program-CtW4fcfa.js} +265 -70
  376. package/dist/{run-main-tu5KGaV-.js → run-main-CPnN1zoG.js} +3 -3
  377. package/dist/{telemetry-DguRjCZq.js → telemetry-C_b18hhq.js} +1 -1
  378. package/extensions/apollo-enrichment/index.ts +4 -26
  379. package/extensions/dench-ai-gateway/composio-bridge.ts +152 -426
  380. package/extensions/dench-ai-gateway/config-patch.ts +7 -4
  381. package/extensions/dench-ai-gateway/index.test.ts +280 -220
  382. package/extensions/dench-ai-gateway/index.ts +2 -2
  383. package/extensions/dench-identity/composio-cheat-sheet.test.ts +19 -111
  384. package/extensions/dench-identity/composio-cheat-sheet.ts +63 -108
  385. package/extensions/dench-identity/composio-tool-search.ts +322 -0
  386. package/extensions/dench-identity/index.test.ts +461 -55
  387. package/extensions/dench-identity/index.ts +1316 -200
  388. package/extensions/exa-search/index.ts +4 -27
  389. package/extensions/posthog-analytics/lib/build-env.js +1 -1
  390. package/extensions/shared/composio-search-context.ts +134 -0
  391. package/extensions/shared/dench-auth.ts +47 -0
  392. package/package.json +1 -1
  393. package/skills/composio-apps/SKILL.md +27 -9
  394. package/skills/dench-integrations/SKILL.md +189 -0
  395. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/tool-index/route.js +0 -1
  396. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/tool-index/route.js.nft.json +0 -1
  397. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/tool-index/route_client-reference-manifest.js +0 -1
  398. package/apps/web/.next/standalone/apps/web/.next/server/chunks/8650.js +0 -1
  399. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/apps/store/route-982235d988e17f31.js +0 -1
  400. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/apps/webhooks/[...path]/route-982235d988e17f31.js +0 -1
  401. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/active/route-982235d988e17f31.js +0 -1
  402. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/route-982235d988e17f31.js +0 -1
  403. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/runs/route-982235d988e17f31.js +0 -1
  404. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/stop/route-982235d988e17f31.js +0 -1
  405. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/stream/route-982235d988e17f31.js +0 -1
  406. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/chat/subagents/route-982235d988e17f31.js +0 -1
  407. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/callback/route-982235d988e17f31.js +0 -1
  408. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/connect/route-982235d988e17f31.js +0 -1
  409. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/connections/route-982235d988e17f31.js +0 -1
  410. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/disconnect/route-982235d988e17f31.js +0 -1
  411. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/status/route-982235d988e17f31.js +0 -1
  412. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/tool-index/route-982235d988e17f31.js +0 -1
  413. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/composio/toolkits/route-982235d988e17f31.js +0 -1
  414. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/cron/jobs/[jobId]/runs/route-982235d988e17f31.js +0 -1
  415. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/cron/jobs/route-982235d988e17f31.js +0 -1
  416. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/cron/runs/[sessionId]/route-982235d988e17f31.js +0 -1
  417. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/cron/runs/search-transcript/route-982235d988e17f31.js +0 -1
  418. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/feedback/route-982235d988e17f31.js +0 -1
  419. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/channels/route-982235d988e17f31.js +0 -1
  420. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/chat/route-982235d988e17f31.js +0 -1
  421. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/chat/stream/route-982235d988e17f31.js +0 -1
  422. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/sessions/[id]/route-982235d988e17f31.js +0 -1
  423. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/gateway/sessions/route-982235d988e17f31.js +0 -1
  424. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/integrations/[id]/toggle/route-982235d988e17f31.js +0 -1
  425. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/integrations/repair/route-982235d988e17f31.js +0 -1
  426. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/integrations/route-982235d988e17f31.js +0 -1
  427. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/memories/route-982235d988e17f31.js +0 -1
  428. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/profiles/route-982235d988e17f31.js +0 -1
  429. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/profiles/switch/route-982235d988e17f31.js +0 -1
  430. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/sessions/[sessionId]/route-982235d988e17f31.js +0 -1
  431. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/sessions/route-982235d988e17f31.js +0 -1
  432. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/settings/cloud/route-982235d988e17f31.js +0 -1
  433. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/[slug]/content/route-982235d988e17f31.js +0 -1
  434. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/[slug]/route-982235d988e17f31.js +0 -1
  435. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/browse/route-982235d988e17f31.js +0 -1
  436. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/install/route-982235d988e17f31.js +0 -1
  437. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/skills/route-982235d988e17f31.js +0 -1
  438. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/terminal/port/route-982235d988e17f31.js +0 -1
  439. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/voice/speech/route-982235d988e17f31.js +0 -1
  440. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/voice/transcribe/route-982235d988e17f31.js +0 -1
  441. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/voice/voices/route-982235d988e17f31.js +0 -1
  442. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/web-sessions/[id]/messages/route-982235d988e17f31.js +0 -1
  443. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/web-sessions/[id]/route-982235d988e17f31.js +0 -1
  444. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/web-sessions/route-982235d988e17f31.js +0 -1
  445. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/assets/[...path]/route-982235d988e17f31.js +0 -1
  446. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/browse/route-982235d988e17f31.js +0 -1
  447. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/browse-file/route-982235d988e17f31.js +0 -1
  448. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/context/route-982235d988e17f31.js +0 -1
  449. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/copy/route-982235d988e17f31.js +0 -1
  450. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/db/introspect/route-982235d988e17f31.js +0 -1
  451. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/db/query/route-982235d988e17f31.js +0 -1
  452. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/delete/route-982235d988e17f31.js +0 -1
  453. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/execute/route-982235d988e17f31.js +0 -1
  454. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/file/route-982235d988e17f31.js +0 -1
  455. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/init/route-982235d988e17f31.js +0 -1
  456. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/link-preview/route-982235d988e17f31.js +0 -1
  457. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/list/route-982235d988e17f31.js +0 -1
  458. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/mkdir/route-982235d988e17f31.js +0 -1
  459. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/move/route-982235d988e17f31.js +0 -1
  460. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/actions/route-982235d988e17f31.js +0 -1
  461. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/actions/runs/route-982235d988e17f31.js +0 -1
  462. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/display-field/route-982235d988e17f31.js +0 -1
  463. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/[id]/content/route-982235d988e17f31.js +0 -1
  464. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/[id]/route-982235d988e17f31.js +0 -1
  465. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/bulk-delete/route-982235d988e17f31.js +0 -1
  466. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/options/route-982235d988e17f31.js +0 -1
  467. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/route-982235d988e17f31.js +0 -1
  468. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/[fieldId]/enum-rename/route-982235d988e17f31.js +0 -1
  469. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/[fieldId]/route-982235d988e17f31.js +0 -1
  470. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/reorder/route-982235d988e17f31.js +0 -1
  471. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/route-982235d988e17f31.js +0 -1
  472. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/route-982235d988e17f31.js +0 -1
  473. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/views/route-982235d988e17f31.js +0 -1
  474. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/open-file/route-982235d988e17f31.js +0 -1
  475. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/path-info/route-982235d988e17f31.js +0 -1
  476. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/query/route-982235d988e17f31.js +0 -1
  477. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/raw-file/route-982235d988e17f31.js +0 -1
  478. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/rename/route-982235d988e17f31.js +0 -1
  479. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/reports/execute/route-982235d988e17f31.js +0 -1
  480. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/search-index/route-982235d988e17f31.js +0 -1
  481. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/suggest-files/route-982235d988e17f31.js +0 -1
  482. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/switch/route-982235d988e17f31.js +0 -1
  483. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/thumbnail/route-982235d988e17f31.js +0 -1
  484. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/tree/route-982235d988e17f31.js +0 -1
  485. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/upload/route-982235d988e17f31.js +0 -1
  486. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/virtual-file/route-982235d988e17f31.js +0 -1
  487. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/watch/route-982235d988e17f31.js +0 -1
  488. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/api/workspace/write-binary/route-982235d988e17f31.js +0 -1
  489. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/page-93ec42bca0d82a2b.js +0 -1
  490. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/workspace/page-7f60d4efe8904f55.js +0 -1
  491. package/apps/web/.next/standalone/apps/web/.next/static/css/4f71a2dee93c9f97.css +0 -1
  492. package/apps/web/.next/standalone/apps/web/.next/static/hGwOuep2JUMOZ4iiPjKLY/_buildManifest.js +0 -1
  493. package/apps/web/.next/static/chunks/app/api/apps/cron/route-982235d988e17f31.js +0 -1
  494. package/apps/web/.next/static/chunks/app/api/apps/proxy/route-982235d988e17f31.js +0 -1
  495. package/apps/web/.next/static/chunks/app/api/apps/route-982235d988e17f31.js +0 -1
  496. package/apps/web/.next/static/chunks/app/api/apps/serve/[...path]/route-982235d988e17f31.js +0 -1
  497. package/apps/web/.next/static/chunks/app/api/apps/store/route-982235d988e17f31.js +0 -1
  498. package/apps/web/.next/static/chunks/app/api/apps/webhooks/[...path]/route-982235d988e17f31.js +0 -1
  499. package/apps/web/.next/static/chunks/app/api/chat/active/route-982235d988e17f31.js +0 -1
  500. package/apps/web/.next/static/chunks/app/api/chat/route-982235d988e17f31.js +0 -1
  501. package/apps/web/.next/static/chunks/app/api/chat/runs/route-982235d988e17f31.js +0 -1
  502. package/apps/web/.next/static/chunks/app/api/chat/stop/route-982235d988e17f31.js +0 -1
  503. package/apps/web/.next/static/chunks/app/api/chat/stream/route-982235d988e17f31.js +0 -1
  504. package/apps/web/.next/static/chunks/app/api/chat/subagents/route-982235d988e17f31.js +0 -1
  505. package/apps/web/.next/static/chunks/app/api/composio/callback/route-982235d988e17f31.js +0 -1
  506. package/apps/web/.next/static/chunks/app/api/composio/connect/route-982235d988e17f31.js +0 -1
  507. package/apps/web/.next/static/chunks/app/api/composio/connections/route-982235d988e17f31.js +0 -1
  508. package/apps/web/.next/static/chunks/app/api/composio/disconnect/route-982235d988e17f31.js +0 -1
  509. package/apps/web/.next/static/chunks/app/api/composio/status/route-982235d988e17f31.js +0 -1
  510. package/apps/web/.next/static/chunks/app/api/composio/tool-index/route-982235d988e17f31.js +0 -1
  511. package/apps/web/.next/static/chunks/app/api/composio/toolkits/route-982235d988e17f31.js +0 -1
  512. package/apps/web/.next/static/chunks/app/api/cron/jobs/[jobId]/runs/route-982235d988e17f31.js +0 -1
  513. package/apps/web/.next/static/chunks/app/api/cron/jobs/route-982235d988e17f31.js +0 -1
  514. package/apps/web/.next/static/chunks/app/api/cron/runs/[sessionId]/route-982235d988e17f31.js +0 -1
  515. package/apps/web/.next/static/chunks/app/api/cron/runs/search-transcript/route-982235d988e17f31.js +0 -1
  516. package/apps/web/.next/static/chunks/app/api/feedback/route-982235d988e17f31.js +0 -1
  517. package/apps/web/.next/static/chunks/app/api/gateway/channels/route-982235d988e17f31.js +0 -1
  518. package/apps/web/.next/static/chunks/app/api/gateway/chat/route-982235d988e17f31.js +0 -1
  519. package/apps/web/.next/static/chunks/app/api/gateway/chat/stream/route-982235d988e17f31.js +0 -1
  520. package/apps/web/.next/static/chunks/app/api/gateway/sessions/[id]/route-982235d988e17f31.js +0 -1
  521. package/apps/web/.next/static/chunks/app/api/gateway/sessions/route-982235d988e17f31.js +0 -1
  522. package/apps/web/.next/static/chunks/app/api/integrations/[id]/toggle/route-982235d988e17f31.js +0 -1
  523. package/apps/web/.next/static/chunks/app/api/integrations/repair/route-982235d988e17f31.js +0 -1
  524. package/apps/web/.next/static/chunks/app/api/integrations/route-982235d988e17f31.js +0 -1
  525. package/apps/web/.next/static/chunks/app/api/memories/route-982235d988e17f31.js +0 -1
  526. package/apps/web/.next/static/chunks/app/api/profiles/route-982235d988e17f31.js +0 -1
  527. package/apps/web/.next/static/chunks/app/api/profiles/switch/route-982235d988e17f31.js +0 -1
  528. package/apps/web/.next/static/chunks/app/api/sessions/[sessionId]/route-982235d988e17f31.js +0 -1
  529. package/apps/web/.next/static/chunks/app/api/sessions/route-982235d988e17f31.js +0 -1
  530. package/apps/web/.next/static/chunks/app/api/settings/cloud/route-982235d988e17f31.js +0 -1
  531. package/apps/web/.next/static/chunks/app/api/skills/[slug]/content/route-982235d988e17f31.js +0 -1
  532. package/apps/web/.next/static/chunks/app/api/skills/[slug]/route-982235d988e17f31.js +0 -1
  533. package/apps/web/.next/static/chunks/app/api/skills/browse/route-982235d988e17f31.js +0 -1
  534. package/apps/web/.next/static/chunks/app/api/skills/install/route-982235d988e17f31.js +0 -1
  535. package/apps/web/.next/static/chunks/app/api/skills/route-982235d988e17f31.js +0 -1
  536. package/apps/web/.next/static/chunks/app/api/terminal/port/route-982235d988e17f31.js +0 -1
  537. package/apps/web/.next/static/chunks/app/api/voice/speech/route-982235d988e17f31.js +0 -1
  538. package/apps/web/.next/static/chunks/app/api/voice/transcribe/route-982235d988e17f31.js +0 -1
  539. package/apps/web/.next/static/chunks/app/api/voice/voices/route-982235d988e17f31.js +0 -1
  540. package/apps/web/.next/static/chunks/app/api/web-sessions/[id]/messages/route-982235d988e17f31.js +0 -1
  541. package/apps/web/.next/static/chunks/app/api/web-sessions/[id]/route-982235d988e17f31.js +0 -1
  542. package/apps/web/.next/static/chunks/app/api/web-sessions/route-982235d988e17f31.js +0 -1
  543. package/apps/web/.next/static/chunks/app/api/workspace/assets/[...path]/route-982235d988e17f31.js +0 -1
  544. package/apps/web/.next/static/chunks/app/api/workspace/browse/route-982235d988e17f31.js +0 -1
  545. package/apps/web/.next/static/chunks/app/api/workspace/browse-file/route-982235d988e17f31.js +0 -1
  546. package/apps/web/.next/static/chunks/app/api/workspace/context/route-982235d988e17f31.js +0 -1
  547. package/apps/web/.next/static/chunks/app/api/workspace/copy/route-982235d988e17f31.js +0 -1
  548. package/apps/web/.next/static/chunks/app/api/workspace/db/introspect/route-982235d988e17f31.js +0 -1
  549. package/apps/web/.next/static/chunks/app/api/workspace/db/query/route-982235d988e17f31.js +0 -1
  550. package/apps/web/.next/static/chunks/app/api/workspace/delete/route-982235d988e17f31.js +0 -1
  551. package/apps/web/.next/static/chunks/app/api/workspace/execute/route-982235d988e17f31.js +0 -1
  552. package/apps/web/.next/static/chunks/app/api/workspace/file/route-982235d988e17f31.js +0 -1
  553. package/apps/web/.next/static/chunks/app/api/workspace/init/route-982235d988e17f31.js +0 -1
  554. package/apps/web/.next/static/chunks/app/api/workspace/link-preview/route-982235d988e17f31.js +0 -1
  555. package/apps/web/.next/static/chunks/app/api/workspace/list/route-982235d988e17f31.js +0 -1
  556. package/apps/web/.next/static/chunks/app/api/workspace/mkdir/route-982235d988e17f31.js +0 -1
  557. package/apps/web/.next/static/chunks/app/api/workspace/move/route-982235d988e17f31.js +0 -1
  558. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/actions/route-982235d988e17f31.js +0 -1
  559. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/actions/runs/route-982235d988e17f31.js +0 -1
  560. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/display-field/route-982235d988e17f31.js +0 -1
  561. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/[id]/content/route-982235d988e17f31.js +0 -1
  562. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/[id]/route-982235d988e17f31.js +0 -1
  563. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/bulk-delete/route-982235d988e17f31.js +0 -1
  564. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/options/route-982235d988e17f31.js +0 -1
  565. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/entries/route-982235d988e17f31.js +0 -1
  566. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/[fieldId]/enum-rename/route-982235d988e17f31.js +0 -1
  567. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/[fieldId]/route-982235d988e17f31.js +0 -1
  568. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/reorder/route-982235d988e17f31.js +0 -1
  569. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/fields/route-982235d988e17f31.js +0 -1
  570. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/route-982235d988e17f31.js +0 -1
  571. package/apps/web/.next/static/chunks/app/api/workspace/objects/[name]/views/route-982235d988e17f31.js +0 -1
  572. package/apps/web/.next/static/chunks/app/api/workspace/open-file/route-982235d988e17f31.js +0 -1
  573. package/apps/web/.next/static/chunks/app/api/workspace/path-info/route-982235d988e17f31.js +0 -1
  574. package/apps/web/.next/static/chunks/app/api/workspace/query/route-982235d988e17f31.js +0 -1
  575. package/apps/web/.next/static/chunks/app/api/workspace/raw-file/route-982235d988e17f31.js +0 -1
  576. package/apps/web/.next/static/chunks/app/api/workspace/rename/route-982235d988e17f31.js +0 -1
  577. package/apps/web/.next/static/chunks/app/api/workspace/reports/execute/route-982235d988e17f31.js +0 -1
  578. package/apps/web/.next/static/chunks/app/api/workspace/search-index/route-982235d988e17f31.js +0 -1
  579. package/apps/web/.next/static/chunks/app/api/workspace/suggest-files/route-982235d988e17f31.js +0 -1
  580. package/apps/web/.next/static/chunks/app/api/workspace/switch/route-982235d988e17f31.js +0 -1
  581. package/apps/web/.next/static/chunks/app/api/workspace/thumbnail/route-982235d988e17f31.js +0 -1
  582. package/apps/web/.next/static/chunks/app/api/workspace/tree/route-982235d988e17f31.js +0 -1
  583. package/apps/web/.next/static/chunks/app/api/workspace/upload/route-982235d988e17f31.js +0 -1
  584. package/apps/web/.next/static/chunks/app/api/workspace/virtual-file/route-982235d988e17f31.js +0 -1
  585. package/apps/web/.next/static/chunks/app/api/workspace/watch/route-982235d988e17f31.js +0 -1
  586. package/apps/web/.next/static/chunks/app/api/workspace/write-binary/route-982235d988e17f31.js +0 -1
  587. package/apps/web/.next/static/chunks/app/page-93ec42bca0d82a2b.js +0 -1
  588. package/apps/web/.next/static/chunks/app/workspace/page-7f60d4efe8904f55.js +0 -1
  589. package/apps/web/.next/static/css/4f71a2dee93c9f97.css +0 -1
  590. package/apps/web/.next/static/hGwOuep2JUMOZ4iiPjKLY/_buildManifest.js +0 -1
  591. /package/apps/web/.next/standalone/apps/web/.next/static/{hGwOuep2JUMOZ4iiPjKLY → oj1WoDEuGOF0TNojiymK5}/_ssgManifest.js +0 -0
  592. /package/apps/web/.next/static/{hGwOuep2JUMOZ4iiPjKLY → oj1WoDEuGOF0TNojiymK5}/_ssgManifest.js +0 -0
@@ -1,37 +1,43 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
1
  import path from "node:path";
3
2
  import type { AnyAgentTool, OpenClawPluginApi } from "openclaw/plugin-sdk";
3
+ import { readDenchAuthProfileKey, resolveDenchGatewayUrl } from "../shared/dench-auth.js";
4
4
  import {
5
- loadComposioToolCheatSheetMarkdown,
6
- readComposioMcpStatusFile,
7
- readComposioToolIndexFile,
5
+ createComposioSearchContextSecret,
6
+ signComposioSearchContext,
7
+ } from "../shared/composio-search-context.js";
8
+ import {
9
+ type ComposioManagedAccount,
8
10
  type ComposioToolIndexFile,
9
11
  } from "./composio-cheat-sheet.js";
12
+ import { type ComposioToolSearchResult } from "./composio-tool-search.js";
10
13
 
11
14
  export const id = "dench-identity";
12
15
 
13
16
  type UnknownRecord = Record<string, unknown>;
14
17
 
15
- const COMPOSIO_RESOLVE_TOOL_NAME = "composio_resolve_tool";
18
+ const DENCH_SEARCH_INTEGRATIONS_NAME = "dench_search_integrations";
19
+ const DENCH_EXECUTE_INTEGRATIONS_NAME = "dench_execute_integrations";
20
+ const DENCH_INTEGRATIONS_DISPLAY_NAME = "Dench Integrations";
21
+ const DENCH_INTEGRATION_DISPLAY_NAME = "Dench Integration";
16
22
 
17
- const COMPOSIO_RESOLVE_TOOL_PARAMETERS = {
23
+ const DENCH_SEARCH_INTEGRATIONS_PARAMETERS = {
18
24
  type: "object",
19
25
  additionalProperties: false,
20
26
  properties: {
21
- app: {
27
+ query: {
22
28
  type: "string",
23
- description: "Connected app name or slug, for example gmail, slack, github, notion, google-calendar, or linear.",
29
+ description: "Natural-language description of the third-party app action or data you need.",
24
30
  },
25
- intent: {
31
+ toolkit: {
26
32
  type: "string",
27
- description: "What the user is trying to do, expressed in plain English.",
33
+ description: "Optional toolkit slug to narrow search, for example gmail, github, slack, stripe, notion, or youtube.",
28
34
  },
29
- userRequest: {
30
- type: "string",
31
- description: "Optional full user request for extra matching context.",
35
+ limit: {
36
+ type: "integer",
37
+ description: "Maximum number of results to return. Defaults to 20.",
32
38
  },
33
39
  },
34
- required: ["intent"],
40
+ required: ["query"],
35
41
  } as const;
36
42
 
37
43
  const APP_ALIASES: Record<string, string> = {
@@ -55,6 +61,9 @@ const APP_ALIASES: Record<string, string> = {
55
61
  twitter: "x",
56
62
  x: "x",
57
63
  linear: "linear",
64
+ stripe: "stripe",
65
+ billing: "stripe",
66
+ payments: "stripe",
58
67
  };
59
68
 
60
69
  const STATIC_COMPOSIO_FALLBACK: Record<string, Array<{
@@ -186,6 +195,47 @@ const STATIC_COMPOSIO_FALLBACK: Record<string, Array<{
186
195
  example_prompts: ["list Linear issues", "show Linear tickets"],
187
196
  },
188
197
  ],
198
+ stripe: [
199
+ {
200
+ intent: "List subscriptions",
201
+ tool: "STRIPE_LIST_SUBSCRIPTIONS",
202
+ required_args: [],
203
+ arg_hints: {},
204
+ example_prompts: [
205
+ "list subscriptions",
206
+ "show subscriptions with trial info",
207
+ "calculate recurring revenue from subscriptions",
208
+ ],
209
+ },
210
+ {
211
+ intent: "Search subscriptions",
212
+ tool: "STRIPE_SEARCH_SUBSCRIPTIONS",
213
+ required_args: [],
214
+ arg_hints: {},
215
+ example_prompts: ["search Stripe subscriptions", "find a Stripe subscription"],
216
+ },
217
+ {
218
+ intent: "List customers",
219
+ tool: "STRIPE_LIST_CUSTOMERS",
220
+ required_args: [],
221
+ arg_hints: {},
222
+ example_prompts: ["list Stripe customers"],
223
+ },
224
+ {
225
+ intent: "List invoices",
226
+ tool: "STRIPE_LIST_INVOICES",
227
+ required_args: [],
228
+ arg_hints: {},
229
+ example_prompts: ["list Stripe invoices"],
230
+ },
231
+ {
232
+ intent: "Retrieve balance",
233
+ tool: "STRIPE_RETRIEVE_BALANCE",
234
+ required_args: [],
235
+ arg_hints: {},
236
+ example_prompts: ["show Stripe balance"],
237
+ },
238
+ ],
189
239
  };
190
240
 
191
241
  function jsonResult(payload: unknown) {
@@ -280,10 +330,11 @@ type ResolverToolCandidate = {
280
330
  description_short: string;
281
331
  required_args: string[];
282
332
  arg_hints: Record<string, string>;
333
+ input_schema?: Record<string, unknown>;
283
334
  default_args?: Record<string, unknown>;
284
335
  example_args?: Record<string, unknown>;
285
336
  example_prompts?: string[];
286
- source: "indexed" | "recipe" | "ondemand";
337
+ source: "featured" | "recipe" | "catalog" | "fallback";
287
338
  };
288
339
 
289
340
  type ResolverMcpTool = {
@@ -361,11 +412,12 @@ function buildResolverCandidateFromCatalog(tool: ResolverMcpTool): ResolverToolC
361
412
  description_short: tool.description?.trim() ?? "",
362
413
  required_args: extractResolverRequiredArgs(tool.inputSchema),
363
414
  arg_hints: buildResolverArgHints(tool.name, tool.inputSchema),
364
- source: "ondemand",
415
+ ...(tool.inputSchema ? { input_schema: tool.inputSchema as Record<string, unknown> } : {}),
416
+ source: "catalog",
365
417
  };
366
418
  }
367
419
 
368
- function buildIndexedToolCandidates(
420
+ function buildFeaturedToolCandidates(
369
421
  app: ComposioToolIndexFile["connected_apps"][number],
370
422
  ): ResolverToolCandidate[] {
371
423
  const out = new Map<string, ResolverToolCandidate>();
@@ -375,7 +427,7 @@ function buildIndexedToolCandidates(
375
427
  for (const tool of app.tools) {
376
428
  out.set(tool.name, {
377
429
  ...tool,
378
- source: "indexed",
430
+ source: "featured",
379
431
  });
380
432
  }
381
433
  for (const [intent, toolName] of Object.entries(app.recipes)) {
@@ -391,6 +443,7 @@ function buildIndexedToolCandidates(
391
443
  required_args: fallbackRecipe?.required_args ?? [],
392
444
  arg_hints: fallbackRecipe?.arg_hints ?? {},
393
445
  ...(fallbackRecipe?.default_args ? { default_args: fallbackRecipe.default_args } : {}),
446
+ ...(fallbackRecipe?.default_args ? { example_args: fallbackRecipe.default_args } : {}),
394
447
  example_prompts: fallbackRecipe?.example_prompts ?? [intent],
395
448
  source: "recipe",
396
449
  });
@@ -398,6 +451,50 @@ function buildIndexedToolCandidates(
398
451
  return Array.from(out.values());
399
452
  }
400
453
 
454
+ function mergeResolverCandidates(
455
+ featured: ResolverToolCandidate[],
456
+ catalog: ResolverToolCandidate[],
457
+ ): ResolverToolCandidate[] {
458
+ const merged = new Map<string, ResolverToolCandidate>();
459
+ for (const tool of catalog) {
460
+ merged.set(tool.name, tool);
461
+ }
462
+ for (const tool of featured) {
463
+ const existing = merged.get(tool.name);
464
+ if (!existing) {
465
+ merged.set(tool.name, tool);
466
+ continue;
467
+ }
468
+ merged.set(tool.name, {
469
+ ...existing,
470
+ ...tool,
471
+ required_args: tool.required_args.length > 0 ? tool.required_args : existing.required_args,
472
+ arg_hints: Object.keys(tool.arg_hints).length > 0 ? tool.arg_hints : existing.arg_hints,
473
+ input_schema: tool.input_schema ?? existing.input_schema,
474
+ default_args: tool.default_args ?? existing.default_args,
475
+ example_args: tool.example_args ?? existing.example_args,
476
+ example_prompts: tool.example_prompts?.length ? tool.example_prompts : existing.example_prompts,
477
+ source: tool.source,
478
+ });
479
+ }
480
+ return Array.from(merged.values());
481
+ }
482
+
483
+ function resolverSourcePriority(source: ResolverToolCandidate["source"]): number {
484
+ switch (source) {
485
+ case "recipe":
486
+ return 0;
487
+ case "featured":
488
+ return 1;
489
+ case "catalog":
490
+ return 2;
491
+ case "fallback":
492
+ return 3;
493
+ default:
494
+ return 9;
495
+ }
496
+ }
497
+
401
498
  function chooseBestTool(
402
499
  candidates: ResolverToolCandidate[],
403
500
  recipes: Record<string, string>,
@@ -428,7 +525,14 @@ function chooseBestTool(
428
525
  ].join(" "),
429
526
  queryTokens,
430
527
  );
431
- if (score > bestScore) {
528
+ if (
529
+ score > bestScore ||
530
+ (
531
+ score === bestScore &&
532
+ bestTool &&
533
+ resolverSourcePriority(tool.source) < resolverSourcePriority(bestTool.source)
534
+ )
535
+ ) {
432
536
  bestTool = tool;
433
537
  bestScore = score;
434
538
  }
@@ -444,25 +548,385 @@ function chooseBestTool(
444
548
  function resolveGatewayUrlFromApi(api: OpenClawPluginApi): string | null {
445
549
  const plugins = asRecord(asRecord(api?.config)?.plugins)?.entries;
446
550
  const denchGateway = asRecord(asRecord(plugins)?.["dench-ai-gateway"]);
447
- const configured = readString(asRecord(denchGateway?.config)?.gatewayUrl);
448
- return configured ?? process.env.DENCH_GATEWAY_URL?.trim() ?? null;
551
+ const gwConfig = asRecord(denchGateway?.config);
552
+ return resolveDenchGatewayUrl(gwConfig as Record<string, unknown> | undefined);
449
553
  }
450
554
 
451
- function resolveComposioApiKeyFromApi(api: OpenClawPluginApi): string | null {
452
- const provider = asRecord(asRecord(asRecord(api?.config)?.models)?.providers)?.["dench-cloud"];
453
- return readString(asRecord(provider)?.apiKey)
454
- ?? process.env.DENCH_CLOUD_API_KEY?.trim()
455
- ?? process.env.DENCH_API_KEY?.trim()
456
- ?? null;
555
+ function resolveComposioApiKeyFromApi(_api: OpenClawPluginApi): string | null {
556
+ return readDenchAuthProfileKey() ?? null;
457
557
  }
458
558
 
459
- function extractToolsFromJsonRpcMessage(payload: unknown): ResolverMcpTool[] {
460
- const result = asRecord(asRecord(payload)?.result);
461
- const tools = result?.tools;
462
- if (!Array.isArray(tools)) {
559
+ function asRecordArray(value: unknown): UnknownRecord[] {
560
+ if (!Array.isArray(value)) {
561
+ return [];
562
+ }
563
+ return value
564
+ .map((item) => asRecord(item))
565
+ .filter((item): item is UnknownRecord => Boolean(item));
566
+ }
567
+
568
+ function readStringArray(value: unknown): string[] {
569
+ if (!Array.isArray(value)) {
570
+ return [];
571
+ }
572
+ return value
573
+ .filter((item): item is string => typeof item === "string")
574
+ .map((item) => item.trim())
575
+ .filter((item) => item.length > 0);
576
+ }
577
+
578
+ function uniqueStrings(values: Array<string | null | undefined>): string[] {
579
+ const seen = new Set<string>();
580
+ const result: string[] = [];
581
+ for (const value of values) {
582
+ if (!value || seen.has(value)) {
583
+ continue;
584
+ }
585
+ seen.add(value);
586
+ result.push(value);
587
+ }
588
+ return result;
589
+ }
590
+
591
+ function readBoolean(value: unknown): boolean | undefined {
592
+ return typeof value === "boolean" ? value : undefined;
593
+ }
594
+
595
+ function resolveComposioSearchSecret(api: OpenClawPluginApi, workspaceDir: string): string {
596
+ return createComposioSearchContextSecret({
597
+ workspaceDir,
598
+ gatewayUrl: resolveGatewayUrlFromApi(api),
599
+ apiKey: resolveComposioApiKeyFromApi(api),
600
+ });
601
+ }
602
+
603
+ async function postComposioGatewayJson(params: {
604
+ api: OpenClawPluginApi;
605
+ path: string;
606
+ body: Record<string, unknown>;
607
+ }): Promise<UnknownRecord | null> {
608
+ const gatewayUrl = resolveGatewayUrlFromApi(params.api);
609
+ const apiKey = resolveComposioApiKeyFromApi(params.api);
610
+ if (!gatewayUrl || !apiKey) {
611
+ return null;
612
+ }
613
+
614
+ try {
615
+ const response = await fetch(`${gatewayUrl.replace(/\/$/, "")}${params.path}`, {
616
+ method: "POST",
617
+ headers: {
618
+ "content-type": "application/json",
619
+ accept: "application/json",
620
+ authorization: `Bearer ${apiKey}`,
621
+ },
622
+ body: JSON.stringify(params.body),
623
+ });
624
+ const text = await response.text();
625
+ const parsed = text.trim().length > 0 ? JSON.parse(text) as unknown : {};
626
+ if (!response.ok) {
627
+ return {
628
+ error: readString(asRecord(parsed)?.error)
629
+ ?? readString(asRecord(asRecord(parsed)?.error)?.message)
630
+ ?? `Gateway request failed with HTTP ${response.status}.`,
631
+ };
632
+ }
633
+ return asRecord(parsed) ?? {};
634
+ } catch (error) {
635
+ return {
636
+ error: error instanceof Error ? error.message : String(error),
637
+ };
638
+ }
639
+ }
640
+
641
+ function readGatewayConnectionItems(payload: unknown): UnknownRecord[] {
642
+ const direct = asRecordArray(payload);
643
+ if (direct.length > 0) {
644
+ return direct;
645
+ }
646
+ const record = asRecord(payload);
647
+ const items = asRecordArray(record?.items);
648
+ if (items.length > 0) {
649
+ return items;
650
+ }
651
+ return asRecordArray(record?.connections);
652
+ }
653
+
654
+ function buildGatewayStatusAccountFromConnection(connection: UnknownRecord): UnknownRecord | null {
655
+ const id = readString(connection.connectionId ?? connection.id)?.trim();
656
+ if (!id) {
657
+ return null;
658
+ }
659
+ const account = asRecord(connection.account);
660
+ const alias = readString(connection.account_label ?? account?.label)?.trim();
661
+ const email = readString(connection.account_email ?? account?.email)?.trim();
662
+ const name = readString(connection.account_name ?? account?.name ?? account?.label)?.trim();
663
+ const userInfo: UnknownRecord = {};
664
+ if (email) {
665
+ userInfo.email = email;
666
+ }
667
+ if (name) {
668
+ userInfo.name = name;
669
+ }
670
+ return {
671
+ id,
672
+ ...(alias ? { alias } : {}),
673
+ ...(Object.keys(userInfo).length > 0 ? { user_info: userInfo } : {}),
674
+ is_default: false,
675
+ };
676
+ }
677
+
678
+ async function fetchGatewayLiveToolkitStatuses(params: {
679
+ api: OpenClawPluginApi;
680
+ }): Promise<UnknownRecord[] | null> {
681
+ const gatewayUrl = resolveGatewayUrlFromApi(params.api);
682
+ const apiKey = resolveComposioApiKeyFromApi(params.api);
683
+ if (!gatewayUrl || !apiKey) {
684
+ return null;
685
+ }
686
+ try {
687
+ const response = await fetch(`${gatewayUrl.replace(/\/$/, "")}/v1/composio/connections`, {
688
+ method: "GET",
689
+ headers: {
690
+ accept: "application/json",
691
+ authorization: `Bearer ${apiKey}`,
692
+ },
693
+ });
694
+ if (!response.ok) {
695
+ return null;
696
+ }
697
+ const payload = await response.json() as unknown;
698
+ const toolkitMap = new Map<string, {
699
+ toolkit: string;
700
+ toolkit_name?: string;
701
+ accounts: UnknownRecord[];
702
+ }>();
703
+ for (const connection of readGatewayConnectionItems(payload)) {
704
+ const status = readString(connection.status)?.trim().toUpperCase();
705
+ if (status !== "ACTIVE") {
706
+ continue;
707
+ }
708
+ const toolkitSlug = normalizeResolverApp(
709
+ readString(connection.toolkit_slug ?? asRecord(connection.toolkit)?.slug) ?? "",
710
+ );
711
+ if (!toolkitSlug) {
712
+ continue;
713
+ }
714
+ const entry = toolkitMap.get(toolkitSlug) ?? {
715
+ toolkit: toolkitSlug,
716
+ toolkit_name: readString(connection.toolkit_name ?? asRecord(connection.toolkit)?.name),
717
+ accounts: [],
718
+ };
719
+ const account = buildGatewayStatusAccountFromConnection(connection);
720
+ if (account) {
721
+ const accountId = readString(account.id);
722
+ if (accountId && !entry.accounts.some((existing) => readString(existing.id) === accountId)) {
723
+ entry.accounts.push(account);
724
+ }
725
+ }
726
+ toolkitMap.set(toolkitSlug, entry);
727
+ }
728
+ const statuses = Array.from(toolkitMap.values()).map((entry) => ({
729
+ toolkit: entry.toolkit,
730
+ ...(entry.toolkit_name ? { toolkit_name: entry.toolkit_name } : {}),
731
+ has_active_connection: true,
732
+ ...(entry.accounts.length > 0 ? { accounts: entry.accounts } : {}),
733
+ status_message: null,
734
+ }));
735
+ return statuses;
736
+ } catch {
737
+ return null;
738
+ }
739
+ }
740
+
741
+ function reconcileGatewayToolkitStatuses(params: {
742
+ searchStatuses: UnknownRecord[];
743
+ liveStatuses: UnknownRecord[] | null;
744
+ }): {
745
+ statuses: UnknownRecord[];
746
+ repairedToolkits: string[];
747
+ } {
748
+ if (!params.liveStatuses || params.liveStatuses.length === 0) {
749
+ return {
750
+ statuses: params.searchStatuses,
751
+ repairedToolkits: [],
752
+ };
753
+ }
754
+ const liveByToolkit = new Map<string, UnknownRecord>();
755
+ for (const status of params.liveStatuses) {
756
+ const toolkitSlug = normalizeResolverApp(
757
+ readString(status.toolkit ?? status.toolkit_slug) ?? "",
758
+ );
759
+ if (toolkitSlug) {
760
+ liveByToolkit.set(toolkitSlug, status);
761
+ }
762
+ }
763
+ const seen = new Set<string>();
764
+ const repairedToolkits: string[] = [];
765
+ const statuses = params.searchStatuses.map((status) => {
766
+ const toolkitSlug = normalizeResolverApp(
767
+ readString(status.toolkit ?? status.toolkit_slug) ?? "",
768
+ );
769
+ if (!toolkitSlug) {
770
+ return status;
771
+ }
772
+ seen.add(toolkitSlug);
773
+ const liveStatus = liveByToolkit.get(toolkitSlug);
774
+ if (!liveStatus) {
775
+ return status;
776
+ }
777
+ if (readBoolean(status.has_active_connection) === false) {
778
+ repairedToolkits.push(toolkitSlug);
779
+ }
780
+ const liveAccounts = asRecordArray(liveStatus.accounts);
781
+ return {
782
+ ...status,
783
+ ...liveStatus,
784
+ toolkit: toolkitSlug,
785
+ has_active_connection: true,
786
+ ...(liveAccounts.length > 0 ? { accounts: liveAccounts } : {}),
787
+ status_message: null,
788
+ };
789
+ });
790
+ for (const [toolkitSlug, liveStatus] of liveByToolkit.entries()) {
791
+ if (seen.has(toolkitSlug)) {
792
+ continue;
793
+ }
794
+ statuses.push({
795
+ ...liveStatus,
796
+ toolkit: toolkitSlug,
797
+ has_active_connection: true,
798
+ status_message: null,
799
+ });
800
+ }
801
+ return {
802
+ statuses,
803
+ repairedToolkits: uniqueStrings(repairedToolkits),
804
+ };
805
+ }
806
+
807
+ function humanizeToolName(toolName: string): string {
808
+ return toolName
809
+ .toLowerCase()
810
+ .split("_")
811
+ .filter(Boolean)
812
+ .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
813
+ .join(" ");
814
+ }
815
+
816
+ function deriveArgHintsFromSchema(inputSchema: UnknownRecord | undefined): Record<string, string> {
817
+ const properties = asRecord(inputSchema?.properties);
818
+ if (!properties) {
819
+ return {};
820
+ }
821
+
822
+ const hints: Record<string, string> = {};
823
+ for (const [key, value] of Object.entries(properties)) {
824
+ const property = asRecord(value);
825
+ if (!property) {
826
+ continue;
827
+ }
828
+ const description = readString(property.description);
829
+ const type = readString(property.type);
830
+ const itemType = readString(asRecord(property.items)?.type);
831
+ const enumValues = Array.isArray(property.enum)
832
+ ? property.enum.filter((item): item is string | number | boolean =>
833
+ ["string", "number", "boolean"].includes(typeof item))
834
+ : [];
835
+ const defaultValue = Object.hasOwn(property, "default") ? property.default : undefined;
836
+ const typeHint = type === "array" && itemType
837
+ ? `Expected array of ${itemType}.`
838
+ : type
839
+ ? `Expected ${type}.`
840
+ : null;
841
+ const enumHint = enumValues.length > 0
842
+ ? `Allowed values: ${enumValues.map((item) => JSON.stringify(item)).join(", ")}.`
843
+ : null;
844
+ const defaultHint = defaultValue !== undefined
845
+ ? `Default: ${JSON.stringify(defaultValue)}.`
846
+ : null;
847
+ const combined = [description, typeHint, enumHint, defaultHint]
848
+ .filter((item): item is string => Boolean(item))
849
+ .join(" ");
850
+ if (combined) {
851
+ hints[key] = combined;
852
+ }
853
+ }
854
+ return hints;
855
+ }
856
+
857
+ function mergeToolSummaryFromSchema(params: {
858
+ toolName: string;
859
+ toolkitName: string;
860
+ schema: UnknownRecord;
861
+ localTool?: ResolverToolCandidate;
862
+ }): ResolverToolCandidate {
863
+ const inputSchema = asRecord(params.schema.input_schema);
864
+ const localTool = params.localTool;
865
+ const requiredArgs = readStringArray(inputSchema?.required);
866
+ const argHints = deriveArgHintsFromSchema(inputSchema);
867
+ return {
868
+ name: params.toolName,
869
+ title: localTool?.title ?? humanizeToolName(params.toolName),
870
+ description_short: localTool?.description_short
871
+ ?? readString(params.schema.description)
872
+ ?? `Recommended ${params.toolkitName} tool for this request.`,
873
+ required_args: localTool?.required_args?.length ? localTool.required_args : requiredArgs,
874
+ arg_hints: Object.keys(localTool?.arg_hints ?? {}).length > 0
875
+ ? localTool?.arg_hints ?? {}
876
+ : argHints,
877
+ source: localTool?.source ?? "catalog",
878
+ default_args: localTool?.default_args,
879
+ example_args: localTool?.example_args,
880
+ example_prompts: localTool?.example_prompts,
881
+ ...(inputSchema ? { input_schema: inputSchema } : {}),
882
+ };
883
+ }
884
+
885
+ function readToolSchemaMap(value: unknown): Record<string, UnknownRecord> {
886
+ const record = asRecord(value);
887
+ if (!record) {
888
+ return {};
889
+ }
890
+ return Object.fromEntries(
891
+ Object.entries(record)
892
+ .map(([key, schema]) => [key, asRecord(schema)] as const)
893
+ .filter((entry): entry is [string, UnknownRecord] => Boolean(entry[1])),
894
+ );
895
+ }
896
+
897
+ function detectPaginationInputHints(inputSchema: UnknownRecord | undefined): string[] {
898
+ const properties = asRecord(inputSchema?.properties);
899
+ if (!properties) {
463
900
  return [];
464
901
  }
465
- return tools
902
+
903
+ const hints: string[] = [];
904
+ const paginationFields = [
905
+ "starting_after",
906
+ "ending_before",
907
+ "cursor",
908
+ "next_cursor",
909
+ "page",
910
+ "page_token",
911
+ "limit",
912
+ "offset",
913
+ ];
914
+ for (const field of paginationFields) {
915
+ if (properties[field]) {
916
+ hints.push(field);
917
+ }
918
+ }
919
+ return hints;
920
+ }
921
+
922
+ function extractToolsFromJsonRpcMessage(payload: unknown): {
923
+ tools: ResolverMcpTool[];
924
+ nextCursor: string | null;
925
+ } {
926
+ const result = asRecord(asRecord(payload)?.result);
927
+ const tools = result?.tools;
928
+ const parsedTools = Array.isArray(tools)
929
+ ? tools
466
930
  .map((item) => asRecord(item))
467
931
  .filter((item): item is UnknownRecord => Boolean(item))
468
932
  .map((tool) => ({
@@ -472,10 +936,19 @@ function extractToolsFromJsonRpcMessage(payload: unknown): ResolverMcpTool[] {
472
936
  inputSchema: asRecord(tool.inputSchema) as ResolverMcpTool["inputSchema"],
473
937
  annotations: asRecord(tool.annotations) as ResolverMcpTool["annotations"],
474
938
  }))
475
- .filter((tool) => tool.name.length > 0);
939
+ .filter((tool) => tool.name.length > 0)
940
+ : [];
941
+
942
+ return {
943
+ tools: parsedTools,
944
+ nextCursor: readString(result?.next_cursor ?? result?.nextCursor ?? result?.cursor) ?? null,
945
+ };
476
946
  }
477
947
 
478
- function parseSseJsonRpcTools(body: string): ResolverMcpTool[] {
948
+ function parseSseJsonRpcTools(body: string): {
949
+ tools: ResolverMcpTool[];
950
+ nextCursor: string | null;
951
+ } {
479
952
  let lastPayload: unknown = null;
480
953
  for (const line of body.split(/\r?\n/)) {
481
954
  const trimmed = line.trim();
@@ -492,10 +965,38 @@ function parseSseJsonRpcTools(body: string): ResolverMcpTool[] {
492
965
  // Ignore non-JSON SSE frames.
493
966
  }
494
967
  }
495
- return lastPayload === null ? [] : extractToolsFromJsonRpcMessage(lastPayload);
968
+ return lastPayload === null ? { tools: [], nextCursor: null } : extractToolsFromJsonRpcMessage(lastPayload);
969
+ }
970
+
971
+ async function parseToolsListResponse(response: Response): Promise<{
972
+ tools: ResolverMcpTool[];
973
+ nextCursor: string | null;
974
+ }> {
975
+ const contentType = response.headers.get("content-type") ?? "";
976
+ const text = await response.text();
977
+ if (contentType.includes("text/event-stream")) {
978
+ const fromSse = parseSseJsonRpcTools(text);
979
+ if (fromSse.tools.length > 0 || fromSse.nextCursor) {
980
+ return fromSse;
981
+ }
982
+ }
983
+ try {
984
+ return extractToolsFromJsonRpcMessage(JSON.parse(text));
985
+ } catch {
986
+ return parseSseJsonRpcTools(text);
987
+ }
988
+ }
989
+
990
+ function loadCatalogCandidatesFromCache(
991
+ workspaceDir: string,
992
+ appSlug: string,
993
+ ): ResolverToolCandidate[] {
994
+ void workspaceDir;
995
+ void appSlug;
996
+ return [];
496
997
  }
497
998
 
498
- async function fetchBroaderCatalogSlice(
999
+ async function fetchCatalogCandidatesLive(
499
1000
  api: OpenClawPluginApi,
500
1001
  appSlug: string,
501
1002
  ): Promise<ResolverToolCandidate[]> {
@@ -505,48 +1006,69 @@ async function fetchBroaderCatalogSlice(
505
1006
  return [];
506
1007
  }
507
1008
 
508
- const response = await fetch(`${gatewayUrl.replace(/\/$/, "")}/v1/composio/mcp`, {
509
- method: "POST",
510
- headers: {
511
- "content-type": "application/json",
512
- authorization: `Bearer ${apiKey}`,
513
- accept: "application/json, text/event-stream",
514
- },
515
- body: JSON.stringify({
516
- jsonrpc: "2.0",
517
- id: 1,
518
- method: "tools/list",
519
- params: {
520
- connected_toolkits: [appSlug],
1009
+ const prefix = toolkitSlugToToolPrefix(appSlug);
1010
+ const seen = new Set<string>();
1011
+ const out: ResolverToolCandidate[] = [];
1012
+ let cursor: string | null = null;
1013
+
1014
+ while (true) {
1015
+ const response = await fetch(`${gatewayUrl.replace(/\/$/, "")}/v1/composio/mcp`, {
1016
+ method: "POST",
1017
+ headers: {
1018
+ "content-type": "application/json",
1019
+ authorization: `Bearer ${apiKey}`,
1020
+ accept: "application/json, text/event-stream",
521
1021
  },
522
- }),
523
- });
524
- if (!response.ok) {
525
- return [];
526
- }
1022
+ body: JSON.stringify({
1023
+ jsonrpc: "2.0",
1024
+ id: 1,
1025
+ method: "tools/list",
1026
+ params: {
1027
+ connected_toolkits: [appSlug],
1028
+ ...(cursor ? { cursor } : {}),
1029
+ },
1030
+ }),
1031
+ });
1032
+ if (!response.ok) {
1033
+ return out;
1034
+ }
527
1035
 
528
- const text = await response.text();
529
- const tools = (() => {
530
- try {
531
- return extractToolsFromJsonRpcMessage(JSON.parse(text));
532
- } catch {
533
- return parseSseJsonRpcTools(text);
1036
+ const parsed = await parseToolsListResponse(response);
1037
+ for (const tool of parsed.tools) {
1038
+ if (!tool.name.startsWith(prefix) || seen.has(tool.name)) {
1039
+ continue;
1040
+ }
1041
+ seen.add(tool.name);
1042
+ out.push(buildResolverCandidateFromCatalog(tool));
534
1043
  }
535
- })();
536
- const prefix = toolkitSlugToToolPrefix(appSlug);
537
- return tools
538
- .filter((tool) => tool.name.startsWith(prefix))
539
- .map(buildResolverCandidateFromCatalog);
1044
+
1045
+ if (!parsed.nextCursor || parsed.nextCursor === cursor) {
1046
+ return out;
1047
+ }
1048
+ cursor = parsed.nextCursor;
1049
+ }
1050
+ }
1051
+
1052
+ async function loadCatalogCandidates(
1053
+ workspaceDir: string,
1054
+ api: OpenClawPluginApi,
1055
+ appSlug: string,
1056
+ ): Promise<ResolverToolCandidate[]> {
1057
+ const fromCache = loadCatalogCandidatesFromCache(workspaceDir, appSlug);
1058
+ if (fromCache.length > 0) {
1059
+ return fromCache;
1060
+ }
1061
+ return await fetchCatalogCandidatesLive(api, appSlug);
540
1062
  }
541
1063
 
542
1064
  function describeStatusForResolver(workspaceDir: string): {
543
1065
  verified: boolean;
544
1066
  message: string | null;
545
1067
  } {
546
- const status = readComposioMcpStatusFile(workspaceDir);
1068
+ void workspaceDir;
547
1069
  return {
548
- verified: status?.summary?.verified === true,
549
- message: typeof status?.summary?.message === "string" ? status.summary.message : null,
1070
+ verified: false,
1071
+ message: null,
550
1072
  };
551
1073
  }
552
1074
 
@@ -582,11 +1104,75 @@ function chooseApp(
582
1104
  return best;
583
1105
  }
584
1106
 
1107
+ function chooseAccount(
1108
+ app: ComposioToolIndexFile["connected_apps"][number],
1109
+ requestedAccount: string | undefined,
1110
+ queryText: string,
1111
+ ): ComposioManagedAccount | null {
1112
+ const accounts = app.accounts ?? [];
1113
+ if (accounts.length === 0) {
1114
+ return null;
1115
+ }
1116
+
1117
+ const requested = requestedAccount?.trim();
1118
+ if (requested) {
1119
+ const normalized = requested.toLowerCase();
1120
+ const direct = accounts.find((account) =>
1121
+ [
1122
+ account.account_identity,
1123
+ account.display_label,
1124
+ account.account_email,
1125
+ account.account_name,
1126
+ account.account_label,
1127
+ account.connected_account_id,
1128
+ ].some((value) => typeof value === "string" && value.toLowerCase() === normalized)
1129
+ );
1130
+ if (direct) {
1131
+ return direct;
1132
+ }
1133
+ const ignoredTokens = new Set(tokenize(`${app.toolkit_slug} ${app.toolkit_name}`));
1134
+ const queryTokens = tokenize([requestedAccount, queryText].filter(Boolean).join(" "))
1135
+ .filter((token) => !ignoredTokens.has(token));
1136
+ if (queryTokens.length > 0) {
1137
+ let best: ComposioManagedAccount | null = null;
1138
+ let bestScore = 0;
1139
+ for (const account of accounts) {
1140
+ const score = scoreMatch(
1141
+ [
1142
+ account.account_identity,
1143
+ account.display_label,
1144
+ account.account_email,
1145
+ account.account_name,
1146
+ account.account_label,
1147
+ account.connected_account_id,
1148
+ ].filter(Boolean).join(" "),
1149
+ queryTokens,
1150
+ );
1151
+ if (score > bestScore) {
1152
+ best = account;
1153
+ bestScore = score;
1154
+ }
1155
+ }
1156
+ if (bestScore > 0) {
1157
+ return best;
1158
+ }
1159
+ }
1160
+ return null;
1161
+ }
1162
+
1163
+ if (accounts.length === 1) {
1164
+ return accounts[0] ?? null;
1165
+ }
1166
+
1167
+ return null;
1168
+ }
1169
+
585
1170
  function chooseTool(
586
1171
  app: ComposioToolIndexFile["connected_apps"][number],
1172
+ candidates: ResolverToolCandidate[],
587
1173
  queryText: string,
588
1174
  ) {
589
- return chooseBestTool(buildIndexedToolCandidates(app), app.recipes, queryText);
1175
+ return chooseBestTool(candidates, app.recipes, queryText);
590
1176
  }
591
1177
 
592
1178
  function chooseFallbackTool(app: string, queryText: string) {
@@ -607,126 +1193,662 @@ function chooseFallbackTool(app: string, queryText: string) {
607
1193
  return best;
608
1194
  }
609
1195
 
610
- function createComposioResolveTool(api: OpenClawPluginApi): AnyAgentTool {
1196
+ type ComposioSearchPresentationResult = {
1197
+ app: ComposioToolIndexFile["connected_apps"][number];
1198
+ search: ComposioToolSearchResult;
1199
+ account_candidates: Array<{
1200
+ account: string;
1201
+ alias: string | null;
1202
+ connected_account_id: string | null;
1203
+ account_identity: string | null;
1204
+ display_label: string;
1205
+ account_email: string | null;
1206
+ account_name: string | null;
1207
+ account_label: string | null;
1208
+ is_default: boolean;
1209
+ }>;
1210
+ selected_account: {
1211
+ account: string;
1212
+ alias: string | null;
1213
+ connected_account_id: string | null;
1214
+ account_identity: string | null;
1215
+ display_label: string;
1216
+ account_email: string | null;
1217
+ account_name: string | null;
1218
+ account_label: string | null;
1219
+ is_default: boolean;
1220
+ } | null;
1221
+ account_selection_required: boolean;
1222
+ dispatcher_input: Record<string, unknown>;
1223
+ execution_guidance?: string | null;
1224
+ recommended_plan_steps: string[];
1225
+ known_pitfalls: string[];
1226
+ difficulty?: string | null;
1227
+ pagination_input_hints: string[];
1228
+ search_source: "gateway_tool_router";
1229
+ search_session_id?: string;
1230
+ };
1231
+
1232
+ type ComposioSearchRun = {
1233
+ top_confidence: "high" | "medium" | "low";
1234
+ results: ComposioSearchPresentationResult[];
1235
+ search_source: "gateway_tool_router";
1236
+ search_session_id?: string;
1237
+ tool_schemas?: Record<string, UnknownRecord>;
1238
+ toolkit_connection_statuses?: UnknownRecord[];
1239
+ next_steps_guidance: string[];
1240
+ time_info?: UnknownRecord;
1241
+ error?: string | null;
1242
+ };
1243
+
1244
+ function buildAccountCandidates(app: ComposioToolIndexFile["connected_apps"][number]) {
1245
+ return (app.accounts ?? []).map((account) => ({
1246
+ account: account.connected_account_id,
1247
+ alias: account.account_label ?? null,
1248
+ connected_account_id: account.connected_account_id,
1249
+ account_identity: account.account_identity,
1250
+ display_label: account.display_label,
1251
+ account_email: account.account_email ?? null,
1252
+ account_name: account.account_name ?? null,
1253
+ account_label: account.account_label ?? null,
1254
+ is_default: false,
1255
+ }));
1256
+ }
1257
+
1258
+ function chooseSearchAccountCandidate(
1259
+ candidates: ComposioSearchPresentationResult["account_candidates"],
1260
+ requestedAccount: string | undefined,
1261
+ ): ComposioSearchPresentationResult["selected_account"] {
1262
+ if (candidates.length === 0) {
1263
+ return null;
1264
+ }
1265
+
1266
+ const requested = requestedAccount?.trim();
1267
+ if (requested) {
1268
+ const normalized = requested.toLowerCase();
1269
+ const direct = candidates.find((candidate) =>
1270
+ [
1271
+ candidate.account,
1272
+ candidate.alias,
1273
+ candidate.connected_account_id,
1274
+ candidate.account_identity,
1275
+ candidate.display_label,
1276
+ candidate.account_email,
1277
+ candidate.account_name,
1278
+ candidate.account_label,
1279
+ ].some((value) => value?.toLowerCase() === normalized)
1280
+ );
1281
+ if (direct) {
1282
+ return direct;
1283
+ }
1284
+ if (candidates.length === 1) {
1285
+ return null;
1286
+ }
1287
+ }
1288
+
1289
+ return null;
1290
+ }
1291
+
1292
+ function loadLocalResolverCandidate(
1293
+ workspaceDir: string,
1294
+ index: ComposioToolIndexFile | null,
1295
+ toolkitSlug: string,
1296
+ toolName: string,
1297
+ ): ResolverToolCandidate | undefined {
1298
+ void workspaceDir;
1299
+ void index;
1300
+ void toolkitSlug;
1301
+ void toolName;
1302
+ return undefined;
1303
+ }
1304
+
1305
+ function buildDispatcherInput(params: {
1306
+ appSlug: string;
1307
+ toolName: string;
1308
+ secret: string;
1309
+ mode: "gateway_tool_router";
1310
+ sessionId?: string;
1311
+ selectedAccount?: ComposioSearchPresentationResult["selected_account"];
1312
+ accountSelectionRequired?: boolean;
1313
+ }) {
1314
+ const token = signComposioSearchContext({
1315
+ version: 1,
1316
+ mode: params.mode,
1317
+ app: params.appSlug,
1318
+ tool_name: params.toolName,
1319
+ ...(params.sessionId ? { session_id: params.sessionId } : {}),
1320
+ ...(params.selectedAccount?.account ? { account: params.selectedAccount.account } : {}),
1321
+ ...(params.accountSelectionRequired ? { account_required: true } : {}),
1322
+ issued_at: new Date().toISOString(),
1323
+ }, params.secret);
1324
+
1325
+ const dispatcherInput = {
1326
+ app: params.appSlug,
1327
+ tool_name: params.toolName,
1328
+ search_context_token: token,
1329
+ ...(params.sessionId ? { search_session_id: params.sessionId } : {}),
1330
+ ...(params.selectedAccount?.account ? { account: params.selectedAccount.account } : {}),
1331
+ };
1332
+ return dispatcherInput;
1333
+ }
1334
+
1335
+ function findGatewayToolkitStatus(
1336
+ statuses: UnknownRecord[],
1337
+ toolkitSlug: string | undefined,
1338
+ ): UnknownRecord | null {
1339
+ const normalizedToolkit = normalizeResolverApp(toolkitSlug);
1340
+ if (!normalizedToolkit) {
1341
+ return null;
1342
+ }
1343
+
1344
+ return statuses.find((status) =>
1345
+ normalizeResolverApp(readString(status.toolkit)) === normalizedToolkit
1346
+ ) ?? null;
1347
+ }
1348
+
1349
+ function buildGatewayAccountCandidates(params: {
1350
+ status: UnknownRecord | null;
1351
+ localApp: ComposioToolIndexFile["connected_apps"][number] | undefined;
1352
+ }) {
1353
+ const gatewayAccounts = asRecordArray(params.status?.accounts);
1354
+ if (gatewayAccounts.length === 0) {
1355
+ return [];
1356
+ }
1357
+
1358
+ return gatewayAccounts.flatMap((account) => {
1359
+ const id = readString(account.id)?.trim();
1360
+ if (!id) {
1361
+ return [];
1362
+ }
1363
+ const alias = readString(account.alias)?.trim() ?? null;
1364
+ const userInfo = asRecord(account.user_info);
1365
+ const email = readString(userInfo?.email ?? userInfo?.account_email) ?? null;
1366
+ const name = readString(userInfo?.name ?? userInfo?.full_name) ?? null;
1367
+ return [{
1368
+ account: id,
1369
+ alias,
1370
+ connected_account_id: id,
1371
+ account_identity: id,
1372
+ display_label: alias ?? name ?? email ?? id,
1373
+ account_email: email,
1374
+ account_name: name,
1375
+ account_label: alias,
1376
+ is_default: account.is_default === true,
1377
+ }];
1378
+ });
1379
+ }
1380
+
1381
+ function readGatewayToolkitLabel(status: UnknownRecord | null, toolkitSlug: string): string {
1382
+ return readString(
1383
+ status?.toolkit_name
1384
+ ?? status?.toolkit_label
1385
+ ?? status?.label,
1386
+ ) ?? humanizeResolverApp(toolkitSlug);
1387
+ }
1388
+
1389
+ function buildGatewayAppEntry(params: {
1390
+ toolkitSlug: string;
1391
+ toolkitName: string;
1392
+ localApp: ComposioToolIndexFile["connected_apps"][number] | undefined;
1393
+ accountCandidates: ComposioSearchPresentationResult["account_candidates"];
1394
+ }): ComposioToolIndexFile["connected_apps"][number] {
1395
+ if (params.localApp) {
1396
+ return params.localApp;
1397
+ }
1398
+
1399
+ return {
1400
+ toolkit_slug: params.toolkitSlug,
1401
+ toolkit_name: params.toolkitName,
1402
+ account_count: params.accountCandidates.length,
1403
+ tools: [],
1404
+ recipes: {},
1405
+ };
1406
+ }
1407
+
1408
+ function buildGatewayWhyMatched(params: {
1409
+ useCase: string;
1410
+ toolName: string;
1411
+ toolkitSlug: string;
1412
+ primaryToolSlugs: string[];
1413
+ localTool?: ResolverToolCandidate;
1414
+ }): string[] {
1415
+ const reasons = [
1416
+ `Matched the official ${DENCH_INTEGRATIONS_DISPLAY_NAME} search query "${params.useCase}".`,
1417
+ params.primaryToolSlugs.includes(params.toolName)
1418
+ ? "The integration search ranked this tool as a primary match."
1419
+ : "The integration search ranked this tool as a related follow-up option.",
1420
+ params.localTool?.description_short || null,
1421
+ params.toolkitSlug ? `Toolkit: ${params.toolkitSlug}.` : null,
1422
+ ].filter((value): value is string => Boolean(value));
1423
+ return uniqueStrings(reasons);
1424
+ }
1425
+
1426
+ function buildGatewayPresentationResults(params: {
1427
+ workspaceDir: string;
1428
+ index: ComposioToolIndexFile | null;
1429
+ requestedApp?: string;
1430
+ requestedAccount?: string;
1431
+ topK: number;
1432
+ searchSecret: string;
1433
+ searchPayload: UnknownRecord;
1434
+ }): ComposioSearchPresentationResult[] {
1435
+ const queryResult = asRecordArray(params.searchPayload.results)[0];
1436
+ if (!queryResult) {
1437
+ return [];
1438
+ }
1439
+
1440
+ const toolSchemas = readToolSchemaMap(params.searchPayload.tool_schemas);
1441
+ const statuses = asRecordArray(params.searchPayload.toolkit_connection_statuses);
1442
+ const sessionId = readString(asRecord(params.searchPayload.session)?.id);
1443
+ const primaryToolSlugs = readStringArray(queryResult.primary_tool_slugs);
1444
+ const relatedToolSlugs = readStringArray(queryResult.related_tool_slugs);
1445
+ const orderedToolSlugs = uniqueStrings([...primaryToolSlugs, ...relatedToolSlugs]).slice(0, params.topK);
1446
+
1447
+ return orderedToolSlugs.flatMap((toolName) => {
1448
+ const schema = toolSchemas[toolName];
1449
+ if (!schema) {
1450
+ return [];
1451
+ }
1452
+
1453
+ const toolkitSlug = normalizeResolverApp(readString(schema.toolkit));
1454
+ if (!toolkitSlug) {
1455
+ return [];
1456
+ }
1457
+ if (params.requestedApp && normalizeResolverApp(params.requestedApp) !== toolkitSlug) {
1458
+ return [];
1459
+ }
1460
+
1461
+ const status = findGatewayToolkitStatus(statuses, toolkitSlug);
1462
+ if (readBoolean(status?.has_active_connection) === false) {
1463
+ return [];
1464
+ }
1465
+ const toolkitName = readGatewayToolkitLabel(status, toolkitSlug);
1466
+ const tool = mergeToolSummaryFromSchema({
1467
+ toolName,
1468
+ toolkitName,
1469
+ schema,
1470
+ });
1471
+ const accountCandidates = buildGatewayAccountCandidates({
1472
+ status,
1473
+ localApp: undefined,
1474
+ });
1475
+ const selectedAccount = chooseSearchAccountCandidate(accountCandidates, params.requestedAccount);
1476
+ const accountSelectionRequired = !selectedAccount
1477
+ && (accountCandidates.length > 1 || Boolean(params.requestedAccount?.trim()));
1478
+ const app = buildGatewayAppEntry({
1479
+ toolkitSlug,
1480
+ toolkitName,
1481
+ localApp: undefined,
1482
+ accountCandidates,
1483
+ });
1484
+ return [{
1485
+ app,
1486
+ search: {
1487
+ toolkit_slug: toolkitSlug,
1488
+ toolkit_name: toolkitName,
1489
+ tool,
1490
+ source: "catalog",
1491
+ recipe_intents: [readString(queryResult.use_case) ?? tool.title],
1492
+ score: orderedToolSlugs.length > 0 ? orderedToolSlugs.length - orderedToolSlugs.indexOf(toolName) : 1,
1493
+ why_matched: buildGatewayWhyMatched({
1494
+ useCase: readString(queryResult.use_case) ?? tool.title,
1495
+ toolName,
1496
+ toolkitSlug,
1497
+ primaryToolSlugs,
1498
+ }),
1499
+ },
1500
+ account_candidates: accountCandidates,
1501
+ selected_account: selectedAccount,
1502
+ account_selection_required: accountSelectionRequired,
1503
+ dispatcher_input: buildDispatcherInput({
1504
+ appSlug: toolkitSlug,
1505
+ toolName,
1506
+ secret: params.searchSecret,
1507
+ mode: "gateway_tool_router",
1508
+ sessionId: sessionId ?? undefined,
1509
+ selectedAccount,
1510
+ accountSelectionRequired,
1511
+ }),
1512
+ execution_guidance: readString(queryResult.execution_guidance) ?? null,
1513
+ recommended_plan_steps: readStringArray(queryResult.recommended_plan_steps),
1514
+ known_pitfalls: readStringArray(queryResult.known_pitfalls),
1515
+ difficulty: readString(queryResult.difficulty) ?? null,
1516
+ pagination_input_hints: detectPaginationInputHints(tool.input_schema),
1517
+ search_source: "gateway_tool_router",
1518
+ ...(sessionId ? { search_session_id: sessionId } : {}),
1519
+ }];
1520
+ });
1521
+ }
1522
+
1523
+ function deriveGatewayTopConfidence(payload: UnknownRecord, results: ComposioSearchPresentationResult[]) {
1524
+ const queryResult = asRecordArray(payload.results)[0];
1525
+ const primaryToolSlugs = readStringArray(queryResult?.primary_tool_slugs);
1526
+ if (results.length === 0 || primaryToolSlugs.length === 0) {
1527
+ return "low" as const;
1528
+ }
1529
+ const distinctToolkits = new Set(results.map((result) => result.app.toolkit_slug));
1530
+ if (distinctToolkits.size === 1 && primaryToolSlugs.length === 1) {
1531
+ return "high" as const;
1532
+ }
1533
+ if (distinctToolkits.size === 1) {
1534
+ return "medium" as const;
1535
+ }
1536
+ return results.length === 1 ? "medium" as const : "low" as const;
1537
+ }
1538
+
1539
+ async function runGatewayComposioToolSearch(params: {
1540
+ api: OpenClawPluginApi;
1541
+ workspaceDir: string;
1542
+ index: ComposioToolIndexFile | null;
1543
+ queryText: string;
1544
+ requestedApp?: string;
1545
+ requestedAccount?: string;
1546
+ topK: number;
1547
+ sessionId?: string;
1548
+ searchSecret: string;
1549
+ }): Promise<ComposioSearchRun | null> {
1550
+ const knownFields = [
1551
+ params.requestedApp ? `toolkit:${normalizeResolverApp(params.requestedApp)}` : null,
1552
+ ].filter((value): value is string => Boolean(value));
1553
+
1554
+ const payload = await postComposioGatewayJson({
1555
+ api: params.api,
1556
+ path: "/v1/composio/tool-router/search",
1557
+ body: {
1558
+ queries: [
1559
+ {
1560
+ use_case: params.queryText,
1561
+ ...(knownFields.length > 0 ? { known_fields: knownFields.join(", ") } : {}),
1562
+ },
1563
+ ],
1564
+ session: params.sessionId
1565
+ ? { id: params.sessionId }
1566
+ : { generate_id: true },
1567
+ ...(params.requestedAccount?.trim() ? { account: params.requestedAccount.trim() } : {}),
1568
+ model: "gpt-5.4",
1569
+ },
1570
+ });
1571
+ if (!payload) {
1572
+ return null;
1573
+ }
1574
+
1575
+ const gatewayError = readString(payload.error)
1576
+ ?? readString(asRecord(payload.error)?.message);
1577
+ const searchStatuses = asRecordArray(payload.toolkit_connection_statuses);
1578
+ const shouldProbeLiveConnections = searchStatuses.some((status) =>
1579
+ readBoolean(status.has_active_connection) === false
1580
+ );
1581
+ const liveStatuses = shouldProbeLiveConnections
1582
+ ? await fetchGatewayLiveToolkitStatuses({ api: params.api })
1583
+ : null;
1584
+ const reconciledStatuses = reconcileGatewayToolkitStatuses({
1585
+ searchStatuses,
1586
+ liveStatuses,
1587
+ });
1588
+ const effectivePayload = reconciledStatuses.statuses !== searchStatuses
1589
+ ? {
1590
+ ...payload,
1591
+ toolkit_connection_statuses: reconciledStatuses.statuses,
1592
+ }
1593
+ : payload;
1594
+ const results = buildGatewayPresentationResults({
1595
+ workspaceDir: params.workspaceDir,
1596
+ index: params.index,
1597
+ requestedApp: params.requestedApp,
1598
+ requestedAccount: params.requestedAccount,
1599
+ topK: params.topK,
1600
+ searchSecret: params.searchSecret,
1601
+ searchPayload: effectivePayload,
1602
+ });
1603
+
611
1604
  return {
612
- name: COMPOSIO_RESOLVE_TOOL_NAME,
613
- label: "Composio Resolve Tool",
1605
+ top_confidence: deriveGatewayTopConfidence(effectivePayload, results),
1606
+ results,
1607
+ search_source: "gateway_tool_router",
1608
+ search_session_id: readString(asRecord(effectivePayload.session)?.id) ?? params.sessionId,
1609
+ tool_schemas: readToolSchemaMap(payload.tool_schemas),
1610
+ toolkit_connection_statuses: reconciledStatuses.statuses,
1611
+ next_steps_guidance: readStringArray(payload.next_steps_guidance),
1612
+ time_info: asRecord(payload.time_info) ?? undefined,
1613
+ error: gatewayError ?? null,
1614
+ };
1615
+ }
1616
+
1617
+ function buildSearchPresentationResults(params: {
1618
+ index: ComposioToolIndexFile;
1619
+ queryText: string;
1620
+ requestedAccount?: string;
1621
+ searchResults: ComposioToolSearchResult[];
1622
+ searchSecret: string;
1623
+ }): ComposioSearchPresentationResult[] {
1624
+ return params.searchResults.flatMap((result) => {
1625
+ const app = params.index.connected_apps.find((entry) => entry.toolkit_slug === result.toolkit_slug);
1626
+ if (!app) {
1627
+ return [];
1628
+ }
1629
+ const accountCandidates = buildAccountCandidates(app);
1630
+ const selectedAccount = chooseSearchAccountCandidate(accountCandidates, params.requestedAccount)
1631
+ ?? (() => {
1632
+ const localSelected = chooseAccount(app, params.requestedAccount, params.queryText);
1633
+ if (!localSelected) {
1634
+ return null;
1635
+ }
1636
+ return accountCandidates.find((candidate) =>
1637
+ candidate.connected_account_id === localSelected.connected_account_id
1638
+ ) ?? null;
1639
+ })();
1640
+ const accountSelectionRequired = !selectedAccount
1641
+ && (app.account_count > 1 || Boolean(params.requestedAccount?.trim()));
1642
+ return [{
1643
+ app,
1644
+ search: result,
1645
+ account_candidates: accountCandidates,
1646
+ selected_account: selectedAccount,
1647
+ account_selection_required: accountSelectionRequired,
1648
+ dispatcher_input: buildDispatcherInput({
1649
+ appSlug: app.toolkit_slug,
1650
+ toolName: result.tool.name,
1651
+ secret: params.searchSecret,
1652
+ mode: "gateway_tool_router",
1653
+ selectedAccount,
1654
+ accountSelectionRequired,
1655
+ }),
1656
+ execution_guidance: null,
1657
+ recommended_plan_steps: [],
1658
+ known_pitfalls: [],
1659
+ difficulty: null,
1660
+ pagination_input_hints: detectPaginationInputHints(result.tool.input_schema),
1661
+ search_source: "gateway_tool_router",
1662
+ }];
1663
+ });
1664
+ }
1665
+
1666
+ function runLocalComposioToolSearch(params: {
1667
+ workspaceDir: string;
1668
+ index: ComposioToolIndexFile;
1669
+ queryText: string;
1670
+ requestedApp?: string;
1671
+ requestedAccount?: string;
1672
+ topK?: number;
1673
+ searchSecret: string;
1674
+ }): ComposioSearchRun {
1675
+ void params;
1676
+ return {
1677
+ top_confidence: "low",
1678
+ results: [],
1679
+ search_source: "gateway_tool_router",
1680
+ next_steps_guidance: [],
1681
+ };
1682
+ }
1683
+
1684
+ function buildSearchResultPayload(result: ComposioSearchPresentationResult) {
1685
+ return {
1686
+ app: result.app.toolkit_slug,
1687
+ app_name: result.app.toolkit_name,
1688
+ connected_accounts: result.app.account_count,
1689
+ account_candidates: result.account_candidates,
1690
+ ...(result.selected_account ? { selected_account: result.selected_account } : {}),
1691
+ account_selection_required: result.account_selection_required,
1692
+ server: "composio",
1693
+ tool: result.search.tool.name,
1694
+ source: result.search.source,
1695
+ search_source: result.search_source,
1696
+ recipe_intents: result.search.recipe_intents,
1697
+ score: result.search.score,
1698
+ why_matched: result.search.why_matched,
1699
+ dispatcher_tool: DENCH_EXECUTE_INTEGRATIONS_NAME,
1700
+ dispatcher_input: result.dispatcher_input,
1701
+ required_args: result.search.tool.required_args,
1702
+ arg_hints: result.search.tool.arg_hints,
1703
+ default_args: result.search.tool.default_args ?? {},
1704
+ example_args: result.search.tool.example_args ?? result.search.tool.default_args ?? {},
1705
+ example_prompts: result.search.tool.example_prompts ?? [],
1706
+ ...(result.search.tool.input_schema ? { input_schema: result.search.tool.input_schema } : {}),
1707
+ ...(result.execution_guidance ? { execution_guidance: result.execution_guidance } : {}),
1708
+ ...(result.recommended_plan_steps.length > 0
1709
+ ? { recommended_plan_steps: result.recommended_plan_steps }
1710
+ : {}),
1711
+ ...(result.known_pitfalls.length > 0 ? { known_pitfalls: result.known_pitfalls } : {}),
1712
+ ...(result.difficulty ? { difficulty: result.difficulty } : {}),
1713
+ ...(result.pagination_input_hints.length > 0
1714
+ ? { pagination_input_hints: result.pagination_input_hints }
1715
+ : {}),
1716
+ ...(result.search_session_id ? { search_session_id: result.search_session_id } : {}),
1717
+ };
1718
+ }
1719
+
1720
+ function buildSearchInstruction(params: {
1721
+ topConfidence: "high" | "medium" | "low";
1722
+ results: ComposioSearchPresentationResult[];
1723
+ }): string {
1724
+ const first = params.results[0];
1725
+ if (!first) {
1726
+ return "No matching integration tools were found.";
1727
+ }
1728
+ if (first.account_selection_required) {
1729
+ return `Ask the user which connected ${first.app.toolkit_name} account to use before calling \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\`.`;
1730
+ }
1731
+ if (params.topConfidence === "low" && params.results.length > 1) {
1732
+ return `The search is ambiguous. Ask a brief clarifying question or present the top candidates before calling \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\`.`;
1733
+ }
1734
+ if (first.pagination_input_hints.length > 0) {
1735
+ return `Use the top search result with \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\` and the returned \`dispatcher_input\`. If the tool output shows more pages and the user asked for a complete result, keep paginating with cursor fields like ${first.pagination_input_hints.join(", ")} until complete.`;
1736
+ }
1737
+ return `Use the top search result with \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\` and the returned \`dispatcher_input\`, then send the final JSON \`arguments\` object for that tool.`;
1738
+ }
1739
+
1740
+ function buildClarificationCandidates(results: ComposioSearchPresentationResult[]) {
1741
+ return results.slice(0, 3).map((result) => ({
1742
+ app: result.app.toolkit_slug,
1743
+ app_name: result.app.toolkit_name,
1744
+ tool: result.search.tool.name,
1745
+ title: result.search.tool.title,
1746
+ score: result.search.score,
1747
+ why_matched: result.search.why_matched,
1748
+ }));
1749
+ }
1750
+
1751
+ function createDenchSearchIntegrationsTool(api: OpenClawPluginApi): AnyAgentTool {
1752
+ return {
1753
+ name: DENCH_SEARCH_INTEGRATIONS_NAME,
1754
+ label: `${DENCH_INTEGRATIONS_DISPLAY_NAME} Search`,
614
1755
  description:
615
- "Resolve the best Composio tool and argument hints for a connected app request without scanning the full Composio catalog.",
616
- parameters: COMPOSIO_RESOLVE_TOOL_PARAMETERS,
617
- async execute(args) {
1756
+ `Search available ${DENCH_INTEGRATION_DISPLAY_NAME.toLowerCase()} tools through the gateway. Returns tool slugs, descriptions, input schemas, and connection status. Use \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\` to execute a returned tool.`,
1757
+ parameters: DENCH_SEARCH_INTEGRATIONS_PARAMETERS,
1758
+ async execute(_toolCallId: string, input: Record<string, unknown>) {
618
1759
  const workspaceDir = resolveWorkspaceDir(api);
619
1760
  if (!workspaceDir) {
620
1761
  return jsonResult({ error: "No workspace is configured for DenchClaw." });
621
1762
  }
622
1763
 
623
- const payload = asRecord(args) ?? {};
624
- const requestedApp = readString(payload.app);
625
- const intent = readString(payload.intent) ?? "";
626
- const userRequest = readString(payload.userRequest);
627
- const queryText = [requestedApp, intent, userRequest].filter(Boolean).join(" ");
628
- const normalizedRequestedApp = normalizeResolverApp(requestedApp);
629
-
630
- const index = readComposioToolIndexFile(workspaceDir);
631
- if (!index || index.connected_apps.length === 0) {
632
- if (!normalizedRequestedApp) {
633
- return jsonResult({
634
- error: "No verified Composio tool index is available in this workspace.",
635
- guidance: "Open App Connections, repair Composio MCP if needed, rebuild the tool index, or provide the target app explicitly.",
636
- });
637
- }
638
- const fallback = chooseFallbackTool(normalizedRequestedApp, queryText);
639
- if (!fallback) {
640
- return jsonResult({
641
- error: `No bundled fallback recipe exists for ${normalizedRequestedApp}.`,
642
- guidance: "Rebuild the Composio tool index from App Connections to get the exact tool list for this workspace.",
643
- });
644
- }
645
- const status = describeStatusForResolver(workspaceDir);
646
- const actionLink = buildComposioActionLink("connect", normalizedRequestedApp);
1764
+ const payload = asRecord(input) ?? {};
1765
+ const query = readString(payload.query) ?? "";
1766
+ const toolkit = readString(payload.toolkit);
1767
+ const normalizedToolkit = normalizeResolverApp(toolkit);
1768
+ const rawLimit = typeof payload.limit === "number" ? payload.limit : Number(payload.limit);
1769
+ const limit = Number.isFinite(rawLimit) ? Math.max(1, Math.min(Math.trunc(rawLimit), 100)) : 20;
1770
+
1771
+ const gatewayResult = await postComposioGatewayJson({
1772
+ api,
1773
+ path: "/v1/composio/tools/search",
1774
+ body: {
1775
+ ...(query ? { query } : {}),
1776
+ ...(normalizedToolkit ? { toolkit_slug: normalizedToolkit } : {}),
1777
+ limit,
1778
+ },
1779
+ });
1780
+
1781
+ if (!gatewayResult) {
647
1782
  return jsonResult({
648
- app: normalizedRequestedApp,
649
- app_name: humanizeResolverApp(normalizedRequestedApp),
650
- connected_accounts: 0,
651
- availability: "connect_required",
652
- server: "composio",
653
- tool: fallback.tool,
654
- recommended_intent: fallback.intent,
655
- required_args: fallback.required_args,
656
- arg_hints: fallback.arg_hints,
657
- default_args: fallback.default_args ?? {},
658
- example_args: fallback.default_args ?? {},
659
- example_prompts: fallback.example_prompts ?? [],
660
- mcp_verified: status.verified,
661
- status_message: status.message,
662
- instruction: actionLink
663
- ? `Treat ${humanizeResolverApp(normalizedRequestedApp)} as unavailable until proven otherwise. Only call \`${fallback.tool}\` if it is already available in this session; otherwise explain the limitation briefly and end the assistant reply with this exact markdown link: ${actionLink}`
664
- : `Treat ${humanizeResolverApp(normalizedRequestedApp)} as unavailable until proven otherwise. Only call \`${fallback.tool}\` if it is already available in this session.`,
665
- ...buildResolverActionDetails("connect", normalizedRequestedApp),
1783
+ error: `${DENCH_INTEGRATIONS_DISPLAY_NAME} search is unavailable.`,
1784
+ guidance: `Check the Dench Cloud gateway/API key configuration, then retry ${DENCH_SEARCH_INTEGRATIONS_NAME}.`,
666
1785
  });
667
1786
  }
668
1787
 
669
- const app = chooseApp(index, requestedApp, queryText);
670
- if (!app) {
671
- const actionLink = buildComposioActionLink("connect", normalizedRequestedApp);
1788
+ const items = asRecordArray(gatewayResult.items) ?? [];
1789
+ const connectedToolkits = Array.isArray(gatewayResult.connected_toolkits)
1790
+ ? (gatewayResult.connected_toolkits as string[])
1791
+ : [];
1792
+
1793
+ if (items.length === 0 && normalizedToolkit && !connectedToolkits.includes(normalizedToolkit)) {
1794
+ const actionLink = buildComposioActionLink("connect", normalizedToolkit);
672
1795
  return jsonResult({
673
- error: "Could not match the request to a connected Composio app.",
674
- available_apps: index.connected_apps.map((entry) => entry.toolkit_slug),
1796
+ query,
1797
+ toolkit_filter: normalizedToolkit,
675
1798
  availability: "connect_required",
1799
+ result_count: 0,
1800
+ results: [],
1801
+ connected_toolkits: connectedToolkits,
676
1802
  instruction: actionLink
677
- ? `Explain briefly that the requested app is not currently connected, then end the assistant reply with this exact markdown link: ${actionLink}`
678
- : "Explain briefly that the requested app is not currently connected.",
679
- ...buildResolverActionDetails("connect", normalizedRequestedApp),
1803
+ ? `${humanizeResolverApp(normalizedToolkit)} is not connected. End the reply with this link: ${actionLink}`
1804
+ : `${humanizeResolverApp(normalizedToolkit)} is not connected.`,
1805
+ ...buildResolverActionDetails("connect", normalizedToolkit),
680
1806
  });
681
1807
  }
682
1808
 
683
- let chosen = chooseTool(app, queryText);
684
- if (!chosen.tool || chosen.score <= 0) {
685
- const broaderCatalog = await fetchBroaderCatalogSlice(api, app.toolkit_slug).catch(() => []);
686
- if (broaderCatalog.length > 0) {
687
- const broaderChoice = chooseBestTool(broaderCatalog, app.recipes, queryText);
688
- if (broaderChoice.tool && broaderChoice.score > chosen.score) {
689
- chosen = broaderChoice;
690
- }
691
- }
692
- }
693
-
694
- const { tool, recipe } = chosen;
695
- if (!tool) {
696
- const reconnectLink = buildComposioActionLink("reconnect", app.toolkit_slug);
1809
+ if (items.length === 0) {
697
1810
  return jsonResult({
698
- error: `No indexed Composio tools are available for ${app.toolkit_name}.`,
699
- app: app.toolkit_slug,
700
- availability: "reconnect_recommended",
701
- instruction: reconnectLink
702
- ? `The connected ${app.toolkit_name} app looks unavailable or stale. Explain that briefly and end the assistant reply with this exact markdown link: ${reconnectLink}`
703
- : `The connected ${app.toolkit_name} app looks unavailable or stale.`,
704
- ...buildResolverActionDetails("reconnect", app.toolkit_slug),
1811
+ query,
1812
+ toolkit_filter: normalizedToolkit,
1813
+ result_count: 0,
1814
+ results: [],
1815
+ connected_toolkits: connectedToolkits,
1816
+ instruction: normalizedToolkit
1817
+ ? `No ${humanizeResolverApp(normalizedToolkit)} integration tools matched. Refine the query or try a broader search.`
1818
+ : "No integration tools matched. Refine the query or specify a toolkit.",
705
1819
  });
706
1820
  }
707
1821
 
708
- const status = describeStatusForResolver(workspaceDir);
709
- const directlyCallable = app.tools.some((entry) => entry.name === tool.name)
710
- || Object.values(app.recipes).includes(tool.name);
711
- const instruction = directlyCallable
712
- ? `Call the Composio tool \`${tool.name}\` directly. Do not use gog, shell CLIs, curl, or raw gateway HTTP.`
713
- : `This recommendation came from the broader Composio catalog fallback. If \`${tool.name}\` is directly available in this session, call it. Otherwise rebuild the Composio tool index before retrying.`;
1822
+ const results = items.map((item) => {
1823
+ const toolkitRec = asRecord(item.toolkit);
1824
+ const connStatus = asRecord(item.connection_status);
1825
+ return {
1826
+ tool_slug: readString(item.slug),
1827
+ name: readString(item.name),
1828
+ description: readString(item.description),
1829
+ toolkit: {
1830
+ slug: readString(toolkitRec?.slug),
1831
+ name: readString(toolkitRec?.name),
1832
+ },
1833
+ input_schema: item.input_parameters ?? item.input_schema,
1834
+ is_connected: connStatus?.is_connected === true,
1835
+ account_count: typeof connStatus?.account_count === "number" ? connStatus.account_count : 0,
1836
+ accounts: Array.isArray(connStatus?.accounts) ? connStatus.accounts : [],
1837
+ };
1838
+ });
1839
+
1840
+ const hasMultiAccountToolkit = results.some((r) => r.account_count > 1);
1841
+ let instruction = `Found ${results.length} integration tool(s). Use \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\` with the tool_slug and arguments to execute.`;
1842
+ if (hasMultiAccountToolkit) {
1843
+ instruction += " Some toolkits have multiple connected accounts — ask the user which account to use and pass `connected_account_id` to execute.";
1844
+ }
1845
+
714
1846
  return jsonResult({
715
- app: app.toolkit_slug,
716
- app_name: app.toolkit_name,
717
- connected_accounts: app.account_count,
718
- server: "composio",
719
- tool: tool.name,
720
- source: tool.source,
721
- directly_callable: directlyCallable,
722
- recommended_intent: recipe,
723
- required_args: tool.required_args,
724
- arg_hints: tool.arg_hints,
725
- default_args: tool.default_args ?? {},
726
- example_args: tool.example_args ?? tool.default_args ?? {},
727
- example_prompts: tool.example_prompts ?? [],
728
- mcp_verified: status.verified,
729
- status_message: status.message,
1847
+ query,
1848
+ toolkit_filter: normalizedToolkit,
1849
+ result_count: results.length,
1850
+ results,
1851
+ connected_toolkits: connectedToolkits,
730
1852
  instruction,
731
1853
  });
732
1854
  },
@@ -735,24 +1857,24 @@ function createComposioResolveTool(api: OpenClawPluginApi): AnyAgentTool {
735
1857
 
736
1858
  function buildComposioDefaultGuidance(composioAppsSkillPath: string): string {
737
1859
  return [
738
- "## Connected App Tools (via Composio MCP)",
1860
+ `## Connected App Tools (${DENCH_INTEGRATIONS_DISPLAY_NAME})`,
739
1861
  "",
740
- "Composio is the default integration layer for connected apps in this workspace.",
1862
+ `${DENCH_INTEGRATIONS_DISPLAY_NAME} is the default integration layer for connected apps in this workspace. Two tools are available:`,
1863
+ `- \`${DENCH_SEARCH_INTEGRATIONS_NAME}\` — search for available integration tools by query and/or toolkit slug.`,
1864
+ `- \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\` — execute a tool by its slug with the required arguments.`,
741
1865
  "",
742
- "- If the user mentions Composio, rube, map, MCP, or says an app is already connected, use the Composio tools first.",
743
- `- **When the user asks about ANY third-party app or service** (e.g. Slack, HubSpot, Salesforce, Jira, Asana, Discord, Airtable, Notion, Linear, Gmail, GitHub, Google Calendar, Stripe, Zendesk, Trello, etc.), always call \`${COMPOSIO_RESOLVE_TOOL_NAME}\` first to verify whether it is connected before answering. This applies to ALL apps, not just the ones listed here.`,
744
- `- If the exact Composio tool is not obvious, call \`${COMPOSIO_RESOLVE_TOOL_NAME}\` before guessing or scanning the full Composio catalog.`,
745
- `- Load and follow \`${composioAppsSkillPath}\` for Gmail, Slack, GitHub, Notion, Google Calendar, and Linear recipes when the generated tool index is missing.`,
746
- "- Never use `gog`, shell CLIs, curl, or raw `/v1/composio/*` HTTP for Gmail/Calendar/Drive/Slack/GitHub/Notion/Linear when Composio is connected or the user mentions Composio/rube/map/MCP.",
747
- "- **When the resolver returns `action_link_markdown`, you MUST end the assistant reply with that exact markdown link.** Do not omit it. Do not rephrase it as plain text. The link renders as a clickable button in chat.",
1866
+ `- If the user mentions ${DENCH_INTEGRATIONS_DISPLAY_NAME}, a connected app, rube, map, MCP, or says an app is already connected, use the integration tools first.`,
1867
+ `- **When the user asks about ANY third-party app or service** (e.g. Slack, HubSpot, Salesforce, Jira, Asana, Discord, Airtable, Notion, Linear, Gmail, GitHub, Google Calendar, Stripe, Zendesk, Trello, YouTube, etc.), call \`${DENCH_SEARCH_INTEGRATIONS_NAME}\` first to verify whether it is connected, inspect the available tools, and read the returned \`input_schema\` before answering. This applies to ALL apps, not just the ones listed here.`,
1868
+ `- After searching, execute the chosen tool with \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\` passing \`tool_slug\` and \`arguments\`. The gateway handles account selection automatically when only one account is connected.`,
1869
+ `- If search returns multiple connected accounts for a toolkit, ask the user which account to use and pass the \`connected_account_id\` to \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\`.`,
1870
+ "- Read the returned `input_schema` before filling arguments. Use exact field names and types from that schema.",
1871
+ `- Load and follow \`${composioAppsSkillPath}\` for high-level workflow hints, but let the live integration schema decide the actual argument names and types.`,
1872
+ `- Never use \`gog\`, shell CLIs, curl, or raw gateway HTTP for Gmail/Calendar/Drive/Slack/GitHub/Notion/Linear when ${DENCH_INTEGRATIONS_DISPLAY_NAME} is connected or the user mentions the connected-app layer/rube/map/MCP.`,
1873
+ "- **When the integration search response returns `action_link_markdown`, you MUST end the assistant reply with that exact markdown link.** Do not omit it. Do not rephrase it as plain text. The link renders as a clickable button in chat.",
748
1874
  "- Missing first-time connection example: `[Connect Slack](dench://composio/connect?toolkit=slack&name=Slack)`.",
749
- "- Stale or unusable connection example: `[Reconnect Slack](dench://composio/reconnect?toolkit=slack&name=Slack)`.",
750
- "- If the resolver returns an error with `availability: \"connect_required\"`, briefly explain the app is not connected and end with the connect link. Do NOT suggest navigating to Integrations manually.",
751
- "- Gmail fast path: `GMAIL_FETCH_EMAILS` with `label_ids: [\"INBOX\"]` and `max_results: 10`; for one message use `GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID`.",
752
- "- GitHub fast path: for 'recent PRs' or general PR discovery, prefer `GITHUB_FIND_PULL_REQUESTS` when available.",
753
- "- Google Calendar fast path: for 'what's upcoming' or 'find an event', prefer `GOOGLE_CALENDAR_EVENTS_LIST` with an explicit time window when the schema supports it.",
754
- "- If Composio MCP is unavailable in this session, stop and report repair guidance instead of bypassing it.",
755
- "- If a Composio tool call fails because of argument shape, fix the arguments and retry once before considering any fallback.",
1875
+ "- If the search returns `availability: \"connect_required\"`, briefly explain the app is not connected and end with the connect link.",
1876
+ "- If an integration tool call fails because of argument shape, fix the arguments and retry once before considering any fallback.",
1877
+ "- When the user implicitly asks for the full dataset, keep paginating until the tool response no longer advertises more pages.",
756
1878
  "",
757
1879
  ].join("\n");
758
1880
  }
@@ -761,13 +1883,11 @@ export function buildIdentityPrompt(workspaceDir: string): string {
761
1883
  const skillsDir = path.join(workspaceDir, "skills");
762
1884
  const crmSkillPath = path.join(skillsDir, "crm", "SKILL.md");
763
1885
  const appBuilderSkillPath = path.join(skillsDir, "app-builder", "SKILL.md");
764
- const composioAppsSkillPath = path.join(skillsDir, "composio-apps", "SKILL.md");
1886
+ const composioAppsSkillPath = path.join(skillsDir, "dench-integrations", "SKILL.md");
765
1887
  const appsDir = path.join(workspaceDir, "apps");
766
1888
  const dbPath = path.join(workspaceDir, "workspace.duckdb");
767
1889
 
768
- const composioCheatSheet = loadComposioToolCheatSheetMarkdown(workspaceDir);
769
- const composioGuidance = composioCheatSheet
770
- ?? buildComposioDefaultGuidance(composioAppsSkillPath);
1890
+ const composioGuidance = buildComposioDefaultGuidance(composioAppsSkillPath);
771
1891
 
772
1892
  return `# DenchClaw System Prompt
773
1893
 
@@ -805,7 +1925,7 @@ When in doubt, delegate. A well-delegated task finishes faster and produces bett
805
1925
  |---|---|---|---|
806
1926
  | **CRM Analyst** | \`${crmSkillPath}\` | DuckDB queries, object/field/entry CRUD, pipeline ops, data enrichment, PIVOT views, report generation, workspace docs | Default model; fast model for simple queries |
807
1927
  | **App Builder** | \`${appBuilderSkillPath}\` | Build \`.dench.app\` web apps with DuckDB, Chart.js/D3, games, AI chat UIs, platform API | Capable model with thinking enabled |
808
- | **App Integration** | \`${composioAppsSkillPath}\` | Connected app tools (Gmail, Slack, etc.) via Composio MCP — recipes and argument defaults | Default model |
1928
+ | **App Integration** | \`${composioAppsSkillPath}\` | Connected app tools (Gmail, Slack, etc.) via ${DENCH_INTEGRATIONS_DISPLAY_NAME} — recipes and argument defaults | Default model |
809
1929
 
810
1930
  ### Ad-hoc specialists (check for custom skills first)
811
1931
 
@@ -866,11 +1986,11 @@ For multi-session projects, write a session handoff summary to \`${workspaceDir}
866
1986
  - For prospecting or lead-list generation, prefer \`apollo_enrich\` with \`action: "people_search"\` when the user wants people matching titles, locations, or company/domain filters.
867
1987
  - Use \`exa_search\` and \`exa_get_contents\` to gather open-web context around a person or company when Apollo lacks enough input or when the user wants broader research, news, or website evidence.
868
1988
  - Use Apollo for structured CRM enrichment and Exa for broader web research; combine them when helpful, but do not substitute Exa for Apollo on explicit enrichment requests unless Apollo is unavailable or insufficient.
869
- - For connected apps (Gmail, Slack, GitHub, etc.), use the **Composio** tools directly. Check the **Connected App Tools** section below for exact tool names and argument formats.
870
- - **When the user mentions ANY third-party app or service**, always call \`${COMPOSIO_RESOLVE_TOOL_NAME}\` before answering to verify availability — this applies to all apps (HubSpot, Salesforce, Slack, Gmail, etc.), not just a fixed list. If the resolver says the app is not connected, emit the connect link it provides.
871
- - If the exact Composio tool name is unclear, call \`${COMPOSIO_RESOLVE_TOOL_NAME}\` before exploring the curated Composio tools for this workspace.
872
- - **Never** use curl or raw HTTP to call Composio or gateway integration endpoints — always use the Composio tools.
873
- - **Never** use \`gog\` for Gmail/Calendar/Drive when Composio is connected or the user mentions Composio/rube/map/MCP. \`gog\` is a fallback only when the user explicitly asks for it or Composio is unavailable.
1989
+ - For connected apps (Gmail, Slack, GitHub, etc.), use the **${DENCH_INTEGRATIONS_DISPLAY_NAME}** tools directly. Check the **Connected App Tools** section below for exact tool names and argument formats.
1990
+ - **When the user mentions ANY third-party app or service**, always call \`${DENCH_SEARCH_INTEGRATIONS_NAME}\` before answering to verify availability, inspect the available tools, and read the returned \`input_schema\` — this applies to all apps (HubSpot, Salesforce, Slack, Gmail, YouTube, etc.), not just a fixed list. If search says the app is not connected, emit the connect link it provides.
1991
+ - After searching, execute with \`${DENCH_EXECUTE_INTEGRATIONS_NAME}\` passing \`tool_slug\` and \`arguments\`. The gateway auto-selects the account when only one is connected.
1992
+ - **Never** use curl or raw HTTP to call gateway integration endpoints — always use the integration wrapper tools.
1993
+ - **Never** use \`gog\` for Gmail/Calendar/Drive when ${DENCH_INTEGRATIONS_DISPLAY_NAME} is connected or the user mentions the connected-app layer/rube/map/MCP. \`gog\` is a fallback only when the user explicitly asks for it or the integration layer is unavailable.
874
1994
 
875
1995
  ${composioGuidance ? `\n${composioGuidance}\n` : ""}
876
1996
  ## Links
@@ -885,12 +2005,8 @@ export function resolveWorkspaceDir(api: any): string | undefined {
885
2005
  return typeof ws === "string" ? ws.trim() || undefined : undefined;
886
2006
  }
887
2007
 
888
- function shouldRegisterComposioResolver(workspaceDir: string): boolean {
889
- if (readComposioToolIndexFile(workspaceDir)) {
890
- return true;
891
- }
892
- const skillPath = path.join(workspaceDir, "skills", "composio-apps", "SKILL.md");
893
- return existsSync(skillPath) && readFileSync(skillPath, "utf-8").includes("Composio");
2008
+ function shouldRegisterIntegrationTools(workspaceDir: string): boolean {
2009
+ return workspaceDir.trim().length > 0;
894
2010
  }
895
2011
 
896
2012
  export default function register(api: any) {
@@ -900,8 +2016,8 @@ export default function register(api: any) {
900
2016
  }
901
2017
 
902
2018
  const workspaceDir = resolveWorkspaceDir(api);
903
- if (workspaceDir && typeof api.registerTool === "function" && shouldRegisterComposioResolver(workspaceDir)) {
904
- api.registerTool(createComposioResolveTool(api));
2019
+ if (workspaceDir && typeof api.registerTool === "function" && shouldRegisterIntegrationTools(workspaceDir)) {
2020
+ api.registerTool(createDenchSearchIntegrationsTool(api));
905
2021
  }
906
2022
 
907
2023
  api.on(