flujo-ai 3.33.0 → 3.34.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 (298) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +240 -240
  3. package/.next/app-path-routes-manifest.json +14 -14
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +21 -21
  6. package/.next/react-loadable-manifest.json +3 -3
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_not-found.html +1 -1
  9. package/.next/server/app/_not-found.rsc +2 -2
  10. package/.next/server/app/api/approvals/[id]/route.js.nft.json +1 -1
  11. package/.next/server/app/api/approvals/[id]/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/approvals/route.js.nft.json +1 -1
  13. package/.next/server/app/api/approvals/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/backup/route.js.nft.json +1 -1
  15. package/.next/server/app/api/backup/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/browse/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/bugs/enhance/route.js.nft.json +1 -1
  18. package/.next/server/app/api/bugs/enhance/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/cwd/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/encryption/secure/route.js +1 -1
  21. package/.next/server/app/api/encryption/secure/route.js.nft.json +1 -1
  22. package/.next/server/app/api/encryption/secure/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/env/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/flow/[id]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/flow/[id]/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/flow/[id]/versions/[versionId]/route.js.nft.json +1 -1
  27. package/.next/server/app/api/flow/[id]/versions/[versionId]/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/flow/[id]/versions/route.js.nft.json +1 -1
  29. package/.next/server/app/api/flow/[id]/versions/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/flow/compile/route.js +1 -1
  31. package/.next/server/app/api/flow/compile/route.js.nft.json +1 -1
  32. package/.next/server/app/api/flow/compile/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/flow/generate/route.js +1 -1
  34. package/.next/server/app/api/flow/generate/route.js.nft.json +1 -1
  35. package/.next/server/app/api/flow/generate/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/flow/generator/route.js +25 -4
  37. package/.next/server/app/api/flow/generator/route.js.nft.json +1 -1
  38. package/.next/server/app/api/flow/generator/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/flow/improve/route.js +1 -1
  40. package/.next/server/app/api/flow/improve/route.js.nft.json +1 -1
  41. package/.next/server/app/api/flow/improve/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/flow/prompt-renderer/route.js.nft.json +1 -1
  43. package/.next/server/app/api/flow/prompt-renderer/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/flow/quick-chat/route.js.nft.json +1 -1
  45. package/.next/server/app/api/flow/quick-chat/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/flow/repair/route.js +1 -1
  47. package/.next/server/app/api/flow/repair/route.js.nft.json +1 -1
  48. package/.next/server/app/api/flow/repair/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/flow/route.js.nft.json +1 -1
  50. package/.next/server/app/api/flow/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/init/route.js +1 -1
  53. package/.next/server/app/api/init/route.js.nft.json +1 -1
  54. package/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/local-models/capability/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/local-models/pull/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/local-models/suggest/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/mcp/app-sandbox/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/mcp/cancel/route.js.nft.json +1 -1
  60. package/.next/server/app/api/mcp/cancel/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/mcp/oauth-capability/route.js.nft.json +1 -1
  62. package/.next/server/app/api/mcp/oauth-capability/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/mcp/servers/[name]/prompts/get/route.js.nft.json +1 -1
  64. package/.next/server/app/api/mcp/servers/[name]/prompts/get/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/mcp/servers/[name]/prompts/route.js.nft.json +1 -1
  66. package/.next/server/app/api/mcp/servers/[name]/prompts/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/mcp/servers/[name]/resources/read/route.js.nft.json +1 -1
  68. package/.next/server/app/api/mcp/servers/[name]/resources/read/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/mcp/servers/[name]/resources/route.js.nft.json +1 -1
  70. package/.next/server/app/api/mcp/servers/[name]/resources/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/mcp/servers/[name]/route.js.nft.json +1 -1
  72. package/.next/server/app/api/mcp/servers/[name]/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/mcp/servers/[name]/status/route.js.nft.json +1 -1
  74. package/.next/server/app/api/mcp/servers/[name]/status/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/mcp/servers/[name]/tools/[toolName]/route.js.nft.json +1 -1
  76. package/.next/server/app/api/mcp/servers/[name]/tools/[toolName]/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/mcp/servers/[name]/tools/route.js.nft.json +1 -1
  78. package/.next/server/app/api/mcp/servers/[name]/tools/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/mcp/servers/route.js.nft.json +1 -1
  80. package/.next/server/app/api/mcp/servers/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/mcp/test-connection/route.js.nft.json +1 -1
  82. package/.next/server/app/api/mcp/test-connection/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/mcp/test-connection/stream/route.js.nft.json +1 -1
  84. package/.next/server/app/api/mcp/test-connection/stream/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/mcp-registry/route.js.nft.json +1 -1
  86. package/.next/server/app/api/mcp-registry/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/mcp-registry/spotlight/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/model/[id]/route.js.nft.json +1 -1
  89. package/.next/server/app/api/model/[id]/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/model/provider/route.js.nft.json +1 -1
  91. package/.next/server/app/api/model/provider/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/model/route.js.nft.json +1 -1
  93. package/.next/server/app/api/model/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/model/test/route.js.nft.json +1 -1
  95. package/.next/server/app/api/model/test/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/oauth/initiate/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/oauth/reset/route.js.nft.json +1 -1
  99. package/.next/server/app/api/oauth/reset/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/packages/build/route.js +1 -1
  101. package/.next/server/app/api/packages/build/route.js.nft.json +1 -1
  102. package/.next/server/app/api/packages/build/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/packages/derive-secrets/route.js.nft.json +1 -1
  104. package/.next/server/app/api/packages/derive-secrets/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/packages/install/route.js.nft.json +1 -1
  106. package/.next/server/app/api/packages/install/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/packages/install/status/route.js.nft.json +1 -1
  108. package/.next/server/app/api/packages/install/status/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/packages/installed/route.js.nft.json +1 -1
  110. package/.next/server/app/api/packages/installed/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/packages/resolve/route.js +1 -1
  112. package/.next/server/app/api/packages/resolve/route.js.nft.json +1 -1
  113. package/.next/server/app/api/packages/resolve/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/packages/scan-targets/route.js.nft.json +1 -1
  115. package/.next/server/app/api/packages/scan-targets/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/packages/search/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/packages/uninstall/route.js.nft.json +1 -1
  118. package/.next/server/app/api/packages/uninstall/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/planned-executions/[id]/route.js.nft.json +1 -1
  120. package/.next/server/app/api/planned-executions/[id]/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/planned-executions/[id]/run/route.js.nft.json +1 -1
  122. package/.next/server/app/api/planned-executions/[id]/run/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/planned-executions/[id]/runs/route.js.nft.json +1 -1
  124. package/.next/server/app/api/planned-executions/[id]/runs/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/planned-executions/preview-schedule/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/planned-executions/reconcile/route.js +1 -1
  127. package/.next/server/app/api/planned-executions/reconcile/route.js.nft.json +1 -1
  128. package/.next/server/app/api/planned-executions/reconcile/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/planned-executions/route.js +1 -1
  130. package/.next/server/app/api/planned-executions/route.js.nft.json +1 -1
  131. package/.next/server/app/api/planned-executions/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/registry/auth/resend/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/registry/auth/reset/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/registry/auth/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/registry/feedback/route.js +1 -1
  136. package/.next/server/app/api/registry/feedback/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/registry/oauth/callback/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/registry/oauth/initiate/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/registry/packages/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/registry/publish/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/registry/settings/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/restore/route.js.nft.json +1 -1
  143. package/.next/server/app/api/restore/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/runs/active/route.js.nft.json +1 -1
  145. package/.next/server/app/api/runs/active/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/storage/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/telemetry/daily-active/route.js +1 -1
  148. package/.next/server/app/api/telemetry/daily-active/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/waves/route.js +1 -1
  151. package/.next/server/app/api/waves/route.js.nft.json +1 -1
  152. package/.next/server/app/api/waves/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/webhooks/[id]/route.js +1 -1
  154. package/.next/server/app/api/webhooks/[id]/route.js.nft.json +1 -1
  155. package/.next/server/app/api/webhooks/[id]/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/chat/page.js +1 -1
  157. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  158. package/.next/server/app/chat.html +1 -1
  159. package/.next/server/app/chat.rsc +3 -3
  160. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  161. package/.next/server/app/docs.html +1 -1
  162. package/.next/server/app/docs.rsc +2 -2
  163. package/.next/server/app/executions/page.js +2 -2
  164. package/.next/server/app/executions/page.js.nft.json +1 -1
  165. package/.next/server/app/executions/page_client-reference-manifest.js +1 -1
  166. package/.next/server/app/executions.html +1 -1
  167. package/.next/server/app/executions.rsc +3 -3
  168. package/.next/server/app/flows/page.js +3 -3
  169. package/.next/server/app/flows/page.js.nft.json +1 -1
  170. package/.next/server/app/flows/page_client-reference-manifest.js +1 -1
  171. package/.next/server/app/flows.html +1 -1
  172. package/.next/server/app/flows.rsc +3 -3
  173. package/.next/server/app/index.html +1 -1
  174. package/.next/server/app/index.rsc +3 -3
  175. package/.next/server/app/mcp/page.js +1 -1
  176. package/.next/server/app/mcp/page_client-reference-manifest.js +1 -1
  177. package/.next/server/app/mcp-flows/route.js +1 -1
  178. package/.next/server/app/mcp-flows/route.js.nft.json +1 -1
  179. package/.next/server/app/mcp-flows/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/mcp-proxy/[server]/route.js +1 -1
  181. package/.next/server/app/mcp-proxy/[server]/route.js.nft.json +1 -1
  182. package/.next/server/app/mcp-proxy/[server]/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/mcp.html +1 -1
  184. package/.next/server/app/mcp.rsc +3 -3
  185. package/.next/server/app/models/page.js +1 -1
  186. package/.next/server/app/models/page.js.nft.json +1 -1
  187. package/.next/server/app/models/page_client-reference-manifest.js +1 -1
  188. package/.next/server/app/packages/page.js +1 -1
  189. package/.next/server/app/packages/page_client-reference-manifest.js +1 -1
  190. package/.next/server/app/packages.html +1 -1
  191. package/.next/server/app/packages.rsc +3 -3
  192. package/.next/server/app/page.js +4 -2
  193. package/.next/server/app/page_client-reference-manifest.js +1 -1
  194. package/.next/server/app/settings/page.js +1 -1
  195. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  196. package/.next/server/app/settings.html +1 -1
  197. package/.next/server/app/settings.rsc +3 -3
  198. package/.next/server/app/v1/chat/completions/route.js.nft.json +1 -1
  199. package/.next/server/app/v1/chat/completions/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/v1/chat/conversations/[conversationId]/breakpoints/route.js.nft.json +1 -1
  201. package/.next/server/app/v1/chat/conversations/[conversationId]/breakpoints/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/v1/chat/conversations/[conversationId]/cancel/route.js.nft.json +1 -1
  203. package/.next/server/app/v1/chat/conversations/[conversationId]/cancel/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/continue/route.js.nft.json +1 -1
  205. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/continue/route_client-reference-manifest.js +1 -1
  206. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/step/route.js.nft.json +1 -1
  207. package/.next/server/app/v1/chat/conversations/[conversationId]/debug/step/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/v1/chat/conversations/[conversationId]/edit-state/route.js.nft.json +1 -1
  209. package/.next/server/app/v1/chat/conversations/[conversationId]/edit-state/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/v1/chat/conversations/[conversationId]/events/route.js.nft.json +1 -1
  211. package/.next/server/app/v1/chat/conversations/[conversationId]/events/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/v1/chat/conversations/[conversationId]/inject/route.js.nft.json +1 -1
  213. package/.next/server/app/v1/chat/conversations/[conversationId]/inject/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/v1/chat/conversations/[conversationId]/resources/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/v1/chat/conversations/[conversationId]/respond/route.js.nft.json +1 -1
  216. package/.next/server/app/v1/chat/conversations/[conversationId]/respond/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/v1/chat/conversations/[conversationId]/route.js.nft.json +1 -1
  218. package/.next/server/app/v1/chat/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/v1/chat/conversations/route.js.nft.json +1 -1
  220. package/.next/server/app/v1/chat/conversations/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/v1/chat/events/route.js.nft.json +1 -1
  222. package/.next/server/app/v1/chat/events/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/v1/models/route.js.nft.json +1 -1
  224. package/.next/server/app/v1/models/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/waves/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app/waves.html +1 -1
  227. package/.next/server/app/waves.rsc +2 -2
  228. package/.next/server/app-paths-manifest.json +14 -14
  229. package/.next/server/chunks/1114.js +1 -1
  230. package/.next/server/chunks/1226.js +1 -1
  231. package/.next/server/chunks/1227.js +1 -1
  232. package/.next/server/chunks/166.js +5 -5
  233. package/.next/server/chunks/1664.js +1 -1
  234. package/.next/server/chunks/227.js +1 -1
  235. package/.next/server/chunks/2273.js +1 -1
  236. package/.next/server/chunks/3717.js +1 -0
  237. package/.next/server/chunks/4466.js +1 -1
  238. package/.next/server/chunks/4551.js +1 -1
  239. package/.next/server/chunks/4771.js +1 -1
  240. package/.next/server/chunks/519.js +2 -0
  241. package/.next/server/chunks/5285.js +1 -0
  242. package/.next/server/chunks/5309.js +78 -0
  243. package/.next/server/chunks/544.js +4 -4
  244. package/.next/server/chunks/5463.js +1 -1
  245. package/.next/server/chunks/5544.js +4 -4
  246. package/.next/server/chunks/{5708.js → 6041.js} +1 -1
  247. package/.next/server/chunks/6747.js +42 -13
  248. package/.next/server/chunks/7628.js +1 -1
  249. package/.next/server/chunks/7630.js +11 -0
  250. package/.next/server/chunks/8284.js +42 -0
  251. package/.next/server/chunks/8645.js +1 -1
  252. package/.next/server/chunks/9235.js +25 -4
  253. package/.next/server/instrumentation.js.nft.json +1 -1
  254. package/.next/server/middleware-build-manifest.js +1 -1
  255. package/.next/server/middleware-manifest.json +1 -1
  256. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  257. package/.next/server/pages/404.html +1 -1
  258. package/.next/server/pages/500.html +1 -1
  259. package/.next/server/server-reference-manifest.js +1 -1
  260. package/.next/server/server-reference-manifest.json +1 -1
  261. package/.next/static/chunks/2005.4eea65c00d9a29cd.js +1 -0
  262. package/.next/static/chunks/3429-34fb1a84aed96703.js +1 -0
  263. package/.next/static/chunks/{2005-f9d38c39f10c321f.js → 4386-e9621d3c94969a68.js} +1 -1
  264. package/.next/static/chunks/4919-6c8a48e3cc642349.js +1 -0
  265. package/.next/static/chunks/7561-2b366ddcbc3cc0ec.js +1 -0
  266. package/.next/static/chunks/8404-5aa8ea49197b98b8.js +1 -0
  267. package/.next/static/chunks/{8650-41c2afc0eba37fb8.js → 8650-5294c6ed1173b014.js} +1 -1
  268. package/.next/static/chunks/app/chat/{page-1d100e5d974c919e.js → page-bc7807593b8b7394.js} +1 -1
  269. package/.next/static/chunks/app/executions/page-8296fd69c439ccee.js +1 -0
  270. package/.next/static/chunks/app/flows/page-87fb466e491fc068.js +1 -0
  271. package/.next/static/chunks/app/{layout-38b88f3b057f4852.js → layout-abed1f211e03152f.js} +1 -1
  272. package/.next/static/chunks/app/mcp/page-1648e6fde0c41461.js +1 -0
  273. package/.next/static/chunks/app/models/{page-808c0568ebc5e2c7.js → page-a5e2437356b06db8.js} +1 -1
  274. package/.next/static/chunks/app/packages/page-fba5696f33d9cdfb.js +1 -0
  275. package/.next/static/chunks/app/page-2f9da78a4891731a.js +1 -0
  276. package/.next/static/chunks/app/settings/page-2fc3a70bfd25c48b.js +1 -0
  277. package/.next/static/chunks/{webpack-dccb4f149ebdedcc.js → webpack-d5d737ff6a86674f.js} +1 -1
  278. package/.next/trace +10 -10
  279. package/README.md +16 -15
  280. package/package.json +5 -5
  281. package/.next/server/chunks/2985.js +0 -1
  282. package/.next/server/chunks/4366.js +0 -2
  283. package/.next/server/chunks/5040.js +0 -48
  284. package/.next/server/chunks/8187.js +0 -78
  285. package/.next/server/chunks/8851.js +0 -1
  286. package/.next/static/chunks/289-98f50bfcf833d661.js +0 -1
  287. package/.next/static/chunks/3089.df88f3b16898aad7.js +0 -1
  288. package/.next/static/chunks/8041-05830e887c133085.js +0 -1
  289. package/.next/static/chunks/8404-bfa9203e4296f3fb.js +0 -1
  290. package/.next/static/chunks/95-b9691d3cb15556dc.js +0 -1
  291. package/.next/static/chunks/app/executions/page-10ec7d58c7fbdd6f.js +0 -1
  292. package/.next/static/chunks/app/flows/page-9a78a2915268b2f8.js +0 -1
  293. package/.next/static/chunks/app/mcp/page-56b43b2f8752e9a5.js +0 -1
  294. package/.next/static/chunks/app/packages/page-af6ec89522915206.js +0 -1
  295. package/.next/static/chunks/app/page-30bf4293efa47a47.js +0 -1
  296. package/.next/static/chunks/app/settings/page-59ae1b658838f0bc.js +0 -1
  297. /package/.next/static/{jfb1GsjSGMjBmwfa3kM26 → Zz_Vh59XdtLIPcf-PxCpo}/_buildManifest.js +0 -0
  298. /package/.next/static/{jfb1GsjSGMjBmwfa3kM26 → Zz_Vh59XdtLIPcf-PxCpo}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><!--jfb1GsjSGMjBmwfa3kM26--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/b496025c9cd768cc.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/599369d853c61df7.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/30253fcfa8035221.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-dccb4f149ebdedcc.js"/><script src="/_next/static/chunks/4bd1b696-182b6b13bdad92e3.js" async=""></script><script src="/_next/static/chunks/1255-13d973e0759ea6d6.js" async=""></script><script src="/_next/static/chunks/main-app-2de821d2899bb841.js" async=""></script><script src="/_next/static/chunks/app/layout-38b88f3b057f4852.js" async=""></script><script src="/_next/static/chunks/1a258343-bcffff1604e3797c.js" async=""></script><script src="/_next/static/chunks/2678-c88052addfb0478a.js" async=""></script><script src="/_next/static/chunks/4754-5c62bb61142f82d1.js" async=""></script><script src="/_next/static/chunks/9244-3281f7fd02003a2c.js" async=""></script><script src="/_next/static/chunks/3392-6dd9ad3be66a7ce9.js" async=""></script><script src="/_next/static/chunks/981-dd289e60d81da0d1.js" async=""></script><script src="/_next/static/chunks/2003-f826c607d609d1fa.js" async=""></script><script src="/_next/static/chunks/488-7ab54d8ae2b4b550.js" async=""></script><script src="/_next/static/chunks/8470-72cf748472d4d501.js" async=""></script><script src="/_next/static/chunks/1675-773454288de4309d.js" async=""></script><script src="/_next/static/chunks/5418-45aa7e646ad024be.js" async=""></script><script src="/_next/static/chunks/7391-5a0abd837ba241f5.js" async=""></script><script src="/_next/static/chunks/app/waves/page-dc99a16141dd902b.js" async=""></script><title>FLUJO</title><meta name="description" content="A browser-based application for managing models, MCP servers, flows and chat interactions"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_246ccd __variable_c29908 antialiased"><div hidden=""><!--$--><!--/$--></div><!--$--><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><div>Loading theme...</div><!--/$--><!--/$--><script src="/_next/static/chunks/webpack-dccb4f149ebdedcc.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[72403,[\"7177\",\"static/chunks/app/layout-38b88f3b057f4852.js\"],\"default\"]\n3:I[9766,[],\"\"]\n4:I[98924,[],\"\"]\n5:I[81959,[],\"ClientPageRoot\"]\n6:I[12818,[\"3862\",\"static/chunks/1a258343-bcffff1604e3797c.js\",\"2678\",\"static/chunks/2678-c88052addfb0478a.js\",\"4754\",\"static/chunks/4754-5c62bb61142f82d1.js\",\"9244\",\"static/chunks/9244-3281f7fd02003a2c.js\",\"3392\",\"static/chunks/3392-6dd9ad3be66a7ce9.js\",\"981\",\"static/chunks/981-dd289e60d81da0d1.js\",\"2003\",\"static/chunks/2003-f826c607d609d1fa.js\",\"488\",\"static/chunks/488-7ab54d8ae2b4b550.js\",\"8470\",\"static/chunks/8470-72cf748472d4d501.js\",\"1675\",\"static/chunks/1675-773454288de4309d.js\",\"5418\",\"static/chunks/5418-45aa7e646ad024be.js\",\"7391\",\"static/chunks/7391-5a0abd837ba241f5.js\",\"603\",\"static/chunks/app/waves/page-dc99a16141dd902b.js\"],\"default\"]\n9:I[24431,[],\"OutletBoundary\"]\nb:I[15278,[],\"AsyncMetadataOutlet\"]\nd:I[24431,[],\"ViewportBoundary\"]\nf:I[24431,[],\"MetadataBoundary\"]\n10:\"$Sreact.suspense\"\n12:I[57150,[],\"\"]\n:HL[\"/_next/static/css/b496025c9cd768cc.css\",\"style\"]\n:HL[\"/_next/static/css/599369d853c61df7.css\",\"style\"]\n:HL[\"/_next/static/css/30253fcfa8035221.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"jfb1GsjSGMjBmwfa3kM26\",\"p\":\"\",\"c\":[\"\",\"waves\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"waves\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b496025c9cd768cc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/599369d853c61df7.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/30253fcfa8035221.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_246ccd __variable_c29908 antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}],{\"children\":[\"waves\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L5\",null,{\"Component\":\"$6\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@7\",\"$@8\"]}],null,[\"$\",\"$L9\",null,{\"children\":[\"$La\",[\"$\",\"$Lb\",null,{\"promise\":\"$@c\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],null],[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$10\",null,{\"fallback\":null,\"children\":\"$L11\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"7:{}\n8:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\na:null\n"])</script><script>self.__next_f.push([1,"c:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"FLUJO\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A browser-based application for managing models, MCP servers, flows and chat interactions\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"11:\"$c:metadata\"\n"])</script></body></html>
1
+ <!DOCTYPE html><!--Zz_Vh59XdtLIPcf_PxCpo--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/b496025c9cd768cc.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/599369d853c61df7.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/30253fcfa8035221.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d5d737ff6a86674f.js"/><script src="/_next/static/chunks/4bd1b696-182b6b13bdad92e3.js" async=""></script><script src="/_next/static/chunks/1255-13d973e0759ea6d6.js" async=""></script><script src="/_next/static/chunks/main-app-2de821d2899bb841.js" async=""></script><script src="/_next/static/chunks/app/layout-abed1f211e03152f.js" async=""></script><script src="/_next/static/chunks/1a258343-bcffff1604e3797c.js" async=""></script><script src="/_next/static/chunks/2678-c88052addfb0478a.js" async=""></script><script src="/_next/static/chunks/4754-5c62bb61142f82d1.js" async=""></script><script src="/_next/static/chunks/9244-3281f7fd02003a2c.js" async=""></script><script src="/_next/static/chunks/3392-6dd9ad3be66a7ce9.js" async=""></script><script src="/_next/static/chunks/981-dd289e60d81da0d1.js" async=""></script><script src="/_next/static/chunks/2003-f826c607d609d1fa.js" async=""></script><script src="/_next/static/chunks/488-7ab54d8ae2b4b550.js" async=""></script><script src="/_next/static/chunks/8470-72cf748472d4d501.js" async=""></script><script src="/_next/static/chunks/1675-773454288de4309d.js" async=""></script><script src="/_next/static/chunks/5418-45aa7e646ad024be.js" async=""></script><script src="/_next/static/chunks/7391-5a0abd837ba241f5.js" async=""></script><script src="/_next/static/chunks/app/waves/page-dc99a16141dd902b.js" async=""></script><title>FLUJO</title><meta name="description" content="A browser-based application for managing models, MCP servers, flows and chat interactions"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_246ccd __variable_c29908 antialiased"><div hidden=""><!--$--><!--/$--></div><!--$--><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><div>Loading theme...</div><!--/$--><!--/$--><script src="/_next/static/chunks/webpack-d5d737ff6a86674f.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[72403,[\"7177\",\"static/chunks/app/layout-abed1f211e03152f.js\"],\"default\"]\n3:I[9766,[],\"\"]\n4:I[98924,[],\"\"]\n5:I[81959,[],\"ClientPageRoot\"]\n6:I[12818,[\"3862\",\"static/chunks/1a258343-bcffff1604e3797c.js\",\"2678\",\"static/chunks/2678-c88052addfb0478a.js\",\"4754\",\"static/chunks/4754-5c62bb61142f82d1.js\",\"9244\",\"static/chunks/9244-3281f7fd02003a2c.js\",\"3392\",\"static/chunks/3392-6dd9ad3be66a7ce9.js\",\"981\",\"static/chunks/981-dd289e60d81da0d1.js\",\"2003\",\"static/chunks/2003-f826c607d609d1fa.js\",\"488\",\"static/chunks/488-7ab54d8ae2b4b550.js\",\"8470\",\"static/chunks/8470-72cf748472d4d501.js\",\"1675\",\"static/chunks/1675-773454288de4309d.js\",\"5418\",\"static/chunks/5418-45aa7e646ad024be.js\",\"7391\",\"static/chunks/7391-5a0abd837ba241f5.js\",\"603\",\"static/chunks/app/waves/page-dc99a16141dd902b.js\"],\"default\"]\n9:I[24431,[],\"OutletBoundary\"]\nb:I[15278,[],\"AsyncMetadataOutlet\"]\nd:I[24431,[],\"ViewportBoundary\"]\nf:I[24431,[],\"MetadataBoundary\"]\n10:\"$Sreact.suspense\"\n12:I[57150,[],\"\"]\n:HL[\"/_next/static/css/b496025c9cd768cc.css\",\"style\"]\n:HL[\"/_next/static/css/599369d853c61df7.css\",\"style\"]\n:HL[\"/_next/static/css/30253fcfa8035221.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"Zz_Vh59XdtLIPcf-PxCpo\",\"p\":\"\",\"c\":[\"\",\"waves\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"waves\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b496025c9cd768cc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/599369d853c61df7.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/30253fcfa8035221.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_246ccd __variable_c29908 antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}],{\"children\":[\"waves\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L5\",null,{\"Component\":\"$6\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@7\",\"$@8\"]}],null,[\"$\",\"$L9\",null,{\"children\":[\"$La\",[\"$\",\"$Lb\",null,{\"promise\":\"$@c\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Ld\",null,{\"children\":\"$Le\"}],null],[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$10\",null,{\"fallback\":null,\"children\":\"$L11\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"7:{}\n8:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\na:null\n"])</script><script>self.__next_f.push([1,"c:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"FLUJO\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A browser-based application for managing models, MCP servers, flows and chat interactions\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"11:\"$c:metadata\"\n"])</script></body></html>
@@ -1,5 +1,5 @@
1
1
  1:"$Sreact.fragment"
2
- 2:I[72403,["7177","static/chunks/app/layout-38b88f3b057f4852.js"],"default"]
2
+ 2:I[72403,["7177","static/chunks/app/layout-abed1f211e03152f.js"],"default"]
3
3
  3:I[9766,[],""]
4
4
  4:I[98924,[],""]
5
5
  5:I[81959,[],"ClientPageRoot"]
@@ -13,7 +13,7 @@ f:I[24431,[],"MetadataBoundary"]
13
13
  :HL["/_next/static/css/b496025c9cd768cc.css","style"]
14
14
  :HL["/_next/static/css/599369d853c61df7.css","style"]
15
15
  :HL["/_next/static/css/30253fcfa8035221.css","style"]
16
- 0:{"P":null,"b":"jfb1GsjSGMjBmwfa3kM26","p":"","c":["","waves"],"i":false,"f":[[["",{"children":["waves",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b496025c9cd768cc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/599369d853c61df7.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/30253fcfa8035221.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 antialiased","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["waves",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","searchParams":{},"params":{},"promises":["$@7","$@8"]}],null,["$","$L9",null,{"children":["$La",["$","$Lb",null,{"promise":"$@c"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Ld",null,{"children":"$Le"}],null],["$","$Lf",null,{"children":["$","div",null,{"hidden":true,"children":["$","$10",null,{"fallback":null,"children":"$L11"}]}]}]]}],false]],"m":"$undefined","G":["$12",[]],"s":false,"S":true}
16
+ 0:{"P":null,"b":"Zz_Vh59XdtLIPcf-PxCpo","p":"","c":["","waves"],"i":false,"f":[[["",{"children":["waves",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b496025c9cd768cc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/599369d853c61df7.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/30253fcfa8035221.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 antialiased","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":["waves",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","searchParams":{},"params":{},"promises":["$@7","$@8"]}],null,["$","$L9",null,{"children":["$La",["$","$Lb",null,{"promise":"$@c"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Ld",null,{"children":"$Le"}],null],["$","$Lf",null,{"children":["$","div",null,{"hidden":true,"children":["$","$10",null,{"fallback":null,"children":"$L11"}]}]}]]}],false]],"m":"$undefined","G":["$12",[]],"s":false,"S":true}
17
17
  7:{}
18
18
  8:"$0:f:0:1:2:children:2:children:1:props:children:0:props:params"
19
19
  e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -4,25 +4,25 @@
4
4
  "/api/backup/route": "app/api/backup/route.js",
5
5
  "/api/browse/route": "app/api/browse/route.js",
6
6
  "/api/bugs/enhance/route": "app/api/bugs/enhance/route.js",
7
+ "/_not-found/page": "app/_not-found/page.js",
7
8
  "/api/cwd/route": "app/api/cwd/route.js",
8
9
  "/api/encryption/secure/route": "app/api/encryption/secure/route.js",
9
10
  "/api/env/route": "app/api/env/route.js",
10
11
  "/api/flow/[id]/route": "app/api/flow/[id]/route.js",
11
12
  "/api/flow/[id]/versions/[versionId]/route": "app/api/flow/[id]/versions/[versionId]/route.js",
12
13
  "/api/flow/[id]/versions/route": "app/api/flow/[id]/versions/route.js",
13
- "/_not-found/page": "app/_not-found/page.js",
14
14
  "/api/flow/compile/route": "app/api/flow/compile/route.js",
15
- "/api/flow/generator/route": "app/api/flow/generator/route.js",
16
15
  "/api/flow/generate/route": "app/api/flow/generate/route.js",
16
+ "/api/flow/generator/route": "app/api/flow/generator/route.js",
17
17
  "/api/flow/improve/route": "app/api/flow/improve/route.js",
18
18
  "/api/flow/prompt-renderer/route": "app/api/flow/prompt-renderer/route.js",
19
19
  "/api/flow/quick-chat/route": "app/api/flow/quick-chat/route.js",
20
- "/api/flow/repair/route": "app/api/flow/repair/route.js",
21
20
  "/api/flow/route": "app/api/flow/route.js",
21
+ "/api/flow/repair/route": "app/api/flow/repair/route.js",
22
22
  "/api/init/route": "app/api/init/route.js",
23
23
  "/api/git/route": "app/api/git/route.js",
24
- "/api/mcp-registry/spotlight/route": "app/api/mcp-registry/spotlight/route.js",
25
24
  "/api/mcp-registry/route": "app/api/mcp-registry/route.js",
25
+ "/api/mcp-registry/spotlight/route": "app/api/mcp-registry/spotlight/route.js",
26
26
  "/api/mcp/app-sandbox/route": "app/api/mcp/app-sandbox/route.js",
27
27
  "/api/mcp/cancel/route": "app/api/mcp/cancel/route.js",
28
28
  "/api/mcp/servers/[name]/prompts/get/route": "app/api/mcp/servers/[name]/prompts/get/route.js",
@@ -35,13 +35,14 @@
35
35
  "/api/mcp/servers/[name]/tools/route": "app/api/mcp/servers/[name]/tools/route.js",
36
36
  "/api/mcp/servers/route": "app/api/mcp/servers/route.js",
37
37
  "/api/mcp/test-connection/route": "app/api/mcp/test-connection/route.js",
38
- "/api/model/provider/route": "app/api/model/provider/route.js",
39
38
  "/api/model/[id]/route": "app/api/model/[id]/route.js",
39
+ "/api/model/provider/route": "app/api/model/provider/route.js",
40
40
  "/api/model/route": "app/api/model/route.js",
41
41
  "/api/model/test/route": "app/api/model/test/route.js",
42
42
  "/api/oauth/callback/route": "app/api/oauth/callback/route.js",
43
- "/api/oauth/initiate/route": "app/api/oauth/initiate/route.js",
44
43
  "/api/oauth/reset/route": "app/api/oauth/reset/route.js",
44
+ "/api/oauth/initiate/route": "app/api/oauth/initiate/route.js",
45
+ "/api/packages/build/route": "app/api/packages/build/route.js",
45
46
  "/api/packages/derive-secrets/route": "app/api/packages/derive-secrets/route.js",
46
47
  "/api/packages/install/route": "app/api/packages/install/route.js",
47
48
  "/api/packages/install/status/route": "app/api/packages/install/status/route.js",
@@ -51,14 +52,13 @@
51
52
  "/api/packages/search/route": "app/api/packages/search/route.js",
52
53
  "/api/packages/uninstall/route": "app/api/packages/uninstall/route.js",
53
54
  "/api/planned-executions/[id]/route": "app/api/planned-executions/[id]/route.js",
54
- "/api/packages/build/route": "app/api/packages/build/route.js",
55
55
  "/api/planned-executions/[id]/run/route": "app/api/planned-executions/[id]/run/route.js",
56
56
  "/api/planned-executions/[id]/runs/route": "app/api/planned-executions/[id]/runs/route.js",
57
57
  "/api/planned-executions/preview-schedule/route": "app/api/planned-executions/preview-schedule/route.js",
58
58
  "/api/planned-executions/reconcile/route": "app/api/planned-executions/reconcile/route.js",
59
59
  "/api/planned-executions/route": "app/api/planned-executions/route.js",
60
- "/api/registry/auth/resend/route": "app/api/registry/auth/resend/route.js",
61
60
  "/api/registry/auth/reset/route": "app/api/registry/auth/reset/route.js",
61
+ "/api/registry/auth/resend/route": "app/api/registry/auth/resend/route.js",
62
62
  "/api/registry/auth/route": "app/api/registry/auth/route.js",
63
63
  "/api/registry/feedback/route": "app/api/registry/feedback/route.js",
64
64
  "/api/registry/oauth/callback/route": "app/api/registry/oauth/callback/route.js",
@@ -67,15 +67,15 @@
67
67
  "/api/registry/publish/route": "app/api/registry/publish/route.js",
68
68
  "/api/registry/settings/route": "app/api/registry/settings/route.js",
69
69
  "/api/restore/route": "app/api/restore/route.js",
70
- "/api/runs/active/route": "app/api/runs/active/route.js",
71
70
  "/api/storage/route": "app/api/storage/route.js",
71
+ "/api/runs/active/route": "app/api/runs/active/route.js",
72
72
  "/api/waves/route": "app/api/waves/route.js",
73
73
  "/api/webhooks/[id]/route": "app/api/webhooks/[id]/route.js",
74
74
  "/v1/chat/completions/route": "app/v1/chat/completions/route.js",
75
75
  "/v1/chat/conversations/[conversationId]/breakpoints/route": "app/v1/chat/conversations/[conversationId]/breakpoints/route.js",
76
76
  "/v1/chat/conversations/[conversationId]/cancel/route": "app/v1/chat/conversations/[conversationId]/cancel/route.js",
77
- "/v1/chat/conversations/[conversationId]/debug/continue/route": "app/v1/chat/conversations/[conversationId]/debug/continue/route.js",
78
77
  "/v1/chat/conversations/[conversationId]/debug/step/route": "app/v1/chat/conversations/[conversationId]/debug/step/route.js",
78
+ "/v1/chat/conversations/[conversationId]/debug/continue/route": "app/v1/chat/conversations/[conversationId]/debug/continue/route.js",
79
79
  "/v1/chat/conversations/[conversationId]/edit-state/route": "app/v1/chat/conversations/[conversationId]/edit-state/route.js",
80
80
  "/v1/chat/conversations/[conversationId]/inject/route": "app/v1/chat/conversations/[conversationId]/inject/route.js",
81
81
  "/v1/chat/conversations/[conversationId]/resources/route": "app/v1/chat/conversations/[conversationId]/resources/route.js",
@@ -85,8 +85,8 @@
85
85
  "/v1/models/route": "app/v1/models/route.js",
86
86
  "/api/local-models/capability/route": "app/api/local-models/capability/route.js",
87
87
  "/api/local-models/pull/route": "app/api/local-models/pull/route.js",
88
- "/api/local-models/suggest/route": "app/api/local-models/suggest/route.js",
89
88
  "/api/mcp/oauth-capability/route": "app/api/mcp/oauth-capability/route.js",
89
+ "/api/local-models/suggest/route": "app/api/local-models/suggest/route.js",
90
90
  "/api/mcp/test-connection/stream/route": "app/api/mcp/test-connection/stream/route.js",
91
91
  "/api/telemetry/daily-active/route": "app/api/telemetry/daily-active/route.js",
92
92
  "/api/update/route": "app/api/update/route.js",
@@ -94,14 +94,14 @@
94
94
  "/mcp-proxy/[server]/route": "app/mcp-proxy/[server]/route.js",
95
95
  "/v1/chat/conversations/[conversationId]/events/route": "app/v1/chat/conversations/[conversationId]/events/route.js",
96
96
  "/v1/chat/events/route": "app/v1/chat/events/route.js",
97
- "/chat/page": "app/chat/page.js",
98
97
  "/docs/page": "app/docs/page.js",
99
98
  "/executions/page": "app/executions/page.js",
99
+ "/chat/page": "app/chat/page.js",
100
100
  "/flows/page": "app/flows/page.js",
101
- "/mcp/page": "app/mcp/page.js",
102
- "/packages/page": "app/packages/page.js",
103
101
  "/page": "app/page.js",
104
102
  "/settings/page": "app/settings/page.js",
103
+ "/mcp/page": "app/mcp/page.js",
105
104
  "/waves/page": "app/waves/page.js",
105
+ "/packages/page": "app/packages/page.js",
106
106
  "/models/page": "app/models/page.js"
107
107
  }
@@ -1 +1 @@
1
- "use strict";exports.id=1114,exports.ids=[1114],exports.modules={91114:(a,b,c)=>{c.d(b,{internalCallToolFor:()=>g,internalToolDefinitionsFor:()=>f});var d=c(92018),e=c(94749);async function f(a){switch(a){case d._:{let{internalToolDefinitions:a}=await Promise.all([c.e(4551),c.e(8187)]).then(c.bind(c,8187));return a()}case e.K3:{let{filesystemToolDefinitions:a}=await Promise.all([c.e(9724),c.e(94)]).then(c.bind(c,50094));return a()}case e.PA:{let{bashToolDefinitions:a}=await c.e(166).then(c.bind(c,40166));return a()}default:return[]}}async function g(a,b,f,h,i,j="host"){switch(b){case d._:{let{internalCallTool:b}=await Promise.all([c.e(4551),c.e(8187)]).then(c.bind(c,8187));return b(a,f,h,j)}case e.K3:{let{filesystemCallTool:a}=await Promise.all([c.e(9724),c.e(94)]).then(c.bind(c,50094));return a(f,h,i)}case e.PA:{let{bashCallTool:a}=await c.e(166).then(c.bind(c,40166));return a(f,h,i)}default:return{content:[{type:"text",text:`Unknown built-in server: ${b}`}],isError:!0}}}}};
1
+ "use strict";exports.id=1114,exports.ids=[1114],exports.modules={91114:(a,b,c)=>{c.d(b,{internalCallToolFor:()=>g,internalToolDefinitionsFor:()=>f});var d=c(92018),e=c(94749);async function f(a){switch(a){case d._:{let{internalToolDefinitions:a}=await Promise.all([c.e(4551),c.e(5309)]).then(c.bind(c,85309));return a()}case e.K3:{let{filesystemToolDefinitions:a}=await Promise.all([c.e(9724),c.e(94)]).then(c.bind(c,50094));return a()}case e.PA:{let{bashToolDefinitions:a}=await c.e(166).then(c.bind(c,40166));return a()}default:return[]}}async function g(a,b,f,h,i,j="host"){switch(b){case d._:{let{internalCallTool:b}=await Promise.all([c.e(4551),c.e(5309)]).then(c.bind(c,85309));return b(a,f,h,j)}case e.K3:{let{filesystemCallTool:a}=await Promise.all([c.e(9724),c.e(94)]).then(c.bind(c,50094));return a(f,h,i)}case e.PA:{let{bashCallTool:a}=await c.e(166).then(c.bind(c,40166));return a(f,h,i)}default:return{content:[{type:"text",text:`Unknown built-in server: ${b}`}],isError:!0}}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=1226,exports.ids=[1226],exports.modules={81226:(a,b,c)=>{c.d(b,{A_:()=>h,FH:()=>w,Zn:()=>x,dM:()=>v,lk:()=>i,pX:()=>u});var d=c(32524),e=c(49181),f=c(67512),g=c(89224);let h=3,i=8;function j(a,b,c,d){return"number"!=typeof a||Number.isNaN(a)?d:Math.max(b,Math.min(c,Math.floor(a)))}let k={type:"arrowclosed",width:20,height:20,color:"#1976d2"},l={stroke:"#1976d2",strokeWidth:2},m={type:"arrowclosed",width:20,height:20,color:"#009688"},n={stroke:"#009688",strokeWidth:2},o=new Set(["full-history","latest-message","isolated"]),p=new Set(["steps","final-only"]),q=new Set(["full-conversation","latest-message"]);function r(a,b={}){let{keepPills:c=!1,wiredServers:d=new Set,validHandoffNames:f=new Set}=b,g=(0,e.A$)(a);if(0===g.length)return{text:a,stripped:!1,unresolved:[]};let h="",i=0,j=!1,k=[];for(let b of g){h+=a.slice(i,b.index),i=b.index+b.fullMatch.length;let e=!1;c&&(e="handoff"===b.server?f.has(b.name):d.has(b.server)),e?h+=b.fullMatch:(h+=b.name,j=!0,c&&k.push(b.fullMatch))}return{text:h+=a.slice(i),stripped:j,unresolved:k}}function s(a,b,c){let d=b.filter(b=>b.from===a).map(a=>c.get(a.to)).filter(Boolean).map(a=>({id:a.key??"",label:a.label,type:a.type}));return new Set((0,g.E9)(d).values())}function t(a,b){if(b.some(b=>b.id===a))return a;let c=a.toLowerCase(),d=b.find(a=>a.name.toLowerCase()===c);return d?d.id:null}function u(a,b,c,d){let e=`${a.type}-bottom`,f=`${b.type}-top`;return{id:`${a.id}:${e}->${b.id}:${f}`,source:a.id,sourceHandle:e,target:b.id,targetHandle:f,type:"custom",data:{edgeType:"standard",...c?{bidirectional:!0}:{},...d?{condition:d}:{}},animated:!0}}function v(a,b={},c={}){let e=[],g=(a,b,c)=>e.push({severity:"error",code:a,message:b,nodeKey:c}),w=(a,b,c)=>e.push({severity:"warning",code:a,message:b,nodeKey:c}),x=b.models??[],y=new Set((b.servers??[]).map(a=>a.name)),z=b.serverTools??{},A=j(c.maxDepth,0,h,h),B=j(c.maxFlows,1,i,i),C=[],D=[...(b.flows??[]).map(a=>a.name)],E=[],F=0;var G=function a(e,h,i){let v=Array.isArray(e?.nodes)?e.nodes:[],G=Array.isArray(e?.edges)?e.edges:[],H=function(a,b){let c=(a??"").trim().replace(/[^\w-]+/g,"_").replace(/^_+|_+$/g,"");c||(c="generated_flow");let d=new Set(b.map(a=>a.toLowerCase()));if(!d.has(c.toLowerCase()))return c;for(let a=2;;a++){let b=`${c}_${a}`;if(!d.has(b.toLowerCase()))return b}}(e?.name,D);D.push(H),F++;let I=(0,d.A)(),J=[...i,H],L=new Map,M=[],N=[],O=new Map(v.filter(a=>a?.key&&"string"==typeof a.key).map(a=>[a.key,a]));for(let e of v){let f=e?.key;if(!f||"string"!=typeof f){g("node-missing-key",'A node is missing its "key" — every node needs a unique key.');continue}if(L.has(f)){g("node-duplicate-key",`Duplicate node key "${f}" — keys must be unique; the later node was dropped.`,f);continue}let i=e.type;if("mcp"===i){g("mcp-node-not-allowed",`Node "${f}": do not emit "mcp" nodes — attach servers to a process node via its "servers" list instead.`,f);continue}if("start"!==i&&"process"!==i&&"finish"!==i&&"subflow"!==i&&"resource"!==i&&"signal"!==i){g("unknown-node-type",`Node "${f}" has unknown type "${String(i)}".`,f);continue}let k={},l="string"==typeof e.prompt?e.prompt:void 0;if("start"===i){let{text:a,stripped:b,unresolved:d}=r(l??"",c.keepPills?{keepPills:!0,wiredServers:new Set((e.servers??[]).map(a=>a.name)),validHandoffNames:s(f,G,O)}:{});for(let a of(b&&!c.keepPills&&w("pill-stripped",`Node "${f}": binding pills are not supported in generated prompts and were replaced with plain names.`,f),d))w("pill-unresolved",`Node "${f}": pill "${a}" not resolved against wired servers — stripped.`,f);k.promptTemplate=a}else if("process"===i){let{text:a,stripped:b,unresolved:d}=r(l??"",c.keepPills?{keepPills:!0,wiredServers:new Set((e.servers??[]).map(a=>a.name)),validHandoffNames:s(f,G,O)}:{});for(let a of(b&&!c.keepPills&&w("pill-stripped",`Node "${f}": binding pills are not supported in generated prompts and were replaced with plain names.`,f),d))w("pill-unresolved",`Node "${f}": pill "${a}" not resolved against wired servers — stripped.`,f);if(k.promptTemplate=a,e.model){let a=function(a,b){if(b.some(b=>b.id===a))return a;let c=a.toLowerCase(),d=b.find(a=>a.displayName?.toLowerCase()===c);if(d)return d.id;let e=b.find(a=>a.name?.toLowerCase()===c);return e?e.id:null}(e.model,x);a?k.boundModel=a:(k.boundModel=e.model,w("model-unresolved",`Node "${f}": model "${e.model}" does not match any configured model (by id, display name, or name).`,f))}void 0!==e.inputMode&&(o.has(e.inputMode)?(k.inputMode=e.inputMode,"isolated"===e.inputMode&&"string"==typeof e.isolatedPrompt&&(k.isolatedPrompt=e.isolatedPrompt)):w("invalid-input-mode",`Node "${f}": inputMode "${String(e.inputMode)}" is not valid (full-history | latest-message | isolated); omitted.`,f)),"boolean"==typeof e.allowCallerPrompt&&(k.allowCallerPrompt=e.allowCallerPrompt),void 0!==e.outputMode&&(q.has(e.outputMode)?k.outputMode=e.outputMode:w("invalid-output-mode",`Node "${f}": outputMode "${String(e.outputMode)}" is not valid on a process node (full-conversation | latest-message); omitted.`,f)),void 0!==e.maxTurns&&("number"!=typeof e.maxTurns||Number.isNaN(e.maxTurns)?w("invalid-max-turns",`Node "${f}": maxTurns "${String(e.maxTurns)}" is not a number; omitted.`,f):k.maxTurns=j(e.maxTurns,1,1e3,1)),"boolean"==typeof e.excludeModelPrompt&&(k.excludeModelPrompt=e.excludeModelPrompt),"boolean"==typeof e.excludeStartNodePrompt&&(k.excludeStartNodePrompt=e.excludeStartNodePrompt),"boolean"==typeof e.excludeSystemPrompt&&(k.excludeSystemPrompt=e.excludeSystemPrompt),Array.isArray(e.allowedTools)&&(k.allowedTools=e.allowedTools.filter(a=>"string"==typeof a&&a)),"string"==typeof e.captureVariable&&e.captureVariable.trim()&&(k.captureVariable=e.captureVariable.trim()),"string"==typeof e.captureResource&&e.captureResource.trim()&&w("process-capture-resource-unsupported",`Node "${f}": process captureResource is not supported; connect the process to a Resource node so it can call write_resource.`,f),"string"==typeof e.captureKv&&e.captureKv.trim()&&(k.captureKv=e.captureKv.trim())}else if("subflow"===i){if(function(c,d,e,f,h){let i=Array.isArray(c.parallelFlows)&&c.parallelFlows.length>0,j=Array.isArray(c.parallelSubflowSpecs)&&c.parallelSubflowSpecs.length>0,k="string"==typeof c.parallelFlowsVariable?c.parallelFlowsVariable.trim():"";if([void 0!==c.flow&&null!==c.flow?"flow":null,void 0!==c.subflowSpec&&null!==c.subflowSpec?"subflowSpec":null,i?"parallelFlows":null,j?"parallelSubflowSpecs":null,void 0!==c.generateSubflow&&null!==c.generateSubflow?"generateSubflow":null].filter(Boolean).length>1&&w("subflow-multiple-sources",`Node "${d}": a subflow node should have only one target source ("flow", "subflowSpec", "parallelFlows", "parallelSubflowSpecs", or "generateSubflow"); applying precedence flow > subflowSpec > parallelFlows > parallelSubflowSpecs > generateSubflow.`,d),!0===c.mapOverList){let a=void 0!==c.flow&&null!==c.flow||void 0!==c.subflowSpec&&null!==c.subflowSpec;(i||j)&&g("subflow-map-and-parallel",`Node "${d}": "mapOverList" runs a SINGLE child once per item and cannot be combined with "parallelFlows"/"parallelSubflowSpecs".`,d),a?(h.mapOverList=!0,void 0!==c.itemSplit&&("json-array"===c.itemSplit||"lines"===c.itemSplit?h.itemSplit=c.itemSplit:w("invalid-item-split",`Node "${d}": itemSplit "${String(c.itemSplit)}" is not valid (json-array | lines); using json-array.`,d)),!0===c.sequential&&(h.sequential=!0),K(c,h)):g("subflow-map-no-child",`Node "${d}": "mapOverList" needs a single child ("flow" or "subflowSpec") to run once per item.`,d)}let l=Array.isArray(c.spawnBriefs)?c.spawnBriefs.filter(a=>"string"==typeof a&&""!==a.trim()):[];if(l.length>0){let a=void 0!==c.flow&&null!==c.flow||void 0!==c.subflowSpec&&null!==c.subflowSpec;i||j?g("subflow-spawn-and-parallel",`Node "${d}": "spawnBriefs" runs a SINGLE child once per brief and cannot be combined with "parallelFlows"/"parallelSubflowSpecs".`,d):!0===c.mapOverList?g("subflow-spawn-and-map",`Node "${d}": "spawnBriefs" cannot be combined with "mapOverList"; use one lane source or the other.`,d):a?(h.spawnBriefs=l,K(c,h)):g("subflow-spawn-no-child",`Node "${d}": "spawnBriefs" needs a single child ("flow" or "subflowSpec") to spawn once per brief.`,d)}if(k&&(!0===c.mapOverList?g("subflow-map-and-parallel-var",`Node "${d}": "parallelFlowsVariable" (dynamic fan-out) cannot be combined with "mapOverList".`,d):h.parallelSubflowIdsVar=k),c.flow){if(f.some(a=>a.toLowerCase()===c.flow.toLowerCase()))return g("subflow-cycle",`Node "${d}": flow "${c.flow}" refers to an ancestor flow, which would create a cycle.`,d);let a=t(c.flow,[...b.flows??[],...E]);return a?h.subflowId=a:g("subflow-unresolved",`Node "${d}": flow "${c.flow}" does not match any existing flow (by id or name).`,d)}if(c.subflowSpec){if(e+1>A)return g("subflow-too-deep",`Node "${d}": nested subflows may not go deeper than ${A} level(s); this inline subflow was not compiled.`,d);if(F>=B)return g("subflow-too-many",`Node "${d}": compiling this inline subflow would exceed the maximum of ${B} flows in one bundle; it was not compiled.`,d);let b=a(c.subflowSpec,e+1,f);return b?h.subflowId=b.id:g("subflow-child-empty",`Node "${d}": the inline "subflowSpec" produced no usable flow.`,d)}if(i){let a=[];for(let e of c.parallelFlows){if("string"!=typeof e||!e){g("parallel-flow-invalid",`Node "${d}": a "parallelFlows" entry is missing or not a string.`,d);continue}if(f.some(a=>a.toLowerCase()===e.toLowerCase())){g("subflow-cycle",`Node "${d}": parallel flow "${e}" refers to an ancestor flow, which would create a cycle.`,d);continue}let c=t(e,[...b.flows??[],...E]);c?a.includes(c)||a.push(c):g("parallel-flow-unresolved",`Node "${d}": parallel flow "${e}" does not match any existing flow (by id or name).`,d)}a.length>0?(h.parallelSubflowIds=a,K(c,h)):g("parallel-empty",`Node "${d}": "parallelFlows" resolved to no runnable lanes.`,d);return}if(j){let b=[];for(let h of c.parallelSubflowSpecs){if(!h||"object"!=typeof h){g("parallel-spec-invalid",`Node "${d}": a "parallelSubflowSpecs" entry is not a FlowSpec object.`,d);continue}if(e+1>A){g("subflow-too-deep",`Node "${d}": nested subflows may not go deeper than ${A} level(s); a parallel inline subflow was not compiled.`,d);continue}if(F>=B){g("subflow-too-many",`Node "${d}": compiling a parallel inline subflow would exceed the maximum of ${B} flows in one bundle; it was not compiled.`,d);continue}let c=a(h,e+1,f);c?b.push(c.id):g("subflow-child-empty",`Node "${d}": a "parallelSubflowSpecs" entry produced no usable flow.`,d)}b.length>0?(h.parallelSubflowIds=b,K(c,h)):g("parallel-empty",`Node "${d}": "parallelSubflowSpecs" produced no runnable lanes.`,d);return}k&&h.parallelSubflowIdsVar?K(c,h):void 0!==c.generateSubflow&&null!==c.generateSubflow?g("subflow-generate-unsupported",`Node "${d}": "generateSubflow" is only available through the AI flow generator. Use "subflowSpec" for deterministic nested authoring, or "flow" to reference an existing flow.`,d):g("subflow-missing-flow",`Node "${d}": subflow nodes need a "flow" (existing flow), a "subflowSpec" (inline child), "parallelFlows"/"parallelSubflowSpecs" (concurrent children), or "generateSubflow".`,d)}(e,f,h,J,k),void 0!==e.inputMode&&(o.has(e.inputMode)?k.inputMode=e.inputMode:w("invalid-input-mode",`Node "${f}": inputMode "${String(e.inputMode)}" is not valid (full-history | latest-message | isolated); omitted.`,f)),void 0!==e.outputMode&&(p.has(e.outputMode)?k.outputMode=e.outputMode:w("invalid-output-mode",`Node "${f}": outputMode "${String(e.outputMode)}" is not valid (steps | final-only); omitted.`,f)),void 0!==l){let{text:a,stripped:b,unresolved:d}=r(l,c.keepPills?{keepPills:!0}:{});for(let a of(b&&!c.keepPills&&w("pill-stripped",`Node "${f}": binding pills are not supported in generated prompts and were replaced with plain names.`,f),d))w("pill-unresolved",`Node "${f}": pill "${a}" not resolved against wired servers — stripped.`,f);k.promptTemplate=a}"boolean"==typeof e.allowCallerPrompt&&(k.allowCallerPrompt=e.allowCallerPrompt),"boolean"==typeof e.allowCallerFanout&&(k.allowCallerFanout=e.allowCallerFanout),"string"==typeof e.captureVariable&&e.captureVariable.trim()&&(k.captureVariable=e.captureVariable.trim()),"string"==typeof e.captureResource&&e.captureResource.trim()&&(k.captureResource=e.captureResource.trim()),"string"==typeof e.captureKv&&e.captureKv.trim()&&(k.captureKv=e.captureKv.trim())}else if("resource"===i){let a="string"==typeof e.runName?e.runName.trim():"",b="string"==typeof e.server?e.server.trim():"",c="string"==typeof e.uri?e.uri.trim():"";a?(k.scope="run",k.runName=a,(b||c)&&w("resource-both-bindings",`Node "${f}": a resource node is EITHER a run artifact ("runName") or a static MCP resource ("server"+"uri"); kept the run artifact.`,f)):(k.scope="mcp",b&&(k.boundServer=b),c&&(k.uri=c),b&&c?y.has(b)||w("server-unknown",`Node "${f}": MCP server "${b}" is not configured in FLUJO.`,f):w("resource-missing-binding",`Node "${f}": a static resource node needs both "server" and "uri" (or a "runName" for a run artifact).`,f))}else if("signal"===i){let a="string"==typeof e.topic?e.topic.trim():"";a?k.topic=a:w("signal-missing-topic",`Node "${f}": a signal node needs a "topic" to emit.`,f),"string"==typeof e.payloadTemplate&&e.payloadTemplate?k.payloadTemplate=e.payloadTemplate:void 0!==l&&(k.payloadTemplate=l)}let m={id:(0,d.A)(),type:i,position:{x:0,y:0},data:{label:"finish"===i?"Finish Node":e.label||`${i.charAt(0).toUpperCase()}${i.slice(1)} Node`,type:i,...e.description?{description:e.description}:{},properties:k}};if(L.set(f,m),M.push(m),"process"===i&&Array.isArray(e.servers)){let a=new Set;for(let b of e.servers){let c,e=b?.name;if(!e||"string"!=typeof e){w("server-missing-name",`Node "${f}": a server reference is missing its "name"; skipped.`,f);continue}if(a.has(e))continue;a.add(e),y.has(e)||w("server-unknown",`Node "${f}": MCP server "${e}" is not configured in FLUJO.`,f);let g=z[e];if(Array.isArray(b.tools)){if(c=b.tools.filter(a=>"string"==typeof a&&a),g){let a=c.filter(a=>!g.includes(a));a.length>0&&w("tool-unknown",`Node "${f}": server "${e}" does not report tool(s): ${a.join(", ")}.`,f)}}else c=g?[...g]:[];let h={id:(0,d.A)(),type:"mcp",position:{x:0,y:0},data:{label:e,type:"mcp",properties:{boundServer:e,enabledTools:c}}};M.push(h),N.push({processKey:f,mcpNode:h})}}else"process"!==i&&Array.isArray(e.servers)&&e.servers.length>0&&w("servers-on-non-process",`Node "${f}": only process nodes can have "servers"; ignored.`,f)}if(0===L.size)return g("no-usable-nodes","No usable nodes — the spec must contain at least a start node and one step."),null;let P=[],Q=new Set;for(let a of G){let b,c=a?.from,d=a?.to,e=c?L.get(c):void 0,h=d?L.get(d):void 0;if(!e||!h){g("edge-unknown-node",`Edge "${String(c)}" -> "${String(d)}" references a node key that does not exist (or was dropped).`);continue}if(e===h){g("edge-self-loop",`Edge "${c}" -> "${d}": a node cannot connect to itself.`);continue}if("resource"===e.type||"resource"===h.type){if(("resource"!==e.type||"process"!==h.type)&&("process"!==e.type||"resource"!==h.type)){g("resource-edge-invalid",`Edge "${c}" -> "${d}": resource nodes connect only to process nodes.`);continue}a.condition&&w("resource-edge-condition",`Edge "${c}" -> "${d}": conditions do not apply to resource wiring; dropped.`),!0===a.bidirectional&&w("resource-edge-bidirectional",`Edge "${c}" -> "${d}": resource wiring is directional (read vs write); "bidirectional" was ignored — add the opposite edge explicitly if the step both reads and writes.`);let b=`${c}->${d}`;if(Q.has(b)){w("edge-duplicate",`Edge "${c}" -> "${d}" appears more than once; kept the first.`);continue}Q.add(b),P.push(function(a,b){let c="resource"===a.type?"resource-out":"process-right-resource",d="resource"===b.type?"resource-in":"process-left-resource";return{id:`${a.id}:${c}->${b.id}:${d}`,source:a.id,sourceHandle:c,target:b.id,targetHandle:d,type:"resourceEdge",data:{edgeType:"resource"},animated:!1,markerEnd:{...m},style:{...n}}}(e,h));continue}if("start"===h.type){g("edge-into-start",`Edge "${c}" -> "${d}": nothing may connect INTO a start node.`);continue}if("finish"===e.type){g("edge-out-of-finish",`Edge "${c}" -> "${d}": nothing may connect OUT OF a finish node.`);continue}let i=`${c}->${d}`;if(Q.has(i)){w("edge-duplicate",`Edge "${c}" -> "${d}" appears more than once; kept the first.`);continue}Q.add(i);let j=!0===a.bidirectional;j&&("start"===e.type||"finish"===h.type)&&(w("bidirectional-illegal",`Edge "${c}" -> "${d}" cannot be bidirectional; downgraded to one-way.`),j=!1);let k=a.condition;k&&"object"==typeof k&&("process"!==e.type?w("edge-condition-non-process",`Edge "${c}" -> "${d}" has a condition but leaves a ${e.type} node; conditions only route from process nodes and were dropped.`):(0,f.C)(k.kind)?"always"===k.kind?b={kind:"always",..."last-message"===k.target?{target:"last-message"}:{},...!0===k.negate?{negate:!0}:{}}:"string"!=typeof k.value||0===k.value.length?w("edge-condition-value",`Edge "${c}" -> "${d}" has a condition with no "value"; the condition was dropped.`):("regex"!==k.kind||(0,f.wM)(k.value)||w("edge-condition-regex",`Edge "${c}" -> "${d}" has a regex condition that does not compile; it is kept but will never match at runtime.`),b={kind:k.kind,value:k.value,..."last-message"===k.target?{target:"last-message"}:{},...!0===k.ignoreCase?{ignoreCase:!0}:{},...!0===k.negate?{negate:!0}:{}}):w("edge-condition-kind",`Edge "${c}" -> "${d}" has an unknown condition kind "${String(k.kind)}"; the condition was dropped.`)),P.push(u(e,h,j,b))}for(let{processKey:a,mcpNode:b}of N){let c=L.get(a);P.push(function(a,b){let c="process-right-mcp",d="mcp-left";return{id:`${a.id}:${c}->${b.id}:${d}`,source:a.id,sourceHandle:c,target:b.id,targetHandle:d,type:"mcpEdge",data:{edgeType:"mcp"},animated:!1,markerEnd:{...k},markerStart:{...k},style:{...l}}}(c,b))}!function(a,b,c,d,e){let f=new Map;for(let a of c){let b=a.data?.edgeType;"mcp"!==b&&"resource"!==b&&(f.has(a.source)||f.set(a.source,[]),f.get(a.source).push(a.target))}let g=[...b.values()],h=g.filter(a=>"resource"===a.type),i=g.filter(a=>"resource"!==a.type),j=i.filter(a=>"start"===a.type),k=j.length>0?j:i.slice(0,1),l=new Map,m=k.map(a=>({id:a.id,depth:0}));for(let a of m)l.set(a.id,0);for(;m.length;){let{id:a,depth:b}=m.shift();for(let c of f.get(a)??[])l.has(c)||(l.set(c,b+1),m.push({id:c,depth:b+1}))}let n=0;for(let a of l.values())n=Math.max(n,a);for(let a of i)l.has(a.id)||l.set(a.id,n+1);let o=new Map;for(let[a,c]of b)o.set(c.id,a);let p=new Map;for(let a of i){let b=o.get(a.id),c=e&&b?e[b]:void 0;if(c&&"number"==typeof c.x&&"number"==typeof c.y){a.position={x:c.x,y:c.y};continue}let d=l.get(a.id),f=p.get(d)??0;p.set(d,f+1),a.position={x:250+280*f,y:150+170*d}}let q=new Map;for(let{processKey:a,mcpNode:c}of d){let d=b.get(a),e=q.get(a)??0;q.set(a,e+1),c.position={x:d.position.x+320,y:d.position.y+150*e}}let r=new Map(g.map(a=>[a.id,a])),s=new Map,t=0;for(let a of h){let b=o.get(a.id),d=e&&b?e[b]:void 0;if(d&&"number"==typeof d.x&&"number"==typeof d.y){a.position={x:d.x,y:d.y};continue}let f=c.find(b=>b.data?.edgeType==="resource"&&(b.source===a.id||b.target===a.id)),g=f?f.source===a.id?f.target:f.source:void 0,h=g?r.get(g):void 0;if(h){let b=s.get(h.id)??0;s.set(h.id,b+1),a.position={x:h.position.x-320,y:h.position.y+150*b}}else{let b=0;for(let a of i)b=Math.max(b,a.position.y);a.position={x:250+280*t,y:b+170},t++}}}(0,L,P,N,0===h?c.positions:void 0);let R={id:I,name:H,...e?.description?{description:e.description}:{},nodes:M,edges:P};return C.push(R),E.push({id:R.id,name:R.name}),R}(a,0,[]),H=C,I=e;let J=I.filter(a=>"error"===a.severity).length;return{flow:G,flows:H,issues:I,errorCount:J,warningCount:I.length-J};function K(a,b){void 0!==a.concurrencyLimit&&("number"!=typeof a.concurrencyLimit||Number.isNaN(a.concurrencyLimit)?w("invalid-concurrency-limit",`Node "${a.key}": concurrencyLimit "${String(a.concurrencyLimit)}" is not a number; using the runtime default.`,a.key):b.concurrencyLimit=Math.max(1,Math.floor(a.concurrencyLimit))),"string"==typeof a.joinSeparator&&(b.joinSeparator=a.joinSeparator),void 0!==a.errorStrategy&&("fail-fast"===a.errorStrategy||"collect-all"===a.errorStrategy?b.errorStrategy=a.errorStrategy:w("invalid-error-strategy",`Node "${a.key}": errorStrategy "${String(a.errorStrategy)}" is not valid (fail-fast | collect-all); using collect-all.`,a.key))}}function w(a){let b=Array.isArray(a?.nodes)?a.nodes:[],c=Array.isArray(a?.edges)?a.edges:[],d=new Map;for(let a of b)"mcp"===a.type&&d.set(a.id,a);let e=new Map;for(let a of c){if(a.data?.edgeType!=="mcp")continue;let b=d.get(a.target);if(!b)continue;let c=b.data?.properties??{},f="string"==typeof c.boundServer&&c.boundServer?c.boundServer:b.data?.label;if(!f||"string"!=typeof f)continue;let g=Array.isArray(c.enabledTools)?c.enabledTools.filter(a=>"string"==typeof a&&!!a):void 0,h=e.get(a.source)??[];h.push({name:f,...g?{tools:g}:{}}),e.set(a.source,h)}let f=[];for(let a of b){if("mcp"===a.type)continue;let b=a.type;if("start"!==b&&"process"!==b&&"finish"!==b&&"subflow"!==b&&"resource"!==b&&"signal"!==b)continue;let c=a.data?.properties??{},d={key:a.id,type:b,..."finish"!==b&&a.data?.label?{label:a.data.label}:{},...a.data?.description?{description:a.data.description}:{}};if("start"===b)"string"==typeof c.promptTemplate&&c.promptTemplate&&(d.prompt=c.promptTemplate);else if("process"===b){"string"==typeof c.promptTemplate&&c.promptTemplate&&(d.prompt=c.promptTemplate),"string"==typeof c.boundModel&&c.boundModel&&(d.model=c.boundModel),"string"==typeof c.inputMode&&(d.inputMode=c.inputMode),"string"==typeof c.isolatedPrompt&&c.isolatedPrompt&&(d.isolatedPrompt=c.isolatedPrompt),!1===c.allowCallerPrompt&&(d.allowCallerPrompt=!1),"string"==typeof c.outputMode&&(d.outputMode=c.outputMode),"number"==typeof c.maxTurns&&c.maxTurns>0&&(d.maxTurns=c.maxTurns),!0===c.excludeModelPrompt&&(d.excludeModelPrompt=!0),!0===c.excludeStartNodePrompt&&(d.excludeStartNodePrompt=!0),!0===c.excludeSystemPrompt&&(d.excludeSystemPrompt=!0),Array.isArray(c.allowedTools)&&c.allowedTools.length>0&&(d.allowedTools=c.allowedTools.filter(a=>"string"==typeof a&&!!a)),"string"==typeof c.captureVariable&&c.captureVariable&&(d.captureVariable=c.captureVariable),"string"==typeof c.captureResource&&c.captureResource&&(d.captureResource=c.captureResource),"string"==typeof c.captureKv&&c.captureKv&&(d.captureKv=c.captureKv);let b=e.get(a.id);b&&b.length>0&&(d.servers=b)}else if("subflow"===b){if(Array.isArray(c.parallelSubflowIds)&&c.parallelSubflowIds.length>0)d.parallelFlows=c.parallelSubflowIds.filter(a=>"string"==typeof a&&!!a),"number"==typeof c.concurrencyLimit&&c.concurrencyLimit>0&&(d.concurrencyLimit=c.concurrencyLimit),"string"==typeof c.joinSeparator&&(d.joinSeparator=c.joinSeparator),("fail-fast"===c.errorStrategy||"collect-all"===c.errorStrategy)&&(d.errorStrategy=c.errorStrategy);else if("string"==typeof c.subflowId&&c.subflowId){d.flow=c.subflowId,!0===c.mapOverList&&(d.mapOverList=!0,("json-array"===c.itemSplit||"lines"===c.itemSplit)&&(d.itemSplit=c.itemSplit),!0===c.sequential&&(d.sequential=!0),"number"==typeof c.concurrencyLimit&&c.concurrencyLimit>0&&(d.concurrencyLimit=c.concurrencyLimit),"string"==typeof c.joinSeparator&&(d.joinSeparator=c.joinSeparator),("fail-fast"===c.errorStrategy||"collect-all"===c.errorStrategy)&&(d.errorStrategy=c.errorStrategy));let a=Array.isArray(c.spawnBriefs)?c.spawnBriefs.filter(a=>"string"==typeof a&&""!==a.trim()):[];a.length>0&&(d.spawnBriefs=a,"number"==typeof c.concurrencyLimit&&c.concurrencyLimit>0&&(d.concurrencyLimit=c.concurrencyLimit),"string"==typeof c.joinSeparator&&(d.joinSeparator=c.joinSeparator),("fail-fast"===c.errorStrategy||"collect-all"===c.errorStrategy)&&(d.errorStrategy=c.errorStrategy))}"string"==typeof c.parallelSubflowIdsVar&&c.parallelSubflowIdsVar&&(d.parallelFlowsVariable=c.parallelSubflowIdsVar,d.parallelFlows||d.flow||("number"==typeof c.concurrencyLimit&&c.concurrencyLimit>0&&(d.concurrencyLimit=c.concurrencyLimit),"string"==typeof c.joinSeparator&&(d.joinSeparator=c.joinSeparator),("fail-fast"===c.errorStrategy||"collect-all"===c.errorStrategy)&&(d.errorStrategy=c.errorStrategy))),"string"==typeof c.inputMode&&(d.inputMode=c.inputMode),"string"==typeof c.outputMode&&(d.outputMode=c.outputMode),"string"==typeof c.promptTemplate&&c.promptTemplate&&(d.prompt=c.promptTemplate),!0===c.allowCallerPrompt&&(d.allowCallerPrompt=!0),!0===c.allowCallerFanout&&(d.allowCallerFanout=!0),"string"==typeof c.captureVariable&&c.captureVariable&&(d.captureVariable=c.captureVariable),"string"==typeof c.captureResource&&c.captureResource&&(d.captureResource=c.captureResource),"string"==typeof c.captureKv&&c.captureKv&&(d.captureKv=c.captureKv)}else"resource"===b?"run"===c.scope&&"string"==typeof c.runName&&c.runName?d.runName=c.runName:("string"==typeof c.boundServer&&c.boundServer&&(d.server=c.boundServer),"string"==typeof c.uri&&c.uri&&(d.uri=c.uri)):"signal"===b&&("string"==typeof c.topic&&c.topic&&(d.topic=c.topic),"string"==typeof c.payloadTemplate&&c.payloadTemplate&&(d.payloadTemplate=c.payloadTemplate));f.push(d)}let g=[];for(let a of c){if(a.data?.edgeType==="mcp"||!a.source||!a.target||d.has(a.source)||d.has(a.target))continue;let b=a.data;g.push({from:a.source,to:a.target,...b?.bidirectional?{bidirectional:!0}:{},...b?.condition?{condition:b.condition}:{}})}return{...a?.name?{name:a.name}:{},...a?.description?{description:a.description}:{},nodes:f,edges:g}}function x(a){for(let b of a.nodes){if("finish"===b.type){b.data.label="Finish Node";continue}if("process"!==b.type)continue;let a=b.data.properties??{};void 0===a.inputMode&&(a.inputMode="latest-message"),void 0===a.outputMode&&(a.outputMode="latest-message"),b.data.properties=a}}}};
1
+ "use strict";exports.id=1226,exports.ids=[1226],exports.modules={81226:(a,b,c)=>{c.d(b,{A_:()=>h,FH:()=>w,Zn:()=>x,dM:()=>v,lk:()=>i,pX:()=>u});var d=c(32524),e=c(49181),f=c(67512),g=c(89224);let h=3,i=8;function j(a,b,c,d){return"number"!=typeof a||Number.isNaN(a)?d:Math.max(b,Math.min(c,Math.floor(a)))}let k={type:"arrowclosed",width:20,height:20,color:"#1976d2"},l={stroke:"#1976d2",strokeWidth:2},m={type:"arrowclosed",width:20,height:20,color:"#009688"},n={stroke:"#009688",strokeWidth:2},o=new Set(["full-history","latest-message","isolated"]),p=new Set(["steps","final-only"]),q=new Set(["full-conversation","latest-message"]);function r(a,b={}){let{keepPills:c=!1,wiredServers:d=new Set,validHandoffNames:f=new Set}=b,g=(0,e.A$)(a);if(0===g.length)return{text:a,stripped:!1,unresolved:[]};let h="",i=0,j=!1,k=[];for(let b of g){h+=a.slice(i,b.index),i=b.index+b.fullMatch.length;let e=!1;c&&(e="handoff"===b.server?f.has(b.name):d.has(b.server)),e?h+=b.fullMatch:(h+=b.name,j=!0,c&&k.push(b.fullMatch))}return{text:h+=a.slice(i),stripped:j,unresolved:k}}function s(a,b,c){let d=b.filter(b=>b.from===a).map(a=>c.get(a.to)).filter(Boolean).map(a=>({id:a.key??"",label:a.label,type:a.type}));return new Set((0,g.E9)(d).values())}function t(a,b){if(b.some(b=>b.id===a))return a;let c=a.toLowerCase(),d=b.find(a=>a.name.toLowerCase()===c);return d?d.id:null}function u(a,b,c,d){let e=`${a.type}-bottom`,f=`${b.type}-top`;return{id:`${a.id}:${e}->${b.id}:${f}`,source:a.id,sourceHandle:e,target:b.id,targetHandle:f,type:"custom",data:{edgeType:"standard",...c?{bidirectional:!0}:{},...d?{condition:d}:{}},animated:!0}}function v(a,b={},c={}){let e=[],g=(a,b,c)=>e.push({severity:"error",code:a,message:b,nodeKey:c}),w=(a,b,c)=>e.push({severity:"warning",code:a,message:b,nodeKey:c}),x=b.models??[],y=new Set((b.servers??[]).map(a=>a.name)),z=b.serverTools??{},A=j(c.maxDepth,0,h,h),B=j(c.maxFlows,1,i,i),C=[],D=[...(b.flows??[]).map(a=>a.name)],E=[],F=0;var G=function a(e,h,i){let v=Array.isArray(e?.nodes)?e.nodes:[],G=Array.isArray(e?.edges)?e.edges:[],H=function(a,b){let c=(a??"").trim().replace(/[^\w-]+/g,"_").replace(/^_+|_+$/g,"");c||(c="generated_flow");let d=new Set(b.map(a=>a.toLowerCase()));if(!d.has(c.toLowerCase()))return c;for(let a=2;;a++){let b=`${c}_${a}`;if(!d.has(b.toLowerCase()))return b}}(e?.name,D);D.push(H),F++;let I=(0,d.A)(),J=[...i,H],L=new Map,M=[],N=[],O=new Map(v.filter(a=>a?.key&&"string"==typeof a.key).map(a=>[a.key,a]));for(let e of v){let f=e?.key;if(!f||"string"!=typeof f){g("node-missing-key",'A node is missing its "key" — every node needs a unique key.');continue}if(L.has(f)){g("node-duplicate-key",`Duplicate node key "${f}" — keys must be unique; the later node was dropped.`,f);continue}let i=e.type;if("mcp"===i){g("mcp-node-not-allowed",`Node "${f}": do not emit "mcp" nodes — attach servers to a process node via its "servers" list instead.`,f);continue}if("start"!==i&&"process"!==i&&"finish"!==i&&"subflow"!==i&&"resource"!==i&&"signal"!==i){g("unknown-node-type",`Node "${f}" has unknown type "${String(i)}".`,f);continue}let k={},l="string"==typeof e.prompt?e.prompt:void 0;if("start"===i){let{text:a,stripped:b,unresolved:d}=r(l??"",c.keepPills?{keepPills:!0,wiredServers:new Set((e.servers??[]).map(a=>a.name)),validHandoffNames:s(f,G,O)}:{});for(let a of(b&&!c.keepPills&&w("pill-stripped",`Node "${f}": binding pills are not supported in generated prompts and were replaced with plain names.`,f),d))w("pill-unresolved",`Node "${f}": pill "${a}" not resolved against wired servers — stripped.`,f);k.promptTemplate=a}else if("process"===i){let{text:a,stripped:b,unresolved:d}=r(l??"",c.keepPills?{keepPills:!0,wiredServers:new Set((e.servers??[]).map(a=>a.name)),validHandoffNames:s(f,G,O)}:{});for(let a of(b&&!c.keepPills&&w("pill-stripped",`Node "${f}": binding pills are not supported in generated prompts and were replaced with plain names.`,f),d))w("pill-unresolved",`Node "${f}": pill "${a}" not resolved against wired servers — stripped.`,f);if(k.promptTemplate=a,e.model){let a=function(a,b){if(b.some(b=>b.id===a))return a;let c=a.toLowerCase(),d=b.find(a=>a.displayName?.toLowerCase()===c);if(d)return d.id;let e=b.find(a=>a.name?.toLowerCase()===c);return e?e.id:null}(e.model,x);a?k.boundModel=a:(k.boundModel=e.model,w("model-unresolved",`Node "${f}": model "${e.model}" does not match any configured model (by id, display name, or name).`,f))}void 0!==e.inputMode&&(o.has(e.inputMode)?(k.inputMode=e.inputMode,"isolated"===e.inputMode&&"string"==typeof e.isolatedPrompt&&(k.isolatedPrompt=e.isolatedPrompt)):w("invalid-input-mode",`Node "${f}": inputMode "${String(e.inputMode)}" is not valid (full-history | latest-message | isolated); omitted.`,f)),"boolean"==typeof e.allowCallerPrompt&&(k.allowCallerPrompt=e.allowCallerPrompt),void 0!==e.outputMode&&(q.has(e.outputMode)?k.outputMode=e.outputMode:w("invalid-output-mode",`Node "${f}": outputMode "${String(e.outputMode)}" is not valid on a process node (full-conversation | latest-message); omitted.`,f)),void 0!==e.maxTurns&&("number"!=typeof e.maxTurns||Number.isNaN(e.maxTurns)?w("invalid-max-turns",`Node "${f}": maxTurns "${String(e.maxTurns)}" is not a number; omitted.`,f):k.maxTurns=j(e.maxTurns,1,1e3,1)),"boolean"==typeof e.excludeModelPrompt&&(k.excludeModelPrompt=e.excludeModelPrompt),"boolean"==typeof e.excludeStartNodePrompt&&(k.excludeStartNodePrompt=e.excludeStartNodePrompt),"boolean"==typeof e.excludeSystemPrompt&&(k.excludeSystemPrompt=e.excludeSystemPrompt),Array.isArray(e.allowedTools)&&(k.allowedTools=e.allowedTools.filter(a=>"string"==typeof a&&a)),"string"==typeof e.captureVariable&&e.captureVariable.trim()&&(k.captureVariable=e.captureVariable.trim()),"string"==typeof e.captureResource&&e.captureResource.trim()&&w("process-capture-resource-unsupported",`Node "${f}": process captureResource is not supported; connect the process to a Resource node so it can call write_resource.`,f),"string"==typeof e.captureKv&&e.captureKv.trim()&&(k.captureKv=e.captureKv.trim())}else if("subflow"===i){if(function(c,d,e,f,h){let i=Array.isArray(c.parallelFlows)&&c.parallelFlows.length>0,j=Array.isArray(c.parallelSubflowSpecs)&&c.parallelSubflowSpecs.length>0,k="string"==typeof c.parallelFlowsVariable?c.parallelFlowsVariable.trim():"";if([void 0!==c.flow&&null!==c.flow?"flow":null,void 0!==c.subflowSpec&&null!==c.subflowSpec?"subflowSpec":null,i?"parallelFlows":null,j?"parallelSubflowSpecs":null,void 0!==c.generateSubflow&&null!==c.generateSubflow?"generateSubflow":null].filter(Boolean).length>1&&w("subflow-multiple-sources",`Node "${d}": a subflow node should have only one target source ("flow", "subflowSpec", "parallelFlows", "parallelSubflowSpecs", or "generateSubflow"); applying precedence flow > subflowSpec > parallelFlows > parallelSubflowSpecs > generateSubflow.`,d),!0===c.mapOverList){let a=void 0!==c.flow&&null!==c.flow||void 0!==c.subflowSpec&&null!==c.subflowSpec;(i||j)&&g("subflow-map-and-parallel",`Node "${d}": "mapOverList" runs a SINGLE child once per item and cannot be combined with "parallelFlows"/"parallelSubflowSpecs".`,d),a?(h.mapOverList=!0,void 0!==c.itemSplit&&("json-array"===c.itemSplit||"lines"===c.itemSplit?h.itemSplit=c.itemSplit:w("invalid-item-split",`Node "${d}": itemSplit "${String(c.itemSplit)}" is not valid (json-array | lines); using json-array.`,d)),!0===c.sequential&&(h.sequential=!0),K(c,h)):g("subflow-map-no-child",`Node "${d}": "mapOverList" needs a single child ("flow" or "subflowSpec") to run once per item.`,d)}let l=Array.isArray(c.spawnBriefs)?c.spawnBriefs.filter(a=>"string"==typeof a&&""!==a.trim()):[];if(l.length>0){let a=void 0!==c.flow&&null!==c.flow||void 0!==c.subflowSpec&&null!==c.subflowSpec;i||j?g("subflow-spawn-and-parallel",`Node "${d}": "spawnBriefs" runs a SINGLE child once per brief and cannot be combined with "parallelFlows"/"parallelSubflowSpecs".`,d):!0===c.mapOverList?g("subflow-spawn-and-map",`Node "${d}": "spawnBriefs" cannot be combined with "mapOverList"; use one lane source or the other.`,d):a?(h.spawnBriefs=l,K(c,h)):g("subflow-spawn-no-child",`Node "${d}": "spawnBriefs" needs a single child ("flow" or "subflowSpec") to spawn once per brief.`,d)}if(k&&(!0===c.mapOverList?g("subflow-map-and-parallel-var",`Node "${d}": "parallelFlowsVariable" (dynamic fan-out) cannot be combined with "mapOverList".`,d):h.parallelSubflowIdsVar=k),c.flow){if(f.some(a=>a.toLowerCase()===c.flow.toLowerCase()))return g("subflow-cycle",`Node "${d}": flow "${c.flow}" refers to an ancestor flow, which would create a cycle.`,d);let a=t(c.flow,[...b.flows??[],...E]);return a?h.subflowId=a:g("subflow-unresolved",`Node "${d}": flow "${c.flow}" does not match any existing flow (by id or name).`,d)}if(c.subflowSpec){if(e+1>A)return g("subflow-too-deep",`Node "${d}": nested subflows may not go deeper than ${A} level(s); this inline subflow was not compiled.`,d);if(F>=B)return g("subflow-too-many",`Node "${d}": compiling this inline subflow would exceed the maximum of ${B} flows in one bundle; it was not compiled.`,d);let b=a(c.subflowSpec,e+1,f);return b?h.subflowId=b.id:g("subflow-child-empty",`Node "${d}": the inline "subflowSpec" produced no usable flow.`,d)}if(i){let a=[];for(let e of c.parallelFlows){if("string"!=typeof e||!e){g("parallel-flow-invalid",`Node "${d}": a "parallelFlows" entry is missing or not a string.`,d);continue}if(f.some(a=>a.toLowerCase()===e.toLowerCase())){g("subflow-cycle",`Node "${d}": parallel flow "${e}" refers to an ancestor flow, which would create a cycle.`,d);continue}let c=t(e,[...b.flows??[],...E]);c?a.includes(c)||a.push(c):g("parallel-flow-unresolved",`Node "${d}": parallel flow "${e}" does not match any existing flow (by id or name).`,d)}a.length>0?(h.parallelSubflowIds=a,K(c,h)):g("parallel-empty",`Node "${d}": "parallelFlows" resolved to no runnable lanes.`,d);return}if(j){let b=[];for(let h of c.parallelSubflowSpecs){if(!h||"object"!=typeof h){g("parallel-spec-invalid",`Node "${d}": a "parallelSubflowSpecs" entry is not a FlowSpec object.`,d);continue}if(e+1>A){g("subflow-too-deep",`Node "${d}": nested subflows may not go deeper than ${A} level(s); a parallel inline subflow was not compiled.`,d);continue}if(F>=B){g("subflow-too-many",`Node "${d}": compiling a parallel inline subflow would exceed the maximum of ${B} flows in one bundle; it was not compiled.`,d);continue}let c=a(h,e+1,f);c?b.push(c.id):g("subflow-child-empty",`Node "${d}": a "parallelSubflowSpecs" entry produced no usable flow.`,d)}b.length>0?(h.parallelSubflowIds=b,K(c,h)):g("parallel-empty",`Node "${d}": "parallelSubflowSpecs" produced no runnable lanes.`,d);return}k&&h.parallelSubflowIdsVar?K(c,h):void 0!==c.generateSubflow&&null!==c.generateSubflow?g("subflow-generate-unsupported",`Node "${d}": "generateSubflow" is only available through the AI flow generator. Use "subflowSpec" for deterministic nested authoring, or "flow" to reference an existing flow.`,d):g("subflow-missing-flow",`Node "${d}": subflow nodes need a "flow" (existing flow), a "subflowSpec" (inline child), "parallelFlows"/"parallelSubflowSpecs" (concurrent children), or "generateSubflow".`,d)}(e,f,h,J,k),void 0!==e.inputMode&&(o.has(e.inputMode)?k.inputMode=e.inputMode:w("invalid-input-mode",`Node "${f}": inputMode "${String(e.inputMode)}" is not valid (full-history | latest-message | isolated); omitted.`,f)),void 0!==e.outputMode&&(p.has(e.outputMode)?k.outputMode=e.outputMode:w("invalid-output-mode",`Node "${f}": outputMode "${String(e.outputMode)}" is not valid (steps | final-only); omitted.`,f)),void 0!==l){let{text:a,stripped:b,unresolved:d}=r(l,c.keepPills?{keepPills:!0}:{});for(let a of(b&&!c.keepPills&&w("pill-stripped",`Node "${f}": binding pills are not supported in generated prompts and were replaced with plain names.`,f),d))w("pill-unresolved",`Node "${f}": pill "${a}" not resolved against wired servers — stripped.`,f);k.promptTemplate=a}"boolean"==typeof e.allowCallerPrompt&&(k.allowCallerPrompt=e.allowCallerPrompt),"boolean"==typeof e.allowCallerFanout&&(k.allowCallerFanout=e.allowCallerFanout),"string"==typeof e.captureVariable&&e.captureVariable.trim()&&(k.captureVariable=e.captureVariable.trim()),"string"==typeof e.captureResource&&e.captureResource.trim()&&(k.captureResource=e.captureResource.trim()),"string"==typeof e.captureKv&&e.captureKv.trim()&&(k.captureKv=e.captureKv.trim())}else if("resource"===i){let a="string"==typeof e.runName?e.runName.trim():"",b="string"==typeof e.server?e.server.trim():"",c="string"==typeof e.uri?e.uri.trim():"";a?(k.scope="run",k.runName=a,(b||c)&&w("resource-both-bindings",`Node "${f}": a resource node is EITHER a run artifact ("runName") or a static MCP resource ("server"+"uri"); kept the run artifact.`,f)):(k.scope="mcp",b&&(k.boundServer=b),c&&(k.uri=c),b&&c?y.has(b)||w("server-unknown",`Node "${f}": MCP server "${b}" is not configured in FLUJO.`,f):w("resource-missing-binding",`Node "${f}": a static resource node needs both "server" and "uri" (or a "runName" for a run artifact).`,f))}else if("signal"===i){let a="string"==typeof e.topic?e.topic.trim():"";a?k.topic=a:w("signal-missing-topic",`Node "${f}": a signal node needs a "topic" to emit.`,f),"string"==typeof e.payloadTemplate&&e.payloadTemplate?k.payloadTemplate=e.payloadTemplate:void 0!==l&&(k.payloadTemplate=l)}let m={id:(0,d.A)(),type:i,position:{x:0,y:0},data:{label:"finish"===i?"Finish Node":e.label||`${i.charAt(0).toUpperCase()}${i.slice(1)} Node`,type:i,...e.description?{description:e.description}:{},properties:k}};if(L.set(f,m),M.push(m),"process"===i&&Array.isArray(e.servers)){let a=new Set;for(let b of e.servers){let c,e=b?.name;if(!e||"string"!=typeof e){w("server-missing-name",`Node "${f}": a server reference is missing its "name"; skipped.`,f);continue}if(a.has(e))continue;a.add(e),y.has(e)||w("server-unknown",`Node "${f}": MCP server "${e}" is not configured in FLUJO.`,f);let g=z[e];if(Array.isArray(b.tools)){if(c=b.tools.filter(a=>"string"==typeof a&&a),g){let a=c.filter(a=>!g.includes(a));a.length>0&&w("tool-unknown",`Node "${f}": server "${e}" does not report tool(s): ${a.join(", ")}.`,f)}}else c=g?[...g]:[];let h={id:(0,d.A)(),type:"mcp",position:{x:0,y:0},data:{label:e,type:"mcp",properties:{boundServer:e,enabledTools:c}}};M.push(h),N.push({processKey:f,mcpNode:h})}}else"process"!==i&&Array.isArray(e.servers)&&e.servers.length>0&&w("servers-on-non-process",`Node "${f}": only process nodes can have "servers"; ignored.`,f)}if(0===L.size)return g("no-usable-nodes","No usable nodes — the spec must contain at least a start node and one step."),null;let P=[],Q=new Set;for(let a of G){let b,c=a?.from,d=a?.to,e=c?L.get(c):void 0,h=d?L.get(d):void 0;if(!e||!h){g("edge-unknown-node",`Edge "${String(c)}" -> "${String(d)}" references a node key that does not exist (or was dropped).`);continue}if(e===h){g("edge-self-loop",`Edge "${c}" -> "${d}": a node cannot connect to itself.`);continue}if("resource"===e.type||"resource"===h.type){if(("resource"!==e.type||"process"!==h.type)&&("process"!==e.type||"resource"!==h.type)){g("resource-edge-invalid",`Edge "${c}" -> "${d}": resource nodes connect only to process nodes.`);continue}a.condition&&w("resource-edge-condition",`Edge "${c}" -> "${d}": conditions do not apply to resource wiring; dropped.`),!0===a.bidirectional&&w("resource-edge-bidirectional",`Edge "${c}" -> "${d}": resource wiring is directional (read vs write); "bidirectional" was ignored — add the opposite edge explicitly if the step both reads and writes.`);let b=`${c}->${d}`;if(Q.has(b)){w("edge-duplicate",`Edge "${c}" -> "${d}" appears more than once; kept the first.`);continue}Q.add(b),P.push(function(a,b){let c="resource"===a.type?"resource-out":"process-right-resource",d="resource"===b.type?"resource-in":"process-left-resource";return{id:`${a.id}:${c}->${b.id}:${d}`,source:a.id,sourceHandle:c,target:b.id,targetHandle:d,type:"resourceEdge",data:{edgeType:"resource"},animated:!1,markerEnd:{...m},style:{...n}}}(e,h));continue}if("start"===h.type){g("edge-into-start",`Edge "${c}" -> "${d}": nothing may connect INTO a start node.`);continue}if("finish"===e.type){g("edge-out-of-finish",`Edge "${c}" -> "${d}": nothing may connect OUT OF a finish node.`);continue}let i=`${c}->${d}`;if(Q.has(i)){w("edge-duplicate",`Edge "${c}" -> "${d}" appears more than once; kept the first.`);continue}Q.add(i);let j=!0===a.bidirectional;j&&("start"===e.type||"finish"===h.type)&&(w("bidirectional-illegal",`Edge "${c}" -> "${d}" cannot be bidirectional; downgraded to one-way.`),j=!1);let k=a.condition;k&&"object"==typeof k&&("process"!==e.type?w("edge-condition-non-process",`Edge "${c}" -> "${d}" has a condition but leaves a ${e.type} node; conditions only route from process nodes and were dropped.`):(0,f.C)(k.kind)?"always"===k.kind?b={kind:"always",..."last-message"===k.target?{target:"last-message"}:{},...!0===k.negate?{negate:!0}:{}}:"string"!=typeof k.value||0===k.value.length?w("edge-condition-value",`Edge "${c}" -> "${d}" has a condition with no "value"; the condition was dropped.`):("regex"!==k.kind||(0,f.wM)(k.value)||w("edge-condition-regex",`Edge "${c}" -> "${d}" has a regex condition that does not compile; it is kept but will never match at runtime.`),b={kind:k.kind,value:k.value,..."last-message"===k.target?{target:"last-message"}:{},...!0===k.ignoreCase?{ignoreCase:!0}:{},...!0===k.negate?{negate:!0}:{}}):w("edge-condition-kind",`Edge "${c}" -> "${d}" has an unknown condition kind "${String(k.kind)}"; the condition was dropped.`)),P.push(u(e,h,j,b))}for(let{processKey:a,mcpNode:b}of N){let c=L.get(a);P.push(function(a,b){let c="process-right-mcp",d="mcp-left";return{id:`${a.id}:${c}->${b.id}:${d}`,source:a.id,sourceHandle:c,target:b.id,targetHandle:d,type:"mcpEdge",data:{edgeType:"mcp"},animated:!1,markerEnd:{...k},markerStart:{...k},style:{...l}}}(c,b))}!function(a,b,c,d,e){let f=new Map;for(let a of c){let b=a.data?.edgeType;"mcp"!==b&&"resource"!==b&&(f.has(a.source)||f.set(a.source,[]),f.get(a.source).push(a.target))}let g=[...b.values()],h=g.filter(a=>"resource"===a.type),i=g.filter(a=>"resource"!==a.type),j=i.filter(a=>"start"===a.type),k=j.length>0?j:i.slice(0,1),l=new Map,m=k.map(a=>({id:a.id,depth:0}));for(let a of m)l.set(a.id,0);for(;m.length;){let{id:a,depth:b}=m.shift();for(let c of f.get(a)??[])l.has(c)||(l.set(c,b+1),m.push({id:c,depth:b+1}))}let n=0;for(let a of l.values())n=Math.max(n,a);for(let a of i)l.has(a.id)||l.set(a.id,n+1);let o=new Map;for(let[a,c]of b)o.set(c.id,a);let p=new Map;for(let a of i){let b=o.get(a.id),c=e&&b?e[b]:void 0;if(c&&"number"==typeof c.x&&"number"==typeof c.y){a.position={x:c.x,y:c.y};continue}let d=l.get(a.id),f=p.get(d)??0;p.set(d,f+1),a.position={x:250+280*f,y:150+170*d}}let q=new Map;for(let{processKey:a,mcpNode:c}of d){let d=b.get(a),e=q.get(a)??0;q.set(a,e+1),c.position={x:d.position.x+320,y:d.position.y+150*e}}let r=new Map(g.map(a=>[a.id,a])),s=new Map,t=0;for(let a of h){let b=o.get(a.id),d=e&&b?e[b]:void 0;if(d&&"number"==typeof d.x&&"number"==typeof d.y){a.position={x:d.x,y:d.y};continue}let f=c.find(b=>b.data?.edgeType==="resource"&&(b.source===a.id||b.target===a.id)),g=f?f.source===a.id?f.target:f.source:void 0,h=g?r.get(g):void 0;if(h){let b=s.get(h.id)??0;s.set(h.id,b+1),a.position={x:h.position.x-320,y:h.position.y+150*b}}else{let b=0;for(let a of i)b=Math.max(b,a.position.y);a.position={x:250+280*t,y:b+170},t++}}}(0,L,P,N,0===h?c.positions:void 0);let R={id:I,name:H,...e?.description?{description:e.description}:{},nodes:M,edges:P};return C.push(R),E.push({id:R.id,name:R.name}),R}(a,0,[]),H=C,I=e;let J=I.filter(a=>"error"===a.severity).length;return{flow:G,flows:H,issues:I,errorCount:J,warningCount:I.length-J};function K(a,b){void 0!==a.concurrencyLimit&&("number"!=typeof a.concurrencyLimit||Number.isNaN(a.concurrencyLimit)?w("invalid-concurrency-limit",`Node "${a.key}": concurrencyLimit "${String(a.concurrencyLimit)}" is not a number; using the runtime default.`,a.key):b.concurrencyLimit=Math.max(1,Math.floor(a.concurrencyLimit))),"string"==typeof a.joinSeparator&&(b.joinSeparator=a.joinSeparator),void 0!==a.errorStrategy&&("fail-fast"===a.errorStrategy||"collect-all"===a.errorStrategy?b.errorStrategy=a.errorStrategy:w("invalid-error-strategy",`Node "${a.key}": errorStrategy "${String(a.errorStrategy)}" is not valid (fail-fast | collect-all); using collect-all.`,a.key))}}function w(a){let b=Array.isArray(a?.nodes)?a.nodes:[],c=Array.isArray(a?.edges)?a.edges:[],d=new Map;for(let a of b)"mcp"===a.type&&d.set(a.id,a);let e=new Map;for(let a of c){if(a.data?.edgeType!=="mcp")continue;let b=d.get(a.target);if(!b)continue;let c=b.data?.properties??{},f="string"==typeof c.boundServer&&c.boundServer?c.boundServer:b.data?.label;if(!f||"string"!=typeof f)continue;let g=Array.isArray(c.enabledTools)?c.enabledTools.filter(a=>"string"==typeof a&&!!a):void 0,h=e.get(a.source)??[];h.push({name:f,...g?{tools:g}:{}}),e.set(a.source,h)}let f=[];for(let a of b){if("mcp"===a.type)continue;let b=a.type;if("start"!==b&&"process"!==b&&"finish"!==b&&"subflow"!==b&&"resource"!==b&&"signal"!==b)continue;let c=a.data?.properties??{},d={key:a.id,type:b,..."finish"!==b&&a.data?.label?{label:a.data.label}:{},...a.data?.description?{description:a.data.description}:{}};if("start"===b)"string"==typeof c.promptTemplate&&c.promptTemplate&&(d.prompt=c.promptTemplate);else if("process"===b){"string"==typeof c.promptTemplate&&c.promptTemplate&&(d.prompt=c.promptTemplate),"string"==typeof c.boundModel&&c.boundModel&&(d.model=c.boundModel),"string"==typeof c.inputMode&&(d.inputMode=c.inputMode),"string"==typeof c.isolatedPrompt&&c.isolatedPrompt&&(d.isolatedPrompt=c.isolatedPrompt),!1===c.allowCallerPrompt&&(d.allowCallerPrompt=!1),"string"==typeof c.outputMode&&(d.outputMode=c.outputMode),"number"==typeof c.maxTurns&&c.maxTurns>0&&(d.maxTurns=c.maxTurns),!0===c.excludeModelPrompt&&(d.excludeModelPrompt=!0),!0===c.excludeStartNodePrompt&&(d.excludeStartNodePrompt=!0),!0===c.excludeSystemPrompt&&(d.excludeSystemPrompt=!0),Array.isArray(c.allowedTools)&&c.allowedTools.length>0&&(d.allowedTools=c.allowedTools.filter(a=>"string"==typeof a&&!!a)),"string"==typeof c.captureVariable&&c.captureVariable&&(d.captureVariable=c.captureVariable),"string"==typeof c.captureResource&&c.captureResource&&(d.captureResource=c.captureResource),"string"==typeof c.captureKv&&c.captureKv&&(d.captureKv=c.captureKv);let b=e.get(a.id);b&&b.length>0&&(d.servers=b)}else if("subflow"===b){if(Array.isArray(c.parallelSubflowIds)&&c.parallelSubflowIds.length>0)d.parallelFlows=c.parallelSubflowIds.filter(a=>"string"==typeof a&&!!a),"number"==typeof c.concurrencyLimit&&c.concurrencyLimit>0&&(d.concurrencyLimit=c.concurrencyLimit),"string"==typeof c.joinSeparator&&(d.joinSeparator=c.joinSeparator),("fail-fast"===c.errorStrategy||"collect-all"===c.errorStrategy)&&(d.errorStrategy=c.errorStrategy);else if("string"==typeof c.subflowId&&c.subflowId){d.flow=c.subflowId,!0===c.mapOverList&&(d.mapOverList=!0,("json-array"===c.itemSplit||"lines"===c.itemSplit)&&(d.itemSplit=c.itemSplit),!0===c.sequential&&(d.sequential=!0),"number"==typeof c.concurrencyLimit&&c.concurrencyLimit>0&&(d.concurrencyLimit=c.concurrencyLimit),"string"==typeof c.joinSeparator&&(d.joinSeparator=c.joinSeparator),("fail-fast"===c.errorStrategy||"collect-all"===c.errorStrategy)&&(d.errorStrategy=c.errorStrategy));let a=Array.isArray(c.spawnBriefs)?c.spawnBriefs.filter(a=>"string"==typeof a&&""!==a.trim()):[];a.length>0&&(d.spawnBriefs=a,"number"==typeof c.concurrencyLimit&&c.concurrencyLimit>0&&(d.concurrencyLimit=c.concurrencyLimit),"string"==typeof c.joinSeparator&&(d.joinSeparator=c.joinSeparator),("fail-fast"===c.errorStrategy||"collect-all"===c.errorStrategy)&&(d.errorStrategy=c.errorStrategy))}"string"==typeof c.parallelSubflowIdsVar&&c.parallelSubflowIdsVar&&(d.parallelFlowsVariable=c.parallelSubflowIdsVar,d.parallelFlows||d.flow||("number"==typeof c.concurrencyLimit&&c.concurrencyLimit>0&&(d.concurrencyLimit=c.concurrencyLimit),"string"==typeof c.joinSeparator&&(d.joinSeparator=c.joinSeparator),("fail-fast"===c.errorStrategy||"collect-all"===c.errorStrategy)&&(d.errorStrategy=c.errorStrategy))),"string"==typeof c.inputMode&&(d.inputMode=c.inputMode),"string"==typeof c.outputMode&&(d.outputMode=c.outputMode),"string"==typeof c.promptTemplate&&c.promptTemplate&&(d.prompt=c.promptTemplate),!0===c.allowCallerPrompt&&(d.allowCallerPrompt=!0),!0===c.allowCallerFanout&&(d.allowCallerFanout=!0),"string"==typeof c.captureVariable&&c.captureVariable&&(d.captureVariable=c.captureVariable),"string"==typeof c.captureResource&&c.captureResource&&(d.captureResource=c.captureResource),"string"==typeof c.captureKv&&c.captureKv&&(d.captureKv=c.captureKv)}else"resource"===b?"run"===c.scope&&"string"==typeof c.runName&&c.runName?d.runName=c.runName:("string"==typeof c.boundServer&&c.boundServer&&(d.server=c.boundServer),"string"==typeof c.uri&&c.uri&&(d.uri=c.uri)):"signal"===b&&("string"==typeof c.topic&&c.topic&&(d.topic=c.topic),"string"==typeof c.payloadTemplate&&c.payloadTemplate&&(d.payloadTemplate=c.payloadTemplate));f.push(d)}let g=[];for(let a of c){if(a.data?.edgeType==="mcp"||!a.source||!a.target||d.has(a.source)||d.has(a.target))continue;let b=a.data;g.push({from:a.source,to:a.target,...b?.bidirectional?{bidirectional:!0}:{},...b?.condition?{condition:b.condition}:{}})}return{...a?.name?{name:a.name}:{},...a?.description?{description:a.description}:{},nodes:f,edges:g}}function x(a){for(let b of a.nodes){if("finish"===b.type){b.data.label="Finish Node";continue}if("process"!==b.type)continue;let a=b.data.properties??{};(void 0===a.inputMode||"latest-message"===a.inputMode)&&(a.inputMode="full-history"),void 0===a.outputMode&&(a.outputMode="latest-message"),b.data.properties=a}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=1227,exports.ids=[1227],exports.modules={34641:(a,b,c)=>{c.d(b,{uJ:()=>B,Ay:()=>L,Yw:()=>C});var d=c(21124),e=c(38301),f=c(60839),g=c(81637),h=c(8521),i=c(79515),j=c(88745),k=c(43312),l=c(68730),m=c(99561),n=c(5748),o=c(1994),p=c(17332),q=c(63908),r=c(36636),s=c(93516),t=c(92543),u=c(28055),v=c(59060);let w=(0,c(19815).h)("frontend/components/Chat/McpAppFrame"),x={name:"FLUJO",version:"3.33.0"},y=new Set(["https:","http:"]),z=["inline","fullscreen","pip"],A=new Set(["text"]),B=262144;function C(a){try{return new TextEncoder().encode(JSON.stringify(a)).length}catch{return 1/0}}let D=null;async function E(){return D||(D=fetch("/api/mcp/app-sandbox").then(async a=>{if(!a.ok)throw Error(`Sandbox endpoint discovery failed (${a.status})`);return await a.json()}).catch(a=>{throw D=null,a})),function(a,b){let c;if("string"!=typeof a.token||0===a.token.length)throw Error("Sandbox endpoint discovery returned invalid credentials");if(void 0!==a.url){if("string"!=typeof a.url)throw Error("Sandbox endpoint discovery returned an invalid public URL");try{c=new URL(a.url)}catch{throw Error("Sandbox endpoint discovery returned an invalid public URL")}if("http:"!==c.protocol&&"https:"!==c.protocol||c.username||c.password)throw Error("Sandbox public URL must be an absolute HTTP(S) URL without credentials");if("https:"===b.protocol&&"https:"!==c.protocol)throw Error("HTTPS FLUJO deployments require an HTTPS MCP Apps sandbox URL")}else{if("http:"!==b.protocol)throw Error("MCP Apps on HTTPS require FLUJO_MCP_APP_SANDBOX_PUBLIC_URL to be configured");if(!Number.isInteger(a.port)||a.port<1||a.port>65535)throw Error("Sandbox endpoint discovery returned an invalid port");(c=new URL("/sandbox.html",b.origin)).port=String(a.port)}if(c.origin===b.origin)throw Error("MCP Apps sandbox must use a distinct origin from FLUJO");return c.searchParams.set("token",a.token),c.href}(await D,window.location)}function F(a,b){let c=[],d=new Set;for(let e of a??[]){if(0===e.length||e.length>2048||/[^\x21-\x7e]/.test(e))continue;let a=/^(https|wss):\/\/(\*\.)?([^/:?#]+)(?::(\d{1,5}))?$/i.exec(e);if(!a||!b.includes(a[1].toLowerCase()))continue;let f=a[3].split(".");if(a[3].length>253||f.some(a=>0===a.length||a.length>63||!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(a)))continue;let g=a[4]?Number(a[4]):void 0;if(void 0!==g&&(!Number.isInteger(g)||g<1||g>65535))continue;let h=e.toLowerCase();if(!d.has(h)&&(d.add(h),c.push(e),c.length>=64))break}return c}function G(a){if(a)try{return JSON.parse(a)}catch{return}}async function H(a,b,c,d,e){if(await a.sendToolInput({arguments:function(a){let b=G(a);return b&&"object"==typeof b&&!Array.isArray(b)?b:{}}(b)}),void 0!==d)return void await a.sendToolCancelled({reason:d});let f=function(a,b){if(void 0===a)return!0===b?{content:[],isError:!0}:null;let c=G(a);return c&&"object"==typeof c&&Array.isArray(c.content)?{...c,...!0===b?{isError:!0}:{}}:{content:[{type:"text",text:a}],...!0===b?{isError:!0}:{}}}(c,e);f&&await a.sendToolResult(f)}function I(a,b,c){return b.includes(a)&&c.includes(a)}function J(a,b){let c=a.getBoundingClientRect(),d=Math.max(1,Math.round(c.width||a.clientWidth||1));return b?{width:d,height:Math.max(1,Math.round(c.height||a.clientHeight||1))}:{width:d,maxHeight:6e3}}async function K(a,b,c){try{let d=await u.S.listServerTools(a),e=Array.isArray(d.tools)?d.tools:[],f=c?e.find(a=>a?.name===c):e.find(a=>(0,v.Gt)(a?._meta)===b);if(f?.name&&f?.inputSchema&&(0,v.Gt)(f._meta)===b)return{tool:f}}catch(a){w.debug("Could not resolve the full MCP App tool definition",a)}}let L=({serverName:a,uri:b,toolName:c,toolArgs:D,toolResultContent:G,toolUpdateId:L,toolCancelledReason:M,toolIsError:N,onAppMessage:O,onUpdateModelContext:P,onRequestDock:Q,onDockable:R,onAvailableDisplayModes:S,hostDisplayMode:T,onRequestDisplayMode:U,onRequestClose:V,onRegisterTeardown:W,teardownRegistrationKey:X,docked:Y=!1,visible:Z=!0})=>{let $=(0,f.A)(),[_,aa]=(0,e.useState)(!1),[ab,ac]=(0,e.useState)(!1),[ad,ae]=(0,e.useState)(null),[af,ag]=(0,e.useState)(Y?"pip":"inline"),[ah,ai]=(0,e.useState)([]),aj=T??af,ak=(0,e.useMemo)(()=>Y?["pip","fullscreen"]:["inline","fullscreen",...Q?["pip"]:[]],[Y,Q]),al=(0,e.useRef)(null),am=(0,e.useRef)(null),an=(0,e.useRef)(null),ao=(0,e.useRef)(!1),ap=(0,e.useRef)(0),aq=(0,e.useRef)(!1),ar=(0,e.useRef)(null),as=(0,e.useRef)(null),at=(0,e.useRef)(!1),au=(0,e.useRef)(!0),av=(0,e.useRef)([]),aw=(0,e.useRef)(aj),ax=(0,e.useRef)(ak),ay=(0,e.useRef)(Promise.resolve()),az=(0,e.useRef)(void 0),aA=(0,e.useRef)({args:D,resultContent:G,cancelledReason:M,isError:N,updateId:L});aA.current={args:D,resultContent:G,cancelledReason:M,isError:N,updateId:L};let aB=(0,e.useRef)(O);(0,e.useEffect)(()=>{aB.current=O},[O]);let aC=(0,e.useRef)(P);(0,e.useEffect)(()=>{aC.current=P},[P]);let aD=(0,e.useRef)(Q);(0,e.useEffect)(()=>{aD.current=Q},[Q]);let aE=(0,e.useRef)(R);(0,e.useEffect)(()=>{aE.current=R},[R]);let aF=(0,e.useRef)(S);(0,e.useEffect)(()=>{aF.current=S},[S]);let aG=(0,e.useRef)(U);(0,e.useEffect)(()=>{aG.current=U},[U]);let aH=(0,e.useRef)(V);(0,e.useEffect)(()=>{aH.current=V},[V]);let aI=(0,e.useRef)(Y);(0,e.useEffect)(()=>{aI.current=Y},[Y]),(0,e.useEffect)(()=>{aw.current=aj},[aj]),(0,e.useEffect)(()=>{ax.current=ak},[ak]);let aJ=(0,e.useCallback)(()=>{if(as.current)return as.current;ap.current+=1;let a=an.current,b=am.current,c=aq.current;an.current=null,am.current=null,aq.current=!1,ao.current=!1,av.current=[],ar.current?.disconnect(),ar.current=null;let d=(async()=>{if(a&&c){let b;try{await Promise.race([a.teardownResource({},{timeout:1e3}),new Promise(a=>{b=setTimeout(a,1e3)})])}catch(a){w.debug("MCP App did not acknowledge resource teardown",a)}finally{b&&clearTimeout(b)}}try{await a?.close()}catch{}b?.remove()})();return as.current=d,d.finally(()=>{as.current===d&&(as.current=null)}),d},[]),aK=(0,e.useCallback)(()=>{!at.current&&aD.current&&(at.current=!0,aJ().then(()=>{au.current&&(aD.current?.(),aa(!1))}).finally(()=>{at.current=!1}))},[aJ]),aL=(0,e.useCallback)((a,b,c,d,e)=>{ay.current=ay.current.catch(()=>void 0).then(async()=>{an.current===a&&aq.current&&await H(a,b,c,d,e)}).catch(a=>{w.warn("MCP App tool delivery failed",a)})},[]),aM=(0,e.useCallback)(async()=>{if(as.current&&await as.current,ao.current||!al.current)return;let d=ap.current+1;ap.current=d;let e=()=>ap.current===d&&ao.current;ao.current=!0,ai([]),ac(!0),ae(null);try{let f,[g,h]=await Promise.all([u.S.readResourceFromApp(a,b),K(a,b,c)]);if(!e())return;if(g?.httpStatus===403)throw Error(g?.error||"MCP Apps access was disabled for this server");if(!g||!1===g.success)throw Error(g?.error||"Failed to read the UI resource.");let i=function(a,b){var c;let d,e=a?.contents;if(!Array.isArray(e)||0===e.length)throw Error("Resource has no contents");let f=e.find(a=>a.uri===b&&"string"==typeof a.mimeType&&(0,v.q$)(a.mimeType)&&("string"==typeof a.text||"string"==typeof a.blob));if(!f)throw Error(`Resource ${b} did not return MCP App HTML`);try{d="string"==typeof f.text?f.text:function(a){let b=Uint8Array.from(atob(a),a=>a.charCodeAt(0));return new TextDecoder("utf-8",{fatal:!0}).decode(b)}(f.blob)}catch{throw Error(`Resource ${b} contains invalid base64 UTF-8 HTML`)}if(new TextEncoder().encode(d).length>v.Pt)throw Error(`Resource exceeds the ${Math.round(v.Pt/1024)} KiB size cap`);let g=(f._meta??f.meta)?.ui,h=t.c0.safeParse(g?.csp);if(g?.csp!==void 0&&!h.success)throw Error(`Resource ${b} declares an invalid CSP policy`);let i=t.Ml.safeParse(g?.permissions);if(g?.permissions!==void 0&&!i.success)throw Error(`Resource ${b} declares invalid sandbox permissions`);return{html:d,csp:h.success?{connectDomains:F((c=h.data).connectDomains,["https","wss"]),resourceDomains:F(c.resourceDomains,["https"]),frameDomains:F(c.frameDomains,["https"]),baseUriDomains:F(c.baseUriDomains,["https"])}:void 0,permissions:i.success&&i.data.clipboardWrite?{clipboardWrite:{}}:void 0}}(g.data,b),j=await E();if(!e()||!al.current)return;let k=document.createElement("iframe");k.title=`MCP App: ${b}`,k.setAttribute("sandbox","allow-scripts allow-same-origin"),k.referrerPolicy="origin";let l=(0,t.Sy)(i.permissions);l&&k.setAttribute("allow",l),k.style.cssText=aI.current?"width:100%;height:100%;border:none;background:#fff;":"width:100%;min-height:120px;height:200px;border:none;border-radius:4px;background:#fff;",al.current.appendChild(k),am.current=k;let m=new URL(j);i.csp&&m.searchParams.set("csp",JSON.stringify(i.csp));let n=m.origin,o=new Promise((a,b)=>{let c=setTimeout(()=>{window.removeEventListener("message",d),b(Error("Timed out waiting for the sandbox proxy."))},1e4),d=b=>{b.source===k.contentWindow&&b.origin===n&&b.data?.jsonrpc==="2.0"&&b.data?.method==="ui/notifications/sandbox-proxy-ready"&&(clearTimeout(c),window.removeEventListener("message",d),a())};window.addEventListener("message",d)});if(k.src=m.href,await o,!e()||am.current!==k)return;let p=aw.current,q="inline";aw.current=q,f=new t.T1(function(a,b){return{getServerCapabilities:()=>({tools:{},resources:{}}),setNotificationHandler:()=>{},request:async(c,d,e)=>{let{method:f,params:g}=c;if("tools/call"===f){w.info(`MCP App tools/call: ${a}/${g?.name}`);let c=await u.S.callToolFromApp(a,g.name,g.arguments??{},void 0,e?.signal);if(c?.httpStatus===403){let a=c?.error||"MCP Apps access was disabled for this server";throw b(a),Error(a)}if(!c||!1===c.success)throw Error(c?.error||`Tool call failed: ${g?.name}`);return c.data}if("resources/read"===f){let c=await u.S.readResourceFromApp(a,g.uri);if(c?.httpStatus===403){let a=c?.error||"MCP Apps access was disabled for this server";throw b(a),Error(a)}if(!c||!1===c.success)throw Error(c?.error||`Resource read failed: ${g?.uri}`);return c.data}if("resources/list"===f)return{resources:[]};if("resources/templates/list"===f)return{resourceTemplates:[]};throw Error(`MCP App requested unsupported method: ${f}`)}}}(a,a=>{ap.current===d&&an.current===f&&(ae(a),ac(!1),aJ())}),x,{openLinks:{},serverTools:{},serverResources:{},logging:{},...aB.current?{message:{text:{}}}:{},...aC.current?{updateModelContext:{text:{},structuredContent:{}}}:{},sandbox:{csp:i.csp,permissions:i.permissions}},{hostContext:{...h?{toolInfo:h}:{},theme:"dark"===$.palette.mode?"dark":"light",platform:"web",displayMode:q,availableDisplayModes:ax.current,containerDimensions:J(al.current,aI.current),locale:navigator.language,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,userAgent:navigator.userAgent,deviceCapabilities:{touch:navigator.maxTouchPoints>0,hover:window.matchMedia?.("(hover: hover)").matches??!1}}}),an.current=f;let r=()=>e()&&an.current===f;if(f.onopenlink=async({url:c})=>{if(!r())return{isError:!0};let d=function(a){try{let b=new URL(a);if(!y.has(b.protocol)||b.username||b.password)return null;return b.href}catch{return null}}(c);if(!d)return w.warn("MCP App open-link rejected by URL policy",{serverName:a,uri:b}),{isError:!0};let e=window.open(d,"_blank","noopener,noreferrer");return e?(e.opener=null,{}):{isError:!0}},f.ondownloadfile=async({contents:a})=>{if(!r())return{isError:!0};try{for(let b of a??[]){let a,c=b?.resource;if(!c)continue;let d=("string"==typeof c.uri?c.uri.split("/").pop():"")||"download",e="string"==typeof c.mimeType?c.mimeType:"application/octet-stream";if("string"==typeof c.blob){let b=Uint8Array.from(atob(c.blob),a=>a.charCodeAt(0));a=new Blob([b],{type:e})}else a=new Blob([String(c.text??"")],{type:e});let f=URL.createObjectURL(a),g=document.createElement("a");g.href=f,g.download=d,document.body.appendChild(g),g.click(),g.remove(),setTimeout(()=>URL.revokeObjectURL(f),4e3)}return{}}catch(a){return w.warn("MCP App download failed",a),{isError:!0}}},f.onloggingmessage=a=>{r()&&w.debug("MCP App log",a?.data)},f.onmessage=async a=>{if(!r())return{};if(!aB.current)throw Error("This host cannot deliver ui/message in this surface");let b=function(a){if(a?.role!=="user")throw Error('This host accepts ui/message only with role "user"');let b=a?.content,c=Array.isArray(b)?b:b&&"object"==typeof b?[b]:[];if(0===c.length||c.some(a=>a?.type!=="text"||"string"!=typeof a.text))throw Error("This host accepts text-only ui/message content");let d=c.map(a=>a.text).join("\n").trim();if(!d)throw Error("ui/message text must not be empty");return d}(a);if(!await aB.current(b))throw Error("ui/message was not delivered");return{}},f.onupdatemodelcontext=async c=>{if(!r())return{};let d=function(a){if(!a||"object"!=typeof a||Array.isArray(a))return"ui/update-model-context params must be an object";if(void 0!==a.content){if(!Array.isArray(a.content))return"Model context content must be an array";for(let b of a.content)if(!b||"object"!=typeof b||Array.isArray(b)||!A.has(b.type))return"Model context contains a modality this host did not advertise"}return void 0!==a.structuredContent&&(!a.structuredContent||"object"!=typeof a.structuredContent||Array.isArray(a.structuredContent))?"Model structuredContent must be an object":C(a)>B?`Model context exceeds ${B} bytes`:null}(c);if(d)throw Error(d);let e=`${a}::${b}`;if(!aC.current)throw Error("This host cannot preserve model context in this surface");if(!await aC.current(e,c))throw Error("MCP App model context was not stored");return{}},f.onsizechange=async({width:a,height:b})=>{if(!r()||aI.current)return;let c=al.current?.getBoundingClientRect().width||al.current?.clientWidth||0,d=function(a,b){let c={};if(Number.isFinite(a.width)&&a.width>0){let d=Number.isFinite(b)&&b>0?b:6e3;c.width=Math.min(a.width,d,6e3)}return Number.isFinite(a.height)&&a.height>0&&(c.height=Math.min(a.height,6e3)),c}({width:a,height:b},c);void 0!==d.height&&(k.style.height=`${d.height}px`),void 0!==d.width&&(k.style.width=`${d.width}px`,k.style.maxWidth="100%")},f.onrequestdisplaymode=async({mode:a})=>{if(!r())return{mode:aw.current};let b=aw.current,c=av.current;if(!I(a,ax.current,c))return{mode:b};if("pip"===a&&!aI.current&&aD.current)return setTimeout(aK,0),{mode:b};let d=b;return(d=aG.current?await aG.current(a,[...c]):a)===b||I(d,ax.current,c)||(d=b),d!==b&&(aw.current=d,ag(d),await f.sendHostContextChange({displayMode:d})),{mode:d}},f.onrequestteardown=()=>{r()&&aJ().finally(()=>{aH.current?aH.current():(aw.current="inline",ag("inline"),aa(!1))})},f.oninitialized=()=>{if(!r())return;let a=f.getAppCapabilities()?.availableDisplayModes,b=Array.isArray(a)?[...new Set(a.filter(a=>z.includes(a)))]:[];av.current=b,ai(b),aE.current?.(b.includes("pip")),aF.current?.([...b]),aq.current=!0;let c=function(a,b,c,d){return b?I("pip",c,d)?"fullscreen"===a&&I("fullscreen",c,d)?"fullscreen":"pip":null:"fullscreen"===a&&I("fullscreen",c,d)?"fullscreen":"inline"}(p,aI.current,ax.current,b);if(null===c){ae("This app does not declare support for the canvas (pip) display mode."),ac(!1),aJ();return}aw.current=c,ag(c),c!==q&&f.sendHostContextChange({displayMode:c});let d=al.current;if(d&&"undefined"!=typeof ResizeObserver){let a=()=>{if(!r()||!aq.current)return;let a=d.getBoundingClientRect();a.width<=0||aI.current&&a.height<=0||f.sendHostContextChange({containerDimensions:J(d,aI.current)})};ar.current?.disconnect(),ar.current=new ResizeObserver(a),ar.current.observe(d),a()}let e=aA.current;az.current=e.updateId??`${e.args??""}\u0000${e.resultContent??""}\u0000${e.cancelledReason??""}\u0000${e.isError??""}`,(void 0!==e.args||void 0!==e.resultContent||void 0!==e.cancelledReason||!0===e.isError)&&aL(f,e.args,e.resultContent,e.cancelledReason,e.isError),ac(!1)},await f.connect(function(a,b){let c=new t.hJ(a,b),d={start:async()=>{c.onmessage=(a,b)=>{d.onmessage?.("ui/message"!==a.method||!a.params||Array.isArray(a.params.content)||!a.params.content||"object"!=typeof a.params.content?a:{...a,params:{...a.params,content:[a.params.content]}},b)},c.onerror=a=>d.onerror?.(a),c.onclose=()=>d.onclose?.(),await c.start()},send:(a,b)=>c.send(a,b),close:()=>c.close(),setProtocolVersion:a=>c.setProtocolVersion?.(a)};return d}(k.contentWindow,k.contentWindow)),!r())return;await f.sendSandboxResourceReady({html:i.html,csp:i.csp,permissions:i.permissions})}catch(c){if(!e())return;w.warn(`Failed to mount MCP App ${b} from ${a}`,c),ae(c instanceof Error?c.message:"Failed to load the app."),ac(!1),aJ()}},[aK,aL,a,aJ,$.palette.mode,c,b]),aN=(0,e.useCallback)(()=>{let a=!_;a||"fullscreen"!==aw.current||(aw.current="inline",ag("inline"),an.current?.sendHostContextChange({displayMode:"inline"})),aa(a),a&&setTimeout(()=>{aM()},0)},[_,aM]);if((0,e.useEffect)(()=>{Y&&!ao.current&&aM()},[Y,aM]),(0,e.useEffect)(()=>{let a=L??`${D??""}\u0000${G??""}\u0000${M??""}\u0000${N??""}`;aq.current&&an.current&&a!==az.current&&(az.current=a,aJ().then(()=>{au.current&&(aI.current||_)&&aM()}))},[_,aM,aJ,D,M,N,G,L]),(0,e.useEffect)(()=>{T&&aq.current&&an.current&&aw.current!==T&&I(T,ax.current,av.current)&&(aw.current=T,ag(T),an.current.sendHostContextChange({displayMode:T}))},[T]),(0,e.useEffect)(()=>{aq.current&&an.current&&an.current?.sendHostContextChange({theme:"dark"===$.palette.mode?"dark":"light"})},[$.palette.mode]),(0,e.useEffect)(()=>{let c=X??`${a}::${b}`;return W?.(c,aJ),()=>W?.(c,null)},[W,a,aJ,X,b]),(0,e.useEffect)(()=>{let b=b=>{let c=b.detail;c?.serverName===a&&(c.config?.enableMcpApps===!1||c.config?.disabled===!0)&&(ae("MCP Apps access was disabled for this server."),ac(!1),aJ().finally(()=>{aI.current&&aH.current?.()}))};return window.addEventListener("flujo:mcp-server-config-changed",b),()=>{window.removeEventListener("flujo:mcp-server-config-changed",b)}},[a,aJ]),(0,e.useEffect)(()=>(au.current=!0,()=>{au.current=!1,aJ()}),[aJ]),Y)return(0,d.jsxs)(g.default,{sx:{height:"100%",width:"100%",minHeight:0,display:"flex",visibility:Z?"visible":"hidden",pointerEvents:Z?"auto":"none",flexDirection:"column"},children:[ab&&(0,d.jsxs)(g.default,{sx:{display:"flex",alignItems:"center",gap:1,py:2,justifyContent:"center"},children:[(0,d.jsx)(h.default,{size:16,thickness:6}),(0,d.jsx)(i.default,{variant:"body2",color:"text.secondary",children:"Loading the app…"})]}),ad&&(0,d.jsx)(j.A,{severity:"error",sx:{m:1},children:ad}),(0,d.jsx)(g.default,{ref:al,sx:{flex:1,minHeight:0,width:"100%",display:ad?"none":"block"}})]});let aO=ah.includes("inline")&&ah.includes("fullscreen")&&ak.includes("fullscreen"),aP=ah.includes("inline")&&ah.includes("pip")&&ak.includes("pip")&&!!Q;return(0,d.jsxs)(g.default,{sx:{mt:1,border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",..."fullscreen"===af?{position:"fixed",inset:16,zIndex:1300,bgcolor:"background.paper",boxShadow:6}:{}},children:[(0,d.jsxs)(g.default,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.5,bgcolor:"action.hover"},children:[(0,d.jsx)(n.A,{fontSize:"small",color:"primary"}),(0,d.jsxs)(i.default,{variant:"body2",sx:{fontWeight:500},children:["Interactive app from ",a]}),(0,d.jsx)(k.A,{title:"Runs in a separate-origin sandbox (no access to FLUJO's origin, cookies, storage, or DOM). Its tool calls are brokered through this server only.",children:(0,d.jsx)(o.A,{fontSize:"small",color:"action"})}),(0,d.jsx)(g.default,{sx:{flex:1}}),_&&aP&&(0,d.jsx)(l.A,{size:"small",onClick:aK,children:"Canvas"}),_&&(0,d.jsx)(k.A,{title:aO?"fullscreen"===af?"Exit fullscreen":"Fullscreen":"This app did not declare inline and fullscreen support",children:(0,d.jsx)("span",{children:(0,d.jsx)(l.A,{size:"small",disabled:!aO,onClick:()=>{let a="fullscreen"===af?"inline":"fullscreen";I(a,ak,ah)&&(aw.current=a,ag(a),an.current?.sendHostContextChange({displayMode:a}))},sx:{minWidth:0},children:"fullscreen"===af?(0,d.jsx)(s.A,{fontSize:"small"}):(0,d.jsx)(r.A,{fontSize:"small"})})})}),(0,d.jsx)(l.A,{size:"small",onClick:aN,startIcon:_?(0,d.jsx)(q.A,{}):(0,d.jsx)(p.A,{}),children:_?"Hide":"Open app"})]}),(0,d.jsx)(m.A,{in:_,onExited:()=>{aJ()},children:(0,d.jsxs)(g.default,{sx:{p:1,height:"fullscreen"===af?"calc(100vh - 100px)":"auto"},children:[ab&&(0,d.jsxs)(g.default,{sx:{display:"flex",alignItems:"center",gap:1,py:2,justifyContent:"center"},children:[(0,d.jsx)(h.default,{size:16,thickness:6}),(0,d.jsx)(i.default,{variant:"body2",color:"text.secondary",children:"Loading the app…"})]}),ad&&(0,d.jsx)(j.A,{severity:"error",sx:{my:1},children:ad}),(0,d.jsx)(g.default,{ref:al,sx:{width:"100%",height:"fullscreen"===af?"100%":"auto",display:ad?"none":"block"}})]})})]})}},59060:(a,b,c)=>{c.d(b,{Gt:()=>h,Pt:()=>e,q$:()=>g});let d="ui://",e=2097152;function f(a){return"string"==typeof a&&a.length>d.length&&a.slice(0,d.length).toLowerCase()===d&&!/\s/.test(a)}function g(a){if("string"!=typeof a)return!1;let[b,...c]=a.toLowerCase().split(";");if("text/html"!==b.trim())return!1;let d=!1;for(let a of c){let b=a.indexOf("=");if(b<=0)return!1;let c=a.slice(0,b).trim(),e=a.slice(b+1).trim();if(!c||!e)return!1;if("profile"===c){if(d||"mcp-app"!==e)return!1;d=!0}}return d}function h(a){if(!a||"object"!=typeof a)return;let b=a["ui/resourceUri"];if(f(b))return b;for(let b of[a.ui,a["io.modelcontextprotocol/ui"]])if(b&&"object"==typeof b){let a=b.resourceUri;if(f(a))return a}}},82571:(a,b,c)=>{c.d(b,{Hm:()=>f,xc:()=>e,yo:()=>g});let d=["key","secret","token","password"],e=a=>d.some(b=>a.toLowerCase().includes(b)),f=a=>e(a)||"authorization"===a.trim().toLowerCase(),g=a=>{if(!a)return a;if(a.includes("_-_-_")){let b=a.split("_-_-_");return 3===b.length?b[2]:a}let b=/^mcp_(.+)_[0-9a-z]+$/.exec(a);if(b&&b[1])return b[1];let c=a.indexOf("__");return c>0&&c+2<a.length?a.slice(c+2):a}}};
1
+ "use strict";exports.id=1227,exports.ids=[1227],exports.modules={34641:(a,b,c)=>{c.d(b,{uJ:()=>B,Ay:()=>L,Yw:()=>C});var d=c(21124),e=c(38301),f=c(60839),g=c(81637),h=c(8521),i=c(79515),j=c(88745),k=c(43312),l=c(68730),m=c(99561),n=c(5748),o=c(1994),p=c(17332),q=c(63908),r=c(36636),s=c(93516),t=c(92543),u=c(28055),v=c(59060);let w=(0,c(19815).h)("frontend/components/Chat/McpAppFrame"),x={name:"FLUJO",version:"3.34.0"},y=new Set(["https:","http:"]),z=["inline","fullscreen","pip"],A=new Set(["text"]),B=262144;function C(a){try{return new TextEncoder().encode(JSON.stringify(a)).length}catch{return 1/0}}let D=null;async function E(){return D||(D=fetch("/api/mcp/app-sandbox").then(async a=>{if(!a.ok)throw Error(`Sandbox endpoint discovery failed (${a.status})`);return await a.json()}).catch(a=>{throw D=null,a})),function(a,b){let c;if("string"!=typeof a.token||0===a.token.length)throw Error("Sandbox endpoint discovery returned invalid credentials");if(void 0!==a.url){if("string"!=typeof a.url)throw Error("Sandbox endpoint discovery returned an invalid public URL");try{c=new URL(a.url)}catch{throw Error("Sandbox endpoint discovery returned an invalid public URL")}if("http:"!==c.protocol&&"https:"!==c.protocol||c.username||c.password)throw Error("Sandbox public URL must be an absolute HTTP(S) URL without credentials");if("https:"===b.protocol&&"https:"!==c.protocol)throw Error("HTTPS FLUJO deployments require an HTTPS MCP Apps sandbox URL")}else{if("http:"!==b.protocol)throw Error("MCP Apps on HTTPS require FLUJO_MCP_APP_SANDBOX_PUBLIC_URL to be configured");if(!Number.isInteger(a.port)||a.port<1||a.port>65535)throw Error("Sandbox endpoint discovery returned an invalid port");(c=new URL("/sandbox.html",b.origin)).port=String(a.port)}if(c.origin===b.origin)throw Error("MCP Apps sandbox must use a distinct origin from FLUJO");return c.searchParams.set("token",a.token),c.href}(await D,window.location)}function F(a,b){let c=[],d=new Set;for(let e of a??[]){if(0===e.length||e.length>2048||/[^\x21-\x7e]/.test(e))continue;let a=/^(https|wss):\/\/(\*\.)?([^/:?#]+)(?::(\d{1,5}))?$/i.exec(e);if(!a||!b.includes(a[1].toLowerCase()))continue;let f=a[3].split(".");if(a[3].length>253||f.some(a=>0===a.length||a.length>63||!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(a)))continue;let g=a[4]?Number(a[4]):void 0;if(void 0!==g&&(!Number.isInteger(g)||g<1||g>65535))continue;let h=e.toLowerCase();if(!d.has(h)&&(d.add(h),c.push(e),c.length>=64))break}return c}function G(a){if(a)try{return JSON.parse(a)}catch{return}}async function H(a,b,c,d,e){if(await a.sendToolInput({arguments:function(a){let b=G(a);return b&&"object"==typeof b&&!Array.isArray(b)?b:{}}(b)}),void 0!==d)return void await a.sendToolCancelled({reason:d});let f=function(a,b){if(void 0===a)return!0===b?{content:[],isError:!0}:null;let c=G(a);return c&&"object"==typeof c&&Array.isArray(c.content)?{...c,...!0===b?{isError:!0}:{}}:{content:[{type:"text",text:a}],...!0===b?{isError:!0}:{}}}(c,e);f&&await a.sendToolResult(f)}function I(a,b,c){return b.includes(a)&&c.includes(a)}function J(a,b){let c=a.getBoundingClientRect(),d=Math.max(1,Math.round(c.width||a.clientWidth||1));return b?{width:d,height:Math.max(1,Math.round(c.height||a.clientHeight||1))}:{width:d,maxHeight:6e3}}async function K(a,b,c){try{let d=await u.S.listServerTools(a),e=Array.isArray(d.tools)?d.tools:[],f=c?e.find(a=>a?.name===c):e.find(a=>(0,v.Gt)(a?._meta)===b);if(f?.name&&f?.inputSchema&&(0,v.Gt)(f._meta)===b)return{tool:f}}catch(a){w.debug("Could not resolve the full MCP App tool definition",a)}}let L=({serverName:a,uri:b,toolName:c,toolArgs:D,toolResultContent:G,toolUpdateId:L,toolCancelledReason:M,toolIsError:N,onAppMessage:O,onUpdateModelContext:P,onRequestDock:Q,onDockable:R,onAvailableDisplayModes:S,hostDisplayMode:T,onRequestDisplayMode:U,onRequestClose:V,onRegisterTeardown:W,teardownRegistrationKey:X,docked:Y=!1,visible:Z=!0})=>{let $=(0,f.A)(),[_,aa]=(0,e.useState)(!1),[ab,ac]=(0,e.useState)(!1),[ad,ae]=(0,e.useState)(null),[af,ag]=(0,e.useState)(Y?"pip":"inline"),[ah,ai]=(0,e.useState)([]),aj=T??af,ak=(0,e.useMemo)(()=>Y?["pip","fullscreen"]:["inline","fullscreen",...Q?["pip"]:[]],[Y,Q]),al=(0,e.useRef)(null),am=(0,e.useRef)(null),an=(0,e.useRef)(null),ao=(0,e.useRef)(!1),ap=(0,e.useRef)(0),aq=(0,e.useRef)(!1),ar=(0,e.useRef)(null),as=(0,e.useRef)(null),at=(0,e.useRef)(!1),au=(0,e.useRef)(!0),av=(0,e.useRef)([]),aw=(0,e.useRef)(aj),ax=(0,e.useRef)(ak),ay=(0,e.useRef)(Promise.resolve()),az=(0,e.useRef)(void 0),aA=(0,e.useRef)({args:D,resultContent:G,cancelledReason:M,isError:N,updateId:L});aA.current={args:D,resultContent:G,cancelledReason:M,isError:N,updateId:L};let aB=(0,e.useRef)(O);(0,e.useEffect)(()=>{aB.current=O},[O]);let aC=(0,e.useRef)(P);(0,e.useEffect)(()=>{aC.current=P},[P]);let aD=(0,e.useRef)(Q);(0,e.useEffect)(()=>{aD.current=Q},[Q]);let aE=(0,e.useRef)(R);(0,e.useEffect)(()=>{aE.current=R},[R]);let aF=(0,e.useRef)(S);(0,e.useEffect)(()=>{aF.current=S},[S]);let aG=(0,e.useRef)(U);(0,e.useEffect)(()=>{aG.current=U},[U]);let aH=(0,e.useRef)(V);(0,e.useEffect)(()=>{aH.current=V},[V]);let aI=(0,e.useRef)(Y);(0,e.useEffect)(()=>{aI.current=Y},[Y]),(0,e.useEffect)(()=>{aw.current=aj},[aj]),(0,e.useEffect)(()=>{ax.current=ak},[ak]);let aJ=(0,e.useCallback)(()=>{if(as.current)return as.current;ap.current+=1;let a=an.current,b=am.current,c=aq.current;an.current=null,am.current=null,aq.current=!1,ao.current=!1,av.current=[],ar.current?.disconnect(),ar.current=null;let d=(async()=>{if(a&&c){let b;try{await Promise.race([a.teardownResource({},{timeout:1e3}),new Promise(a=>{b=setTimeout(a,1e3)})])}catch(a){w.debug("MCP App did not acknowledge resource teardown",a)}finally{b&&clearTimeout(b)}}try{await a?.close()}catch{}b?.remove()})();return as.current=d,d.finally(()=>{as.current===d&&(as.current=null)}),d},[]),aK=(0,e.useCallback)(()=>{!at.current&&aD.current&&(at.current=!0,aJ().then(()=>{au.current&&(aD.current?.(),aa(!1))}).finally(()=>{at.current=!1}))},[aJ]),aL=(0,e.useCallback)((a,b,c,d,e)=>{ay.current=ay.current.catch(()=>void 0).then(async()=>{an.current===a&&aq.current&&await H(a,b,c,d,e)}).catch(a=>{w.warn("MCP App tool delivery failed",a)})},[]),aM=(0,e.useCallback)(async()=>{if(as.current&&await as.current,ao.current||!al.current)return;let d=ap.current+1;ap.current=d;let e=()=>ap.current===d&&ao.current;ao.current=!0,ai([]),ac(!0),ae(null);try{let f,[g,h]=await Promise.all([u.S.readResourceFromApp(a,b),K(a,b,c)]);if(!e())return;if(g?.httpStatus===403)throw Error(g?.error||"MCP Apps access was disabled for this server");if(!g||!1===g.success)throw Error(g?.error||"Failed to read the UI resource.");let i=function(a,b){var c;let d,e=a?.contents;if(!Array.isArray(e)||0===e.length)throw Error("Resource has no contents");let f=e.find(a=>a.uri===b&&"string"==typeof a.mimeType&&(0,v.q$)(a.mimeType)&&("string"==typeof a.text||"string"==typeof a.blob));if(!f)throw Error(`Resource ${b} did not return MCP App HTML`);try{d="string"==typeof f.text?f.text:function(a){let b=Uint8Array.from(atob(a),a=>a.charCodeAt(0));return new TextDecoder("utf-8",{fatal:!0}).decode(b)}(f.blob)}catch{throw Error(`Resource ${b} contains invalid base64 UTF-8 HTML`)}if(new TextEncoder().encode(d).length>v.Pt)throw Error(`Resource exceeds the ${Math.round(v.Pt/1024)} KiB size cap`);let g=(f._meta??f.meta)?.ui,h=t.c0.safeParse(g?.csp);if(g?.csp!==void 0&&!h.success)throw Error(`Resource ${b} declares an invalid CSP policy`);let i=t.Ml.safeParse(g?.permissions);if(g?.permissions!==void 0&&!i.success)throw Error(`Resource ${b} declares invalid sandbox permissions`);return{html:d,csp:h.success?{connectDomains:F((c=h.data).connectDomains,["https","wss"]),resourceDomains:F(c.resourceDomains,["https"]),frameDomains:F(c.frameDomains,["https"]),baseUriDomains:F(c.baseUriDomains,["https"])}:void 0,permissions:i.success&&i.data.clipboardWrite?{clipboardWrite:{}}:void 0}}(g.data,b),j=await E();if(!e()||!al.current)return;let k=document.createElement("iframe");k.title=`MCP App: ${b}`,k.setAttribute("sandbox","allow-scripts allow-same-origin"),k.referrerPolicy="origin";let l=(0,t.Sy)(i.permissions);l&&k.setAttribute("allow",l),k.style.cssText=aI.current?"width:100%;height:100%;border:none;background:#fff;":"width:100%;min-height:120px;height:200px;border:none;border-radius:4px;background:#fff;",al.current.appendChild(k),am.current=k;let m=new URL(j);i.csp&&m.searchParams.set("csp",JSON.stringify(i.csp));let n=m.origin,o=new Promise((a,b)=>{let c=setTimeout(()=>{window.removeEventListener("message",d),b(Error("Timed out waiting for the sandbox proxy."))},1e4),d=b=>{b.source===k.contentWindow&&b.origin===n&&b.data?.jsonrpc==="2.0"&&b.data?.method==="ui/notifications/sandbox-proxy-ready"&&(clearTimeout(c),window.removeEventListener("message",d),a())};window.addEventListener("message",d)});if(k.src=m.href,await o,!e()||am.current!==k)return;let p=aw.current,q="inline";aw.current=q,f=new t.T1(function(a,b){return{getServerCapabilities:()=>({tools:{},resources:{}}),setNotificationHandler:()=>{},request:async(c,d,e)=>{let{method:f,params:g}=c;if("tools/call"===f){w.info(`MCP App tools/call: ${a}/${g?.name}`);let c=await u.S.callToolFromApp(a,g.name,g.arguments??{},void 0,e?.signal);if(c?.httpStatus===403){let a=c?.error||"MCP Apps access was disabled for this server";throw b(a),Error(a)}if(!c||!1===c.success)throw Error(c?.error||`Tool call failed: ${g?.name}`);return c.data}if("resources/read"===f){let c=await u.S.readResourceFromApp(a,g.uri);if(c?.httpStatus===403){let a=c?.error||"MCP Apps access was disabled for this server";throw b(a),Error(a)}if(!c||!1===c.success)throw Error(c?.error||`Resource read failed: ${g?.uri}`);return c.data}if("resources/list"===f)return{resources:[]};if("resources/templates/list"===f)return{resourceTemplates:[]};throw Error(`MCP App requested unsupported method: ${f}`)}}}(a,a=>{ap.current===d&&an.current===f&&(ae(a),ac(!1),aJ())}),x,{openLinks:{},serverTools:{},serverResources:{},logging:{},...aB.current?{message:{text:{}}}:{},...aC.current?{updateModelContext:{text:{},structuredContent:{}}}:{},sandbox:{csp:i.csp,permissions:i.permissions}},{hostContext:{...h?{toolInfo:h}:{},theme:"dark"===$.palette.mode?"dark":"light",platform:"web",displayMode:q,availableDisplayModes:ax.current,containerDimensions:J(al.current,aI.current),locale:navigator.language,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,userAgent:navigator.userAgent,deviceCapabilities:{touch:navigator.maxTouchPoints>0,hover:window.matchMedia?.("(hover: hover)").matches??!1}}}),an.current=f;let r=()=>e()&&an.current===f;if(f.onopenlink=async({url:c})=>{if(!r())return{isError:!0};let d=function(a){try{let b=new URL(a);if(!y.has(b.protocol)||b.username||b.password)return null;return b.href}catch{return null}}(c);if(!d)return w.warn("MCP App open-link rejected by URL policy",{serverName:a,uri:b}),{isError:!0};let e=window.open(d,"_blank","noopener,noreferrer");return e?(e.opener=null,{}):{isError:!0}},f.ondownloadfile=async({contents:a})=>{if(!r())return{isError:!0};try{for(let b of a??[]){let a,c=b?.resource;if(!c)continue;let d=("string"==typeof c.uri?c.uri.split("/").pop():"")||"download",e="string"==typeof c.mimeType?c.mimeType:"application/octet-stream";if("string"==typeof c.blob){let b=Uint8Array.from(atob(c.blob),a=>a.charCodeAt(0));a=new Blob([b],{type:e})}else a=new Blob([String(c.text??"")],{type:e});let f=URL.createObjectURL(a),g=document.createElement("a");g.href=f,g.download=d,document.body.appendChild(g),g.click(),g.remove(),setTimeout(()=>URL.revokeObjectURL(f),4e3)}return{}}catch(a){return w.warn("MCP App download failed",a),{isError:!0}}},f.onloggingmessage=a=>{r()&&w.debug("MCP App log",a?.data)},f.onmessage=async a=>{if(!r())return{};if(!aB.current)throw Error("This host cannot deliver ui/message in this surface");let b=function(a){if(a?.role!=="user")throw Error('This host accepts ui/message only with role "user"');let b=a?.content,c=Array.isArray(b)?b:b&&"object"==typeof b?[b]:[];if(0===c.length||c.some(a=>a?.type!=="text"||"string"!=typeof a.text))throw Error("This host accepts text-only ui/message content");let d=c.map(a=>a.text).join("\n").trim();if(!d)throw Error("ui/message text must not be empty");return d}(a);if(!await aB.current(b))throw Error("ui/message was not delivered");return{}},f.onupdatemodelcontext=async c=>{if(!r())return{};let d=function(a){if(!a||"object"!=typeof a||Array.isArray(a))return"ui/update-model-context params must be an object";if(void 0!==a.content){if(!Array.isArray(a.content))return"Model context content must be an array";for(let b of a.content)if(!b||"object"!=typeof b||Array.isArray(b)||!A.has(b.type))return"Model context contains a modality this host did not advertise"}return void 0!==a.structuredContent&&(!a.structuredContent||"object"!=typeof a.structuredContent||Array.isArray(a.structuredContent))?"Model structuredContent must be an object":C(a)>B?`Model context exceeds ${B} bytes`:null}(c);if(d)throw Error(d);let e=`${a}::${b}`;if(!aC.current)throw Error("This host cannot preserve model context in this surface");if(!await aC.current(e,c))throw Error("MCP App model context was not stored");return{}},f.onsizechange=async({width:a,height:b})=>{if(!r()||aI.current)return;let c=al.current?.getBoundingClientRect().width||al.current?.clientWidth||0,d=function(a,b){let c={};if(Number.isFinite(a.width)&&a.width>0){let d=Number.isFinite(b)&&b>0?b:6e3;c.width=Math.min(a.width,d,6e3)}return Number.isFinite(a.height)&&a.height>0&&(c.height=Math.min(a.height,6e3)),c}({width:a,height:b},c);void 0!==d.height&&(k.style.height=`${d.height}px`),void 0!==d.width&&(k.style.width=`${d.width}px`,k.style.maxWidth="100%")},f.onrequestdisplaymode=async({mode:a})=>{if(!r())return{mode:aw.current};let b=aw.current,c=av.current;if(!I(a,ax.current,c))return{mode:b};if("pip"===a&&!aI.current&&aD.current)return setTimeout(aK,0),{mode:b};let d=b;return(d=aG.current?await aG.current(a,[...c]):a)===b||I(d,ax.current,c)||(d=b),d!==b&&(aw.current=d,ag(d),await f.sendHostContextChange({displayMode:d})),{mode:d}},f.onrequestteardown=()=>{r()&&aJ().finally(()=>{aH.current?aH.current():(aw.current="inline",ag("inline"),aa(!1))})},f.oninitialized=()=>{if(!r())return;let a=f.getAppCapabilities()?.availableDisplayModes,b=Array.isArray(a)?[...new Set(a.filter(a=>z.includes(a)))]:[];av.current=b,ai(b),aE.current?.(b.includes("pip")),aF.current?.([...b]),aq.current=!0;let c=function(a,b,c,d){return b?I("pip",c,d)?"fullscreen"===a&&I("fullscreen",c,d)?"fullscreen":"pip":null:"fullscreen"===a&&I("fullscreen",c,d)?"fullscreen":"inline"}(p,aI.current,ax.current,b);if(null===c){ae("This app does not declare support for the canvas (pip) display mode."),ac(!1),aJ();return}aw.current=c,ag(c),c!==q&&f.sendHostContextChange({displayMode:c});let d=al.current;if(d&&"undefined"!=typeof ResizeObserver){let a=()=>{if(!r()||!aq.current)return;let a=d.getBoundingClientRect();a.width<=0||aI.current&&a.height<=0||f.sendHostContextChange({containerDimensions:J(d,aI.current)})};ar.current?.disconnect(),ar.current=new ResizeObserver(a),ar.current.observe(d),a()}let e=aA.current;az.current=e.updateId??`${e.args??""}\u0000${e.resultContent??""}\u0000${e.cancelledReason??""}\u0000${e.isError??""}`,(void 0!==e.args||void 0!==e.resultContent||void 0!==e.cancelledReason||!0===e.isError)&&aL(f,e.args,e.resultContent,e.cancelledReason,e.isError),ac(!1)},await f.connect(function(a,b){let c=new t.hJ(a,b),d={start:async()=>{c.onmessage=(a,b)=>{d.onmessage?.("ui/message"!==a.method||!a.params||Array.isArray(a.params.content)||!a.params.content||"object"!=typeof a.params.content?a:{...a,params:{...a.params,content:[a.params.content]}},b)},c.onerror=a=>d.onerror?.(a),c.onclose=()=>d.onclose?.(),await c.start()},send:(a,b)=>c.send(a,b),close:()=>c.close(),setProtocolVersion:a=>c.setProtocolVersion?.(a)};return d}(k.contentWindow,k.contentWindow)),!r())return;await f.sendSandboxResourceReady({html:i.html,csp:i.csp,permissions:i.permissions})}catch(c){if(!e())return;w.warn(`Failed to mount MCP App ${b} from ${a}`,c),ae(c instanceof Error?c.message:"Failed to load the app."),ac(!1),aJ()}},[aK,aL,a,aJ,$.palette.mode,c,b]),aN=(0,e.useCallback)(()=>{let a=!_;a||"fullscreen"!==aw.current||(aw.current="inline",ag("inline"),an.current?.sendHostContextChange({displayMode:"inline"})),aa(a),a&&setTimeout(()=>{aM()},0)},[_,aM]);if((0,e.useEffect)(()=>{Y&&!ao.current&&aM()},[Y,aM]),(0,e.useEffect)(()=>{let a=L??`${D??""}\u0000${G??""}\u0000${M??""}\u0000${N??""}`;aq.current&&an.current&&a!==az.current&&(az.current=a,aJ().then(()=>{au.current&&(aI.current||_)&&aM()}))},[_,aM,aJ,D,M,N,G,L]),(0,e.useEffect)(()=>{T&&aq.current&&an.current&&aw.current!==T&&I(T,ax.current,av.current)&&(aw.current=T,ag(T),an.current.sendHostContextChange({displayMode:T}))},[T]),(0,e.useEffect)(()=>{aq.current&&an.current&&an.current?.sendHostContextChange({theme:"dark"===$.palette.mode?"dark":"light"})},[$.palette.mode]),(0,e.useEffect)(()=>{let c=X??`${a}::${b}`;return W?.(c,aJ),()=>W?.(c,null)},[W,a,aJ,X,b]),(0,e.useEffect)(()=>{let b=b=>{let c=b.detail;c?.serverName===a&&(c.config?.enableMcpApps===!1||c.config?.disabled===!0)&&(ae("MCP Apps access was disabled for this server."),ac(!1),aJ().finally(()=>{aI.current&&aH.current?.()}))};return window.addEventListener("flujo:mcp-server-config-changed",b),()=>{window.removeEventListener("flujo:mcp-server-config-changed",b)}},[a,aJ]),(0,e.useEffect)(()=>(au.current=!0,()=>{au.current=!1,aJ()}),[aJ]),Y)return(0,d.jsxs)(g.default,{sx:{height:"100%",width:"100%",minHeight:0,display:"flex",visibility:Z?"visible":"hidden",pointerEvents:Z?"auto":"none",flexDirection:"column"},children:[ab&&(0,d.jsxs)(g.default,{sx:{display:"flex",alignItems:"center",gap:1,py:2,justifyContent:"center"},children:[(0,d.jsx)(h.default,{size:16,thickness:6}),(0,d.jsx)(i.default,{variant:"body2",color:"text.secondary",children:"Loading the app…"})]}),ad&&(0,d.jsx)(j.A,{severity:"error",sx:{m:1},children:ad}),(0,d.jsx)(g.default,{ref:al,sx:{flex:1,minHeight:0,width:"100%",display:ad?"none":"block"}})]});let aO=ah.includes("inline")&&ah.includes("fullscreen")&&ak.includes("fullscreen"),aP=ah.includes("inline")&&ah.includes("pip")&&ak.includes("pip")&&!!Q;return(0,d.jsxs)(g.default,{sx:{mt:1,border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",..."fullscreen"===af?{position:"fixed",inset:16,zIndex:1300,bgcolor:"background.paper",boxShadow:6}:{}},children:[(0,d.jsxs)(g.default,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.5,bgcolor:"action.hover"},children:[(0,d.jsx)(n.A,{fontSize:"small",color:"primary"}),(0,d.jsxs)(i.default,{variant:"body2",sx:{fontWeight:500},children:["Interactive app from ",a]}),(0,d.jsx)(k.A,{title:"Runs in a separate-origin sandbox (no access to FLUJO's origin, cookies, storage, or DOM). Its tool calls are brokered through this server only.",children:(0,d.jsx)(o.A,{fontSize:"small",color:"action"})}),(0,d.jsx)(g.default,{sx:{flex:1}}),_&&aP&&(0,d.jsx)(l.A,{size:"small",onClick:aK,children:"Canvas"}),_&&(0,d.jsx)(k.A,{title:aO?"fullscreen"===af?"Exit fullscreen":"Fullscreen":"This app did not declare inline and fullscreen support",children:(0,d.jsx)("span",{children:(0,d.jsx)(l.A,{size:"small",disabled:!aO,onClick:()=>{let a="fullscreen"===af?"inline":"fullscreen";I(a,ak,ah)&&(aw.current=a,ag(a),an.current?.sendHostContextChange({displayMode:a}))},sx:{minWidth:0},children:"fullscreen"===af?(0,d.jsx)(s.A,{fontSize:"small"}):(0,d.jsx)(r.A,{fontSize:"small"})})})}),(0,d.jsx)(l.A,{size:"small",onClick:aN,startIcon:_?(0,d.jsx)(q.A,{}):(0,d.jsx)(p.A,{}),children:_?"Hide":"Open app"})]}),(0,d.jsx)(m.A,{in:_,onExited:()=>{aJ()},children:(0,d.jsxs)(g.default,{sx:{p:1,height:"fullscreen"===af?"calc(100vh - 100px)":"auto"},children:[ab&&(0,d.jsxs)(g.default,{sx:{display:"flex",alignItems:"center",gap:1,py:2,justifyContent:"center"},children:[(0,d.jsx)(h.default,{size:16,thickness:6}),(0,d.jsx)(i.default,{variant:"body2",color:"text.secondary",children:"Loading the app…"})]}),ad&&(0,d.jsx)(j.A,{severity:"error",sx:{my:1},children:ad}),(0,d.jsx)(g.default,{ref:al,sx:{width:"100%",height:"fullscreen"===af?"100%":"auto",display:ad?"none":"block"}})]})})]})}},59060:(a,b,c)=>{c.d(b,{Gt:()=>h,Pt:()=>e,q$:()=>g});let d="ui://",e=2097152;function f(a){return"string"==typeof a&&a.length>d.length&&a.slice(0,d.length).toLowerCase()===d&&!/\s/.test(a)}function g(a){if("string"!=typeof a)return!1;let[b,...c]=a.toLowerCase().split(";");if("text/html"!==b.trim())return!1;let d=!1;for(let a of c){let b=a.indexOf("=");if(b<=0)return!1;let c=a.slice(0,b).trim(),e=a.slice(b+1).trim();if(!c||!e)return!1;if("profile"===c){if(d||"mcp-app"!==e)return!1;d=!0}}return d}function h(a){if(!a||"object"!=typeof a)return;let b=a["ui/resourceUri"];if(f(b))return b;for(let b of[a.ui,a["io.modelcontextprotocol/ui"]])if(b&&"object"==typeof b){let a=b.resourceUri;if(f(a))return a}}},82571:(a,b,c)=>{c.d(b,{Hm:()=>f,xc:()=>e,yo:()=>g});let d=["key","secret","token","password"],e=a=>d.some(b=>a.toLowerCase().includes(b)),f=a=>e(a)||"authorization"===a.trim().toLowerCase(),g=a=>{if(!a)return a;if(a.includes("_-_-_")){let b=a.split("_-_-_");return 3===b.length?b[2]:a}let b=/^mcp_(.+)_[0-9a-z]+$/.exec(a);if(b&&b[1])return b[1];let c=a.indexOf("__");return c>0&&c+2<a.length?a.slice(c+2):a}}};