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,66 @@
1
+ /**
2
+ * Canonical id / slug sanitizers for Reflex (north-star SpaceStore, Layer 1).
3
+ *
4
+ * Historically every store rolled its own. These are the SAME implementations,
5
+ * gathered in one place so the variants are named and discoverable. They are
6
+ * deliberately NOT collapsed into one parameterized function: the behaviors
7
+ * differ in subtle ways (allowed charset, ASCII vs unicode, length cap, whether
8
+ * existing dashes survive) and merging them would silently rename existing
9
+ * on-disk files. Cohesion of location, not of implementation.
10
+ *
11
+ * Pure, dependency-free (so it compiles cleanly under both the app and CLI
12
+ * tsconfigs and sits at the bottom of the import-direction graph).
13
+ */
14
+ /**
15
+ * Strip everything except `[A-Za-z0-9_-]` (no replacement, no length cap).
16
+ * Topic ids — a filename must round-trip an externally supplied id without
17
+ * changing its length. (was: lib/server/topics.ts)
18
+ */
19
+ export function sanitizeIdStrip(id) {
20
+ return id.replace(/[^A-Za-z0-9_-]/g, "");
21
+ }
22
+ /**
23
+ * Replace disallowed chars with `-` and cap at 80. Widget + workflow ids
24
+ * (agent-authored, kebab-ish). (was: lib/server/widgets/store.ts,
25
+ * lib/server/workflows/store.ts — identical)
26
+ */
27
+ export function sanitizeIdDash(id) {
28
+ return id.replace(/[^A-Za-z0-9_-]/g, "-").slice(0, 80);
29
+ }
30
+ /**
31
+ * NFKD + lowercase ASCII slug, trimmed of leading/trailing dashes, capped at
32
+ * 60. Task ids. (was: lib/server/tasks/store.ts)
33
+ */
34
+ export function slugify(s) {
35
+ return s
36
+ .normalize("NFKD")
37
+ .toLowerCase()
38
+ .replace(/[^a-z0-9]+/g, "-")
39
+ .replace(/^-+|-+$/g, "")
40
+ .slice(0, 60);
41
+ }
42
+ /**
43
+ * NFKD + lowercase UNICODE-aware slug (keeps non-ASCII letters/numbers),
44
+ * trimmed, capped at 60. KB filenames. (was: lib/server/agents/kb-writer.ts)
45
+ */
46
+ export function slugifyUnicode(s) {
47
+ return s
48
+ .normalize("NFKD")
49
+ .toLowerCase()
50
+ .replace(/[^\p{L}\p{N}]+/gu, "-")
51
+ .replace(/^-+|-+$/g, "")
52
+ .slice(0, 60);
53
+ }
54
+ /**
55
+ * Trim + lowercase, collapse to `[a-z0-9-]` (existing dashes preserved, no
56
+ * NFKD), trimmed, capped at 64. Skill handles. (was: lib/server/skills.ts)
57
+ */
58
+ export function slugifyHandle(raw) {
59
+ return raw
60
+ .trim()
61
+ .toLowerCase()
62
+ .replace(/[^a-z0-9-]+/g, "-")
63
+ .replace(/^-+|-+$/g, "")
64
+ .slice(0, 64);
65
+ }
66
+ //# sourceMappingURL=ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids.js","sourceRoot":"","sources":["../../../lib/reflex/ids.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,OAAO,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,OAAO,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,CAAS;IAC/B,OAAO,CAAC;SACL,SAAS,CAAC,MAAM,CAAC;SACjB,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,CAAS;IACtC,OAAO,CAAC;SACL,SAAS,CAAC,MAAM,CAAC;SACjB,WAAW,EAAE;SACb,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC;SAChC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,GAAG;SACP,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -30,4 +30,30 @@ export function mirrorInReflex(root, relDir) {
30
30
  export function subdirIndexPath(root, relDir) {
31
31
  return path.join(mirrorInReflex(root, relDir), INDEX_MD);
32
32
  }
33
+ // ---------------------------------------------------------------------------
34
+ // Per-Space (project) .reflex sub-locations. `reflexRoot()` is the SOLE place
35
+ // the literal ".reflex" appears — every store resolves its directory through
36
+ // these helpers, never by hand-joining ".reflex". (north-star SpaceStore)
37
+ /** Join segments under `<root>/.reflex/`. */
38
+ export function reflexSubpath(root, ...segs) {
39
+ return path.join(reflexRoot(root), ...segs);
40
+ }
41
+ export function topicsDir(root) {
42
+ return reflexSubpath(root, "topics");
43
+ }
44
+ export function widgetsDir(root) {
45
+ return reflexSubpath(root, "widgets");
46
+ }
47
+ export function workflowsDir(root) {
48
+ return reflexSubpath(root, "workflows");
49
+ }
50
+ export function memoryDir(root) {
51
+ return reflexSubpath(root, "memory");
52
+ }
53
+ export function projectSkillsDir(root) {
54
+ return reflexSubpath(root, "skills");
55
+ }
56
+ export function suggestionsFile(root) {
57
+ return reflexSubpath(root, "suggestions.json");
58
+ }
33
59
  //# sourceMappingURL=paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../lib/reflex/paths.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;AACpC,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAC7C,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAC3C,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAEnC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IACnC,SAAS;IACT,MAAM;IACN,cAAc;IACd,WAAW;CACZ,CAAC,CAAC;AAEH,oCAAoC;AACpC,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAClD,0GAA0G;AAC1G,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,aAAa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,CAAC,CAAC;AACvC,CAAC;AACD,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,aAAa,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { promises as fs } from "node:fs";
2
+ import path from "node:path";
3
+ const locks = (globalThis.__reflexJsonStoreLocks ??=
4
+ new Map());
5
+ /** Run `fn` after any in-flight write to `file` settles (success or failure). */
6
+ export function withFileLock(file, fn) {
7
+ const prev = locks.get(file) ?? Promise.resolve();
8
+ const next = prev.then(fn, fn);
9
+ // Track a non-throwing tail so a rejected write can't wedge the chain.
10
+ locks.set(file, next.then(noop, noop));
11
+ return next;
12
+ }
13
+ function noop() { }
14
+ function isNotFound(err) {
15
+ return (typeof err === "object" &&
16
+ err !== null &&
17
+ "code" in err &&
18
+ err.code === "ENOENT");
19
+ }
20
+ /** Read + JSON.parse a file, or `null` if it doesn't exist. Throws on other IO
21
+ * / parse errors so corruption is surfaced, not silently swallowed. */
22
+ export async function readJsonFile(file) {
23
+ let raw;
24
+ try {
25
+ raw = await fs.readFile(file, "utf8");
26
+ }
27
+ catch (err) {
28
+ if (isNotFound(err))
29
+ return null;
30
+ throw err;
31
+ }
32
+ return JSON.parse(raw);
33
+ }
34
+ /** Atomically write a value as pretty JSON (tmp + rename), serialized per file. */
35
+ export async function writeJsonFile(file, value, opts = {}) {
36
+ await withFileLock(file, async () => {
37
+ await fs.mkdir(path.dirname(file), { recursive: true });
38
+ const tmp = `${file}.tmp`; // unique under the per-file lock (one writer)
39
+ const body = JSON.stringify(value, null, 2) + "\n";
40
+ await fs.writeFile(tmp, body, {
41
+ encoding: "utf8",
42
+ ...(opts.mode !== undefined ? { mode: opts.mode } : {}),
43
+ });
44
+ // Re-assert mode in case umask masked it on create.
45
+ if (opts.mode !== undefined)
46
+ await fs.chmod(tmp, opts.mode);
47
+ await fs.rename(tmp, file);
48
+ });
49
+ }
50
+ //# sourceMappingURL=json-store.js.map
@@ -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CAAC,GAAG,CAAM,CAAC;AAC9B,CAAC;AAOD,mFAAmF;AACnF,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,IAAY,EACZ,KAAc,EACd,OAAyB,EAAE;IAE3B,MAAM,YAAY,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;QAClC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,MAAM,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,8CAA8C;QACzE,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;QACnD,MAAM,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE;YAC5B,QAAQ,EAAE,MAAM;YAChB,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxD,CAAC,CAAC;QACH,oDAAoD;QACpD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5D,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "reflex-agent",
3
- "version": "0.18.2",
3
+ "version": "0.19.0",
4
4
  "private": false,
5
5
  "description": "Local-first knowledge base built by an agent over a chosen directory.",
6
6
  "license": "MIT",
7
7
  "author": "legostin",
8
- "homepage": "https://github.com/legostin/reflex-agent#readme",
8
+ "homepage": "https://github.com/reflex-agent/reflex-agent#readme",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/legostin/reflex-agent.git"
11
+ "url": "git+https://github.com/reflex-agent/reflex-agent.git"
12
12
  },
13
13
  "bugs": {
14
- "url": "https://github.com/legostin/reflex-agent/issues"
14
+ "url": "https://github.com/reflex-agent/reflex-agent/issues"
15
15
  },
16
16
  "type": "module",
17
17
  "bin": {
@@ -35,7 +35,10 @@
35
35
  "build:cli": "tsc -p tsconfig.cli.json",
36
36
  "typecheck": "tsc --noEmit && tsc -p tsconfig.cli.json --noEmit",
37
37
  "prepack": "node -e \"require('fs').rmSync('.next/cache', { recursive: true, force: true })\"",
38
- "prepublishOnly": "pnpm run build"
38
+ "prepublishOnly": "pnpm run build",
39
+ "test": "vitest run",
40
+ "test:watch": "vitest",
41
+ "lint:boundaries": "node scripts/check-boundaries.mjs"
39
42
  },
40
43
  "engines": {
41
44
  "node": ">=20"
@@ -84,6 +87,7 @@
84
87
  "@types/node": "^24",
85
88
  "@types/react": "^19",
86
89
  "@types/react-dom": "^19",
87
- "typescript": "^6"
90
+ "typescript": "^6",
91
+ "vitest": "^4.1.7"
88
92
  }
89
93
  }