flujo-ai 3.38.0 → 3.40.0

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 (997) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +617 -433
  3. package/.next/app-path-routes-manifest.json +42 -26
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +90 -18
  6. package/.next/react-loadable-manifest.json +40 -47
  7. package/.next/routes-manifest.json +34 -0
  8. package/.next/server/app/_not-found/page.js +3 -4
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_not-found.html +1 -1
  12. package/.next/server/app/_not-found.rsc +5 -5
  13. package/.next/server/app/api/approvals/[id]/route.js +1 -1
  14. package/.next/server/app/api/approvals/[id]/route.js.nft.json +1 -1
  15. package/.next/server/app/api/approvals/[id]/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/approvals/route.js +2 -2
  17. package/.next/server/app/api/approvals/route.js.nft.json +1 -1
  18. package/.next/server/app/api/approvals/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/backup/route.js +1 -1
  20. package/.next/server/app/api/backup/route.js.nft.json +1 -1
  21. package/.next/server/app/api/backup/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/browse/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/bugs/enhance/route.js +2 -2
  24. package/.next/server/app/api/bugs/enhance/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bugs/enhance/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/cwd/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/encryption/secure/route.js +1 -1
  28. package/.next/server/app/api/encryption/secure/route.js.nft.json +1 -1
  29. package/.next/server/app/api/encryption/secure/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/env/route.js +2 -2
  31. package/.next/server/app/api/env/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/flow/[id]/convert-process-to-subflow/route.js +1 -0
  33. package/.next/server/app/api/flow/[id]/convert-process-to-subflow/route.js.nft.json +1 -0
  34. package/.next/server/app/api/flow/[id]/convert-process-to-subflow/route_client-reference-manifest.js +1 -0
  35. package/.next/server/app/api/flow/[id]/route.js +1 -1
  36. package/.next/server/app/api/flow/[id]/route.js.nft.json +1 -1
  37. package/.next/server/app/api/flow/[id]/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/flow/[id]/versions/[versionId]/route.js +1 -1
  39. package/.next/server/app/api/flow/[id]/versions/[versionId]/route.js.nft.json +1 -1
  40. package/.next/server/app/api/flow/[id]/versions/[versionId]/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/flow/[id]/versions/route.js +1 -1
  42. package/.next/server/app/api/flow/[id]/versions/route.js.nft.json +1 -1
  43. package/.next/server/app/api/flow/[id]/versions/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/flow/assist/route.js +1 -0
  45. package/.next/server/app/api/flow/assist/route.js.nft.json +1 -0
  46. package/.next/server/app/api/flow/assist/route_client-reference-manifest.js +1 -0
  47. package/.next/server/app/api/flow/compile/route.js +1 -1
  48. package/.next/server/app/api/flow/compile/route.js.nft.json +1 -1
  49. package/.next/server/app/api/flow/compile/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/flow/generate/route.js +1 -1
  51. package/.next/server/app/api/flow/generate/route.js.nft.json +1 -1
  52. package/.next/server/app/api/flow/generate/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/flow/generator/route.js +2 -2
  54. package/.next/server/app/api/flow/generator/route.js.nft.json +1 -1
  55. package/.next/server/app/api/flow/generator/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/flow/improve/route.js +1 -1
  57. package/.next/server/app/api/flow/improve/route.js.nft.json +1 -1
  58. package/.next/server/app/api/flow/improve/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/flow/prompt-renderer/route.js +2 -2
  60. package/.next/server/app/api/flow/prompt-renderer/route.js.nft.json +1 -1
  61. package/.next/server/app/api/flow/prompt-renderer/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/flow/quick-chat/route.js +1 -1
  63. package/.next/server/app/api/flow/quick-chat/route.js.nft.json +1 -1
  64. package/.next/server/app/api/flow/quick-chat/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/flow/repair/route.js +1 -1
  66. package/.next/server/app/api/flow/repair/route.js.nft.json +1 -1
  67. package/.next/server/app/api/flow/repair/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/flow/route.js +1 -1
  69. package/.next/server/app/api/flow/route.js.nft.json +1 -1
  70. package/.next/server/app/api/flow/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/git/route.js +6 -6
  72. package/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/init/route.js +1 -1
  74. package/.next/server/app/api/init/route.js.nft.json +1 -1
  75. package/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/local-models/capability/route.js +1 -1
  77. package/.next/server/app/api/local-models/capability/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/local-models/pull/route.js +1 -1
  79. package/.next/server/app/api/local-models/pull/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/local-models/suggest/route.js +1 -1
  81. package/.next/server/app/api/local-models/suggest/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/mcp/app-sandbox/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/mcp/cancel/route.js +2 -2
  84. package/.next/server/app/api/mcp/cancel/route.js.nft.json +1 -1
  85. package/.next/server/app/api/mcp/cancel/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/mcp/flujo/authoring/route.js +1 -0
  87. package/.next/server/app/api/mcp/flujo/authoring/route.js.nft.json +1 -0
  88. package/.next/server/app/api/mcp/flujo/authoring/route_client-reference-manifest.js +1 -0
  89. package/.next/server/app/api/mcp/flujo/automation/route.js +1 -0
  90. package/.next/server/app/api/mcp/flujo/automation/route.js.nft.json +1 -0
  91. package/.next/server/app/api/mcp/flujo/automation/route_client-reference-manifest.js +1 -0
  92. package/.next/server/app/api/mcp/flujo/flows/route.js +1 -0
  93. package/.next/server/app/api/mcp/flujo/flows/route.js.nft.json +1 -0
  94. package/.next/server/app/api/mcp/flujo/flows/route_client-reference-manifest.js +1 -0
  95. package/.next/server/app/api/mcp/flujo/resources/read/route.js +1 -0
  96. package/.next/server/app/api/mcp/flujo/resources/read/route.js.nft.json +1 -0
  97. package/.next/server/app/api/mcp/flujo/resources/read/route_client-reference-manifest.js +1 -0
  98. package/.next/server/app/api/mcp/flujo/resources/route.js +1 -0
  99. package/.next/server/app/api/mcp/flujo/resources/route.js.nft.json +1 -0
  100. package/.next/server/app/api/mcp/flujo/resources/route_client-reference-manifest.js +1 -0
  101. package/.next/server/app/api/mcp/flujo/servers/route.js +1 -0
  102. package/.next/server/app/api/mcp/flujo/servers/route.js.nft.json +1 -0
  103. package/.next/server/app/api/mcp/flujo/servers/route_client-reference-manifest.js +1 -0
  104. package/.next/server/app/api/mcp/flujo/state/route.js +1 -0
  105. package/.next/server/app/api/mcp/flujo/state/route.js.nft.json +1 -0
  106. package/.next/server/app/api/mcp/flujo/state/route_client-reference-manifest.js +1 -0
  107. package/.next/server/app/api/mcp/flujo/tools/route.js +1 -0
  108. package/.next/server/app/api/mcp/flujo/tools/route.js.nft.json +1 -0
  109. package/.next/server/app/api/mcp/flujo/tools/route_client-reference-manifest.js +1 -0
  110. package/.next/server/app/api/mcp/oauth-capability/route.js +1 -1
  111. package/.next/server/app/api/mcp/oauth-capability/route.js.nft.json +1 -1
  112. package/.next/server/app/api/mcp/oauth-capability/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/mcp/servers/[name]/prompts/get/route.js +1 -1
  114. package/.next/server/app/api/mcp/servers/[name]/prompts/get/route.js.nft.json +1 -1
  115. package/.next/server/app/api/mcp/servers/[name]/prompts/get/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/mcp/servers/[name]/prompts/route.js +1 -1
  117. package/.next/server/app/api/mcp/servers/[name]/prompts/route.js.nft.json +1 -1
  118. package/.next/server/app/api/mcp/servers/[name]/prompts/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/mcp/servers/[name]/resources/read/route.js +1 -1
  120. package/.next/server/app/api/mcp/servers/[name]/resources/read/route.js.nft.json +1 -1
  121. package/.next/server/app/api/mcp/servers/[name]/resources/read/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/mcp/servers/[name]/resources/route.js +1 -1
  123. package/.next/server/app/api/mcp/servers/[name]/resources/route.js.nft.json +1 -1
  124. package/.next/server/app/api/mcp/servers/[name]/resources/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/mcp/servers/[name]/route.js +1 -1
  126. package/.next/server/app/api/mcp/servers/[name]/route.js.nft.json +1 -1
  127. package/.next/server/app/api/mcp/servers/[name]/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/mcp/servers/[name]/status/route.js +1 -1
  129. package/.next/server/app/api/mcp/servers/[name]/status/route.js.nft.json +1 -1
  130. package/.next/server/app/api/mcp/servers/[name]/status/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/mcp/servers/[name]/tools/[toolName]/route.js +1 -1
  132. package/.next/server/app/api/mcp/servers/[name]/tools/[toolName]/route.js.nft.json +1 -1
  133. package/.next/server/app/api/mcp/servers/[name]/tools/[toolName]/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/mcp/servers/[name]/tools/route.js +1 -1
  135. package/.next/server/app/api/mcp/servers/[name]/tools/route.js.nft.json +1 -1
  136. package/.next/server/app/api/mcp/servers/[name]/tools/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/mcp/servers/route.js +1 -1
  138. package/.next/server/app/api/mcp/servers/route.js.nft.json +1 -1
  139. package/.next/server/app/api/mcp/servers/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/mcp/test-connection/route.js +1 -1
  141. package/.next/server/app/api/mcp/test-connection/route.js.nft.json +1 -1
  142. package/.next/server/app/api/mcp/test-connection/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/mcp/test-connection/stream/route.js +1 -1
  144. package/.next/server/app/api/mcp/test-connection/stream/route.js.nft.json +1 -1
  145. package/.next/server/app/api/mcp/test-connection/stream/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/mcp-registry/route.js +2 -2
  147. package/.next/server/app/api/mcp-registry/route.js.nft.json +1 -1
  148. package/.next/server/app/api/mcp-registry/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/mcp-registry/spotlight/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/model/[id]/route.js +1 -1
  151. package/.next/server/app/api/model/[id]/route.js.nft.json +1 -1
  152. package/.next/server/app/api/model/[id]/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/model/provider/route.js +2 -2
  154. package/.next/server/app/api/model/provider/route.js.nft.json +1 -1
  155. package/.next/server/app/api/model/provider/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/model/route.js +1 -1
  157. package/.next/server/app/api/model/route.js.nft.json +1 -1
  158. package/.next/server/app/api/model/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/model/test/route.js +2 -2
  160. package/.next/server/app/api/model/test/route.js.nft.json +1 -1
  161. package/.next/server/app/api/model/test/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/oauth/callback/route.js +1 -1
  163. package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/oauth/initiate/route.js +1 -1
  165. package/.next/server/app/api/oauth/initiate/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/oauth/reset/route.js +2 -2
  167. package/.next/server/app/api/oauth/reset/route.js.nft.json +1 -1
  168. package/.next/server/app/api/oauth/reset/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/packages/build/route.js +1 -1
  170. package/.next/server/app/api/packages/build/route.js.nft.json +1 -1
  171. package/.next/server/app/api/packages/build/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/packages/derive-secrets/route.js +1 -1
  173. package/.next/server/app/api/packages/derive-secrets/route.js.nft.json +1 -1
  174. package/.next/server/app/api/packages/derive-secrets/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/packages/install/route.js +1 -1
  176. package/.next/server/app/api/packages/install/route.js.nft.json +1 -1
  177. package/.next/server/app/api/packages/install/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/packages/install/status/route.js +1 -1
  179. package/.next/server/app/api/packages/install/status/route.js.nft.json +1 -1
  180. package/.next/server/app/api/packages/install/status/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/packages/installed/route.js +1 -1
  182. package/.next/server/app/api/packages/installed/route.js.nft.json +1 -1
  183. package/.next/server/app/api/packages/installed/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/packages/resolve/route.js +1 -1
  185. package/.next/server/app/api/packages/resolve/route.js.nft.json +1 -1
  186. package/.next/server/app/api/packages/resolve/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/packages/scan-targets/route.js +1 -1
  188. package/.next/server/app/api/packages/scan-targets/route.js.nft.json +1 -1
  189. package/.next/server/app/api/packages/scan-targets/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/packages/search/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/packages/uninstall/route.js +1 -1
  192. package/.next/server/app/api/packages/uninstall/route.js.nft.json +1 -1
  193. package/.next/server/app/api/packages/uninstall/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/planned-executions/[id]/route.js +2 -2
  195. package/.next/server/app/api/planned-executions/[id]/route.js.nft.json +1 -1
  196. package/.next/server/app/api/planned-executions/[id]/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/planned-executions/[id]/run/route.js +2 -2
  198. package/.next/server/app/api/planned-executions/[id]/run/route.js.nft.json +1 -1
  199. package/.next/server/app/api/planned-executions/[id]/run/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/planned-executions/[id]/runs/route.js +2 -2
  201. package/.next/server/app/api/planned-executions/[id]/runs/route.js.nft.json +1 -1
  202. package/.next/server/app/api/planned-executions/[id]/runs/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/planned-executions/preview-schedule/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/planned-executions/reconcile/route.js +1 -1
  205. package/.next/server/app/api/planned-executions/reconcile/route.js.nft.json +1 -1
  206. package/.next/server/app/api/planned-executions/reconcile/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/planned-executions/route.js +1 -1
  208. package/.next/server/app/api/planned-executions/route.js.nft.json +1 -1
  209. package/.next/server/app/api/planned-executions/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/registry/auth/resend/route.js +1 -1
  211. package/.next/server/app/api/registry/auth/resend/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/registry/auth/reset/route.js +1 -1
  213. package/.next/server/app/api/registry/auth/reset/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/registry/auth/route.js +1 -1
  215. package/.next/server/app/api/registry/auth/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/registry/feedback/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/registry/oauth/callback/route.js +1 -1
  218. package/.next/server/app/api/registry/oauth/callback/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/registry/oauth/initiate/route.js +1 -1
  220. package/.next/server/app/api/registry/oauth/initiate/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/registry/packages/route.js +1 -1
  222. package/.next/server/app/api/registry/packages/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/registry/publish/route.js +1 -1
  224. package/.next/server/app/api/registry/publish/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/api/registry/settings/route.js +1 -1
  226. package/.next/server/app/api/registry/settings/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/restore/route.js +1 -1
  228. package/.next/server/app/api/restore/route.js.nft.json +1 -1
  229. package/.next/server/app/api/restore/route_client-reference-manifest.js +1 -1
  230. package/.next/server/app/api/runs/active/route.js +2 -2
  231. package/.next/server/app/api/runs/active/route.js.nft.json +1 -1
  232. package/.next/server/app/api/runs/active/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/setup/ai-cli/route.js +3 -0
  234. package/.next/server/app/api/setup/ai-cli/route.js.nft.json +1 -0
  235. package/.next/server/app/api/setup/ai-cli/route_client-reference-manifest.js +1 -0
  236. package/.next/server/app/api/statistics/route.js +2 -0
  237. package/.next/server/app/api/statistics/route.js.nft.json +1 -0
  238. package/.next/server/app/api/statistics/route_client-reference-manifest.js +1 -0
  239. package/.next/server/app/api/storage/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/telemetry/daily-active/route.js +1 -1
  241. package/.next/server/app/api/telemetry/daily-active/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  243. package/.next/server/app/api/waves/route.js +1 -1
  244. package/.next/server/app/api/waves/route.js.nft.json +1 -1
  245. package/.next/server/app/api/waves/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/webhooks/[id]/route.js +1 -1
  247. package/.next/server/app/api/webhooks/[id]/route.js.nft.json +1 -1
  248. package/.next/server/app/api/webhooks/[id]/route_client-reference-manifest.js +1 -1
  249. package/.next/server/app/automation/triggers/page.js +2 -0
  250. package/.next/server/app/automation/triggers/page.js.nft.json +1 -0
  251. package/.next/server/app/automation/triggers/page_client-reference-manifest.js +1 -0
  252. package/.next/server/app/automation/triggers.html +1 -0
  253. package/.next/server/app/automation/triggers.meta +7 -0
  254. package/.next/server/app/automation/triggers.rsc +23 -0
  255. package/.next/server/app/automation/waves/page.js +2 -0
  256. package/.next/server/app/automation/waves/page.js.nft.json +1 -0
  257. package/.next/server/app/automation/waves/page_client-reference-manifest.js +1 -0
  258. package/.next/server/app/automation/waves.html +1 -0
  259. package/.next/server/app/automation/waves.meta +7 -0
  260. package/.next/server/app/automation/waves.rsc +22 -0
  261. package/.next/server/app/chat/page.js +6 -58
  262. package/.next/server/app/chat/page.js.nft.json +1 -1
  263. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  264. package/.next/server/app/chat.html +1 -1
  265. package/.next/server/app/chat.rsc +7 -6
  266. package/.next/server/app/docs/page.js +3 -4
  267. package/.next/server/app/docs/page.js.nft.json +1 -1
  268. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  269. package/.next/server/app/docs.html +1 -1
  270. package/.next/server/app/docs.rsc +6 -6
  271. package/.next/server/app/executions/page.js +2 -3
  272. package/.next/server/app/executions/page.js.nft.json +1 -1
  273. package/.next/server/app/executions/page_client-reference-manifest.js +1 -1
  274. package/.next/server/app/executions.html +1 -1
  275. package/.next/server/app/executions.rsc +7 -6
  276. package/.next/server/app/flows/page.js +3 -3
  277. package/.next/server/app/flows/page.js.nft.json +1 -1
  278. package/.next/server/app/flows/page_client-reference-manifest.js +1 -1
  279. package/.next/server/app/flows.html +1 -1
  280. package/.next/server/app/flows.rsc +7 -7
  281. package/.next/server/app/index.html +1 -1
  282. package/.next/server/app/index.rsc +6 -6
  283. package/.next/server/app/mcp/page.js +6 -57
  284. package/.next/server/app/mcp/page.js.nft.json +1 -1
  285. package/.next/server/app/mcp/page_client-reference-manifest.js +1 -1
  286. package/.next/server/app/mcp-flows/route.js +2 -1
  287. package/.next/server/app/mcp-flows/route.js.nft.json +1 -1
  288. package/.next/server/app/mcp-flows/route_client-reference-manifest.js +1 -1
  289. package/.next/server/app/mcp-proxy/[server]/route.js +2 -1
  290. package/.next/server/app/mcp-proxy/[server]/route.js.nft.json +1 -1
  291. package/.next/server/app/mcp-proxy/[server]/route_client-reference-manifest.js +1 -1
  292. package/.next/server/app/mcp.html +1 -1
  293. package/.next/server/app/mcp.rsc +7 -6
  294. package/.next/server/app/models/page.js +64 -2
  295. package/.next/server/app/models/page.js.nft.json +1 -1
  296. package/.next/server/app/models/page_client-reference-manifest.js +1 -1
  297. package/.next/server/app/packages/page.js +2 -2
  298. package/.next/server/app/packages/page.js.nft.json +1 -1
  299. package/.next/server/app/packages/page_client-reference-manifest.js +1 -1
  300. package/.next/server/app/packages.html +1 -1
  301. package/.next/server/app/packages.rsc +6 -6
  302. package/.next/server/app/page.js +3 -4
  303. package/.next/server/app/page.js.nft.json +1 -1
  304. package/.next/server/app/page_client-reference-manifest.js +1 -1
  305. package/.next/server/app/settings/page.js +2 -2
  306. package/.next/server/app/settings/page.js.nft.json +1 -1
  307. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  308. package/.next/server/app/settings.html +1 -1
  309. package/.next/server/app/settings.rsc +6 -6
  310. package/.next/server/app/statistics/page.js +54 -0
  311. package/.next/server/app/statistics/page.js.nft.json +1 -0
  312. package/.next/server/app/statistics/page_client-reference-manifest.js +1 -0
  313. package/.next/server/app/statistics.html +1 -0
  314. package/.next/server/app/statistics.meta +7 -0
  315. package/.next/server/app/statistics.rsc +22 -0
  316. package/.next/server/app/v1/chat/completions/route.js +1 -1
  317. package/.next/server/app/v1/chat/completions/route.js.nft.json +1 -1
  318. package/.next/server/app/v1/chat/completions/route_client-reference-manifest.js +1 -1
  319. package/.next/server/app/v1/chat/conversations/[conversationId]/breakpoints/route.js +2 -2
  320. package/.next/server/app/v1/chat/conversations/[conversationId]/breakpoints/route.js.nft.json +1 -1
  321. package/.next/server/app/v1/chat/conversations/[conversationId]/breakpoints/route_client-reference-manifest.js +1 -1
  322. package/.next/server/app/v1/chat/conversations/[conversationId]/cancel/route.js +2 -2
  323. package/.next/server/app/v1/chat/conversations/[conversationId]/cancel/route.js.nft.json +1 -1
  324. package/.next/server/app/v1/chat/conversations/[conversationId]/cancel/route_client-reference-manifest.js +1 -1
  325. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/continue/route.js +1 -1
  326. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/continue/route.js.nft.json +1 -1
  327. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/continue/route_client-reference-manifest.js +1 -1
  328. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/step/route.js +1 -1
  329. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/step/route.js.nft.json +1 -1
  330. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/step/route_client-reference-manifest.js +1 -1
  331. package/.next/server/app/v1/chat/conversations/[conversationId]/edit-state/route.js +2 -2
  332. package/.next/server/app/v1/chat/conversations/[conversationId]/edit-state/route.js.nft.json +1 -1
  333. package/.next/server/app/v1/chat/conversations/[conversationId]/edit-state/route_client-reference-manifest.js +1 -1
  334. package/.next/server/app/v1/chat/conversations/[conversationId]/events/route.js +3 -3
  335. package/.next/server/app/v1/chat/conversations/[conversationId]/events/route.js.nft.json +1 -1
  336. package/.next/server/app/v1/chat/conversations/[conversationId]/events/route_client-reference-manifest.js +1 -1
  337. package/.next/server/app/v1/chat/conversations/[conversationId]/inject/route.js +2 -2
  338. package/.next/server/app/v1/chat/conversations/[conversationId]/inject/route.js.nft.json +1 -1
  339. package/.next/server/app/v1/chat/conversations/[conversationId]/inject/route_client-reference-manifest.js +1 -1
  340. package/.next/server/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route.js +1 -1
  341. package/.next/server/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route.js.nft.json +1 -1
  342. package/.next/server/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route_client-reference-manifest.js +1 -1
  343. package/.next/server/app/v1/chat/conversations/[conversationId]/resources/route.js +1 -1
  344. package/.next/server/app/v1/chat/conversations/[conversationId]/resources/route.js.nft.json +1 -1
  345. package/.next/server/app/v1/chat/conversations/[conversationId]/resources/route_client-reference-manifest.js +1 -1
  346. package/.next/server/app/v1/chat/conversations/[conversationId]/respond/route.js +1 -1
  347. package/.next/server/app/v1/chat/conversations/[conversationId]/respond/route.js.nft.json +1 -1
  348. package/.next/server/app/v1/chat/conversations/[conversationId]/respond/route_client-reference-manifest.js +1 -1
  349. package/.next/server/app/v1/chat/conversations/[conversationId]/revert/route.js +2 -0
  350. package/.next/server/app/v1/chat/conversations/[conversationId]/revert/route.js.nft.json +1 -0
  351. package/.next/server/app/v1/chat/conversations/[conversationId]/revert/route_client-reference-manifest.js +1 -0
  352. package/.next/server/app/v1/chat/conversations/[conversationId]/route.js +2 -2
  353. package/.next/server/app/v1/chat/conversations/[conversationId]/route.js.nft.json +1 -1
  354. package/.next/server/app/v1/chat/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
  355. package/.next/server/app/v1/chat/conversations/route.js +2 -2
  356. package/.next/server/app/v1/chat/conversations/route.js.nft.json +1 -1
  357. package/.next/server/app/v1/chat/conversations/route_client-reference-manifest.js +1 -1
  358. package/.next/server/app/v1/chat/events/route.js +6 -6
  359. package/.next/server/app/v1/chat/events/route.js.nft.json +1 -1
  360. package/.next/server/app/v1/chat/events/route_client-reference-manifest.js +1 -1
  361. package/.next/server/app/v1/models/route.js +2 -2
  362. package/.next/server/app/v1/models/route.js.nft.json +1 -1
  363. package/.next/server/app/v1/models/route_client-reference-manifest.js +1 -1
  364. package/.next/server/app/waves/page.js +2 -4
  365. package/.next/server/app/waves/page.js.nft.json +1 -1
  366. package/.next/server/app/waves/page_client-reference-manifest.js +1 -1
  367. package/.next/server/app/waves.html +1 -1
  368. package/.next/server/app/waves.rsc +6 -6
  369. package/.next/server/app-paths-manifest.json +42 -26
  370. package/.next/server/chunks/1227.js +1 -1
  371. package/.next/server/chunks/1314.js +1 -1
  372. package/.next/server/chunks/1403.js +3 -0
  373. package/.next/server/chunks/{180.js → 1532.js} +1 -1
  374. package/.next/server/chunks/1539.js +1 -0
  375. package/.next/server/chunks/1662.js +2 -0
  376. package/.next/server/chunks/1805.js +1 -1
  377. package/.next/server/chunks/1925.js +1 -1
  378. package/.next/server/chunks/2069.js +1 -0
  379. package/.next/server/chunks/227.js +1 -1
  380. package/.next/server/chunks/2372.js +2 -2
  381. package/.next/server/chunks/2446.js +1 -0
  382. package/.next/server/chunks/2828.js +2 -0
  383. package/.next/server/chunks/2949.js +1 -0
  384. package/.next/server/chunks/{6034.js → 300.js} +15 -15
  385. package/.next/server/chunks/3032.js +29 -0
  386. package/.next/server/chunks/3206.js +2 -0
  387. package/.next/server/chunks/3262.js +90 -0
  388. package/.next/server/chunks/3418.js +1 -0
  389. package/.next/server/chunks/3945.js +10 -0
  390. package/.next/server/chunks/{6967.js → 3954.js} +3 -3
  391. package/.next/server/chunks/3963.js +6 -0
  392. package/.next/server/chunks/3991.js +2 -0
  393. package/.next/server/chunks/4265.js +1 -1
  394. package/.next/server/chunks/4306.js +1 -1
  395. package/.next/server/chunks/4671.js +1 -1
  396. package/.next/server/chunks/4681.js +1 -1
  397. package/.next/server/chunks/4771.js +2 -2
  398. package/.next/server/chunks/5096.js +1 -1
  399. package/.next/server/chunks/5141.js +2 -0
  400. package/.next/server/chunks/519.js +2 -2
  401. package/.next/server/chunks/5444.js +2 -0
  402. package/.next/server/chunks/5446.js +1 -0
  403. package/.next/server/chunks/{7058.js → 5494.js} +2 -2
  404. package/.next/server/chunks/558.js +1 -1
  405. package/.next/server/chunks/5591.js +1 -0
  406. package/.next/server/chunks/{3312.js → 5642.js} +1 -1
  407. package/.next/server/chunks/566.js +2 -0
  408. package/.next/server/chunks/5750.js +1 -0
  409. package/.next/server/chunks/{7519.js → 5807.js} +1 -1
  410. package/.next/server/chunks/5858.js +1 -0
  411. package/.next/server/chunks/5918.js +436 -0
  412. package/.next/server/chunks/5936.js +1 -0
  413. package/.next/server/chunks/6033.js +1 -0
  414. package/.next/server/chunks/6226.js +4 -4
  415. package/.next/server/chunks/6607.js +1 -0
  416. package/.next/server/chunks/6687.js +1 -0
  417. package/.next/server/chunks/701.js +2 -2
  418. package/.next/server/chunks/7031.js +1 -0
  419. package/.next/server/chunks/7147.js +1 -0
  420. package/.next/server/chunks/7480.js +2 -0
  421. package/.next/server/chunks/{8284.js → 7498.js} +2 -2
  422. package/.next/server/chunks/7506.js +2 -2
  423. package/.next/server/chunks/7508.js +5 -0
  424. package/.next/server/chunks/7628.js +1 -1
  425. package/.next/server/chunks/7630.js +1 -1
  426. package/.next/server/chunks/773.js +9 -0
  427. package/.next/server/chunks/7821.js +1 -1
  428. package/.next/server/chunks/7883.js +1 -0
  429. package/.next/server/chunks/7969.js +1 -1
  430. package/.next/server/chunks/8001.js +1 -1
  431. package/.next/server/chunks/8092.js +1 -1
  432. package/.next/server/chunks/8291.js +1 -0
  433. package/.next/server/chunks/8598.js +1 -0
  434. package/.next/server/chunks/8645.js +1 -1
  435. package/.next/server/chunks/{3489.js → 8730.js} +1 -1
  436. package/.next/server/chunks/8897.js +1 -0
  437. package/.next/server/chunks/8903.js +4 -0
  438. package/.next/server/chunks/8940.js +1 -0
  439. package/.next/server/chunks/9088.js +6 -0
  440. package/.next/server/chunks/9543.js +8 -0
  441. package/.next/server/chunks/9624.js +136 -0
  442. package/.next/server/functions-config-manifest.json +4 -3
  443. package/.next/server/instrumentation.js +1 -1
  444. package/.next/server/instrumentation.js.nft.json +1 -1
  445. package/.next/server/middleware-build-manifest.js +1 -1
  446. package/.next/server/middleware-manifest.json +1 -1
  447. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  448. package/.next/server/pages/404.html +1 -1
  449. package/.next/server/pages/500.html +1 -1
  450. package/.next/server/server-reference-manifest.js +1 -1
  451. package/.next/server/server-reference-manifest.json +1 -1
  452. package/.next/static/b1aMk0634gkkiunttd1SQ/_buildManifest.js +1 -0
  453. package/.next/static/chunks/1161-19176c3e7c655121.js +1 -0
  454. package/.next/static/chunks/1521-1c98c9a56726e053.js +1 -0
  455. package/.next/static/chunks/155-12f2a537db5dacec.js +1 -0
  456. package/.next/static/chunks/1576.bc6ae6c9e6d939d8.js +1 -0
  457. package/.next/static/chunks/1871-dd8c10ed9d37100b.js +1 -0
  458. package/.next/static/chunks/1983-242862b3dc022a26.js +1 -0
  459. package/.next/static/chunks/2005.300528b5119c2d38.js +1 -0
  460. package/.next/static/chunks/2141-dba0d13715fe1a28.js +1 -0
  461. package/.next/static/chunks/2498-4f7f5de1cac6feba.js +1 -0
  462. package/.next/static/chunks/2499-92cd97ce4993999f.js +1 -0
  463. package/.next/static/chunks/3272-42d1acae08d1ef0a.js +1 -0
  464. package/.next/static/chunks/3303-febfba58226aebed.js +1 -0
  465. package/.next/static/chunks/{361.bb75b03b740930cd.js → 361.51d642c530c84295.js} +1 -1
  466. package/.next/static/chunks/3731-64070760ae44448f.js +1 -0
  467. package/.next/static/chunks/3776.72638b35ce9bb874.js +1 -0
  468. package/.next/static/chunks/3816-807978463638bb71.js +1 -0
  469. package/.next/static/chunks/4122-d82fad8d1fca26d6.js +1 -0
  470. package/.next/static/chunks/4123-906362aeb986d6db.js +1 -0
  471. package/.next/static/chunks/4156-3823d1c89c4a7e3d.js +1 -0
  472. package/.next/static/chunks/{4555-c9070f8c79bccfad.js → 4483-00dc5c1b601ec898.js} +3 -3
  473. package/.next/static/chunks/4755-83df83d0dbd97483.js +1 -0
  474. package/.next/static/chunks/4814-31eb5f3b10c651c1.js +1 -0
  475. package/.next/static/chunks/4965.39e24b54c3c6ca58.js +1 -0
  476. package/.next/static/chunks/57-64bab7d5db89c9cc.js +1 -0
  477. package/.next/static/chunks/5954-dd2b25224f389fc0.js +1 -0
  478. package/.next/static/chunks/5962-8c59d06b3ee1c42a.js +1 -0
  479. package/.next/static/chunks/5967-59fde8c214c9ca9f.js +1 -0
  480. package/.next/static/chunks/6417.70056fe81ca21682.js +1 -0
  481. package/.next/static/chunks/6420-25dd04f98f3b34b8.js +1 -0
  482. package/.next/static/chunks/6547-2adc20e1ace927fc.js +1 -0
  483. package/.next/static/chunks/684-289a73150568def2.js +1 -0
  484. package/.next/static/chunks/7203-2704865539fa551d.js +1 -0
  485. package/.next/static/chunks/760-2ad13a61701630da.js +1 -0
  486. package/.next/static/chunks/7711-4b017720ec49c96d.js +1 -0
  487. package/.next/static/chunks/7758-42ab0b9cce1dc0e3.js +1 -0
  488. package/.next/static/chunks/8124-94140ee1dd8ed87c.js +1 -0
  489. package/.next/static/chunks/8135-5b975b9014f8920b.js +1 -0
  490. package/.next/static/chunks/{8198.cd0d3f8429c02862.js → 8198.a9cc35771b354b03.js} +1 -1
  491. package/.next/static/chunks/8326-4915403bc93459d2.js +1 -0
  492. package/.next/static/chunks/8529.b5a43e728bb5bb8a.js +1 -0
  493. package/.next/static/chunks/{6428-951188daa6f74b86.js → 8620-c9fa9d75cdc18a5e.js} +3 -3
  494. package/.next/static/chunks/8853-b80e50cbec6fd13c.js +1 -0
  495. package/.next/static/chunks/8862-0e37dd5488b21c77.js +1 -0
  496. package/.next/static/chunks/889-e64385ddb2259b1b.js +1 -0
  497. package/.next/static/chunks/9001-4c27a608feddb878.js +1 -0
  498. package/.next/static/chunks/9050-fcb7a0c89314acb4.js +1 -0
  499. package/.next/static/chunks/9053-283dd8d615f904a5.js +8 -0
  500. package/.next/static/chunks/9136-9c415453ec02519c.js +1 -0
  501. package/.next/static/chunks/9140.6502327a2c098d33.js +1 -0
  502. package/.next/static/chunks/9195-3c9c4300e7505d9e.js +1 -0
  503. package/.next/static/chunks/9524-b9d2c7e4426edd07.js +1 -0
  504. package/.next/static/chunks/9562-5494feecd8c6f7a3.js +1 -0
  505. package/.next/static/chunks/9611-190b55ade8b3af3c.js +1 -0
  506. package/.next/static/chunks/app/api/approvals/[id]/route-e70b5e2b4e09002b.js +1 -0
  507. package/.next/static/chunks/app/api/approvals/route-e70b5e2b4e09002b.js +1 -0
  508. package/.next/static/chunks/app/api/backup/route-e70b5e2b4e09002b.js +1 -0
  509. package/.next/static/chunks/app/api/browse/route-e70b5e2b4e09002b.js +1 -0
  510. package/.next/static/chunks/app/api/bugs/enhance/route-e70b5e2b4e09002b.js +1 -0
  511. package/.next/static/chunks/app/api/cwd/route-e70b5e2b4e09002b.js +1 -0
  512. package/.next/static/chunks/app/api/encryption/secure/route-e70b5e2b4e09002b.js +1 -0
  513. package/.next/static/chunks/app/api/env/route-e70b5e2b4e09002b.js +1 -0
  514. package/.next/static/chunks/app/api/flow/[id]/convert-process-to-subflow/route-e70b5e2b4e09002b.js +1 -0
  515. package/.next/static/chunks/app/api/flow/[id]/route-e70b5e2b4e09002b.js +1 -0
  516. package/.next/static/chunks/app/api/flow/[id]/versions/[versionId]/route-e70b5e2b4e09002b.js +1 -0
  517. package/.next/static/chunks/app/api/flow/[id]/versions/route-e70b5e2b4e09002b.js +1 -0
  518. package/.next/static/chunks/app/api/flow/assist/route-e70b5e2b4e09002b.js +1 -0
  519. package/.next/static/chunks/app/api/flow/compile/route-e70b5e2b4e09002b.js +1 -0
  520. package/.next/static/chunks/app/api/flow/generate/route-e70b5e2b4e09002b.js +1 -0
  521. package/.next/static/chunks/app/api/flow/generator/route-e70b5e2b4e09002b.js +1 -0
  522. package/.next/static/chunks/app/api/flow/improve/route-e70b5e2b4e09002b.js +1 -0
  523. package/.next/static/chunks/app/api/flow/prompt-renderer/route-e70b5e2b4e09002b.js +1 -0
  524. package/.next/static/chunks/app/api/flow/quick-chat/route-e70b5e2b4e09002b.js +1 -0
  525. package/.next/static/chunks/app/api/flow/repair/route-e70b5e2b4e09002b.js +1 -0
  526. package/.next/static/chunks/app/api/flow/route-e70b5e2b4e09002b.js +1 -0
  527. package/.next/static/chunks/app/api/git/route-e70b5e2b4e09002b.js +1 -0
  528. package/.next/static/chunks/app/api/init/route-e70b5e2b4e09002b.js +1 -0
  529. package/.next/static/chunks/app/api/local-models/capability/route-e70b5e2b4e09002b.js +1 -0
  530. package/.next/static/chunks/app/api/local-models/pull/route-e70b5e2b4e09002b.js +1 -0
  531. package/.next/static/chunks/app/api/local-models/suggest/route-e70b5e2b4e09002b.js +1 -0
  532. package/.next/static/chunks/app/api/mcp/app-sandbox/route-e70b5e2b4e09002b.js +1 -0
  533. package/.next/static/chunks/app/api/mcp/cancel/route-e70b5e2b4e09002b.js +1 -0
  534. package/.next/static/chunks/app/api/mcp/flujo/authoring/route-e70b5e2b4e09002b.js +1 -0
  535. package/.next/static/chunks/app/api/mcp/flujo/automation/route-e70b5e2b4e09002b.js +1 -0
  536. package/.next/static/chunks/app/api/mcp/flujo/flows/route-e70b5e2b4e09002b.js +1 -0
  537. package/.next/static/chunks/app/api/mcp/flujo/resources/read/route-e70b5e2b4e09002b.js +1 -0
  538. package/.next/static/chunks/app/api/mcp/flujo/resources/route-e70b5e2b4e09002b.js +1 -0
  539. package/.next/static/chunks/app/api/mcp/flujo/servers/route-e70b5e2b4e09002b.js +1 -0
  540. package/.next/static/chunks/app/api/mcp/flujo/state/route-e70b5e2b4e09002b.js +1 -0
  541. package/.next/static/chunks/app/api/mcp/flujo/tools/route-e70b5e2b4e09002b.js +1 -0
  542. package/.next/static/chunks/app/api/mcp/oauth-capability/route-e70b5e2b4e09002b.js +1 -0
  543. package/.next/static/chunks/app/api/mcp/servers/[name]/prompts/get/route-e70b5e2b4e09002b.js +1 -0
  544. package/.next/static/chunks/app/api/mcp/servers/[name]/prompts/route-e70b5e2b4e09002b.js +1 -0
  545. package/.next/static/chunks/app/api/mcp/servers/[name]/resources/read/route-e70b5e2b4e09002b.js +1 -0
  546. package/.next/static/chunks/app/api/mcp/servers/[name]/resources/route-e70b5e2b4e09002b.js +1 -0
  547. package/.next/static/chunks/app/api/mcp/servers/[name]/route-e70b5e2b4e09002b.js +1 -0
  548. package/.next/static/chunks/app/api/mcp/servers/[name]/status/route-e70b5e2b4e09002b.js +1 -0
  549. package/.next/static/chunks/app/api/mcp/servers/[name]/tools/[toolName]/route-e70b5e2b4e09002b.js +1 -0
  550. package/.next/static/chunks/app/api/mcp/servers/[name]/tools/route-e70b5e2b4e09002b.js +1 -0
  551. package/.next/static/chunks/app/api/mcp/servers/route-e70b5e2b4e09002b.js +1 -0
  552. package/.next/static/chunks/app/api/mcp/test-connection/route-e70b5e2b4e09002b.js +1 -0
  553. package/.next/static/chunks/app/api/mcp/test-connection/stream/route-e70b5e2b4e09002b.js +1 -0
  554. package/.next/static/chunks/app/api/mcp-registry/route-e70b5e2b4e09002b.js +1 -0
  555. package/.next/static/chunks/app/api/mcp-registry/spotlight/route-e70b5e2b4e09002b.js +1 -0
  556. package/.next/static/chunks/app/api/model/[id]/route-e70b5e2b4e09002b.js +1 -0
  557. package/.next/static/chunks/app/api/model/provider/route-e70b5e2b4e09002b.js +1 -0
  558. package/.next/static/chunks/app/api/model/route-e70b5e2b4e09002b.js +1 -0
  559. package/.next/static/chunks/app/api/model/test/route-e70b5e2b4e09002b.js +1 -0
  560. package/.next/static/chunks/app/api/oauth/callback/route-e70b5e2b4e09002b.js +1 -0
  561. package/.next/static/chunks/app/api/oauth/initiate/route-e70b5e2b4e09002b.js +1 -0
  562. package/.next/static/chunks/app/api/oauth/reset/route-e70b5e2b4e09002b.js +1 -0
  563. package/.next/static/chunks/app/api/packages/build/route-e70b5e2b4e09002b.js +1 -0
  564. package/.next/static/chunks/app/api/packages/derive-secrets/route-e70b5e2b4e09002b.js +1 -0
  565. package/.next/static/chunks/app/api/packages/install/route-e70b5e2b4e09002b.js +1 -0
  566. package/.next/static/chunks/app/api/packages/install/status/route-e70b5e2b4e09002b.js +1 -0
  567. package/.next/static/chunks/app/api/packages/installed/route-e70b5e2b4e09002b.js +1 -0
  568. package/.next/static/chunks/app/api/packages/resolve/route-e70b5e2b4e09002b.js +1 -0
  569. package/.next/static/chunks/app/api/packages/scan-targets/route-e70b5e2b4e09002b.js +1 -0
  570. package/.next/static/chunks/app/api/packages/search/route-e70b5e2b4e09002b.js +1 -0
  571. package/.next/static/chunks/app/api/packages/uninstall/route-e70b5e2b4e09002b.js +1 -0
  572. package/.next/static/chunks/app/api/planned-executions/[id]/route-e70b5e2b4e09002b.js +1 -0
  573. package/.next/static/chunks/app/api/planned-executions/[id]/run/route-e70b5e2b4e09002b.js +1 -0
  574. package/.next/static/chunks/app/api/planned-executions/[id]/runs/route-e70b5e2b4e09002b.js +1 -0
  575. package/.next/static/chunks/app/api/planned-executions/preview-schedule/route-e70b5e2b4e09002b.js +1 -0
  576. package/.next/static/chunks/app/api/planned-executions/reconcile/route-e70b5e2b4e09002b.js +1 -0
  577. package/.next/static/chunks/app/api/planned-executions/route-e70b5e2b4e09002b.js +1 -0
  578. package/.next/static/chunks/app/api/registry/auth/resend/route-e70b5e2b4e09002b.js +1 -0
  579. package/.next/static/chunks/app/api/registry/auth/reset/route-e70b5e2b4e09002b.js +1 -0
  580. package/.next/static/chunks/app/api/registry/auth/route-e70b5e2b4e09002b.js +1 -0
  581. package/.next/static/chunks/app/api/registry/feedback/route-e70b5e2b4e09002b.js +1 -0
  582. package/.next/static/chunks/app/api/registry/oauth/callback/route-e70b5e2b4e09002b.js +1 -0
  583. package/.next/static/chunks/app/api/registry/oauth/initiate/route-e70b5e2b4e09002b.js +1 -0
  584. package/.next/static/chunks/app/api/registry/packages/route-e70b5e2b4e09002b.js +1 -0
  585. package/.next/static/chunks/app/api/registry/publish/route-e70b5e2b4e09002b.js +1 -0
  586. package/.next/static/chunks/app/api/registry/settings/route-e70b5e2b4e09002b.js +1 -0
  587. package/.next/static/chunks/app/api/restore/route-e70b5e2b4e09002b.js +1 -0
  588. package/.next/static/chunks/app/api/runs/active/route-e70b5e2b4e09002b.js +1 -0
  589. package/.next/static/chunks/app/api/setup/ai-cli/route-e70b5e2b4e09002b.js +1 -0
  590. package/.next/static/chunks/app/api/statistics/route-e70b5e2b4e09002b.js +1 -0
  591. package/.next/static/chunks/app/api/storage/route-e70b5e2b4e09002b.js +1 -0
  592. package/.next/static/chunks/app/api/telemetry/daily-active/route-e70b5e2b4e09002b.js +1 -0
  593. package/.next/static/chunks/app/api/update/route-e70b5e2b4e09002b.js +1 -0
  594. package/.next/static/chunks/app/api/waves/route-e70b5e2b4e09002b.js +1 -0
  595. package/.next/static/chunks/app/api/webhooks/[id]/route-e70b5e2b4e09002b.js +1 -0
  596. package/.next/static/chunks/app/automation/triggers/page-594a6294c58344bf.js +1 -0
  597. package/.next/static/chunks/app/automation/waves/page-ce2fef4996cad8e6.js +1 -0
  598. package/.next/static/chunks/app/chat/page-203cb7bf21638ada.js +1 -0
  599. package/.next/static/chunks/app/docs/page-c466a58caf5e3336.js +1 -0
  600. package/.next/static/chunks/app/executions/page-fcc848de86714386.js +1 -0
  601. package/.next/static/chunks/app/flows/page-172c759ca81ba02f.js +1 -0
  602. package/.next/static/chunks/app/layout-a6ca531683a518a7.js +1 -0
  603. package/.next/static/chunks/app/mcp/page-0a96e6b30e45b1e6.js +1 -0
  604. package/.next/static/chunks/app/mcp-flows/route-e70b5e2b4e09002b.js +1 -0
  605. package/.next/static/chunks/app/mcp-proxy/[server]/route-e70b5e2b4e09002b.js +1 -0
  606. package/.next/static/chunks/app/models/error-1964203c5c6e7d0e.js +1 -0
  607. package/.next/static/chunks/app/models/{loading-1687ae86584f5b1b.js → loading-0cdcf9bae7d3b8f3.js} +1 -1
  608. package/.next/static/chunks/app/models/page-ad1cbea6d3324966.js +1 -0
  609. package/.next/static/chunks/app/packages/page-dda48425be9fc137.js +1 -0
  610. package/.next/static/chunks/app/page-04189aa1b1318c2d.js +1 -0
  611. package/.next/static/chunks/app/settings/page-906c229c87011ead.js +1 -0
  612. package/.next/static/chunks/app/statistics/page-9b13a95549f438c0.js +1 -0
  613. package/.next/static/chunks/app/v1/chat/completions/route-e70b5e2b4e09002b.js +1 -0
  614. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/breakpoints/route-e70b5e2b4e09002b.js +1 -0
  615. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/cancel/route-e70b5e2b4e09002b.js +1 -0
  616. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/debug/continue/route-e70b5e2b4e09002b.js +1 -0
  617. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/debug/step/route-e70b5e2b4e09002b.js +1 -0
  618. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/edit-state/route-e70b5e2b4e09002b.js +1 -0
  619. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/events/route-e70b5e2b4e09002b.js +1 -0
  620. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/inject/route-e70b5e2b4e09002b.js +1 -0
  621. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route-e70b5e2b4e09002b.js +1 -0
  622. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/resources/route-e70b5e2b4e09002b.js +1 -0
  623. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/respond/route-e70b5e2b4e09002b.js +1 -0
  624. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/revert/route-e70b5e2b4e09002b.js +1 -0
  625. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/route-e70b5e2b4e09002b.js +1 -0
  626. package/.next/static/chunks/app/v1/chat/conversations/route-e70b5e2b4e09002b.js +1 -0
  627. package/.next/static/chunks/app/v1/chat/events/route-e70b5e2b4e09002b.js +1 -0
  628. package/.next/static/chunks/app/v1/models/route-e70b5e2b4e09002b.js +1 -0
  629. package/.next/static/chunks/app/waves/page-5b53af3eb9409414.js +1 -0
  630. package/.next/static/chunks/webpack-9fbd3587b9ef4dca.js +1 -0
  631. package/.next/static/css/400b1b927c3ffaf6.css +1 -0
  632. package/.next/static/css/82efa7d39b03a714.css +1 -0
  633. package/.next/trace +11 -10
  634. package/.next/types/app/api/flow/[id]/convert-process-to-subflow/route.ts +347 -0
  635. package/.next/types/app/api/flow/assist/route.ts +347 -0
  636. package/.next/types/app/api/mcp/flujo/authoring/route.ts +347 -0
  637. package/.next/types/app/api/mcp/flujo/automation/route.ts +347 -0
  638. package/.next/types/app/api/mcp/flujo/flows/route.ts +347 -0
  639. package/.next/types/app/api/mcp/flujo/resources/read/route.ts +347 -0
  640. package/.next/types/app/api/mcp/flujo/resources/route.ts +347 -0
  641. package/.next/types/app/api/mcp/flujo/servers/route.ts +347 -0
  642. package/.next/types/app/api/mcp/flujo/state/route.ts +347 -0
  643. package/.next/types/app/api/mcp/flujo/tools/route.ts +347 -0
  644. package/.next/types/app/api/setup/ai-cli/route.ts +347 -0
  645. package/.next/types/app/api/statistics/route.ts +347 -0
  646. package/.next/types/app/{layout.ts → automation/triggers/page.ts} +6 -6
  647. package/.next/types/app/{waves → automation/waves}/page.ts +3 -3
  648. package/.next/types/app/{executions → statistics}/page.ts +3 -3
  649. package/.next/types/app/v1/chat/conversations/[conversationId]/revert/route.ts +347 -0
  650. package/.next/types/routes.d.ts +18 -2
  651. package/.next/types/validator.ts +144 -0
  652. package/README.md +79 -52
  653. package/bin/flujo.mjs +42 -5
  654. package/mcp-servers/README.md +94 -0
  655. package/mcp-servers/bash/dist/index.d.ts +3 -0
  656. package/mcp-servers/bash/dist/index.js +85 -0
  657. package/mcp-servers/bash/dist/index.js.map +1 -0
  658. package/mcp-servers/bash/dist/resources.d.ts +13 -0
  659. package/mcp-servers/bash/dist/resources.js +298 -0
  660. package/mcp-servers/bash/dist/resources.js.map +1 -0
  661. package/mcp-servers/bash/dist/shared.d.ts +24 -0
  662. package/mcp-servers/bash/dist/shared.js +161 -0
  663. package/mcp-servers/bash/dist/shared.js.map +1 -0
  664. package/mcp-servers/bash/dist/tools.d.ts +59 -0
  665. package/mcp-servers/bash/dist/tools.js +1493 -0
  666. package/mcp-servers/bash/dist/tools.js.map +1 -0
  667. package/mcp-servers/bash/package.json +33 -0
  668. package/mcp-servers/browser/dist/index.d.ts +4 -0
  669. package/mcp-servers/browser/dist/index.js +34 -0
  670. package/mcp-servers/browser/dist/index.js.map +1 -0
  671. package/mcp-servers/browser/dist/resources.d.ts +6 -0
  672. package/mcp-servers/browser/dist/resources.js +78 -0
  673. package/mcp-servers/browser/dist/resources.js.map +1 -0
  674. package/mcp-servers/browser/dist/runtime.d.ts +26 -0
  675. package/mcp-servers/browser/dist/runtime.js +343 -0
  676. package/mcp-servers/browser/dist/runtime.js.map +1 -0
  677. package/mcp-servers/browser/dist/tools.d.ts +3 -0
  678. package/mcp-servers/browser/dist/tools.js +283 -0
  679. package/mcp-servers/browser/dist/tools.js.map +1 -0
  680. package/mcp-servers/browser/package.json +31 -0
  681. package/mcp-servers/filesystem/dist/index.d.ts +3 -0
  682. package/mcp-servers/filesystem/dist/index.js +56 -0
  683. package/mcp-servers/filesystem/dist/index.js.map +1 -0
  684. package/mcp-servers/filesystem/dist/resources.d.ts +49 -0
  685. package/{.next/server/chunks/9724.js → mcp-servers/filesystem/dist/resources.js} +592 -391
  686. package/mcp-servers/filesystem/dist/resources.js.map +1 -0
  687. package/mcp-servers/filesystem/dist/shared.d.ts +24 -0
  688. package/mcp-servers/filesystem/dist/shared.js +161 -0
  689. package/mcp-servers/filesystem/dist/shared.js.map +1 -0
  690. package/mcp-servers/filesystem/dist/tools.d.ts +3 -0
  691. package/mcp-servers/filesystem/dist/tools.js +1229 -0
  692. package/mcp-servers/filesystem/dist/tools.js.map +1 -0
  693. package/mcp-servers/filesystem/package.json +30 -0
  694. package/mcp-servers/flujo/dist/client.d.ts +12 -0
  695. package/mcp-servers/flujo/dist/client.js +144 -0
  696. package/mcp-servers/flujo/dist/client.js.map +1 -0
  697. package/mcp-servers/flujo/dist/index.d.ts +2 -0
  698. package/mcp-servers/flujo/dist/index.js +31 -0
  699. package/mcp-servers/flujo/dist/index.js.map +1 -0
  700. package/mcp-servers/flujo/package.json +29 -0
  701. package/mcp-servers/mcp-whatsapp-web/dist/auth/link-page.d.ts +11 -0
  702. package/mcp-servers/mcp-whatsapp-web/dist/auth/link-page.js +161 -0
  703. package/mcp-servers/mcp-whatsapp-web/dist/auth/link-page.js.map +1 -0
  704. package/mcp-servers/mcp-whatsapp-web/dist/auth/oauth-provider.d.ts +53 -0
  705. package/mcp-servers/mcp-whatsapp-web/dist/auth/oauth-provider.js +206 -0
  706. package/mcp-servers/mcp-whatsapp-web/dist/auth/oauth-provider.js.map +1 -0
  707. package/mcp-servers/mcp-whatsapp-web/dist/index.d.ts +2 -0
  708. package/mcp-servers/mcp-whatsapp-web/dist/index.js +128 -0
  709. package/mcp-servers/mcp-whatsapp-web/dist/index.js.map +1 -0
  710. package/mcp-servers/mcp-whatsapp-web/dist/server.d.ts +28 -0
  711. package/mcp-servers/mcp-whatsapp-web/dist/server.js +268 -0
  712. package/mcp-servers/mcp-whatsapp-web/dist/server.js.map +1 -0
  713. package/mcp-servers/mcp-whatsapp-web/dist/services/whatsapp.d.ts +149 -0
  714. package/mcp-servers/mcp-whatsapp-web/dist/services/whatsapp.js +818 -0
  715. package/mcp-servers/mcp-whatsapp-web/dist/services/whatsapp.js.map +1 -0
  716. package/mcp-servers/mcp-whatsapp-web/dist/tools/auth.d.ts +8 -0
  717. package/mcp-servers/mcp-whatsapp-web/dist/tools/auth.js +232 -0
  718. package/mcp-servers/mcp-whatsapp-web/dist/tools/auth.js.map +1 -0
  719. package/mcp-servers/mcp-whatsapp-web/dist/tools/chats.d.ts +3 -0
  720. package/mcp-servers/mcp-whatsapp-web/dist/tools/chats.js +90 -0
  721. package/mcp-servers/mcp-whatsapp-web/dist/tools/chats.js.map +1 -0
  722. package/mcp-servers/mcp-whatsapp-web/dist/tools/contacts.d.ts +3 -0
  723. package/mcp-servers/mcp-whatsapp-web/dist/tools/contacts.js +65 -0
  724. package/mcp-servers/mcp-whatsapp-web/dist/tools/contacts.js.map +1 -0
  725. package/mcp-servers/mcp-whatsapp-web/dist/tools/media.d.ts +3 -0
  726. package/mcp-servers/mcp-whatsapp-web/dist/tools/media.js +245 -0
  727. package/mcp-servers/mcp-whatsapp-web/dist/tools/media.js.map +1 -0
  728. package/mcp-servers/mcp-whatsapp-web/dist/tools/messages.d.ts +3 -0
  729. package/mcp-servers/mcp-whatsapp-web/dist/tools/messages.js +141 -0
  730. package/mcp-servers/mcp-whatsapp-web/dist/tools/messages.js.map +1 -0
  731. package/mcp-servers/mcp-whatsapp-web/dist/types/index.d.ts +1 -0
  732. package/mcp-servers/mcp-whatsapp-web/dist/types/index.js +3 -0
  733. package/mcp-servers/mcp-whatsapp-web/dist/types/index.js.map +1 -0
  734. package/mcp-servers/mcp-whatsapp-web/dist/types/whatsapp.d.ts +16 -0
  735. package/mcp-servers/mcp-whatsapp-web/dist/types/whatsapp.js +5 -0
  736. package/mcp-servers/mcp-whatsapp-web/dist/types/whatsapp.js.map +1 -0
  737. package/mcp-servers/mcp-whatsapp-web/dist/utils/audio.d.ts +23 -0
  738. package/mcp-servers/mcp-whatsapp-web/dist/utils/audio.js +99 -0
  739. package/mcp-servers/mcp-whatsapp-web/dist/utils/audio.js.map +1 -0
  740. package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-finder.d.ts +12 -0
  741. package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-finder.js +72 -0
  742. package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-finder.js.map +1 -0
  743. package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-process-manager.d.ts +84 -0
  744. package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-process-manager.js +297 -0
  745. package/mcp-servers/mcp-whatsapp-web/dist/utils/browser-process-manager.js.map +1 -0
  746. package/mcp-servers/mcp-whatsapp-web/dist/utils/cleanup-browsers.d.ts +12 -0
  747. package/mcp-servers/mcp-whatsapp-web/dist/utils/cleanup-browsers.js +141 -0
  748. package/mcp-servers/mcp-whatsapp-web/dist/utils/cleanup-browsers.js.map +1 -0
  749. package/mcp-servers/mcp-whatsapp-web/dist/utils/logger.d.ts +2 -0
  750. package/mcp-servers/mcp-whatsapp-web/dist/utils/logger.js +69 -0
  751. package/mcp-servers/mcp-whatsapp-web/dist/utils/logger.js.map +1 -0
  752. package/mcp-servers/mcp-whatsapp-web/package.json +75 -0
  753. package/mcp-servers/mcp-windows-desktop-automation/dist/index.d.ts +8 -0
  754. package/mcp-servers/mcp-windows-desktop-automation/dist/index.js +95 -0
  755. package/mcp-servers/mcp-windows-desktop-automation/dist/index.js.map +1 -0
  756. package/mcp-servers/mcp-windows-desktop-automation/dist/prompts/index.d.ts +8 -0
  757. package/mcp-servers/mcp-windows-desktop-automation/dist/prompts/index.js +195 -0
  758. package/mcp-servers/mcp-windows-desktop-automation/dist/prompts/index.js.map +1 -0
  759. package/mcp-servers/mcp-windows-desktop-automation/dist/resources/index.d.ts +8 -0
  760. package/mcp-servers/mcp-windows-desktop-automation/dist/resources/index.js +214 -0
  761. package/mcp-servers/mcp-windows-desktop-automation/dist/resources/index.js.map +1 -0
  762. package/mcp-servers/mcp-windows-desktop-automation/dist/server/server.d.ts +21 -0
  763. package/mcp-servers/mcp-windows-desktop-automation/dist/server/server.js +108 -0
  764. package/mcp-servers/mcp-windows-desktop-automation/dist/server/server.js.map +1 -0
  765. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/control.d.ts +8 -0
  766. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/control.js +301 -0
  767. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/control.js.map +1 -0
  768. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/index.d.ts +8 -0
  769. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/index.js +22 -0
  770. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/index.js.map +1 -0
  771. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/keyboard.d.ts +8 -0
  772. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/keyboard.js +146 -0
  773. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/keyboard.js.map +1 -0
  774. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/mouse.d.ts +8 -0
  775. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/mouse.js +179 -0
  776. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/mouse.js.map +1 -0
  777. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/process.d.ts +8 -0
  778. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/process.js +236 -0
  779. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/process.js.map +1 -0
  780. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/window.d.ts +8 -0
  781. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/window.js +300 -0
  782. package/mcp-servers/mcp-windows-desktop-automation/dist/tools/window.js.map +1 -0
  783. package/mcp-servers/mcp-windows-desktop-automation/dist/utils/logger/logger.d.ts +50 -0
  784. package/mcp-servers/mcp-windows-desktop-automation/dist/utils/logger/logger.js +78 -0
  785. package/mcp-servers/mcp-windows-desktop-automation/dist/utils/logger/logger.js.map +1 -0
  786. package/mcp-servers/mcp-windows-desktop-automation/dist/utils/types.d.ts +51 -0
  787. package/mcp-servers/mcp-windows-desktop-automation/dist/utils/types.js +61 -0
  788. package/mcp-servers/mcp-windows-desktop-automation/dist/utils/types.js.map +1 -0
  789. package/mcp-servers/mcp-windows-desktop-automation/package.json +38 -0
  790. package/mcp-servers/patchright-mcp/package.json +32 -0
  791. package/mcp-servers/reddit-mcp-server/package.json +88 -0
  792. package/mcp-servers/servers/package.json +31 -0
  793. package/mcp-servers/shared/dist/index.d.ts +24 -0
  794. package/mcp-servers/shared/dist/index.js +161 -0
  795. package/mcp-servers/shared/dist/index.js.map +1 -0
  796. package/mcp-servers/shared/package.json +26 -0
  797. package/package.json +119 -99
  798. package/scripts/launch-next.mjs +13 -1
  799. package/.next/server/chunks/1114.js +0 -1
  800. package/.next/server/chunks/1439.js +0 -1
  801. package/.next/server/chunks/1578.js +0 -5
  802. package/.next/server/chunks/1634.js +0 -1
  803. package/.next/server/chunks/166.js +0 -5
  804. package/.next/server/chunks/1664.js +0 -2
  805. package/.next/server/chunks/1690.js +0 -1
  806. package/.next/server/chunks/2859.js +0 -1
  807. package/.next/server/chunks/3629.js +0 -1
  808. package/.next/server/chunks/3653.js +0 -2
  809. package/.next/server/chunks/366.js +0 -2
  810. package/.next/server/chunks/3717.js +0 -1
  811. package/.next/server/chunks/3935.js +0 -4
  812. package/.next/server/chunks/3984.js +0 -9
  813. package/.next/server/chunks/4013.js +0 -1
  814. package/.next/server/chunks/4436.js +0 -1
  815. package/.next/server/chunks/4466.js +0 -1
  816. package/.next/server/chunks/4551.js +0 -6
  817. package/.next/server/chunks/4663.js +0 -1
  818. package/.next/server/chunks/4822.js +0 -1
  819. package/.next/server/chunks/5200.js +0 -1
  820. package/.next/server/chunks/5285.js +0 -1
  821. package/.next/server/chunks/5309.js +0 -78
  822. package/.next/server/chunks/544.js +0 -136
  823. package/.next/server/chunks/5463.js +0 -1
  824. package/.next/server/chunks/5544.js +0 -5
  825. package/.next/server/chunks/5880.js +0 -1
  826. package/.next/server/chunks/6747.js +0 -435
  827. package/.next/server/chunks/6793.js +0 -1
  828. package/.next/server/chunks/7069.js +0 -6
  829. package/.next/server/chunks/7104.js +0 -1
  830. package/.next/server/chunks/7634.js +0 -4
  831. package/.next/server/chunks/793.js +0 -403
  832. package/.next/server/chunks/7965.js +0 -39
  833. package/.next/server/chunks/7993.js +0 -2
  834. package/.next/server/chunks/8356.js +0 -1
  835. package/.next/server/chunks/8387.js +0 -1
  836. package/.next/server/chunks/87.js +0 -1
  837. package/.next/server/chunks/9085.js +0 -2
  838. package/.next/server/chunks/9174.js +0 -1
  839. package/.next/server/chunks/9235.js +0 -29
  840. package/.next/server/chunks/94.js +0 -1
  841. package/.next/server/chunks/9983.js +0 -2
  842. package/.next/static/chunks/1871-14c3e63ca865d85e.js +0 -1
  843. package/.next/static/chunks/2003-f826c607d609d1fa.js +0 -1
  844. package/.next/static/chunks/2005.4eea65c00d9a29cd.js +0 -1
  845. package/.next/static/chunks/2318-13ef0d3048e97834.js +0 -1
  846. package/.next/static/chunks/3077-565833c67440a7fa.js +0 -1
  847. package/.next/static/chunks/3217.260785c2198d1e9d.js +0 -1
  848. package/.next/static/chunks/3272-fd8d59523f61da96.js +0 -1
  849. package/.next/static/chunks/3429-34fb1a84aed96703.js +0 -1
  850. package/.next/static/chunks/3545.353a62a68d3b7fd1.js +0 -1
  851. package/.next/static/chunks/3659-0ab9580d5ee5deea.js +0 -1
  852. package/.next/static/chunks/3772-20197853c04a6993.js +0 -1
  853. package/.next/static/chunks/422-61b173ba64cf0c94.js +0 -1
  854. package/.next/static/chunks/4523-a540747aa2ed34e8.js +0 -1
  855. package/.next/static/chunks/454.5fc2f8eef98483e3.js +0 -1
  856. package/.next/static/chunks/488-7ab54d8ae2b4b550.js +0 -1
  857. package/.next/static/chunks/4919-6c8a48e3cc642349.js +0 -1
  858. package/.next/static/chunks/4929-150b03595474c9d8.js +0 -1
  859. package/.next/static/chunks/5733-1419095a28c1ddc3.js +0 -1
  860. package/.next/static/chunks/639-90ed75d402dc872b.js +0 -1
  861. package/.next/static/chunks/6404-86615a5f5ce5c00f.js +0 -1
  862. package/.next/static/chunks/6430-8c6dac4a758119f2.js +0 -1
  863. package/.next/static/chunks/6539-118a0084e0bfae34.js +0 -1
  864. package/.next/static/chunks/7264-91d1fa99abcd91ad.js +0 -1
  865. package/.next/static/chunks/7328-c8a51bb8c7470d77.js +0 -1
  866. package/.next/static/chunks/7391-5a0abd837ba241f5.js +0 -1
  867. package/.next/static/chunks/7445-d8a8be6e451c522e.js +0 -1
  868. package/.next/static/chunks/7561-2b366ddcbc3cc0ec.js +0 -1
  869. package/.next/static/chunks/8124-4a80e3201b8e51b0.js +0 -1
  870. package/.next/static/chunks/8345.bc5534ec13abc9ee.js +0 -1
  871. package/.next/static/chunks/8404-5aa8ea49197b98b8.js +0 -1
  872. package/.next/static/chunks/8405.a425f94b6b13d2be.js +0 -1
  873. package/.next/static/chunks/8470-72cf748472d4d501.js +0 -1
  874. package/.next/static/chunks/8551-a28272acfda62ac9.js +0 -1
  875. package/.next/static/chunks/8650-f879564a0ed89bc3.js +0 -1
  876. package/.next/static/chunks/8989-5fa9c7c670eb9a1a.js +0 -1
  877. package/.next/static/chunks/9164-de1d167d87614a6d.js +0 -1
  878. package/.next/static/chunks/9195.294887f083b1a11b.js +0 -1
  879. package/.next/static/chunks/9203-786f457ecf60b49c.js +0 -1
  880. package/.next/static/chunks/9244-3281f7fd02003a2c.js +0 -1
  881. package/.next/static/chunks/9345-11d6e48d892b1862.js +0 -8
  882. package/.next/static/chunks/9562-f8371be653010627.js +0 -1
  883. package/.next/static/chunks/9581-6d2523fd68a5e3c4.js +0 -1
  884. package/.next/static/chunks/9611-9867e6e8e65172ec.js +0 -1
  885. package/.next/static/chunks/9951-566fc6b05c12209e.js +0 -1
  886. package/.next/static/chunks/app/api/approvals/[id]/route-b9c783850b4c2acf.js +0 -1
  887. package/.next/static/chunks/app/api/approvals/route-b9c783850b4c2acf.js +0 -1
  888. package/.next/static/chunks/app/api/backup/route-b9c783850b4c2acf.js +0 -1
  889. package/.next/static/chunks/app/api/browse/route-b9c783850b4c2acf.js +0 -1
  890. package/.next/static/chunks/app/api/bugs/enhance/route-b9c783850b4c2acf.js +0 -1
  891. package/.next/static/chunks/app/api/cwd/route-b9c783850b4c2acf.js +0 -1
  892. package/.next/static/chunks/app/api/encryption/secure/route-b9c783850b4c2acf.js +0 -1
  893. package/.next/static/chunks/app/api/env/route-b9c783850b4c2acf.js +0 -1
  894. package/.next/static/chunks/app/api/flow/[id]/route-b9c783850b4c2acf.js +0 -1
  895. package/.next/static/chunks/app/api/flow/[id]/versions/[versionId]/route-b9c783850b4c2acf.js +0 -1
  896. package/.next/static/chunks/app/api/flow/[id]/versions/route-b9c783850b4c2acf.js +0 -1
  897. package/.next/static/chunks/app/api/flow/compile/route-b9c783850b4c2acf.js +0 -1
  898. package/.next/static/chunks/app/api/flow/generate/route-b9c783850b4c2acf.js +0 -1
  899. package/.next/static/chunks/app/api/flow/generator/route-b9c783850b4c2acf.js +0 -1
  900. package/.next/static/chunks/app/api/flow/improve/route-b9c783850b4c2acf.js +0 -1
  901. package/.next/static/chunks/app/api/flow/prompt-renderer/route-b9c783850b4c2acf.js +0 -1
  902. package/.next/static/chunks/app/api/flow/quick-chat/route-b9c783850b4c2acf.js +0 -1
  903. package/.next/static/chunks/app/api/flow/repair/route-b9c783850b4c2acf.js +0 -1
  904. package/.next/static/chunks/app/api/flow/route-b9c783850b4c2acf.js +0 -1
  905. package/.next/static/chunks/app/api/git/route-b9c783850b4c2acf.js +0 -1
  906. package/.next/static/chunks/app/api/init/route-b9c783850b4c2acf.js +0 -1
  907. package/.next/static/chunks/app/api/local-models/capability/route-b9c783850b4c2acf.js +0 -1
  908. package/.next/static/chunks/app/api/local-models/pull/route-b9c783850b4c2acf.js +0 -1
  909. package/.next/static/chunks/app/api/local-models/suggest/route-b9c783850b4c2acf.js +0 -1
  910. package/.next/static/chunks/app/api/mcp/app-sandbox/route-b9c783850b4c2acf.js +0 -1
  911. package/.next/static/chunks/app/api/mcp/cancel/route-b9c783850b4c2acf.js +0 -1
  912. package/.next/static/chunks/app/api/mcp/oauth-capability/route-b9c783850b4c2acf.js +0 -1
  913. package/.next/static/chunks/app/api/mcp/servers/[name]/prompts/get/route-b9c783850b4c2acf.js +0 -1
  914. package/.next/static/chunks/app/api/mcp/servers/[name]/prompts/route-b9c783850b4c2acf.js +0 -1
  915. package/.next/static/chunks/app/api/mcp/servers/[name]/resources/read/route-b9c783850b4c2acf.js +0 -1
  916. package/.next/static/chunks/app/api/mcp/servers/[name]/resources/route-b9c783850b4c2acf.js +0 -1
  917. package/.next/static/chunks/app/api/mcp/servers/[name]/route-b9c783850b4c2acf.js +0 -1
  918. package/.next/static/chunks/app/api/mcp/servers/[name]/status/route-b9c783850b4c2acf.js +0 -1
  919. package/.next/static/chunks/app/api/mcp/servers/[name]/tools/[toolName]/route-b9c783850b4c2acf.js +0 -1
  920. package/.next/static/chunks/app/api/mcp/servers/[name]/tools/route-b9c783850b4c2acf.js +0 -1
  921. package/.next/static/chunks/app/api/mcp/servers/route-b9c783850b4c2acf.js +0 -1
  922. package/.next/static/chunks/app/api/mcp/test-connection/route-b9c783850b4c2acf.js +0 -1
  923. package/.next/static/chunks/app/api/mcp/test-connection/stream/route-b9c783850b4c2acf.js +0 -1
  924. package/.next/static/chunks/app/api/mcp-registry/route-b9c783850b4c2acf.js +0 -1
  925. package/.next/static/chunks/app/api/mcp-registry/spotlight/route-b9c783850b4c2acf.js +0 -1
  926. package/.next/static/chunks/app/api/model/[id]/route-b9c783850b4c2acf.js +0 -1
  927. package/.next/static/chunks/app/api/model/provider/route-b9c783850b4c2acf.js +0 -1
  928. package/.next/static/chunks/app/api/model/route-b9c783850b4c2acf.js +0 -1
  929. package/.next/static/chunks/app/api/model/test/route-b9c783850b4c2acf.js +0 -1
  930. package/.next/static/chunks/app/api/oauth/callback/route-b9c783850b4c2acf.js +0 -1
  931. package/.next/static/chunks/app/api/oauth/initiate/route-b9c783850b4c2acf.js +0 -1
  932. package/.next/static/chunks/app/api/oauth/reset/route-b9c783850b4c2acf.js +0 -1
  933. package/.next/static/chunks/app/api/packages/build/route-b9c783850b4c2acf.js +0 -1
  934. package/.next/static/chunks/app/api/packages/derive-secrets/route-b9c783850b4c2acf.js +0 -1
  935. package/.next/static/chunks/app/api/packages/install/route-b9c783850b4c2acf.js +0 -1
  936. package/.next/static/chunks/app/api/packages/install/status/route-b9c783850b4c2acf.js +0 -1
  937. package/.next/static/chunks/app/api/packages/installed/route-b9c783850b4c2acf.js +0 -1
  938. package/.next/static/chunks/app/api/packages/resolve/route-b9c783850b4c2acf.js +0 -1
  939. package/.next/static/chunks/app/api/packages/scan-targets/route-b9c783850b4c2acf.js +0 -1
  940. package/.next/static/chunks/app/api/packages/search/route-b9c783850b4c2acf.js +0 -1
  941. package/.next/static/chunks/app/api/packages/uninstall/route-b9c783850b4c2acf.js +0 -1
  942. package/.next/static/chunks/app/api/planned-executions/[id]/route-b9c783850b4c2acf.js +0 -1
  943. package/.next/static/chunks/app/api/planned-executions/[id]/run/route-b9c783850b4c2acf.js +0 -1
  944. package/.next/static/chunks/app/api/planned-executions/[id]/runs/route-b9c783850b4c2acf.js +0 -1
  945. package/.next/static/chunks/app/api/planned-executions/preview-schedule/route-b9c783850b4c2acf.js +0 -1
  946. package/.next/static/chunks/app/api/planned-executions/reconcile/route-b9c783850b4c2acf.js +0 -1
  947. package/.next/static/chunks/app/api/planned-executions/route-b9c783850b4c2acf.js +0 -1
  948. package/.next/static/chunks/app/api/registry/auth/resend/route-b9c783850b4c2acf.js +0 -1
  949. package/.next/static/chunks/app/api/registry/auth/reset/route-b9c783850b4c2acf.js +0 -1
  950. package/.next/static/chunks/app/api/registry/auth/route-b9c783850b4c2acf.js +0 -1
  951. package/.next/static/chunks/app/api/registry/feedback/route-b9c783850b4c2acf.js +0 -1
  952. package/.next/static/chunks/app/api/registry/oauth/callback/route-b9c783850b4c2acf.js +0 -1
  953. package/.next/static/chunks/app/api/registry/oauth/initiate/route-b9c783850b4c2acf.js +0 -1
  954. package/.next/static/chunks/app/api/registry/packages/route-b9c783850b4c2acf.js +0 -1
  955. package/.next/static/chunks/app/api/registry/publish/route-b9c783850b4c2acf.js +0 -1
  956. package/.next/static/chunks/app/api/registry/settings/route-b9c783850b4c2acf.js +0 -1
  957. package/.next/static/chunks/app/api/restore/route-b9c783850b4c2acf.js +0 -1
  958. package/.next/static/chunks/app/api/runs/active/route-b9c783850b4c2acf.js +0 -1
  959. package/.next/static/chunks/app/api/storage/route-b9c783850b4c2acf.js +0 -1
  960. package/.next/static/chunks/app/api/telemetry/daily-active/route-b9c783850b4c2acf.js +0 -1
  961. package/.next/static/chunks/app/api/update/route-b9c783850b4c2acf.js +0 -1
  962. package/.next/static/chunks/app/api/waves/route-b9c783850b4c2acf.js +0 -1
  963. package/.next/static/chunks/app/api/webhooks/[id]/route-b9c783850b4c2acf.js +0 -1
  964. package/.next/static/chunks/app/chat/page-e37bbc561f40ce60.js +0 -1
  965. package/.next/static/chunks/app/docs/page-3b9ce48854b2147d.js +0 -1
  966. package/.next/static/chunks/app/executions/page-8296fd69c439ccee.js +0 -1
  967. package/.next/static/chunks/app/flows/page-e52c8943555e38dd.js +0 -1
  968. package/.next/static/chunks/app/layout-abed1f211e03152f.js +0 -1
  969. package/.next/static/chunks/app/mcp/page-4a3e5a643d84ee89.js +0 -1
  970. package/.next/static/chunks/app/mcp-flows/route-b9c783850b4c2acf.js +0 -1
  971. package/.next/static/chunks/app/mcp-proxy/[server]/route-b9c783850b4c2acf.js +0 -1
  972. package/.next/static/chunks/app/models/error-1718b538d6967e56.js +0 -1
  973. package/.next/static/chunks/app/models/page-595597042e227970.js +0 -1
  974. package/.next/static/chunks/app/packages/page-2f2d29c17841b3cf.js +0 -1
  975. package/.next/static/chunks/app/page-2f9da78a4891731a.js +0 -1
  976. package/.next/static/chunks/app/settings/page-f35e939032b0277d.js +0 -1
  977. package/.next/static/chunks/app/v1/chat/completions/route-b9c783850b4c2acf.js +0 -1
  978. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/breakpoints/route-b9c783850b4c2acf.js +0 -1
  979. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/cancel/route-b9c783850b4c2acf.js +0 -1
  980. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/debug/continue/route-b9c783850b4c2acf.js +0 -1
  981. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/debug/step/route-b9c783850b4c2acf.js +0 -1
  982. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/edit-state/route-b9c783850b4c2acf.js +0 -1
  983. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/events/route-b9c783850b4c2acf.js +0 -1
  984. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/inject/route-b9c783850b4c2acf.js +0 -1
  985. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/resources/[resourceId]/content/route-b9c783850b4c2acf.js +0 -1
  986. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/resources/route-b9c783850b4c2acf.js +0 -1
  987. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/respond/route-b9c783850b4c2acf.js +0 -1
  988. package/.next/static/chunks/app/v1/chat/conversations/[conversationId]/route-b9c783850b4c2acf.js +0 -1
  989. package/.next/static/chunks/app/v1/chat/conversations/route-b9c783850b4c2acf.js +0 -1
  990. package/.next/static/chunks/app/v1/chat/events/route-b9c783850b4c2acf.js +0 -1
  991. package/.next/static/chunks/app/v1/models/route-b9c783850b4c2acf.js +0 -1
  992. package/.next/static/chunks/app/waves/page-dc99a16141dd902b.js +0 -1
  993. package/.next/static/chunks/webpack-9d09d53b271f49e2.js +0 -1
  994. package/.next/static/css/30253fcfa8035221.css +0 -1
  995. package/.next/static/css/69ab44eb350e0b6c.css +0 -1
  996. package/.next/static/kIFnN4S0HHOnvpPGsSzi9/_buildManifest.js +0 -1
  997. /package/.next/static/{kIFnN4S0HHOnvpPGsSzi9 → b1aMk0634gkkiunttd1SQ}/_ssgManifest.js +0 -0
@@ -1,403 +1,604 @@
1
- "use strict";exports.id=9724,exports.ids=[8092,9724],exports.modules={19724:(a,b,c)=>{c.d(b,{Wk:()=>p,filesystemListResources:()=>s,filesystemReadResource:()=>u,isFilesystemAppUri:()=>t,isTouchedFileUri:()=>q,readTouchedFileResource:()=>r});var d=c(33873),e=c.n(d),f=c(29021),g=c(18230),h=c(48254),i=c(94749),j=c(48092);let k=(0,g.h)("backend/services/mcp/internal/filesystemResources"),l="ui://filesystem/browser",m="ui://devcanvas/diff",n="text/html;profile=mcp-app",o=new Map;function p(a,b,c){try{if("string"!=typeof a||!a)return;let d=function(a){let b=a.replace(/\\/g,"/");return b.startsWith("/")?`file://${b}`:`file:///${b}`}(a),e=o.get(d);for(o.delete(d),o.set(d,{uri:d,filePath:a,op:b,size:c??e?.size,at:Date.now()});o.size>200;){let a=o.keys().next().value;if(void 0===a)break;o.delete(a)}}catch(a){k.debug("recordTouchedFile ignored error",a)}}function q(a){return o.has(a)}async function r(a){let b=o.get(a);if(!b)return{success:!1,error:`Not a tracked filesystem resource: ${a}`,statusCode:404};let c=[];try{c=await (0,j.loadEffectiveRoots)(i.K3,"FLUJO_FS_ROOTS")}catch(a){k.warn("readTouchedFileResource: could not load roots",a)}if(0===c.length||!c.some(a=>(0,j.F)(a,b.filePath)))return{success:!1,error:`Path "${b.filePath}" is outside the configured filesystem roots.`,statusCode:403};try{let c=await f.promises.readFile(b.filePath,"utf8");return c.length>2e5&&(c=c.slice(0,2e5)+"\n…[truncated]"),{success:!0,data:{contents:[{uri:a,mimeType:"text/plain",text:c}]}}}catch(a){return{success:!1,error:`Could not read tracked file: ${a instanceof Error?a.message:String(a)}`,statusCode:500}}}function s(){return{resources:[{uri:l,name:"filesystem_browser",mimeType:n,description:"Interactive file browser (navigate, preview, upload, download) for the filesystem server."},{uri:m,name:"devcanvas_diff",mimeType:n,description:"Docked diff canvas that shows file writes/edits live as they happen (pip display mode)."},...[...o.values()].reverse().map(a=>({uri:a.uri,name:e().basename(a.filePath),mimeType:"text/plain",description:`${"write"===a.op?"Written":"Read"} by the filesystem server: ${a.filePath}`,..."number"==typeof a.size?{size:a.size}:{}}))]}}function t(a){return a===l||a===m}function u(a){if(!t(a))return{success:!1,error:`Not a filesystem app URI: ${a}`,statusCode:404};let b=a===m?w:v;return{success:!0,data:{contents:[{uri:a,mimeType:n,text:b,_meta:{ui:{csp:{},permissions:{}}}}]}}}let v=`<!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <style>
6
- :root { --bg:#fff; --fg:#1a1a1a; --muted:#666; --border:#e0e0e0; --accent:#1565c0; --hover:#f5f5f5; }
7
- [data-theme="dark"] { --bg:#1e1e1e; --fg:#e8e8e8; --muted:#9e9e9e; --border:#3a3a3a; --accent:#64b5f6; --hover:#2a2a2a; }
8
- * { box-sizing: border-box; }
9
- html,body { margin:0; padding:0; }
10
- body { font: 13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; background:var(--bg); color:var(--fg); }
11
- #wrap { padding:10px; }
12
- .bar { display:flex; align-items:center; gap:6px; margin-bottom:8px; flex-wrap:wrap; }
13
- .bar button, .bar label { font:inherit; cursor:pointer; border:1px solid var(--border); background:var(--bg); color:var(--fg); border-radius:5px; padding:3px 9px; }
14
- .bar button:hover, .bar label:hover { background:var(--hover); }
15
- .path { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; color:var(--muted); word-break:break-all; flex:1 1 200px; }
16
- ul { list-style:none; margin:0; padding:0; border:1px solid var(--border); border-radius:6px; overflow:hidden; }
17
- li { display:flex; align-items:center; gap:8px; padding:5px 10px; cursor:pointer; border-bottom:1px solid var(--border); }
18
- li:last-child { border-bottom:none; }
19
- li:hover { background:var(--hover); }
20
- .ico { width:16px; text-align:center; }
21
- .nm { flex:1; word-break:break-all; }
22
- .sz { color:var(--muted); font-size:11px; }
23
- .dl { border:1px solid var(--border); background:var(--bg); color:var(--fg); border-radius:4px; padding:1px 7px; font-size:11px; cursor:pointer; }
24
- .sel { border-color:var(--accent); color:var(--accent); font-weight:600; }
25
- .msg { color:var(--muted); padding:8px 2px; }
26
- .err { color:#d32f2f; }
27
- pre { background:var(--hover); border:1px solid var(--border); border-radius:6px; padding:10px; max-height:320px; overflow:auto; white-space:pre-wrap; word-break:break-word; margin:8px 0 0; }
28
- h4 { margin:10px 0 4px; }
29
- </style>
30
- </head>
31
- <body>
32
- <div id="wrap">
33
- <div class="bar">
34
- <button id="up" title="Parent directory">&#8593; Up</button>
35
- <button id="refresh" title="Refresh">&#8635;</button>
36
- <label>&#8593; Upload<input id="upload" type="file" style="display:none" /></label>
37
- <span class="path" id="path"></span>
38
- </div>
39
- <div id="list"></div>
40
- <div id="preview"></div>
41
- </div>
42
- <script>
43
- (function () {
44
- var parentWin = window.parent;
45
- var idc = 1;
46
- var pending = {};
47
- var cwd = ".";
48
-
49
- function post(msg) { parentWin.postMessage(msg, "*"); }
50
- function rpc(method, params) {
51
- return new Promise(function (resolve, reject) {
52
- var id = idc++;
53
- pending[id] = { resolve: resolve, reject: reject };
54
- post({ jsonrpc: "2.0", id: id, method: method, params: params || {} });
55
- });
56
- }
57
- function notify(method, params) { post({ jsonrpc: "2.0", method: method, params: params || {} }); }
58
-
59
- function applyTheme(ctx) {
60
- var theme = ctx && ctx.theme ? ctx.theme : "light";
61
- document.documentElement.setAttribute("data-theme", theme === "dark" ? "dark" : "light");
62
- }
63
-
64
- function sendSize() {
1
+ /**
2
+ * MCP Apps (#97) — the built-in `filesystem` server's interactive UI app.
3
+ *
4
+ * Publishes a single `ui://filesystem/browser` resource (MIME
5
+ * `text/html;profile=mcp-app`) — a self-contained file-browser View that talks
6
+ * the MCP Apps postMessage dialect directly (no bundled SDK) and drives the
7
+ * filesystem server's own tools (`list_dir`, `read_file`, `write_file`) to
8
+ * navigate directories, preview/download files, and upload text files.
9
+ *
10
+ * The `list_dir` tool definition carries `_meta.ui.resourceUri` pointing here
11
+ * (see filesystemTools.ts), so the chat renders this app whenever the model
12
+ * lists a directory. Because the app runs in FLUJO's separate-origin sandbox
13
+ * and brokers its tool calls back through the filesystem server (confined to
14
+ * the configured roots), it is exactly as constrained as the tools themselves.
15
+ */
16
+ import path from 'node:path';
17
+ import { promises as fs } from 'node:fs';
18
+ import { createLogger, isInside, loadEffectiveRoots } from './shared.js';
19
+ const MCP_APPS_PROTOCOL_VERSION = '2026-01-26';
20
+ const FILESYSTEM_SERVER_NAME = 'filesystem';
21
+ const resLog = createLogger('backend/services/mcp/internal/filesystemResources');
22
+ export const FILESYSTEM_APP_URI = 'ui://filesystem/browser';
23
+ /**
24
+ * #216: the docked "dev canvas" diff app. A `pip`-capable, persistent surface
25
+ * that the mutation tools (`write_file`, `edit_file`) point their `_meta.ui`
26
+ * link at, so every edit feeds the SAME docked tab and updates in place instead
27
+ * of spawning a fresh iframe per write.
28
+ */
29
+ export const DEVCANVAS_DIFF_URI = 'ui://devcanvas/diff';
30
+ const APP_MIME_TYPE = 'text/html;profile=mcp-app';
31
+ /** Cap the registry so long sessions can't grow it without bound. */
32
+ const MAX_TOUCHED_FILES = 200;
33
+ /** Output cap when serving a tracked file's content as a resource. */
34
+ const MAX_RESOURCE_CHARS = 200_000;
35
+ /** Keyed by URI; insertion order is oldest→newest (Map preserves it). */
36
+ const touchedFiles = new Map();
37
+ /** Build a `file://` URI for an absolute host path (Windows/POSIX safe). */
38
+ function pathToFileUri(absPath) {
39
+ const norm = absPath.replace(/\\/g, '/');
40
+ return norm.startsWith('/') ? `file://${norm}` : `file:///${norm}`;
41
+ }
42
+ /**
43
+ * Record that a filesystem tool touched `filePath`. Never throws — resource
44
+ * tracking must not be able to break a tool call.
45
+ */
46
+ export function recordTouchedFile(filePath, op, size) {
65
47
  try {
66
- var h = Math.ceil(document.documentElement.getBoundingClientRect().height);
67
- notify("ui/notifications/size-changed", { width: 0, height: h });
68
- } catch (e) {}
69
- }
70
-
71
- function payloadOf(result) {
72
- if (!result) return null;
73
- if (result.structuredContent) return result.structuredContent;
74
- try {
75
- var t = result.content && result.content[0] && result.content[0].text;
76
- return t ? JSON.parse(t) : null;
77
- } catch (e) { return null; }
78
- }
79
-
80
- function parentPath(p) {
81
- var norm = p.replace(/[\\\\]+/g, "/").replace(/\\/+$/, "");
82
- var i = norm.lastIndexOf("/");
83
- if (i <= 0) return norm;
84
- return norm.slice(0, i);
85
- }
86
- function joinPath(base, name) {
87
- var norm = base.replace(/[\\\\]+/g, "/").replace(/\\/+$/, "");
88
- return norm + "/" + name;
89
- }
90
-
91
- var listEl = document.getElementById("list");
92
- var pathEl = document.getElementById("path");
93
- var previewEl = document.getElementById("preview");
94
-
95
- function setMsg(el, text, isErr) {
96
- el.innerHTML = "";
97
- var d = document.createElement("div");
98
- d.className = "msg" + (isErr ? " err" : "");
99
- d.textContent = text;
100
- el.appendChild(d);
101
- sendSize();
102
- }
103
-
104
- async function navigate(path) {
105
- previewEl.innerHTML = "";
106
- setMsg(listEl, "Loading " + path + " ...");
107
- try {
108
- var res = await rpc("tools/call", { name: "list_dir", arguments: { path: path } });
109
- if (res && res.isError) {
110
- var errMsg = (payloadOf(res) || {}).error || "list_dir failed";
111
- // Detect the unconfigured-roots scenario and provide actionable guidance.
112
- if (errMsg.indexOf("outside the configured filesystem roots") !== -1) {
113
- errMsg = "No filesystem roots configured. "
114
- + "To browse files: go to MCP Manager → Filesystem → Roots and add a directory, "
115
- + "or set the FLUJO_FS_ROOTS environment variable. "
116
- + "In Docker, also add a host bind-mount to docker-compose.yml.";
48
+ if (typeof filePath !== 'string' || !filePath)
49
+ return;
50
+ const uri = pathToFileUri(filePath);
51
+ // Refresh position (delete+set moves the key to newest) and merge size.
52
+ const prev = touchedFiles.get(uri);
53
+ touchedFiles.delete(uri);
54
+ touchedFiles.set(uri, { uri, filePath, op, size: size ?? prev?.size, at: Date.now() });
55
+ while (touchedFiles.size > MAX_TOUCHED_FILES) {
56
+ const oldest = touchedFiles.keys().next().value;
57
+ if (oldest === undefined)
58
+ break;
59
+ touchedFiles.delete(oldest);
117
60
  }
118
- throw new Error(errMsg);
119
- }
120
- var data = payloadOf(res) || {};
121
- cwd = data.path || path;
122
- pathEl.textContent = cwd;
123
- renderEntries(data.entries || []);
124
- } catch (e) {
125
- setMsg(listEl, "Error: " + (e && e.message ? e.message : e), true);
126
61
  }
127
- }
128
-
129
- function renderEntries(entries) {
130
- entries.sort(function (a, b) {
131
- var ad = a.type === "directory" ? 0 : 1, bd = b.type === "directory" ? 0 : 1;
132
- if (ad !== bd) return ad - bd;
133
- return String(a.name).localeCompare(String(b.name));
134
- });
135
- listEl.innerHTML = "";
136
- if (!entries.length) { setMsg(listEl, "(empty directory)"); return; }
137
- var ul = document.createElement("ul");
138
- entries.forEach(function (ent) {
139
- var li = document.createElement("li");
140
- var isDir = ent.type === "directory";
141
- var ico = document.createElement("span"); ico.className = "ico"; ico.textContent = isDir ? "\\uD83D\\uDCC1" : "\\uD83D\\uDCC4";
142
- var nm = document.createElement("span"); nm.className = "nm"; nm.textContent = ent.name;
143
- li.appendChild(ico); li.appendChild(nm);
144
- if (!isDir) {
145
- var sz = document.createElement("span"); sz.className = "sz"; sz.textContent = fmtSize(ent.size); li.appendChild(sz);
146
- var sel = document.createElement("button"); sel.className = "dl sel"; sel.textContent = "Select";
147
- sel.onclick = function (e) { e.stopPropagation(); selectFile(joinPath(cwd, ent.name)); };
148
- li.appendChild(sel);
149
- var dl = document.createElement("button"); dl.className = "dl"; dl.textContent = "Download";
150
- dl.onclick = function (e) { e.stopPropagation(); downloadFile(joinPath(cwd, ent.name), ent.name); };
151
- li.appendChild(dl);
152
- li.onclick = function () { preview(joinPath(cwd, ent.name), ent.name); };
153
- } else {
154
- li.onclick = function () { navigate(joinPath(cwd, ent.name)); };
155
- }
156
- ul.appendChild(li);
157
- });
158
- listEl.appendChild(ul);
159
- sendSize();
160
- }
161
-
162
- function fmtSize(n) {
163
- if (typeof n !== "number") return "";
164
- if (n < 1024) return n + " B";
165
- if (n < 1048576) return (n / 1024).toFixed(1) + " KB";
166
- return (n / 1048576).toFixed(1) + " MB";
167
- }
168
-
169
- async function preview(path, name) {
170
- previewEl.innerHTML = "";
171
- var h = document.createElement("h4"); h.textContent = name; previewEl.appendChild(h);
172
- var pre = document.createElement("pre"); pre.textContent = "Loading..."; previewEl.appendChild(pre);
173
- sendSize();
174
- try {
175
- var res = await rpc("tools/call", { name: "read_file", arguments: { path: path } });
176
- if (res && res.isError) throw new Error((payloadOf(res) || {}).error || "read_file failed");
177
- var data = payloadOf(res) || {};
178
- pre.textContent = typeof data.content === "string" ? data.content : "(no text content)";
179
- } catch (e) {
180
- pre.textContent = "Error: " + (e && e.message ? e.message : e);
181
- pre.className = "err";
62
+ catch (err) {
63
+ resLog.debug('recordTouchedFile ignored error', err);
182
64
  }
183
- sendSize();
184
- }
185
-
186
- function selectFile(path) {
187
- // The picker action: hand the chosen path back to the assistant as a user
188
- // message (ui/message). The host injects it into the conversation, which
189
- // resumes the waiting model.
190
- rpc("ui/message", { role: "user", content: [{ type: "text", text: "Selected file: " + path }] })
191
- .then(function () { setMsg(previewEl, "Selected " + path + " — sent to the assistant."); })
192
- .catch(function (e) { setMsg(previewEl, "Select failed: " + (e && e.message ? e.message : e), true); });
193
- }
194
-
195
- async function downloadFile(path, name) {
65
+ }
66
+ /** Test seam: clear the touched-file registry. */
67
+ export function _clearTouchedFilesForTests() {
68
+ touchedFiles.clear();
69
+ }
70
+ /** MCP resource descriptors for the tracked files, newest-first. */
71
+ function touchedFileResources() {
72
+ return [...touchedFiles.values()].reverse().map((e) => ({
73
+ uri: e.uri,
74
+ name: path.basename(e.filePath),
75
+ mimeType: 'text/plain',
76
+ description: `${e.op === 'write' ? 'Written' : 'Read'} by the filesystem server: ${e.filePath}`,
77
+ ...(typeof e.size === 'number' ? { size: e.size } : {}),
78
+ }));
79
+ }
80
+ /** True when a URI refers to a tracked (read/written) file resource. */
81
+ export function isTouchedFileUri(uri) {
82
+ return touchedFiles.has(uri);
83
+ }
84
+ /**
85
+ * resources/read for a tracked file: read the current content LIVE, re-enforcing
86
+ * the filesystem server's confinement roots (a file recorded earlier could now
87
+ * be outside a narrowed root). Content is capped like `read_file`.
88
+ */
89
+ export async function readTouchedFileResource(uri) {
90
+ const entry = touchedFiles.get(uri);
91
+ if (!entry) {
92
+ return { success: false, error: `Not a tracked filesystem resource: ${uri}`, statusCode: 404 };
93
+ }
94
+ let roots = [];
196
95
  try {
197
- var res = await rpc("tools/call", { name: "read_file", arguments: { path: path } });
198
- if (res && res.isError) throw new Error((payloadOf(res) || {}).error || "read_file failed");
199
- var data = payloadOf(res) || {};
200
- await rpc("ui/download-file", {
201
- contents: [{ type: "resource", resource: { uri: "file:///" + name, mimeType: "text/plain", text: String(data.content == null ? "" : data.content) } }]
202
- });
203
- } catch (e) {
204
- setMsg(previewEl, "Download failed: " + (e && e.message ? e.message : e), true);
96
+ roots = await loadEffectiveRoots(FILESYSTEM_SERVER_NAME, 'FLUJO_FS_ROOTS');
205
97
  }
206
- }
207
-
208
- document.getElementById("upload").onchange = function (ev) {
209
- var file = ev.target.files && ev.target.files[0];
210
- if (!file) return;
211
- var reader = new FileReader();
212
- reader.onload = async function () {
213
- try {
214
- await rpc("tools/call", { name: "write_file", arguments: { path: joinPath(cwd, file.name), content: String(reader.result) } });
215
- navigate(cwd);
216
- } catch (e) {
217
- setMsg(previewEl, "Upload failed: " + (e && e.message ? e.message : e), true);
218
- }
219
- };
220
- reader.readAsText(file);
221
- ev.target.value = "";
222
- };
223
- document.getElementById("up").onclick = function () { navigate(parentPath(cwd)); };
224
- document.getElementById("refresh").onclick = function () { navigate(cwd); };
225
-
226
- // --- MCP Apps message handling ---
227
- window.addEventListener("message", function (event) {
228
- var m = event.data;
229
- if (!m || m.jsonrpc !== "2.0") return;
230
- if (m.id !== undefined && (m.result !== undefined || m.error !== undefined)) {
231
- var p = pending[m.id];
232
- if (!p) return;
233
- delete pending[m.id];
234
- if (m.error) p.reject(new Error(m.error.message || "RPC error"));
235
- else p.resolve(m.result);
236
- return;
98
+ catch (err) {
99
+ resLog.warn('readTouchedFileResource: could not load roots', err);
237
100
  }
238
- // Host-initiated requests/notifications.
239
- if (m.method === "ui/notifications/host-context-changed") { applyTheme(m.params); return; }
240
- if (m.method === "ui/notifications/tool-input") {
241
- var args = m.params && m.params.arguments;
242
- if (args && typeof args.path === "string" && !started) { started = true; navigate(args.path); }
243
- return;
101
+ if (roots.length === 0 || !roots.some((root) => isInside(root, entry.filePath))) {
102
+ return { success: false, error: `Path "${entry.filePath}" is outside the configured filesystem roots.`, statusCode: 403 };
244
103
  }
245
- if (m.method === "ping" && m.id !== undefined) { post({ jsonrpc: "2.0", id: m.id, result: {} }); return; }
246
- if (m.method === "ui/resource-teardown" && m.id !== undefined) { post({ jsonrpc: "2.0", id: m.id, result: {} }); return; }
247
- });
248
-
249
- var started = false;
250
-
251
- // Handshake: initialize -> initialized -> initial navigation.
252
- rpc("ui/initialize", {
253
- appInfo: { name: "filesystem-browser", version: "1.0.0" },
254
- appCapabilities: { availableDisplayModes: ["inline", "fullscreen"] },
255
- protocolVersion: "${h.GJ}"
256
- }).then(function (result) {
257
- applyTheme(result && result.hostContext);
258
- notify("ui/notifications/initialized", {});
259
- // If no tool-input arrives shortly, start at the data directory (".").
260
- setTimeout(function () { if (!started) { started = true; navigate("."); } }, 400);
261
- }).catch(function (e) {
262
- setMsg(listEl, "Failed to initialize app: " + (e && e.message ? e.message : e), true);
263
- });
264
- })();
265
- </script>
266
- </body>
267
- </html>`,w=`<!doctype html>
268
- <html>
269
- <head>
270
- <meta charset="utf-8" />
271
- <style>
272
- :root { --bg:#fff; --fg:#1a1a1a; --muted:#666; --border:#e0e0e0; --accent:#1565c0; --add:#e6ffed; --addln:#22863a; --hover:#f5f5f5; }
273
- [data-theme="dark"] { --bg:#1e1e1e; --fg:#e8e8e8; --muted:#9e9e9e; --border:#3a3a3a; --accent:#64b5f6; --add:#0f2f18; --addln:#7bd88f; --hover:#2a2a2a; }
274
- * { box-sizing: border-box; }
275
- html,body { margin:0; padding:0; height:100%; }
276
- body { font: 13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; background:var(--bg); color:var(--fg); }
277
- #wrap { padding:10px; }
278
- h3 { margin:0 0 8px; font-size:14px; }
279
- .empty { color:var(--muted); padding:10px 2px; }
280
- .card { border:1px solid var(--border); border-radius:6px; margin-bottom:8px; overflow:hidden; }
281
- .card h4 { margin:0; padding:6px 10px; background:var(--hover); font-size:12px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; word-break:break-all; display:flex; gap:8px; align-items:center; }
282
- .badge { font-size:11px; padding:1px 6px; border-radius:10px; border:1px solid var(--border); color:var(--muted); }
283
- .stat { font-size:11px; color:var(--addln); }
284
- pre { margin:0; padding:8px 10px; max-height:220px; overflow:auto; white-space:pre-wrap; word-break:break-word; background:var(--bg); }
285
- .del { color:#d32f2f; }
286
- </style>
287
- </head>
288
- <body>
289
- <div id="wrap">
290
- <h3>Diff canvas</h3>
291
- <div id="log"><div class="empty">Waiting for file writes / edits...</div></div>
292
- </div>
293
- <script>
294
- (function () {
295
- var parentWin = window.parent;
296
- var logEl = document.getElementById("log");
297
- var changes = [];
298
- var seen = 0;
299
-
300
- function post(msg) { parentWin.postMessage(msg, "*"); }
301
- function notify(method, params) { post({ jsonrpc: "2.0", method: method, params: params || {} }); }
302
-
303
- function applyTheme(ctx) {
304
- var theme = ctx && ctx.theme ? ctx.theme : "light";
305
- document.documentElement.setAttribute("data-theme", theme === "dark" ? "dark" : "light");
306
- }
307
- function sendSize() {
308
104
  try {
309
- var h = Math.ceil(document.documentElement.getBoundingClientRect().height);
310
- notify("ui/notifications/size-changed", { width: 0, height: h });
311
- } catch (e) {}
312
- }
313
- function payloadOf(result) {
314
- if (!result) return null;
315
- if (result.structuredContent) return result.structuredContent;
316
- try {
317
- var t = result.content && result.content[0] && result.content[0].text;
318
- return t ? JSON.parse(t) : null;
319
- } catch (e) { return null; }
320
- }
321
-
322
- function render() {
323
- if (!changes.length) { logEl.innerHTML = '<div class="empty">Waiting for file writes / edits...</div>'; sendSize(); return; }
324
- logEl.innerHTML = "";
325
- for (var i = changes.length - 1; i >= 0; i--) {
326
- var c = changes[i];
327
- var card = document.createElement("div"); card.className = "card";
328
- var h = document.createElement("h4");
329
- var nm = document.createElement("span"); nm.textContent = c.path || "(unknown path)"; nm.style.flex = "1";
330
- h.appendChild(nm);
331
- if (c.mode) { var b = document.createElement("span"); b.className = "badge"; b.textContent = c.mode; h.appendChild(b); }
332
- if (c.stat) { var s = document.createElement("span"); s.className = "stat"; s.textContent = c.stat; h.appendChild(s); }
333
- card.appendChild(h);
334
- if (c.body) { var pre = document.createElement("pre"); pre.textContent = c.body; card.appendChild(pre); }
335
- logEl.appendChild(card);
336
- }
337
- sendSize();
338
- }
339
-
340
- function addFromResult(payload, args) {
341
- if (!payload && !args) return;
342
- var p = payload || {};
343
- var a = args || {};
344
- var change = { path: p.path || a.path || "", mode: p.mode || (a.edits ? "edit" : (a.diff ? "diff" : undefined)), stat: "", body: "" };
345
- if (p.diff && (typeof p.diff.added === "number" || typeof p.diff.removed === "number")) {
346
- change.stat = "+" + (p.diff.added || 0) + " -" + (p.diff.removed || 0);
347
- } else if (typeof p.bytesWritten === "number") {
348
- change.stat = p.bytesWritten + " B";
349
- } else if (typeof p.editsApplied === "number") {
350
- change.stat = p.editsApplied + " edit(s)";
351
- } else if (typeof p.applied === "number") {
352
- change.stat = p.applied + " edit(s)";
105
+ let text = await fs.readFile(entry.filePath, 'utf8');
106
+ if (text.length > MAX_RESOURCE_CHARS)
107
+ text = text.slice(0, MAX_RESOURCE_CHARS) + '\n…[truncated]';
108
+ return {
109
+ success: true,
110
+ data: { contents: [{ uri, mimeType: 'text/plain', text }] },
111
+ };
353
112
  }
354
- if (typeof a.content === "string") change.body = a.content.slice(0, 4000);
355
- else if (typeof a.diff === "string") change.body = a.diff.slice(0, 4000);
356
- changes.push(change);
357
- render();
358
- }
359
-
360
- var lastArgs = null;
361
- window.addEventListener("message", function (event) {
362
- var m = event.data;
363
- if (!m || m.jsonrpc !== "2.0") return;
364
- if (m.method === "ui/notifications/host-context-changed") { applyTheme(m.params); return; }
365
- if (m.method === "ui/notifications/tool-input") { lastArgs = m.params && m.params.arguments; return; }
366
- if (m.method === "ui/notifications/tool-result") {
367
- addFromResult(payloadOf(m.params && m.params.result ? m.params.result : m.params), lastArgs);
368
- lastArgs = null;
369
- return;
113
+ catch (err) {
114
+ return { success: false, error: `Could not read tracked file: ${err instanceof Error ? err.message : String(err)}`, statusCode: 500 };
370
115
  }
371
- if (m.method === "ping" && m.id !== undefined) { post({ jsonrpc: "2.0", id: m.id, result: {} }); return; }
372
- if (m.method === "ui/resource-teardown" && m.id !== undefined) { post({ jsonrpc: "2.0", id: m.id, result: {} }); return; }
373
- });
374
-
375
- // Handshake: advertise pip so the host can dock this app.
376
- var idc = 1; var pending = {};
377
- function rpc(method, params) {
378
- return new Promise(function (resolve, reject) {
379
- var id = idc++; pending[id] = { resolve: resolve, reject: reject };
380
- post({ jsonrpc: "2.0", id: id, method: method, params: params || {} });
381
- });
382
- }
383
- window.addEventListener("message", function (event) {
384
- var m = event.data;
385
- if (!m || m.jsonrpc !== "2.0") return;
386
- if (m.id !== undefined && (m.result !== undefined || m.error !== undefined)) {
387
- var pr = pending[m.id]; if (!pr) return; delete pending[m.id];
388
- if (m.error) pr.reject(new Error(m.error.message || "RPC error")); else pr.resolve(m.result);
116
+ }
117
+ /** resources/list for the filesystem server: the browser app + diff canvas + tracked files. */
118
+ export function filesystemListResources() {
119
+ return {
120
+ resources: [
121
+ {
122
+ uri: FILESYSTEM_APP_URI,
123
+ name: 'filesystem_browser',
124
+ mimeType: APP_MIME_TYPE,
125
+ description: 'Interactive file browser (navigate, preview, upload, download) for the filesystem server.',
126
+ },
127
+ {
128
+ uri: DEVCANVAS_DIFF_URI,
129
+ name: 'devcanvas_diff',
130
+ mimeType: APP_MIME_TYPE,
131
+ description: 'Docked diff canvas that shows file writes/edits live as they happen (pip display mode).',
132
+ },
133
+ ...touchedFileResources(),
134
+ ],
135
+ };
136
+ }
137
+ /** True when a URI is one this module serves. */
138
+ export function isFilesystemAppUri(uri) {
139
+ return uri === FILESYSTEM_APP_URI || uri === DEVCANVAS_DIFF_URI;
140
+ }
141
+ /** resources/read for the filesystem server's built-in MCP Apps. */
142
+ export function filesystemReadResource(uri) {
143
+ if (!isFilesystemAppUri(uri)) {
144
+ return { success: false, error: `Not a filesystem app URI: ${uri}`, statusCode: 404 };
389
145
  }
390
- });
391
- rpc("ui/initialize", {
392
- appInfo: { name: "devcanvas-diff", version: "1.0.0" },
393
- appCapabilities: { availableDisplayModes: ["inline", "fullscreen", "pip"] },
394
- protocolVersion: "${h.GJ}"
395
- }).then(function (result) {
396
- applyTheme(result && result.hostContext);
397
- notify("ui/notifications/initialized", {});
398
- sendSize();
399
- }).catch(function () { sendSize(); });
400
- })();
401
- </script>
402
- </body>
403
- </html>`},48092:(a,b,c)=>{c.d(b,{F:()=>j,loadEffectiveRoots:()=>l});var d=c(33873),e=c.n(d),f=c(79551),g=c(18230),h=c(94749);let i=(0,g.h)("backend/services/mcp/internal/confinement");function j(a,b){let c=e().relative(a,b);return""===c||!c.startsWith("..")&&!e().isAbsolute(c)}async function k(a,b){let{resolveGlobalVars:d}=await Promise.resolve().then(c.bind(c,87507)),g=(await d(a)).trim();if(!g)return null;if(g.startsWith("file://"))try{return e().resolve((0,f.fileURLToPath)(g))}catch(a){return i.warn(`resolveRootToPath: could not parse file URI "${g}"`,a),null}return e().isAbsolute(g)?e().resolve(g):e().resolve(b,g)}async function l(a,b,d){let{getDataDir:f}=await Promise.resolve().then(c.bind(c,85510)),g=f(),l=function(a){for(let b of Array.isArray(a)?a:[a]){let a=process.env[b];if(!a||!a.trim())continue;let c=a.split(e().delimiter).map(a=>a.trim()).filter(Boolean).map(a=>e().resolve(a));if(c.length)return c}return null}(b),m=[];try{for(let b of(await (0,h.AC)(a)))m.push(e().isAbsolute(b)?e().resolve(b):e().resolve(g,b))}catch(a){i.warn("loadEffectiveRoots: could not read persisted roots",a)}try{let{getNodeRoots:b,getNodeRootsForId:e}=await Promise.resolve().then(c.bind(c,28181));for(let c of void 0!==d?(()=>{let c=e(a,d);return c.length>0?c:b(a)})():b(a)){let a=await k(c,g);a&&m.push(a)}}catch(a){i.warn("loadEffectiveRoots: could not read node roots",a)}let n=Array.from(new Set(m));if(!l)return 0===n.length?[g]:n;let o=n.filter(a=>l.some(b=>j(b,a)));return o.length?o:l}}};
146
+ const html = uri === DEVCANVAS_DIFF_URI ? DEVCANVAS_DIFF_HTML : FILESYSTEM_APP_HTML;
147
+ return {
148
+ success: true,
149
+ data: {
150
+ contents: [
151
+ {
152
+ uri,
153
+ mimeType: APP_MIME_TYPE,
154
+ text: html,
155
+ // Self-contained: no external network/resources, so the default-deny
156
+ // sandbox CSP is sufficient. An empty `ui` block still marks intent.
157
+ _meta: { ui: { csp: {}, permissions: {} } },
158
+ },
159
+ ],
160
+ },
161
+ };
162
+ }
163
+ /**
164
+ * The View HTML. Hand-rolled MCP Apps client over postMessage (window.parent is
165
+ * the sandbox proxy, which relays to the FLUJO host bridge). Kept dependency-
166
+ * free and backtick-free so it embeds cleanly in this template string.
167
+ */
168
+ const FILESYSTEM_APP_HTML = `<!doctype html>
169
+ <html>
170
+ <head>
171
+ <meta charset="utf-8" />
172
+ <style>
173
+ :root { --bg:#fff; --fg:#1a1a1a; --muted:#666; --border:#e0e0e0; --accent:#1565c0; --hover:#f5f5f5; }
174
+ [data-theme="dark"] { --bg:#1e1e1e; --fg:#e8e8e8; --muted:#9e9e9e; --border:#3a3a3a; --accent:#64b5f6; --hover:#2a2a2a; }
175
+ * { box-sizing: border-box; }
176
+ html,body { margin:0; padding:0; }
177
+ body { font: 13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; background:var(--bg); color:var(--fg); }
178
+ #wrap { padding:10px; }
179
+ .bar { display:flex; align-items:center; gap:6px; margin-bottom:8px; flex-wrap:wrap; }
180
+ .bar button, .bar label { font:inherit; cursor:pointer; border:1px solid var(--border); background:var(--bg); color:var(--fg); border-radius:5px; padding:3px 9px; }
181
+ .bar button:hover, .bar label:hover { background:var(--hover); }
182
+ .path { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; color:var(--muted); word-break:break-all; flex:1 1 200px; }
183
+ ul { list-style:none; margin:0; padding:0; border:1px solid var(--border); border-radius:6px; overflow:hidden; }
184
+ li { display:flex; align-items:center; gap:8px; padding:5px 10px; cursor:pointer; border-bottom:1px solid var(--border); }
185
+ li:last-child { border-bottom:none; }
186
+ li:hover { background:var(--hover); }
187
+ .ico { width:16px; text-align:center; }
188
+ .nm { flex:1; word-break:break-all; }
189
+ .sz { color:var(--muted); font-size:11px; }
190
+ .dl { border:1px solid var(--border); background:var(--bg); color:var(--fg); border-radius:4px; padding:1px 7px; font-size:11px; cursor:pointer; }
191
+ .sel { border-color:var(--accent); color:var(--accent); font-weight:600; }
192
+ .msg { color:var(--muted); padding:8px 2px; }
193
+ .err { color:#d32f2f; }
194
+ pre { background:var(--hover); border:1px solid var(--border); border-radius:6px; padding:10px; max-height:320px; overflow:auto; white-space:pre-wrap; word-break:break-word; margin:8px 0 0; }
195
+ h4 { margin:10px 0 4px; }
196
+ </style>
197
+ </head>
198
+ <body>
199
+ <div id="wrap">
200
+ <div class="bar">
201
+ <button id="up" title="Parent directory">&#8593; Up</button>
202
+ <button id="refresh" title="Refresh">&#8635;</button>
203
+ <label>&#8593; Upload<input id="upload" type="file" style="display:none" /></label>
204
+ <span class="path" id="path"></span>
205
+ </div>
206
+ <div id="list"></div>
207
+ <div id="preview"></div>
208
+ </div>
209
+ <script>
210
+ (function () {
211
+ var parentWin = window.parent;
212
+ var idc = 1;
213
+ var pending = {};
214
+ var cwd = ".";
215
+
216
+ function post(msg) { parentWin.postMessage(msg, "*"); }
217
+ function rpc(method, params) {
218
+ return new Promise(function (resolve, reject) {
219
+ var id = idc++;
220
+ pending[id] = { resolve: resolve, reject: reject };
221
+ post({ jsonrpc: "2.0", id: id, method: method, params: params || {} });
222
+ });
223
+ }
224
+ function notify(method, params) { post({ jsonrpc: "2.0", method: method, params: params || {} }); }
225
+
226
+ function applyTheme(ctx) {
227
+ var theme = ctx && ctx.theme ? ctx.theme : "light";
228
+ document.documentElement.setAttribute("data-theme", theme === "dark" ? "dark" : "light");
229
+ }
230
+
231
+ function sendSize() {
232
+ try {
233
+ var h = Math.ceil(document.documentElement.getBoundingClientRect().height);
234
+ notify("ui/notifications/size-changed", { width: 0, height: h });
235
+ } catch (e) {}
236
+ }
237
+
238
+ function payloadOf(result) {
239
+ if (!result) return null;
240
+ if (result.structuredContent) return result.structuredContent;
241
+ try {
242
+ var t = result.content && result.content[0] && result.content[0].text;
243
+ return t ? JSON.parse(t) : null;
244
+ } catch (e) { return null; }
245
+ }
246
+
247
+ function parentPath(p) {
248
+ var norm = p.replace(/[\\\\]+/g, "/").replace(/\\/+$/, "");
249
+ var i = norm.lastIndexOf("/");
250
+ if (i <= 0) return norm;
251
+ return norm.slice(0, i);
252
+ }
253
+ function joinPath(base, name) {
254
+ var norm = base.replace(/[\\\\]+/g, "/").replace(/\\/+$/, "");
255
+ return norm + "/" + name;
256
+ }
257
+
258
+ var listEl = document.getElementById("list");
259
+ var pathEl = document.getElementById("path");
260
+ var previewEl = document.getElementById("preview");
261
+
262
+ function setMsg(el, text, isErr) {
263
+ el.innerHTML = "";
264
+ var d = document.createElement("div");
265
+ d.className = "msg" + (isErr ? " err" : "");
266
+ d.textContent = text;
267
+ el.appendChild(d);
268
+ sendSize();
269
+ }
270
+
271
+ async function navigate(path) {
272
+ previewEl.innerHTML = "";
273
+ setMsg(listEl, "Loading " + path + " ...");
274
+ try {
275
+ var res = await rpc("tools/call", { name: "list_dir", arguments: { path: path } });
276
+ if (res && res.isError) {
277
+ var errMsg = (payloadOf(res) || {}).error || "list_dir failed";
278
+ // Detect the unconfigured-roots scenario and provide actionable guidance.
279
+ if (errMsg.indexOf("outside the configured filesystem roots") !== -1) {
280
+ errMsg = "No filesystem roots configured. "
281
+ + "To browse files: go to MCP Manager → Filesystem → Roots and add a directory, "
282
+ + "or set the FLUJO_FS_ROOTS environment variable. "
283
+ + "In Docker, also add a host bind-mount to docker-compose.yml.";
284
+ }
285
+ throw new Error(errMsg);
286
+ }
287
+ var data = payloadOf(res) || {};
288
+ cwd = data.path || path;
289
+ pathEl.textContent = cwd;
290
+ renderEntries(data.entries || []);
291
+ } catch (e) {
292
+ setMsg(listEl, "Error: " + (e && e.message ? e.message : e), true);
293
+ }
294
+ }
295
+
296
+ function renderEntries(entries) {
297
+ entries.sort(function (a, b) {
298
+ var ad = a.type === "directory" ? 0 : 1, bd = b.type === "directory" ? 0 : 1;
299
+ if (ad !== bd) return ad - bd;
300
+ return String(a.name).localeCompare(String(b.name));
301
+ });
302
+ listEl.innerHTML = "";
303
+ if (!entries.length) { setMsg(listEl, "(empty directory)"); return; }
304
+ var ul = document.createElement("ul");
305
+ entries.forEach(function (ent) {
306
+ var li = document.createElement("li");
307
+ var isDir = ent.type === "directory";
308
+ var ico = document.createElement("span"); ico.className = "ico"; ico.textContent = isDir ? "\\uD83D\\uDCC1" : "\\uD83D\\uDCC4";
309
+ var nm = document.createElement("span"); nm.className = "nm"; nm.textContent = ent.name;
310
+ li.appendChild(ico); li.appendChild(nm);
311
+ if (!isDir) {
312
+ var sz = document.createElement("span"); sz.className = "sz"; sz.textContent = fmtSize(ent.size); li.appendChild(sz);
313
+ var sel = document.createElement("button"); sel.className = "dl sel"; sel.textContent = "Select";
314
+ sel.onclick = function (e) { e.stopPropagation(); selectFile(joinPath(cwd, ent.name)); };
315
+ li.appendChild(sel);
316
+ var dl = document.createElement("button"); dl.className = "dl"; dl.textContent = "Download";
317
+ dl.onclick = function (e) { e.stopPropagation(); downloadFile(joinPath(cwd, ent.name), ent.name); };
318
+ li.appendChild(dl);
319
+ li.onclick = function () { preview(joinPath(cwd, ent.name), ent.name); };
320
+ } else {
321
+ li.onclick = function () { navigate(joinPath(cwd, ent.name)); };
322
+ }
323
+ ul.appendChild(li);
324
+ });
325
+ listEl.appendChild(ul);
326
+ sendSize();
327
+ }
328
+
329
+ function fmtSize(n) {
330
+ if (typeof n !== "number") return "";
331
+ if (n < 1024) return n + " B";
332
+ if (n < 1048576) return (n / 1024).toFixed(1) + " KB";
333
+ return (n / 1048576).toFixed(1) + " MB";
334
+ }
335
+
336
+ async function preview(path, name) {
337
+ previewEl.innerHTML = "";
338
+ var h = document.createElement("h4"); h.textContent = name; previewEl.appendChild(h);
339
+ var pre = document.createElement("pre"); pre.textContent = "Loading..."; previewEl.appendChild(pre);
340
+ sendSize();
341
+ try {
342
+ var res = await rpc("tools/call", { name: "read_file", arguments: { path: path } });
343
+ if (res && res.isError) throw new Error((payloadOf(res) || {}).error || "read_file failed");
344
+ var data = payloadOf(res) || {};
345
+ pre.textContent = typeof data.content === "string" ? data.content : "(no text content)";
346
+ } catch (e) {
347
+ pre.textContent = "Error: " + (e && e.message ? e.message : e);
348
+ pre.className = "err";
349
+ }
350
+ sendSize();
351
+ }
352
+
353
+ function selectFile(path) {
354
+ // The picker action: hand the chosen path back to the assistant as a user
355
+ // message (ui/message). The host injects it into the conversation, which
356
+ // resumes the waiting model.
357
+ rpc("ui/message", { role: "user", content: [{ type: "text", text: "Selected file: " + path }] })
358
+ .then(function () { setMsg(previewEl, "Selected " + path + " — sent to the assistant."); })
359
+ .catch(function (e) { setMsg(previewEl, "Select failed: " + (e && e.message ? e.message : e), true); });
360
+ }
361
+
362
+ async function downloadFile(path, name) {
363
+ try {
364
+ var res = await rpc("tools/call", { name: "read_file", arguments: { path: path } });
365
+ if (res && res.isError) throw new Error((payloadOf(res) || {}).error || "read_file failed");
366
+ var data = payloadOf(res) || {};
367
+ await rpc("ui/download-file", {
368
+ contents: [{ type: "resource", resource: { uri: "file:///" + name, mimeType: "text/plain", text: String(data.content == null ? "" : data.content) } }]
369
+ });
370
+ } catch (e) {
371
+ setMsg(previewEl, "Download failed: " + (e && e.message ? e.message : e), true);
372
+ }
373
+ }
374
+
375
+ document.getElementById("upload").onchange = function (ev) {
376
+ var file = ev.target.files && ev.target.files[0];
377
+ if (!file) return;
378
+ var reader = new FileReader();
379
+ reader.onload = async function () {
380
+ try {
381
+ await rpc("tools/call", { name: "write_file", arguments: { path: joinPath(cwd, file.name), content: String(reader.result) } });
382
+ navigate(cwd);
383
+ } catch (e) {
384
+ setMsg(previewEl, "Upload failed: " + (e && e.message ? e.message : e), true);
385
+ }
386
+ };
387
+ reader.readAsText(file);
388
+ ev.target.value = "";
389
+ };
390
+ document.getElementById("up").onclick = function () { navigate(parentPath(cwd)); };
391
+ document.getElementById("refresh").onclick = function () { navigate(cwd); };
392
+
393
+ // --- MCP Apps message handling ---
394
+ window.addEventListener("message", function (event) {
395
+ var m = event.data;
396
+ if (!m || m.jsonrpc !== "2.0") return;
397
+ if (m.id !== undefined && (m.result !== undefined || m.error !== undefined)) {
398
+ var p = pending[m.id];
399
+ if (!p) return;
400
+ delete pending[m.id];
401
+ if (m.error) p.reject(new Error(m.error.message || "RPC error"));
402
+ else p.resolve(m.result);
403
+ return;
404
+ }
405
+ // Host-initiated requests/notifications.
406
+ if (m.method === "ui/notifications/host-context-changed") { applyTheme(m.params); return; }
407
+ if (m.method === "ui/notifications/tool-input") {
408
+ var args = m.params && m.params.arguments;
409
+ if (args && typeof args.path === "string" && !started) { started = true; navigate(args.path); }
410
+ return;
411
+ }
412
+ if (m.method === "ping" && m.id !== undefined) { post({ jsonrpc: "2.0", id: m.id, result: {} }); return; }
413
+ if (m.method === "ui/resource-teardown" && m.id !== undefined) { post({ jsonrpc: "2.0", id: m.id, result: {} }); return; }
414
+ });
415
+
416
+ var started = false;
417
+
418
+ // Handshake: initialize -> initialized -> initial navigation.
419
+ rpc("ui/initialize", {
420
+ appInfo: { name: "filesystem-browser", version: "1.0.0" },
421
+ appCapabilities: { availableDisplayModes: ["inline", "fullscreen"] },
422
+ protocolVersion: "${MCP_APPS_PROTOCOL_VERSION}"
423
+ }).then(function (result) {
424
+ applyTheme(result && result.hostContext);
425
+ notify("ui/notifications/initialized", {});
426
+ // If no tool-input arrives shortly, start at the data directory (".").
427
+ setTimeout(function () { if (!started) { started = true; navigate("."); } }, 400);
428
+ }).catch(function (e) {
429
+ setMsg(listEl, "Failed to initialize app: " + (e && e.message ? e.message : e), true);
430
+ });
431
+ })();
432
+ </script>
433
+ </body>
434
+ </html>`;
435
+ /**
436
+ * #216 — the docked diff canvas View. Dependency-free, backtick-free MCP Apps
437
+ * client over postMessage (same dialect as the file browser above). It
438
+ * advertises `pip` support so FLUJO can dock it, and renders a live, newest-
439
+ * first log of file writes/edits fed through the standard tool-result channel.
440
+ * Each `write_file` / `edit_file` result appends a change card; re-feeds for the
441
+ * same docked tab update it in place (no new iframe).
442
+ */
443
+ const DEVCANVAS_DIFF_HTML = `<!doctype html>
444
+ <html>
445
+ <head>
446
+ <meta charset="utf-8" />
447
+ <style>
448
+ :root { --bg:#fff; --fg:#1a1a1a; --muted:#666; --border:#e0e0e0; --accent:#1565c0; --add:#e6ffed; --addln:#22863a; --hover:#f5f5f5; }
449
+ [data-theme="dark"] { --bg:#1e1e1e; --fg:#e8e8e8; --muted:#9e9e9e; --border:#3a3a3a; --accent:#64b5f6; --add:#0f2f18; --addln:#7bd88f; --hover:#2a2a2a; }
450
+ * { box-sizing: border-box; }
451
+ html,body { margin:0; padding:0; height:100%; }
452
+ body { font: 13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; background:var(--bg); color:var(--fg); }
453
+ #wrap { padding:10px; }
454
+ h3 { margin:0 0 8px; font-size:14px; }
455
+ .empty { color:var(--muted); padding:10px 2px; }
456
+ .card { border:1px solid var(--border); border-radius:6px; margin-bottom:8px; overflow:hidden; }
457
+ .card h4 { margin:0; padding:6px 10px; background:var(--hover); font-size:12px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; word-break:break-all; display:flex; gap:8px; align-items:center; }
458
+ .badge { font-size:11px; padding:1px 6px; border-radius:10px; border:1px solid var(--border); color:var(--muted); }
459
+ .stat { font-size:11px; color:var(--addln); }
460
+ pre { margin:0; padding:8px 10px; max-height:220px; overflow:auto; white-space:pre-wrap; word-break:break-word; background:var(--bg); }
461
+ .del { color:#d32f2f; }
462
+ </style>
463
+ </head>
464
+ <body>
465
+ <div id="wrap">
466
+ <h3>Diff canvas</h3>
467
+ <div id="log"><div class="empty">Waiting for file writes / edits...</div></div>
468
+ </div>
469
+ <script>
470
+ (function () {
471
+ var parentWin = window.parent;
472
+ var logEl = document.getElementById("log");
473
+ var changes = [];
474
+ var seen = 0;
475
+
476
+ function post(msg) { parentWin.postMessage(msg, "*"); }
477
+ function notify(method, params) { post({ jsonrpc: "2.0", method: method, params: params || {} }); }
478
+
479
+ function applyTheme(ctx) {
480
+ var theme = ctx && ctx.theme ? ctx.theme : "light";
481
+ document.documentElement.setAttribute("data-theme", theme === "dark" ? "dark" : "light");
482
+ }
483
+ function sendSize() {
484
+ try {
485
+ var h = Math.ceil(document.documentElement.getBoundingClientRect().height);
486
+ notify("ui/notifications/size-changed", { width: 0, height: h });
487
+ } catch (e) {}
488
+ }
489
+ function payloadOf(result) {
490
+ if (!result) return null;
491
+ if (result.structuredContent) return result.structuredContent;
492
+ try {
493
+ var t = result.content && result.content[0] && result.content[0].text;
494
+ return t ? JSON.parse(t) : null;
495
+ } catch (e) { return null; }
496
+ }
497
+
498
+ function render() {
499
+ if (!changes.length) { logEl.innerHTML = '<div class="empty">Waiting for file writes / edits...</div>'; sendSize(); return; }
500
+ logEl.innerHTML = "";
501
+ for (var i = changes.length - 1; i >= 0; i--) {
502
+ var c = changes[i];
503
+ var card = document.createElement("div"); card.className = "card";
504
+ var h = document.createElement("h4");
505
+ var nm = document.createElement("span"); nm.textContent = c.path || "(unknown path)"; nm.style.flex = "1";
506
+ h.appendChild(nm);
507
+ if (c.mode) { var b = document.createElement("span"); b.className = "badge"; b.textContent = c.mode; h.appendChild(b); }
508
+ if (c.stat) { var s = document.createElement("span"); s.className = "stat"; s.textContent = c.stat; h.appendChild(s); }
509
+ card.appendChild(h);
510
+ if (c.body) { var pre = document.createElement("pre"); pre.textContent = c.body; card.appendChild(pre); }
511
+ logEl.appendChild(card);
512
+ }
513
+ sendSize();
514
+ }
515
+
516
+ function addFromResult(payload, args) {
517
+ if (!payload && !args) return;
518
+ var p = payload || {};
519
+ var a = args || {};
520
+ if (p.snapshotDiff) {
521
+ var sd = p.snapshotDiff;
522
+ var files = Array.isArray(sd.changedFiles) ? sd.changedFiles : [];
523
+ var change = {
524
+ path: (sd.nodeName || sd.nodeId || "Snapshot") + " — " + (sd.root || ""),
525
+ mode: "snapshot",
526
+ stat: files.length + " file(s)",
527
+ body: files.map(function (f) { return (f.status || "?") + " " + (f.path || ""); }).join("\n")
528
+ + (sd.resourceUri ? "\n\nPatch resource: " + sd.resourceUri : "")
529
+ };
530
+ changes.push(change);
531
+ render();
532
+ if (sd.resourceUri) {
533
+ rpc("resources/read", { uri: sd.resourceUri }).then(function (result) {
534
+ var contents = result && result.contents;
535
+ var text = contents && contents[0] && contents[0].text;
536
+ if (typeof text === "string" && text.length) {
537
+ change.body = text;
538
+ render();
539
+ }
540
+ }).catch(function () {});
541
+ }
542
+ return;
543
+ }
544
+ var change = { path: p.path || a.path || "", mode: p.mode || (a.edits ? "edit" : (a.diff ? "diff" : undefined)), stat: "", body: "" };
545
+ if (p.diff && (typeof p.diff.added === "number" || typeof p.diff.removed === "number")) {
546
+ change.stat = "+" + (p.diff.added || 0) + " -" + (p.diff.removed || 0);
547
+ } else if (typeof p.bytesWritten === "number") {
548
+ change.stat = p.bytesWritten + " B";
549
+ } else if (typeof p.editsApplied === "number") {
550
+ change.stat = p.editsApplied + " edit(s)";
551
+ } else if (typeof p.applied === "number") {
552
+ change.stat = p.applied + " edit(s)";
553
+ }
554
+ if (typeof a.content === "string") change.body = a.content.slice(0, 4000);
555
+ else if (typeof a.diff === "string") change.body = a.diff.slice(0, 4000);
556
+ changes.push(change);
557
+ render();
558
+ }
559
+
560
+ var lastArgs = null;
561
+ window.addEventListener("message", function (event) {
562
+ var m = event.data;
563
+ if (!m || m.jsonrpc !== "2.0") return;
564
+ if (m.method === "ui/notifications/host-context-changed") { applyTheme(m.params); return; }
565
+ if (m.method === "ui/notifications/tool-input") { lastArgs = m.params && m.params.arguments; return; }
566
+ if (m.method === "ui/notifications/tool-result") {
567
+ addFromResult(payloadOf(m.params && m.params.result ? m.params.result : m.params), lastArgs);
568
+ lastArgs = null;
569
+ return;
570
+ }
571
+ if (m.method === "ping" && m.id !== undefined) { post({ jsonrpc: "2.0", id: m.id, result: {} }); return; }
572
+ if (m.method === "ui/resource-teardown" && m.id !== undefined) { post({ jsonrpc: "2.0", id: m.id, result: {} }); return; }
573
+ });
574
+
575
+ // Handshake: advertise pip so the host can dock this app.
576
+ var idc = 1; var pending = {};
577
+ function rpc(method, params) {
578
+ return new Promise(function (resolve, reject) {
579
+ var id = idc++; pending[id] = { resolve: resolve, reject: reject };
580
+ post({ jsonrpc: "2.0", id: id, method: method, params: params || {} });
581
+ });
582
+ }
583
+ window.addEventListener("message", function (event) {
584
+ var m = event.data;
585
+ if (!m || m.jsonrpc !== "2.0") return;
586
+ if (m.id !== undefined && (m.result !== undefined || m.error !== undefined)) {
587
+ var pr = pending[m.id]; if (!pr) return; delete pending[m.id];
588
+ if (m.error) pr.reject(new Error(m.error.message || "RPC error")); else pr.resolve(m.result);
589
+ }
590
+ });
591
+ rpc("ui/initialize", {
592
+ appInfo: { name: "devcanvas-diff", version: "1.0.0" },
593
+ appCapabilities: { availableDisplayModes: ["inline", "fullscreen", "pip"] },
594
+ protocolVersion: "${MCP_APPS_PROTOCOL_VERSION}"
595
+ }).then(function (result) {
596
+ applyTheme(result && result.hostContext);
597
+ notify("ui/notifications/initialized", {});
598
+ sendSize();
599
+ }).catch(function () { sendSize(); });
600
+ })();
601
+ </script>
602
+ </body>
603
+ </html>`;
604
+ //# sourceMappingURL=resources.js.map