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,347 @@
|
|
|
1
|
+
// File: /home/runner/work/reflex-agent/reflex-agent/app/api/images/[rootId]/[file]/route.ts
|
|
2
|
+
import * as entry from '../../../../../../../app/api/images/[rootId]/[file]/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
type TEntry = typeof import('../../../../../../../app/api/images/[rootId]/[file]/route.js')
|
|
6
|
+
|
|
7
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
8
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
9
|
+
: T
|
|
10
|
+
|
|
11
|
+
// Check that the entry is a valid entry
|
|
12
|
+
checkFields<Diff<{
|
|
13
|
+
GET?: Function
|
|
14
|
+
HEAD?: Function
|
|
15
|
+
OPTIONS?: Function
|
|
16
|
+
POST?: Function
|
|
17
|
+
PUT?: Function
|
|
18
|
+
DELETE?: Function
|
|
19
|
+
PATCH?: Function
|
|
20
|
+
config?: {}
|
|
21
|
+
generateStaticParams?: Function
|
|
22
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
23
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
24
|
+
dynamicParams?: boolean
|
|
25
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
26
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
27
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
28
|
+
maxDuration?: number
|
|
29
|
+
|
|
30
|
+
}, TEntry, ''>>()
|
|
31
|
+
|
|
32
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
33
|
+
// Check the prop type of the entry function
|
|
34
|
+
if ('GET' in entry) {
|
|
35
|
+
checkFields<
|
|
36
|
+
Diff<
|
|
37
|
+
ParamCheck<Request | NextRequest>,
|
|
38
|
+
{
|
|
39
|
+
__tag__: 'GET'
|
|
40
|
+
__param_position__: 'first'
|
|
41
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
42
|
+
},
|
|
43
|
+
'GET'
|
|
44
|
+
>
|
|
45
|
+
>()
|
|
46
|
+
checkFields<
|
|
47
|
+
Diff<
|
|
48
|
+
ParamCheck<RouteContext>,
|
|
49
|
+
{
|
|
50
|
+
__tag__: 'GET'
|
|
51
|
+
__param_position__: 'second'
|
|
52
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
53
|
+
},
|
|
54
|
+
'GET'
|
|
55
|
+
>
|
|
56
|
+
>()
|
|
57
|
+
|
|
58
|
+
checkFields<
|
|
59
|
+
Diff<
|
|
60
|
+
{
|
|
61
|
+
__tag__: 'GET',
|
|
62
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
__tag__: 'GET',
|
|
66
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
67
|
+
},
|
|
68
|
+
'GET'
|
|
69
|
+
>
|
|
70
|
+
>()
|
|
71
|
+
}
|
|
72
|
+
// Check the prop type of the entry function
|
|
73
|
+
if ('HEAD' in entry) {
|
|
74
|
+
checkFields<
|
|
75
|
+
Diff<
|
|
76
|
+
ParamCheck<Request | NextRequest>,
|
|
77
|
+
{
|
|
78
|
+
__tag__: 'HEAD'
|
|
79
|
+
__param_position__: 'first'
|
|
80
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
81
|
+
},
|
|
82
|
+
'HEAD'
|
|
83
|
+
>
|
|
84
|
+
>()
|
|
85
|
+
checkFields<
|
|
86
|
+
Diff<
|
|
87
|
+
ParamCheck<RouteContext>,
|
|
88
|
+
{
|
|
89
|
+
__tag__: 'HEAD'
|
|
90
|
+
__param_position__: 'second'
|
|
91
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
92
|
+
},
|
|
93
|
+
'HEAD'
|
|
94
|
+
>
|
|
95
|
+
>()
|
|
96
|
+
|
|
97
|
+
checkFields<
|
|
98
|
+
Diff<
|
|
99
|
+
{
|
|
100
|
+
__tag__: 'HEAD',
|
|
101
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
__tag__: 'HEAD',
|
|
105
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
106
|
+
},
|
|
107
|
+
'HEAD'
|
|
108
|
+
>
|
|
109
|
+
>()
|
|
110
|
+
}
|
|
111
|
+
// Check the prop type of the entry function
|
|
112
|
+
if ('OPTIONS' in entry) {
|
|
113
|
+
checkFields<
|
|
114
|
+
Diff<
|
|
115
|
+
ParamCheck<Request | NextRequest>,
|
|
116
|
+
{
|
|
117
|
+
__tag__: 'OPTIONS'
|
|
118
|
+
__param_position__: 'first'
|
|
119
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
120
|
+
},
|
|
121
|
+
'OPTIONS'
|
|
122
|
+
>
|
|
123
|
+
>()
|
|
124
|
+
checkFields<
|
|
125
|
+
Diff<
|
|
126
|
+
ParamCheck<RouteContext>,
|
|
127
|
+
{
|
|
128
|
+
__tag__: 'OPTIONS'
|
|
129
|
+
__param_position__: 'second'
|
|
130
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
131
|
+
},
|
|
132
|
+
'OPTIONS'
|
|
133
|
+
>
|
|
134
|
+
>()
|
|
135
|
+
|
|
136
|
+
checkFields<
|
|
137
|
+
Diff<
|
|
138
|
+
{
|
|
139
|
+
__tag__: 'OPTIONS',
|
|
140
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
__tag__: 'OPTIONS',
|
|
144
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
145
|
+
},
|
|
146
|
+
'OPTIONS'
|
|
147
|
+
>
|
|
148
|
+
>()
|
|
149
|
+
}
|
|
150
|
+
// Check the prop type of the entry function
|
|
151
|
+
if ('POST' in entry) {
|
|
152
|
+
checkFields<
|
|
153
|
+
Diff<
|
|
154
|
+
ParamCheck<Request | NextRequest>,
|
|
155
|
+
{
|
|
156
|
+
__tag__: 'POST'
|
|
157
|
+
__param_position__: 'first'
|
|
158
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
159
|
+
},
|
|
160
|
+
'POST'
|
|
161
|
+
>
|
|
162
|
+
>()
|
|
163
|
+
checkFields<
|
|
164
|
+
Diff<
|
|
165
|
+
ParamCheck<RouteContext>,
|
|
166
|
+
{
|
|
167
|
+
__tag__: 'POST'
|
|
168
|
+
__param_position__: 'second'
|
|
169
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
170
|
+
},
|
|
171
|
+
'POST'
|
|
172
|
+
>
|
|
173
|
+
>()
|
|
174
|
+
|
|
175
|
+
checkFields<
|
|
176
|
+
Diff<
|
|
177
|
+
{
|
|
178
|
+
__tag__: 'POST',
|
|
179
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
__tag__: 'POST',
|
|
183
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
184
|
+
},
|
|
185
|
+
'POST'
|
|
186
|
+
>
|
|
187
|
+
>()
|
|
188
|
+
}
|
|
189
|
+
// Check the prop type of the entry function
|
|
190
|
+
if ('PUT' in entry) {
|
|
191
|
+
checkFields<
|
|
192
|
+
Diff<
|
|
193
|
+
ParamCheck<Request | NextRequest>,
|
|
194
|
+
{
|
|
195
|
+
__tag__: 'PUT'
|
|
196
|
+
__param_position__: 'first'
|
|
197
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
198
|
+
},
|
|
199
|
+
'PUT'
|
|
200
|
+
>
|
|
201
|
+
>()
|
|
202
|
+
checkFields<
|
|
203
|
+
Diff<
|
|
204
|
+
ParamCheck<RouteContext>,
|
|
205
|
+
{
|
|
206
|
+
__tag__: 'PUT'
|
|
207
|
+
__param_position__: 'second'
|
|
208
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
209
|
+
},
|
|
210
|
+
'PUT'
|
|
211
|
+
>
|
|
212
|
+
>()
|
|
213
|
+
|
|
214
|
+
checkFields<
|
|
215
|
+
Diff<
|
|
216
|
+
{
|
|
217
|
+
__tag__: 'PUT',
|
|
218
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
__tag__: 'PUT',
|
|
222
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
223
|
+
},
|
|
224
|
+
'PUT'
|
|
225
|
+
>
|
|
226
|
+
>()
|
|
227
|
+
}
|
|
228
|
+
// Check the prop type of the entry function
|
|
229
|
+
if ('DELETE' in entry) {
|
|
230
|
+
checkFields<
|
|
231
|
+
Diff<
|
|
232
|
+
ParamCheck<Request | NextRequest>,
|
|
233
|
+
{
|
|
234
|
+
__tag__: 'DELETE'
|
|
235
|
+
__param_position__: 'first'
|
|
236
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
237
|
+
},
|
|
238
|
+
'DELETE'
|
|
239
|
+
>
|
|
240
|
+
>()
|
|
241
|
+
checkFields<
|
|
242
|
+
Diff<
|
|
243
|
+
ParamCheck<RouteContext>,
|
|
244
|
+
{
|
|
245
|
+
__tag__: 'DELETE'
|
|
246
|
+
__param_position__: 'second'
|
|
247
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
248
|
+
},
|
|
249
|
+
'DELETE'
|
|
250
|
+
>
|
|
251
|
+
>()
|
|
252
|
+
|
|
253
|
+
checkFields<
|
|
254
|
+
Diff<
|
|
255
|
+
{
|
|
256
|
+
__tag__: 'DELETE',
|
|
257
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
__tag__: 'DELETE',
|
|
261
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
262
|
+
},
|
|
263
|
+
'DELETE'
|
|
264
|
+
>
|
|
265
|
+
>()
|
|
266
|
+
}
|
|
267
|
+
// Check the prop type of the entry function
|
|
268
|
+
if ('PATCH' in entry) {
|
|
269
|
+
checkFields<
|
|
270
|
+
Diff<
|
|
271
|
+
ParamCheck<Request | NextRequest>,
|
|
272
|
+
{
|
|
273
|
+
__tag__: 'PATCH'
|
|
274
|
+
__param_position__: 'first'
|
|
275
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
276
|
+
},
|
|
277
|
+
'PATCH'
|
|
278
|
+
>
|
|
279
|
+
>()
|
|
280
|
+
checkFields<
|
|
281
|
+
Diff<
|
|
282
|
+
ParamCheck<RouteContext>,
|
|
283
|
+
{
|
|
284
|
+
__tag__: 'PATCH'
|
|
285
|
+
__param_position__: 'second'
|
|
286
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
287
|
+
},
|
|
288
|
+
'PATCH'
|
|
289
|
+
>
|
|
290
|
+
>()
|
|
291
|
+
|
|
292
|
+
checkFields<
|
|
293
|
+
Diff<
|
|
294
|
+
{
|
|
295
|
+
__tag__: 'PATCH',
|
|
296
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
__tag__: 'PATCH',
|
|
300
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
301
|
+
},
|
|
302
|
+
'PATCH'
|
|
303
|
+
>
|
|
304
|
+
>()
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
308
|
+
if ('generateStaticParams' in entry) {
|
|
309
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
310
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface PageProps {
|
|
314
|
+
params?: Promise<SegmentParams>
|
|
315
|
+
searchParams?: Promise<any>
|
|
316
|
+
}
|
|
317
|
+
export interface LayoutProps {
|
|
318
|
+
children?: React.ReactNode
|
|
319
|
+
|
|
320
|
+
params?: Promise<SegmentParams>
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// =============
|
|
324
|
+
// Utility types
|
|
325
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
326
|
+
|
|
327
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
328
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
329
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
330
|
+
|
|
331
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
332
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
333
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
334
|
+
|
|
335
|
+
type ParamCheck<T> = {
|
|
336
|
+
__tag__: string
|
|
337
|
+
__param_position__: string
|
|
338
|
+
__param_type__: T
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
342
|
+
|
|
343
|
+
// https://github.com/sindresorhus/type-fest
|
|
344
|
+
type Numeric = number | bigint
|
|
345
|
+
type Zero = 0 | 0n
|
|
346
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
347
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
// File: /home/runner/work/reflex-agent/reflex-agent/app/api/oauth/callback/route.ts
|
|
2
|
+
import * as entry from '../../../../../../app/api/oauth/callback/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
type TEntry = typeof import('../../../../../../app/api/oauth/callback/route.js')
|
|
6
|
+
|
|
7
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
8
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
9
|
+
: T
|
|
10
|
+
|
|
11
|
+
// Check that the entry is a valid entry
|
|
12
|
+
checkFields<Diff<{
|
|
13
|
+
GET?: Function
|
|
14
|
+
HEAD?: Function
|
|
15
|
+
OPTIONS?: Function
|
|
16
|
+
POST?: Function
|
|
17
|
+
PUT?: Function
|
|
18
|
+
DELETE?: Function
|
|
19
|
+
PATCH?: Function
|
|
20
|
+
config?: {}
|
|
21
|
+
generateStaticParams?: Function
|
|
22
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
23
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
24
|
+
dynamicParams?: boolean
|
|
25
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
26
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
27
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
28
|
+
maxDuration?: number
|
|
29
|
+
|
|
30
|
+
}, TEntry, ''>>()
|
|
31
|
+
|
|
32
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
33
|
+
// Check the prop type of the entry function
|
|
34
|
+
if ('GET' in entry) {
|
|
35
|
+
checkFields<
|
|
36
|
+
Diff<
|
|
37
|
+
ParamCheck<Request | NextRequest>,
|
|
38
|
+
{
|
|
39
|
+
__tag__: 'GET'
|
|
40
|
+
__param_position__: 'first'
|
|
41
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
42
|
+
},
|
|
43
|
+
'GET'
|
|
44
|
+
>
|
|
45
|
+
>()
|
|
46
|
+
checkFields<
|
|
47
|
+
Diff<
|
|
48
|
+
ParamCheck<RouteContext>,
|
|
49
|
+
{
|
|
50
|
+
__tag__: 'GET'
|
|
51
|
+
__param_position__: 'second'
|
|
52
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
53
|
+
},
|
|
54
|
+
'GET'
|
|
55
|
+
>
|
|
56
|
+
>()
|
|
57
|
+
|
|
58
|
+
checkFields<
|
|
59
|
+
Diff<
|
|
60
|
+
{
|
|
61
|
+
__tag__: 'GET',
|
|
62
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
__tag__: 'GET',
|
|
66
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
67
|
+
},
|
|
68
|
+
'GET'
|
|
69
|
+
>
|
|
70
|
+
>()
|
|
71
|
+
}
|
|
72
|
+
// Check the prop type of the entry function
|
|
73
|
+
if ('HEAD' in entry) {
|
|
74
|
+
checkFields<
|
|
75
|
+
Diff<
|
|
76
|
+
ParamCheck<Request | NextRequest>,
|
|
77
|
+
{
|
|
78
|
+
__tag__: 'HEAD'
|
|
79
|
+
__param_position__: 'first'
|
|
80
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
81
|
+
},
|
|
82
|
+
'HEAD'
|
|
83
|
+
>
|
|
84
|
+
>()
|
|
85
|
+
checkFields<
|
|
86
|
+
Diff<
|
|
87
|
+
ParamCheck<RouteContext>,
|
|
88
|
+
{
|
|
89
|
+
__tag__: 'HEAD'
|
|
90
|
+
__param_position__: 'second'
|
|
91
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
92
|
+
},
|
|
93
|
+
'HEAD'
|
|
94
|
+
>
|
|
95
|
+
>()
|
|
96
|
+
|
|
97
|
+
checkFields<
|
|
98
|
+
Diff<
|
|
99
|
+
{
|
|
100
|
+
__tag__: 'HEAD',
|
|
101
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
__tag__: 'HEAD',
|
|
105
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
106
|
+
},
|
|
107
|
+
'HEAD'
|
|
108
|
+
>
|
|
109
|
+
>()
|
|
110
|
+
}
|
|
111
|
+
// Check the prop type of the entry function
|
|
112
|
+
if ('OPTIONS' in entry) {
|
|
113
|
+
checkFields<
|
|
114
|
+
Diff<
|
|
115
|
+
ParamCheck<Request | NextRequest>,
|
|
116
|
+
{
|
|
117
|
+
__tag__: 'OPTIONS'
|
|
118
|
+
__param_position__: 'first'
|
|
119
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
120
|
+
},
|
|
121
|
+
'OPTIONS'
|
|
122
|
+
>
|
|
123
|
+
>()
|
|
124
|
+
checkFields<
|
|
125
|
+
Diff<
|
|
126
|
+
ParamCheck<RouteContext>,
|
|
127
|
+
{
|
|
128
|
+
__tag__: 'OPTIONS'
|
|
129
|
+
__param_position__: 'second'
|
|
130
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
131
|
+
},
|
|
132
|
+
'OPTIONS'
|
|
133
|
+
>
|
|
134
|
+
>()
|
|
135
|
+
|
|
136
|
+
checkFields<
|
|
137
|
+
Diff<
|
|
138
|
+
{
|
|
139
|
+
__tag__: 'OPTIONS',
|
|
140
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
__tag__: 'OPTIONS',
|
|
144
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
145
|
+
},
|
|
146
|
+
'OPTIONS'
|
|
147
|
+
>
|
|
148
|
+
>()
|
|
149
|
+
}
|
|
150
|
+
// Check the prop type of the entry function
|
|
151
|
+
if ('POST' in entry) {
|
|
152
|
+
checkFields<
|
|
153
|
+
Diff<
|
|
154
|
+
ParamCheck<Request | NextRequest>,
|
|
155
|
+
{
|
|
156
|
+
__tag__: 'POST'
|
|
157
|
+
__param_position__: 'first'
|
|
158
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
159
|
+
},
|
|
160
|
+
'POST'
|
|
161
|
+
>
|
|
162
|
+
>()
|
|
163
|
+
checkFields<
|
|
164
|
+
Diff<
|
|
165
|
+
ParamCheck<RouteContext>,
|
|
166
|
+
{
|
|
167
|
+
__tag__: 'POST'
|
|
168
|
+
__param_position__: 'second'
|
|
169
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
170
|
+
},
|
|
171
|
+
'POST'
|
|
172
|
+
>
|
|
173
|
+
>()
|
|
174
|
+
|
|
175
|
+
checkFields<
|
|
176
|
+
Diff<
|
|
177
|
+
{
|
|
178
|
+
__tag__: 'POST',
|
|
179
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
__tag__: 'POST',
|
|
183
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
184
|
+
},
|
|
185
|
+
'POST'
|
|
186
|
+
>
|
|
187
|
+
>()
|
|
188
|
+
}
|
|
189
|
+
// Check the prop type of the entry function
|
|
190
|
+
if ('PUT' in entry) {
|
|
191
|
+
checkFields<
|
|
192
|
+
Diff<
|
|
193
|
+
ParamCheck<Request | NextRequest>,
|
|
194
|
+
{
|
|
195
|
+
__tag__: 'PUT'
|
|
196
|
+
__param_position__: 'first'
|
|
197
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
198
|
+
},
|
|
199
|
+
'PUT'
|
|
200
|
+
>
|
|
201
|
+
>()
|
|
202
|
+
checkFields<
|
|
203
|
+
Diff<
|
|
204
|
+
ParamCheck<RouteContext>,
|
|
205
|
+
{
|
|
206
|
+
__tag__: 'PUT'
|
|
207
|
+
__param_position__: 'second'
|
|
208
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
209
|
+
},
|
|
210
|
+
'PUT'
|
|
211
|
+
>
|
|
212
|
+
>()
|
|
213
|
+
|
|
214
|
+
checkFields<
|
|
215
|
+
Diff<
|
|
216
|
+
{
|
|
217
|
+
__tag__: 'PUT',
|
|
218
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
__tag__: 'PUT',
|
|
222
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
223
|
+
},
|
|
224
|
+
'PUT'
|
|
225
|
+
>
|
|
226
|
+
>()
|
|
227
|
+
}
|
|
228
|
+
// Check the prop type of the entry function
|
|
229
|
+
if ('DELETE' in entry) {
|
|
230
|
+
checkFields<
|
|
231
|
+
Diff<
|
|
232
|
+
ParamCheck<Request | NextRequest>,
|
|
233
|
+
{
|
|
234
|
+
__tag__: 'DELETE'
|
|
235
|
+
__param_position__: 'first'
|
|
236
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
237
|
+
},
|
|
238
|
+
'DELETE'
|
|
239
|
+
>
|
|
240
|
+
>()
|
|
241
|
+
checkFields<
|
|
242
|
+
Diff<
|
|
243
|
+
ParamCheck<RouteContext>,
|
|
244
|
+
{
|
|
245
|
+
__tag__: 'DELETE'
|
|
246
|
+
__param_position__: 'second'
|
|
247
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
248
|
+
},
|
|
249
|
+
'DELETE'
|
|
250
|
+
>
|
|
251
|
+
>()
|
|
252
|
+
|
|
253
|
+
checkFields<
|
|
254
|
+
Diff<
|
|
255
|
+
{
|
|
256
|
+
__tag__: 'DELETE',
|
|
257
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
__tag__: 'DELETE',
|
|
261
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
262
|
+
},
|
|
263
|
+
'DELETE'
|
|
264
|
+
>
|
|
265
|
+
>()
|
|
266
|
+
}
|
|
267
|
+
// Check the prop type of the entry function
|
|
268
|
+
if ('PATCH' in entry) {
|
|
269
|
+
checkFields<
|
|
270
|
+
Diff<
|
|
271
|
+
ParamCheck<Request | NextRequest>,
|
|
272
|
+
{
|
|
273
|
+
__tag__: 'PATCH'
|
|
274
|
+
__param_position__: 'first'
|
|
275
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
276
|
+
},
|
|
277
|
+
'PATCH'
|
|
278
|
+
>
|
|
279
|
+
>()
|
|
280
|
+
checkFields<
|
|
281
|
+
Diff<
|
|
282
|
+
ParamCheck<RouteContext>,
|
|
283
|
+
{
|
|
284
|
+
__tag__: 'PATCH'
|
|
285
|
+
__param_position__: 'second'
|
|
286
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
287
|
+
},
|
|
288
|
+
'PATCH'
|
|
289
|
+
>
|
|
290
|
+
>()
|
|
291
|
+
|
|
292
|
+
checkFields<
|
|
293
|
+
Diff<
|
|
294
|
+
{
|
|
295
|
+
__tag__: 'PATCH',
|
|
296
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
__tag__: 'PATCH',
|
|
300
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
301
|
+
},
|
|
302
|
+
'PATCH'
|
|
303
|
+
>
|
|
304
|
+
>()
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
308
|
+
if ('generateStaticParams' in entry) {
|
|
309
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
310
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface PageProps {
|
|
314
|
+
params?: Promise<SegmentParams>
|
|
315
|
+
searchParams?: Promise<any>
|
|
316
|
+
}
|
|
317
|
+
export interface LayoutProps {
|
|
318
|
+
children?: React.ReactNode
|
|
319
|
+
|
|
320
|
+
params?: Promise<SegmentParams>
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// =============
|
|
324
|
+
// Utility types
|
|
325
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
326
|
+
|
|
327
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
328
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
329
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
330
|
+
|
|
331
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
332
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
333
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
334
|
+
|
|
335
|
+
type ParamCheck<T> = {
|
|
336
|
+
__tag__: string
|
|
337
|
+
__param_position__: string
|
|
338
|
+
__param_type__: T
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
342
|
+
|
|
343
|
+
// https://github.com/sindresorhus/type-fest
|
|
344
|
+
type Numeric = number | bigint
|
|
345
|
+
type Zero = 0 | 0n
|
|
346
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
347
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|