reflex-agent 0.18.2 → 0.19.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 (313) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +101 -102
  3. package/.next/app-path-routes-manifest.json +9 -9
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/react-loadable-manifest.json +1 -1
  7. package/.next/required-server-files.json +2 -1
  8. package/.next/server/app/_not-found/page.js +1 -1
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/agents/[agentId]/page.js +2 -2
  12. package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
  13. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/agents/[agentId]/respond/route.js +1 -1
  15. package/.next/server/app/api/agents/[agentId]/respond/route.js.nft.json +1 -1
  16. package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/images/[rootId]/[file]/route.js +1 -1
  18. package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/oauth/callback/route.js +2 -2
  20. package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/oauth/start/route.js +1 -1
  22. package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/roots/[id]/attachments/route.js +0 -0
  24. package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +1 -1
  26. package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js.nft.json +1 -1
  27. package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +1 -1
  29. package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js.nft.json +1 -1
  30. package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +2 -2
  32. package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js.nft.json +1 -1
  33. package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -1
  35. package/.next/server/app/api/roots/[id]/dashboard/route.js.nft.json +1 -1
  36. package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -1
  38. package/.next/server/app/api/roots/[id]/suggestions/route.js.nft.json +1 -1
  39. package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +1 -1
  42. package/.next/server/app/api/utilities/[scope]/[id]/host/route.js.nft.json +1 -1
  43. package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/utilities/install-archive/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/audit/page.js +2 -2
  50. package/.next/server/app/audit/page.js.nft.json +1 -1
  51. package/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/dispatcher/page.js +2 -2
  53. package/.next/server/app/dispatcher/page.js.nft.json +1 -1
  54. package/.next/server/app/dispatcher/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/onboarding/page.js +3 -3
  56. package/.next/server/app/onboarding/page.js.nft.json +1 -1
  57. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/page.js +2 -2
  59. package/.next/server/app/page.js.nft.json +1 -1
  60. package/.next/server/app/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/roots/[id]/chat/[topicId]/page.js +2 -2
  62. package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -1
  63. package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -1
  64. package/.next/server/app/roots/[id]/kb/[...slug]/page.js +2 -2
  65. package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -1
  66. package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -1
  67. package/.next/server/app/roots/[id]/memory/page.js +2 -2
  68. package/.next/server/app/roots/[id]/memory/page.js.nft.json +1 -1
  69. package/.next/server/app/roots/[id]/memory/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/roots/[id]/page.js +4 -4
  71. package/.next/server/app/roots/[id]/page.js.nft.json +1 -1
  72. package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -2
  74. package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -1
  75. package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/roots/[id]/workflows/page.js +2 -2
  77. package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -1
  78. package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -1
  79. package/.next/server/app/roots/new/page.js +4 -4
  80. package/.next/server/app/roots/new/page.js.nft.json +1 -1
  81. package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/settings/page.js +5 -5
  83. package/.next/server/app/settings/page.js.nft.json +1 -1
  84. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  85. package/.next/server/app/share/[id]/file/page.js +2 -2
  86. package/.next/server/app/share/[id]/file/page.js.nft.json +1 -1
  87. package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -1
  88. package/.next/server/app/share/[id]/page.js +2 -2
  89. package/.next/server/app/share/[id]/page.js.nft.json +1 -1
  90. package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -1
  91. package/.next/server/app/utilities/[scope]/[id]/page.js +2 -2
  92. package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -1
  93. package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/utilities/page.js +2 -2
  95. package/.next/server/app/utilities/page.js.nft.json +1 -1
  96. package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
  97. package/.next/server/app-paths-manifest.json +9 -9
  98. package/.next/server/chunks/{6435.js → 1088.js} +1 -1
  99. package/.next/server/chunks/1105.js +1 -1
  100. package/.next/server/chunks/1179.js +1 -0
  101. package/.next/server/chunks/1223.js +1 -1
  102. package/.next/server/chunks/1244.js +1 -1
  103. package/.next/server/chunks/1281.js +80 -0
  104. package/.next/server/chunks/1336.js +252 -0
  105. package/.next/server/chunks/1353.js +51 -0
  106. package/.next/server/chunks/1431.js +1 -0
  107. package/.next/server/chunks/146.js +2 -0
  108. package/.next/server/chunks/1491.js +79 -0
  109. package/.next/server/chunks/1496.js +148 -0
  110. package/.next/server/chunks/{9631.js → 1589.js} +2 -2
  111. package/.next/server/chunks/1623.js +1 -0
  112. package/.next/server/chunks/1862.js +77 -0
  113. package/.next/server/chunks/1888.js +1 -1
  114. package/.next/server/chunks/1908.js +1 -0
  115. package/.next/server/chunks/192.js +1 -0
  116. package/.next/server/chunks/2069.js +1 -0
  117. package/.next/server/chunks/2087.js +24 -0
  118. package/.next/server/chunks/209.js +1 -0
  119. package/.next/server/chunks/2115.js +77 -0
  120. package/.next/server/chunks/2232.js +80 -0
  121. package/.next/server/chunks/{4460.js → 2262.js} +2 -2
  122. package/.next/server/chunks/2280.js +1 -0
  123. package/.next/server/chunks/2433.js +1 -1
  124. package/.next/server/chunks/2485.js +3 -8
  125. package/.next/server/chunks/2503.js +1 -1
  126. package/.next/server/chunks/2539.js +93 -0
  127. package/.next/server/chunks/2764.js +80 -0
  128. package/.next/server/chunks/285.js +24 -75
  129. package/.next/server/chunks/2888.js +7 -0
  130. package/.next/server/chunks/302.js +1 -0
  131. package/.next/server/chunks/3029.js +36 -0
  132. package/.next/server/chunks/3110.js +0 -0
  133. package/.next/server/chunks/3117.js +1 -0
  134. package/.next/server/chunks/3258.js +23 -0
  135. package/.next/server/chunks/331.js +1 -0
  136. package/.next/server/chunks/3332.js +1 -1
  137. package/.next/server/chunks/{4251.js → 3474.js} +24 -25
  138. package/.next/server/chunks/3552.js +43 -0
  139. package/.next/server/chunks/3583.js +104 -0
  140. package/.next/server/chunks/3631.js +1 -0
  141. package/.next/server/chunks/3633.js +1 -0
  142. package/.next/server/chunks/383.js +1 -80
  143. package/.next/server/chunks/3834.js +1 -1
  144. package/.next/server/chunks/3953.js +1 -0
  145. package/.next/server/chunks/3992.js +1 -0
  146. package/.next/server/chunks/4013.js +1 -0
  147. package/.next/server/chunks/4031.js +3 -3
  148. package/.next/server/chunks/4119.js +1 -0
  149. package/.next/server/chunks/4230.js +12 -0
  150. package/.next/server/chunks/4250.js +1 -0
  151. package/.next/server/chunks/4294.js +1 -0
  152. package/.next/server/chunks/4312.js +1 -0
  153. package/.next/server/chunks/4342.js +1 -0
  154. package/.next/server/chunks/4360.js +1 -0
  155. package/.next/server/chunks/449.js +226 -0
  156. package/.next/server/chunks/4578.js +0 -0
  157. package/.next/server/chunks/4585.js +1 -0
  158. package/.next/server/chunks/4611.js +1 -1
  159. package/.next/server/chunks/4639.js +1 -0
  160. package/.next/server/chunks/4682.js +1 -0
  161. package/.next/server/chunks/4788.js +153 -0
  162. package/.next/server/chunks/4812.js +2 -2
  163. package/.next/server/chunks/4925.js +1 -1
  164. package/.next/server/chunks/4952.js +1 -0
  165. package/.next/server/chunks/4969.js +4 -1
  166. package/.next/server/chunks/4989.js +801 -0
  167. package/.next/server/chunks/5211.js +64 -0
  168. package/.next/server/chunks/5243.js +1 -1
  169. package/.next/server/chunks/5308.js +1 -0
  170. package/.next/server/chunks/5461.js +1 -0
  171. package/.next/server/chunks/5549.js +1 -0
  172. package/.next/server/chunks/5719.js +34 -0
  173. package/.next/server/chunks/5810.js +12 -0
  174. package/.next/server/chunks/5922.js +1 -0
  175. package/.next/server/chunks/6142.js +1 -1
  176. package/.next/server/chunks/6216.js +1 -1
  177. package/.next/server/chunks/6318.js +9 -0
  178. package/.next/server/chunks/6483.js +1 -1
  179. package/.next/server/chunks/6509.js +1 -0
  180. package/.next/server/chunks/6571.js +166 -0
  181. package/.next/server/chunks/660.js +1 -0
  182. package/.next/server/chunks/6692.js +1 -0
  183. package/.next/server/chunks/6730.js +1 -1
  184. package/.next/server/chunks/6852.js +1 -0
  185. package/.next/server/chunks/6970.js +1 -0
  186. package/.next/server/chunks/7007.js +1 -0
  187. package/.next/server/chunks/7188.js +1 -1
  188. package/.next/server/chunks/7220.js +1 -1
  189. package/.next/server/chunks/7228.js +1 -0
  190. package/.next/server/chunks/7244.js +1 -0
  191. package/.next/server/chunks/7373.js +90 -0
  192. package/.next/server/chunks/7430.js +1 -1
  193. package/.next/server/chunks/7523.js +1 -0
  194. package/.next/server/chunks/7576.js +1 -0
  195. package/.next/server/chunks/7742.js +7 -0
  196. package/.next/server/chunks/7811.js +215 -0
  197. package/.next/server/chunks/7885.js +1 -0
  198. package/.next/server/chunks/8032.js +3 -0
  199. package/.next/server/chunks/8095.js +24 -0
  200. package/.next/server/chunks/8129.js +5 -0
  201. package/.next/server/chunks/8294.js +1 -0
  202. package/.next/server/chunks/832.js +1 -0
  203. package/.next/server/chunks/8464.js +180 -0
  204. package/.next/server/chunks/8511.js +0 -0
  205. package/.next/server/chunks/8514.js +1 -1
  206. package/.next/server/chunks/8583.js +4 -0
  207. package/.next/server/chunks/8609.js +55 -0
  208. package/.next/server/chunks/8711.js +1 -0
  209. package/.next/server/chunks/8714.js +1 -0
  210. package/.next/server/chunks/8730.js +1 -0
  211. package/.next/server/chunks/8868.js +1 -0
  212. package/.next/server/chunks/9048.js +1 -0
  213. package/.next/server/chunks/9058.js +1 -0
  214. package/.next/server/chunks/9062.js +1 -0
  215. package/.next/server/chunks/9094.js +1 -0
  216. package/.next/server/chunks/9098.js +1 -1
  217. package/.next/server/chunks/9099.js +1 -0
  218. package/.next/server/chunks/9171.js +287 -0
  219. package/.next/server/chunks/9181.js +1 -0
  220. package/.next/server/chunks/9293.js +1 -1
  221. package/.next/server/chunks/9478.js +1 -0
  222. package/.next/server/chunks/9494.js +141 -0
  223. package/.next/server/chunks/952.js +1 -0
  224. package/.next/server/chunks/9600.js +1 -0
  225. package/.next/server/chunks/9607.js +29 -0
  226. package/.next/server/chunks/9653.js +115 -0
  227. package/.next/server/chunks/9784.js +1 -0
  228. package/.next/server/chunks/9798.js +1 -0
  229. package/.next/server/chunks/9990.js +1 -0
  230. package/.next/server/edge-instrumentation.js +2 -0
  231. package/.next/server/edge-instrumentation.js.map +1 -0
  232. package/.next/server/functions-config-manifest.json +3 -3
  233. package/.next/server/instrumentation.js +1 -0
  234. package/.next/server/instrumentation.js.nft.json +1 -0
  235. package/.next/server/middleware-build-manifest.js +1 -1
  236. package/.next/server/middleware-manifest.json +6 -5
  237. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  238. package/.next/server/pages/500.html +1 -1
  239. package/.next/server/pages/_error.js +3 -3
  240. package/.next/server/server-reference-manifest.js +1 -1
  241. package/.next/server/server-reference-manifest.json +1 -1
  242. package/.next/static/chunks/3363-f417b308a8cd156d.js +1 -0
  243. package/.next/static/chunks/3686-0107521d2c14950c.js +1 -0
  244. package/.next/static/chunks/3695-3576767108de7f38.js +1 -0
  245. package/.next/static/chunks/4108.19abaa6d618295ed.js +1 -0
  246. package/.next/static/chunks/5933-4013a6dab4565b5e.js +1 -0
  247. package/.next/static/chunks/7425-9684ea815b4b1731.js +1 -0
  248. package/.next/static/chunks/7552-def8a17828891c8c.js +1 -0
  249. package/.next/static/chunks/8776-2df966dd98c68fd7.js +1 -0
  250. package/.next/static/chunks/app/layout-baad68d32b917b8f.js +1 -0
  251. package/.next/static/chunks/app/onboarding/page-b1b1e6a4467ed781.js +1 -0
  252. package/.next/static/chunks/app/page-556a2139313c3c71.js +1 -0
  253. package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-52223811258d07b2.js +1 -0
  254. package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-0df769f27549cd16.js +1 -0
  255. package/.next/static/chunks/app/roots/[id]/memory/{page-4edc11023d8a13fd.js → page-1f6bc3a624b141a5.js} +1 -1
  256. package/.next/static/chunks/app/roots/[id]/page-17493991b2d391b3.js +1 -0
  257. package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-a21fe3541418a80a.js +1 -0
  258. package/.next/static/chunks/app/roots/[id]/workflows/page-0952e5fb53d53c3e.js +1 -0
  259. package/.next/static/chunks/app/roots/new/{page-98d64261cc2ae2a1.js → page-4f571184c1856103.js} +1 -1
  260. package/.next/static/chunks/app/settings/page-8c0ad1c1856da988.js +1 -0
  261. package/.next/static/chunks/app/share/[id]/page-b27a0bc7b9c6cda9.js +1 -0
  262. package/.next/static/chunks/app/utilities/[scope]/[id]/page-0fe4c377098064d5.js +1 -0
  263. package/.next/static/chunks/app/utilities/page-445933dcd5a500ae.js +1 -0
  264. package/.next/static/chunks/{webpack-dbfe1e5d0f7f7a98.js → webpack-88066a85eb2d605f.js} +1 -1
  265. package/.next/trace +116 -90
  266. package/dist/lib/reflex/ids.js +66 -0
  267. package/dist/lib/reflex/ids.js.map +1 -0
  268. package/dist/lib/reflex/paths.js +26 -0
  269. package/dist/lib/reflex/paths.js.map +1 -1
  270. package/dist/lib/reflex/store/json-store.js +50 -0
  271. package/dist/lib/reflex/store/json-store.js.map +1 -0
  272. package/package.json +10 -6
  273. package/.next/server/chunks/133.js +0 -1
  274. package/.next/server/chunks/1358.js +0 -1
  275. package/.next/server/chunks/2389.js +0 -4
  276. package/.next/server/chunks/2787.js +0 -1
  277. package/.next/server/chunks/3240.js +0 -1
  278. package/.next/server/chunks/3295.js +0 -1
  279. package/.next/server/chunks/4842.js +0 -1
  280. package/.next/server/chunks/5319.js +0 -1
  281. package/.next/server/chunks/5543.js +0 -1
  282. package/.next/server/chunks/569.js +0 -1
  283. package/.next/server/chunks/6356.js +0 -3
  284. package/.next/server/chunks/7229.js +0 -2
  285. package/.next/server/chunks/7607.js +0 -1
  286. package/.next/server/chunks/8040.js +0 -1
  287. package/.next/server/chunks/8124.js +0 -1
  288. package/.next/server/chunks/8576.js +0 -7
  289. package/.next/server/chunks/9809.js +0 -1
  290. package/.next/server/chunks/9835.js +0 -1
  291. package/.next/static/chunks/2885-3b6efe9070ae7699.js +0 -1
  292. package/.next/static/chunks/334-e9ffb96d6720ee5b.js +0 -1
  293. package/.next/static/chunks/4108.a04c1e0b768f6392.js +0 -1
  294. package/.next/static/chunks/5371-f2503fe0dffea57d.js +0 -1
  295. package/.next/static/chunks/5744-eccd279a734c778c.js +0 -1
  296. package/.next/static/chunks/6568-e4d2de23d9f8d347.js +0 -1
  297. package/.next/static/chunks/6642-02be14d0b5ca62b7.js +0 -1
  298. package/.next/static/chunks/8566-5d4c89b722d9cee1.js +0 -1
  299. package/.next/static/chunks/8775-890699c74c28df61.js +0 -1
  300. package/.next/static/chunks/app/layout-48a6fb46c228b814.js +0 -1
  301. package/.next/static/chunks/app/onboarding/page-06103f281ff3f063.js +0 -1
  302. package/.next/static/chunks/app/page-eed31ba1b952cf24.js +0 -1
  303. package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-5fc17c5819406917.js +0 -1
  304. package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-a52b2005a7e538ca.js +0 -1
  305. package/.next/static/chunks/app/roots/[id]/page-0f0d498f4b4bd7bf.js +0 -1
  306. package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-f93d6b1bb29e79f0.js +0 -1
  307. package/.next/static/chunks/app/roots/[id]/workflows/page-562913d54bcd08d5.js +0 -1
  308. package/.next/static/chunks/app/settings/page-7a4d8a407fbe5ed8.js +0 -1
  309. package/.next/static/chunks/app/share/[id]/page-a0540dba09771e84.js +0 -1
  310. package/.next/static/chunks/app/utilities/[scope]/[id]/page-2cee9be029f211c6.js +0 -1
  311. package/.next/static/chunks/app/utilities/page-197156f16167514e.js +0 -1
  312. /package/.next/static/{kKiRbrTiD77WXduAvKNfN → EXoiX_YvMRCB6oNXqJnaz}/_buildManifest.js +0 -0
  313. /package/.next/static/{kKiRbrTiD77WXduAvKNfN → EXoiX_YvMRCB6oNXqJnaz}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";exports.id=1623,exports.ids=[1623,4119,9094],exports.modules={21623:(a,b,c)=>{c.d(b,{getAccessToken:()=>g}),c(77598);var d=c(94119),e=c(59094);let f=globalThis.__reflexOAuthPending??new Map;async function g(a){let b=await (0,d.getOAuthProvider)(a);if(!b)throw Error(`unknown provider: ${a}`);let c=await (0,e.getOAuthTokens)(a);if(!c)throw Error(`provider "${a}" not authorized — open Settings → OAuth and click Authorize`);if(!(void 0!==c.expiresAt&&c.expiresAt-6e4<Date.now()))return c.accessToken;if(!c.refreshToken)throw Error(`access token for "${a}" expired and no refresh_token — re-authorize`);let f=await (0,e.tY)(a);if(!f)throw Error(`OAuth client for "${a}" is not configured`);let g=new URLSearchParams({grant_type:"refresh_token",refresh_token:c.refreshToken,client_id:f.clientId});b.needsClientSecret&&f.clientSecret&&g.set("client_secret",f.clientSecret);let i=await h(b,f,g),j={accessToken:i.accessToken,refreshToken:i.refreshToken??c.refreshToken,...void 0!==i.expiresAt?{expiresAt:i.expiresAt}:{},...i.scope?{scope:i.scope}:c.scope?{scope:c.scope}:{},...i.tokenType?{tokenType:i.tokenType}:c.tokenType?{tokenType:c.tokenType}:{}};return await (0,e.Dt)(a,j),j.accessToken}async function h(a,b,c){let d,e=b.tokenUrl??a.tokenUrl,f=await fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:c.toString()}),g=await f.text();if(!f.ok)throw Error(`token endpoint HTTP ${f.status}: ${g.slice(0,500)}`);if(g.trim().startsWith("{"))d=JSON.parse(g);else for(let[a,b]of(d={},new URLSearchParams(g)))d[a]=b;if(d.error)throw Error(`OAuth error: ${d.error}${d.error_description?` — ${d.error_description}`:""}`);let h="string"==typeof d.access_token?d.access_token:null;if(!h)throw Error(`token endpoint returned no access_token (${g.slice(0,200)})`);let i="number"==typeof d.expires_in?d.expires_in:"string"==typeof d.expires_in?Number(d.expires_in):void 0;return{accessToken:h,..."string"==typeof d.refresh_token?{refreshToken:d.refresh_token}:{},...void 0!==i&&!Number.isNaN(i)?{expiresAt:Date.now()+1e3*i}:{},..."string"==typeof d.scope?{scope:d.scope}:{},..."string"==typeof d.token_type?{tokenType:d.token_type}:{}}}globalThis.__reflexOAuthPending=f},59094:(a,b,c)=>{c.d(b,{Dt:()=>p,getOAuthTokens:()=>q,tY:()=>o});var d=c(73024),e=c(76760),f=c.n(e);c(94119);var g=c(63647),h=c(13250);let i=f().join((0,g._)(),"oauth"),j=f().join(i,"clients"),k=f().join(i,"tokens");function l(a){return f().join(k,`${a}.json`)}async function m(a,b){await (0,h.An)(a,b,{mode:384})}async function n(a){try{let b=await d.promises.readFile(a,"utf8");return JSON.parse(b)}catch{return null}}async function o(a){return n(f().join(j,`${a}.json`))}async function p(a,b){await m(l(a),{...b,updatedAt:new Date().toISOString()})}async function q(a){return n(l(a))}},94119:(a,b,c)=>{c.d(b,{getOAuthProvider:()=>r,isOAuthProviderId:()=>s});var d=c(73024),e=c(48161),f=c.n(e),g=c(76760),h=c.n(g),i=c(15734);let j=i.Ik({title:i.Yj().min(1).max(200),body:i.Yj().max(2e3).optional(),field:i.Yj().max(200).optional(),copy:i.Yj().max(2e3).optional(),choice:i.Yj().max(200).optional()}),k=i.Ik({id:i.Yj().min(1).max(64).regex(/^[a-z][a-z0-9-]*$/,"provider id must be kebab-case (e.g. google, dropbox)"),label:i.Yj().min(1).max(120),authorizeUrl:i.Yj().url(),tokenUrl:i.Yj().url(),defaultScopes:i.YO(i.Yj()).default([]),supportsPKCE:i.zM().default(!0),refreshTokenSupported:i.zM().default(!0),extraAuthorizeParams:i.g1(i.Yj(),i.Yj()).default({}),needsClientSecret:i.zM().default(!0),setupHint:i.Yj().default(""),consoleUrl:i.Yj().url(),setupSteps:i.YO(j).default([])}),l={google:{id:"google",label:"Google",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",defaultScopes:["openid","email","https://www.googleapis.com/auth/calendar"],supportsPKCE:!0,refreshTokenSupported:!0,extraAuthorizeParams:{access_type:"offline",prompt:"consent"},needsClientSecret:!0,setupHint:"If you haven't already — first enable the required API (Calendar/Gmail/Drive) under APIs & Services → Library.",consoleUrl:"https://console.cloud.google.com/apis/credentials",setupSteps:[{title:"Open Google Cloud Console → APIs & Services → Credentials."},{title:'Click "+ CREATE CREDENTIALS" → "OAuth client ID".'},{title:"Application type",choice:"Web application",body:'Not "Desktop" — Reflex uses a fixed localhost redirect.'},{title:'Name — anything, e.g. "Reflex".'},{title:"Authorized redirect URIs → ADD URI",field:"Authorized redirect URIs",copy:"http://localhost:3210/api/oauth/callback",body:"Exactly as shown, no trailing slash, http (not https)."},{title:"Hit CREATE → a popup will show the Client ID and Client Secret."},{title:'Copy both values here. (If lost — open the client in Credentials, use "Download JSON" or "Reset secret".)'},{title:"Before the first Authorize, make sure the required API is enabled: APIs & Services → Library → Google Calendar API → Enable (similarly for other services)."}]},github:{id:"github",label:"GitHub",authorizeUrl:"https://github.com/login/oauth/authorize",tokenUrl:"https://github.com/login/oauth/access_token",defaultScopes:["repo","read:user"],supportsPKCE:!1,refreshTokenSupported:!1,extraAuthorizeParams:{},needsClientSecret:!0,setupHint:"Personal OAuth Apps live in Settings → Developer settings.",consoleUrl:"https://github.com/settings/developers",setupSteps:[{title:"Open github.com/settings/developers → OAuth Apps."},{title:'Click "New OAuth App".'},{title:'Application name — anything, e.g. "Reflex".'},{title:"Homepage URL",field:"Homepage URL",copy:"http://localhost:3210"},{title:"Authorization callback URL",field:"Authorization callback URL",copy:"http://localhost:3210/api/oauth/callback"},{title:'Click "Register application".'},{title:'Copy "Client ID" from here → into Reflex.'},{title:'Click "Generate a new client secret", copy the value immediately (shown only once) → into Reflex.'}]},notion:{id:"notion",label:"Notion",authorizeUrl:"https://api.notion.com/v1/oauth/authorize",tokenUrl:"https://api.notion.com/v1/oauth/token",defaultScopes:[],supportsPKCE:!1,refreshTokenSupported:!1,extraAuthorizeParams:{owner:"user"},needsClientSecret:!0,setupHint:"Reflex uses a Public integration (with OAuth flow), not Internal.",consoleUrl:"https://www.notion.so/profile/integrations",setupSteps:[{title:'Open notion.so/profile/integrations → "+ New integration".'},{title:'Name — "Reflex".'},{title:"Associated workspace — your workspace."},{title:"Type",choice:"Public",body:"Internal doesn't fit — the OAuth flow needs a public integration."},{title:"Submit → integration is created. Go to its page."},{title:'Under "OAuth Domain & URIs" → Redirect URIs → Add URI',field:"Redirect URIs",copy:"http://localhost:3210/api/oauth/callback"},{title:"Save."},{title:'Under "Secrets", copy the OAuth client ID and OAuth client secret here.'}]},slack:{id:"slack",label:"Slack",authorizeUrl:"https://slack.com/oauth/v2/authorize",tokenUrl:"https://slack.com/api/oauth.v2.access",defaultScopes:["chat:write","channels:read"],supportsPKCE:!1,refreshTokenSupported:!0,extraAuthorizeParams:{},needsClientSecret:!0,setupHint:"Default scopes (chat:write, channels:read) can be extended in OAuth & Permissions.",consoleUrl:"https://api.slack.com/apps",setupSteps:[{title:'Open api.slack.com/apps → "Create New App" → "From scratch".'},{title:'App Name — "Reflex", pick your workspace → Create App.'},{title:'In the left panel open "OAuth & Permissions" → Redirect URLs → "Add New Redirect URL"',field:"Redirect URLs",copy:"http://localhost:3210/api/oauth/callback"},{title:"Save URLs."},{title:"Under Scopes → User Token Scopes add the required ones (chat:write, channels:read, etc. — from Reflex defaults)."},{title:'At the top of the page click Install App → grant access → you\'ll get Client ID and Client Secret under "Basic Information".'}]},linear:{id:"linear",label:"Linear",authorizeUrl:"https://linear.app/oauth/authorize",tokenUrl:"https://api.linear.app/oauth/token",defaultScopes:["read","write"],supportsPKCE:!1,refreshTokenSupported:!0,extraAuthorizeParams:{},needsClientSecret:!0,setupHint:"A personal OAuth application is tied to your workspace.",consoleUrl:"https://linear.app/settings/api/applications/new",setupSteps:[{title:"Open linear.app/settings/api/applications/new (Settings → API → OAuth applications → Create new)."},{title:'Name — "Reflex", description anything.'},{title:"Developer URL",field:"Developer URL",copy:"http://localhost:3210"},{title:"Callback URLs",field:"Callback URLs",copy:"http://localhost:3210/api/oauth/callback"},{title:"Scopes — check read + write (or whichever you need: issues:create, etc.)."},{title:"Submit → copy Client ID + Client Secret here."}]}},m=Object.keys(l),n=h().join(f().homedir(),".reflex","oauth","providers.json"),o=i.Ik({version:i.eu(1),providers:i.YO(k)});async function p(){try{let a=await d.promises.readFile(n,"utf8"),b=o.safeParse(JSON.parse(a));if(!b.success)return{version:1,providers:[]};return b.data}catch{return{version:1,providers:[]}}}async function q(){let a=await p(),b=new Set(a.providers.map(a=>a.id)),c=[];for(let a of m)b.has(a)||c.push({def:l[a],origin:"builtin"});for(let b of a.providers)c.push({def:b,origin:"user"});return c}async function r(a){let b=await q();return b.find(b=>b.def.id===a)?.def??null}async function s(a){return await r(a)!==null}}};