miclaw-app 0.1.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 (1324) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -0
  2. package/.next/standalone/.next/app-path-routes-manifest.json +14 -0
  3. package/.next/standalone/.next/build-manifest.json +20 -0
  4. package/.next/standalone/.next/package.json +1 -0
  5. package/.next/standalone/.next/prerender-manifest.json +282 -0
  6. package/.next/standalone/.next/required-server-files.json +333 -0
  7. package/.next/standalone/.next/routes-manifest.json +120 -0
  8. package/.next/standalone/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  9. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +16 -0
  10. package/.next/standalone/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  11. package/.next/standalone/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  12. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  13. package/.next/standalone/.next/server/app/_global-error/page.js +10 -0
  14. package/.next/standalone/.next/server/app/_global-error/page.js.map +5 -0
  15. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -0
  16. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  17. package/.next/standalone/.next/server/app/_global-error.html +1 -0
  18. package/.next/standalone/.next/server/app/_global-error.meta +15 -0
  19. package/.next/standalone/.next/server/app/_global-error.rsc +15 -0
  20. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
  21. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
  22. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +6 -0
  23. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  24. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  25. package/.next/standalone/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  26. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +16 -0
  27. package/.next/standalone/.next/server/app/_not-found/page/next-font-manifest.json +12 -0
  28. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  29. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  30. package/.next/standalone/.next/server/app/_not-found/page.js +13 -0
  31. package/.next/standalone/.next/server/app/_not-found/page.js.map +5 -0
  32. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -0
  33. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  34. package/.next/standalone/.next/server/app/_not-found.html +9 -0
  35. package/.next/standalone/.next/server/app/_not-found.meta +16 -0
  36. package/.next/standalone/.next/server/app/_not-found.rsc +17 -0
  37. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +17 -0
  38. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
  39. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +6 -0
  40. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  41. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  42. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
  43. package/.next/standalone/.next/server/app/agents/page/app-paths-manifest.json +3 -0
  44. package/.next/standalone/.next/server/app/agents/page/build-manifest.json +16 -0
  45. package/.next/standalone/.next/server/app/agents/page/next-font-manifest.json +12 -0
  46. package/.next/standalone/.next/server/app/agents/page/react-loadable-manifest.json +1 -0
  47. package/.next/standalone/.next/server/app/agents/page/server-reference-manifest.json +4 -0
  48. package/.next/standalone/.next/server/app/agents/page.js +15 -0
  49. package/.next/standalone/.next/server/app/agents/page.js.map +5 -0
  50. package/.next/standalone/.next/server/app/agents/page.js.nft.json +1 -0
  51. package/.next/standalone/.next/server/app/agents/page_client-reference-manifest.js +3 -0
  52. package/.next/standalone/.next/server/app/agents.html +30 -0
  53. package/.next/standalone/.next/server/app/agents.meta +15 -0
  54. package/.next/standalone/.next/server/app/agents.rsc +345 -0
  55. package/.next/standalone/.next/server/app/agents.segments/_full.segment.rsc +345 -0
  56. package/.next/standalone/.next/server/app/agents.segments/_head.segment.rsc +6 -0
  57. package/.next/standalone/.next/server/app/agents.segments/_index.segment.rsc +6 -0
  58. package/.next/standalone/.next/server/app/agents.segments/_tree.segment.rsc +5 -0
  59. package/.next/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +331 -0
  60. package/.next/standalone/.next/server/app/agents.segments/agents.segment.rsc +5 -0
  61. package/.next/standalone/.next/server/app/commands/page/app-paths-manifest.json +3 -0
  62. package/.next/standalone/.next/server/app/commands/page/build-manifest.json +16 -0
  63. package/.next/standalone/.next/server/app/commands/page/next-font-manifest.json +12 -0
  64. package/.next/standalone/.next/server/app/commands/page/react-loadable-manifest.json +1 -0
  65. package/.next/standalone/.next/server/app/commands/page/server-reference-manifest.json +4 -0
  66. package/.next/standalone/.next/server/app/commands/page.js +15 -0
  67. package/.next/standalone/.next/server/app/commands/page.js.map +5 -0
  68. package/.next/standalone/.next/server/app/commands/page.js.nft.json +1 -0
  69. package/.next/standalone/.next/server/app/commands/page_client-reference-manifest.js +3 -0
  70. package/.next/standalone/.next/server/app/commands.html +33 -0
  71. package/.next/standalone/.next/server/app/commands.meta +15 -0
  72. package/.next/standalone/.next/server/app/commands.rsc +1672 -0
  73. package/.next/standalone/.next/server/app/commands.segments/_full.segment.rsc +1672 -0
  74. package/.next/standalone/.next/server/app/commands.segments/_head.segment.rsc +6 -0
  75. package/.next/standalone/.next/server/app/commands.segments/_index.segment.rsc +6 -0
  76. package/.next/standalone/.next/server/app/commands.segments/_tree.segment.rsc +5 -0
  77. package/.next/standalone/.next/server/app/commands.segments/commands/__PAGE__.segment.rsc +1658 -0
  78. package/.next/standalone/.next/server/app/commands.segments/commands.segment.rsc +5 -0
  79. package/.next/standalone/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
  80. package/.next/standalone/.next/server/app/favicon.ico/route/build-manifest.json +9 -0
  81. package/.next/standalone/.next/server/app/favicon.ico/route.js +6 -0
  82. package/.next/standalone/.next/server/app/favicon.ico/route.js.map +5 -0
  83. package/.next/standalone/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  84. package/.next/standalone/.next/server/app/favicon.ico.body +0 -0
  85. package/.next/standalone/.next/server/app/favicon.ico.meta +1 -0
  86. package/.next/standalone/.next/server/app/hooks/page/app-paths-manifest.json +3 -0
  87. package/.next/standalone/.next/server/app/hooks/page/build-manifest.json +16 -0
  88. package/.next/standalone/.next/server/app/hooks/page/next-font-manifest.json +12 -0
  89. package/.next/standalone/.next/server/app/hooks/page/react-loadable-manifest.json +1 -0
  90. package/.next/standalone/.next/server/app/hooks/page/server-reference-manifest.json +4 -0
  91. package/.next/standalone/.next/server/app/hooks/page.js +15 -0
  92. package/.next/standalone/.next/server/app/hooks/page.js.map +5 -0
  93. package/.next/standalone/.next/server/app/hooks/page.js.nft.json +1 -0
  94. package/.next/standalone/.next/server/app/hooks/page_client-reference-manifest.js +3 -0
  95. package/.next/standalone/.next/server/app/hooks.html +9 -0
  96. package/.next/standalone/.next/server/app/hooks.meta +15 -0
  97. package/.next/standalone/.next/server/app/hooks.rsc +21 -0
  98. package/.next/standalone/.next/server/app/hooks.segments/_full.segment.rsc +21 -0
  99. package/.next/standalone/.next/server/app/hooks.segments/_head.segment.rsc +6 -0
  100. package/.next/standalone/.next/server/app/hooks.segments/_index.segment.rsc +6 -0
  101. package/.next/standalone/.next/server/app/hooks.segments/_tree.segment.rsc +5 -0
  102. package/.next/standalone/.next/server/app/hooks.segments/hooks/__PAGE__.segment.rsc +5 -0
  103. package/.next/standalone/.next/server/app/hooks.segments/hooks.segment.rsc +5 -0
  104. package/.next/standalone/.next/server/app/index.html +83 -0
  105. package/.next/standalone/.next/server/app/index.meta +14 -0
  106. package/.next/standalone/.next/server/app/index.rsc +20 -0
  107. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +8 -0
  108. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +20 -0
  109. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +6 -0
  110. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +6 -0
  111. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +5 -0
  112. package/.next/standalone/.next/server/app/mcp/page/app-paths-manifest.json +3 -0
  113. package/.next/standalone/.next/server/app/mcp/page/build-manifest.json +16 -0
  114. package/.next/standalone/.next/server/app/mcp/page/next-font-manifest.json +12 -0
  115. package/.next/standalone/.next/server/app/mcp/page/react-loadable-manifest.json +1 -0
  116. package/.next/standalone/.next/server/app/mcp/page/server-reference-manifest.json +4 -0
  117. package/.next/standalone/.next/server/app/mcp/page.js +15 -0
  118. package/.next/standalone/.next/server/app/mcp/page.js.map +5 -0
  119. package/.next/standalone/.next/server/app/mcp/page.js.nft.json +1 -0
  120. package/.next/standalone/.next/server/app/mcp/page_client-reference-manifest.js +3 -0
  121. package/.next/standalone/.next/server/app/mcp.html +9 -0
  122. package/.next/standalone/.next/server/app/mcp.meta +15 -0
  123. package/.next/standalone/.next/server/app/mcp.rsc +23 -0
  124. package/.next/standalone/.next/server/app/mcp.segments/_full.segment.rsc +23 -0
  125. package/.next/standalone/.next/server/app/mcp.segments/_head.segment.rsc +6 -0
  126. package/.next/standalone/.next/server/app/mcp.segments/_index.segment.rsc +6 -0
  127. package/.next/standalone/.next/server/app/mcp.segments/_tree.segment.rsc +5 -0
  128. package/.next/standalone/.next/server/app/mcp.segments/mcp/__PAGE__.segment.rsc +8 -0
  129. package/.next/standalone/.next/server/app/mcp.segments/mcp.segment.rsc +5 -0
  130. package/.next/standalone/.next/server/app/page/app-paths-manifest.json +3 -0
  131. package/.next/standalone/.next/server/app/page/build-manifest.json +16 -0
  132. package/.next/standalone/.next/server/app/page/next-font-manifest.json +12 -0
  133. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -0
  134. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +4 -0
  135. package/.next/standalone/.next/server/app/page.js +15 -0
  136. package/.next/standalone/.next/server/app/page.js.map +5 -0
  137. package/.next/standalone/.next/server/app/page.js.nft.json +1 -0
  138. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +3 -0
  139. package/.next/standalone/.next/server/app/projects/[slug]/page/app-paths-manifest.json +3 -0
  140. package/.next/standalone/.next/server/app/projects/[slug]/page/build-manifest.json +16 -0
  141. package/.next/standalone/.next/server/app/projects/[slug]/page/next-font-manifest.json +12 -0
  142. package/.next/standalone/.next/server/app/projects/[slug]/page/react-loadable-manifest.json +1 -0
  143. package/.next/standalone/.next/server/app/projects/[slug]/page/server-reference-manifest.json +4 -0
  144. package/.next/standalone/.next/server/app/projects/[slug]/page.js +16 -0
  145. package/.next/standalone/.next/server/app/projects/[slug]/page.js.map +5 -0
  146. package/.next/standalone/.next/server/app/projects/[slug]/page.js.nft.json +1 -0
  147. package/.next/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +3 -0
  148. package/.next/standalone/.next/server/app/rules/page/app-paths-manifest.json +3 -0
  149. package/.next/standalone/.next/server/app/rules/page/build-manifest.json +16 -0
  150. package/.next/standalone/.next/server/app/rules/page/next-font-manifest.json +12 -0
  151. package/.next/standalone/.next/server/app/rules/page/react-loadable-manifest.json +1 -0
  152. package/.next/standalone/.next/server/app/rules/page/server-reference-manifest.json +4 -0
  153. package/.next/standalone/.next/server/app/rules/page.js +15 -0
  154. package/.next/standalone/.next/server/app/rules/page.js.map +5 -0
  155. package/.next/standalone/.next/server/app/rules/page.js.nft.json +1 -0
  156. package/.next/standalone/.next/server/app/rules/page_client-reference-manifest.js +3 -0
  157. package/.next/standalone/.next/server/app/rules.html +72 -0
  158. package/.next/standalone/.next/server/app/rules.meta +15 -0
  159. package/.next/standalone/.next/server/app/rules.rsc +2358 -0
  160. package/.next/standalone/.next/server/app/rules.segments/_full.segment.rsc +2358 -0
  161. package/.next/standalone/.next/server/app/rules.segments/_head.segment.rsc +6 -0
  162. package/.next/standalone/.next/server/app/rules.segments/_index.segment.rsc +6 -0
  163. package/.next/standalone/.next/server/app/rules.segments/_tree.segment.rsc +5 -0
  164. package/.next/standalone/.next/server/app/rules.segments/rules/__PAGE__.segment.rsc +2344 -0
  165. package/.next/standalone/.next/server/app/rules.segments/rules.segment.rsc +5 -0
  166. package/.next/standalone/.next/server/app/settings/page/app-paths-manifest.json +3 -0
  167. package/.next/standalone/.next/server/app/settings/page/build-manifest.json +16 -0
  168. package/.next/standalone/.next/server/app/settings/page/next-font-manifest.json +12 -0
  169. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +1 -0
  170. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -0
  171. package/.next/standalone/.next/server/app/settings/page.js +15 -0
  172. package/.next/standalone/.next/server/app/settings/page.js.map +5 -0
  173. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -0
  174. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +3 -0
  175. package/.next/standalone/.next/server/app/settings.html +56 -0
  176. package/.next/standalone/.next/server/app/settings.meta +15 -0
  177. package/.next/standalone/.next/server/app/settings.rsc +226 -0
  178. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +226 -0
  179. package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +6 -0
  180. package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +6 -0
  181. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +5 -0
  182. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +211 -0
  183. package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +5 -0
  184. package/.next/standalone/.next/server/app/skills/page/app-paths-manifest.json +3 -0
  185. package/.next/standalone/.next/server/app/skills/page/build-manifest.json +16 -0
  186. package/.next/standalone/.next/server/app/skills/page/next-font-manifest.json +12 -0
  187. package/.next/standalone/.next/server/app/skills/page/react-loadable-manifest.json +1 -0
  188. package/.next/standalone/.next/server/app/skills/page/server-reference-manifest.json +4 -0
  189. package/.next/standalone/.next/server/app/skills/page.js +15 -0
  190. package/.next/standalone/.next/server/app/skills/page.js.map +5 -0
  191. package/.next/standalone/.next/server/app/skills/page.js.nft.json +1 -0
  192. package/.next/standalone/.next/server/app/skills/page_client-reference-manifest.js +3 -0
  193. package/.next/standalone/.next/server/app/skills.html +30 -0
  194. package/.next/standalone/.next/server/app/skills.meta +15 -0
  195. package/.next/standalone/.next/server/app/skills.rsc +1111 -0
  196. package/.next/standalone/.next/server/app/skills.segments/_full.segment.rsc +1111 -0
  197. package/.next/standalone/.next/server/app/skills.segments/_head.segment.rsc +6 -0
  198. package/.next/standalone/.next/server/app/skills.segments/_index.segment.rsc +6 -0
  199. package/.next/standalone/.next/server/app/skills.segments/_tree.segment.rsc +5 -0
  200. package/.next/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +1097 -0
  201. package/.next/standalone/.next/server/app/skills.segments/skills.segment.rsc +5 -0
  202. package/.next/standalone/.next/server/app-paths-manifest.json +14 -0
  203. package/.next/standalone/.next/server/chunks/[externals]_next_dist_0arv.vj._.js +3 -0
  204. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0teziyo._.js +13 -0
  205. package/.next/standalone/.next/server/chunks/[turbopack]_runtime.js +903 -0
  206. package/.next/standalone/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js +3 -0
  207. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.pno0_._.js +3 -0
  208. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06czxzo._.js +3 -0
  209. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06ipj7k._.js +3 -0
  210. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08c9t2b._.js +3 -0
  211. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09x1iac._.js +33 -0
  212. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09z7o2x._.js +19 -0
  213. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0beg-.s._.js +3 -0
  214. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bm8p5g._.js +3 -0
  215. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ca-xeh._.js +3 -0
  216. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dey16.._.js +3 -0
  217. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fvw3d8._.js +3 -0
  218. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qk5gqw._.js +3 -0
  219. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s0h9e0._.js +3 -0
  220. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0u-t242._.js +3 -0
  221. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xl6e~c._.js +3 -0
  222. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xrk31o._.js +33 -0
  223. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y_d026._.js +3 -0
  224. package/.next/standalone/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
  225. package/.next/standalone/.next/server/chunks/ssr/_09kkdgy._.js +6 -0
  226. package/.next/standalone/.next/server/chunks/ssr/_0g8yqoe._.js +7 -0
  227. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js +3 -0
  228. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js +3 -0
  229. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_agents_page_actions_07l1ss4.js +3 -0
  230. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_commands_page_actions_0npst50.js +3 -0
  231. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_hooks_page_actions_0a_tx-6.js +3 -0
  232. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_mcp_page_actions_00_op~_.js +3 -0
  233. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js +3 -0
  234. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_page_actions_0xg3f7c.js +3 -0
  235. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_rules_page_actions_0xcrbur.js +3 -0
  236. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_0mr68ai.js +3 -0
  237. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_skills_page_actions_0cxzzu-.js +3 -0
  238. package/.next/standalone/.next/server/chunks/ssr/node_modules_09w7yel._.js +33 -0
  239. package/.next/standalone/.next/server/chunks/ssr/node_modules_0sy8gnb._.js +3 -0
  240. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0e1izl_._.js +6 -0
  241. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js +3 -0
  242. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js +3 -0
  243. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js +3 -0
  244. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js +3 -0
  245. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03-z2qq.js +4 -0
  246. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_06b_a87.js +4 -0
  247. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_071geea.js +4 -0
  248. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07vh7rm.js +4 -0
  249. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08617.g.js +4 -0
  250. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0dlz56b.js +4 -0
  251. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0fnc180.js +4 -0
  252. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0iktlcc.js +4 -0
  253. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0qp4u6g.js +4 -0
  254. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0t-uic4.js +4 -0
  255. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0v9mjz4.js +4 -0
  256. package/.next/standalone/.next/server/chunks/ssr/src_components_ExpandableBody_tsx_0-ivqwg._.js +3 -0
  257. package/.next/standalone/.next/server/chunks/ssr/src_components_SphereView_tsx_0q2ope8._.js +13 -0
  258. package/.next/standalone/.next/server/functions-config-manifest.json +4 -0
  259. package/.next/standalone/.next/server/middleware-build-manifest.js +20 -0
  260. package/.next/standalone/.next/server/middleware-manifest.json +6 -0
  261. package/.next/standalone/.next/server/next-font-manifest.js +1 -0
  262. package/.next/standalone/.next/server/next-font-manifest.json +57 -0
  263. package/.next/standalone/.next/server/pages/404.html +9 -0
  264. package/.next/standalone/.next/server/pages/500.html +1 -0
  265. package/.next/standalone/.next/server/pages-manifest.json +4 -0
  266. package/.next/standalone/.next/server/prefetch-hints.json +1 -0
  267. package/.next/standalone/.next/server/server-reference-manifest.js +1 -0
  268. package/.next/standalone/.next/server/server-reference-manifest.json +5 -0
  269. package/.next/standalone/node_modules/@img/colour/color.cjs +1596 -0
  270. package/.next/standalone/node_modules/@img/colour/index.cjs +1 -0
  271. package/.next/standalone/node_modules/@img/colour/package.json +58 -0
  272. package/.next/standalone/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
  273. package/.next/standalone/node_modules/@img/sharp-darwin-arm64/package.json +40 -0
  274. package/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/README.md +46 -0
  275. package/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h +220 -0
  276. package/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js +1 -0
  277. package/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib +0 -0
  278. package/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/package.json +36 -0
  279. package/.next/standalone/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +30 -0
  280. package/.next/standalone/node_modules/@next/env/dist/index.js +1 -0
  281. package/.next/standalone/node_modules/@next/env/package.json +36 -0
  282. package/.next/standalone/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +6 -0
  283. package/.next/standalone/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +38 -0
  284. package/.next/standalone/node_modules/@swc/helpers/package.json +471 -0
  285. package/.next/standalone/node_modules/client-only/index.js +0 -0
  286. package/.next/standalone/node_modules/client-only/package.json +19 -0
  287. package/.next/standalone/node_modules/detect-libc/lib/detect-libc.js +313 -0
  288. package/.next/standalone/node_modules/detect-libc/lib/elf.js +39 -0
  289. package/.next/standalone/node_modules/detect-libc/lib/filesystem.js +51 -0
  290. package/.next/standalone/node_modules/detect-libc/lib/process.js +24 -0
  291. package/.next/standalone/node_modules/detect-libc/package.json +44 -0
  292. package/.next/standalone/node_modules/next/dist/build/adapter/setup-node-env.external.js +15 -0
  293. package/.next/standalone/node_modules/next/dist/build/define-env.js +255 -0
  294. package/.next/standalone/node_modules/next/dist/build/duration-to-string.js +99 -0
  295. package/.next/standalone/node_modules/next/dist/build/get-supported-browsers.js +38 -0
  296. package/.next/standalone/node_modules/next/dist/build/next-config-ts/require-hook.js +85 -0
  297. package/.next/standalone/node_modules/next/dist/build/next-config-ts/transpile-config.js +251 -0
  298. package/.next/standalone/node_modules/next/dist/build/output/format.js +84 -0
  299. package/.next/standalone/node_modules/next/dist/build/output/log.js +135 -0
  300. package/.next/standalone/node_modules/next/dist/build/segment-config/app/app-segment-config.js +162 -0
  301. package/.next/standalone/node_modules/next/dist/build/segment-config/app/app-segments.js +137 -0
  302. package/.next/standalone/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +52 -0
  303. package/.next/standalone/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +137 -0
  304. package/.next/standalone/node_modules/next/dist/build/static-paths/app.js +735 -0
  305. package/.next/standalone/node_modules/next/dist/build/static-paths/pages.js +169 -0
  306. package/.next/standalone/node_modules/next/dist/build/static-paths/utils.js +119 -0
  307. package/.next/standalone/node_modules/next/dist/build/swc/helpers.js +15 -0
  308. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1348 -0
  309. package/.next/standalone/node_modules/next/dist/build/swc/install-bindings.js +30 -0
  310. package/.next/standalone/node_modules/next/dist/build/swc/jest-transformer.js +76 -0
  311. package/.next/standalone/node_modules/next/dist/build/swc/loaderWorkerPool.js +40 -0
  312. package/.next/standalone/node_modules/next/dist/build/swc/options.js +403 -0
  313. package/.next/standalone/node_modules/next/dist/build/swc/types.js +6 -0
  314. package/.next/standalone/node_modules/next/dist/build/utils.js +1215 -0
  315. package/.next/standalone/node_modules/next/dist/cli/next-test.js +170 -0
  316. package/.next/standalone/node_modules/next/dist/client/add-base-path.js +24 -0
  317. package/.next/standalone/node_modules/next/dist/client/app-call-server.js +34 -0
  318. package/.next/standalone/node_modules/next/dist/client/app-find-source-map-url.js +39 -0
  319. package/.next/standalone/node_modules/next/dist/client/assign-location.js +29 -0
  320. package/.next/standalone/node_modules/next/dist/client/components/app-router-announcer.js +78 -0
  321. package/.next/standalone/node_modules/next/dist/client/components/app-router-headers.js +138 -0
  322. package/.next/standalone/node_modules/next/dist/client/components/app-router-instance.js +397 -0
  323. package/.next/standalone/node_modules/next/dist/client/components/app-router-utils.js +62 -0
  324. package/.next/standalone/node_modules/next/dist/client/components/app-router.js +514 -0
  325. package/.next/standalone/node_modules/next/dist/client/components/builtin/default.js +35 -0
  326. package/.next/standalone/node_modules/next/dist/client/components/builtin/error-styles.js +165 -0
  327. package/.next/standalone/node_modules/next/dist/client/components/builtin/global-error.js +100 -0
  328. package/.next/standalone/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js +52 -0
  329. package/.next/standalone/node_modules/next/dist/client/components/error-boundary.js +144 -0
  330. package/.next/standalone/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js +86 -0
  331. package/.next/standalone/node_modules/next/dist/client/components/errors/root-error-boundary.js +41 -0
  332. package/.next/standalone/node_modules/next/dist/client/components/forbidden.js +48 -0
  333. package/.next/standalone/node_modules/next/dist/client/components/handle-isr-error.js +30 -0
  334. package/.next/standalone/node_modules/next/dist/client/components/hooks-server-context.js +42 -0
  335. package/.next/standalone/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js +125 -0
  336. package/.next/standalone/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +72 -0
  337. package/.next/standalone/node_modules/next/dist/client/components/is-next-router-error.js +23 -0
  338. package/.next/standalone/node_modules/next/dist/client/components/links.js +299 -0
  339. package/.next/standalone/node_modules/next/dist/client/components/match-segments.js +32 -0
  340. package/.next/standalone/node_modules/next/dist/client/components/nav-failure-handler.js +61 -0
  341. package/.next/standalone/node_modules/next/dist/client/components/navigation-devtools.js +126 -0
  342. package/.next/standalone/node_modules/next/dist/client/components/navigation-untracked.js +67 -0
  343. package/.next/standalone/node_modules/next/dist/client/components/navigation.js +225 -0
  344. package/.next/standalone/node_modules/next/dist/client/components/navigation.react-server.js +75 -0
  345. package/.next/standalone/node_modules/next/dist/client/components/not-found.js +42 -0
  346. package/.next/standalone/node_modules/next/dist/client/components/readonly-url-search-params.js +41 -0
  347. package/.next/standalone/node_modules/next/dist/client/components/redirect-boundary.js +107 -0
  348. package/.next/standalone/node_modules/next/dist/client/components/redirect-error.js +43 -0
  349. package/.next/standalone/node_modules/next/dist/client/components/redirect-status-code.js +24 -0
  350. package/.next/standalone/node_modules/next/dist/client/components/redirect.js +91 -0
  351. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js +201 -0
  352. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js +21 -0
  353. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +153 -0
  354. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js +32 -0
  355. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +457 -0
  356. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +59 -0
  357. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +1341 -0
  358. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/committed-state.js +49 -0
  359. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js +63 -0
  360. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js +38 -0
  361. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +23 -0
  362. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +56 -0
  363. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +83 -0
  364. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +62 -0
  365. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +320 -0
  366. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +58 -0
  367. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +70 -0
  368. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer.js +66 -0
  369. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +60 -0
  370. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/bfcache.js +128 -0
  371. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache-key.js +28 -0
  372. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache-map.js +305 -0
  373. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache.js +1933 -0
  374. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/lru.js +152 -0
  375. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +194 -0
  376. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/navigation.js +597 -0
  377. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +543 -0
  378. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/prefetch.js +31 -0
  379. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/scheduler.js +1249 -0
  380. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/types.js +69 -0
  381. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/vary-path.js +278 -0
  382. package/.next/standalone/node_modules/next/dist/client/components/static-generation-bailout.js +42 -0
  383. package/.next/standalone/node_modules/next/dist/client/components/unauthorized.js +49 -0
  384. package/.next/standalone/node_modules/next/dist/client/components/unrecognized-action-error.js +39 -0
  385. package/.next/standalone/node_modules/next/dist/client/components/unresolved-thenable.js +23 -0
  386. package/.next/standalone/node_modules/next/dist/client/components/unstable-rethrow.browser.js +28 -0
  387. package/.next/standalone/node_modules/next/dist/client/components/unstable-rethrow.js +25 -0
  388. package/.next/standalone/node_modules/next/dist/client/components/unstable-rethrow.server.js +32 -0
  389. package/.next/standalone/node_modules/next/dist/client/components/use-action-queue.js +148 -0
  390. package/.next/standalone/node_modules/next/dist/client/dev/debug-channel.js +72 -0
  391. package/.next/standalone/node_modules/next/dist/client/flight-data-helpers.js +232 -0
  392. package/.next/standalone/node_modules/next/dist/client/has-base-path.js +23 -0
  393. package/.next/standalone/node_modules/next/dist/client/lib/console.js +177 -0
  394. package/.next/standalone/node_modules/next/dist/client/lib/javascript-url.js +32 -0
  395. package/.next/standalone/node_modules/next/dist/client/navigation-build-id.js +53 -0
  396. package/.next/standalone/node_modules/next/dist/client/normalize-trailing-slash.js +36 -0
  397. package/.next/standalone/node_modules/next/dist/client/remove-base-path.js +32 -0
  398. package/.next/standalone/node_modules/next/dist/client/route-params.js +230 -0
  399. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js +339 -0
  400. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/cookies/package.json +1 -0
  401. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/ponyfill/index.js +46 -0
  402. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/ponyfill/package.json +1 -0
  403. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/abort-controller.js.text.js +1 -0
  404. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/console.js.text.js +1 -0
  405. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/events.js.text.js +1 -0
  406. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/index.js +5 -0
  407. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js +18713 -0
  408. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/package.json +1 -0
  409. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/stream.js +44 -0
  410. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/timers.js.text.js +1 -0
  411. package/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/url.js.text.js +1 -0
  412. package/.next/standalone/node_modules/next/dist/compiled/@hapi/accept/index.js +1 -0
  413. package/.next/standalone/node_modules/next/dist/compiled/@hapi/accept/package.json +1 -0
  414. package/.next/standalone/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js +1 -0
  415. package/.next/standalone/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/package.json +1 -0
  416. package/.next/standalone/node_modules/next/dist/compiled/@napi-rs/triples/index.js +1 -0
  417. package/.next/standalone/node_modules/next/dist/compiled/@napi-rs/triples/package.json +1 -0
  418. package/.next/standalone/node_modules/next/dist/compiled/@opentelemetry/api/index.js +1 -0
  419. package/.next/standalone/node_modules/next/dist/compiled/@opentelemetry/api/package.json +1 -0
  420. package/.next/standalone/node_modules/next/dist/compiled/async-retry/index.js +1 -0
  421. package/.next/standalone/node_modules/next/dist/compiled/async-retry/package.json +1 -0
  422. package/.next/standalone/node_modules/next/dist/compiled/async-sema/index.js +1 -0
  423. package/.next/standalone/node_modules/next/dist/compiled/async-sema/package.json +1 -0
  424. package/.next/standalone/node_modules/next/dist/compiled/busboy/index.js +1 -0
  425. package/.next/standalone/node_modules/next/dist/compiled/busboy/package.json +1 -0
  426. package/.next/standalone/node_modules/next/dist/compiled/bytes/index.js +8 -0
  427. package/.next/standalone/node_modules/next/dist/compiled/bytes/package.json +1 -0
  428. package/.next/standalone/node_modules/next/dist/compiled/ci-info/index.js +1 -0
  429. package/.next/standalone/node_modules/next/dist/compiled/ci-info/package.json +1 -0
  430. package/.next/standalone/node_modules/next/dist/compiled/commander/index.js +1 -0
  431. package/.next/standalone/node_modules/next/dist/compiled/commander/package.json +1 -0
  432. package/.next/standalone/node_modules/next/dist/compiled/comment-json/index.js +7 -0
  433. package/.next/standalone/node_modules/next/dist/compiled/comment-json/package.json +1 -0
  434. package/.next/standalone/node_modules/next/dist/compiled/compression/index.js +58 -0
  435. package/.next/standalone/node_modules/next/dist/compiled/compression/package.json +1 -0
  436. package/.next/standalone/node_modules/next/dist/compiled/conf/index.js +15 -0
  437. package/.next/standalone/node_modules/next/dist/compiled/conf/package.json +1 -0
  438. package/.next/standalone/node_modules/next/dist/compiled/content-disposition/index.js +6 -0
  439. package/.next/standalone/node_modules/next/dist/compiled/content-disposition/package.json +1 -0
  440. package/.next/standalone/node_modules/next/dist/compiled/cookie/index.js +7 -0
  441. package/.next/standalone/node_modules/next/dist/compiled/cookie/package.json +1 -0
  442. package/.next/standalone/node_modules/next/dist/compiled/cross-spawn/index.js +1 -0
  443. package/.next/standalone/node_modules/next/dist/compiled/cross-spawn/package.json +1 -0
  444. package/.next/standalone/node_modules/next/dist/compiled/debug/index.js +1 -0
  445. package/.next/standalone/node_modules/next/dist/compiled/debug/package.json +1 -0
  446. package/.next/standalone/node_modules/next/dist/compiled/edge-runtime/index.js +1 -0
  447. package/.next/standalone/node_modules/next/dist/compiled/edge-runtime/package.json +1 -0
  448. package/.next/standalone/node_modules/next/dist/compiled/find-up/index.js +1 -0
  449. package/.next/standalone/node_modules/next/dist/compiled/find-up/package.json +1 -0
  450. package/.next/standalone/node_modules/next/dist/compiled/fresh/index.js +8 -0
  451. package/.next/standalone/node_modules/next/dist/compiled/fresh/package.json +1 -0
  452. package/.next/standalone/node_modules/next/dist/compiled/http-proxy/index.js +34 -0
  453. package/.next/standalone/node_modules/next/dist/compiled/http-proxy/package.json +1 -0
  454. package/.next/standalone/node_modules/next/dist/compiled/image-detector/detector.js +1 -0
  455. package/.next/standalone/node_modules/next/dist/compiled/image-size/index.js +1 -0
  456. package/.next/standalone/node_modules/next/dist/compiled/image-size/package.json +1 -0
  457. package/.next/standalone/node_modules/next/dist/compiled/ipaddr.js/ipaddr.js +1 -0
  458. package/.next/standalone/node_modules/next/dist/compiled/ipaddr.js/package.json +1 -0
  459. package/.next/standalone/node_modules/next/dist/compiled/is-animated/index.js +1 -0
  460. package/.next/standalone/node_modules/next/dist/compiled/is-animated/package.json +1 -0
  461. package/.next/standalone/node_modules/next/dist/compiled/is-docker/index.js +1 -0
  462. package/.next/standalone/node_modules/next/dist/compiled/is-docker/package.json +1 -0
  463. package/.next/standalone/node_modules/next/dist/compiled/is-wsl/index.js +1 -0
  464. package/.next/standalone/node_modules/next/dist/compiled/is-wsl/package.json +1 -0
  465. package/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/index.js +11 -0
  466. package/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/package.json +1 -0
  467. package/.next/standalone/node_modules/next/dist/compiled/nanoid/index.cjs +1 -0
  468. package/.next/standalone/node_modules/next/dist/compiled/nanoid/package.json +1 -0
  469. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +54 -0
  470. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +54 -0
  471. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +6 -0
  472. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +20 -0
  473. package/.next/standalone/node_modules/next/dist/compiled/p-limit/index.js +1 -0
  474. package/.next/standalone/node_modules/next/dist/compiled/p-limit/package.json +1 -0
  475. package/.next/standalone/node_modules/next/dist/compiled/p-queue/index.js +1 -0
  476. package/.next/standalone/node_modules/next/dist/compiled/p-queue/package.json +1 -0
  477. package/.next/standalone/node_modules/next/dist/compiled/path-browserify/index.js +1 -0
  478. package/.next/standalone/node_modules/next/dist/compiled/path-browserify/package.json +1 -0
  479. package/.next/standalone/node_modules/next/dist/compiled/path-to-regexp/index.js +1 -0
  480. package/.next/standalone/node_modules/next/dist/compiled/path-to-regexp/package.json +1 -0
  481. package/.next/standalone/node_modules/next/dist/compiled/picomatch/index.js +1 -0
  482. package/.next/standalone/node_modules/next/dist/compiled/picomatch/package.json +1 -0
  483. package/.next/standalone/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +133 -0
  484. package/.next/standalone/node_modules/next/dist/compiled/react-is/cjs/react-is.production.js +130 -0
  485. package/.next/standalone/node_modules/next/dist/compiled/react-is/index.js +7 -0
  486. package/.next/standalone/node_modules/next/dist/compiled/react-is/package.json +26 -0
  487. package/.next/standalone/node_modules/next/dist/compiled/regenerator-runtime/package.json +19 -0
  488. package/.next/standalone/node_modules/next/dist/compiled/regenerator-runtime/runtime.js +729 -0
  489. package/.next/standalone/node_modules/next/dist/compiled/semver/index.js +1 -0
  490. package/.next/standalone/node_modules/next/dist/compiled/semver/package.json +1 -0
  491. package/.next/standalone/node_modules/next/dist/compiled/send/index.js +70 -0
  492. package/.next/standalone/node_modules/next/dist/compiled/send/package.json +1 -0
  493. package/.next/standalone/node_modules/next/dist/compiled/source-map/package.json +1 -0
  494. package/.next/standalone/node_modules/next/dist/compiled/source-map/source-map.js +1 -0
  495. package/.next/standalone/node_modules/next/dist/compiled/stacktrace-parser/package.json +1 -0
  496. package/.next/standalone/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js +1 -0
  497. package/.next/standalone/node_modules/next/dist/compiled/string-hash/index.js +1 -0
  498. package/.next/standalone/node_modules/next/dist/compiled/string-hash/package.json +1 -0
  499. package/.next/standalone/node_modules/next/dist/compiled/strip-ansi/index.js +1 -0
  500. package/.next/standalone/node_modules/next/dist/compiled/strip-ansi/package.json +1 -0
  501. package/.next/standalone/node_modules/next/dist/compiled/superstruct/index.cjs +1 -0
  502. package/.next/standalone/node_modules/next/dist/compiled/superstruct/package.json +1 -0
  503. package/.next/standalone/node_modules/next/dist/compiled/tar/index.min.js +1 -0
  504. package/.next/standalone/node_modules/next/dist/compiled/tar/package.json +1 -0
  505. package/.next/standalone/node_modules/next/dist/compiled/text-table/index.js +1 -0
  506. package/.next/standalone/node_modules/next/dist/compiled/text-table/package.json +1 -0
  507. package/.next/standalone/node_modules/next/dist/compiled/watchpack/package.json +1 -0
  508. package/.next/standalone/node_modules/next/dist/compiled/watchpack/watchpack.js +1 -0
  509. package/.next/standalone/node_modules/next/dist/compiled/ws/index.js +1 -0
  510. package/.next/standalone/node_modules/next/dist/compiled/ws/package.json +1 -0
  511. package/.next/standalone/node_modules/next/dist/compiled/zod/index.cjs +1 -0
  512. package/.next/standalone/node_modules/next/dist/compiled/zod/package.json +1 -0
  513. package/.next/standalone/node_modules/next/dist/compiled/zod-validation-error/index.js +1 -0
  514. package/.next/standalone/node_modules/next/dist/compiled/zod-validation-error/package.json +1 -0
  515. package/.next/standalone/node_modules/next/dist/experimental/testmode/context.js +57 -0
  516. package/.next/standalone/node_modules/next/dist/experimental/testmode/fetch.js +142 -0
  517. package/.next/standalone/node_modules/next/dist/experimental/testmode/httpget.js +26 -0
  518. package/.next/standalone/node_modules/next/dist/experimental/testmode/server-edge.js +32 -0
  519. package/.next/standalone/node_modules/next/dist/experimental/testmode/server.js +62 -0
  520. package/.next/standalone/node_modules/next/dist/export/helpers/create-incremental-cache.js +61 -0
  521. package/.next/standalone/node_modules/next/dist/lib/batcher.js +65 -0
  522. package/.next/standalone/node_modules/next/dist/lib/build-custom-route.js +46 -0
  523. package/.next/standalone/node_modules/next/dist/lib/bundler.js +97 -0
  524. package/.next/standalone/node_modules/next/dist/lib/client-and-server-references.js +54 -0
  525. package/.next/standalone/node_modules/next/dist/lib/coalesced-function.js +39 -0
  526. package/.next/standalone/node_modules/next/dist/lib/compile-error.js +14 -0
  527. package/.next/standalone/node_modules/next/dist/lib/constants.js +420 -0
  528. package/.next/standalone/node_modules/next/dist/lib/create-client-router-filter.js +67 -0
  529. package/.next/standalone/node_modules/next/dist/lib/default-transpiled-packages.json +1 -0
  530. package/.next/standalone/node_modules/next/dist/lib/detached-promise.js +32 -0
  531. package/.next/standalone/node_modules/next/dist/lib/detect-typo.js +51 -0
  532. package/.next/standalone/node_modules/next/dist/lib/download-swc.js +183 -0
  533. package/.next/standalone/node_modules/next/dist/lib/error-telemetry-utils.js +42 -0
  534. package/.next/standalone/node_modules/next/dist/lib/fallback.js +100 -0
  535. package/.next/standalone/node_modules/next/dist/lib/fatal-error.js +14 -0
  536. package/.next/standalone/node_modules/next/dist/lib/file-exists.js +53 -0
  537. package/.next/standalone/node_modules/next/dist/lib/find-config.js +102 -0
  538. package/.next/standalone/node_modules/next/dist/lib/find-pages-dir.js +65 -0
  539. package/.next/standalone/node_modules/next/dist/lib/find-root.js +126 -0
  540. package/.next/standalone/node_modules/next/dist/lib/format-cli-help-output.js +84 -0
  541. package/.next/standalone/node_modules/next/dist/lib/format-dynamic-import-path.js +24 -0
  542. package/.next/standalone/node_modules/next/dist/lib/format-server-error.js +75 -0
  543. package/.next/standalone/node_modules/next/dist/lib/framework/boundary-components.js +62 -0
  544. package/.next/standalone/node_modules/next/dist/lib/framework/boundary-constants.js +36 -0
  545. package/.next/standalone/node_modules/next/dist/lib/fs/rename.js +87 -0
  546. package/.next/standalone/node_modules/next/dist/lib/fs/write-atomic.js +28 -0
  547. package/.next/standalone/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +52 -0
  548. package/.next/standalone/node_modules/next/dist/lib/get-files-in-dir.js +33 -0
  549. package/.next/standalone/node_modules/next/dist/lib/get-network-host.js +44 -0
  550. package/.next/standalone/node_modules/next/dist/lib/get-package-version.js +118 -0
  551. package/.next/standalone/node_modules/next/dist/lib/get-project-dir.js +51 -0
  552. package/.next/standalone/node_modules/next/dist/lib/has-necessary-dependencies.js +49 -0
  553. package/.next/standalone/node_modules/next/dist/lib/helpers/get-cache-directory.js +66 -0
  554. package/.next/standalone/node_modules/next/dist/lib/helpers/get-npx-command.js +29 -0
  555. package/.next/standalone/node_modules/next/dist/lib/helpers/get-online.js +50 -0
  556. package/.next/standalone/node_modules/next/dist/lib/helpers/get-pkg-manager.js +63 -0
  557. package/.next/standalone/node_modules/next/dist/lib/helpers/get-registry.js +45 -0
  558. package/.next/standalone/node_modules/next/dist/lib/helpers/get-reserved-port.js +116 -0
  559. package/.next/standalone/node_modules/next/dist/lib/helpers/install.js +83 -0
  560. package/.next/standalone/node_modules/next/dist/lib/import-next-warning.js +50 -0
  561. package/.next/standalone/node_modules/next/dist/lib/inline-static-env.js +112 -0
  562. package/.next/standalone/node_modules/next/dist/lib/install-dependencies.js +40 -0
  563. package/.next/standalone/node_modules/next/dist/lib/interop-default.js +16 -0
  564. package/.next/standalone/node_modules/next/dist/lib/is-api-route.js +15 -0
  565. package/.next/standalone/node_modules/next/dist/lib/is-app-page-route.js +15 -0
  566. package/.next/standalone/node_modules/next/dist/lib/is-app-route-route.js +15 -0
  567. package/.next/standalone/node_modules/next/dist/lib/is-edge-runtime.js +16 -0
  568. package/.next/standalone/node_modules/next/dist/lib/is-error.js +78 -0
  569. package/.next/standalone/node_modules/next/dist/lib/is-interception-route-rewrite.js +18 -0
  570. package/.next/standalone/node_modules/next/dist/lib/is-internal-component.js +36 -0
  571. package/.next/standalone/node_modules/next/dist/lib/is-serializable-props.js +106 -0
  572. package/.next/standalone/node_modules/next/dist/lib/known-edge-safe-packages.json +1 -0
  573. package/.next/standalone/node_modules/next/dist/lib/load-custom-routes.js +594 -0
  574. package/.next/standalone/node_modules/next/dist/lib/memory/gc-observer.js +53 -0
  575. package/.next/standalone/node_modules/next/dist/lib/memory/shutdown.js +29 -0
  576. package/.next/standalone/node_modules/next/dist/lib/memory/startup.js +47 -0
  577. package/.next/standalone/node_modules/next/dist/lib/memory/trace.js +109 -0
  578. package/.next/standalone/node_modules/next/dist/lib/metadata/constants.js +40 -0
  579. package/.next/standalone/node_modules/next/dist/lib/metadata/default-metadata.js +82 -0
  580. package/.next/standalone/node_modules/next/dist/lib/metadata/generate/icon-mark.js +22 -0
  581. package/.next/standalone/node_modules/next/dist/lib/metadata/generate/utils.js +52 -0
  582. package/.next/standalone/node_modules/next/dist/lib/metadata/get-metadata-route.js +123 -0
  583. package/.next/standalone/node_modules/next/dist/lib/metadata/is-metadata-route.js +221 -0
  584. package/.next/standalone/node_modules/next/dist/lib/metadata/metadata-context.js +18 -0
  585. package/.next/standalone/node_modules/next/dist/lib/metadata/metadata.js +1686 -0
  586. package/.next/standalone/node_modules/next/dist/lib/metadata/resolve-metadata.js +884 -0
  587. package/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-basics.js +232 -0
  588. package/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-icons.js +56 -0
  589. package/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-opengraph.js +199 -0
  590. package/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-title.js +40 -0
  591. package/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-url.js +135 -0
  592. package/.next/standalone/node_modules/next/dist/lib/metadata/types/alternative-urls-types.js +7 -0
  593. package/.next/standalone/node_modules/next/dist/lib/metadata/types/extra-types.js +9 -0
  594. package/.next/standalone/node_modules/next/dist/lib/metadata/types/icons.js +6 -0
  595. package/.next/standalone/node_modules/next/dist/lib/metadata/types/manifest-types.js +6 -0
  596. package/.next/standalone/node_modules/next/dist/lib/metadata/types/metadata-interface.js +18 -0
  597. package/.next/standalone/node_modules/next/dist/lib/metadata/types/metadata-types.js +10 -0
  598. package/.next/standalone/node_modules/next/dist/lib/metadata/types/opengraph-types.js +6 -0
  599. package/.next/standalone/node_modules/next/dist/lib/metadata/types/resolvers.js +6 -0
  600. package/.next/standalone/node_modules/next/dist/lib/metadata/types/twitter-types.js +7 -0
  601. package/.next/standalone/node_modules/next/dist/lib/mime-type.js +20 -0
  602. package/.next/standalone/node_modules/next/dist/lib/mkcert.js +204 -0
  603. package/.next/standalone/node_modules/next/dist/lib/multi-file-writer.js +75 -0
  604. package/.next/standalone/node_modules/next/dist/lib/needs-experimental-react.js +16 -0
  605. package/.next/standalone/node_modules/next/dist/lib/non-nullable.js +15 -0
  606. package/.next/standalone/node_modules/next/dist/lib/normalize-path.js +21 -0
  607. package/.next/standalone/node_modules/next/dist/lib/oxford-comma-list.js +15 -0
  608. package/.next/standalone/node_modules/next/dist/lib/page-types.js +18 -0
  609. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +185 -0
  610. package/.next/standalone/node_modules/next/dist/lib/pick.js +19 -0
  611. package/.next/standalone/node_modules/next/dist/lib/picocolors.js +177 -0
  612. package/.next/standalone/node_modules/next/dist/lib/pretty-bytes.js +74 -0
  613. package/.next/standalone/node_modules/next/dist/lib/realpath.js +20 -0
  614. package/.next/standalone/node_modules/next/dist/lib/recursive-copy.js +76 -0
  615. package/.next/standalone/node_modules/next/dist/lib/recursive-delete.js +137 -0
  616. package/.next/standalone/node_modules/next/dist/lib/recursive-readdir.js +124 -0
  617. package/.next/standalone/node_modules/next/dist/lib/redirect-status.js +46 -0
  618. package/.next/standalone/node_modules/next/dist/lib/require-instrumentation-client.js +26 -0
  619. package/.next/standalone/node_modules/next/dist/lib/resolve-build-paths.js +154 -0
  620. package/.next/standalone/node_modules/next/dist/lib/resolve-from.js +65 -0
  621. package/.next/standalone/node_modules/next/dist/lib/route-pattern-normalizer.js +107 -0
  622. package/.next/standalone/node_modules/next/dist/lib/scheduler.js +64 -0
  623. package/.next/standalone/node_modules/next/dist/lib/semver-noop.js +18 -0
  624. package/.next/standalone/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
  625. package/.next/standalone/node_modules/next/dist/lib/setup-exception-listeners.js +11 -0
  626. package/.next/standalone/node_modules/next/dist/lib/static-env.js +92 -0
  627. package/.next/standalone/node_modules/next/dist/lib/try-to-parse-path.js +67 -0
  628. package/.next/standalone/node_modules/next/dist/lib/turbopack-warning.js +185 -0
  629. package/.next/standalone/node_modules/next/dist/lib/typescript/diagnosticFormatter.js +243 -0
  630. package/.next/standalone/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +153 -0
  631. package/.next/standalone/node_modules/next/dist/lib/typescript/getTypeScriptIntent.js +52 -0
  632. package/.next/standalone/node_modules/next/dist/lib/typescript/missingDependencyError.js +27 -0
  633. package/.next/standalone/node_modules/next/dist/lib/typescript/runTypeCheck.js +149 -0
  634. package/.next/standalone/node_modules/next/dist/lib/typescript/type-paths.js +51 -0
  635. package/.next/standalone/node_modules/next/dist/lib/typescript/writeAppTypeDeclarations.js +75 -0
  636. package/.next/standalone/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +395 -0
  637. package/.next/standalone/node_modules/next/dist/lib/url.js +75 -0
  638. package/.next/standalone/node_modules/next/dist/lib/verify-partytown-setup.js +115 -0
  639. package/.next/standalone/node_modules/next/dist/lib/verify-root-layout.js +165 -0
  640. package/.next/standalone/node_modules/next/dist/lib/verify-typescript-setup.js +228 -0
  641. package/.next/standalone/node_modules/next/dist/lib/wait.js +19 -0
  642. package/.next/standalone/node_modules/next/dist/lib/with-promise-cache.js +24 -0
  643. package/.next/standalone/node_modules/next/dist/lib/worker.js +234 -0
  644. package/.next/standalone/node_modules/next/dist/server/ReactDOMServerPages.js +16 -0
  645. package/.next/standalone/node_modules/next/dist/server/accept-header.js +132 -0
  646. package/.next/standalone/node_modules/next/dist/server/after/after-context.js +140 -0
  647. package/.next/standalone/node_modules/next/dist/server/after/after.js +26 -0
  648. package/.next/standalone/node_modules/next/dist/server/after/awaiter.js +74 -0
  649. package/.next/standalone/node_modules/next/dist/server/after/builtin-request-context.js +38 -0
  650. package/.next/standalone/node_modules/next/dist/server/after/index.js +21 -0
  651. package/.next/standalone/node_modules/next/dist/server/after/run-with-after.js +35 -0
  652. package/.next/standalone/node_modules/next/dist/server/api-utils/get-cookie-parser.js +22 -0
  653. package/.next/standalone/node_modules/next/dist/server/api-utils/index.js +201 -0
  654. package/.next/standalone/node_modules/next/dist/server/api-utils/node/api-resolver.js +395 -0
  655. package/.next/standalone/node_modules/next/dist/server/api-utils/node/parse-body.js +79 -0
  656. package/.next/standalone/node_modules/next/dist/server/api-utils/node/try-get-preview-data.js +86 -0
  657. package/.next/standalone/node_modules/next/dist/server/api-utils/web.js +17 -0
  658. package/.next/standalone/node_modules/next/dist/server/app-render/action-async-storage-instance.js +14 -0
  659. package/.next/standalone/node_modules/next/dist/server/app-render/action-async-storage.external.js +13 -0
  660. package/.next/standalone/node_modules/next/dist/server/app-render/action-handler.js +1020 -0
  661. package/.next/standalone/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js +14 -0
  662. package/.next/standalone/node_modules/next/dist/server/app-render/after-task-async-storage.external.js +13 -0
  663. package/.next/standalone/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +167 -0
  664. package/.next/standalone/node_modules/next/dist/server/app-render/app-render-render-utils.js +76 -0
  665. package/.next/standalone/node_modules/next/dist/server/app-render/app-render-scheduling.js +188 -0
  666. package/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +4469 -0
  667. package/.next/standalone/node_modules/next/dist/server/app-render/async-local-storage.js +76 -0
  668. package/.next/standalone/node_modules/next/dist/server/app-render/cache-signal.js +181 -0
  669. package/.next/standalone/node_modules/next/dist/server/app-render/collect-segment-data.js +600 -0
  670. package/.next/standalone/node_modules/next/dist/server/app-render/console-async-storage-instance.js +14 -0
  671. package/.next/standalone/node_modules/next/dist/server/app-render/console-async-storage.external.js +13 -0
  672. package/.next/standalone/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +33 -0
  673. package/.next/standalone/node_modules/next/dist/server/app-render/create-component-tree.js +840 -0
  674. package/.next/standalone/node_modules/next/dist/server/app-render/create-error-handler.js +189 -0
  675. package/.next/standalone/node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js +102 -0
  676. package/.next/standalone/node_modules/next/dist/server/app-render/csrf-protection.js +86 -0
  677. package/.next/standalone/node_modules/next/dist/server/app-render/debug-channel-server.js +30 -0
  678. package/.next/standalone/node_modules/next/dist/server/app-render/debug-channel-server.web.js +71 -0
  679. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js +14 -0
  680. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js +13 -0
  681. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-rendering.js +1144 -0
  682. package/.next/standalone/node_modules/next/dist/server/app-render/encryption-utils-server.js +114 -0
  683. package/.next/standalone/node_modules/next/dist/server/app-render/encryption-utils.js +93 -0
  684. package/.next/standalone/node_modules/next/dist/server/app-render/encryption.js +259 -0
  685. package/.next/standalone/node_modules/next/dist/server/app-render/entry-base.js +256 -0
  686. package/.next/standalone/node_modules/next/dist/server/app-render/flight-render-result.js +28 -0
  687. package/.next/standalone/node_modules/next/dist/server/app-render/get-asset-query-string.js +29 -0
  688. package/.next/standalone/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +49 -0
  689. package/.next/standalone/node_modules/next/dist/server/app-render/get-layer-assets.js +65 -0
  690. package/.next/standalone/node_modules/next/dist/server/app-render/get-preloadable-fonts.js +39 -0
  691. package/.next/standalone/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +44 -0
  692. package/.next/standalone/node_modules/next/dist/server/app-render/get-short-dynamic-param-type.js +25 -0
  693. package/.next/standalone/node_modules/next/dist/server/app-render/has-loading-component-in-tree.js +19 -0
  694. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +13 -0
  695. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-impl.js +103 -0
  696. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +18 -0
  697. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-config.js +181 -0
  698. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-samples-client.js +128 -0
  699. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +432 -0
  700. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-validation-error.js +33 -0
  701. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-validation.js +713 -0
  702. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/stream-utils.js +96 -0
  703. package/.next/standalone/node_modules/next/dist/server/app-render/interop-default.js +17 -0
  704. package/.next/standalone/node_modules/next/dist/server/app-render/make-get-server-inserted-html.js +92 -0
  705. package/.next/standalone/node_modules/next/dist/server/app-render/manifests-singleton.js +264 -0
  706. package/.next/standalone/node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +28 -0
  707. package/.next/standalone/node_modules/next/dist/server/app-render/module-loading/track-dynamic-import.js +57 -0
  708. package/.next/standalone/node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js +32 -0
  709. package/.next/standalone/node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js +66 -0
  710. package/.next/standalone/node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js +49 -0
  711. package/.next/standalone/node_modules/next/dist/server/app-render/postponed-state.js +157 -0
  712. package/.next/standalone/node_modules/next/dist/server/app-render/prospective-render-utils.js +74 -0
  713. package/.next/standalone/node_modules/next/dist/server/app-render/react-large-shell-error.js +17 -0
  714. package/.next/standalone/node_modules/next/dist/server/app-render/react-server.node.js +39 -0
  715. package/.next/standalone/node_modules/next/dist/server/app-render/render-css-resource.js +52 -0
  716. package/.next/standalone/node_modules/next/dist/server/app-render/required-scripts.js +76 -0
  717. package/.next/standalone/node_modules/next/dist/server/app-render/rsc/postpone.js +18 -0
  718. package/.next/standalone/node_modules/next/dist/server/app-render/rsc/preloads.js +74 -0
  719. package/.next/standalone/node_modules/next/dist/server/app-render/rsc/taint.js +79 -0
  720. package/.next/standalone/node_modules/next/dist/server/app-render/segment-explorer-path.js +128 -0
  721. package/.next/standalone/node_modules/next/dist/server/app-render/server-inserted-html.js +77 -0
  722. package/.next/standalone/node_modules/next/dist/server/app-render/staged-rendering.js +343 -0
  723. package/.next/standalone/node_modules/next/dist/server/app-render/stale-time.js +111 -0
  724. package/.next/standalone/node_modules/next/dist/server/app-render/stream-ops.js +106 -0
  725. package/.next/standalone/node_modules/next/dist/server/app-render/stream-ops.web.js +163 -0
  726. package/.next/standalone/node_modules/next/dist/server/app-render/strip-flight-headers.js +18 -0
  727. package/.next/standalone/node_modules/next/dist/server/app-render/types.js +65 -0
  728. package/.next/standalone/node_modules/next/dist/server/app-render/use-flight-response.js +214 -0
  729. package/.next/standalone/node_modules/next/dist/server/app-render/vary-params.js +336 -0
  730. package/.next/standalone/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +232 -0
  731. package/.next/standalone/node_modules/next/dist/server/app-render/work-async-storage-instance.js +14 -0
  732. package/.next/standalone/node_modules/next/dist/server/app-render/work-async-storage.external.js +13 -0
  733. package/.next/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +14 -0
  734. package/.next/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +280 -0
  735. package/.next/standalone/node_modules/next/dist/server/async-storage/draft-mode-provider.js +62 -0
  736. package/.next/standalone/node_modules/next/dist/server/async-storage/request-store.js +144 -0
  737. package/.next/standalone/node_modules/next/dist/server/async-storage/with-store.js +6 -0
  738. package/.next/standalone/node_modules/next/dist/server/async-storage/work-store.js +91 -0
  739. package/.next/standalone/node_modules/next/dist/server/base-http/helpers.js +36 -0
  740. package/.next/standalone/node_modules/next/dist/server/base-http/index.js +54 -0
  741. package/.next/standalone/node_modules/next/dist/server/base-http/node.js +147 -0
  742. package/.next/standalone/node_modules/next/dist/server/base-http/web.js +124 -0
  743. package/.next/standalone/node_modules/next/dist/server/base-server.js +1874 -0
  744. package/.next/standalone/node_modules/next/dist/server/body-streams.js +114 -0
  745. package/.next/standalone/node_modules/next/dist/server/cache-dir.js +26 -0
  746. package/.next/standalone/node_modules/next/dist/server/capsize-font-metrics.json +181516 -0
  747. package/.next/standalone/node_modules/next/dist/server/ci-info.js +41 -0
  748. package/.next/standalone/node_modules/next/dist/server/client-component-renderer-logger.js +70 -0
  749. package/.next/standalone/node_modules/next/dist/server/config-schema.js +718 -0
  750. package/.next/standalone/node_modules/next/dist/server/config-shared.js +369 -0
  751. package/.next/standalone/node_modules/next/dist/server/config-utils.js +185 -0
  752. package/.next/standalone/node_modules/next/dist/server/config.js +1545 -0
  753. package/.next/standalone/node_modules/next/dist/server/create-deduped-by-callsite-server-error-logger.js +96 -0
  754. package/.next/standalone/node_modules/next/dist/server/crypto-utils.js +70 -0
  755. package/.next/standalone/node_modules/next/dist/server/dev/browser-logs/file-logger.js +186 -0
  756. package/.next/standalone/node_modules/next/dist/server/dev/browser-logs/receive-logs.js +558 -0
  757. package/.next/standalone/node_modules/next/dist/server/dev/browser-logs/source-map.js +222 -0
  758. package/.next/standalone/node_modules/next/dist/server/dev/debug-channel.js +87 -0
  759. package/.next/standalone/node_modules/next/dist/server/dev/dev-indicator-server-state.js +15 -0
  760. package/.next/standalone/node_modules/next/dist/server/dev/get-source-map-from-file.js +100 -0
  761. package/.next/standalone/node_modules/next/dist/server/dev/hot-middleware.js +274 -0
  762. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
  763. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-shared-utils.js +56 -0
  764. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1475 -0
  765. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-types.js +58 -0
  766. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1386 -0
  767. package/.next/standalone/node_modules/next/dist/server/dev/log-requests.js +149 -0
  768. package/.next/standalone/node_modules/next/dist/server/dev/messages.js +74 -0
  769. package/.next/standalone/node_modules/next/dist/server/dev/middleware-turbopack.js +403 -0
  770. package/.next/standalone/node_modules/next/dist/server/dev/middleware-webpack.js +483 -0
  771. package/.next/standalone/node_modules/next/dist/server/dev/node-stack-frames.js +72 -0
  772. package/.next/standalone/node_modules/next/dist/server/dev/on-demand-entry-handler.js +773 -0
  773. package/.next/standalone/node_modules/next/dist/server/dev/parse-version-info.js +108 -0
  774. package/.next/standalone/node_modules/next/dist/server/dev/require-cache.js +79 -0
  775. package/.next/standalone/node_modules/next/dist/server/dev/serialized-errors.js +67 -0
  776. package/.next/standalone/node_modules/next/dist/server/dev/server-action-logger.js +37 -0
  777. package/.next/standalone/node_modules/next/dist/server/dev/static-paths-worker.js +104 -0
  778. package/.next/standalone/node_modules/next/dist/server/dev/turbopack-utils.js +687 -0
  779. package/.next/standalone/node_modules/next/dist/server/dynamic-rendering-utils.js +108 -0
  780. package/.next/standalone/node_modules/next/dist/server/font-utils.js +43 -0
  781. package/.next/standalone/node_modules/next/dist/server/get-app-route-from-entrypoint.js +30 -0
  782. package/.next/standalone/node_modules/next/dist/server/get-page-files.js +23 -0
  783. package/.next/standalone/node_modules/next/dist/server/get-route-from-entrypoint.js +35 -0
  784. package/.next/standalone/node_modules/next/dist/server/htmlescape.js +37 -0
  785. package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +1220 -0
  786. package/.next/standalone/node_modules/next/dist/server/instrumentation/types.js +6 -0
  787. package/.next/standalone/node_modules/next/dist/server/instrumentation/utils.js +21 -0
  788. package/.next/standalone/node_modules/next/dist/server/internal-utils.js +39 -0
  789. package/.next/standalone/node_modules/next/dist/server/is-private-ip.js +36 -0
  790. package/.next/standalone/node_modules/next/dist/server/lib/app-dir-module.js +59 -0
  791. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +132 -0
  792. package/.next/standalone/node_modules/next/dist/server/lib/async-callback-set.js +29 -0
  793. package/.next/standalone/node_modules/next/dist/server/lib/cache-control.js +22 -0
  794. package/.next/standalone/node_modules/next/dist/server/lib/cache-handlers/default.external.js +18 -0
  795. package/.next/standalone/node_modules/next/dist/server/lib/cache-handlers/default.js +160 -0
  796. package/.next/standalone/node_modules/next/dist/server/lib/cache-handlers/types.js +8 -0
  797. package/.next/standalone/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +116 -0
  798. package/.next/standalone/node_modules/next/dist/server/lib/clone-response.js +77 -0
  799. package/.next/standalone/node_modules/next/dist/server/lib/cpu-profile.js +59 -0
  800. package/.next/standalone/node_modules/next/dist/server/lib/decode-query-path-parameter.js +26 -0
  801. package/.next/standalone/node_modules/next/dist/server/lib/dedupe-fetch.js +163 -0
  802. package/.next/standalone/node_modules/next/dist/server/lib/dev-bundler-service.js +95 -0
  803. package/.next/standalone/node_modules/next/dist/server/lib/disk-lru-cache.external.js +57 -0
  804. package/.next/standalone/node_modules/next/dist/server/lib/etag.js +56 -0
  805. package/.next/standalone/node_modules/next/dist/server/lib/experimental/create-env-definitions.js +48 -0
  806. package/.next/standalone/node_modules/next/dist/server/lib/experimental/ppr.js +47 -0
  807. package/.next/standalone/node_modules/next/dist/server/lib/find-page-file.js +147 -0
  808. package/.next/standalone/node_modules/next/dist/server/lib/fix-mojibake.js +25 -0
  809. package/.next/standalone/node_modules/next/dist/server/lib/format-hostname.js +16 -0
  810. package/.next/standalone/node_modules/next/dist/server/lib/i18n-provider.js +129 -0
  811. package/.next/standalone/node_modules/next/dist/server/lib/implicit-tags.js +77 -0
  812. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +335 -0
  813. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/index.js +501 -0
  814. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +57 -0
  815. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +73 -0
  816. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js +55 -0
  817. package/.next/standalone/node_modules/next/dist/server/lib/install-code-frame.js +22 -0
  818. package/.next/standalone/node_modules/next/dist/server/lib/is-ipv6.js +41 -0
  819. package/.next/standalone/node_modules/next/dist/server/lib/lazy-result.js +46 -0
  820. package/.next/standalone/node_modules/next/dist/server/lib/lru-cache.js +191 -0
  821. package/.next/standalone/node_modules/next/dist/server/lib/match-next-data-pathname.js +18 -0
  822. package/.next/standalone/node_modules/next/dist/server/lib/mock-request.js +416 -0
  823. package/.next/standalone/node_modules/next/dist/server/lib/module-loader/module-loader.js +8 -0
  824. package/.next/standalone/node_modules/next/dist/server/lib/module-loader/node-module-loader.js +25 -0
  825. package/.next/standalone/node_modules/next/dist/server/lib/module-loader/route-module-loader.js +26 -0
  826. package/.next/standalone/node_modules/next/dist/server/lib/node-fs-methods.js +28 -0
  827. package/.next/standalone/node_modules/next/dist/server/lib/parse-stack.js +46 -0
  828. package/.next/standalone/node_modules/next/dist/server/lib/patch-fetch.js +978 -0
  829. package/.next/standalone/node_modules/next/dist/server/lib/patch-set-header.js +38 -0
  830. package/.next/standalone/node_modules/next/dist/server/lib/postponed-request-body.js +64 -0
  831. package/.next/standalone/node_modules/next/dist/server/lib/render-server.js +155 -0
  832. package/.next/standalone/node_modules/next/dist/server/lib/router-server.js +696 -0
  833. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +110 -0
  834. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/build-data-route.js +48 -0
  835. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +50 -0
  836. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/cache-life-type-utils.js +211 -0
  837. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/decode-path-params.js +42 -0
  838. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/filesystem.js +591 -0
  839. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +89 -0
  840. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js +96 -0
  841. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/is-postpone.js +16 -0
  842. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/proxy-request.js +118 -0
  843. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +629 -0
  844. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/route-types-utils.js +286 -0
  845. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/router-server-context.js +26 -0
  846. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/typegen.js +858 -0
  847. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/types.js +6 -0
  848. package/.next/standalone/node_modules/next/dist/server/lib/server-action-request-meta.js +53 -0
  849. package/.next/standalone/node_modules/next/dist/server/lib/server-ipc/utils.js +81 -0
  850. package/.next/standalone/node_modules/next/dist/server/lib/source-maps.js +196 -0
  851. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +494 -0
  852. package/.next/standalone/node_modules/next/dist/server/lib/streaming-metadata.js +38 -0
  853. package/.next/standalone/node_modules/next/dist/server/lib/to-route.js +37 -0
  854. package/.next/standalone/node_modules/next/dist/server/lib/trace/constants.js +203 -0
  855. package/.next/standalone/node_modules/next/dist/server/lib/trace/tracer.js +280 -0
  856. package/.next/standalone/node_modules/next/dist/server/lib/trace/utils.js +16 -0
  857. package/.next/standalone/node_modules/next/dist/server/lib/types.js +6 -0
  858. package/.next/standalone/node_modules/next/dist/server/lib/utils.js +278 -0
  859. package/.next/standalone/node_modules/next/dist/server/lib/worker-utils.js +36 -0
  860. package/.next/standalone/node_modules/next/dist/server/load-components.js +179 -0
  861. package/.next/standalone/node_modules/next/dist/server/load-default-error-components.js +41 -0
  862. package/.next/standalone/node_modules/next/dist/server/load-manifest.external.js +117 -0
  863. package/.next/standalone/node_modules/next/dist/server/match-bundle.js +25 -0
  864. package/.next/standalone/node_modules/next/dist/server/mcp/get-mcp-middleware.js +49 -0
  865. package/.next/standalone/node_modules/next/dist/server/mcp/get-or-create-mcp-server.js +41 -0
  866. package/.next/standalone/node_modules/next/dist/server/mcp/mcp-telemetry-tracker.js +82 -0
  867. package/.next/standalone/node_modules/next/dist/server/mcp/tools/get-errors.js +114 -0
  868. package/.next/standalone/node_modules/next/dist/server/mcp/tools/get-logs.js +67 -0
  869. package/.next/standalone/node_modules/next/dist/server/mcp/tools/get-page-metadata.js +188 -0
  870. package/.next/standalone/node_modules/next/dist/server/mcp/tools/get-project-metadata.js +59 -0
  871. package/.next/standalone/node_modules/next/dist/server/mcp/tools/get-routes.js +136 -0
  872. package/.next/standalone/node_modules/next/dist/server/mcp/tools/get-server-action-by-id.js +121 -0
  873. package/.next/standalone/node_modules/next/dist/server/mcp/tools/next-instance-error-state.js +31 -0
  874. package/.next/standalone/node_modules/next/dist/server/mcp/tools/utils/browser-communication.js +90 -0
  875. package/.next/standalone/node_modules/next/dist/server/mcp/tools/utils/format-errors.js +137 -0
  876. package/.next/standalone/node_modules/next/dist/server/next-server.js +1429 -0
  877. package/.next/standalone/node_modules/next/dist/server/next-typescript.js +13 -0
  878. package/.next/standalone/node_modules/next/dist/server/next.js +455 -0
  879. package/.next/standalone/node_modules/next/dist/server/node-environment-baseline.js +25 -0
  880. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/console-dim.external.js +301 -0
  881. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/console-exit.js +49 -0
  882. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/console-file.js +56 -0
  883. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/date.js +52 -0
  884. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/error-inspect.js +8 -0
  885. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +577 -0
  886. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/global-behaviors.js +33 -0
  887. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/io-utils.js +195 -0
  888. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/node-crypto.js +103 -0
  889. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/process-error-handlers.js +91 -0
  890. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/random.js +28 -0
  891. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js +508 -0
  892. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/web-crypto.js +45 -0
  893. package/.next/standalone/node_modules/next/dist/server/node-environment.js +19 -0
  894. package/.next/standalone/node_modules/next/dist/server/node-polyfill-crypto.js +21 -0
  895. package/.next/standalone/node_modules/next/dist/server/normalizers/absolute-filename-normalizer.js +33 -0
  896. package/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js +54 -0
  897. package/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-filename-normalizer.js +22 -0
  898. package/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js +40 -0
  899. package/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js +55 -0
  900. package/.next/standalone/node_modules/next/dist/server/normalizers/built/app/index.js +42 -0
  901. package/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/index.js +44 -0
  902. package/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js +55 -0
  903. package/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js +22 -0
  904. package/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-page-normalizer.js +19 -0
  905. package/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js +19 -0
  906. package/.next/standalone/node_modules/next/dist/server/normalizers/locale-route-normalizer.js +26 -0
  907. package/.next/standalone/node_modules/next/dist/server/normalizers/normalizer.js +6 -0
  908. package/.next/standalone/node_modules/next/dist/server/normalizers/normalizers.js +23 -0
  909. package/.next/standalone/node_modules/next/dist/server/normalizers/prefixing-normalizer.js +26 -0
  910. package/.next/standalone/node_modules/next/dist/server/normalizers/request/base-path.js +25 -0
  911. package/.next/standalone/node_modules/next/dist/server/normalizers/request/next-data.js +38 -0
  912. package/.next/standalone/node_modules/next/dist/server/normalizers/request/pathname-normalizer.js +6 -0
  913. package/.next/standalone/node_modules/next/dist/server/normalizers/request/prefix.js +39 -0
  914. package/.next/standalone/node_modules/next/dist/server/normalizers/request/rsc.js +19 -0
  915. package/.next/standalone/node_modules/next/dist/server/normalizers/request/segment-prefix-rsc.js +33 -0
  916. package/.next/standalone/node_modules/next/dist/server/normalizers/request/suffix.js +27 -0
  917. package/.next/standalone/node_modules/next/dist/server/normalizers/underscore-normalizer.js +17 -0
  918. package/.next/standalone/node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js +17 -0
  919. package/.next/standalone/node_modules/next/dist/server/og/image-response.js +53 -0
  920. package/.next/standalone/node_modules/next/dist/server/patch-error-inspect.js +453 -0
  921. package/.next/standalone/node_modules/next/dist/server/pipe-readable.js +140 -0
  922. package/.next/standalone/node_modules/next/dist/server/post-process.js +39 -0
  923. package/.next/standalone/node_modules/next/dist/server/render-result.js +204 -0
  924. package/.next/standalone/node_modules/next/dist/server/render.js +1140 -0
  925. package/.next/standalone/node_modules/next/dist/server/request/connection.js +133 -0
  926. package/.next/standalone/node_modules/next/dist/server/request/cookies.js +235 -0
  927. package/.next/standalone/node_modules/next/dist/server/request/draft-mode.js +230 -0
  928. package/.next/standalone/node_modules/next/dist/server/request/fallback-params.js +69 -0
  929. package/.next/standalone/node_modules/next/dist/server/request/headers.js +229 -0
  930. package/.next/standalone/node_modules/next/dist/server/request/params.js +527 -0
  931. package/.next/standalone/node_modules/next/dist/server/request/pathname.js +119 -0
  932. package/.next/standalone/node_modules/next/dist/server/request/root-params.js +194 -0
  933. package/.next/standalone/node_modules/next/dist/server/request/search-params.js +526 -0
  934. package/.next/standalone/node_modules/next/dist/server/request/utils.js +51 -0
  935. package/.next/standalone/node_modules/next/dist/server/request-meta.js +55 -0
  936. package/.next/standalone/node_modules/next/dist/server/require-hook.js +82 -0
  937. package/.next/standalone/node_modules/next/dist/server/require.js +109 -0
  938. package/.next/standalone/node_modules/next/dist/server/response-cache/index.js +311 -0
  939. package/.next/standalone/node_modules/next/dist/server/response-cache/types.js +41 -0
  940. package/.next/standalone/node_modules/next/dist/server/response-cache/utils.js +104 -0
  941. package/.next/standalone/node_modules/next/dist/server/response-cache/web.js +101 -0
  942. package/.next/standalone/node_modules/next/dist/server/resume-data-cache/cache-store.js +96 -0
  943. package/.next/standalone/node_modules/next/dist/server/resume-data-cache/resume-data-cache.js +124 -0
  944. package/.next/standalone/node_modules/next/dist/server/revalidation-utils.js +157 -0
  945. package/.next/standalone/node_modules/next/dist/server/route-definitions/app-page-route-definition.js +16 -0
  946. package/.next/standalone/node_modules/next/dist/server/route-definitions/app-route-route-definition.js +6 -0
  947. package/.next/standalone/node_modules/next/dist/server/route-definitions/locale-route-definition.js +6 -0
  948. package/.next/standalone/node_modules/next/dist/server/route-definitions/pages-api-route-definition.js +6 -0
  949. package/.next/standalone/node_modules/next/dist/server/route-definitions/pages-route-definition.js +6 -0
  950. package/.next/standalone/node_modules/next/dist/server/route-definitions/route-definition.js +6 -0
  951. package/.next/standalone/node_modules/next/dist/server/route-kind.js +32 -0
  952. package/.next/standalone/node_modules/next/dist/server/route-matcher-managers/default-route-matcher-manager.js +239 -0
  953. package/.next/standalone/node_modules/next/dist/server/route-matcher-managers/dev-route-matcher-manager.js +120 -0
  954. package/.next/standalone/node_modules/next/dist/server/route-matcher-managers/route-matcher-manager.js +6 -0
  955. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +55 -0
  956. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js +43 -0
  957. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-page-route-matcher-provider.js +91 -0
  958. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-route-route-matcher-provider.js +112 -0
  959. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-api-route-matcher-provider.js +77 -0
  960. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-route-matcher-provider.js +77 -0
  961. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/file-cache-route-matcher-provider.js +28 -0
  962. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/batched-file-reader.js +106 -0
  963. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/default-file-reader.js +42 -0
  964. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/file-reader.js +6 -0
  965. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js +30 -0
  966. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/manifest-loader.js +6 -0
  967. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/node-manifest-loader.js +34 -0
  968. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js +20 -0
  969. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js +21 -0
  970. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js +55 -0
  971. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js +64 -0
  972. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/route-matcher-provider.js +6 -0
  973. package/.next/standalone/node_modules/next/dist/server/route-matchers/app-page-route-matcher.js +18 -0
  974. package/.next/standalone/node_modules/next/dist/server/route-matchers/app-route-route-matcher.js +15 -0
  975. package/.next/standalone/node_modules/next/dist/server/route-matchers/locale-route-matcher.js +68 -0
  976. package/.next/standalone/node_modules/next/dist/server/route-matchers/pages-api-route-matcher.js +30 -0
  977. package/.next/standalone/node_modules/next/dist/server/route-matchers/pages-route-matcher.js +30 -0
  978. package/.next/standalone/node_modules/next/dist/server/route-matchers/route-matcher.js +54 -0
  979. package/.next/standalone/node_modules/next/dist/server/route-matches/app-page-route-match.js +6 -0
  980. package/.next/standalone/node_modules/next/dist/server/route-matches/app-route-route-match.js +6 -0
  981. package/.next/standalone/node_modules/next/dist/server/route-matches/locale-route-match.js +6 -0
  982. package/.next/standalone/node_modules/next/dist/server/route-matches/pages-api-route-match.js +16 -0
  983. package/.next/standalone/node_modules/next/dist/server/route-matches/pages-route-match.js +6 -0
  984. package/.next/standalone/node_modules/next/dist/server/route-matches/route-match.js +6 -0
  985. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +51 -0
  986. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/module.compiled.js +36 -0
  987. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/module.js +162 -0
  988. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/module.render.js +24 -0
  989. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/normalize-request-url.js +25 -0
  990. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js +4 -0
  991. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js +87 -0
  992. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js +4 -0
  993. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js +4 -0
  994. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js +4 -0
  995. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js +4 -0
  996. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js +4 -0
  997. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js +140 -0
  998. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtime.js +4 -0
  999. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-dom.js +4 -0
  1000. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js +4 -0
  1001. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js +4 -0
  1002. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js +4 -0
  1003. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.js +4 -0
  1004. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js +4 -0
  1005. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static.js +4 -0
  1006. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react.js +4 -0
  1007. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js +125 -0
  1008. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime.js +4 -0
  1009. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom-server.js +4 -0
  1010. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js +4 -0
  1011. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js +4 -0
  1012. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js +4 -0
  1013. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js +4 -0
  1014. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client.js +4 -0
  1015. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js +4 -0
  1016. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/auto-implement-methods.js +85 -0
  1017. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/clean-url.js +24 -0
  1018. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/get-pathname-from-absolute-path.js +29 -0
  1019. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/is-static-gen-enabled.js +15 -0
  1020. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/parsed-url-query-to-params.js +20 -0
  1021. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/module.compiled.js +36 -0
  1022. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/module.js +914 -0
  1023. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/shared-modules.js +56 -0
  1024. package/.next/standalone/node_modules/next/dist/server/route-modules/checks.js +45 -0
  1025. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/builtin/_error.js +100 -0
  1026. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/module.compiled.js +20 -0
  1027. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/module.js +92 -0
  1028. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/module.render.js +24 -0
  1029. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +545 -0
  1030. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js +4 -0
  1031. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js +102 -0
  1032. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js +4 -0
  1033. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js +4 -0
  1034. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js +4 -0
  1035. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js +4 -0
  1036. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js +4 -0
  1037. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js +4 -0
  1038. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js +4 -0
  1039. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js +4 -0
  1040. package/.next/standalone/node_modules/next/dist/server/route-modules/pages-api/module.compiled.js +20 -0
  1041. package/.next/standalone/node_modules/next/dist/server/route-modules/pages-api/module.js +58 -0
  1042. package/.next/standalone/node_modules/next/dist/server/route-modules/route-module.js +650 -0
  1043. package/.next/standalone/node_modules/next/dist/server/runtime-reacts.external.js +46 -0
  1044. package/.next/standalone/node_modules/next/dist/server/send-payload.js +88 -0
  1045. package/.next/standalone/node_modules/next/dist/server/send-response.js +70 -0
  1046. package/.next/standalone/node_modules/next/dist/server/serve-static.js +66 -0
  1047. package/.next/standalone/node_modules/next/dist/server/server-route-utils.js +30 -0
  1048. package/.next/standalone/node_modules/next/dist/server/server-utils.js +323 -0
  1049. package/.next/standalone/node_modules/next/dist/server/setup-http-agent-env.js +31 -0
  1050. package/.next/standalone/node_modules/next/dist/server/stream-utils/encoded-tags.js +122 -0
  1051. package/.next/standalone/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +918 -0
  1052. package/.next/standalone/node_modules/next/dist/server/stream-utils/uint8array-helpers.js +74 -0
  1053. package/.next/standalone/node_modules/next/dist/server/typescript/constant.js +98 -0
  1054. package/.next/standalone/node_modules/next/dist/server/typescript/index.js +199 -0
  1055. package/.next/standalone/node_modules/next/dist/server/typescript/rules/client-boundary.js +97 -0
  1056. package/.next/standalone/node_modules/next/dist/server/typescript/rules/config.js +512 -0
  1057. package/.next/standalone/node_modules/next/dist/server/typescript/rules/entry.js +149 -0
  1058. package/.next/standalone/node_modules/next/dist/server/typescript/rules/error.js +38 -0
  1059. package/.next/standalone/node_modules/next/dist/server/typescript/rules/metadata.js +234 -0
  1060. package/.next/standalone/node_modules/next/dist/server/typescript/rules/server-boundary.js +115 -0
  1061. package/.next/standalone/node_modules/next/dist/server/typescript/rules/server.js +79 -0
  1062. package/.next/standalone/node_modules/next/dist/server/typescript/utils.js +212 -0
  1063. package/.next/standalone/node_modules/next/dist/server/use-cache/cache-life.js +163 -0
  1064. package/.next/standalone/node_modules/next/dist/server/use-cache/cache-tag.js +52 -0
  1065. package/.next/standalone/node_modules/next/dist/server/use-cache/constants.js +28 -0
  1066. package/.next/standalone/node_modules/next/dist/server/use-cache/handlers.js +121 -0
  1067. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-errors.js +36 -0
  1068. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +1588 -0
  1069. package/.next/standalone/node_modules/next/dist/server/utils.js +73 -0
  1070. package/.next/standalone/node_modules/next/dist/server/web/adapter.js +392 -0
  1071. package/.next/standalone/node_modules/next/dist/server/web/edge-route-module-wrapper.js +123 -0
  1072. package/.next/standalone/node_modules/next/dist/server/web/error.js +54 -0
  1073. package/.next/standalone/node_modules/next/dist/server/web/exports/index.js +56 -0
  1074. package/.next/standalone/node_modules/next/dist/server/web/get-edge-preview-props.js +23 -0
  1075. package/.next/standalone/node_modules/next/dist/server/web/globals.js +128 -0
  1076. package/.next/standalone/node_modules/next/dist/server/web/http.js +39 -0
  1077. package/.next/standalone/node_modules/next/dist/server/web/internal-edge-wait-until.js +64 -0
  1078. package/.next/standalone/node_modules/next/dist/server/web/next-url.js +199 -0
  1079. package/.next/standalone/node_modules/next/dist/server/web/sandbox/context.js +462 -0
  1080. package/.next/standalone/node_modules/next/dist/server/web/sandbox/fetch-inline-assets.js +35 -0
  1081. package/.next/standalone/node_modules/next/dist/server/web/sandbox/index.js +28 -0
  1082. package/.next/standalone/node_modules/next/dist/server/web/sandbox/resource-managers.js +88 -0
  1083. package/.next/standalone/node_modules/next/dist/server/web/sandbox/sandbox.js +137 -0
  1084. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +192 -0
  1085. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +142 -0
  1086. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js +30 -0
  1087. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +211 -0
  1088. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/cookies.js +29 -0
  1089. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/fetch-event.js +98 -0
  1090. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/image-response.js +22 -0
  1091. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/request.js +99 -0
  1092. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/response.js +136 -0
  1093. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/revalidate.js +214 -0
  1094. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +289 -0
  1095. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js +51 -0
  1096. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/url-pattern.js +14 -0
  1097. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/user-agent.js +46 -0
  1098. package/.next/standalone/node_modules/next/dist/server/web/types.js +6 -0
  1099. package/.next/standalone/node_modules/next/dist/server/web/utils.js +151 -0
  1100. package/.next/standalone/node_modules/next/dist/server/web/web-on-close.js +87 -0
  1101. package/.next/standalone/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
  1102. package/.next/standalone/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +50 -0
  1103. package/.next/standalone/node_modules/next/dist/shared/lib/app-router-types.js +46 -0
  1104. package/.next/standalone/node_modules/next/dist/shared/lib/constants.js +448 -0
  1105. package/.next/standalone/node_modules/next/dist/shared/lib/deep-freeze.js +30 -0
  1106. package/.next/standalone/node_modules/next/dist/shared/lib/deployment-id.js +63 -0
  1107. package/.next/standalone/node_modules/next/dist/shared/lib/dset.js +34 -0
  1108. package/.next/standalone/node_modules/next/dist/shared/lib/encode-uri-path.js +15 -0
  1109. package/.next/standalone/node_modules/next/dist/shared/lib/entry-constants.js +36 -0
  1110. package/.next/standalone/node_modules/next/dist/shared/lib/error-source.js +36 -0
  1111. package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +39 -0
  1112. package/.next/standalone/node_modules/next/dist/shared/lib/errors/code-frame.js +20 -0
  1113. package/.next/standalone/node_modules/next/dist/shared/lib/errors/constants.js +19 -0
  1114. package/.next/standalone/node_modules/next/dist/shared/lib/errors/empty-generate-static-params-error.js +24 -0
  1115. package/.next/standalone/node_modules/next/dist/shared/lib/errors/hard-deprecated-config-error.js +20 -0
  1116. package/.next/standalone/node_modules/next/dist/shared/lib/escape-regexp.js +22 -0
  1117. package/.next/standalone/node_modules/next/dist/shared/lib/get-hostname.js +23 -0
  1118. package/.next/standalone/node_modules/next/dist/shared/lib/hash.js +42 -0
  1119. package/.next/standalone/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +18 -0
  1120. package/.next/standalone/node_modules/next/dist/shared/lib/head.js +163 -0
  1121. package/.next/standalone/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +60 -0
  1122. package/.next/standalone/node_modules/next/dist/shared/lib/html-context.shared-runtime.js +40 -0
  1123. package/.next/standalone/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +25 -0
  1124. package/.next/standalone/node_modules/next/dist/shared/lib/i18n/get-locale-redirect.js +59 -0
  1125. package/.next/standalone/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +54 -0
  1126. package/.next/standalone/node_modules/next/dist/shared/lib/image-blur-svg.js +22 -0
  1127. package/.next/standalone/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +19 -0
  1128. package/.next/standalone/node_modules/next/dist/shared/lib/image-config.js +77 -0
  1129. package/.next/standalone/node_modules/next/dist/shared/lib/invariant-error.js +18 -0
  1130. package/.next/standalone/node_modules/next/dist/shared/lib/is-plain-object.js +42 -0
  1131. package/.next/standalone/node_modules/next/dist/shared/lib/is-thenable.js +20 -0
  1132. package/.next/standalone/node_modules/next/dist/shared/lib/isomorphic/path.js +14 -0
  1133. package/.next/standalone/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +37 -0
  1134. package/.next/standalone/node_modules/next/dist/shared/lib/loadable-context.shared-runtime.js +19 -0
  1135. package/.next/standalone/node_modules/next/dist/shared/lib/loadable.shared-runtime.js +246 -0
  1136. package/.next/standalone/node_modules/next/dist/shared/lib/match-local-pattern.js +46 -0
  1137. package/.next/standalone/node_modules/next/dist/shared/lib/match-remote-pattern.js +63 -0
  1138. package/.next/standalone/node_modules/next/dist/shared/lib/modern-browserslist-target.js +15 -0
  1139. package/.next/standalone/node_modules/next/dist/shared/lib/no-fallback-error.external.js +18 -0
  1140. package/.next/standalone/node_modules/next/dist/shared/lib/normalized-asset-prefix.js +28 -0
  1141. package/.next/standalone/node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js +26 -0
  1142. package/.next/standalone/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +18 -0
  1143. package/.next/standalone/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +18 -0
  1144. package/.next/standalone/node_modules/next/dist/shared/lib/page-path/get-page-paths.js +40 -0
  1145. package/.next/standalone/node_modules/next/dist/shared/lib/page-path/normalize-data-path.js +23 -0
  1146. package/.next/standalone/node_modules/next/dist/shared/lib/page-path/normalize-page-path.js +26 -0
  1147. package/.next/standalone/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +19 -0
  1148. package/.next/standalone/node_modules/next/dist/shared/lib/page-path/remove-page-path-tail.js +20 -0
  1149. package/.next/standalone/node_modules/next/dist/shared/lib/promise-with-resolvers.js +26 -0
  1150. package/.next/standalone/node_modules/next/dist/shared/lib/router/adapters.js +136 -0
  1151. package/.next/standalone/node_modules/next/dist/shared/lib/router/routes/app.js +122 -0
  1152. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/add-locale.js +28 -0
  1153. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +20 -0
  1154. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +20 -0
  1155. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/app-paths.js +62 -0
  1156. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/as-path-to-search-params.js +17 -0
  1157. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +24 -0
  1158. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +16 -0
  1159. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +27 -0
  1160. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/format-url.js +111 -0
  1161. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +174 -0
  1162. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +52 -0
  1163. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js +25 -0
  1164. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +90 -0
  1165. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/html-bots.js +17 -0
  1166. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/index.js +30 -0
  1167. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
  1168. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +108 -0
  1169. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/is-bot.js +57 -0
  1170. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
  1171. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js +31 -0
  1172. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +30 -0
  1173. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-path.js +33 -0
  1174. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +43 -0
  1175. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-url.js +38 -0
  1176. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +20 -0
  1177. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/path-match.js +49 -0
  1178. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +292 -0
  1179. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/querystring.js +79 -0
  1180. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/relativize-url.js +40 -0
  1181. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +39 -0
  1182. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +21 -0
  1183. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +116 -0
  1184. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +113 -0
  1185. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +45 -0
  1186. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/route-regex.js +256 -0
  1187. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +244 -0
  1188. package/.next/standalone/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +18 -0
  1189. package/.next/standalone/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js +99 -0
  1190. package/.next/standalone/node_modules/next/dist/shared/lib/segment-cache/vary-params-decoding.js +32 -0
  1191. package/.next/standalone/node_modules/next/dist/shared/lib/segment.js +102 -0
  1192. package/.next/standalone/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +35 -0
  1193. package/.next/standalone/node_modules/next/dist/shared/lib/server-reference-info.js +56 -0
  1194. package/.next/standalone/node_modules/next/dist/shared/lib/side-effect.js +63 -0
  1195. package/.next/standalone/node_modules/next/dist/shared/lib/size-limit.js +40 -0
  1196. package/.next/standalone/node_modules/next/dist/shared/lib/turbopack/internal-error.js +53 -0
  1197. package/.next/standalone/node_modules/next/dist/shared/lib/utils/reflect-utils.js +69 -0
  1198. package/.next/standalone/node_modules/next/dist/shared/lib/utils/warn-once.js +22 -0
  1199. package/.next/standalone/node_modules/next/dist/shared/lib/utils.js +207 -0
  1200. package/.next/standalone/node_modules/next/dist/shared/lib/zod.js +101 -0
  1201. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +89 -0
  1202. package/.next/standalone/node_modules/next/dist/telemetry/detached-flush.js +56 -0
  1203. package/.next/standalone/node_modules/next/dist/telemetry/events/build.js +174 -0
  1204. package/.next/standalone/node_modules/next/dist/telemetry/events/index.js +41 -0
  1205. package/.next/standalone/node_modules/next/dist/telemetry/events/plugins.js +51 -0
  1206. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +55 -0
  1207. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +66 -0
  1208. package/.next/standalone/node_modules/next/dist/telemetry/flush-telemetry.js +19 -0
  1209. package/.next/standalone/node_modules/next/dist/telemetry/post-telemetry-payload.js +48 -0
  1210. package/.next/standalone/node_modules/next/dist/telemetry/project-id.js +48 -0
  1211. package/.next/standalone/node_modules/next/dist/telemetry/storage.js +301 -0
  1212. package/.next/standalone/node_modules/next/dist/trace/index.js +58 -0
  1213. package/.next/standalone/node_modules/next/dist/trace/report/index.js +37 -0
  1214. package/.next/standalone/node_modules/next/dist/trace/report/to-json-build.js +40 -0
  1215. package/.next/standalone/node_modules/next/dist/trace/report/to-json.js +165 -0
  1216. package/.next/standalone/node_modules/next/dist/trace/report/to-telemetry.js +36 -0
  1217. package/.next/standalone/node_modules/next/dist/trace/shared.js +39 -0
  1218. package/.next/standalone/node_modules/next/dist/trace/trace.js +211 -0
  1219. package/.next/standalone/node_modules/next/package.json +378 -0
  1220. package/.next/standalone/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
  1221. package/.next/standalone/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
  1222. package/.next/standalone/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
  1223. package/.next/standalone/node_modules/react/cjs/react.development.js +1284 -0
  1224. package/.next/standalone/node_modules/react/cjs/react.production.js +542 -0
  1225. package/.next/standalone/node_modules/react/compiler-runtime.js +14 -0
  1226. package/.next/standalone/node_modules/react/index.js +7 -0
  1227. package/.next/standalone/node_modules/react/jsx-dev-runtime.js +7 -0
  1228. package/.next/standalone/node_modules/react/jsx-runtime.js +7 -0
  1229. package/.next/standalone/node_modules/react/package.json +51 -0
  1230. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +6603 -0
  1231. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +6692 -0
  1232. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +7410 -0
  1233. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +7512 -0
  1234. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +7707 -0
  1235. package/.next/standalone/node_modules/react-dom/cjs/react-dom.production.js +210 -0
  1236. package/.next/standalone/node_modules/react-dom/index.js +38 -0
  1237. package/.next/standalone/node_modules/react-dom/package.json +117 -0
  1238. package/.next/standalone/node_modules/react-dom/server.browser.js +16 -0
  1239. package/.next/standalone/node_modules/react-dom/server.edge.js +17 -0
  1240. package/.next/standalone/node_modules/react-dom/server.node.js +18 -0
  1241. package/.next/standalone/node_modules/react-dom/static.node.js +14 -0
  1242. package/.next/standalone/node_modules/sharp/lib/channel.js +177 -0
  1243. package/.next/standalone/node_modules/sharp/lib/colour.js +195 -0
  1244. package/.next/standalone/node_modules/sharp/lib/composite.js +212 -0
  1245. package/.next/standalone/node_modules/sharp/lib/constructor.js +499 -0
  1246. package/.next/standalone/node_modules/sharp/lib/index.js +16 -0
  1247. package/.next/standalone/node_modules/sharp/lib/input.js +809 -0
  1248. package/.next/standalone/node_modules/sharp/lib/is.js +143 -0
  1249. package/.next/standalone/node_modules/sharp/lib/libvips.js +207 -0
  1250. package/.next/standalone/node_modules/sharp/lib/operation.js +1016 -0
  1251. package/.next/standalone/node_modules/sharp/lib/output.js +1666 -0
  1252. package/.next/standalone/node_modules/sharp/lib/resize.js +595 -0
  1253. package/.next/standalone/node_modules/sharp/lib/sharp.js +121 -0
  1254. package/.next/standalone/node_modules/sharp/lib/utility.js +291 -0
  1255. package/.next/standalone/node_modules/sharp/node_modules/semver/classes/comparator.js +143 -0
  1256. package/.next/standalone/node_modules/sharp/node_modules/semver/classes/range.js +557 -0
  1257. package/.next/standalone/node_modules/sharp/node_modules/semver/classes/semver.js +333 -0
  1258. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/cmp.js +54 -0
  1259. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/coerce.js +62 -0
  1260. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/compare.js +7 -0
  1261. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/eq.js +5 -0
  1262. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/gt.js +5 -0
  1263. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/gte.js +5 -0
  1264. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/lt.js +5 -0
  1265. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/lte.js +5 -0
  1266. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/neq.js +5 -0
  1267. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/parse.js +18 -0
  1268. package/.next/standalone/node_modules/sharp/node_modules/semver/functions/satisfies.js +12 -0
  1269. package/.next/standalone/node_modules/sharp/node_modules/semver/internal/constants.js +37 -0
  1270. package/.next/standalone/node_modules/sharp/node_modules/semver/internal/debug.js +11 -0
  1271. package/.next/standalone/node_modules/sharp/node_modules/semver/internal/identifiers.js +29 -0
  1272. package/.next/standalone/node_modules/sharp/node_modules/semver/internal/lrucache.js +42 -0
  1273. package/.next/standalone/node_modules/sharp/node_modules/semver/internal/parse-options.js +17 -0
  1274. package/.next/standalone/node_modules/sharp/node_modules/semver/internal/re.js +223 -0
  1275. package/.next/standalone/node_modules/sharp/node_modules/semver/package.json +78 -0
  1276. package/.next/standalone/node_modules/sharp/package.json +202 -0
  1277. package/.next/standalone/node_modules/styled-jsx/dist/index/index.js +499 -0
  1278. package/.next/standalone/node_modules/styled-jsx/index.js +1 -0
  1279. package/.next/standalone/node_modules/styled-jsx/package.json +132 -0
  1280. package/.next/standalone/node_modules/styled-jsx/style.js +1 -0
  1281. package/.next/standalone/package.json +55 -0
  1282. package/.next/standalone/server.js +38 -0
  1283. package/.next/static/BgLP6ChyOyE0k8Ahr8F2H/_buildManifest.js +11 -0
  1284. package/.next/static/BgLP6ChyOyE0k8Ahr8F2H/_clientMiddlewareManifest.js +1 -0
  1285. package/.next/static/BgLP6ChyOyE0k8Ahr8F2H/_ssgManifest.js +1 -0
  1286. package/.next/static/chunks/01xlw8hd842-c.js +1 -0
  1287. package/.next/static/chunks/03~yq9q893hmn.js +1 -0
  1288. package/.next/static/chunks/0bogtdbh.dcu1.js +1 -0
  1289. package/.next/static/chunks/0bzupvr5gt3k9.js +31 -0
  1290. package/.next/static/chunks/0d3shmwh5_nmn.js +1 -0
  1291. package/.next/static/chunks/0iym2_f33sxs7.css +4 -0
  1292. package/.next/static/chunks/0mmpyn9fv2fjf.js +2 -0
  1293. package/.next/static/chunks/0qmupjhwdppg9.js +11 -0
  1294. package/.next/static/chunks/0y3~cortx~or~.js +5 -0
  1295. package/.next/static/chunks/12p3iqtw2ohfq.js +1 -0
  1296. package/.next/static/chunks/turbopack-06dy8k5p5cegf.js +1 -0
  1297. package/.next/static/media/166ab60e98aadb0a-s.p.0mka4ru4_bj1d.woff2 +0 -0
  1298. package/.next/static/media/1bffadaabf893a1e-s.16ipb6fqu393i.woff2 +0 -0
  1299. package/.next/static/media/2bbe8d2671613f1f-s.067x_6k0k23tk.woff2 +0 -0
  1300. package/.next/static/media/2c55a0e60120577a-s.0bjc5tiuqdqro.woff2 +0 -0
  1301. package/.next/static/media/47fe59148dddec23-s.0miki_k4yhs4d.woff2 +0 -0
  1302. package/.next/static/media/4e86c6b06ecb547e-s.0w2c6_8~q7i1~.woff2 +0 -0
  1303. package/.next/static/media/4fa387ec64143e14-s.0q3udbd2bu5yp.woff2 +0 -0
  1304. package/.next/static/media/5476f68d60460930-s.0wxq9webf.ew4.woff2 +0 -0
  1305. package/.next/static/media/63599ae31785f475-s.01zyq0dc2~0hp.woff2 +0 -0
  1306. package/.next/static/media/797e433ab948586e-s.p.0.q-h669a_dqa.woff2 +0 -0
  1307. package/.next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2 +0 -0
  1308. package/.next/static/media/8b19d8d892dc610b-s.0.m6yiwn-kka2.woff2 +0 -0
  1309. package/.next/static/media/9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2 +0 -0
  1310. package/.next/static/media/ad66f9afd8947f86-s.11u06r12fd6v_.woff2 +0 -0
  1311. package/.next/static/media/bbc41e54d2fcbd21-s.0gw~uztddq1df.woff2 +0 -0
  1312. package/.next/static/media/c5ff0a46612d668f-s.0hhk-7qht1v87.woff2 +0 -0
  1313. package/.next/static/media/f10b37ddd5a9e949-s.15ktajnz8ofs..woff2 +0 -0
  1314. package/.next/static/media/favicon.0x3dzn~oxb6tn.ico +0 -0
  1315. package/README.md +75 -0
  1316. package/bin/miclaw.mjs +99 -0
  1317. package/package.json +55 -0
  1318. package/public/file.svg +1 -0
  1319. package/public/globe.svg +1 -0
  1320. package/public/logo.png +0 -0
  1321. package/public/next.svg +1 -0
  1322. package/public/screenshot.png +0 -0
  1323. package/public/vercel.svg +1 -0
  1324. package/public/window.svg +1 -0
@@ -0,0 +1,1658 @@
1
+ 1:"$Sreact.fragment"
2
+ 2:I[22450,["/_next/static/chunks/0mmpyn9fv2fjf.js","/_next/static/chunks/0d3shmwh5_nmn.js","/_next/static/chunks/12p3iqtw2ohfq.js"],"ExpandableBody"]
3
+ 13:I[97367,["/_next/static/chunks/0mmpyn9fv2fjf.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"OutletBoundary"]
4
+ 14:"$Sreact.suspense"
5
+ 3:T1810,# Infrastructure Security Audit
6
+
7
+ Scan all AWS infrastructure modules for security issues across four categories: IAM least-privilege, unprotected API routes, encryption, and factory module bypass.
8
+
9
+ ## How This Codebase Works
10
+
11
+ This is an OpenTofu infrastructure codebase. Key facts:
12
+
13
+ - AWS modules live in `modules/aws/`
14
+ - Reusable factory modules enforce security defaults:
15
+ - `private_s3_bucket` — S3 with public access blocked + AES256 encryption
16
+ - `sqs_queue_with_dlq` — SQS with managed SSE + DLQ + CloudWatch alarms
17
+ - `lambda_zip_function` — Lambda with scoped IAM base policy + CloudWatch logs + error/throttle alarms
18
+ - `http_lambda_integration` — API Gateway routes with authorizer wiring
19
+ - IAM policies use `aws_iam_policy_document` data sources with managed policies (not inline)
20
+ - API Gateway routes are defined per-service via `http_lambda_integration`, NOT centralized. Each service module specifies its routes using one of three variables:
21
+ - `api_base_paths` — uses the account authorizer (validates JWT + account membership)
22
+ - `jwt_authorizer_endpoints` — uses JWT-only authorizer (validates JWT, strips account headers)
23
+ - `public_endpoints` — no auth (strips all Bioscope headers)
24
+
25
+ ## Your Task
26
+
27
+ ### Step 1: Audit factory modules
28
+
29
+ Use the Task tool (subagent_type: "general-purpose") to spin up ONE sub-agent that reads and audits all four factory modules:
30
+
31
+ - `modules/aws/private_s3_bucket/`
32
+ - `modules/aws/sqs_queue_with_dlq/`
33
+ - `modules/aws/lambda_zip_function/`
34
+ - `modules/aws/http_lambda_integration/`
35
+
36
+ This agent should verify the security defaults are sound, write its report to `/tmp/infra-security-audit/factory-modules.md`, and return ONLY a one-line confirmation (e.g., "Wrote report to /tmp/infra-security-audit/factory-modules.md. N findings."). Do NOT return the full report — it's in the file.
37
+
38
+ ### Step 2: Audit platform_vpc
39
+
40
+ Spin up ONE sub-agent for `modules/aws/platform_vpc/`. Check:
41
+
42
+ - Security groups: any rules with `0.0.0.0/0` or `::/0` ingress
43
+ - Any public subnets or internet gateways
44
+ - VPC endpoint configuration
45
+
46
+ Write report to `/tmp/infra-security-audit/platform-vpc.md` and return ONLY a one-line confirmation.
47
+
48
+ ### Step 3: Audit service modules
49
+
50
+ First, create the output directory: `mkdir -p /tmp/infra-security-audit`
51
+
52
+ Then spin up sub-agents in parallel to scan service modules in batches (~5 modules per agent). Skip the factory modules and `platform_vpc` (already audited). For each module, check:
53
+
54
+ #### IAM Least-Privilege
55
+
56
+ - `resources = ["*"]` on any action EXCEPT where AWS requires it (e.g., Textract, EC2 network interfaces for VPC config). Flag wildcards that could be scoped to specific ARNs.
57
+ - Overly broad actions (e.g., `dynamodb:*` instead of specific operations, `s3:*` instead of specific operations)
58
+ - `Action = "*"` (full admin access) — this would be critical
59
+
60
+ #### Unprotected API Routes
61
+
62
+ - Look for usage of `http_lambda_integration` module. Check which variables are set:
63
+ - `api_base_paths` — good, uses account authorizer
64
+ - `jwt_authorizer_endpoints` — fine for user-centric routes, but flag if the endpoint path suggests it needs account context (e.g., contains `/patients/`, `/accounts/` but not `/me`)
65
+ - `public_endpoints` — flag for review, note what the endpoint does
66
+ - If a service has an API Gateway integration but doesn't use `http_lambda_integration`, flag it
67
+
68
+ #### Encryption & Security Defaults
69
+
70
+ - Any `aws_s3_bucket` created directly (NOT using `private_s3_bucket` module) — check it has public access block and encryption
71
+ - Any `aws_sqs_queue` created directly (NOT using `sqs_queue_with_dlq` module) — check it has `sqs_managed_sse_enabled = true`
72
+ - Any `aws_dynamodb_table` — check if it has `deletion_protection_enabled` on tables that look like they store important data
73
+ - Any SNS topics without encryption
74
+
75
+ #### Factory Module Bypass
76
+
77
+ - Flag any raw `aws_s3_bucket`, `aws_sqs_queue`, or `aws_lambda_function` resources that aren't using the factory modules. These may be intentional (note the context) but should be reviewed.
78
+
79
+ Each sub-agent should write its report to `/tmp/infra-security-audit/batch-<N>.md` and return ONLY a one-line confirmation (e.g., "Wrote report to /tmp/infra-security-audit/batch-1.md. N findings across M modules."). Do NOT return the full report — it's in the file.
80
+
81
+ **IMPORTANT:** When calling the Task tool for each sub-agent, explicitly instruct it to write findings to the file and return only a brief one-line confirmation. The full report must go in the file, NOT in the return message. This prevents the main agent's context from overflowing.
82
+
83
+ ### Step 4: Report format
84
+
85
+ Each sub-agent should write its report in this format:
86
+
87
+ ```text
88
+ ## <module-name>
89
+
90
+ ### Findings
91
+
92
+ #### <Issue title>
93
+ - **File**: path/to/file.tf:line
94
+ - **Resource**: resource type and name
95
+ - **Issue**: description
96
+ - **Severity**: Critical / High / Medium / Low
97
+ - **Notes**: context (e.g., "wildcard may be required by AWS for this service")
98
+
99
+ ### No Issues Found
100
+ ```
101
+
102
+ ### Step 5: Aggregate
103
+
104
+ **Important:** Do NOT read the report files yourself — this will overflow your context. Instead, spin up one final sub-agent (subagent_type: "general-purpose") to handle aggregation. This agent should:
105
+
106
+ 1. List all files in `/tmp/infra-security-audit/`
107
+ 2. Read each file one at a time, extracting only findings (skip "No Issues Found" sections and clean modules)
108
+ 3. Write a final summary to `/tmp/infra-security-audit/SUMMARY.md` with:
109
+ - **Executive Summary**: Total modules scanned, total findings by severity
110
+ - **Factory Module Health**: Summary of factory module audit
111
+ - **Findings by Category**: IAM, Routes, Encryption, Factory Bypass
112
+ - **Clean Modules**: List of modules with no findings (names only)
113
+ 4. Return a brief summary of the findings to you (just counts and critical items, not the full report)
114
+
115
+ After the aggregation agent completes, tell the user the full report is at `/tmp/infra-security-audit/SUMMARY.md` and output the brief summary.
116
+
117
+ Read the actual .tf files — don't guess based on module names. When a wildcard resource is found, check if it's a known AWS requirement before flagging.0:{"rsc":["$","$1","c",{"children":[["$","div",null,{"className":"mx-auto max-w-5xl px-8 py-10","children":[["$","div",null,{"className":"mb-8","children":[["$","div",null,{"className":"flex items-baseline gap-3","children":[["$","h1",null,{"className":"text-2xl font-medium tracking-tight","children":"Commands"}],["$","span",null,{"className":"text-sm text-text-muted","children":12}]]}],["$","p",null,{"className":"mt-1 text-sm text-text-muted","children":"Procedural commands across projects"}]]}],[["$","div","infrastructure",{"className":"mb-8","children":[["$","h2",null,{"className":"text-xs font-medium text-text-dim uppercase tracking-wide mb-3","children":"infrastructure"}],["$","div",null,{"className":"space-y-3","children":[["$","div","/Users/gabry/Desktop/infrastructure/.claude/commands/security-audit.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"security-audit"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"infrastructure"}]]}],["$","$L2",null,{"content":"$3","previewLines":3}]]}]]}]]}],"$L4","$L5"],false]}],["$L6"],"$L7"]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"BgLP6ChyOyE0k8Ahr8F2H"}
118
+ 8:T368e,# Broken Access Control Scan
119
+
120
+ Scan ALL route handlers and Lambda handlers in platform-services for broken access control vulnerabilities beyond IDOR (which is covered by the separate `idor-scan` command).
121
+
122
+ ## How This Codebase Works
123
+
124
+ This is a FastAPI-based backend. Key facts:
125
+
126
+ - Routes live in `packages/*/src/*/routes/*.py`
127
+ - App setup files are at `packages/*/src/*/app.py`
128
+ - Lambda handlers are at `packages/*/src/*/handler.py`
129
+ - Service-specific middleware may be at `packages/*/src/*/middleware.py`
130
+ - Shared middleware is in `packages/shared_middleware/src/shared_middleware/`
131
+ - Most routes are behind an API Gateway account authorizer that validates the JWT and sets trusted headers: `Bioscope-Account-Id`, `Bioscope-User-Id`, `Bioscope-User-Role`, `Bioscope-Is-Demo-User`
132
+ - Some routes use a simpler JWT-only authorizer or no authorizer at all (public endpoints). The authorizer config lives in infrastructure and is not visible from this repo.
133
+
134
+ ### Standard Middleware Stack
135
+
136
+ Every FastAPI service should mount these middlewares in this order in `app.py`:
137
+
138
+ ```python
139
+ app = FastAPI(title="service-name", dependencies=[Depends(enforce_demo_read_only)])
140
+ app.add_middleware(WithExceptionLoggingMiddleware)
141
+ app.add_middleware(WithMetadataLoggingMiddleware)
142
+ app.add_middleware(WithLoggerMiddleware)
143
+ ```
144
+
145
+ And include routers via `app.include_router(...)`.
146
+
147
+ ### Role-Based Access Control
148
+
149
+ The codebase has a single role validation dependency:
150
+
151
+ - `require_owner_role` in `shared_middleware/role_validation.py` — checks `Bioscope-User-Role` header equals `"owner"`, raises 403 otherwise
152
+ - Used as `RequireOwnerRoleDeps = Annotated[None, Depends(require_owner_role)]`
153
+
154
+ Role is set by the API Gateway authorizer from the user's account membership record in DynamoDB.
155
+
156
+ ### Demo Mode
157
+
158
+ - `enforce_demo_read_only` is applied as a global FastAPI dependency — blocks all non-GET/HEAD/OPTIONS requests for demo users
159
+ - Routes can opt in to allow demo writes with the `@allow_demo_writes` decorator
160
+
161
+ ### Header Dependencies
162
+
163
+ Trusted headers are injected via these typed dependencies (from `shared_middleware/headers.py`):
164
+
165
+ - `BioscopeAccountIdHeaderDeps` — `Bioscope-Account-Id`
166
+ - `BioscopeUserIdHeaderDeps` — `Bioscope-User-Id`
167
+ - `BioscopeUserRoleHeaderDeps` — `Bioscope-User-Role`
168
+ - `BioscopeCorrelationIdHeaderDeps` — `Bioscope-Correlation-Id`
169
+ - `BioscopeInternalApiKeyHeaderDeps` — `Bioscope-Internal-Api-Key`
170
+ - `BioscopeIsDemoUserHeaderDeps` — `Bioscope-Is-Demo-User`
171
+
172
+ ## Your Task
173
+
174
+ ### Step 1: Discover all services
175
+
176
+ Use glob to find:
177
+ 1. All route files: `packages/*/src/*/routes/*.py`
178
+ 2. All app files: `packages/*/src/*/app.py`
179
+ 3. All handler files: `packages/*/src/*/handler.py`
180
+ 4. All handler directories: `packages/*/src/*/handlers/*.py`
181
+
182
+ Group them by service. A service may have routes (FastAPI), handlers (Lambda), or both.
183
+
184
+ ### Step 2: Create an output directory and spin up sub-agents
185
+
186
+ First, create an output directory using Bash: `mkdir -p access-control-scan-results` (in the repo root directory).
187
+
188
+ Then, for **every service** (both route-based and handler-only), use the Task tool (subagent_type: "general-purpose") to scan that service.
189
+
190
+ #### Parallelism guidelines
191
+
192
+ **CRITICAL: Do NOT launch all agents at once.** This codebase has many services (typically 50+). Launching too many parallel agents causes resource contention, slow completions, and permission prompt overload.
193
+
194
+ Instead, process services in **batches of 5 agents at a time**:
195
+
196
+ 1. **Batch 1**: Launch 5 route-based service agents in parallel (in a single message with 5 Task tool calls). Run them in background (`run_in_background: true`).
197
+ 2. **Wait**: After launching a batch, wait for all agents in the batch to complete before launching the next batch. Check completion by reading the output files or using TaskOutput.
198
+ 3. **Batch 2**: Launch the next 5 route-based services.
199
+ 4. **Continue**: Repeat until all route-based services are scanned, then do the same for handler-only services.
200
+
201
+ For **handler-only services**, you may group 3-5 related services into a single agent (e.g., all `*_event_consumer` services in one agent) since they are simpler to scan. This reduces the total number of agents needed. Each grouped agent should write **separate report files** for each service it scans.
202
+
203
+ #### What each sub-agent should do
204
+
205
+ **For services with route files**, each sub-agent should:
206
+ 1. Read ALL route files for that service
207
+ 2. Read the service's `app.py` to check middleware mounting and global dependencies
208
+ 3. Read any service-specific `middleware.py` if it exists
209
+ 4. For each route handler, check for the vulnerabilities listed in Step 3
210
+ 5. **Write the report to a file** at `access-control-scan-results/<service-name>.md` (relative to the repo root) using the format in Step 4
211
+ 6. **Return ONLY a one-line confirmation** (e.g., "Wrote report to access-control-scan-results/chat_service.md. 2 findings."). Do NOT return the full report — it's in the file.
212
+
213
+ **For handler-only services** (no route files, only `handler.py` and optionally `handlers/*.py`), each sub-agent should:
214
+ 1. Read the service's `handler.py` and all files in `handlers/` if present
215
+ 2. For each Lambda handler (decorated with `@handler.sqs`, `@handler.sns`, `@handler.direct_invocation`, `@handler.event_bridge`, `@handler.authorizer`), check for the vulnerabilities listed in Step 3 section E
216
+ 3. **Write the report to a file** at `access-control-scan-results/<service-name>.md` (relative to the repo root) using the format in Step 4
217
+ 4. **Return ONLY a one-line confirmation**
218
+
219
+ **IMPORTANT:** When calling the Task tool for each sub-agent, explicitly instruct it to write findings to the file and return only a brief one-line confirmation. The full report must go in the file, NOT in the return message. This prevents the main agent's context from overflowing.
220
+
221
+ ### Step 3: What to check per service and route
222
+
223
+ #### A. Middleware and App-Level Checks
224
+
225
+ For each service's `app.py`, verify:
226
+
227
+ - **Missing standard middleware**: The app MUST mount all three middlewares (`WithExceptionLoggingMiddleware`, `WithMetadataLoggingMiddleware`, `WithLoggerMiddleware`). Flag any that are missing.
228
+ - **Missing demo mode enforcement**: The app MUST have `dependencies=[Depends(enforce_demo_read_only)]` on the `FastAPI()` constructor. Flag if missing.
229
+ - **Non-standard middleware ordering**: Middlewares execute in reverse order of addition (LIFO). `WithLoggerMiddleware` must be added last so it executes first. Flag incorrect ordering.
230
+ - **Routes mounted outside the app**: Check if any route files exist that are NOT included via `app.include_router(...)`. These routes would bypass all app-level middleware and dependencies.
231
+
232
+ #### B. Role-Based Access Control Checks
233
+
234
+ For each route handler, check:
235
+
236
+ - **Sensitive mutations without role checks**: Routes that perform destructive or admin-level operations (DELETE endpoints, account settings changes, user management, billing operations) should use `RequireOwnerRoleDeps` or `Depends(require_owner_role)`. Flag mutation endpoints that handle sensitive operations without any role check. Use your judgment — not every POST/PATCH/DELETE needs a role check, but operations like deleting accounts, managing users, or changing account settings do.
237
+ - **Role from untrusted source**: Any route that reads a role from path params, query params, or request body instead of the `Bioscope-User-Role` header. The role MUST come from the trusted header dependency.
238
+
239
+ #### C. Authentication/Authorization Gaps
240
+
241
+ For each route handler, check:
242
+
243
+ - **Missing identity headers**: Routes that perform any data access or mutation but do NOT inject `BioscopeAccountIdHeaderDeps` or `BioscopeUserIdHeaderDeps`. Every non-public route should use at least the account ID header to scope its operations.
244
+ - **Hardcoded or default account/user IDs**: Any route that uses a hardcoded UUID or default value for account_id or user_id instead of extracting from headers.
245
+ - **Internal API key routes without validation**: Routes that accept `BioscopeInternalApiKeyHeaderDeps` should validate the key value against an expected secret, not just check that the header is present.
246
+
247
+ #### D. Demo Mode Bypass
248
+
249
+ - **Mutation routes with @allow_demo_writes that shouldn't have it**: The `@allow_demo_writes` decorator should only be on routes where demo users legitimately need write access (e.g., creating a chat for a demo walkthrough). Flag any destructive operations (DELETE, account mutations) that have this decorator.
250
+
251
+ #### E. Lambda Handler Checks (for handler-only and hybrid services)
252
+
253
+ Lambda handlers (`@handler.sqs`, `@handler.sns`, `@handler.direct_invocation`, `@handler.event_bridge`) are internal-facing and trust their event sources by design (IAM policies and queue/topic access policies control who can invoke them). The checks below focus on risks that remain even within that trust model.
254
+
255
+ For each Lambda handler, check:
256
+
257
+ - **Unscoped destructive operations**: Direct invocation or event-driven handlers that perform bulk deletes, account mutations, or data purges without scoping to a specific `account_id` or `patient_id` from the event payload. A handler that deletes "all matching records" rather than scoping by the account/patient in the event is dangerous if it ever receives malformed input.
258
+ - **Missing account/patient scoping on queries**: Handlers that query DynamoDB or other data stores without filtering by `account_id` or `patient_id` when the event payload contains those identifiers. The handler should use the event's IDs to scope its operations, not fetch all records globally.
259
+ - **Sensitive operations in direct invocation handlers without caller context**: Direct invocation handlers that perform admin-level operations (creating users, modifying account settings, issuing credentials) should accept and log a `correlation_id` or caller identifier for audit trail. Flag handlers that perform sensitive mutations with no traceability to the original caller.
260
+ - **Event payload used to construct external requests without validation**: Handlers that take URLs, email addresses, or external identifiers from event payloads and pass them directly to external services (HTTP calls, email sends, S3 operations). Validate that the handler sanitizes or validates these inputs rather than blindly trusting them.
261
+ - **Internal API key routes without key validation**: Any HTTP route (in hybrid services that have both routes and handlers) that accepts `BioscopeInternalApiKeyHeaderDeps` should validate the key value against an expected secret, not just check that the header is present.
262
+
263
+ **Important context for sub-agents**: Do NOT flag handler-level findings for the following, as these are expected patterns:
264
+ - Direct invocation handlers that don't have API Gateway-style JWT authorization — they're internal Lambda-to-Lambda calls secured by IAM
265
+ - SQS/SNS handlers that trust `account_id` or `patient_id` from the event body — the event source is trusted
266
+ - Handlers that don't inject `BioscopeAccountIdHeaderDeps` — header dependencies are for HTTP routes only, not Lambda handlers
267
+
268
+ ### Step 4: Report format
269
+
270
+ Each sub-agent should write findings in this format:
271
+
272
+ **For services with routes (FastAPI):**
273
+
274
+ ```text
275
+ ## <service-name>
276
+
277
+ ### App-Level Configuration
278
+ - **Middleware**: [All present / Missing: <list>]
279
+ - **Demo mode**: [Enforced / MISSING]
280
+ - **Middleware order**: [Correct / INCORRECT: <details>]
281
+ - **Unmounted routes**: [None / <list>]
282
+
283
+ ### Routes Scanned
284
+ - `GET /path` — handler_name (file:line)
285
+ - `POST /path` — handler_name (file:line)
286
+ ...
287
+
288
+ ### Findings
289
+
290
+ #### Missing role check on sensitive mutation — `DELETE /resource/{id}`
291
+ - **File**: path/to/file.py:123
292
+ - **Handler**: `delete_resource`
293
+ - **Issue**: Destructive operation with no role validation
294
+ - **Confidence**: High / Medium / Low
295
+ - **Notes**: <any relevant context>
296
+
297
+ #### Missing identity headers — `GET /resource`
298
+ ...
299
+
300
+ ### No Issues Found
301
+ (list routes that were scanned and passed all checks)
302
+ ```
303
+
304
+ **For handler-only services (Lambda):**
305
+
306
+ ```text
307
+ ## <service-name>
308
+
309
+ ### Handlers Scanned
310
+ - `@handler.sqs(queue_name="queue-name")` — handler_function (file:line)
311
+ - `@handler.direct_invocation()` — handler_function (file:line)
312
+ - `@handler.event_bridge()` — handler_function (file:line)
313
+ ...
314
+
315
+ ### Findings
316
+
317
+ #### Unscoped destructive operation — handle_delete_event
318
+ - **File**: path/to/handler.py:45
319
+ - **Handler**: `handle_delete_event`
320
+ - **Decorator**: `@handler.sqs(queue_name="...")`
321
+ - **Issue**: Deletes records without scoping to account_id from event payload
322
+ - **Confidence**: High / Medium / Low
323
+ - **Notes**: <any relevant context>
324
+
325
+ ### No Issues Found
326
+ (list handlers that were scanned and passed all checks)
327
+ ```
328
+
329
+ ### Step 5: Aggregate
330
+
331
+ After all sub-agents complete, read each file from `access-control-scan-results/` and compile a final summary. To avoid context limits, read one file at a time and extract only the findings (skip the "No Issues Found" and "Routes Scanned" sections for clean services).
332
+
333
+ Write the final report to `access-control-scan-results/SUMMARY.md` with:
334
+
335
+ 1. **Executive Summary**: Total services scanned (route-based + handler-only), total routes/handlers scanned, total findings by category
336
+ 2. **App-Level Issues**: Any services with middleware or configuration problems
337
+ 3. **Route-Level Findings**: All access control vulnerabilities in FastAPI routes, grouped by type
338
+ 4. **Handler-Level Findings**: All access control vulnerabilities in Lambda handlers, grouped by type
339
+ 5. **Clean Services**: List of services with no findings (names only)
340
+ 6. **Per-Service Details**: Full findings for services that had issues
341
+
342
+ Then output the summary to the user.
343
+
344
+ Be thorough. Read the actual code — don't guess based on function names alone. When checking for role validation, trace the full dependency chain. If a role check happens in a called function or middleware rather than at the route level, note it but don't flag it as a vulnerability.4:["$","div","platform-services",{"className":"mb-8","children":[["$","h2",null,{"className":"text-xs font-medium text-text-dim uppercase tracking-wide mb-3","children":"platform-services"}],["$","div",null,{"className":"space-y-3","children":[["$","div","/Users/gabry/Desktop/platform-services/.claude/commands/access-control-scan.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"access-control-scan"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$8","previewLines":3}]]}],"$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11"]}]]}]
345
+ 12:T1605,# Investigate WGS Ingestion Failure
346
+
347
+ You are investigating a WGS ingestion Step Function failure in production. Follow each step. Do NOT ask for user input -- work autonomously.
348
+
349
+ ## Input
350
+
351
+ $ARGUMENTS
352
+
353
+ ## Step 1: Parse the Alert
354
+
355
+ Extract from the input text: `correlationId`, `wgsIngestionId`, `sfnError`, `sfnStatus`.
356
+
357
+ If the input is missing required fields, write a report noting the parse failure and stop.
358
+
359
+ ## Step 2: Query Axiom
360
+
361
+ Use `mcp__axiom__queryDataset` with `startTime` = `now-24h` and `endTime` = `now`.
362
+
363
+ Trace the correlationId:
364
+
365
+ ```apl
366
+ ['bioscope-prod']
367
+ | where correlationId == "<correlationId>"
368
+ | order by _time asc
369
+ ```
370
+
371
+ Search by wgsIngestionId:
372
+
373
+ ```apl
374
+ ['bioscope-prod']
375
+ | where data.wgsIngestionId == "<wgsIngestionId>" or message contains "<wgsIngestionId>"
376
+ | order by _time asc
377
+ ```
378
+
379
+ Focus on ERROR-level entries. Record only the key log lines needed to explain the failure -- not the full trace.
380
+
381
+ ## Step 3: Cross-Reference Code
382
+
383
+ Read the `PLATFORM_SERVICES_PATH` and `INFRASTRUCTURE_PATH` environment variables to locate the repos.
384
+
385
+ ### Application code (platform-services)
386
+
387
+ 1. `$PLATFORM_SERVICES_PATH/packages/wgs_ingestion_service/src/wgs_ingestion_service/handlers/handle_sfn_failure.py`
388
+ 2. `$PLATFORM_SERVICES_PATH/packages/wgs_ingestion_service/src/wgs_ingestion_service/handlers/handle_initiate_ingestion.py`
389
+ 3. `$PLATFORM_SERVICES_PATH/packages/bioscope_types/src/bioscope_types/dynamodb/wgs_ingestions.py`
390
+
391
+ ### Infrastructure (Terraform)
392
+
393
+ If the error points to a Step Function state, Lambda config, IAM permissions, or resource limits, cross-reference these files:
394
+
395
+ 1. `$INFRASTRUCTURE_PATH/modules/aws/wgs_ingestion/sfn.tf` -- Step Function state machine definition and pipeline flow
396
+ 2. `$INFRASTRUCTURE_PATH/modules/aws/wgs_ingestion/lambda.tf` -- Lambda function configuration (memory, timeout, layers)
397
+ 3. `$INFRASTRUCTURE_PATH/modules/aws/wgs_ingestion/iam.tf` -- IAM roles and policies for the pipeline
398
+ 4. `$INFRASTRUCTURE_PATH/modules/aws/wgs_ingestion/eventbridge.tf` -- EventBridge rule that triggers on SFN failures
399
+ 5. `$INFRASTRUCTURE_PATH/modules/aws/wgs_ingestion/dynamodb.tf` -- DynamoDB table and index definitions
400
+
401
+ The execution name format is `{wgs_ingestion_id}_{kit_id}_{timestamp}`.
402
+
403
+ ## Step 4: Classify the Failure
404
+
405
+ **Default to Bug.** Only classify as Transient if you can point to specific evidence (see criteria below).
406
+
407
+ - **Bug**: Code error, unhandled exception, missing IAM permissions, missing config, infrastructure misconfiguration. Requires a code or infra fix. **This is the default classification when the root cause is unclear.**
408
+ - **Transient**: A failure that meets ALL of these criteria:
409
+ 1. The error is a network timeout, AWS throttling, or a known transient pattern (see below)
410
+ 2. There is no underlying code/config/IAM issue that caused it
411
+ 3. A redrive would be expected to succeed WITHOUT any code or infrastructure changes
412
+ - **Data issue**: Bad input, missing files, malformed data. Requires manual intervention.
413
+
414
+ You MUST justify your classification in the Root Cause section. If classifying as Transient, explicitly state why a redrive would fix it without code changes.
415
+
416
+ ### Example Transient Errors
417
+
418
+ These LOOK like data issues but are known transient -- classify as **Transient**:
419
+
420
+ - **`INTERSECT_VARIANTS` / `KeyError: 'CHR:POS:A0:A1'` / "No variants in intersection"**: Intermittent failure in `pgsc_calc` during PRS generation. Resolves on redrive.
421
+
422
+ ### Example Bug Patterns
423
+
424
+ These may LOOK transient but are bugs -- classify as **Bug**:
425
+
426
+ - **S3 403 Forbidden on HeadObject/GetObject/PutObject**: Usually a missing IAM permission on the task role, not a temporary auth issue. Check the relevant IAM policy in infrastructure. Example: BIOENG-535 where `genomics-bam-subset-processor` was missing `s3:GetObject` on its output bucket.
427
+ - **S3 404 Not Found on expected files**: Could indicate a missing deployment artifact, misconfigured path, or a race condition in the pipeline -- not transient.
428
+ - **Persistent STS/credential errors on FARGATE_SPOT**: If the same error recurs on redrive or appears on non-spot tasks, it is an IAM issue, not credential expiration.
429
+
430
+ ## Step 5: Write the Report
431
+
432
+ Write the report file as: `reports/YYYY-MM-DD_<first-8-chars-of-wgsIngestionId>.md`
433
+
434
+ The `reports/` directory is in the current working directory. Verify with `Glob` that the directory exists before writing. If it does not exist, create it.
435
+
436
+ Keep the report concise. Only include log lines that are directly relevant to explaining the failure cause.
437
+
438
+ ```
439
+ # WGS Ingestion Failure Report
440
+
441
+ ## Summary
442
+
443
+ | Field | Value |
444
+ |-------|-------|
445
+ | Date | YYYY-MM-DD HH:MM UTC |
446
+ | Correlation ID | ... |
447
+ | WGS Ingestion ID | ... |
448
+ | Execution Name | ... |
449
+ | SFN Error | ... |
450
+ | SFN Status | ... |
451
+
452
+ ## Key Logs
453
+
454
+ Only the log lines that explain the failure (oldest first):
455
+
456
+ - `TIMESTAMP` [LEVEL] message (logGroup: ...)
457
+
458
+ ## Root Cause
459
+
460
+ <1-3 sentences. What failed and why.>
461
+
462
+ ## Classification
463
+
464
+ **<Transient | Bug | Data issue>**
465
+
466
+ ## Recommended Action
467
+
468
+ <1-2 sentences.>
469
+
470
+ ### Redrive JSON
471
+
472
+ If transient, include:
473
+
474
+ {
475
+ "executionIds": ["<execution-name>"]
476
+ }
477
+
478
+ Env-task name: `redrive-wgs-ingestion-execution`
479
+ ```
480
+
481
+ ## Rules
482
+
483
+ - Do NOT ask for user input. Work fully autonomously.
484
+ - Do NOT include PII/PHI. Only UUIDs, error codes, timestamps, status values.
485
+ - Do NOT use Bash commands. Use only Read, Glob, Grep, Write, and mcp__axiom__queryDataset.
486
+ - If Axiom queries fail, proceed with code analysis and note the gap in the report.5:["$","div","wgs-ingestion-bot",{"className":"mb-8","children":[["$","h2",null,{"className":"text-xs font-medium text-text-dim uppercase tracking-wide mb-3","children":"wgs-ingestion-bot"}],["$","div",null,{"className":"space-y-3","children":[["$","div","/Users/gabry/Desktop/wgs-ingestion-bot/.claude/commands/investigate-wgs-ingestion.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"investigate-wgs-ingestion"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"wgs-ingestion-bot"}]]}],["$","$L2",null,{"content":"$12","previewLines":3}]]}]]}]]}]
487
+ 6:["$","script","script-0",{"src":"/_next/static/chunks/12p3iqtw2ohfq.js","async":true}]
488
+ 7:["$","$L13",null,{"children":["$","$14",null,{"name":"Next.MetadataOutlet","children":"$@15"}]}]
489
+ 16:Tf1d,# Add a New Model to llm-proxy-service
490
+
491
+ Add a new LLM model to `llm-proxy-service`, ensuring accurate cost reporting.
492
+
493
+ ## Background
494
+
495
+ - `litellm` contains bundled pricing data in `model_prices_and_context_window.json`
496
+ - We disable litellm's automatic pricing fetch; we ONLY use the bundled pricing
497
+ - If the bundled pricing is wrong or missing for a model, litellm reports $0 cost, which breaks our cost reporting
498
+ - Overrides for incorrect pricing go in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py` via `litellm.register_model()`
499
+ - **IMPORTANT**: Both `llm-proxy-service` and `embedding-service` depend on `litellm`. Their versions must always match. If this skill requires upgrading litellm, update BOTH packages.
500
+
501
+ ## Step 1: Gather information
502
+
503
+ Ask the user:
504
+
505
+ 1. What model do they want to add? (e.g., `anthropic/claude-opus-4-5-20251101`)
506
+ 2. What is the provider's pricing page URL for this model?
507
+
508
+ ## Step 2: Determine the current litellm version
509
+
510
+ Read `platform-services/packages/llm_proxy_service/pyproject.toml` to find the currently-used litellm version.
511
+
512
+ ## Step 3: Validate pricing in the current litellm version
513
+
514
+ Use `uv run` to check if the model has correct pricing in the bundled litellm data:
515
+
516
+ ```bash
517
+ uv run --with litellm==<CURRENT_VERSION> python -c "import litellm, json; print(json.dumps(litellm.model_cost.get('<model_key>', {}), indent=2))"
518
+ ```
519
+
520
+ Note: The key in `litellm.model_cost` may not exactly match the model string. If an exact match isn't found, search for partial matches:
521
+
522
+ ```bash
523
+ uv run --with litellm==<CURRENT_VERSION> python -c "import litellm; keys = [k for k in litellm.model_cost if '<partial_model_name>' in k]; print('\n'.join(sorted(keys)))"
524
+ ```
525
+
526
+ Fetch the provider's pricing page and compare against the litellm pricing. Validate ALL of these fields:
527
+
528
+ - `input_cost_per_token`
529
+ - `output_cost_per_token`
530
+ - `cache_read_input_token_cost` (if applicable)
531
+ - `cache_creation_input_token_cost` (if applicable)
532
+
533
+ Present the comparison to the user.
534
+
535
+ ## Step 4: Add the model
536
+
537
+ ### 4a. Add to LLMModel type
538
+
539
+ Add the model string to the `LLMModel` Literal type in `platform-services/packages/bioscope_types/src/bioscope_types/services/llm_proxy_service.py`.
540
+
541
+ - Place it in the correct provider group (bedrock, anthropic, vertex_ai, azure, groq)
542
+ - Ensure the provider group has a comment linking to the pricing page (add one if it's a new provider)
543
+
544
+ ### 4b. Add pricing override (if needed)
545
+
546
+ If the pricing is incorrect or missing in litellm, add an override in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py`:
547
+
548
+ ```python
549
+ litellm.register_model(
550
+ {
551
+ "<model_key>": {
552
+ "input_cost_per_token": <value>, # $X per 1M tokens
553
+ "output_cost_per_token": <value>, # $X per 1M tokens
554
+ "cache_read_input_token_cost": <value>, # $X per 1M tokens (if applicable)
555
+ "cache_creation_input_token_cost": <value>, # $X per 1M tokens (if applicable)
556
+ "litellm_provider": "<provider>",
557
+ "max_input_tokens": <value>,
558
+ "max_output_tokens": <value>,
559
+ "mode": "chat",
560
+ }
561
+ }
562
+ )
563
+ ```
564
+
565
+ Include inline comments showing the human-readable cost (e.g., `# $3.00 per 1M tokens`).
566
+
567
+ ### 4c. Add to health check warmup (if needed)
568
+
569
+ If the model requires additional env vars (vertex_ai, groq, or anthropic models), consider adding a `set_additional_env_vars()` call in the health check in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/handler.py`. Only one model per provider prefix is needed for warmup.
570
+
571
+ ## Step 5: Validate
572
+
573
+ 1. Run `pnpm exec nx run bioscope-types:type-check` to verify the type is valid
574
+ 2. Run `pnpm exec nx run llm-proxy-service:test` to verify tests pass
575
+ 3. Run `pnpm exec nx run llm-proxy-service:lint` and `pnpm exec nx run llm-proxy-service:type-check`9:["$","div","/Users/gabry/Desktop/platform-services/.claude/commands/add-llm-proxy-service-model.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"add-llm-proxy-service-model"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$16","previewLines":3}]]}]
576
+ 17:T1c43,# IDOR & Authorization Vulnerability Scan
577
+
578
+ Scan ALL route handlers in platform-services for IDOR (Insecure Direct Object Reference) and authorization vulnerabilities.
579
+
580
+ ## How This Codebase Works
581
+
582
+ This is a FastAPI-based backend. Key facts:
583
+
584
+ - Routes *should* live in `packages/*/src/*/routes/*.py` (flag any routes that do not)
585
+ - App setup files are at `packages/*/src/*/app.py`
586
+ - Service-specific middleware may be at `packages/*/src/*/middleware.py`
587
+ - Shared middleware is in `packages/shared_middleware/src/shared_middleware/`
588
+ - Most routes are behind an API Gateway account authorizer that validates the JWT and verifies the user is a member of the account in the `Bioscope-Account-Id` header. For these routes, `account_id`, `user_id`, and `user_role` from headers can be trusted.
589
+ - Some routes use a simpler JWT-only authorizer (e.g. `/accounts/me`, `/users/me`) or no authorizer at all (public endpoints). The authorizer config lives in infrastructure and is not visible from this repo, so don't make assumptions about which authorizer a given route uses — just focus on whether the route handler code itself properly validates ownership.
590
+ - With the above two bullets in mind, `account_id`, `user_id`, and `user_role` can ONLY come from these headers and can NEVER come from path params, query params, request body, etc.
591
+
592
+ ### Auth/Authorization Patterns in Route Handlers
593
+
594
+ **Patient validation (cross-service ownership check):**
595
+ Routes with `{patient_id}` in the path MUST use `Depends(validate_patient_account_from_path_as_patient)` (or the factory `get_validate_patient_account`). This calls account-service to verify the patient belongs to the requesting account. A route that takes a patient_id without this dependency is an IDOR unless the route is checking the patient belongs to the account in its internal implementation.
596
+
597
+ **Inline account ownership checks:**
598
+ For non-patient resources (orders, EHR connections, etc.), routes typically fetch the resource and then check `if resource.account_id != account_id`. Missing this check on a resource lookup by ID is a potential IDOR.
599
+
600
+ ## Your Task
601
+
602
+ ### Step 1: Discover all services with routes
603
+
604
+ Use glob to find all route files matching `packages/*/src/*/routes/*.py`. Group them by service. Also check for any routes that aren't under a `routes` directory and flag them.
605
+
606
+ ### Step 2: Create an output directory and spin up sub-agents
607
+
608
+ First, create an output directory using Bash: `mkdir -p /tmp/idor-scan-results`
609
+
610
+ Then, for each service, use the Task tool (subagent_type: "general-purpose") to scan that service's routes. Run these in parallel (include all Task tool calls in a single message). Each sub-agent should:
611
+
612
+ 1. Read ALL route files for that service
613
+ 2. Read the service's `app.py` to check what global dependencies/middleware are applied
614
+ 3. Read any service-specific `middleware.py` if it exists
615
+ 4. For each route handler, check for the vulnerabilities listed in Step 3
616
+ 5. **Write the report to a file** at `/tmp/idor-scan-results/<service-name>.md` using the format in Step 4
617
+ 6. **Return ONLY a one-line confirmation** (e.g., "Wrote report to /tmp/idor-scan-results/chat_service.md. 2 findings."). Do NOT return the full report — it's in the file.
618
+
619
+ **IMPORTANT:** When calling the Task tool for each sub-agent, explicitly instruct it to write findings to the file and return only a brief one-line confirmation. The full report must go in the file, NOT in the return message. This prevents the main agent's context from overflowing.
620
+
621
+ ### Step 3: What to check per route
622
+
623
+ For every route handler function, check for these IDOR vulnerabilities:
624
+
625
+ - **Missing patient validation**: Route path contains `{patient_id}` but handler does NOT use `Depends(validate_patient_account_from_path_as_patient)` or equivalent
626
+ - **Patient dependency result discarded**: Route uses `validate_patient_account_from_path_as_patient` but assigns the result to `_` instead of `patient`. The presence of the dependency alone is NOT sufficient — if the route also takes a sub-resource ID (e.g., `{chat_id}`, `{file_id}`, `{order_id}`), the validated `patient.patient_id` MUST be passed to the service layer and checked against the fetched resource's `patient_id`. A discarded `_` is a strong signal that this check is missing. Trace the full call chain to verify.
627
+ - **Missing resource-to-account ownership**: Route takes a resource ID as a path/query/body param, fetches the resource, but does NOT verify `resource.account_id == account_id` before returning or mutating it
628
+ - **Missing resource-to-patient ownership**: Route takes both a `{patient_id}` and another resource ID, fetches the resource, but does NOT verify `resource.patient_id == patient_id`. This applies even if the patient validation dependency is present — the dependency only confirms the patient belongs to the account, NOT that the sub-resource belongs to the patient. You must trace into the service layer to verify this check exists.
629
+ - **Unscoped list/query endpoints**: Route returns a collection of resources (list/search/query) but the underlying query does NOT filter by `account_id` (or `patient_id` where applicable). Follow the call chain into the repository/data access layer to verify the query includes the appropriate scope filter.
630
+ - **Using account, user, or user role not from header**: Route uses account id, user id, or user role from query param, path param, or request body and not from the trusted `Bioscope-Account-Id`, `Bioscope-User-Id`, and `Bioscope-User-Role` headers.
631
+
632
+ ### Step 4: Compile the report
633
+
634
+ Each sub-agent should return its findings in this format:
635
+
636
+ ```text
637
+ ## <service-name>
638
+
639
+ ### Routes Scanned
640
+ - `GET /path` — handler_name (file:line)
641
+ - `POST /path` — handler_name (file:line)
642
+ ...
643
+
644
+ ### Findings
645
+
646
+ #### Missing patient validation — `POST /patients/{patient_id}/resource`
647
+ - **File**: path/to/file.py:123
648
+ - **Handler**: `create_resource`
649
+ - **Issue**: Route includes `{patient_id}` in path but does not use `validate_patient_account_from_path_as_patient`
650
+ - **Confidence**: High / Medium / Low
651
+ - **Notes**: <any relevant context>
652
+
653
+ #### Missing ownership check — `GET /resource/{resource_id}`
654
+ ...
655
+
656
+ ### No Issues Found
657
+ (list routes that were scanned and passed all checks)
658
+ ```
659
+
660
+ ### Step 5: Aggregate
661
+
662
+ After all sub-agents complete, read each file from `/tmp/idor-scan-results/` and compile a final summary. To avoid context limits, read one file at a time and extract only the findings (skip the "No Issues Found" and "Routes Scanned" sections for clean services).
663
+
664
+ Write the final report to `/tmp/idor-scan-results/SUMMARY.md` with:
665
+
666
+ 1. **Executive Summary**: Total routes scanned, total findings
667
+ 2. **Findings**: All IDOR vulnerabilities grouped by type
668
+ 3. **Clean Services**: List of services with no findings (names only)
669
+ 4. **Per-Service Details**: Full findings for services that had issues
670
+
671
+ Then output the summary to the user.
672
+
673
+ Be thorough. Read the actual code — don't guess based on function names alone. When in doubt about whether a check exists, read the called functions to see if ownership validation happens deeper in the call chain. If validation happens in a called function rather than at the route level, note it but don't flag it as a vulnerability.a:["$","div","/Users/gabry/Desktop/platform-services/.claude/commands/idor-scan.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"idor-scan"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$17","previewLines":3}]]}]
674
+ 18:T2543,# PHI/PII Data Exposure Scan
675
+
676
+ Scan ALL application code in platform-services for Protected Health Information (PHI) and Personally Identifiable Information (PII) exposure vulnerabilities. This covers logging, error responses, API over-fetching, and any other channel where sensitive data could leak.
677
+
678
+ ## What Constitutes PHI/PII in This Codebase
679
+
680
+ ### Patient PHI Fields (from `bioscope_types/dynamodb/patients.py`)
681
+ - `first_name`, `last_name` (names)
682
+ - `date_of_birth` (DOB)
683
+ - `sex`
684
+ - `mrn` (medical record number)
685
+ - `address_line_1`, `address_line_2`, `city`, `state`, `zip_code`, `country` (address)
686
+ - `phone_number`
687
+ - `email`
688
+
689
+ ### User PII Fields (from `bioscope_types/dynamodb/users.py`)
690
+ - `first_name`, `last_name`
691
+ - `email`
692
+ - `npi_number` (healthcare provider identifier)
693
+
694
+ ### Account PII Fields (from `bioscope_types/dynamodb/accounts.py`)
695
+ - Address fields: `address_line_1`, `address_line_2`, `city`, `state`, `zip_code`, `country`
696
+
697
+ ### Other PHI Sources
698
+ - FHIR resources (contain full patient demographics, diagnoses, medical history)
699
+ - EHR data (clinical records, lab results, immunizations)
700
+ - Genomic/WGS data and results
701
+ - Chat messages about patients (may contain clinical discussions)
702
+ - File contents (uploaded documents, lab reports)
703
+
704
+ ### Safe to Log
705
+ - UUIDs (patient_id, account_id, user_id, order_id, etc.)
706
+ - Timestamps
707
+ - Status values and enums
708
+ - Counts and metrics
709
+ - Operation names and types
710
+ - File IDs (not file contents or names that might contain patient info)
711
+
712
+ ## How Logging Works
713
+
714
+ - `BioscopeLogger` (from `bioscope_logger` package) is the standard logger
715
+ - Uses Python's `logging.LoggerAdapter` with JSON formatting
716
+ - Supports `.child()` for adding context fields
717
+ - Extra fields passed via `extra={}` parameter are serialized into the JSON log output
718
+ - Logs go to stdout and optionally CloudWatch — all log output is persisted
719
+ - `BioscopeLoggerDeps` injects the logger into FastAPI routes
720
+ - Lambda handlers receive `logger: BioscopeLogger` via dependency injection
721
+
722
+ ## Your Task
723
+
724
+ ### Step 1: Discover all scannable code
725
+
726
+ Use glob to find:
727
+ 1. All route files: `packages/*/src/*/routes/*.py`
728
+ 2. All handler files: `packages/*/src/*/handler.py`
729
+ 3. All handlers directories: `packages/*/src/*/handlers/*.py`
730
+ 4. All service/business logic files: `packages/*/src/*/*.py` (excluding `__init__.py`, `aws.py`, `app.py`)
731
+ 5. Any standalone scripts or local dev files: `packages/*/src/*/local.py`
732
+
733
+ Group them by service/package.
734
+
735
+ ### Step 2: Create an output directory and spin up sub-agents
736
+
737
+ First, create an output directory using Bash: `mkdir -p /tmp/phi-exposure-scan-results`
738
+
739
+ Then, for each service/package, use the Task tool (subagent_type: "general-purpose") to scan that package's code. Run these in parallel (include all Task tool calls in a single message). Each sub-agent should:
740
+
741
+ 1. Read ALL Python source files for that package (routes, handlers, service modules, utilities)
742
+ 2. Check for every vulnerability type listed in Step 3
743
+ 3. **Write the report to a file** at `/tmp/phi-exposure-scan-results/<package-name>.md` using the format in Step 4
744
+ 4. **Return ONLY a one-line confirmation** (e.g., "Wrote report to /tmp/phi-exposure-scan-results/chat_service.md. 3 findings."). Do NOT return the full report — it's in the file.
745
+
746
+ **IMPORTANT:** When calling the Task tool for each sub-agent, include the full list of PHI/PII fields from the "What Constitutes PHI/PII" section above so the sub-agent knows exactly what to look for. Instruct it to write findings to the file and return only a brief one-line confirmation. The full report must go in the file, NOT in the return message.
747
+
748
+ ### Step 3: What to check
749
+
750
+ #### A. PHI/PII in Log Statements (CRITICAL)
751
+
752
+ Search for all `logger.info`, `logger.warning`, `logger.error`, `logger.debug`, `logger.exception`, and `logger.critical` calls. For each, check:
753
+
754
+ - **Full model dumps in logs**: Calls like `logger.info("...", extra={"patient": patient.model_dump()})` or `model_dump_json()` that serialize an entire Pydantic model containing PHI fields. This includes Patient, User, Account, or any FHIR resource model.
755
+ - **PHI field values in log messages**: Direct references to PHI fields in log strings or extra dicts, e.g., `extra={"name": patient.first_name}`, `extra={"email": user.email}`, `extra={"dob": patient.date_of_birth}`.
756
+ - **F-string or format-string PHI**: Log messages that interpolate PHI values, e.g., `logger.info(f"Created patient {patient.first_name} {patient.last_name}")`.
757
+ - **Logging raw request/response bodies**: Logging full HTTP request bodies or response payloads that may contain PHI, e.g., `logger.info("Request", extra={"body": request.body()})`.
758
+ - **Logging full event payloads**: SQS/SNS/EventBridge event payloads logged in full when they may contain PHI fields.
759
+ - **Logging FHIR resources**: Any FHIR Bundle, Patient, Observation, Immunization, or other clinical resource logged in full.
760
+
761
+ #### B. PHI/PII in Error Responses (HIGH)
762
+
763
+ Check all `HTTPException` raises and error response construction:
764
+
765
+ - **PHI in HTTPException detail**: `raise HTTPException(status_code=..., detail=f"Patient {patient.first_name} not found")` — the detail message should never contain PHI, only IDs or generic messages.
766
+ - **PHI in custom error response models**: Any error response class that includes PHI fields.
767
+ - **Full exception messages with PHI**: Exception handlers that return `str(e)` where the exception message might contain PHI from a database query or validation error.
768
+
769
+ #### C. PHI/PII in API Response Over-Fetching (MEDIUM)
770
+
771
+ Check route return values and response models:
772
+
773
+ - **Returning full patient/user records when not needed**: A route that returns a complete Patient object with all fields when the consumer only needs a subset (e.g., patient_id and status).
774
+
775
+ #### D. PHI/PII in URLs and Query Parameters (HIGH)
776
+
777
+ - **Patient data in query strings**: Routes that accept PHI as query parameters (e.g., `?name=John&dob=1990-01-01`). Query strings end up in access logs, browser history, and CDN logs. Only IDs should be in URLs.
778
+ - **PHI in path parameters**: Path params should only contain UUIDs or opaque identifiers, never names, emails, or other PHI.
779
+
780
+ #### E. PHI/PII in Development/Debug Code (MEDIUM)
781
+
782
+ - **Local development files**: Files like `local.py` or scripts that log full records for debugging but exist in the production codebase.
783
+ - **Commented-out debug logging**: Commented code that logs PHI — a developer might uncomment it and forget to remove it.
784
+ - **Print statements with PHI**: Any `print()` calls that output PHI (should use logger instead, but print output also goes to CloudWatch).
785
+
786
+ #### F. Missing Data Sanitization (LOW)
787
+
788
+ - **No redaction utilities**: Note if the codebase lacks any sanitization/redaction utilities for PHI fields. This is an architectural observation, not a per-route vulnerability.
789
+ - **PHI passed through multiple layers without scrubbing**: Trace data flow where PHI enters the system (e.g., from account-service or EHR) and check if it's ever inadvertently logged along the way.
790
+
791
+ ### Step 4: Report format
792
+
793
+ Each sub-agent should write findings in this format:
794
+
795
+ ```text
796
+ ## <package-name>
797
+
798
+ ### Files Scanned
799
+ - path/to/file.py
800
+ - path/to/other_file.py
801
+ ...
802
+
803
+ ### Findings
804
+
805
+ #### [CRITICAL] Full patient model logged — service.py:45
806
+ - **File**: path/to/file.py:45
807
+ - **Code**: `logger.info("Patient: ", extra={"patient": patient.model_dump_json()})`
808
+ - **Category**: PHI in log statements
809
+ - **PHI Fields Exposed**: first_name, last_name, date_of_birth, email, phone_number, address, mrn
810
+ - **Notes**: Logs the entire Patient FHIR resource including all demographics
811
+
812
+ #### [HIGH] PHI in error response — routes/patients.py:78
813
+ - **File**: path/to/file.py:78
814
+ - **Code**: `raise HTTPException(detail=f"Patient {patient.first_name} not found")`
815
+ - **Category**: PHI in error responses
816
+ - **PHI Fields Exposed**: first_name
817
+ - **Notes**: Patient name included in 404 error detail
818
+
819
+ ### No Issues Found
820
+ (list files that were scanned and passed all checks)
821
+ ```
822
+
823
+ Severity levels:
824
+ - **CRITICAL**: Full model dumps or FHIR resources in logs, multiple PHI fields exposed
825
+ - **HIGH**: Individual PHI fields in logs or error responses, PHI in URLs
826
+ - **MEDIUM**: Over-fetching in API responses, debug/dev code with PHI
827
+ - **LOW**: Architectural observations, missing sanitization utilities
828
+
829
+ ### Step 5: Aggregate
830
+
831
+ After all sub-agents complete, read each file from `/tmp/phi-exposure-scan-results/` and compile a final summary. To avoid context limits, read one file at a time and extract only the findings.
832
+
833
+ Write the final report to `/tmp/phi-exposure-scan-results/SUMMARY.md` with:
834
+
835
+ 1. **Executive Summary**: Total files scanned, total findings by severity (CRITICAL/HIGH/MEDIUM/LOW)
836
+ 2. **CRITICAL Findings**: All critical PHI exposure issues (immediate remediation needed)
837
+ 3. **HIGH Findings**: High-severity issues
838
+ 4. **MEDIUM Findings**: Medium-severity issues
839
+ 5. **LOW Findings & Observations**: Low-severity items and architectural notes
840
+ 6. **Clean Packages**: List of packages with no findings (names only)
841
+ 7. **Recommendations**: Actionable remediation steps, prioritized by severity
842
+
843
+ Then output the summary to the user.
844
+
845
+ Be thorough. Read the actual code — don't guess based on function names alone. When checking log statements, look at what the `extra` dict actually contains. When checking for model dumps, trace the model class to see what fields it includes. If a model only contains safe fields (IDs, timestamps, statuses), it's not a PHI exposure even if it's logged via `model_dump()`.b:["$","div","/Users/gabry/Desktop/platform-services/.claude/commands/phi-exposure-scan.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"phi-exposure-scan"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$18","previewLines":3}]]}]
846
+ 19:T1b86,# Upgrade litellm in llm-proxy-service
847
+
848
+ Upgrade the `litellm` dependency in `llm-proxy-service` to a new version, validating that all supported models have correct pricing.
849
+
850
+ ## Background
851
+
852
+ - `litellm` contains bundled pricing data in `model_prices_and_context_window.json`
853
+ - We disable litellm's automatic pricing fetch; we ONLY use the bundled pricing
854
+ - If the bundled pricing is wrong or missing for a model, litellm reports $0 cost, which breaks our cost reporting
855
+ - Overrides for incorrect pricing go in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py` via `litellm.register_model()`
856
+ - **IMPORTANT**: Both `llm-proxy-service` and `embedding-service` depend on `litellm`. Their versions must always match. When upgrading, update BOTH `platform-services/packages/llm_proxy_service/pyproject.toml` and `platform-services/packages/embedding_service/pyproject.toml`.
857
+
858
+ ## Step 1: Ask the user what version to upgrade to
859
+
860
+ First, read the current litellm version from `platform-services/packages/llm_proxy_service/pyproject.toml`. Then, fetch the latest available versions from PyPI:
861
+
862
+ ```bash
863
+ curl -s "https://pypi.org/pypi/litellm/json" | python3 -c "import sys,json; releases=sorted(json.load(sys.stdin)['releases'].keys(), key=lambda v: [int(x) for x in v.split('.')[:3] if x.isdigit()], reverse=True); print('\n'.join(releases[:5]))"
864
+ ```
865
+
866
+ Use AskUserQuestion to present the user with a selection of versions. Include the 3-4 most recent versions as options, labeling the latest one with "(Latest)". The user can also type a different version via the "Other" option. Mention the current version in the question text so the user knows what they're upgrading from.
867
+
868
+ ## Step 2: Identify all supported models
869
+
870
+ Read the `LLMModel` type definition in `platform-services/packages/bioscope_types/src/bioscope_types/services/llm_proxy_service.py` to get all supported models. Group them by provider:
871
+
872
+ - `bedrock/` models (Anthropic on AWS Bedrock)
873
+ - `anthropic/` models (direct Anthropic API)
874
+ - `vertex_ai/` models (Google Vertex AI)
875
+ - `azure/` models (Azure OpenAI)
876
+ - `groq/` models (Groq)
877
+ - etc.
878
+
879
+ Also read the current litellm version from `platform-services/packages/llm_proxy_service/pyproject.toml`.
880
+
881
+ Also read `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py` to identify any existing `litellm.register_model()` overrides.
882
+
883
+ ## Step 3: Create output directory and spin up sub-agents per provider
884
+
885
+ First, create an output directory using Bash: `mkdir -p /tmp/litellm-upgrade`
886
+
887
+ Then, for EACH provider (bedrock, anthropic, vertex_ai, azure, groq), spin up a sub-agent using the Task tool (subagent_type: "general-purpose"). Run all provider sub-agents **in parallel** (include all Task tool calls in a single message). **Do NOT run these in the background** — they need to be foreground agents so they can prompt for tool permissions.
888
+
889
+ Each sub-agent should:
890
+
891
+ 1. **Check pricing in the NEW version** of litellm for every model belonging to that provider. Use `uv run` to inspect the bundled pricing data:
892
+
893
+ ```bash
894
+ uv run --with litellm==<NEW_VERSION> python -c "import litellm, json; print(json.dumps(litellm.model_cost.get('<model_key>', {}), indent=2))"
895
+ ```
896
+
897
+ Note: The key in `litellm.model_cost` may not exactly match the model string in `LLMModel`. For example, `bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0` may be keyed as `us.anthropic.claude-sonnet-4-5-20250929-v1:0` or similar. If an exact match isn't found, search for partial matches:
898
+
899
+ ```bash
900
+ uv run --with litellm==<NEW_VERSION> python -c "import litellm; keys = [k for k in litellm.model_cost if '<partial_model_name>' in k]; print('\n'.join(sorted(keys)))"
901
+ ```
902
+
903
+ 2. **Fetch the provider's pricing page** (linked in the `LLMModel` comments) and compare the litellm pricing against the actual provider pricing. Key fields to validate:
904
+ - `input_cost_per_token`
905
+ - `output_cost_per_token`
906
+ - `cache_read_input_token_cost` (if applicable)
907
+ - `cache_creation_input_token_cost` (if applicable)
908
+
909
+ 3. **Also check the OLD (current) version** to see if any existing overrides can be removed because the new version has correct pricing:
910
+
911
+ ```bash
912
+ uv run --with litellm==<OLD_VERSION> python -c "import litellm, json; print(json.dumps(litellm.model_cost.get('<model_key>', {}), indent=2))"
913
+ ```
914
+
915
+ 4. **Write findings to a file** at `/tmp/litellm-upgrade/<provider>.md` with this format:
916
+
917
+ ```text
918
+ ## <provider> Models
919
+
920
+ ### <model_name>
921
+ - **Provider pricing page**: <url>
922
+ - **Expected input cost**: $X per 1M tokens
923
+ - **Expected output cost**: $X per 1M tokens
924
+ - **Expected cached input cost**: $X per 1M tokens (if applicable)
925
+ - **litellm (new version) input cost**: $X per 1M tokens
926
+ - **litellm (new version) output cost**: $X per 1M tokens
927
+ - **litellm (new version) cached input cost**: $X per 1M tokens
928
+ - **Status**: CORRECT / INCORRECT / MISSING
929
+ - **Override needed**: Yes (details) / No
930
+ ```
931
+
932
+ 5. **Return ONLY a single sentence** summarizing findings (e.g., "All 3 Anthropic models have correct pricing in the new version." or "2 of 5 Bedrock models have incorrect cached input pricing."). The full report is in the file — do NOT return it in the response.
933
+
934
+ **IMPORTANT:** When calling the Task tool for each sub-agent, explicitly instruct it to write findings to the file and return only a brief single-sentence confirmation. The full report must go in the file, NOT in the return message. This prevents the main agent's context from overflowing.
935
+
936
+ ## Step 4: Spin up a final evaluation sub-agent
937
+
938
+ After all provider sub-agents complete, spin up ONE final sub-agent (subagent_type: "general-purpose") that:
939
+
940
+ 1. Reads all files in `/tmp/litellm-upgrade/`
941
+ 2. Compiles a summary of which models need overrides and which are correct
942
+ 3. Writes a final report to `/tmp/litellm-upgrade/SUMMARY.md`
943
+ 4. Returns ONLY a single sentence summary (e.g., "3 models need pricing overrides, 15 are correct. See /tmp/litellm-upgrade/SUMMARY.md for details.")
944
+
945
+ Then read `/tmp/litellm-upgrade/SUMMARY.md` and present the findings to the user.
946
+
947
+ ## Step 5: Implement the upgrade
948
+
949
+ After presenting findings to the user and getting their approval:
950
+
951
+ 1. Update the litellm version in BOTH:
952
+ - `platform-services/packages/llm_proxy_service/pyproject.toml`
953
+ - `platform-services/packages/embedding_service/pyproject.toml`
954
+ 2. Add any needed `litellm.register_model()` overrides in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py`
955
+ 3. Remove any existing overrides that are no longer needed (because the new version has correct pricing)
956
+ 4. Run `uv sync --all-packages` from the `platform-services/` directory to update the lock file
957
+ 5. Run `pnpm exec nx run llm-proxy-service:test` to verify tests pass
958
+ 6. Run `pnpm exec nx run llm-proxy-service:lint` and `pnpm exec nx run llm-proxy-service:type-check`
959
+ 7. Run `pnpm exec nx run embedding-service:test`, `pnpm exec nx run embedding-service:lint`, and `pnpm exec nx run embedding-service:type-check`c:["$","div","/Users/gabry/Desktop/platform-services/.claude/commands/upgrade-litellm.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"upgrade-litellm"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$19","previewLines":3}]]}]
960
+ 1a:T368e,# Broken Access Control Scan
961
+
962
+ Scan ALL route handlers and Lambda handlers in platform-services for broken access control vulnerabilities beyond IDOR (which is covered by the separate `idor-scan` command).
963
+
964
+ ## How This Codebase Works
965
+
966
+ This is a FastAPI-based backend. Key facts:
967
+
968
+ - Routes live in `packages/*/src/*/routes/*.py`
969
+ - App setup files are at `packages/*/src/*/app.py`
970
+ - Lambda handlers are at `packages/*/src/*/handler.py`
971
+ - Service-specific middleware may be at `packages/*/src/*/middleware.py`
972
+ - Shared middleware is in `packages/shared_middleware/src/shared_middleware/`
973
+ - Most routes are behind an API Gateway account authorizer that validates the JWT and sets trusted headers: `Bioscope-Account-Id`, `Bioscope-User-Id`, `Bioscope-User-Role`, `Bioscope-Is-Demo-User`
974
+ - Some routes use a simpler JWT-only authorizer or no authorizer at all (public endpoints). The authorizer config lives in infrastructure and is not visible from this repo.
975
+
976
+ ### Standard Middleware Stack
977
+
978
+ Every FastAPI service should mount these middlewares in this order in `app.py`:
979
+
980
+ ```python
981
+ app = FastAPI(title="service-name", dependencies=[Depends(enforce_demo_read_only)])
982
+ app.add_middleware(WithExceptionLoggingMiddleware)
983
+ app.add_middleware(WithMetadataLoggingMiddleware)
984
+ app.add_middleware(WithLoggerMiddleware)
985
+ ```
986
+
987
+ And include routers via `app.include_router(...)`.
988
+
989
+ ### Role-Based Access Control
990
+
991
+ The codebase has a single role validation dependency:
992
+
993
+ - `require_owner_role` in `shared_middleware/role_validation.py` — checks `Bioscope-User-Role` header equals `"owner"`, raises 403 otherwise
994
+ - Used as `RequireOwnerRoleDeps = Annotated[None, Depends(require_owner_role)]`
995
+
996
+ Role is set by the API Gateway authorizer from the user's account membership record in DynamoDB.
997
+
998
+ ### Demo Mode
999
+
1000
+ - `enforce_demo_read_only` is applied as a global FastAPI dependency — blocks all non-GET/HEAD/OPTIONS requests for demo users
1001
+ - Routes can opt in to allow demo writes with the `@allow_demo_writes` decorator
1002
+
1003
+ ### Header Dependencies
1004
+
1005
+ Trusted headers are injected via these typed dependencies (from `shared_middleware/headers.py`):
1006
+
1007
+ - `BioscopeAccountIdHeaderDeps` — `Bioscope-Account-Id`
1008
+ - `BioscopeUserIdHeaderDeps` — `Bioscope-User-Id`
1009
+ - `BioscopeUserRoleHeaderDeps` — `Bioscope-User-Role`
1010
+ - `BioscopeCorrelationIdHeaderDeps` — `Bioscope-Correlation-Id`
1011
+ - `BioscopeInternalApiKeyHeaderDeps` — `Bioscope-Internal-Api-Key`
1012
+ - `BioscopeIsDemoUserHeaderDeps` — `Bioscope-Is-Demo-User`
1013
+
1014
+ ## Your Task
1015
+
1016
+ ### Step 1: Discover all services
1017
+
1018
+ Use glob to find:
1019
+ 1. All route files: `packages/*/src/*/routes/*.py`
1020
+ 2. All app files: `packages/*/src/*/app.py`
1021
+ 3. All handler files: `packages/*/src/*/handler.py`
1022
+ 4. All handler directories: `packages/*/src/*/handlers/*.py`
1023
+
1024
+ Group them by service. A service may have routes (FastAPI), handlers (Lambda), or both.
1025
+
1026
+ ### Step 2: Create an output directory and spin up sub-agents
1027
+
1028
+ First, create an output directory using Bash: `mkdir -p access-control-scan-results` (in the repo root directory).
1029
+
1030
+ Then, for **every service** (both route-based and handler-only), use the Task tool (subagent_type: "general-purpose") to scan that service.
1031
+
1032
+ #### Parallelism guidelines
1033
+
1034
+ **CRITICAL: Do NOT launch all agents at once.** This codebase has many services (typically 50+). Launching too many parallel agents causes resource contention, slow completions, and permission prompt overload.
1035
+
1036
+ Instead, process services in **batches of 5 agents at a time**:
1037
+
1038
+ 1. **Batch 1**: Launch 5 route-based service agents in parallel (in a single message with 5 Task tool calls). Run them in background (`run_in_background: true`).
1039
+ 2. **Wait**: After launching a batch, wait for all agents in the batch to complete before launching the next batch. Check completion by reading the output files or using TaskOutput.
1040
+ 3. **Batch 2**: Launch the next 5 route-based services.
1041
+ 4. **Continue**: Repeat until all route-based services are scanned, then do the same for handler-only services.
1042
+
1043
+ For **handler-only services**, you may group 3-5 related services into a single agent (e.g., all `*_event_consumer` services in one agent) since they are simpler to scan. This reduces the total number of agents needed. Each grouped agent should write **separate report files** for each service it scans.
1044
+
1045
+ #### What each sub-agent should do
1046
+
1047
+ **For services with route files**, each sub-agent should:
1048
+ 1. Read ALL route files for that service
1049
+ 2. Read the service's `app.py` to check middleware mounting and global dependencies
1050
+ 3. Read any service-specific `middleware.py` if it exists
1051
+ 4. For each route handler, check for the vulnerabilities listed in Step 3
1052
+ 5. **Write the report to a file** at `access-control-scan-results/<service-name>.md` (relative to the repo root) using the format in Step 4
1053
+ 6. **Return ONLY a one-line confirmation** (e.g., "Wrote report to access-control-scan-results/chat_service.md. 2 findings."). Do NOT return the full report — it's in the file.
1054
+
1055
+ **For handler-only services** (no route files, only `handler.py` and optionally `handlers/*.py`), each sub-agent should:
1056
+ 1. Read the service's `handler.py` and all files in `handlers/` if present
1057
+ 2. For each Lambda handler (decorated with `@handler.sqs`, `@handler.sns`, `@handler.direct_invocation`, `@handler.event_bridge`, `@handler.authorizer`), check for the vulnerabilities listed in Step 3 section E
1058
+ 3. **Write the report to a file** at `access-control-scan-results/<service-name>.md` (relative to the repo root) using the format in Step 4
1059
+ 4. **Return ONLY a one-line confirmation**
1060
+
1061
+ **IMPORTANT:** When calling the Task tool for each sub-agent, explicitly instruct it to write findings to the file and return only a brief one-line confirmation. The full report must go in the file, NOT in the return message. This prevents the main agent's context from overflowing.
1062
+
1063
+ ### Step 3: What to check per service and route
1064
+
1065
+ #### A. Middleware and App-Level Checks
1066
+
1067
+ For each service's `app.py`, verify:
1068
+
1069
+ - **Missing standard middleware**: The app MUST mount all three middlewares (`WithExceptionLoggingMiddleware`, `WithMetadataLoggingMiddleware`, `WithLoggerMiddleware`). Flag any that are missing.
1070
+ - **Missing demo mode enforcement**: The app MUST have `dependencies=[Depends(enforce_demo_read_only)]` on the `FastAPI()` constructor. Flag if missing.
1071
+ - **Non-standard middleware ordering**: Middlewares execute in reverse order of addition (LIFO). `WithLoggerMiddleware` must be added last so it executes first. Flag incorrect ordering.
1072
+ - **Routes mounted outside the app**: Check if any route files exist that are NOT included via `app.include_router(...)`. These routes would bypass all app-level middleware and dependencies.
1073
+
1074
+ #### B. Role-Based Access Control Checks
1075
+
1076
+ For each route handler, check:
1077
+
1078
+ - **Sensitive mutations without role checks**: Routes that perform destructive or admin-level operations (DELETE endpoints, account settings changes, user management, billing operations) should use `RequireOwnerRoleDeps` or `Depends(require_owner_role)`. Flag mutation endpoints that handle sensitive operations without any role check. Use your judgment — not every POST/PATCH/DELETE needs a role check, but operations like deleting accounts, managing users, or changing account settings do.
1079
+ - **Role from untrusted source**: Any route that reads a role from path params, query params, or request body instead of the `Bioscope-User-Role` header. The role MUST come from the trusted header dependency.
1080
+
1081
+ #### C. Authentication/Authorization Gaps
1082
+
1083
+ For each route handler, check:
1084
+
1085
+ - **Missing identity headers**: Routes that perform any data access or mutation but do NOT inject `BioscopeAccountIdHeaderDeps` or `BioscopeUserIdHeaderDeps`. Every non-public route should use at least the account ID header to scope its operations.
1086
+ - **Hardcoded or default account/user IDs**: Any route that uses a hardcoded UUID or default value for account_id or user_id instead of extracting from headers.
1087
+ - **Internal API key routes without validation**: Routes that accept `BioscopeInternalApiKeyHeaderDeps` should validate the key value against an expected secret, not just check that the header is present.
1088
+
1089
+ #### D. Demo Mode Bypass
1090
+
1091
+ - **Mutation routes with @allow_demo_writes that shouldn't have it**: The `@allow_demo_writes` decorator should only be on routes where demo users legitimately need write access (e.g., creating a chat for a demo walkthrough). Flag any destructive operations (DELETE, account mutations) that have this decorator.
1092
+
1093
+ #### E. Lambda Handler Checks (for handler-only and hybrid services)
1094
+
1095
+ Lambda handlers (`@handler.sqs`, `@handler.sns`, `@handler.direct_invocation`, `@handler.event_bridge`) are internal-facing and trust their event sources by design (IAM policies and queue/topic access policies control who can invoke them). The checks below focus on risks that remain even within that trust model.
1096
+
1097
+ For each Lambda handler, check:
1098
+
1099
+ - **Unscoped destructive operations**: Direct invocation or event-driven handlers that perform bulk deletes, account mutations, or data purges without scoping to a specific `account_id` or `patient_id` from the event payload. A handler that deletes "all matching records" rather than scoping by the account/patient in the event is dangerous if it ever receives malformed input.
1100
+ - **Missing account/patient scoping on queries**: Handlers that query DynamoDB or other data stores without filtering by `account_id` or `patient_id` when the event payload contains those identifiers. The handler should use the event's IDs to scope its operations, not fetch all records globally.
1101
+ - **Sensitive operations in direct invocation handlers without caller context**: Direct invocation handlers that perform admin-level operations (creating users, modifying account settings, issuing credentials) should accept and log a `correlation_id` or caller identifier for audit trail. Flag handlers that perform sensitive mutations with no traceability to the original caller.
1102
+ - **Event payload used to construct external requests without validation**: Handlers that take URLs, email addresses, or external identifiers from event payloads and pass them directly to external services (HTTP calls, email sends, S3 operations). Validate that the handler sanitizes or validates these inputs rather than blindly trusting them.
1103
+ - **Internal API key routes without key validation**: Any HTTP route (in hybrid services that have both routes and handlers) that accepts `BioscopeInternalApiKeyHeaderDeps` should validate the key value against an expected secret, not just check that the header is present.
1104
+
1105
+ **Important context for sub-agents**: Do NOT flag handler-level findings for the following, as these are expected patterns:
1106
+ - Direct invocation handlers that don't have API Gateway-style JWT authorization — they're internal Lambda-to-Lambda calls secured by IAM
1107
+ - SQS/SNS handlers that trust `account_id` or `patient_id` from the event body — the event source is trusted
1108
+ - Handlers that don't inject `BioscopeAccountIdHeaderDeps` — header dependencies are for HTTP routes only, not Lambda handlers
1109
+
1110
+ ### Step 4: Report format
1111
+
1112
+ Each sub-agent should write findings in this format:
1113
+
1114
+ **For services with routes (FastAPI):**
1115
+
1116
+ ```text
1117
+ ## <service-name>
1118
+
1119
+ ### App-Level Configuration
1120
+ - **Middleware**: [All present / Missing: <list>]
1121
+ - **Demo mode**: [Enforced / MISSING]
1122
+ - **Middleware order**: [Correct / INCORRECT: <details>]
1123
+ - **Unmounted routes**: [None / <list>]
1124
+
1125
+ ### Routes Scanned
1126
+ - `GET /path` — handler_name (file:line)
1127
+ - `POST /path` — handler_name (file:line)
1128
+ ...
1129
+
1130
+ ### Findings
1131
+
1132
+ #### Missing role check on sensitive mutation — `DELETE /resource/{id}`
1133
+ - **File**: path/to/file.py:123
1134
+ - **Handler**: `delete_resource`
1135
+ - **Issue**: Destructive operation with no role validation
1136
+ - **Confidence**: High / Medium / Low
1137
+ - **Notes**: <any relevant context>
1138
+
1139
+ #### Missing identity headers — `GET /resource`
1140
+ ...
1141
+
1142
+ ### No Issues Found
1143
+ (list routes that were scanned and passed all checks)
1144
+ ```
1145
+
1146
+ **For handler-only services (Lambda):**
1147
+
1148
+ ```text
1149
+ ## <service-name>
1150
+
1151
+ ### Handlers Scanned
1152
+ - `@handler.sqs(queue_name="queue-name")` — handler_function (file:line)
1153
+ - `@handler.direct_invocation()` — handler_function (file:line)
1154
+ - `@handler.event_bridge()` — handler_function (file:line)
1155
+ ...
1156
+
1157
+ ### Findings
1158
+
1159
+ #### Unscoped destructive operation — handle_delete_event
1160
+ - **File**: path/to/handler.py:45
1161
+ - **Handler**: `handle_delete_event`
1162
+ - **Decorator**: `@handler.sqs(queue_name="...")`
1163
+ - **Issue**: Deletes records without scoping to account_id from event payload
1164
+ - **Confidence**: High / Medium / Low
1165
+ - **Notes**: <any relevant context>
1166
+
1167
+ ### No Issues Found
1168
+ (list handlers that were scanned and passed all checks)
1169
+ ```
1170
+
1171
+ ### Step 5: Aggregate
1172
+
1173
+ After all sub-agents complete, read each file from `access-control-scan-results/` and compile a final summary. To avoid context limits, read one file at a time and extract only the findings (skip the "No Issues Found" and "Routes Scanned" sections for clean services).
1174
+
1175
+ Write the final report to `access-control-scan-results/SUMMARY.md` with:
1176
+
1177
+ 1. **Executive Summary**: Total services scanned (route-based + handler-only), total routes/handlers scanned, total findings by category
1178
+ 2. **App-Level Issues**: Any services with middleware or configuration problems
1179
+ 3. **Route-Level Findings**: All access control vulnerabilities in FastAPI routes, grouped by type
1180
+ 4. **Handler-Level Findings**: All access control vulnerabilities in Lambda handlers, grouped by type
1181
+ 5. **Clean Services**: List of services with no findings (names only)
1182
+ 6. **Per-Service Details**: Full findings for services that had issues
1183
+
1184
+ Then output the summary to the user.
1185
+
1186
+ Be thorough. Read the actual code — don't guess based on function names alone. When checking for role validation, trace the full dependency chain. If a role check happens in a called function or middleware rather than at the route level, note it but don't flag it as a vulnerability.d:["$","div","/Users/gabry/Desktop/ps-copy/platform-services/.claude/commands/access-control-scan.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"access-control-scan"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$1a","previewLines":3}]]}]
1187
+ 1b:Tf1d,# Add a New Model to llm-proxy-service
1188
+
1189
+ Add a new LLM model to `llm-proxy-service`, ensuring accurate cost reporting.
1190
+
1191
+ ## Background
1192
+
1193
+ - `litellm` contains bundled pricing data in `model_prices_and_context_window.json`
1194
+ - We disable litellm's automatic pricing fetch; we ONLY use the bundled pricing
1195
+ - If the bundled pricing is wrong or missing for a model, litellm reports $0 cost, which breaks our cost reporting
1196
+ - Overrides for incorrect pricing go in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py` via `litellm.register_model()`
1197
+ - **IMPORTANT**: Both `llm-proxy-service` and `embedding-service` depend on `litellm`. Their versions must always match. If this skill requires upgrading litellm, update BOTH packages.
1198
+
1199
+ ## Step 1: Gather information
1200
+
1201
+ Ask the user:
1202
+
1203
+ 1. What model do they want to add? (e.g., `anthropic/claude-opus-4-5-20251101`)
1204
+ 2. What is the provider's pricing page URL for this model?
1205
+
1206
+ ## Step 2: Determine the current litellm version
1207
+
1208
+ Read `platform-services/packages/llm_proxy_service/pyproject.toml` to find the currently-used litellm version.
1209
+
1210
+ ## Step 3: Validate pricing in the current litellm version
1211
+
1212
+ Use `uv run` to check if the model has correct pricing in the bundled litellm data:
1213
+
1214
+ ```bash
1215
+ uv run --with litellm==<CURRENT_VERSION> python -c "import litellm, json; print(json.dumps(litellm.model_cost.get('<model_key>', {}), indent=2))"
1216
+ ```
1217
+
1218
+ Note: The key in `litellm.model_cost` may not exactly match the model string. If an exact match isn't found, search for partial matches:
1219
+
1220
+ ```bash
1221
+ uv run --with litellm==<CURRENT_VERSION> python -c "import litellm; keys = [k for k in litellm.model_cost if '<partial_model_name>' in k]; print('\n'.join(sorted(keys)))"
1222
+ ```
1223
+
1224
+ Fetch the provider's pricing page and compare against the litellm pricing. Validate ALL of these fields:
1225
+
1226
+ - `input_cost_per_token`
1227
+ - `output_cost_per_token`
1228
+ - `cache_read_input_token_cost` (if applicable)
1229
+ - `cache_creation_input_token_cost` (if applicable)
1230
+
1231
+ Present the comparison to the user.
1232
+
1233
+ ## Step 4: Add the model
1234
+
1235
+ ### 4a. Add to LLMModel type
1236
+
1237
+ Add the model string to the `LLMModel` Literal type in `platform-services/packages/bioscope_types/src/bioscope_types/services/llm_proxy_service.py`.
1238
+
1239
+ - Place it in the correct provider group (bedrock, anthropic, vertex_ai, azure, groq)
1240
+ - Ensure the provider group has a comment linking to the pricing page (add one if it's a new provider)
1241
+
1242
+ ### 4b. Add pricing override (if needed)
1243
+
1244
+ If the pricing is incorrect or missing in litellm, add an override in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py`:
1245
+
1246
+ ```python
1247
+ litellm.register_model(
1248
+ {
1249
+ "<model_key>": {
1250
+ "input_cost_per_token": <value>, # $X per 1M tokens
1251
+ "output_cost_per_token": <value>, # $X per 1M tokens
1252
+ "cache_read_input_token_cost": <value>, # $X per 1M tokens (if applicable)
1253
+ "cache_creation_input_token_cost": <value>, # $X per 1M tokens (if applicable)
1254
+ "litellm_provider": "<provider>",
1255
+ "max_input_tokens": <value>,
1256
+ "max_output_tokens": <value>,
1257
+ "mode": "chat",
1258
+ }
1259
+ }
1260
+ )
1261
+ ```
1262
+
1263
+ Include inline comments showing the human-readable cost (e.g., `# $3.00 per 1M tokens`).
1264
+
1265
+ ### 4c. Add to health check warmup (if needed)
1266
+
1267
+ If the model requires additional env vars (vertex_ai, groq, or anthropic models), consider adding a `set_additional_env_vars()` call in the health check in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/handler.py`. Only one model per provider prefix is needed for warmup.
1268
+
1269
+ ## Step 5: Validate
1270
+
1271
+ 1. Run `pnpm exec nx run bioscope-types:type-check` to verify the type is valid
1272
+ 2. Run `pnpm exec nx run llm-proxy-service:test` to verify tests pass
1273
+ 3. Run `pnpm exec nx run llm-proxy-service:lint` and `pnpm exec nx run llm-proxy-service:type-check`e:["$","div","/Users/gabry/Desktop/ps-copy/platform-services/.claude/commands/add-llm-proxy-service-model.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"add-llm-proxy-service-model"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$1b","previewLines":3}]]}]
1274
+ 1c:T1c43,# IDOR & Authorization Vulnerability Scan
1275
+
1276
+ Scan ALL route handlers in platform-services for IDOR (Insecure Direct Object Reference) and authorization vulnerabilities.
1277
+
1278
+ ## How This Codebase Works
1279
+
1280
+ This is a FastAPI-based backend. Key facts:
1281
+
1282
+ - Routes *should* live in `packages/*/src/*/routes/*.py` (flag any routes that do not)
1283
+ - App setup files are at `packages/*/src/*/app.py`
1284
+ - Service-specific middleware may be at `packages/*/src/*/middleware.py`
1285
+ - Shared middleware is in `packages/shared_middleware/src/shared_middleware/`
1286
+ - Most routes are behind an API Gateway account authorizer that validates the JWT and verifies the user is a member of the account in the `Bioscope-Account-Id` header. For these routes, `account_id`, `user_id`, and `user_role` from headers can be trusted.
1287
+ - Some routes use a simpler JWT-only authorizer (e.g. `/accounts/me`, `/users/me`) or no authorizer at all (public endpoints). The authorizer config lives in infrastructure and is not visible from this repo, so don't make assumptions about which authorizer a given route uses — just focus on whether the route handler code itself properly validates ownership.
1288
+ - With the above two bullets in mind, `account_id`, `user_id`, and `user_role` can ONLY come from these headers and can NEVER come from path params, query params, request body, etc.
1289
+
1290
+ ### Auth/Authorization Patterns in Route Handlers
1291
+
1292
+ **Patient validation (cross-service ownership check):**
1293
+ Routes with `{patient_id}` in the path MUST use `Depends(validate_patient_account_from_path_as_patient)` (or the factory `get_validate_patient_account`). This calls account-service to verify the patient belongs to the requesting account. A route that takes a patient_id without this dependency is an IDOR unless the route is checking the patient belongs to the account in its internal implementation.
1294
+
1295
+ **Inline account ownership checks:**
1296
+ For non-patient resources (orders, EHR connections, etc.), routes typically fetch the resource and then check `if resource.account_id != account_id`. Missing this check on a resource lookup by ID is a potential IDOR.
1297
+
1298
+ ## Your Task
1299
+
1300
+ ### Step 1: Discover all services with routes
1301
+
1302
+ Use glob to find all route files matching `packages/*/src/*/routes/*.py`. Group them by service. Also check for any routes that aren't under a `routes` directory and flag them.
1303
+
1304
+ ### Step 2: Create an output directory and spin up sub-agents
1305
+
1306
+ First, create an output directory using Bash: `mkdir -p /tmp/idor-scan-results`
1307
+
1308
+ Then, for each service, use the Task tool (subagent_type: "general-purpose") to scan that service's routes. Run these in parallel (include all Task tool calls in a single message). Each sub-agent should:
1309
+
1310
+ 1. Read ALL route files for that service
1311
+ 2. Read the service's `app.py` to check what global dependencies/middleware are applied
1312
+ 3. Read any service-specific `middleware.py` if it exists
1313
+ 4. For each route handler, check for the vulnerabilities listed in Step 3
1314
+ 5. **Write the report to a file** at `/tmp/idor-scan-results/<service-name>.md` using the format in Step 4
1315
+ 6. **Return ONLY a one-line confirmation** (e.g., "Wrote report to /tmp/idor-scan-results/chat_service.md. 2 findings."). Do NOT return the full report — it's in the file.
1316
+
1317
+ **IMPORTANT:** When calling the Task tool for each sub-agent, explicitly instruct it to write findings to the file and return only a brief one-line confirmation. The full report must go in the file, NOT in the return message. This prevents the main agent's context from overflowing.
1318
+
1319
+ ### Step 3: What to check per route
1320
+
1321
+ For every route handler function, check for these IDOR vulnerabilities:
1322
+
1323
+ - **Missing patient validation**: Route path contains `{patient_id}` but handler does NOT use `Depends(validate_patient_account_from_path_as_patient)` or equivalent
1324
+ - **Patient dependency result discarded**: Route uses `validate_patient_account_from_path_as_patient` but assigns the result to `_` instead of `patient`. The presence of the dependency alone is NOT sufficient — if the route also takes a sub-resource ID (e.g., `{chat_id}`, `{file_id}`, `{order_id}`), the validated `patient.patient_id` MUST be passed to the service layer and checked against the fetched resource's `patient_id`. A discarded `_` is a strong signal that this check is missing. Trace the full call chain to verify.
1325
+ - **Missing resource-to-account ownership**: Route takes a resource ID as a path/query/body param, fetches the resource, but does NOT verify `resource.account_id == account_id` before returning or mutating it
1326
+ - **Missing resource-to-patient ownership**: Route takes both a `{patient_id}` and another resource ID, fetches the resource, but does NOT verify `resource.patient_id == patient_id`. This applies even if the patient validation dependency is present — the dependency only confirms the patient belongs to the account, NOT that the sub-resource belongs to the patient. You must trace into the service layer to verify this check exists.
1327
+ - **Unscoped list/query endpoints**: Route returns a collection of resources (list/search/query) but the underlying query does NOT filter by `account_id` (or `patient_id` where applicable). Follow the call chain into the repository/data access layer to verify the query includes the appropriate scope filter.
1328
+ - **Using account, user, or user role not from header**: Route uses account id, user id, or user role from query param, path param, or request body and not from the trusted `Bioscope-Account-Id`, `Bioscope-User-Id`, and `Bioscope-User-Role` headers.
1329
+
1330
+ ### Step 4: Compile the report
1331
+
1332
+ Each sub-agent should return its findings in this format:
1333
+
1334
+ ```text
1335
+ ## <service-name>
1336
+
1337
+ ### Routes Scanned
1338
+ - `GET /path` — handler_name (file:line)
1339
+ - `POST /path` — handler_name (file:line)
1340
+ ...
1341
+
1342
+ ### Findings
1343
+
1344
+ #### Missing patient validation — `POST /patients/{patient_id}/resource`
1345
+ - **File**: path/to/file.py:123
1346
+ - **Handler**: `create_resource`
1347
+ - **Issue**: Route includes `{patient_id}` in path but does not use `validate_patient_account_from_path_as_patient`
1348
+ - **Confidence**: High / Medium / Low
1349
+ - **Notes**: <any relevant context>
1350
+
1351
+ #### Missing ownership check — `GET /resource/{resource_id}`
1352
+ ...
1353
+
1354
+ ### No Issues Found
1355
+ (list routes that were scanned and passed all checks)
1356
+ ```
1357
+
1358
+ ### Step 5: Aggregate
1359
+
1360
+ After all sub-agents complete, read each file from `/tmp/idor-scan-results/` and compile a final summary. To avoid context limits, read one file at a time and extract only the findings (skip the "No Issues Found" and "Routes Scanned" sections for clean services).
1361
+
1362
+ Write the final report to `/tmp/idor-scan-results/SUMMARY.md` with:
1363
+
1364
+ 1. **Executive Summary**: Total routes scanned, total findings
1365
+ 2. **Findings**: All IDOR vulnerabilities grouped by type
1366
+ 3. **Clean Services**: List of services with no findings (names only)
1367
+ 4. **Per-Service Details**: Full findings for services that had issues
1368
+
1369
+ Then output the summary to the user.
1370
+
1371
+ Be thorough. Read the actual code — don't guess based on function names alone. When in doubt about whether a check exists, read the called functions to see if ownership validation happens deeper in the call chain. If validation happens in a called function rather than at the route level, note it but don't flag it as a vulnerability.f:["$","div","/Users/gabry/Desktop/ps-copy/platform-services/.claude/commands/idor-scan.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"idor-scan"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$1c","previewLines":3}]]}]
1372
+ 1d:T2543,# PHI/PII Data Exposure Scan
1373
+
1374
+ Scan ALL application code in platform-services for Protected Health Information (PHI) and Personally Identifiable Information (PII) exposure vulnerabilities. This covers logging, error responses, API over-fetching, and any other channel where sensitive data could leak.
1375
+
1376
+ ## What Constitutes PHI/PII in This Codebase
1377
+
1378
+ ### Patient PHI Fields (from `bioscope_types/dynamodb/patients.py`)
1379
+ - `first_name`, `last_name` (names)
1380
+ - `date_of_birth` (DOB)
1381
+ - `sex`
1382
+ - `mrn` (medical record number)
1383
+ - `address_line_1`, `address_line_2`, `city`, `state`, `zip_code`, `country` (address)
1384
+ - `phone_number`
1385
+ - `email`
1386
+
1387
+ ### User PII Fields (from `bioscope_types/dynamodb/users.py`)
1388
+ - `first_name`, `last_name`
1389
+ - `email`
1390
+ - `npi_number` (healthcare provider identifier)
1391
+
1392
+ ### Account PII Fields (from `bioscope_types/dynamodb/accounts.py`)
1393
+ - Address fields: `address_line_1`, `address_line_2`, `city`, `state`, `zip_code`, `country`
1394
+
1395
+ ### Other PHI Sources
1396
+ - FHIR resources (contain full patient demographics, diagnoses, medical history)
1397
+ - EHR data (clinical records, lab results, immunizations)
1398
+ - Genomic/WGS data and results
1399
+ - Chat messages about patients (may contain clinical discussions)
1400
+ - File contents (uploaded documents, lab reports)
1401
+
1402
+ ### Safe to Log
1403
+ - UUIDs (patient_id, account_id, user_id, order_id, etc.)
1404
+ - Timestamps
1405
+ - Status values and enums
1406
+ - Counts and metrics
1407
+ - Operation names and types
1408
+ - File IDs (not file contents or names that might contain patient info)
1409
+
1410
+ ## How Logging Works
1411
+
1412
+ - `BioscopeLogger` (from `bioscope_logger` package) is the standard logger
1413
+ - Uses Python's `logging.LoggerAdapter` with JSON formatting
1414
+ - Supports `.child()` for adding context fields
1415
+ - Extra fields passed via `extra={}` parameter are serialized into the JSON log output
1416
+ - Logs go to stdout and optionally CloudWatch — all log output is persisted
1417
+ - `BioscopeLoggerDeps` injects the logger into FastAPI routes
1418
+ - Lambda handlers receive `logger: BioscopeLogger` via dependency injection
1419
+
1420
+ ## Your Task
1421
+
1422
+ ### Step 1: Discover all scannable code
1423
+
1424
+ Use glob to find:
1425
+ 1. All route files: `packages/*/src/*/routes/*.py`
1426
+ 2. All handler files: `packages/*/src/*/handler.py`
1427
+ 3. All handlers directories: `packages/*/src/*/handlers/*.py`
1428
+ 4. All service/business logic files: `packages/*/src/*/*.py` (excluding `__init__.py`, `aws.py`, `app.py`)
1429
+ 5. Any standalone scripts or local dev files: `packages/*/src/*/local.py`
1430
+
1431
+ Group them by service/package.
1432
+
1433
+ ### Step 2: Create an output directory and spin up sub-agents
1434
+
1435
+ First, create an output directory using Bash: `mkdir -p /tmp/phi-exposure-scan-results`
1436
+
1437
+ Then, for each service/package, use the Task tool (subagent_type: "general-purpose") to scan that package's code. Run these in parallel (include all Task tool calls in a single message). Each sub-agent should:
1438
+
1439
+ 1. Read ALL Python source files for that package (routes, handlers, service modules, utilities)
1440
+ 2. Check for every vulnerability type listed in Step 3
1441
+ 3. **Write the report to a file** at `/tmp/phi-exposure-scan-results/<package-name>.md` using the format in Step 4
1442
+ 4. **Return ONLY a one-line confirmation** (e.g., "Wrote report to /tmp/phi-exposure-scan-results/chat_service.md. 3 findings."). Do NOT return the full report — it's in the file.
1443
+
1444
+ **IMPORTANT:** When calling the Task tool for each sub-agent, include the full list of PHI/PII fields from the "What Constitutes PHI/PII" section above so the sub-agent knows exactly what to look for. Instruct it to write findings to the file and return only a brief one-line confirmation. The full report must go in the file, NOT in the return message.
1445
+
1446
+ ### Step 3: What to check
1447
+
1448
+ #### A. PHI/PII in Log Statements (CRITICAL)
1449
+
1450
+ Search for all `logger.info`, `logger.warning`, `logger.error`, `logger.debug`, `logger.exception`, and `logger.critical` calls. For each, check:
1451
+
1452
+ - **Full model dumps in logs**: Calls like `logger.info("...", extra={"patient": patient.model_dump()})` or `model_dump_json()` that serialize an entire Pydantic model containing PHI fields. This includes Patient, User, Account, or any FHIR resource model.
1453
+ - **PHI field values in log messages**: Direct references to PHI fields in log strings or extra dicts, e.g., `extra={"name": patient.first_name}`, `extra={"email": user.email}`, `extra={"dob": patient.date_of_birth}`.
1454
+ - **F-string or format-string PHI**: Log messages that interpolate PHI values, e.g., `logger.info(f"Created patient {patient.first_name} {patient.last_name}")`.
1455
+ - **Logging raw request/response bodies**: Logging full HTTP request bodies or response payloads that may contain PHI, e.g., `logger.info("Request", extra={"body": request.body()})`.
1456
+ - **Logging full event payloads**: SQS/SNS/EventBridge event payloads logged in full when they may contain PHI fields.
1457
+ - **Logging FHIR resources**: Any FHIR Bundle, Patient, Observation, Immunization, or other clinical resource logged in full.
1458
+
1459
+ #### B. PHI/PII in Error Responses (HIGH)
1460
+
1461
+ Check all `HTTPException` raises and error response construction:
1462
+
1463
+ - **PHI in HTTPException detail**: `raise HTTPException(status_code=..., detail=f"Patient {patient.first_name} not found")` — the detail message should never contain PHI, only IDs or generic messages.
1464
+ - **PHI in custom error response models**: Any error response class that includes PHI fields.
1465
+ - **Full exception messages with PHI**: Exception handlers that return `str(e)` where the exception message might contain PHI from a database query or validation error.
1466
+
1467
+ #### C. PHI/PII in API Response Over-Fetching (MEDIUM)
1468
+
1469
+ Check route return values and response models:
1470
+
1471
+ - **Returning full patient/user records when not needed**: A route that returns a complete Patient object with all fields when the consumer only needs a subset (e.g., patient_id and status).
1472
+
1473
+ #### D. PHI/PII in URLs and Query Parameters (HIGH)
1474
+
1475
+ - **Patient data in query strings**: Routes that accept PHI as query parameters (e.g., `?name=John&dob=1990-01-01`). Query strings end up in access logs, browser history, and CDN logs. Only IDs should be in URLs.
1476
+ - **PHI in path parameters**: Path params should only contain UUIDs or opaque identifiers, never names, emails, or other PHI.
1477
+
1478
+ #### E. PHI/PII in Development/Debug Code (MEDIUM)
1479
+
1480
+ - **Local development files**: Files like `local.py` or scripts that log full records for debugging but exist in the production codebase.
1481
+ - **Commented-out debug logging**: Commented code that logs PHI — a developer might uncomment it and forget to remove it.
1482
+ - **Print statements with PHI**: Any `print()` calls that output PHI (should use logger instead, but print output also goes to CloudWatch).
1483
+
1484
+ #### F. Missing Data Sanitization (LOW)
1485
+
1486
+ - **No redaction utilities**: Note if the codebase lacks any sanitization/redaction utilities for PHI fields. This is an architectural observation, not a per-route vulnerability.
1487
+ - **PHI passed through multiple layers without scrubbing**: Trace data flow where PHI enters the system (e.g., from account-service or EHR) and check if it's ever inadvertently logged along the way.
1488
+
1489
+ ### Step 4: Report format
1490
+
1491
+ Each sub-agent should write findings in this format:
1492
+
1493
+ ```text
1494
+ ## <package-name>
1495
+
1496
+ ### Files Scanned
1497
+ - path/to/file.py
1498
+ - path/to/other_file.py
1499
+ ...
1500
+
1501
+ ### Findings
1502
+
1503
+ #### [CRITICAL] Full patient model logged — service.py:45
1504
+ - **File**: path/to/file.py:45
1505
+ - **Code**: `logger.info("Patient: ", extra={"patient": patient.model_dump_json()})`
1506
+ - **Category**: PHI in log statements
1507
+ - **PHI Fields Exposed**: first_name, last_name, date_of_birth, email, phone_number, address, mrn
1508
+ - **Notes**: Logs the entire Patient FHIR resource including all demographics
1509
+
1510
+ #### [HIGH] PHI in error response — routes/patients.py:78
1511
+ - **File**: path/to/file.py:78
1512
+ - **Code**: `raise HTTPException(detail=f"Patient {patient.first_name} not found")`
1513
+ - **Category**: PHI in error responses
1514
+ - **PHI Fields Exposed**: first_name
1515
+ - **Notes**: Patient name included in 404 error detail
1516
+
1517
+ ### No Issues Found
1518
+ (list files that were scanned and passed all checks)
1519
+ ```
1520
+
1521
+ Severity levels:
1522
+ - **CRITICAL**: Full model dumps or FHIR resources in logs, multiple PHI fields exposed
1523
+ - **HIGH**: Individual PHI fields in logs or error responses, PHI in URLs
1524
+ - **MEDIUM**: Over-fetching in API responses, debug/dev code with PHI
1525
+ - **LOW**: Architectural observations, missing sanitization utilities
1526
+
1527
+ ### Step 5: Aggregate
1528
+
1529
+ After all sub-agents complete, read each file from `/tmp/phi-exposure-scan-results/` and compile a final summary. To avoid context limits, read one file at a time and extract only the findings.
1530
+
1531
+ Write the final report to `/tmp/phi-exposure-scan-results/SUMMARY.md` with:
1532
+
1533
+ 1. **Executive Summary**: Total files scanned, total findings by severity (CRITICAL/HIGH/MEDIUM/LOW)
1534
+ 2. **CRITICAL Findings**: All critical PHI exposure issues (immediate remediation needed)
1535
+ 3. **HIGH Findings**: High-severity issues
1536
+ 4. **MEDIUM Findings**: Medium-severity issues
1537
+ 5. **LOW Findings & Observations**: Low-severity items and architectural notes
1538
+ 6. **Clean Packages**: List of packages with no findings (names only)
1539
+ 7. **Recommendations**: Actionable remediation steps, prioritized by severity
1540
+
1541
+ Then output the summary to the user.
1542
+
1543
+ Be thorough. Read the actual code — don't guess based on function names alone. When checking log statements, look at what the `extra` dict actually contains. When checking for model dumps, trace the model class to see what fields it includes. If a model only contains safe fields (IDs, timestamps, statuses), it's not a PHI exposure even if it's logged via `model_dump()`.10:["$","div","/Users/gabry/Desktop/ps-copy/platform-services/.claude/commands/phi-exposure-scan.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"phi-exposure-scan"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$1d","previewLines":3}]]}]
1544
+ 1e:T1b86,# Upgrade litellm in llm-proxy-service
1545
+
1546
+ Upgrade the `litellm` dependency in `llm-proxy-service` to a new version, validating that all supported models have correct pricing.
1547
+
1548
+ ## Background
1549
+
1550
+ - `litellm` contains bundled pricing data in `model_prices_and_context_window.json`
1551
+ - We disable litellm's automatic pricing fetch; we ONLY use the bundled pricing
1552
+ - If the bundled pricing is wrong or missing for a model, litellm reports $0 cost, which breaks our cost reporting
1553
+ - Overrides for incorrect pricing go in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py` via `litellm.register_model()`
1554
+ - **IMPORTANT**: Both `llm-proxy-service` and `embedding-service` depend on `litellm`. Their versions must always match. When upgrading, update BOTH `platform-services/packages/llm_proxy_service/pyproject.toml` and `platform-services/packages/embedding_service/pyproject.toml`.
1555
+
1556
+ ## Step 1: Ask the user what version to upgrade to
1557
+
1558
+ First, read the current litellm version from `platform-services/packages/llm_proxy_service/pyproject.toml`. Then, fetch the latest available versions from PyPI:
1559
+
1560
+ ```bash
1561
+ curl -s "https://pypi.org/pypi/litellm/json" | python3 -c "import sys,json; releases=sorted(json.load(sys.stdin)['releases'].keys(), key=lambda v: [int(x) for x in v.split('.')[:3] if x.isdigit()], reverse=True); print('\n'.join(releases[:5]))"
1562
+ ```
1563
+
1564
+ Use AskUserQuestion to present the user with a selection of versions. Include the 3-4 most recent versions as options, labeling the latest one with "(Latest)". The user can also type a different version via the "Other" option. Mention the current version in the question text so the user knows what they're upgrading from.
1565
+
1566
+ ## Step 2: Identify all supported models
1567
+
1568
+ Read the `LLMModel` type definition in `platform-services/packages/bioscope_types/src/bioscope_types/services/llm_proxy_service.py` to get all supported models. Group them by provider:
1569
+
1570
+ - `bedrock/` models (Anthropic on AWS Bedrock)
1571
+ - `anthropic/` models (direct Anthropic API)
1572
+ - `vertex_ai/` models (Google Vertex AI)
1573
+ - `azure/` models (Azure OpenAI)
1574
+ - `groq/` models (Groq)
1575
+ - etc.
1576
+
1577
+ Also read the current litellm version from `platform-services/packages/llm_proxy_service/pyproject.toml`.
1578
+
1579
+ Also read `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py` to identify any existing `litellm.register_model()` overrides.
1580
+
1581
+ ## Step 3: Create output directory and spin up sub-agents per provider
1582
+
1583
+ First, create an output directory using Bash: `mkdir -p /tmp/litellm-upgrade`
1584
+
1585
+ Then, for EACH provider (bedrock, anthropic, vertex_ai, azure, groq), spin up a sub-agent using the Task tool (subagent_type: "general-purpose"). Run all provider sub-agents **in parallel** (include all Task tool calls in a single message). **Do NOT run these in the background** — they need to be foreground agents so they can prompt for tool permissions.
1586
+
1587
+ Each sub-agent should:
1588
+
1589
+ 1. **Check pricing in the NEW version** of litellm for every model belonging to that provider. Use `uv run` to inspect the bundled pricing data:
1590
+
1591
+ ```bash
1592
+ uv run --with litellm==<NEW_VERSION> python -c "import litellm, json; print(json.dumps(litellm.model_cost.get('<model_key>', {}), indent=2))"
1593
+ ```
1594
+
1595
+ Note: The key in `litellm.model_cost` may not exactly match the model string in `LLMModel`. For example, `bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0` may be keyed as `us.anthropic.claude-sonnet-4-5-20250929-v1:0` or similar. If an exact match isn't found, search for partial matches:
1596
+
1597
+ ```bash
1598
+ uv run --with litellm==<NEW_VERSION> python -c "import litellm; keys = [k for k in litellm.model_cost if '<partial_model_name>' in k]; print('\n'.join(sorted(keys)))"
1599
+ ```
1600
+
1601
+ 2. **Fetch the provider's pricing page** (linked in the `LLMModel` comments) and compare the litellm pricing against the actual provider pricing. Key fields to validate:
1602
+ - `input_cost_per_token`
1603
+ - `output_cost_per_token`
1604
+ - `cache_read_input_token_cost` (if applicable)
1605
+ - `cache_creation_input_token_cost` (if applicable)
1606
+
1607
+ 3. **Also check the OLD (current) version** to see if any existing overrides can be removed because the new version has correct pricing:
1608
+
1609
+ ```bash
1610
+ uv run --with litellm==<OLD_VERSION> python -c "import litellm, json; print(json.dumps(litellm.model_cost.get('<model_key>', {}), indent=2))"
1611
+ ```
1612
+
1613
+ 4. **Write findings to a file** at `/tmp/litellm-upgrade/<provider>.md` with this format:
1614
+
1615
+ ```text
1616
+ ## <provider> Models
1617
+
1618
+ ### <model_name>
1619
+ - **Provider pricing page**: <url>
1620
+ - **Expected input cost**: $X per 1M tokens
1621
+ - **Expected output cost**: $X per 1M tokens
1622
+ - **Expected cached input cost**: $X per 1M tokens (if applicable)
1623
+ - **litellm (new version) input cost**: $X per 1M tokens
1624
+ - **litellm (new version) output cost**: $X per 1M tokens
1625
+ - **litellm (new version) cached input cost**: $X per 1M tokens
1626
+ - **Status**: CORRECT / INCORRECT / MISSING
1627
+ - **Override needed**: Yes (details) / No
1628
+ ```
1629
+
1630
+ 5. **Return ONLY a single sentence** summarizing findings (e.g., "All 3 Anthropic models have correct pricing in the new version." or "2 of 5 Bedrock models have incorrect cached input pricing."). The full report is in the file — do NOT return it in the response.
1631
+
1632
+ **IMPORTANT:** When calling the Task tool for each sub-agent, explicitly instruct it to write findings to the file and return only a brief single-sentence confirmation. The full report must go in the file, NOT in the return message. This prevents the main agent's context from overflowing.
1633
+
1634
+ ## Step 4: Spin up a final evaluation sub-agent
1635
+
1636
+ After all provider sub-agents complete, spin up ONE final sub-agent (subagent_type: "general-purpose") that:
1637
+
1638
+ 1. Reads all files in `/tmp/litellm-upgrade/`
1639
+ 2. Compiles a summary of which models need overrides and which are correct
1640
+ 3. Writes a final report to `/tmp/litellm-upgrade/SUMMARY.md`
1641
+ 4. Returns ONLY a single sentence summary (e.g., "3 models need pricing overrides, 15 are correct. See /tmp/litellm-upgrade/SUMMARY.md for details.")
1642
+
1643
+ Then read `/tmp/litellm-upgrade/SUMMARY.md` and present the findings to the user.
1644
+
1645
+ ## Step 5: Implement the upgrade
1646
+
1647
+ After presenting findings to the user and getting their approval:
1648
+
1649
+ 1. Update the litellm version in BOTH:
1650
+ - `platform-services/packages/llm_proxy_service/pyproject.toml`
1651
+ - `platform-services/packages/embedding_service/pyproject.toml`
1652
+ 2. Add any needed `litellm.register_model()` overrides in `platform-services/packages/llm_proxy_service/src/llm_proxy_service/service.py`
1653
+ 3. Remove any existing overrides that are no longer needed (because the new version has correct pricing)
1654
+ 4. Run `uv sync --all-packages` from the `platform-services/` directory to update the lock file
1655
+ 5. Run `pnpm exec nx run llm-proxy-service:test` to verify tests pass
1656
+ 6. Run `pnpm exec nx run llm-proxy-service:lint` and `pnpm exec nx run llm-proxy-service:type-check`
1657
+ 7. Run `pnpm exec nx run embedding-service:test`, `pnpm exec nx run embedding-service:lint`, and `pnpm exec nx run embedding-service:type-check`11:["$","div","/Users/gabry/Desktop/ps-copy/platform-services/.claude/commands/upgrade-litellm.md",{"className":"border border-border rounded-sm p-5 ","children":[["$","div",null,{"className":"flex items-center gap-2","children":[["$","h3",null,{"className":"text-sm font-medium","children":"upgrade-litellm"}],["$","span",null,{"className":"inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm bg-surface-raised text-text-muted","children":"platform-services"}]]}],["$","$L2",null,{"content":"$1e","previewLines":3}]]}]
1658
+ 15:null