reflex-agent 0.2.1
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.
- package/.next/BUILD_ID +1 -0
- package/.next/app-build-manifest.json +319 -0
- package/.next/app-path-routes-manifest.json +34 -0
- package/.next/build-manifest.json +33 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/export-marker.json +6 -0
- package/.next/images-manifest.json +58 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +160 -0
- package/.next/react-loadable-manifest.json +8 -0
- package/.next/required-server-files.json +337 -0
- package/.next/routes-manifest.json +282 -0
- package/.next/server/app/_not-found/page.js +2 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +8 -0
- package/.next/server/app/_not-found.rsc +18 -0
- package/.next/server/app/agents/[agentId]/page.js +3 -0
- package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -0
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agents/[agentId]/respond/route.js +2 -0
- package/.next/server/app/api/agents/[agentId]/respond/route.js.nft.json +1 -0
- package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/images/[rootId]/[file]/route.js +1 -0
- package/.next/server/app/api/images/[rootId]/[file]/route.js.nft.json +1 -0
- package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/oauth/callback/route.js +22 -0
- package/.next/server/app/api/oauth/callback/route.js.nft.json +1 -0
- package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/oauth/start/route.js +1 -0
- package/.next/server/app/api/oauth/start/route.js.nft.json +1 -0
- package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/attachments/route.js +0 -0
- package/.next/server/app/api/roots/[id]/attachments/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +2 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +2 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +8 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -0
- package/.next/server/app/api/roots/[id]/dashboard/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -0
- package/.next/server/app/api/roots/[id]/suggestions/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +2 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route.js +55 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route.js +114 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route.js +21 -0
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -0
- package/.next/server/app/audit/page.js +2 -0
- package/.next/server/app/audit/page.js.nft.json +1 -0
- package/.next/server/app/audit/page_client-reference-manifest.js +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +9 -0
- package/.next/server/app/index.rsc +19 -0
- package/.next/server/app/onboarding/page.js +10 -0
- package/.next/server/app/onboarding/page.js.nft.json +1 -0
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -0
- package/.next/server/app/page.js +2 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js +7 -0
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js +6 -0
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/page.js +5 -0
- package/.next/server/app/roots/[id]/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -0
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/workflows/page.js +2 -0
- package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/new/page.js +5 -0
- package/.next/server/app/roots/new/page.js.nft.json +1 -0
- package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/new.html +1 -0
- package/.next/server/app/roots/new.meta +7 -0
- package/.next/server/app/roots/new.rsc +21 -0
- package/.next/server/app/settings/page.js +65 -0
- package/.next/server/app/settings/page.js.nft.json +1 -0
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -0
- package/.next/server/app/settings.html +1 -0
- package/.next/server/app/settings.meta +7 -0
- package/.next/server/app/settings.rsc +22 -0
- package/.next/server/app/share/[id]/file/page.js +2 -0
- package/.next/server/app/share/[id]/file/page.js.nft.json +1 -0
- package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -0
- package/.next/server/app/share/[id]/page.js +2 -0
- package/.next/server/app/share/[id]/page.js.nft.json +1 -0
- package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/utilities/[scope]/[id]/page.js +2 -0
- package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -0
- package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/utilities/page.js +17 -0
- package/.next/server/app/utilities/page.js.nft.json +1 -0
- package/.next/server/app/utilities/page_client-reference-manifest.js +1 -0
- package/.next/server/app-paths-manifest.json +34 -0
- package/.next/server/chunks/1088.js +1 -0
- package/.next/server/chunks/1105.js +1 -0
- package/.next/server/chunks/1223.js +1 -0
- package/.next/server/chunks/1244.js +1 -0
- package/.next/server/chunks/133.js +490 -0
- package/.next/server/chunks/1888.js +1 -0
- package/.next/server/chunks/192.js +1 -0
- package/.next/server/chunks/1960.js +1 -0
- package/.next/server/chunks/1961.js +1 -0
- package/.next/server/chunks/1986.js +1 -0
- package/.next/server/chunks/2035.js +1 -0
- package/.next/server/chunks/2356.js +1 -0
- package/.next/server/chunks/2433.js +1 -0
- package/.next/server/chunks/2485.js +6 -0
- package/.next/server/chunks/2503.js +1 -0
- package/.next/server/chunks/3240.js +1 -0
- package/.next/server/chunks/3295.js +1 -0
- package/.next/server/chunks/3332.js +1 -0
- package/.next/server/chunks/3657.js +1 -0
- package/.next/server/chunks/4031.js +6 -0
- package/.next/server/chunks/4066.js +1 -0
- package/.next/server/chunks/4553.js +1 -0
- package/.next/server/chunks/4833.js +1 -0
- package/.next/server/chunks/4840.js +1 -0
- package/.next/server/chunks/4842.js +1 -0
- package/.next/server/chunks/4925.js +1 -0
- package/.next/server/chunks/5087.js +1 -0
- package/.next/server/chunks/5152.js +1 -0
- package/.next/server/chunks/5243.js +1 -0
- package/.next/server/chunks/5319.js +1 -0
- package/.next/server/chunks/5373.js +1 -0
- package/.next/server/chunks/5401.js +1 -0
- package/.next/server/chunks/5436.js +1 -0
- package/.next/server/chunks/5543.js +1 -0
- package/.next/server/chunks/569.js +1 -0
- package/.next/server/chunks/5895.js +16 -0
- package/.next/server/chunks/5986.js +3 -0
- package/.next/server/chunks/613.js +1 -0
- package/.next/server/chunks/6216.js +1 -0
- package/.next/server/chunks/6435.js +1 -0
- package/.next/server/chunks/6536.js +3 -0
- package/.next/server/chunks/6602.js +4 -0
- package/.next/server/chunks/6730.js +1 -0
- package/.next/server/chunks/6909.js +488 -0
- package/.next/server/chunks/7188.js +1 -0
- package/.next/server/chunks/7300.js +128 -0
- package/.next/server/chunks/7508.js +1 -0
- package/.next/server/chunks/7572.js +2 -0
- package/.next/server/chunks/8056.js +1 -0
- package/.next/server/chunks/8124.js +1 -0
- package/.next/server/chunks/8262.js +1 -0
- package/.next/server/chunks/8404.js +62 -0
- package/.next/server/chunks/8514.js +1 -0
- package/.next/server/chunks/8843.js +1 -0
- package/.next/server/chunks/9098.js +1 -0
- package/.next/server/chunks/9293.js +1 -0
- package/.next/server/chunks/9328.js +179 -0
- package/.next/server/chunks/94.js +1 -0
- package/.next/server/chunks/9579.js +1 -0
- package/.next/server/chunks/9631.js +16 -0
- package/.next/server/chunks/9692.js +6 -0
- package/.next/server/chunks/9739.js +108 -0
- package/.next/server/chunks/9803.js +22 -0
- package/.next/server/chunks/9835.js +1 -0
- package/.next/server/chunks/9842.js +1 -0
- package/.next/server/chunks/9861.js +128 -0
- package/.next/server/chunks/9995.js +1 -0
- package/.next/server/edge-runtime-webpack.js +2 -0
- package/.next/server/edge-runtime-webpack.js.map +1 -0
- package/.next/server/functions-config-manifest.json +21 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +32 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/middleware.js +14 -0
- package/.next/server/middleware.js.map +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages/_app.js +1 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +1 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +19 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +6 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/chunks/1217-407174d9b164a499.js +1 -0
- package/.next/static/chunks/146-ccee3b26755b68c8.js +1 -0
- package/.next/static/chunks/3335-5647a38ab2cfa88d.js +1 -0
- package/.next/static/chunks/3954-fe27ff41d9bf012d.js +1 -0
- package/.next/static/chunks/4108.d6ed46bc2fcab462.js +1 -0
- package/.next/static/chunks/4400-cdb1f7913ae34e09.js +1 -0
- package/.next/static/chunks/4895-712004156efeccf2.js +1 -0
- package/.next/static/chunks/5097-f07f6aeee3f60a33.js +1 -0
- package/.next/static/chunks/5235-990ba9c4c8446446.js +62 -0
- package/.next/static/chunks/6489-ecde2d94e57eb8a9.js +1 -0
- package/.next/static/chunks/6568-e4d2de23d9f8d347.js +1 -0
- package/.next/static/chunks/6727-d38536774bdb32d5.js +1 -0
- package/.next/static/chunks/6734-9d524ec49e4ba49c.js +1 -0
- package/.next/static/chunks/6744-dbfe3cc4ce461613.js +1 -0
- package/.next/static/chunks/6fe292aa-7126ff9d6732e864.js +1 -0
- package/.next/static/chunks/8566-5d4c89b722d9cee1.js +1 -0
- package/.next/static/chunks/8775-890699c74c28df61.js +1 -0
- package/.next/static/chunks/9045-731ff0865352dd95.js +1 -0
- package/.next/static/chunks/app/_not-found/page-ffead1b4e248e14d.js +1 -0
- package/.next/static/chunks/app/agents/[agentId]/page-0b5c2838354d0eba.js +1 -0
- package/.next/static/chunks/app/api/agents/[agentId]/respond/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/images/[rootId]/[file]/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/oauth/callback/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/oauth/start/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/attachments/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/send/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stop/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stream/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/dashboard/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/suggestions/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/bundle.js/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-api.mjs/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-ui.mjs/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/iframe/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/style.css/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/audit/page-e3445076d462aa80.js +1 -0
- package/.next/static/chunks/app/layout-c7a35075cfbfa3e3.js +1 -0
- package/.next/static/chunks/app/onboarding/page-cde5b92b13b03c63.js +1 -0
- package/.next/static/chunks/app/page-ddaeffdc9a15f597.js +1 -0
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-1b55f68984817d29.js +1 -0
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-d4358cb6042740c4.js +1 -0
- package/.next/static/chunks/app/roots/[id]/layout-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/roots/[id]/page-703d96bf8208af2f.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-738e8e4128baa722.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/page-e3445076d462aa80.js +1 -0
- package/.next/static/chunks/app/roots/new/page-534769dce46d0d29.js +1 -0
- package/.next/static/chunks/app/settings/page-86ee3d07ea1acbc7.js +1 -0
- package/.next/static/chunks/app/share/[id]/file/page-93e0105d7903f777.js +1 -0
- package/.next/static/chunks/app/share/[id]/page-5bbc8503cb9a9eeb.js +1 -0
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-72546d245b840091.js +1 -0
- package/.next/static/chunks/app/utilities/page-9f949d831421d314.js +1 -0
- package/.next/static/chunks/framework-aaa7c1a953276299.js +1 -0
- package/.next/static/chunks/main-app-ebe67847147d19aa.js +1 -0
- package/.next/static/chunks/main-bfb98fc1d6aa1d45.js +1 -0
- package/.next/static/chunks/pages/_app-bf8bc157ace53d59.js +1 -0
- package/.next/static/chunks/pages/_error-da89ab2956f0cf38.js +1 -0
- package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/static/chunks/webpack-2e8cca5826414cc6.js +1 -0
- package/.next/static/css/87e01f779d555d04.css +1 -0
- package/.next/static/p8t15rbWhT5Rrs5fOXWZ6/_buildManifest.js +1 -0
- package/.next/static/p8t15rbWhT5Rrs5fOXWZ6/_ssgManifest.js +1 -0
- package/.next/trace +46 -0
- package/.next/types/app/agents/[agentId]/page.ts +84 -0
- package/.next/types/app/api/agents/[agentId]/respond/route.ts +347 -0
- package/.next/types/app/api/images/[rootId]/[file]/route.ts +347 -0
- package/.next/types/app/api/oauth/callback/route.ts +347 -0
- package/.next/types/app/api/oauth/start/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/attachments/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/chat/[topicId]/send/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/chat/[topicId]/stop/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/chat/[topicId]/stream/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/dashboard/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/suggestions/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/bundle.js/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/host/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/host-api.mjs/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/host-ui.mjs/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/iframe/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/style.css/route.ts +347 -0
- package/.next/types/app/audit/page.ts +84 -0
- package/.next/types/app/onboarding/page.ts +84 -0
- package/.next/types/app/page.ts +84 -0
- package/.next/types/app/roots/[id]/chat/[topicId]/page.ts +84 -0
- package/.next/types/app/roots/[id]/kb/[...slug]/page.ts +84 -0
- package/.next/types/app/roots/[id]/layout.ts +84 -0
- package/.next/types/app/roots/[id]/page.ts +84 -0
- package/.next/types/app/roots/[id]/workflows/[wfId]/page.ts +84 -0
- package/.next/types/app/roots/[id]/workflows/page.ts +84 -0
- package/.next/types/app/roots/new/page.ts +84 -0
- package/.next/types/app/settings/page.ts +84 -0
- package/.next/types/app/share/[id]/file/page.ts +84 -0
- package/.next/types/app/share/[id]/page.ts +84 -0
- package/.next/types/app/utilities/[scope]/[id]/page.ts +84 -0
- package/.next/types/app/utilities/page.ts +84 -0
- package/.next/types/cache-life.d.ts +141 -0
- package/.next/types/package.json +1 -0
- package/.next/types/routes.d.ts +103 -0
- package/.next/types/validator.ts +349 -0
- package/README.md +72 -0
- package/dist/bin/cli.js +82 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/lib/reflex/agents/backend.js +14 -0
- package/dist/lib/reflex/agents/backend.js.map +1 -0
- package/dist/lib/reflex/agents/claude-code.js +48 -0
- package/dist/lib/reflex/agents/claude-code.js.map +1 -0
- package/dist/lib/reflex/agents/codex.js +46 -0
- package/dist/lib/reflex/agents/codex.js.map +1 -0
- package/dist/lib/reflex/agents/index.js +13 -0
- package/dist/lib/reflex/agents/index.js.map +1 -0
- package/dist/lib/reflex/agents/prompts.js +228 -0
- package/dist/lib/reflex/agents/prompts.js.map +1 -0
- package/dist/lib/reflex/commands/chat.js +41 -0
- package/dist/lib/reflex/commands/chat.js.map +1 -0
- package/dist/lib/reflex/commands/init.js +38 -0
- package/dist/lib/reflex/commands/init.js.map +1 -0
- package/dist/lib/reflex/commands/start.js +64 -0
- package/dist/lib/reflex/commands/start.js.map +1 -0
- package/dist/lib/reflex/commands/watch.js +137 -0
- package/dist/lib/reflex/commands/watch.js.map +1 -0
- package/dist/lib/reflex/config.js +42 -0
- package/dist/lib/reflex/config.js.map +1 -0
- package/dist/lib/reflex/ignore.js +83 -0
- package/dist/lib/reflex/ignore.js.map +1 -0
- package/dist/lib/reflex/kb.js +48 -0
- package/dist/lib/reflex/kb.js.map +1 -0
- package/dist/lib/reflex/paths.js +33 -0
- package/dist/lib/reflex/paths.js.map +1 -0
- package/dist/lib/reflex/prompts/defaults.js +363 -0
- package/dist/lib/reflex/prompts/defaults.js.map +1 -0
- package/dist/lib/reflex/prompts/render.js +14 -0
- package/dist/lib/reflex/prompts/render.js.map +1 -0
- package/dist/lib/reflex/prompts/store.js +54 -0
- package/dist/lib/reflex/prompts/store.js.map +1 -0
- package/dist/lib/reflex/walker.js +55 -0
- package/dist/lib/reflex/walker.js.map +1 -0
- package/next.config.ts +33 -0
- package/package.json +87 -0
- package/packages/utilities/learn-anything/README.md +41 -0
- package/packages/utilities/learn-anything/actions/_json.ts +191 -0
- package/packages/utilities/learn-anything/actions/_store.ts +248 -0
- package/packages/utilities/learn-anything/actions/buildModule.ts +487 -0
- package/packages/utilities/learn-anything/actions/explainSelection.ts +64 -0
- package/packages/utilities/learn-anything/actions/generateOutline.ts +170 -0
- package/packages/utilities/learn-anything/actions/generateQuiz.ts +72 -0
- package/packages/utilities/learn-anything/actions/generateTrainer.ts +106 -0
- package/packages/utilities/learn-anything/actions/refreshCourseCard.ts +76 -0
- package/packages/utilities/learn-anything/actions/tutorAsk.ts +93 -0
- package/packages/utilities/learn-anything/article-view.tsx +464 -0
- package/packages/utilities/learn-anything/manifest.json +42 -0
- package/packages/utilities/learn-anything/ui.tsx +1589 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
// This file is generated automatically by Next.js
|
|
2
|
+
// Do not edit this file manually
|
|
3
|
+
// This file validates that all pages and layouts export the correct types
|
|
4
|
+
|
|
5
|
+
import type { AppRoutes, LayoutRoutes, ParamMap, AppRouteHandlerRoutes } from "./routes.js"
|
|
6
|
+
import type { ResolvingMetadata, ResolvingViewport } from "next/types.js"
|
|
7
|
+
import type { NextRequest } from 'next/server.js'
|
|
8
|
+
|
|
9
|
+
type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
|
|
10
|
+
default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
|
|
11
|
+
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
|
|
12
|
+
generateMetadata?: (
|
|
13
|
+
props: { params: Promise<ParamMap[Route]> } & any,
|
|
14
|
+
parent: ResolvingMetadata
|
|
15
|
+
) => Promise<any> | any
|
|
16
|
+
generateViewport?: (
|
|
17
|
+
props: { params: Promise<ParamMap[Route]> } & any,
|
|
18
|
+
parent: ResolvingViewport
|
|
19
|
+
) => Promise<any> | any
|
|
20
|
+
metadata?: any
|
|
21
|
+
viewport?: any
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
|
|
25
|
+
default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
|
|
26
|
+
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
|
|
27
|
+
generateMetadata?: (
|
|
28
|
+
props: { params: Promise<ParamMap[Route]> } & any,
|
|
29
|
+
parent: ResolvingMetadata
|
|
30
|
+
) => Promise<any> | any
|
|
31
|
+
generateViewport?: (
|
|
32
|
+
props: { params: Promise<ParamMap[Route]> } & any,
|
|
33
|
+
parent: ResolvingViewport
|
|
34
|
+
) => Promise<any> | any
|
|
35
|
+
metadata?: any
|
|
36
|
+
viewport?: any
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRoutes> = {
|
|
40
|
+
GET?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
41
|
+
POST?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
42
|
+
PUT?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
43
|
+
PATCH?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
44
|
+
DELETE?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
45
|
+
HEAD?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
46
|
+
OPTIONS?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// Validate ../../app/agents/[agentId]/page.tsx
|
|
51
|
+
{
|
|
52
|
+
type __IsExpected<Specific extends AppPageConfig<"/agents/[agentId]">> = Specific
|
|
53
|
+
const handler = {} as typeof import("../../app/agents/[agentId]/page.js")
|
|
54
|
+
type __Check = __IsExpected<typeof handler>
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
type __Unused = __Check
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Validate ../../app/audit/page.tsx
|
|
60
|
+
{
|
|
61
|
+
type __IsExpected<Specific extends AppPageConfig<"/audit">> = Specific
|
|
62
|
+
const handler = {} as typeof import("../../app/audit/page.js")
|
|
63
|
+
type __Check = __IsExpected<typeof handler>
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
type __Unused = __Check
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Validate ../../app/onboarding/page.tsx
|
|
69
|
+
{
|
|
70
|
+
type __IsExpected<Specific extends AppPageConfig<"/onboarding">> = Specific
|
|
71
|
+
const handler = {} as typeof import("../../app/onboarding/page.js")
|
|
72
|
+
type __Check = __IsExpected<typeof handler>
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
type __Unused = __Check
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Validate ../../app/page.tsx
|
|
78
|
+
{
|
|
79
|
+
type __IsExpected<Specific extends AppPageConfig<"/">> = Specific
|
|
80
|
+
const handler = {} as typeof import("../../app/page.js")
|
|
81
|
+
type __Check = __IsExpected<typeof handler>
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
type __Unused = __Check
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Validate ../../app/roots/[id]/chat/[topicId]/page.tsx
|
|
87
|
+
{
|
|
88
|
+
type __IsExpected<Specific extends AppPageConfig<"/roots/[id]/chat/[topicId]">> = Specific
|
|
89
|
+
const handler = {} as typeof import("../../app/roots/[id]/chat/[topicId]/page.js")
|
|
90
|
+
type __Check = __IsExpected<typeof handler>
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
type __Unused = __Check
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Validate ../../app/roots/[id]/kb/[...slug]/page.tsx
|
|
96
|
+
{
|
|
97
|
+
type __IsExpected<Specific extends AppPageConfig<"/roots/[id]/kb/[...slug]">> = Specific
|
|
98
|
+
const handler = {} as typeof import("../../app/roots/[id]/kb/[...slug]/page.js")
|
|
99
|
+
type __Check = __IsExpected<typeof handler>
|
|
100
|
+
// @ts-ignore
|
|
101
|
+
type __Unused = __Check
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Validate ../../app/roots/[id]/page.tsx
|
|
105
|
+
{
|
|
106
|
+
type __IsExpected<Specific extends AppPageConfig<"/roots/[id]">> = Specific
|
|
107
|
+
const handler = {} as typeof import("../../app/roots/[id]/page.js")
|
|
108
|
+
type __Check = __IsExpected<typeof handler>
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
type __Unused = __Check
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Validate ../../app/roots/[id]/workflows/[wfId]/page.tsx
|
|
114
|
+
{
|
|
115
|
+
type __IsExpected<Specific extends AppPageConfig<"/roots/[id]/workflows/[wfId]">> = Specific
|
|
116
|
+
const handler = {} as typeof import("../../app/roots/[id]/workflows/[wfId]/page.js")
|
|
117
|
+
type __Check = __IsExpected<typeof handler>
|
|
118
|
+
// @ts-ignore
|
|
119
|
+
type __Unused = __Check
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Validate ../../app/roots/[id]/workflows/page.tsx
|
|
123
|
+
{
|
|
124
|
+
type __IsExpected<Specific extends AppPageConfig<"/roots/[id]/workflows">> = Specific
|
|
125
|
+
const handler = {} as typeof import("../../app/roots/[id]/workflows/page.js")
|
|
126
|
+
type __Check = __IsExpected<typeof handler>
|
|
127
|
+
// @ts-ignore
|
|
128
|
+
type __Unused = __Check
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Validate ../../app/roots/new/page.tsx
|
|
132
|
+
{
|
|
133
|
+
type __IsExpected<Specific extends AppPageConfig<"/roots/new">> = Specific
|
|
134
|
+
const handler = {} as typeof import("../../app/roots/new/page.js")
|
|
135
|
+
type __Check = __IsExpected<typeof handler>
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
type __Unused = __Check
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Validate ../../app/settings/page.tsx
|
|
141
|
+
{
|
|
142
|
+
type __IsExpected<Specific extends AppPageConfig<"/settings">> = Specific
|
|
143
|
+
const handler = {} as typeof import("../../app/settings/page.js")
|
|
144
|
+
type __Check = __IsExpected<typeof handler>
|
|
145
|
+
// @ts-ignore
|
|
146
|
+
type __Unused = __Check
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Validate ../../app/share/[id]/file/page.tsx
|
|
150
|
+
{
|
|
151
|
+
type __IsExpected<Specific extends AppPageConfig<"/share/[id]/file">> = Specific
|
|
152
|
+
const handler = {} as typeof import("../../app/share/[id]/file/page.js")
|
|
153
|
+
type __Check = __IsExpected<typeof handler>
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
type __Unused = __Check
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Validate ../../app/share/[id]/page.tsx
|
|
159
|
+
{
|
|
160
|
+
type __IsExpected<Specific extends AppPageConfig<"/share/[id]">> = Specific
|
|
161
|
+
const handler = {} as typeof import("../../app/share/[id]/page.js")
|
|
162
|
+
type __Check = __IsExpected<typeof handler>
|
|
163
|
+
// @ts-ignore
|
|
164
|
+
type __Unused = __Check
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Validate ../../app/utilities/[scope]/[id]/page.tsx
|
|
168
|
+
{
|
|
169
|
+
type __IsExpected<Specific extends AppPageConfig<"/utilities/[scope]/[id]">> = Specific
|
|
170
|
+
const handler = {} as typeof import("../../app/utilities/[scope]/[id]/page.js")
|
|
171
|
+
type __Check = __IsExpected<typeof handler>
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
type __Unused = __Check
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Validate ../../app/utilities/page.tsx
|
|
177
|
+
{
|
|
178
|
+
type __IsExpected<Specific extends AppPageConfig<"/utilities">> = Specific
|
|
179
|
+
const handler = {} as typeof import("../../app/utilities/page.js")
|
|
180
|
+
type __Check = __IsExpected<typeof handler>
|
|
181
|
+
// @ts-ignore
|
|
182
|
+
type __Unused = __Check
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Validate ../../app/api/agents/[agentId]/respond/route.ts
|
|
186
|
+
{
|
|
187
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agents/[agentId]/respond">> = Specific
|
|
188
|
+
const handler = {} as typeof import("../../app/api/agents/[agentId]/respond/route.js")
|
|
189
|
+
type __Check = __IsExpected<typeof handler>
|
|
190
|
+
// @ts-ignore
|
|
191
|
+
type __Unused = __Check
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Validate ../../app/api/images/[rootId]/[file]/route.ts
|
|
195
|
+
{
|
|
196
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/images/[rootId]/[file]">> = Specific
|
|
197
|
+
const handler = {} as typeof import("../../app/api/images/[rootId]/[file]/route.js")
|
|
198
|
+
type __Check = __IsExpected<typeof handler>
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
type __Unused = __Check
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Validate ../../app/api/oauth/callback/route.ts
|
|
204
|
+
{
|
|
205
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/oauth/callback">> = Specific
|
|
206
|
+
const handler = {} as typeof import("../../app/api/oauth/callback/route.js")
|
|
207
|
+
type __Check = __IsExpected<typeof handler>
|
|
208
|
+
// @ts-ignore
|
|
209
|
+
type __Unused = __Check
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Validate ../../app/api/oauth/start/route.ts
|
|
213
|
+
{
|
|
214
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/oauth/start">> = Specific
|
|
215
|
+
const handler = {} as typeof import("../../app/api/oauth/start/route.js")
|
|
216
|
+
type __Check = __IsExpected<typeof handler>
|
|
217
|
+
// @ts-ignore
|
|
218
|
+
type __Unused = __Check
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Validate ../../app/api/roots/[id]/attachments/route.ts
|
|
222
|
+
{
|
|
223
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/roots/[id]/attachments">> = Specific
|
|
224
|
+
const handler = {} as typeof import("../../app/api/roots/[id]/attachments/route.js")
|
|
225
|
+
type __Check = __IsExpected<typeof handler>
|
|
226
|
+
// @ts-ignore
|
|
227
|
+
type __Unused = __Check
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Validate ../../app/api/roots/[id]/chat/[topicId]/send/route.ts
|
|
231
|
+
{
|
|
232
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/roots/[id]/chat/[topicId]/send">> = Specific
|
|
233
|
+
const handler = {} as typeof import("../../app/api/roots/[id]/chat/[topicId]/send/route.js")
|
|
234
|
+
type __Check = __IsExpected<typeof handler>
|
|
235
|
+
// @ts-ignore
|
|
236
|
+
type __Unused = __Check
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Validate ../../app/api/roots/[id]/chat/[topicId]/stop/route.ts
|
|
240
|
+
{
|
|
241
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/roots/[id]/chat/[topicId]/stop">> = Specific
|
|
242
|
+
const handler = {} as typeof import("../../app/api/roots/[id]/chat/[topicId]/stop/route.js")
|
|
243
|
+
type __Check = __IsExpected<typeof handler>
|
|
244
|
+
// @ts-ignore
|
|
245
|
+
type __Unused = __Check
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Validate ../../app/api/roots/[id]/chat/[topicId]/stream/route.ts
|
|
249
|
+
{
|
|
250
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/roots/[id]/chat/[topicId]/stream">> = Specific
|
|
251
|
+
const handler = {} as typeof import("../../app/api/roots/[id]/chat/[topicId]/stream/route.js")
|
|
252
|
+
type __Check = __IsExpected<typeof handler>
|
|
253
|
+
// @ts-ignore
|
|
254
|
+
type __Unused = __Check
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Validate ../../app/api/roots/[id]/dashboard/route.ts
|
|
258
|
+
{
|
|
259
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/roots/[id]/dashboard">> = Specific
|
|
260
|
+
const handler = {} as typeof import("../../app/api/roots/[id]/dashboard/route.js")
|
|
261
|
+
type __Check = __IsExpected<typeof handler>
|
|
262
|
+
// @ts-ignore
|
|
263
|
+
type __Unused = __Check
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Validate ../../app/api/roots/[id]/suggestions/route.ts
|
|
267
|
+
{
|
|
268
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/roots/[id]/suggestions">> = Specific
|
|
269
|
+
const handler = {} as typeof import("../../app/api/roots/[id]/suggestions/route.js")
|
|
270
|
+
type __Check = __IsExpected<typeof handler>
|
|
271
|
+
// @ts-ignore
|
|
272
|
+
type __Unused = __Check
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Validate ../../app/api/utilities/[scope]/[id]/bundle.js/route.ts
|
|
276
|
+
{
|
|
277
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/utilities/[scope]/[id]/bundle.js">> = Specific
|
|
278
|
+
const handler = {} as typeof import("../../app/api/utilities/[scope]/[id]/bundle.js/route.js")
|
|
279
|
+
type __Check = __IsExpected<typeof handler>
|
|
280
|
+
// @ts-ignore
|
|
281
|
+
type __Unused = __Check
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Validate ../../app/api/utilities/[scope]/[id]/host-api.mjs/route.ts
|
|
285
|
+
{
|
|
286
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/utilities/[scope]/[id]/host-api.mjs">> = Specific
|
|
287
|
+
const handler = {} as typeof import("../../app/api/utilities/[scope]/[id]/host-api.mjs/route.js")
|
|
288
|
+
type __Check = __IsExpected<typeof handler>
|
|
289
|
+
// @ts-ignore
|
|
290
|
+
type __Unused = __Check
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Validate ../../app/api/utilities/[scope]/[id]/host-ui.mjs/route.ts
|
|
294
|
+
{
|
|
295
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/utilities/[scope]/[id]/host-ui.mjs">> = Specific
|
|
296
|
+
const handler = {} as typeof import("../../app/api/utilities/[scope]/[id]/host-ui.mjs/route.js")
|
|
297
|
+
type __Check = __IsExpected<typeof handler>
|
|
298
|
+
// @ts-ignore
|
|
299
|
+
type __Unused = __Check
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Validate ../../app/api/utilities/[scope]/[id]/host/route.ts
|
|
303
|
+
{
|
|
304
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/utilities/[scope]/[id]/host">> = Specific
|
|
305
|
+
const handler = {} as typeof import("../../app/api/utilities/[scope]/[id]/host/route.js")
|
|
306
|
+
type __Check = __IsExpected<typeof handler>
|
|
307
|
+
// @ts-ignore
|
|
308
|
+
type __Unused = __Check
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Validate ../../app/api/utilities/[scope]/[id]/iframe/route.ts
|
|
312
|
+
{
|
|
313
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/utilities/[scope]/[id]/iframe">> = Specific
|
|
314
|
+
const handler = {} as typeof import("../../app/api/utilities/[scope]/[id]/iframe/route.js")
|
|
315
|
+
type __Check = __IsExpected<typeof handler>
|
|
316
|
+
// @ts-ignore
|
|
317
|
+
type __Unused = __Check
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Validate ../../app/api/utilities/[scope]/[id]/style.css/route.ts
|
|
321
|
+
{
|
|
322
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/utilities/[scope]/[id]/style.css">> = Specific
|
|
323
|
+
const handler = {} as typeof import("../../app/api/utilities/[scope]/[id]/style.css/route.js")
|
|
324
|
+
type __Check = __IsExpected<typeof handler>
|
|
325
|
+
// @ts-ignore
|
|
326
|
+
type __Unused = __Check
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
// Validate ../../app/layout.tsx
|
|
334
|
+
{
|
|
335
|
+
type __IsExpected<Specific extends LayoutConfig<"/">> = Specific
|
|
336
|
+
const handler = {} as typeof import("../../app/layout.js")
|
|
337
|
+
type __Check = __IsExpected<typeof handler>
|
|
338
|
+
// @ts-ignore
|
|
339
|
+
type __Unused = __Check
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// Validate ../../app/roots/[id]/layout.tsx
|
|
343
|
+
{
|
|
344
|
+
type __IsExpected<Specific extends LayoutConfig<"/roots/[id]">> = Specific
|
|
345
|
+
const handler = {} as typeof import("../../app/roots/[id]/layout.js")
|
|
346
|
+
type __Check = __IsExpected<typeof handler>
|
|
347
|
+
// @ts-ignore
|
|
348
|
+
type __Unused = __Check
|
|
349
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Reflex
|
|
2
|
+
|
|
3
|
+
Local-first knowledge base. You point Reflex at a directory; an agent (Codex via agent-use or Claude Code in agent mode) walks it and materializes a hierarchical `.reflex/` of Markdown files describing what's there. Background watchers keep it fresh, with a debounce floor (≥ 30 min, configurable) so the agent never runs too often. Per-folder chats let you query the KB the same way you'd query ChatGPT/Codex, but scoped to that subdirectory.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Prerequisites:
|
|
8
|
+
|
|
9
|
+
- **Node.js 20+** ([nodejs.org](https://nodejs.org/) or via `nvm`/`fnm`/`volta`)
|
|
10
|
+
- **Codex CLI** authenticated — `npm i -g @openai/codex && codex login`
|
|
11
|
+
|
|
12
|
+
Install Reflex globally:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npm i -g reflex-agent
|
|
16
|
+
# or: pnpm add -g reflex-agent
|
|
17
|
+
# or: yarn global add reflex-agent
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then launch the web UI:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
reflex start # opens http://localhost:3210 in your browser
|
|
24
|
+
reflex start --port 4000 --no-open
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Home page lists registered "Reflex roots". Add a directory via the built-in
|
|
28
|
+
file picker, then click **Run init** on the detail page to have the agent
|
|
29
|
+
build the KB. The left sidebar shows the resulting MD tree under `.reflex/`;
|
|
30
|
+
clicking a file renders it.
|
|
31
|
+
|
|
32
|
+
## CLI
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
reflex start # launch the web UI
|
|
36
|
+
reflex init <dir> # scaffold .reflex/ and run initial agent pass
|
|
37
|
+
reflex watch <dir> # watch dir and refresh KB on changes
|
|
38
|
+
reflex chat <dir> # open a chat scoped to dir's KB
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Develop from source
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
pnpm install
|
|
45
|
+
pnpm dev # http://localhost:3210 (Next dev server with HMR)
|
|
46
|
+
pnpm build # produce dist/ + .next/standalone for `reflex start`
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Layout produced
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
<your-dir>/
|
|
53
|
+
├── .reflexignore # gitignore-syntax — same rules
|
|
54
|
+
└── .reflex/
|
|
55
|
+
├── config.json # debounce, agent backend, etc.
|
|
56
|
+
├── INDEX.md # description of the whole dir
|
|
57
|
+
└── <subdir>/
|
|
58
|
+
├── INDEX.md # description of this subdir
|
|
59
|
+
└── *.md # topic-structured notes
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Config (`.reflex/config.json`)
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"watchDebounceMs": 1800000,
|
|
67
|
+
"agentBackend": "codex",
|
|
68
|
+
"ignoreFile": ".reflexignore"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`watchDebounceMs` defaults to 30 minutes (`1800000`). You can lower it in `.reflex/config.json` if you want a tighter loop; the only enforced minimum is 1 second (anti-thrash).
|
package/dist/bin/cli.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { runInit } from "../lib/reflex/commands/init.js";
|
|
4
|
+
import { runWatch } from "../lib/reflex/commands/watch.js";
|
|
5
|
+
import { runChat } from "../lib/reflex/commands/chat.js";
|
|
6
|
+
import { runStart } from "../lib/reflex/commands/start.js";
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
const pkgPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "package.json");
|
|
11
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
12
|
+
const program = new Command();
|
|
13
|
+
program
|
|
14
|
+
.name("reflex")
|
|
15
|
+
.description("Local-first knowledge base built by an agent.")
|
|
16
|
+
.version(pkg.version);
|
|
17
|
+
program
|
|
18
|
+
.command("init")
|
|
19
|
+
.description("Scaffold .reflex/ and run the initial agent pass over <dir>.")
|
|
20
|
+
.argument("<dir>", "Project directory")
|
|
21
|
+
.option("--scaffold-only", "Create .reflex/ and config but skip the agent pass")
|
|
22
|
+
.action(async (dir, opts) => {
|
|
23
|
+
await runInit(dir, { scaffoldOnly: !!opts.scaffoldOnly });
|
|
24
|
+
});
|
|
25
|
+
program
|
|
26
|
+
.command("watch")
|
|
27
|
+
.description("Watch <dir> and refresh the KB on changes (debounced).")
|
|
28
|
+
.argument("<dir>", "Project directory")
|
|
29
|
+
.action(async (dir) => {
|
|
30
|
+
const handle = await runWatch(dir);
|
|
31
|
+
const shutdown = async (signal) => {
|
|
32
|
+
process.stdout.write(`\n[reflex] ${signal} received, stopping…\n`);
|
|
33
|
+
await handle.stop();
|
|
34
|
+
process.exit(0);
|
|
35
|
+
};
|
|
36
|
+
process.on("SIGINT", shutdown);
|
|
37
|
+
process.on("SIGTERM", shutdown);
|
|
38
|
+
});
|
|
39
|
+
program
|
|
40
|
+
.command("chat")
|
|
41
|
+
.description("Open a chat scoped to <dir>'s knowledge base.")
|
|
42
|
+
.argument("<dir>", "Folder inside an initialized Reflex root")
|
|
43
|
+
.action(async (dir) => {
|
|
44
|
+
await runChat(dir);
|
|
45
|
+
});
|
|
46
|
+
program
|
|
47
|
+
.command("start")
|
|
48
|
+
.description("Launch the Reflex web UI on http://localhost:3210.")
|
|
49
|
+
.option("-p, --port <port>", "Port to listen on", "3210")
|
|
50
|
+
.option("-h, --host <host>", "Host to bind to", "127.0.0.1")
|
|
51
|
+
.option("--no-open", "Don't open the browser automatically")
|
|
52
|
+
.action(async (opts) => {
|
|
53
|
+
await runStart({ port: Number(opts.port), host: opts.host, open: opts.open });
|
|
54
|
+
});
|
|
55
|
+
program.parseAsync(process.argv).catch((err) => {
|
|
56
|
+
process.stderr.write(`reflex: ${formatError(err)}\n`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
});
|
|
59
|
+
function formatError(err) {
|
|
60
|
+
if (err instanceof Error) {
|
|
61
|
+
// zod errors stringify as a JSON array — extract messages.
|
|
62
|
+
try {
|
|
63
|
+
const parsed = JSON.parse(err.message);
|
|
64
|
+
if (Array.isArray(parsed)) {
|
|
65
|
+
return parsed
|
|
66
|
+
.map((e) => {
|
|
67
|
+
if (typeof e === "object" && e !== null && "message" in e) {
|
|
68
|
+
return String(e.message);
|
|
69
|
+
}
|
|
70
|
+
return String(e);
|
|
71
|
+
})
|
|
72
|
+
.join("; ");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// not JSON — fall through
|
|
77
|
+
}
|
|
78
|
+
return err.message;
|
|
79
|
+
}
|
|
80
|
+
return String(err);
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../bin/cli.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent backend abstraction.
|
|
3
|
+
*
|
|
4
|
+
* Keep this interface free of Codex- or Claude-specific types so backends stay
|
|
5
|
+
* swappable. Reflex calls `analyzeScope` to (re)build KB MDs for a subtree, and
|
|
6
|
+
* `chat` to open an interactive chat scoped to a folder's KB.
|
|
7
|
+
*/
|
|
8
|
+
export class AgentUnavailableError extends Error {
|
|
9
|
+
constructor(backendId, cause) {
|
|
10
|
+
super(`Agent backend "${backendId}" is unavailable: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
11
|
+
this.name = "AgentUnavailableError";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=backend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../../../lib/reflex/agents/backend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmCH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,SAAiB,EAAE,KAAc;QAC3C,KAAK,CACH,kBAAkB,SAAS,qBAAqB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACzG,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { execa } from "execa";
|
|
2
|
+
import { promises as fs } from "node:fs";
|
|
3
|
+
import { AgentUnavailableError, } from "./backend.js";
|
|
4
|
+
import { analyzePrompt, chatSystemPrompt } from "./prompts.js";
|
|
5
|
+
const CLI = "claude";
|
|
6
|
+
export const claudeCodeBackend = {
|
|
7
|
+
id: "claude-code",
|
|
8
|
+
async analyzeScope(scope) {
|
|
9
|
+
await ensureCliAvailable();
|
|
10
|
+
await fs.mkdir(scope.reflexScope, { recursive: true });
|
|
11
|
+
const prompt = await analyzePrompt(scope);
|
|
12
|
+
const args = [
|
|
13
|
+
"-p",
|
|
14
|
+
prompt,
|
|
15
|
+
"--permission-mode",
|
|
16
|
+
"acceptEdits",
|
|
17
|
+
"--allowedTools",
|
|
18
|
+
"Read,Write,Edit,LS,Glob,Grep",
|
|
19
|
+
"--add-dir",
|
|
20
|
+
scope.reflexScope,
|
|
21
|
+
];
|
|
22
|
+
if (scope.model)
|
|
23
|
+
args.push("--model", scope.model);
|
|
24
|
+
// Headless agent run: Claude is allowed to write inside reflexScope and
|
|
25
|
+
// read from the project root.
|
|
26
|
+
await execa(CLI, args, {
|
|
27
|
+
cwd: scope.root,
|
|
28
|
+
stdio: "inherit",
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
async chat(scope) {
|
|
32
|
+
await ensureCliAvailable();
|
|
33
|
+
const system = await chatSystemPrompt(scope);
|
|
34
|
+
await execa(CLI, ["--append-system-prompt", system, "--add-dir", scope.reflexScope], {
|
|
35
|
+
cwd: scope.scope,
|
|
36
|
+
stdio: "inherit",
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
async function ensureCliAvailable() {
|
|
41
|
+
try {
|
|
42
|
+
await execa(CLI, ["--version"], { stdio: "ignore" });
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
throw new AgentUnavailableError("claude-code", err);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=claude-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../../../lib/reflex/agents/claude-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAIL,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE/D,MAAM,GAAG,GAAG,QAAQ,CAAC;AAErB,MAAM,CAAC,MAAM,iBAAiB,GAAiB;IAC7C,EAAE,EAAE,aAAa;IAEjB,KAAK,CAAC,YAAY,CAAC,KAAmB;QACpC,MAAM,kBAAkB,EAAE,CAAC;QAC3B,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG;YACX,IAAI;YACJ,MAAM;YACN,mBAAmB;YACnB,aAAa;YACb,gBAAgB;YAChB,8BAA8B;YAC9B,WAAW;YACX,KAAK,CAAC,WAAW;SAClB,CAAC;QACF,IAAI,KAAK,CAAC,KAAK;YAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACnD,wEAAwE;QACxE,8BAA8B;QAC9B,MAAM,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE;YACrB,GAAG,EAAE,KAAK,CAAC,IAAI;YACf,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAgB;QACzB,MAAM,kBAAkB,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC7C,MAAM,KAAK,CACT,GAAG,EACH,CAAC,wBAAwB,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,EAClE;YACE,GAAG,EAAE,KAAK,CAAC,KAAK;YAChB,KAAK,EAAE,SAAS;SACjB,CACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,KAAK,UAAU,kBAAkB;IAC/B,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,qBAAqB,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IACtD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { execa } from "execa";
|
|
2
|
+
import { promises as fs } from "node:fs";
|
|
3
|
+
import { AgentUnavailableError, } from "./backend.js";
|
|
4
|
+
import { analyzePrompt, chatSystemPrompt } from "./prompts.js";
|
|
5
|
+
const CLI = "codex";
|
|
6
|
+
export const codexBackend = {
|
|
7
|
+
id: "codex",
|
|
8
|
+
async analyzeScope(scope) {
|
|
9
|
+
await ensureCliAvailable();
|
|
10
|
+
await fs.mkdir(scope.reflexScope, { recursive: true });
|
|
11
|
+
const prompt = await analyzePrompt(scope);
|
|
12
|
+
const args = [
|
|
13
|
+
"exec",
|
|
14
|
+
"--cd",
|
|
15
|
+
scope.root,
|
|
16
|
+
"--sandbox",
|
|
17
|
+
"workspace-write",
|
|
18
|
+
"--add-dir",
|
|
19
|
+
scope.reflexScope,
|
|
20
|
+
];
|
|
21
|
+
if (scope.model)
|
|
22
|
+
args.push("--model", scope.model);
|
|
23
|
+
args.push(prompt);
|
|
24
|
+
// `codex exec` runs non-interactively. We grant write access to the
|
|
25
|
+
// reflex scope only; codex defaults to read-only outside its cwd, which we
|
|
26
|
+
// set to the project root so it can read sources.
|
|
27
|
+
await execa(CLI, args, { stdio: "inherit" });
|
|
28
|
+
},
|
|
29
|
+
async chat(scope) {
|
|
30
|
+
await ensureCliAvailable();
|
|
31
|
+
const system = await chatSystemPrompt(scope);
|
|
32
|
+
await execa(CLI, ["--system", system], {
|
|
33
|
+
cwd: scope.scope,
|
|
34
|
+
stdio: "inherit",
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
async function ensureCliAvailable() {
|
|
39
|
+
try {
|
|
40
|
+
await execa(CLI, ["--version"], { stdio: "ignore" });
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
throw new AgentUnavailableError("codex", err);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../../lib/reflex/agents/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAIL,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE/D,MAAM,GAAG,GAAG,OAAO,CAAC;AAEpB,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,EAAE,EAAE,OAAO;IAEX,KAAK,CAAC,YAAY,CAAC,KAAmB;QACpC,MAAM,kBAAkB,EAAE,CAAC;QAC3B,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG;YACX,MAAM;YACN,MAAM;YACN,KAAK,CAAC,IAAI;YACV,WAAW;YACX,iBAAiB;YACjB,WAAW;YACX,KAAK,CAAC,WAAW;SAClB,CAAC;QACF,IAAI,KAAK,CAAC,KAAK;YAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClB,oEAAoE;QACpE,2EAA2E;QAC3E,kDAAkD;QAClD,MAAM,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAgB;QACzB,MAAM,kBAAkB,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC7C,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE;YACrC,GAAG,EAAE,KAAK,CAAC,KAAK;YAChB,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,KAAK,UAAU,kBAAkB;IAC/B,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,qBAAqB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { claudeCodeBackend } from "./claude-code.js";
|
|
2
|
+
import { codexBackend } from "./codex.js";
|
|
3
|
+
const BACKENDS = {
|
|
4
|
+
"claude-code": claudeCodeBackend,
|
|
5
|
+
codex: codexBackend,
|
|
6
|
+
};
|
|
7
|
+
export function getBackend(cfg) {
|
|
8
|
+
const b = BACKENDS[cfg.agentBackend];
|
|
9
|
+
if (!b)
|
|
10
|
+
throw new Error(`Unknown agent backend: ${cfg.agentBackend}`);
|
|
11
|
+
return b;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/reflex/agents/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,QAAQ,GAAiD;IAC7D,aAAa,EAAE,iBAAiB;IAChC,KAAK,EAAE,YAAY;CACpB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACrC,IAAI,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;IACtE,OAAO,CAAC,CAAC;AACX,CAAC"}
|