reflex-agent 0.17.1 → 0.18.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 (141) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +97 -97
  3. package/.next/app-path-routes-manifest.json +7 -7
  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/server/app/_not-found/page.js +2 -2
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/agents/[agentId]/page.js +2 -2
  10. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/agents/[agentId]/respond/route.js +1 -1
  12. package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +1 -1
  18. package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +1 -1
  20. package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +2 -2
  22. package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -1
  24. package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -1
  26. package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +1 -1
  29. package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/utilities/install-archive/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/audit/page.js +2 -2
  36. package/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  37. package/.next/server/app/dispatcher/page.js +2 -2
  38. package/.next/server/app/dispatcher/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/onboarding/page.js +3 -3
  40. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  41. package/.next/server/app/page.js +2 -2
  42. package/.next/server/app/page.js.nft.json +1 -1
  43. package/.next/server/app/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/roots/[id]/chat/[topicId]/page.js +2 -2
  45. package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -1
  46. package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/roots/[id]/kb/[...slug]/page.js +2 -2
  48. package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -1
  49. package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/roots/[id]/memory/page.js +2 -2
  51. package/.next/server/app/roots/[id]/memory/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/roots/[id]/page.js +4 -4
  53. package/.next/server/app/roots/[id]/page.js.nft.json +1 -1
  54. package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -2
  56. package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -1
  57. package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/roots/[id]/workflows/page.js +2 -2
  59. package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -1
  60. package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/roots/new/page.js +3 -3
  62. package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app/settings/page.js +4 -4
  64. package/.next/server/app/settings/page.js.nft.json +1 -1
  65. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  66. package/.next/server/app/share/[id]/file/page.js +2 -2
  67. package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -1
  68. package/.next/server/app/share/[id]/page.js +2 -2
  69. package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/utilities/[scope]/[id]/page.js +2 -2
  71. package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -1
  72. package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/utilities/page.js +2 -2
  74. package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app-paths-manifest.json +7 -7
  76. package/.next/server/chunks/1358.js +1 -1
  77. package/.next/server/chunks/285.js +8 -8
  78. package/.next/server/chunks/3332.js +1 -1
  79. package/.next/server/chunks/3443.js +1 -0
  80. package/.next/server/chunks/3908.js +3 -0
  81. package/.next/server/chunks/4578.js +3 -1
  82. package/.next/server/chunks/4812.js +1 -1
  83. package/.next/server/chunks/6193.js +1 -0
  84. package/.next/server/chunks/{4333.js → 8310.js} +2 -2
  85. package/.next/server/chunks/8499.js +1 -0
  86. package/.next/server/chunks/9098.js +1 -1
  87. package/.next/server/chunks/9809.js +1 -1
  88. package/.next/server/functions-config-manifest.json +3 -3
  89. package/.next/server/middleware-build-manifest.js +1 -1
  90. package/.next/server/middleware-manifest.json +5 -5
  91. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  92. package/.next/server/pages/500.html +1 -1
  93. package/.next/server/server-reference-manifest.js +1 -1
  94. package/.next/server/server-reference-manifest.json +1 -1
  95. package/.next/static/chunks/1993-9dca1b1e6fd2aa4a.js +1 -0
  96. package/.next/static/chunks/4108.1f4c5d5167258fc2.js +1 -0
  97. package/.next/static/chunks/4339-598f4d295a1c9fd7.js +1 -0
  98. package/.next/static/chunks/7523-8e1a30a0a94360e6.js +1 -0
  99. package/.next/static/chunks/8700-67255781ff8535f8.js +1 -0
  100. package/.next/static/chunks/972-d90180d5752f1033.js +1 -0
  101. package/.next/static/chunks/app/layout-eade5a1d9244edb1.js +1 -0
  102. package/.next/static/chunks/app/onboarding/page-48b932af2f1ba2fa.js +1 -0
  103. package/.next/static/chunks/app/{page-04091ddd75f75dbe.js → page-86e96e2ba12ff458.js} +1 -1
  104. package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-12dc5a32dabf680b.js +1 -0
  105. package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-dfe79e6d415b578f.js +1 -0
  106. package/.next/static/chunks/app/roots/[id]/memory/{page-8a6c36c8f8b18027.js → page-aab917d8048049e7.js} +1 -1
  107. package/.next/static/chunks/app/roots/[id]/page-eb45813070de86e8.js +1 -0
  108. package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-3a7c7dcc78644559.js +1 -0
  109. package/.next/static/chunks/app/roots/[id]/workflows/page-e784b93a39334d2d.js +1 -0
  110. package/.next/static/chunks/app/roots/new/page-60665535912274c9.js +1 -0
  111. package/.next/static/chunks/app/settings/page-7c74a4601ded9acb.js +1 -0
  112. package/.next/static/chunks/app/share/[id]/page-5758d5aea102929e.js +1 -0
  113. package/.next/static/chunks/app/utilities/[scope]/[id]/page-b0e4daae2e153833.js +1 -0
  114. package/.next/static/chunks/app/utilities/page-4b344f56d64101fa.js +1 -0
  115. package/.next/static/chunks/{webpack-365da08c2f4d8fd4.js → webpack-a051eba7e7f1881f.js} +1 -1
  116. package/.next/trace +90 -90
  117. package/package.json +1 -1
  118. package/.next/server/chunks/2420.js +0 -3
  119. package/.next/server/chunks/3943.js +0 -1
  120. package/.next/server/chunks/6370.js +0 -1
  121. package/.next/server/chunks/9840.js +0 -1
  122. package/.next/static/chunks/1140-64068d731caa9e74.js +0 -1
  123. package/.next/static/chunks/1449-6b7d830a92f3f938.js +0 -1
  124. package/.next/static/chunks/3281-8bd5b627634cdf42.js +0 -1
  125. package/.next/static/chunks/3680-c10f5bed1e72fdc2.js +0 -1
  126. package/.next/static/chunks/4108.19c3868f4af2c9f0.js +0 -1
  127. package/.next/static/chunks/9764-cdf07e52fe3e8237.js +0 -1
  128. package/.next/static/chunks/app/layout-a9e0a8f5993dd6d9.js +0 -1
  129. package/.next/static/chunks/app/onboarding/page-6fddd32281064f20.js +0 -1
  130. package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-4ef3f3e86daba072.js +0 -1
  131. package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-e06fed2af2d53515.js +0 -1
  132. package/.next/static/chunks/app/roots/[id]/page-dc75fd44657768c3.js +0 -1
  133. package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-4159003e68210618.js +0 -1
  134. package/.next/static/chunks/app/roots/[id]/workflows/page-45cf79c938c988e5.js +0 -1
  135. package/.next/static/chunks/app/roots/new/page-c053590d2d0db45b.js +0 -1
  136. package/.next/static/chunks/app/settings/page-5514c8538063c316.js +0 -1
  137. package/.next/static/chunks/app/share/[id]/page-f88950f6a8ad9e41.js +0 -1
  138. package/.next/static/chunks/app/utilities/[scope]/[id]/page-b15dcef01e478b72.js +0 -1
  139. package/.next/static/chunks/app/utilities/page-bb3e4a011e6bad5c.js +0 -1
  140. /package/.next/static/{6dGMfpiSfKb8VjYCBSJk6 → 9aIZJd7Nzsm6QMTXf63On}/_buildManifest.js +0 -0
  141. /package/.next/static/{6dGMfpiSfKb8VjYCBSJk6 → 9aIZJd7Nzsm6QMTXf63On}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=9809,exports.ids=[9809],exports.modules={24139:(a,b,c)=>{c.d(b,{Z:()=>h,_:()=>g});var d=c(73024),e=c(74342);function f(){return globalThis.__reflexPendingCache||(globalThis.__reflexPendingCache=new Map),globalThis.__reflexPendingCache}async function g(a,b){let c,g=(0,e.R)(a,b);try{c=await d.promises.stat(g)}catch{return[]}let h=f().get(g);if(h&&h.mtimeMs===c.mtimeMs&&h.size===c.size)return h.result;let i=function(a,b){let c=new Map;for(let d of a)switch(d.type){case"permission-request":c.set(`p:${d.requestId}`,{kind:"permission",topicId:b,requestId:d.requestId,ts:d.ts,summary:d.tool?`Permission: ${d.tool}`:d.action??"Permission request",...d.description?{details:d.description}:{}});break;case"permission-response":c.delete(`p:${d.requestId}`);break;case"question":c.set(`q:${d.questionId}`,{kind:"question",topicId:b,requestId:d.questionId,ts:d.ts,summary:d.prompt.slice(0,200),...d.choices&&d.choices.length?{details:d.choices.join(" / ")}:{}});break;case"answer":c.delete(`q:${d.questionId}`);break;case"mcp-add-request":c.set(`m:${d.requestId}`,{kind:"mcp-add",topicId:b,requestId:d.requestId,ts:d.ts,summary:`MCP add: ${d.label}`,...d.description?{details:d.description}:{}});break;case"mcp-add-response":c.delete(`m:${d.requestId}`)}return[...c.values()]}(await (0,e.readEvents)(a,b),b);return f().set(g,{mtimeMs:c.mtimeMs,size:c.size,result:i}),i}async function h(a,b){let c=[];return await Promise.all(b.map(async b=>{let d=await g(a,b);c.push(...d)})),c.sort((a,b)=>a.ts<b.ts?1:-1),c}},49809:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{k:()=>v,x:()=>t});var e=c(31776);c(428);var f=c(73024),g=c(76760),h=c.n(g),i=c(24576),j=c(11178),k=c(56843),l=c(16909),m=c(24139),n=c(1701),o=c(52129),p=c(7188),q=c(11244),r=c(97364),s=a([l,o]);async function t(a){try{let b=await (0,i.getRoot)(a);if(!b)return{ok:!1,error:"Root not found"};let[c,d,e,f]=await Promise.all([(0,k.hk)(b.path),(0,j.CA)(b.path),(0,p.listWidgets)(b.path),(0,p.readLayout)(b.path)]),g=(0,p.reconcileLayout)(f,e.map(a=>a.id),q.SYSTEM_WIDGET_IDS);(g.order.join("|")!==f.order.join("|")||g.hidden.join("|")!==f.hidden.join("|")||JSON.stringify(g.sizes??{})!==JSON.stringify(f.sizes??{}))&&await (0,p.writeLayout)(b.path,g);let h=c.map(a=>a.meta.id),r=new Set("function"==typeof l.z.listRunningTopicsForRoot?l.z.listRunningTopicsForRoot(a):[]),[s,t,v]=await Promise.all([(0,m.Z)(b.path,h),(0,n.Mn)(),(0,o.Qv)(a).catch(()=>null)]),w=new Set(s.map(a=>a.requestId));for(let a of t)!w.has(a.requestId)&&h.includes(a.topicId)&&s.push({kind:"mcp-add",topicId:a.topicId,requestId:a.requestId,ts:a.createdAt,summary:`MCP add: ${a.directive.label}`,...a.directive.description?{details:a.directive.description}:{}});s.sort((a,b)=>a.ts<b.ts?1:-1);let x=new Map;for(let a of c)x.set(a.meta.id,a.meta);let y=[],z=[];for(let a of c){let b=a.meta;if(b.goal&&"active"===b.goalStatus){y.push({topicId:b.id,topicTitle:b.title,goal:b.goal,goalIterations:b.goalIterations??0,updatedAt:b.updatedAt,running:r.has(b.id)});continue}r.has(b.id)&&z.push({topicId:b.id,topicTitle:b.title,updatedAt:b.updatedAt})}y.sort((a,b)=>a.updatedAt<b.updatedAt?1:-1),z.sort((a,b)=>a.updatedAt<b.updatedAt?1:-1);let A=await u(d);return{ok:!0,snapshot:{rootId:a,rootPath:b.path,activeGoals:y,runningAgents:z,pendingApprovals:s,recentKb:A,suggestions:v,widgets:e,layout:g}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function u(a){let b=Date.now()-2592e5,c=a.filter(a=>Date.parse(a.modifiedAt)>=b).sort((a,b)=>a.modifiedAt<b.modifiedAt?1:-1).slice(0,6);return Promise.all(c.map(async a=>{let b=await (0,j.xO)(a.abs);return{rel:a.rel,title:b.title??h().basename(a.rel),...b.kind?{kind:b.kind}:{},modifiedAt:a.modifiedAt,preview:""}}))}async function v(a,b){try{let c=await (0,i.getRoot)(a);if(!c)return{ok:!1,error:"Root not found"};let d=h().join(c.path,".reflex",b),e=h().relative(h().join(c.path,".reflex"),d);if(e.startsWith("..")||h().isAbsolute(e))return{ok:!1,error:"Refused (path traversal)"};let g=await f.promises.readFile(d,"utf8");return{ok:!0,preview:function(a){let b=a,c=a.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return c&&(b=a.slice(c[0].length)),(b=b.replace(/^#+\s+/gm,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\r?\n+/g," ").trim()).length>200&&(b=b.slice(0,197).trimEnd()+"…"),b}(g)}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}[l,o]=s.then?(await s)():s,(0,r.D)([t,v]),(0,e.A)(t,"40ae56d4ad1bc53c8436556c177fdc994ba2ba35eb",null),(0,e.A)(v,"609737844013019434a24538e5227505aeb590b338",null),d()}catch(a){d(a)}})},52129:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Qt:()=>t,Qv:()=>r});var e=c(73024),f=c(76760),g=c.n(f),h=c(29163),i=c(11178),j=c(56843),k=c(16909),l=c(24139),m=c(99048),n=c(17640),o=c(24576),p=a([k,m]);function q(a){let b=a.replace(/[^A-Za-z0-9_.-]/g,"_");return g().join((0,h._)(),"roots",b,"suggestions.json")}async function r(a){try{let b=await e.promises.readFile(q(a),"utf8"),c=JSON.parse(b);if(c.rootId!==a||!Array.isArray(c.items))return null;return c}catch{return null}}async function s(a){let b=q(a.rootId);await e.promises.mkdir(g().dirname(b),{recursive:!0}),await e.promises.writeFile(b,JSON.stringify(a,null,2)+"\n",{encoding:"utf8",mode:384});try{await e.promises.chmod(b,384)}catch{}}async function t(a){var b;let c=await (0,o.getRoot)(a);if(!c)return{ok:!1,error:"Root not found"};let d=(await (0,n.loadSettings)()).assignments.quick,e=await u(a,c.path);if(e.empty){let b={rootId:a,generatedAt:new Date().toISOString(),model:"n/a",items:[{title:"Project is empty",why:"No topics, no KB files — nothing to suggest. Start with /chat or create your first entry.",action:{kind:"none",label:"OK"}}]};return await s(b),{ok:!0,cache:b}}let f=(b=e,['You analyse the state of a local Reflex knowledge-base project and propose 2–4 high-leverage actions for the user.\nOutput STRICT JSON: an object with one key `items`, value array of {title, why, action}.\naction.kind ∈ {"open-topic", "open-kb", "send-message", "none"}.\n - open-topic: target = topic id from the snapshot\n - open-kb: target = rel-path from the snapshot (.reflex/-relative)\n - send-message: target = the literal text Reflex should send. topicId = which topic to send into (use an existing id from the snapshot or omit for new chat).\n - none: informational only\nEach action.label is the button text (3-6 words, Russian or English to match the project\'s vibe).\nEach `title` is 4-9 words; each `why` is one sentence explaining the trigger.\nSkip trivialities. Don\'t propose chores that don\'t move the project forward.\nReply in Russian unless titles/paths are obviously English.\n\n## Snapshot',JSON.stringify(b,null,2),"\nReturn only the JSON object — no preamble, no markdown fences, no comments. The reply MUST start with `{` and end with `}`."].join("\n"));try{let b=await (0,m.quickComplete)(d,f,{timeoutMs:45e3}),c=function(a){let b=a.trim();b.startsWith("```")&&(b=b.replace(/^```[a-z]*\r?\n/i,"").replace(/```\s*$/i,""));let c=b.indexOf("{"),d=b.lastIndexOf("}");c>=0&&d>c&&(b=b.slice(c,d+1));let e=JSON.parse(b);if(!e||"object"!=typeof e||!Array.isArray(e.items))throw Error("Model returned non-JSON or missing items[]");let f=[];for(let a of e.items){if(!a||"object"!=typeof a)continue;let b="string"==typeof a.title?a.title:null,c="string"==typeof a.why?a.why:null,d=a.action&&"object"==typeof a.action?a.action:null;if(!b||!c||!d)continue;let e=d.kind;if("open-topic"!==e&&"open-kb"!==e&&"send-message"!==e&&"none"!==e)continue;let g="string"==typeof d.label?d.label:"Open";f.push({title:b,why:c,action:{kind:e,label:g,..."string"==typeof d.target?{target:d.target}:{},..."string"==typeof d.topicId?{topicId:d.topicId}:{}}})}return f}(b),e={rootId:a,generatedAt:new Date().toISOString(),model:`${d.harness}:${d.model}`,items:c.slice(0,5)};return await s(e),{ok:!0,cache:e}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function u(a,b){let[c,d]=await Promise.all([(0,j.hk)(b),(0,i.dj)(b)]),e=c.map(a=>a.meta.id),f=new Set("function"==typeof k.z.listRunningTopicsForRoot?k.z.listRunningTopicsForRoot(a):[]),g=await (0,l.Z)(b,e),h=Date.now()-432e6,m=c.filter(a=>Date.parse(a.meta.updatedAt)<h).filter(a=>a.meta.goal&&"active"===a.meta.goalStatus).map(a=>({id:a.meta.id,title:a.meta.title,updatedAt:a.meta.updatedAt}));return{empty:0===c.length&&0===d.length,topicCount:c.length,topicsWithGoal:c.filter(a=>a.meta.goal&&"active"===a.meta.goalStatus).map(a=>({id:a.meta.id,title:a.meta.title,goal:a.meta.goal,iterations:a.meta.goalIterations??0,updatedAt:a.meta.updatedAt,running:f.has(a.meta.id)})),runningTopics:c.filter(a=>f.has(a.meta.id)).map(a=>({id:a.meta.id,title:a.meta.title})),recentKb:d.slice().sort((a,b)=>a.modifiedAt<b.modifiedAt?1:-1).slice(0,8).map(a=>({rel:a.rel,title:a.meta.title??a.rel,modifiedAt:a.modifiedAt})),pendingCount:g.length,totalKbFiles:d.length,staleTopics:m}}[k,m]=p.then?(await p)():p,d()}catch(a){d(a)}})}};
1
+ "use strict";exports.id=9809,exports.ids=[9809],exports.modules={24139:(a,b,c)=>{c.d(b,{Z:()=>h,_:()=>g});var d=c(73024),e=c(74342);function f(){return globalThis.__reflexPendingCache||(globalThis.__reflexPendingCache=new Map),globalThis.__reflexPendingCache}async function g(a,b){let c,g=(0,e.R)(a,b);try{c=await d.promises.stat(g)}catch{return[]}let h=f().get(g);if(h&&h.mtimeMs===c.mtimeMs&&h.size===c.size)return h.result;let i=function(a,b){let c=new Map;for(let d of a)switch(d.type){case"permission-request":c.set(`p:${d.requestId}`,{kind:"permission",topicId:b,requestId:d.requestId,ts:d.ts,summary:d.tool?`Permission: ${d.tool}`:d.action??"Permission request",...d.description?{details:d.description}:{}});break;case"permission-response":c.delete(`p:${d.requestId}`);break;case"question":c.set(`q:${d.questionId}`,{kind:"question",topicId:b,requestId:d.questionId,ts:d.ts,summary:d.prompt.slice(0,200),...d.choices&&d.choices.length?{details:d.choices.join(" / ")}:{}});break;case"answer":c.delete(`q:${d.questionId}`);break;case"mcp-add-request":c.set(`m:${d.requestId}`,{kind:"mcp-add",topicId:b,requestId:d.requestId,ts:d.ts,summary:`MCP add: ${d.label}`,...d.description?{details:d.description}:{}});break;case"mcp-add-response":c.delete(`m:${d.requestId}`)}return[...c.values()]}(await (0,e.readEvents)(a,b),b);return f().set(g,{mtimeMs:c.mtimeMs,size:c.size,result:i}),i}async function h(a,b){let c=[];return await Promise.all(b.map(async b=>{let d=await g(a,b);c.push(...d)})),c.sort((a,b)=>a.ts<b.ts?1:-1),c}},49809:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{k:()=>v,x:()=>t});var e=c(31776);c(428);var f=c(73024),g=c(76760),h=c.n(g),i=c(24576),j=c(11178),k=c(56843),l=c(16909),m=c(24139),n=c(1701),o=c(52129),p=c(7188),q=c(11244),r=c(97364),s=a([l,o]);async function t(a){try{let b=await (0,i.getRoot)(a);if(!b)return{ok:!1,error:"Root not found"};let[c,d,e,f]=await Promise.all([(0,k.hk)(b.path),(0,j.CA)(b.path),(0,p.listWidgets)(b.path),(0,p.readLayout)(b.path)]),g=(0,p.reconcileLayout)(f,e.map(a=>a.id),q.SYSTEM_WIDGET_IDS);(g.order.join("|")!==f.order.join("|")||g.hidden.join("|")!==f.hidden.join("|")||JSON.stringify(g.sizes??{})!==JSON.stringify(f.sizes??{}))&&await (0,p.writeLayout)(b.path,g);let h=c.map(a=>a.meta.id),r=new Set("function"==typeof l.z.listRunningTopicsForRoot?l.z.listRunningTopicsForRoot(a):[]),[s,t,v]=await Promise.all([(0,m.Z)(b.path,h),(0,n.Mn)(),(0,o.Qv)(a).catch(()=>null)]),w=new Set(s.map(a=>a.requestId));for(let a of t)!w.has(a.requestId)&&h.includes(a.topicId)&&s.push({kind:"mcp-add",topicId:a.topicId,requestId:a.requestId,ts:a.createdAt,summary:`MCP add: ${a.directive.label}`,...a.directive.description?{details:a.directive.description}:{}});s.sort((a,b)=>a.ts<b.ts?1:-1);let x=new Map;for(let a of c)x.set(a.meta.id,a.meta);let y=[],z=[];for(let a of c){let b=a.meta;if(b.goal&&"active"===b.goalStatus){y.push({topicId:b.id,topicTitle:b.title,goal:b.goal,goalIterations:b.goalIterations??0,updatedAt:b.updatedAt,running:r.has(b.id)});continue}r.has(b.id)&&z.push({topicId:b.id,topicTitle:b.title,updatedAt:b.updatedAt})}y.sort((a,b)=>a.updatedAt<b.updatedAt?1:-1),z.sort((a,b)=>a.updatedAt<b.updatedAt?1:-1);let A=await u(d);return{ok:!0,snapshot:{rootId:a,rootPath:b.path,activeGoals:y,runningAgents:z,pendingApprovals:s,recentKb:A,suggestions:v,widgets:e,layout:g}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function u(a){let b=Date.now()-2592e5,c=a.filter(a=>Date.parse(a.modifiedAt)>=b).sort((a,b)=>a.modifiedAt<b.modifiedAt?1:-1).slice(0,6);return Promise.all(c.map(async a=>{let b=await (0,j.xO)(a.abs);return{rel:a.rel,title:b.title??h().basename(a.rel),...b.kind?{kind:b.kind}:{},modifiedAt:a.modifiedAt,preview:""}}))}async function v(a,b){try{let c=await (0,i.getRoot)(a);if(!c)return{ok:!1,error:"Root not found"};let d=h().join(c.path,".reflex",b),e=h().relative(h().join(c.path,".reflex"),d);if(e.startsWith("..")||h().isAbsolute(e))return{ok:!1,error:"Refused (path traversal)"};let g=await f.promises.readFile(d,"utf8");return{ok:!0,preview:function(a){let b=a,c=a.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return c&&(b=a.slice(c[0].length)),(b=b.replace(/^#+\s+/gm,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\r?\n+/g," ").trim()).length>200&&(b=b.slice(0,197).trimEnd()+"…"),b}(g)}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}[l,o]=s.then?(await s)():s,(0,r.D)([t,v]),(0,e.A)(t,"408bcb45cc12c628bf061d428102b8862e1ae24b16",null),(0,e.A)(v,"60a584918a205649c51df1886510319fe987d73a20",null),d()}catch(a){d(a)}})},52129:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Qt:()=>t,Qv:()=>r});var e=c(73024),f=c(76760),g=c.n(f),h=c(29163),i=c(11178),j=c(56843),k=c(16909),l=c(24139),m=c(99048),n=c(17640),o=c(24576),p=a([k,m]);function q(a){let b=a.replace(/[^A-Za-z0-9_.-]/g,"_");return g().join((0,h._)(),"roots",b,"suggestions.json")}async function r(a){try{let b=await e.promises.readFile(q(a),"utf8"),c=JSON.parse(b);if(c.rootId!==a||!Array.isArray(c.items))return null;return c}catch{return null}}async function s(a){let b=q(a.rootId);await e.promises.mkdir(g().dirname(b),{recursive:!0}),await e.promises.writeFile(b,JSON.stringify(a,null,2)+"\n",{encoding:"utf8",mode:384});try{await e.promises.chmod(b,384)}catch{}}async function t(a){var b;let c=await (0,o.getRoot)(a);if(!c)return{ok:!1,error:"Root not found"};let d=(await (0,n.loadSettings)()).assignments.quick,e=await u(a,c.path);if(e.empty){let b={rootId:a,generatedAt:new Date().toISOString(),model:"n/a",items:[{title:"Project is empty",why:"No topics, no KB files — nothing to suggest. Start with /chat or create your first entry.",action:{kind:"none",label:"OK"}}]};return await s(b),{ok:!0,cache:b}}let f=(b=e,['You analyse the state of a local Reflex knowledge-base project and propose 2–4 high-leverage actions for the user.\nOutput STRICT JSON: an object with one key `items`, value array of {title, why, action}.\naction.kind ∈ {"open-topic", "open-kb", "send-message", "none"}.\n - open-topic: target = topic id from the snapshot\n - open-kb: target = rel-path from the snapshot (.reflex/-relative)\n - send-message: target = the literal text Reflex should send. topicId = which topic to send into (use an existing id from the snapshot or omit for new chat).\n - none: informational only\nEach action.label is the button text (3-6 words, Russian or English to match the project\'s vibe).\nEach `title` is 4-9 words; each `why` is one sentence explaining the trigger.\nSkip trivialities. Don\'t propose chores that don\'t move the project forward.\nReply in Russian unless titles/paths are obviously English.\n\n## Snapshot',JSON.stringify(b,null,2),"\nReturn only the JSON object — no preamble, no markdown fences, no comments. The reply MUST start with `{` and end with `}`."].join("\n"));try{let b=await (0,m.quickComplete)(d,f,{timeoutMs:45e3}),c=function(a){let b=a.trim();b.startsWith("```")&&(b=b.replace(/^```[a-z]*\r?\n/i,"").replace(/```\s*$/i,""));let c=b.indexOf("{"),d=b.lastIndexOf("}");c>=0&&d>c&&(b=b.slice(c,d+1));let e=JSON.parse(b);if(!e||"object"!=typeof e||!Array.isArray(e.items))throw Error("Model returned non-JSON or missing items[]");let f=[];for(let a of e.items){if(!a||"object"!=typeof a)continue;let b="string"==typeof a.title?a.title:null,c="string"==typeof a.why?a.why:null,d=a.action&&"object"==typeof a.action?a.action:null;if(!b||!c||!d)continue;let e=d.kind;if("open-topic"!==e&&"open-kb"!==e&&"send-message"!==e&&"none"!==e)continue;let g="string"==typeof d.label?d.label:"Open";f.push({title:b,why:c,action:{kind:e,label:g,..."string"==typeof d.target?{target:d.target}:{},..."string"==typeof d.topicId?{topicId:d.topicId}:{}}})}return f}(b),e={rootId:a,generatedAt:new Date().toISOString(),model:`${d.harness}:${d.model}`,items:c.slice(0,5)};return await s(e),{ok:!0,cache:e}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function u(a,b){let[c,d]=await Promise.all([(0,j.hk)(b),(0,i.dj)(b)]),e=c.map(a=>a.meta.id),f=new Set("function"==typeof k.z.listRunningTopicsForRoot?k.z.listRunningTopicsForRoot(a):[]),g=await (0,l.Z)(b,e),h=Date.now()-432e6,m=c.filter(a=>Date.parse(a.meta.updatedAt)<h).filter(a=>a.meta.goal&&"active"===a.meta.goalStatus).map(a=>({id:a.meta.id,title:a.meta.title,updatedAt:a.meta.updatedAt}));return{empty:0===c.length&&0===d.length,topicCount:c.length,topicsWithGoal:c.filter(a=>a.meta.goal&&"active"===a.meta.goalStatus).map(a=>({id:a.meta.id,title:a.meta.title,goal:a.meta.goal,iterations:a.meta.goalIterations??0,updatedAt:a.meta.updatedAt,running:f.has(a.meta.id)})),runningTopics:c.filter(a=>f.has(a.meta.id)).map(a=>({id:a.meta.id,title:a.meta.title})),recentKb:d.slice().sort((a,b)=>a.modifiedAt<b.modifiedAt?1:-1).slice(0,8).map(a=>({rel:a.rel,title:a.meta.title??a.rel,modifiedAt:a.modifiedAt})),pendingCount:g.length,totalKbFiles:d.length,staleTopics:m}}[k,m]=p.then?(await p)():p,d()}catch(a){d(a)}})}};
@@ -3,9 +3,9 @@
3
3
  "functions": {
4
4
  "/api/agents/[agentId]/respond": {},
5
5
  "/api/images/[rootId]/[file]": {},
6
+ "/api/oauth/callback": {},
6
7
  "/api/oauth/start": {},
7
8
  "/api/roots/[id]/attachments": {},
8
- "/api/oauth/callback": {},
9
9
  "/api/roots/[id]/chat/[topicId]/send": {},
10
10
  "/api/roots/[id]/chat/[topicId]/stop": {},
11
11
  "/api/roots/[id]/chat/[topicId]/stream": {},
@@ -13,10 +13,10 @@
13
13
  "/api/roots/[id]/suggestions": {},
14
14
  "/api/utilities/[scope]/[id]/bundle.js": {},
15
15
  "/api/utilities/[scope]/[id]/host-api.mjs": {},
16
- "/api/utilities/[scope]/[id]/host": {},
17
16
  "/api/utilities/[scope]/[id]/host-ui.mjs": {},
18
- "/api/utilities/[scope]/[id]/style.css": {},
17
+ "/api/utilities/[scope]/[id]/host": {},
19
18
  "/api/utilities/[scope]/[id]/iframe": {},
19
+ "/api/utilities/[scope]/[id]/style.css": {},
20
20
  "/api/utilities/install-archive": {}
21
21
  }
22
22
  }
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:[],rootMainFiles:["static/chunks/webpack-365da08c2f4d8fd4.js","static/chunks/6fe292aa-7126ff9d6732e864.js","static/chunks/146-ccee3b26755b68c8.js","static/chunks/main-app-ebe67847147d19aa.js"],rootMainFilesTree:{},pages:{"/_app":["static/chunks/webpack-365da08c2f4d8fd4.js","static/chunks/framework-aaa7c1a953276299.js","static/chunks/main-bfb98fc1d6aa1d45.js","static/chunks/pages/_app-bf8bc157ace53d59.js"],"/_error":["static/chunks/webpack-365da08c2f4d8fd4.js","static/chunks/framework-aaa7c1a953276299.js","static/chunks/main-bfb98fc1d6aa1d45.js","static/chunks/pages/_error-da89ab2956f0cf38.js"]},ampFirstPages:[]},globalThis.__BUILD_MANIFEST.lowPriorityFiles=["/static/"+process.env.__NEXT_BUILD_ID+"/_buildManifest.js",,"/static/"+process.env.__NEXT_BUILD_ID+"/_ssgManifest.js"];
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:[],rootMainFiles:["static/chunks/webpack-a051eba7e7f1881f.js","static/chunks/6fe292aa-7126ff9d6732e864.js","static/chunks/146-ccee3b26755b68c8.js","static/chunks/main-app-ebe67847147d19aa.js"],rootMainFilesTree:{},pages:{"/_app":["static/chunks/webpack-a051eba7e7f1881f.js","static/chunks/framework-aaa7c1a953276299.js","static/chunks/main-bfb98fc1d6aa1d45.js","static/chunks/pages/_app-bf8bc157ace53d59.js"],"/_error":["static/chunks/webpack-a051eba7e7f1881f.js","static/chunks/framework-aaa7c1a953276299.js","static/chunks/main-bfb98fc1d6aa1d45.js","static/chunks/pages/_error-da89ab2956f0cf38.js"]},ampFirstPages:[]},globalThis.__BUILD_MANIFEST.lowPriorityFiles=["/static/"+process.env.__NEXT_BUILD_ID+"/_buildManifest.js",,"/static/"+process.env.__NEXT_BUILD_ID+"/_ssgManifest.js"];
@@ -17,11 +17,11 @@
17
17
  "wasm": [],
18
18
  "assets": [],
19
19
  "env": {
20
- "__NEXT_BUILD_ID": "6dGMfpiSfKb8VjYCBSJk6",
21
- "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "C+urgIYgrFQ9waocAdj8CwrpDqPkB6KS2WPRB+J7FoQ=",
22
- "__NEXT_PREVIEW_MODE_ID": "f31788c28cf61d9b3d9557e3bf0e483d",
23
- "__NEXT_PREVIEW_MODE_SIGNING_KEY": "cc5a08a32a5c356a7cf46f115336ec3ae9caedda96d9b9e77973aea52fe3e071",
24
- "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "5fd3269a256fb8cc40f26554051c069183da5abfb6031966077f8251594af1f1"
20
+ "__NEXT_BUILD_ID": "9aIZJd7Nzsm6QMTXf63On",
21
+ "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "1CMeArVl0mUjec4TS5JKqWLAyTPISKxq7iiQAOlsoxc=",
22
+ "__NEXT_PREVIEW_MODE_ID": "fcdc44f233a69f78156735f2bb7ba206",
23
+ "__NEXT_PREVIEW_MODE_SIGNING_KEY": "9e262216e9b3eb9684958b4962334373f50c797430df75258dc4abc8c2d0728c",
24
+ "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "4cdb18967ae5b79d1e81dd9e8b30d7dc6469d3e7ae620a410727254d49c48fab"
25
25
  }
26
26
  }
27
27
  },
@@ -1 +1 @@
1
- self.__REACT_LOADABLE_MANIFEST='{"app/roots/[id]/chat/[topicId]/_components/interaction-cards.tsx -> @/lib/server/oauth-actions":{"id":94108,"files":["static/chunks/4108.19c3868f4af2c9f0.js"]}}';
1
+ self.__REACT_LOADABLE_MANIFEST='{"app/roots/[id]/chat/[topicId]/_components/interaction-cards.tsx -> @/lib/server/oauth-actions":{"id":94108,"files":["static/chunks/4108.1f4c5d5167258fc2.js"]}}';
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-365da08c2f4d8fd4.js" defer=""></script><script src="/_next/static/chunks/framework-aaa7c1a953276299.js" defer=""></script><script src="/_next/static/chunks/main-bfb98fc1d6aa1d45.js" defer=""></script><script src="/_next/static/chunks/pages/_app-bf8bc157ace53d59.js" defer=""></script><script src="/_next/static/chunks/pages/_error-da89ab2956f0cf38.js" defer=""></script><script src="/_next/static/6dGMfpiSfKb8VjYCBSJk6/_buildManifest.js" defer=""></script><script src="/_next/static/6dGMfpiSfKb8VjYCBSJk6/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"6dGMfpiSfKb8VjYCBSJk6","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-a051eba7e7f1881f.js" defer=""></script><script src="/_next/static/chunks/framework-aaa7c1a953276299.js" defer=""></script><script src="/_next/static/chunks/main-bfb98fc1d6aa1d45.js" defer=""></script><script src="/_next/static/chunks/pages/_app-bf8bc157ace53d59.js" defer=""></script><script src="/_next/static/chunks/pages/_error-da89ab2956f0cf38.js" defer=""></script><script src="/_next/static/9aIZJd7Nzsm6QMTXf63On/_buildManifest.js" defer=""></script><script src="/_next/static/9aIZJd7Nzsm6QMTXf63On/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"9aIZJd7Nzsm6QMTXf63On","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>