@castlekit/castle 0.3.2 → 0.4.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/standalone/.next/BUILD_ID +1 -0
- package/.next/standalone/.next/app-path-routes-manifest.json +29 -0
- package/.next/standalone/.next/build-manifest.json +20 -0
- package/.next/standalone/.next/package.json +1 -0
- package/.next/standalone/.next/prerender-manifest.json +186 -0
- package/.next/standalone/.next/required-server-files.json +322 -0
- package/.next/standalone/.next/routes-manifest.json +213 -0
- package/.next/standalone/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +17 -0
- package/.next/standalone/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/standalone/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +10 -0
- package/.next/standalone/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/_global-error.html +2 -0
- package/.next/standalone/.next/server/app/_global-error.meta +15 -0
- package/.next/standalone/.next/server/app/_global-error.rsc +12 -0
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +12 -0
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/standalone/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +17 -0
- package/.next/standalone/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/_not-found/page.js +15 -0
- package/.next/standalone/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/_not-found.html +1 -0
- package/.next/standalone/.next/server/app/_not-found.meta +16 -0
- package/.next/standalone/.next/server/app/_not-found.rsc +17 -0
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +17 -0
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +8 -0
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/standalone/.next/server/app/api/avatars/[id]/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/avatars/[id]/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/avatars/[id]/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/avatars/[id]/route.js +9 -0
- package/.next/standalone/.next/server/app/api/avatars/[id]/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/avatars/[id]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/avatars/[id]/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/[id]/avatar/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/[id]/avatar/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/[id]/avatar/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/[id]/avatar/route.js +9 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/[id]/avatar/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/[id]/avatar/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/[id]/avatar/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/route.js +9 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/status/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/status/route.js +13 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/agents/status/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/attachments/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/attachments/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/attachments/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/attachments/route.js +13 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/attachments/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/attachments/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/attachments/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/channels/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/channels/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/channels/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/channels/route.js +13 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/channels/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/channels/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/channels/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/route.js +14 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/search/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/search/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/search/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/search/route.js +13 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/search/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/search/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/search/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/storage/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/storage/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/storage/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/storage/route.js +13 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/storage/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/storage/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/chat/storage/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/config/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/config/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/config/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/config/route.js +9 -0
- package/.next/standalone/.next/server/app/api/openclaw/config/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/config/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/config/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/events/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/events/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/events/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/events/route.js +8 -0
- package/.next/standalone/.next/server/app/api/openclaw/events/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/events/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/events/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/logs/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/logs/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/logs/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/logs/route.js +8 -0
- package/.next/standalone/.next/server/app/api/openclaw/logs/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/logs/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/logs/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/ping/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/ping/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/ping/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/ping/route.js +9 -0
- package/.next/standalone/.next/server/app/api/openclaw/ping/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/ping/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/ping/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/restart/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/restart/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/restart/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/restart/route.js +7 -0
- package/.next/standalone/.next/server/app/api/openclaw/restart/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/restart/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/restart/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/context/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/context/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/context/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/context/route.js +14 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/context/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/context/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/context/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/status/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/status/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/status/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/status/route.js +8 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/status/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/status/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/session/status/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/openclaw/sessions/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/openclaw/sessions/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/openclaw/sessions/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/openclaw/sessions/route.js +8 -0
- package/.next/standalone/.next/server/app/api/openclaw/sessions/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/openclaw/sessions/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/openclaw/sessions/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/settings/avatar/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/settings/avatar/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/settings/avatar/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/settings/avatar/route.js +13 -0
- package/.next/standalone/.next/server/app/api/settings/avatar/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/settings/avatar/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/settings/avatar/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/settings/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/settings/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/settings/route.js +13 -0
- package/.next/standalone/.next/server/app/api/settings/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/settings/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page/build-manifest.json +17 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page/react-loadable-manifest.json +1 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page.js +18 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page.js.map +5 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/chat/[channelId]/page_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/chat/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/chat/page/build-manifest.json +17 -0
- package/.next/standalone/.next/server/app/chat/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/chat/page/react-loadable-manifest.json +1 -0
- package/.next/standalone/.next/server/app/chat/page/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/chat/page.js +18 -0
- package/.next/standalone/.next/server/app/chat/page.js.map +5 -0
- package/.next/standalone/.next/server/app/chat/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/chat/page_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/chat.html +1 -0
- package/.next/standalone/.next/server/app/chat.meta +15 -0
- package/.next/standalone/.next/server/app/chat.rsc +26 -0
- package/.next/standalone/.next/server/app/chat.segments/_full.segment.rsc +26 -0
- package/.next/standalone/.next/server/app/chat.segments/_head.segment.rsc +6 -0
- package/.next/standalone/.next/server/app/chat.segments/_index.segment.rsc +8 -0
- package/.next/standalone/.next/server/app/chat.segments/_tree.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/chat.segments/chat/__PAGE__.segment.rsc +9 -0
- package/.next/standalone/.next/server/app/chat.segments/chat.segment.rsc +7 -0
- package/.next/standalone/.next/server/app/icon.png/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/icon.png/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/icon.png/route.js +8 -0
- package/.next/standalone/.next/server/app/icon.png/route.js.map +5 -0
- package/.next/standalone/.next/server/app/icon.png/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/icon.png.body +0 -0
- package/.next/standalone/.next/server/app/icon.png.meta +1 -0
- package/.next/standalone/.next/server/app/index.html +1 -0
- package/.next/standalone/.next/server/app/index.meta +14 -0
- package/.next/standalone/.next/server/app/index.rsc +23 -0
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +23 -0
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +8 -0
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/page/build-manifest.json +17 -0
- package/.next/standalone/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/page.js +17 -0
- package/.next/standalone/.next/server/app/page.js.map +5 -0
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/settings/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/settings/page/build-manifest.json +17 -0
- package/.next/standalone/.next/server/app/settings/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +1 -0
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/settings/page.js +17 -0
- package/.next/standalone/.next/server/app/settings/page.js.map +5 -0
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/settings.html +1 -0
- package/.next/standalone/.next/server/app/settings.meta +15 -0
- package/.next/standalone/.next/server/app/settings.rsc +23 -0
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +23 -0
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +6 -0
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +8 -0
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +9 -0
- package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/ui-kit/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/ui-kit/page/build-manifest.json +17 -0
- package/.next/standalone/.next/server/app/ui-kit/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/ui-kit/page/react-loadable-manifest.json +1 -0
- package/.next/standalone/.next/server/app/ui-kit/page/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/ui-kit/page.js +17 -0
- package/.next/standalone/.next/server/app/ui-kit/page.js.map +5 -0
- package/.next/standalone/.next/server/app/ui-kit/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/ui-kit/page_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/ui-kit.html +1 -0
- package/.next/standalone/.next/server/app/ui-kit.meta +15 -0
- package/.next/standalone/.next/server/app/ui-kit.rsc +23 -0
- package/.next/standalone/.next/server/app/ui-kit.segments/_full.segment.rsc +23 -0
- package/.next/standalone/.next/server/app/ui-kit.segments/_head.segment.rsc +6 -0
- package/.next/standalone/.next/server/app/ui-kit.segments/_index.segment.rsc +8 -0
- package/.next/standalone/.next/server/app/ui-kit.segments/_tree.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/ui-kit.segments/ui-kit/__PAGE__.segment.rsc +9 -0
- package/.next/standalone/.next/server/app/ui-kit.segments/ui-kit.segment.rsc +4 -0
- package/.next/standalone/.next/server/app-paths-manifest.json +29 -0
- package/.next/standalone/.next/server/chunks/[externals]_next_dist_a6d89067._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2824c41d._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__28c35c7d._.js +11 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2aa60cfc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2e91224f._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__361bce14._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__36b434e7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__47efedcd._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4b157e5a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__56815e49._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5ef29d48._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5f6aa90c._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7114163c._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8f5ebbc3._.js +7 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__93758a40._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a80a1099._.js +31 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__af3cebf7._.js +138 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b3182da1._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b39f673e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__bbd3b47c._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c223b7d3._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c7ce1c43._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e50da949._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f41df55c._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__faf9ad2e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fe76fb40._.js +3 -0
- package/.next/standalone/.next/server/chunks/[turbopack]_runtime.js +795 -0
- package/.next/standalone/.next/server/chunks/_b137597c._.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_avatars_[id]_route_actions_21e11acd.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_agents_[id]_avatar_route_actions_1cb9863b.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_agents_route_actions_82d135b1.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_agents_status_route_actions_0b88c8a6.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_chat_attachments_route_actions_07ce0270.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_chat_channels_route_actions_945f54a8.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_chat_route_actions_cd398c8d.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_chat_search_route_actions_d1599780.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_chat_storage_route_actions_fd3e7369.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_config_route_actions_3c2a30de.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_events_route_actions_24b1acfe.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_logs_route_actions_151f8335.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_ping_route_actions_3079a70c.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_restart_route_actions_25b671bb.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_session_context_route_actions_14ebc427.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_session_status_route_actions_060ba4f4.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_openclaw_sessions_route_actions_0c00f4a9.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_settings_avatar_route_actions_e222d284.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_settings_route_actions_a476013b.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_icon_png_route_actions_fa3562e2.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_drizzle-orm_a549359e._.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_drizzle-orm_f8415f57._.js +4 -0
- package/.next/standalone/.next/server/chunks/node_modules_drizzle-orm_index_d5f6a514.js +3 -0
- package/.next/standalone/.next/server/chunks/node_modules_next_1402a1da._.js +17 -0
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_97dac613.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03219135._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f7b131d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1690ee0d._.js +10 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__31de57f6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__4e637dc9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__55ece10e._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__69f5a83d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__a457c799._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__a5ce2f72._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__aecdcbb6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__b4ed2322._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__ca05f4a0._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e2f86be8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e375a3a7._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__ea12eca9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__ed06de41._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__f907a2ce._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[turbopack]_runtime.js +795 -0
- package/.next/standalone/.next/server/chunks/ssr/_0bb5ce6a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_30d6fdaa._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_3b2b917b._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_3bf0a72b._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_539da066._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_6caa74c9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_7a67de23._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_7b52fbee._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_84fe35ec._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_ac1c4494._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_ca23d3b0._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_d04daf62._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_e6db8164._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_ef4d503b._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_chat_[channelId]_page_actions_6220414d.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_chat_page_actions_c92d15a6.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_840229cd.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_ui-kit_page_actions_8486bfbd.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_45598cbe._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_d3586d0c._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_95f27697._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_08570d7f._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_65e60196._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_681edc0a._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_9774470f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_02f39477.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_f9713a08._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_app_0c8a77b8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_app_chat_layout_tsx_31cd0231._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_app_chat_layout_tsx_be09920b._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_app_chat_page_tsx_2a0793ad._.js +3 -0
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__25fe7590._.js +15 -0
- package/.next/standalone/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_78fa9d6a.js +3 -0
- package/.next/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_99e3e1b8.js +6 -0
- package/.next/standalone/.next/server/functions-config-manifest.json +6 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +21 -0
- package/.next/standalone/.next/server/middleware-manifest.json +33 -0
- package/.next/standalone/.next/server/next-font-manifest.js +1 -0
- package/.next/standalone/.next/server/next-font-manifest.json +31 -0
- package/.next/standalone/.next/server/pages/404.html +1 -0
- package/.next/standalone/.next/server/pages/500.html +2 -0
- package/.next/standalone/.next/server/pages-manifest.json +4 -0
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/server-reference-manifest.json +5 -0
- package/.next/standalone/.next/static/IDGX3MGCjqUE6NQVlug5A/_buildManifest.js +11 -0
- package/.next/standalone/.next/static/IDGX3MGCjqUE6NQVlug5A/_clientMiddlewareManifest.json +6 -0
- package/.next/standalone/.next/static/IDGX3MGCjqUE6NQVlug5A/_ssgManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/1c362778d42e76b0.js +1 -0
- package/.next/standalone/.next/static/chunks/2b48886a383c2e37.js +1 -0
- package/.next/standalone/.next/static/chunks/3c2b51fd3ab2ac34.css +3 -0
- package/.next/standalone/.next/static/chunks/3fef23e63934711e.js +1 -0
- package/.next/standalone/.next/static/chunks/5781c606560d6f13.js +1 -0
- package/.next/standalone/.next/static/chunks/5a1105a61e9390f8.js +1 -0
- package/.next/standalone/.next/static/chunks/6468938847443ae8.js +1 -0
- package/.next/standalone/.next/static/chunks/76c064224d953678.js +4 -0
- package/.next/standalone/.next/static/chunks/77868ed664ba62d2.js +1 -0
- package/.next/standalone/.next/static/chunks/7de9141b1af425c3.js +1 -0
- package/.next/standalone/.next/static/chunks/868f09ea8b0a7649.js +1 -0
- package/.next/standalone/.next/static/chunks/97d384ea34b6283a.js +1 -0
- package/.next/standalone/.next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/.next/standalone/.next/static/chunks/a6dad97d9634a72d.js.map +1 -0
- package/.next/standalone/.next/static/chunks/afd967a636289a73.js +1 -0
- package/.next/standalone/.next/static/chunks/bffbc071b1075ac3.js +1 -0
- package/.next/standalone/.next/static/chunks/d11263c7e8894d27.js +1 -0
- package/.next/standalone/.next/static/chunks/f1f489dad7e35d90.js +2 -0
- package/.next/standalone/.next/static/chunks/turbopack-1da073e19f58dee0.js +4 -0
- package/.next/standalone/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/.next/standalone/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/.next/standalone/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/.next/standalone/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/.next/standalone/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/.next/standalone/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/.next/standalone/.next/static/media/icon.4cc5e0bd.png +0 -0
- package/.next/standalone/CHANGELOG.md +194 -0
- package/.next/standalone/CONTRIBUTING.md +46 -0
- package/.next/standalone/LICENSE +21 -0
- package/.next/standalone/README.md +54 -0
- package/.next/standalone/SECURITY.md +80 -0
- package/.next/standalone/bin/castle.js +193 -0
- package/.next/standalone/castle_secrets.py +29 -0
- package/.next/standalone/drizzle.config.ts +7 -0
- package/.next/standalone/index.js +1 -0
- package/.next/standalone/install.ps1 +437 -0
- package/.next/standalone/install.sh +780 -0
- package/.next/standalone/next.config.ts +9 -0
- package/.next/standalone/package-lock.json +8115 -0
- package/.next/standalone/package.json +106 -0
- package/.next/standalone/postcss.config.mjs +7 -0
- package/.next/standalone/server.js +44 -0
- package/.next/standalone/src/app/api/avatars/[id]/route.ts +172 -0
- package/.next/standalone/src/app/api/openclaw/agents/[id]/avatar/route.ts +216 -0
- package/.next/standalone/src/app/api/openclaw/agents/route.ts +149 -0
- package/.next/standalone/src/app/api/openclaw/agents/status/route.ts +55 -0
- package/.next/standalone/src/app/api/openclaw/chat/attachments/route.ts +230 -0
- package/.next/standalone/src/app/api/openclaw/chat/channels/route.ts +217 -0
- package/.next/standalone/src/app/api/openclaw/chat/route.ts +283 -0
- package/.next/standalone/src/app/api/openclaw/chat/search/route.ts +150 -0
- package/.next/standalone/src/app/api/openclaw/chat/storage/route.ts +75 -0
- package/.next/standalone/src/app/api/openclaw/config/route.ts +137 -0
- package/.next/standalone/src/app/api/openclaw/events/route.ts +140 -0
- package/.next/standalone/src/app/api/openclaw/logs/route.ts +74 -0
- package/.next/standalone/src/app/api/openclaw/ping/route.ts +73 -0
- package/.next/standalone/src/app/api/openclaw/restart/route.ts +73 -0
- package/.next/standalone/src/app/api/openclaw/session/context/route.ts +163 -0
- package/.next/standalone/src/app/api/openclaw/session/status/route.ts +210 -0
- package/.next/standalone/src/app/api/openclaw/sessions/route.ts +64 -0
- package/.next/standalone/src/app/api/settings/avatar/route.ts +190 -0
- package/.next/standalone/src/app/api/settings/route.ts +88 -0
- package/.next/standalone/src/app/chat/[channelId]/error-boundary.tsx +64 -0
- package/.next/standalone/src/app/chat/[channelId]/page.tsx +385 -0
- package/.next/standalone/src/app/chat/layout.tsx +96 -0
- package/.next/standalone/src/app/chat/page.tsx +52 -0
- package/.next/standalone/src/app/globals.css +383 -0
- package/.next/standalone/src/app/icon.png +0 -0
- package/.next/standalone/src/app/layout.tsx +48 -0
- package/.next/standalone/src/app/page.tsx +390 -0
- package/.next/standalone/src/app/settings/page.tsx +300 -0
- package/.next/standalone/src/app/ui-kit/page.tsx +684 -0
- package/.next/standalone/src/cli/onboarding.ts +883 -0
- package/.next/standalone/src/components/chat/agent-mention-popup.tsx +89 -0
- package/.next/standalone/src/components/chat/archived-channels.tsx +190 -0
- package/.next/standalone/src/components/chat/channel-list.tsx +140 -0
- package/.next/standalone/src/components/chat/chat-input.tsx +328 -0
- package/.next/standalone/src/components/chat/create-channel-dialog.tsx +171 -0
- package/.next/standalone/src/components/chat/markdown-content.tsx +205 -0
- package/.next/standalone/src/components/chat/message-bubble.tsx +168 -0
- package/.next/standalone/src/components/chat/message-list.tsx +666 -0
- package/.next/standalone/src/components/chat/message-queue.tsx +68 -0
- package/.next/standalone/src/components/chat/session-divider.tsx +61 -0
- package/.next/standalone/src/components/chat/session-stats-panel.tsx +444 -0
- package/.next/standalone/src/components/chat/storage-indicator.tsx +76 -0
- package/.next/standalone/src/components/dashboard/agent-status.tsx +107 -0
- package/.next/standalone/src/components/dashboard/glass-card.tsx +28 -0
- package/.next/standalone/src/components/dashboard/goal-widget.tsx +174 -0
- package/.next/standalone/src/components/dashboard/greeting-widget.tsx +78 -0
- package/.next/standalone/src/components/dashboard/index.ts +7 -0
- package/.next/standalone/src/components/dashboard/stat-widget.tsx +61 -0
- package/.next/standalone/src/components/dashboard/stock-widget.tsx +164 -0
- package/.next/standalone/src/components/dashboard/weather-widget.tsx +68 -0
- package/.next/standalone/src/components/icons/castle-icon.tsx +21 -0
- package/.next/standalone/src/components/kanban/index.ts +3 -0
- package/.next/standalone/src/components/kanban/kanban-board.tsx +391 -0
- package/.next/standalone/src/components/kanban/kanban-card.tsx +137 -0
- package/.next/standalone/src/components/kanban/kanban-column.tsx +98 -0
- package/.next/standalone/src/components/layout/index.ts +4 -0
- package/.next/standalone/src/components/layout/page-header.tsx +20 -0
- package/.next/standalone/src/components/layout/sidebar.tsx +209 -0
- package/.next/standalone/src/components/layout/theme-toggle.tsx +59 -0
- package/.next/standalone/src/components/layout/user-menu.tsx +97 -0
- package/.next/standalone/src/components/providers/presence-provider.tsx +8 -0
- package/.next/standalone/src/components/providers/search-provider.tsx +110 -0
- package/.next/standalone/src/components/search/search-dialog.tsx +269 -0
- package/.next/standalone/src/components/ui/alert.tsx +72 -0
- package/.next/standalone/src/components/ui/avatar.tsx +89 -0
- package/.next/standalone/src/components/ui/badge.tsx +39 -0
- package/.next/standalone/src/components/ui/button.tsx +43 -0
- package/.next/standalone/src/components/ui/card.tsx +107 -0
- package/.next/standalone/src/components/ui/checkbox.tsx +56 -0
- package/.next/standalone/src/components/ui/clock.tsx +171 -0
- package/.next/standalone/src/components/ui/dialog.tsx +111 -0
- package/.next/standalone/src/components/ui/index.ts +34 -0
- package/.next/standalone/src/components/ui/input.tsx +112 -0
- package/.next/standalone/src/components/ui/option-card.tsx +151 -0
- package/.next/standalone/src/components/ui/progress.tsx +103 -0
- package/.next/standalone/src/components/ui/radio.tsx +109 -0
- package/.next/standalone/src/components/ui/select.tsx +46 -0
- package/.next/standalone/src/components/ui/slider.tsx +62 -0
- package/.next/standalone/src/components/ui/tabs.tsx +132 -0
- package/.next/standalone/src/components/ui/toggle-group.tsx +85 -0
- package/.next/standalone/src/components/ui/toggle.tsx +78 -0
- package/.next/standalone/src/components/ui/tooltip.tsx +162 -0
- package/.next/standalone/src/components/ui/twemoji-text.tsx +37 -0
- package/.next/standalone/src/components/ui/uptime.tsx +106 -0
- package/.next/standalone/src/lib/api-security.ts +188 -0
- package/.next/standalone/src/lib/config.ts +227 -0
- package/.next/standalone/src/lib/date-utils.ts +79 -0
- package/.next/standalone/src/lib/db/index.ts +652 -0
- package/.next/standalone/src/lib/db/queries.ts +1144 -0
- package/.next/standalone/src/lib/db/schema.ts +164 -0
- package/.next/standalone/src/lib/device-identity.ts +303 -0
- package/.next/standalone/src/lib/gateway-connection.ts +649 -0
- package/.next/standalone/src/lib/hooks/use-agent-status.ts +251 -0
- package/.next/standalone/src/lib/hooks/use-chat.ts +753 -0
- package/.next/standalone/src/lib/hooks/use-compaction-events.ts +132 -0
- package/.next/standalone/src/lib/hooks/use-context-boundary.ts +82 -0
- package/.next/standalone/src/lib/hooks/use-openclaw.ts +185 -0
- package/.next/standalone/src/lib/hooks/use-search.ts +114 -0
- package/.next/standalone/src/lib/hooks/use-session-stats.ts +60 -0
- package/.next/standalone/src/lib/hooks/use-user-settings.ts +46 -0
- package/.next/standalone/src/lib/sse-singleton.ts +184 -0
- package/.next/standalone/src/lib/types/chat.ts +202 -0
- package/.next/standalone/src/lib/types/search.ts +60 -0
- package/.next/standalone/src/lib/utils.ts +6 -0
- package/.next/standalone/src/middleware.ts +52 -0
- package/.next/standalone/tsconfig.json +34 -0
- package/.next/standalone/vitest.config.ts +14 -0
- package/.next/standalone/vitest.stress.config.ts +14 -0
- package/.next/standalone/zizmor.yml +17 -0
- package/.next/static/IDGX3MGCjqUE6NQVlug5A/_buildManifest.js +11 -0
- package/.next/static/IDGX3MGCjqUE6NQVlug5A/_clientMiddlewareManifest.json +6 -0
- package/.next/static/IDGX3MGCjqUE6NQVlug5A/_ssgManifest.js +1 -0
- package/.next/static/chunks/1c362778d42e76b0.js +1 -0
- package/.next/static/chunks/2b48886a383c2e37.js +1 -0
- package/.next/static/chunks/3c2b51fd3ab2ac34.css +3 -0
- package/.next/static/chunks/3fef23e63934711e.js +1 -0
- package/.next/static/chunks/5781c606560d6f13.js +1 -0
- package/.next/static/chunks/5a1105a61e9390f8.js +1 -0
- package/.next/static/chunks/6468938847443ae8.js +1 -0
- package/.next/static/chunks/76c064224d953678.js +4 -0
- package/.next/static/chunks/77868ed664ba62d2.js +1 -0
- package/.next/static/chunks/7de9141b1af425c3.js +1 -0
- package/.next/static/chunks/868f09ea8b0a7649.js +1 -0
- package/.next/static/chunks/97d384ea34b6283a.js +1 -0
- package/.next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/.next/static/chunks/a6dad97d9634a72d.js.map +1 -0
- package/.next/static/chunks/afd967a636289a73.js +1 -0
- package/.next/static/chunks/bffbc071b1075ac3.js +1 -0
- package/.next/static/chunks/d11263c7e8894d27.js +1 -0
- package/.next/static/chunks/f1f489dad7e35d90.js +2 -0
- package/.next/static/chunks/turbopack-1da073e19f58dee0.js +4 -0
- package/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/.next/static/media/icon.4cc5e0bd.png +0 -0
- package/bin/castle.js +17 -0
- package/install.ps1 +437 -0
- package/install.sh +4 -0
- package/next.config.ts +1 -0
- package/package.json +6 -1
- package/src/cli/onboarding.ts +197 -50
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@castlekit/castle",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "The multi-agent workspace",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"castle": "./bin/castle.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
".next/standalone/",
|
|
11
|
+
".next/static/",
|
|
12
|
+
"bin/",
|
|
13
|
+
"src/",
|
|
14
|
+
"public/",
|
|
15
|
+
"index.js",
|
|
16
|
+
"install.sh",
|
|
17
|
+
"install.ps1",
|
|
18
|
+
"next.config.ts",
|
|
19
|
+
"postcss.config.mjs",
|
|
20
|
+
"tsconfig.json",
|
|
21
|
+
"drizzle.config.ts",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"README.md",
|
|
24
|
+
"!src/**/__tests__/**",
|
|
25
|
+
"!src/**/*.test.*"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"prepack": "next build && cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public 2>/dev/null || true && rm -rf .next/standalone/node_modules",
|
|
29
|
+
"dev": "next dev -p 3333",
|
|
30
|
+
"build": "next build",
|
|
31
|
+
"start": "next start -p 3333",
|
|
32
|
+
"lint": "next lint",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"test:watch": "vitest",
|
|
35
|
+
"stress": "vitest run --config vitest.stress.config.ts",
|
|
36
|
+
"ci": "npm audit --omit=dev --audit-level=high && npm test && npm run build"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/castlekit/castle.git"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"ai",
|
|
44
|
+
"agents",
|
|
45
|
+
"openclaw",
|
|
46
|
+
"multi-agent",
|
|
47
|
+
"local-first"
|
|
48
|
+
],
|
|
49
|
+
"author": "Castle Kit Inc.",
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/castlekit/castle/issues"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://castlekit.com",
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=22"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@clack/prompts": "^1.0.0",
|
|
60
|
+
"@dnd-kit/core": "^6.3.1",
|
|
61
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
62
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
63
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
64
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
65
|
+
"@twemoji/api": "^17.0.2",
|
|
66
|
+
"@types/node": "^25.2.1",
|
|
67
|
+
"@types/react": "^19.2.13",
|
|
68
|
+
"@types/react-dom": "^19.2.3",
|
|
69
|
+
"@types/ws": "^8.18.1",
|
|
70
|
+
"better-sqlite3": "^12.6.2",
|
|
71
|
+
"clsx": "^2.1.1",
|
|
72
|
+
"commander": "^14.0.3",
|
|
73
|
+
"drizzle-orm": "^0.45.1",
|
|
74
|
+
"json5": "^2.2.3",
|
|
75
|
+
"lucide-react": "^0.563.0",
|
|
76
|
+
"next": "^16.1.6",
|
|
77
|
+
"next-themes": "^0.4.6",
|
|
78
|
+
"open": "^11.0.0",
|
|
79
|
+
"picocolors": "^1.1.1",
|
|
80
|
+
"react": "^19.2.4",
|
|
81
|
+
"react-dom": "^19.2.4",
|
|
82
|
+
"react-markdown": "^10.1.0",
|
|
83
|
+
"react-syntax-highlighter": "^16.1.0",
|
|
84
|
+
"recharts": "^3.7.0",
|
|
85
|
+
"remark-gfm": "^4.0.1",
|
|
86
|
+
"sharp": "^0.34.5",
|
|
87
|
+
"swr": "^2.4.0",
|
|
88
|
+
"tailwind-merge": "^3.4.0",
|
|
89
|
+
"tailwindcss": "^4.1.18",
|
|
90
|
+
"tsx": "^4.21.0",
|
|
91
|
+
"typescript": "^5.9.3",
|
|
92
|
+
"uuid": "^13.0.0",
|
|
93
|
+
"ws": "^8.19.0"
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
97
|
+
"@testing-library/react": "^16.3.2",
|
|
98
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
99
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
100
|
+
"@types/sharp": "^0.31.1",
|
|
101
|
+
"@types/uuid": "^10.0.0",
|
|
102
|
+
"drizzle-kit": "^0.31.8",
|
|
103
|
+
"jsdom": "^28.0.0",
|
|
104
|
+
"vitest": "^4.0.18"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
performance.mark('next-start');
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
4
|
+
import module from 'node:module'
|
|
5
|
+
const require = module.createRequire(import.meta.url)
|
|
6
|
+
const __dirname = fileURLToPath(new URL('.', import.meta.url))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const dir = path.join(__dirname)
|
|
10
|
+
|
|
11
|
+
process.env.NODE_ENV = 'production'
|
|
12
|
+
process.chdir(__dirname)
|
|
13
|
+
|
|
14
|
+
const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
15
|
+
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
16
|
+
|
|
17
|
+
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
18
|
+
const nextConfig = {"env":{},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":false},"devIndicators":false,"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/home/runner/work/castle/castle","cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"dynamicOnHover":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":false,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":false,"lockDistDir":true,"isolatedDevBuild":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":false,"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","serverExternalPackages":["better-sqlite3"],"turbopack":{"root":"/home/runner/work/castle/castle"},"distDirRoot":".next"}
|
|
19
|
+
|
|
20
|
+
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
21
|
+
|
|
22
|
+
require('next')
|
|
23
|
+
const { startServer } = require('next/dist/server/lib/start-server')
|
|
24
|
+
|
|
25
|
+
if (
|
|
26
|
+
Number.isNaN(keepAliveTimeout) ||
|
|
27
|
+
!Number.isFinite(keepAliveTimeout) ||
|
|
28
|
+
keepAliveTimeout < 0
|
|
29
|
+
) {
|
|
30
|
+
keepAliveTimeout = undefined
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
startServer({
|
|
34
|
+
dir,
|
|
35
|
+
isDev: false,
|
|
36
|
+
config: nextConfig,
|
|
37
|
+
hostname,
|
|
38
|
+
port: currentPort,
|
|
39
|
+
allowRetry: false,
|
|
40
|
+
keepAliveTimeout,
|
|
41
|
+
}).catch((err) => {
|
|
42
|
+
console.error(err);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
});
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
+
import { readFileSync, existsSync } from "fs";
|
|
3
|
+
import { join, resolve } from "path";
|
|
4
|
+
import { homedir } from "os";
|
|
5
|
+
import { ensureGateway } from "@/lib/gateway-connection";
|
|
6
|
+
|
|
7
|
+
export const dynamic = "force-dynamic";
|
|
8
|
+
|
|
9
|
+
const EXTENSIONS = [".png", ".jpg", ".jpeg", ".webp", ".gif", ".svg"];
|
|
10
|
+
|
|
11
|
+
const MIME_TYPES: Record<string, string> = {
|
|
12
|
+
".png": "image/png",
|
|
13
|
+
".jpg": "image/jpeg",
|
|
14
|
+
".jpeg": "image/jpeg",
|
|
15
|
+
".gif": "image/gif",
|
|
16
|
+
".webp": "image/webp",
|
|
17
|
+
".svg": "image/svg+xml",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const CACHE_HEADERS = { "Cache-Control": "public, max-age=3600" };
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* GET /api/avatars/[id]
|
|
24
|
+
*
|
|
25
|
+
* Proxies avatar images so they work from any device (mobile, Tailscale, etc).
|
|
26
|
+
*
|
|
27
|
+
* Resolution order:
|
|
28
|
+
* 1. Stored URL from Gateway → workspace path or HTTP fetch
|
|
29
|
+
* 2. Local file in ~/.castle/avatars/ or ~/.openclaw/avatars/
|
|
30
|
+
* 3. 404
|
|
31
|
+
*/
|
|
32
|
+
export async function GET(
|
|
33
|
+
_request: NextRequest,
|
|
34
|
+
{ params }: { params: Promise<{ id: string }> }
|
|
35
|
+
) {
|
|
36
|
+
const { id } = await params;
|
|
37
|
+
|
|
38
|
+
// Sanitize
|
|
39
|
+
const safeId = id.replace(/[^a-zA-Z0-9._-]/g, "");
|
|
40
|
+
if (!safeId || safeId.includes("..")) {
|
|
41
|
+
return new NextResponse("Not found", { status: 404 });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 1. Try stored URL from Gateway
|
|
45
|
+
try {
|
|
46
|
+
const gw = ensureGateway();
|
|
47
|
+
const storedUrl = gw.getAvatarUrl(safeId);
|
|
48
|
+
|
|
49
|
+
if (storedUrl) {
|
|
50
|
+
// Workspace-relative: workspace:///absolute/path/to/workspace/avatars/file.png
|
|
51
|
+
if (storedUrl.startsWith("workspace://")) {
|
|
52
|
+
const pathPart = storedUrl.slice("workspace://".length);
|
|
53
|
+
// Resolve ~ in workspace path
|
|
54
|
+
const resolved = resolve(
|
|
55
|
+
pathPart.startsWith("~") ? join(homedir(), pathPart.slice(1)) : pathPart
|
|
56
|
+
);
|
|
57
|
+
// Prevent traversal: resolved path must not escape the workspace
|
|
58
|
+
// and must be a simple file path (no symlink-based escapes for known dirs)
|
|
59
|
+
if (
|
|
60
|
+
!resolved.includes("..") &&
|
|
61
|
+
!resolved.includes("\0") &&
|
|
62
|
+
existsSync(resolved)
|
|
63
|
+
) {
|
|
64
|
+
return serveFile(resolved);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// HTTP(S) URL: fetch server-side and proxy
|
|
68
|
+
else if (storedUrl.startsWith("http://") || storedUrl.startsWith("https://")) {
|
|
69
|
+
const response = await fetchAvatar(storedUrl);
|
|
70
|
+
if (response) return response;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
} catch {
|
|
74
|
+
// Gateway unavailable
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 2. Local avatar directories
|
|
78
|
+
const localDirs = [
|
|
79
|
+
join(homedir(), ".castle", "avatars"),
|
|
80
|
+
join(homedir(), ".openclaw", "avatars"),
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
for (const dir of localDirs) {
|
|
84
|
+
if (!existsSync(dir)) continue;
|
|
85
|
+
|
|
86
|
+
if (/\.\w+$/.test(safeId)) {
|
|
87
|
+
const filePath = join(dir, safeId);
|
|
88
|
+
if (existsSync(filePath)) return serveFile(filePath);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
for (const ext of EXTENSIONS) {
|
|
92
|
+
const filePath = join(dir, `${safeId}${ext}`);
|
|
93
|
+
if (existsSync(filePath)) return serveFile(filePath);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return new NextResponse("Not found", { status: 404 });
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Check if a URL resolves to a private/internal IP range (SSRF protection).
|
|
102
|
+
* Blocks access to localhost, private networks, link-local, and cloud metadata.
|
|
103
|
+
*/
|
|
104
|
+
function isPrivateUrl(urlStr: string): boolean {
|
|
105
|
+
try {
|
|
106
|
+
const parsed = new URL(urlStr);
|
|
107
|
+
const hostname = parsed.hostname;
|
|
108
|
+
|
|
109
|
+
// Block cloud metadata endpoints
|
|
110
|
+
if (hostname === "169.254.169.254" || hostname === "metadata.google.internal") {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Block localhost variants
|
|
115
|
+
if (
|
|
116
|
+
hostname === "localhost" ||
|
|
117
|
+
hostname === "127.0.0.1" ||
|
|
118
|
+
hostname === "::1" ||
|
|
119
|
+
hostname === "0.0.0.0"
|
|
120
|
+
) {
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Block private IP ranges (10.x, 172.16-31.x, 192.168.x)
|
|
125
|
+
const parts = hostname.split(".").map(Number);
|
|
126
|
+
if (parts.length === 4 && parts.every((p) => !isNaN(p))) {
|
|
127
|
+
if (parts[0] === 10) return true;
|
|
128
|
+
if (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) return true;
|
|
129
|
+
if (parts[0] === 192 && parts[1] === 168) return true;
|
|
130
|
+
if (parts[0] === 169 && parts[1] === 254) return true; // link-local
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return false;
|
|
134
|
+
} catch {
|
|
135
|
+
return true; // Reject malformed URLs
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Fetch an avatar from an HTTP URL with a short timeout and SSRF protection */
|
|
140
|
+
async function fetchAvatar(url: string): Promise<NextResponse | null> {
|
|
141
|
+
// Block requests to private/internal networks
|
|
142
|
+
if (isPrivateUrl(url)) return null;
|
|
143
|
+
|
|
144
|
+
try {
|
|
145
|
+
const resp = await fetch(url, { signal: AbortSignal.timeout(2000) });
|
|
146
|
+
if (!resp.ok) return null;
|
|
147
|
+
|
|
148
|
+
const contentType = resp.headers.get("content-type") || "image/png";
|
|
149
|
+
if (!contentType.startsWith("image/")) return null;
|
|
150
|
+
|
|
151
|
+
// Limit response size to prevent memory exhaustion
|
|
152
|
+
const data = Buffer.from(await resp.arrayBuffer());
|
|
153
|
+
if (data.length > 5 * 1024 * 1024) return null; // 5MB max
|
|
154
|
+
|
|
155
|
+
return new NextResponse(data, {
|
|
156
|
+
headers: { "Content-Type": contentType, ...CACHE_HEADERS },
|
|
157
|
+
});
|
|
158
|
+
} catch {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** Serve a local file with appropriate content type */
|
|
164
|
+
function serveFile(filePath: string): NextResponse {
|
|
165
|
+
const data = readFileSync(filePath);
|
|
166
|
+
const ext = filePath.substring(filePath.lastIndexOf(".")).toLowerCase();
|
|
167
|
+
const contentType = MIME_TYPES[ext] || "application/octet-stream";
|
|
168
|
+
|
|
169
|
+
return new NextResponse(data, {
|
|
170
|
+
headers: { "Content-Type": contentType, ...CACHE_HEADERS },
|
|
171
|
+
});
|
|
172
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
+
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
import { homedir } from "os";
|
|
5
|
+
import JSON5 from "json5";
|
|
6
|
+
import sharp from "sharp";
|
|
7
|
+
import { ensureGateway } from "@/lib/gateway-connection";
|
|
8
|
+
import { checkCsrf } from "@/lib/api-security";
|
|
9
|
+
|
|
10
|
+
export const dynamic = "force-dynamic";
|
|
11
|
+
|
|
12
|
+
const MAX_UPLOAD_SIZE = 5 * 1024 * 1024; // 5MB raw upload limit
|
|
13
|
+
const AVATAR_SIZE = 256; // px (square)
|
|
14
|
+
const MAX_OUTPUT_SIZE = 100 * 1024; // 100KB after processing
|
|
15
|
+
|
|
16
|
+
const ALLOWED_TYPES = new Set([
|
|
17
|
+
"image/png",
|
|
18
|
+
"image/jpeg",
|
|
19
|
+
"image/webp",
|
|
20
|
+
"image/gif",
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
interface AgentConfig {
|
|
24
|
+
id: string;
|
|
25
|
+
workspace?: string;
|
|
26
|
+
identity?: Record<string, unknown>;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface OpenClawConfig {
|
|
31
|
+
agents?: {
|
|
32
|
+
list?: AgentConfig[];
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Resize and compress an avatar image to 256x256, under 100KB.
|
|
40
|
+
*/
|
|
41
|
+
async function processAvatar(input: Buffer): Promise<{ data: Buffer; ext: string }> {
|
|
42
|
+
const processed = sharp(input)
|
|
43
|
+
.resize(AVATAR_SIZE, AVATAR_SIZE, { fit: "cover", position: "centre" });
|
|
44
|
+
|
|
45
|
+
// Try PNG first (transparency support)
|
|
46
|
+
let data = await processed.png({ quality: 80, compressionLevel: 9 }).toBuffer();
|
|
47
|
+
if (data.length <= MAX_OUTPUT_SIZE) return { data, ext: ".png" };
|
|
48
|
+
|
|
49
|
+
// WebP (better compression, keeps transparency)
|
|
50
|
+
data = await processed.webp({ quality: 80 }).toBuffer();
|
|
51
|
+
if (data.length <= MAX_OUTPUT_SIZE) return { data, ext: ".webp" };
|
|
52
|
+
|
|
53
|
+
// JPEG with lower quality
|
|
54
|
+
data = await processed.jpeg({ quality: 70 }).toBuffer();
|
|
55
|
+
if (data.length <= MAX_OUTPUT_SIZE) return { data, ext: ".jpg" };
|
|
56
|
+
|
|
57
|
+
// Last resort
|
|
58
|
+
data = await processed.jpeg({ quality: 40 }).toBuffer();
|
|
59
|
+
return { data, ext: ".jpg" };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Find the OpenClaw config file path.
|
|
64
|
+
*/
|
|
65
|
+
function getOpenClawConfigPath(): string | null {
|
|
66
|
+
const paths = [
|
|
67
|
+
join(homedir(), ".openclaw", "openclaw.json"),
|
|
68
|
+
join(homedir(), ".openclaw", "openclaw.json5"),
|
|
69
|
+
];
|
|
70
|
+
for (const p of paths) {
|
|
71
|
+
if (existsSync(p)) return p;
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* POST /api/openclaw/agents/[id]/avatar
|
|
78
|
+
*
|
|
79
|
+
* Upload a new avatar image for an agent.
|
|
80
|
+
* - Resizes to 256x256 and compresses under 100KB
|
|
81
|
+
* - Saves to the agent's workspace directory
|
|
82
|
+
* - Writes config file directly (Gateway hot-reloads identity changes, no restart needed)
|
|
83
|
+
*/
|
|
84
|
+
export async function POST(
|
|
85
|
+
request: NextRequest,
|
|
86
|
+
{ params }: { params: Promise<{ id: string }> }
|
|
87
|
+
) {
|
|
88
|
+
const csrfError = checkCsrf(request);
|
|
89
|
+
if (csrfError) return csrfError;
|
|
90
|
+
|
|
91
|
+
const { id: agentId } = await params;
|
|
92
|
+
|
|
93
|
+
const safeId = agentId.replace(/[^a-zA-Z0-9._-]/g, "");
|
|
94
|
+
if (!safeId) {
|
|
95
|
+
return NextResponse.json({ error: "Invalid agent ID" }, { status: 400 });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const formData = await request.formData();
|
|
99
|
+
const file = formData.get("avatar") as File | null;
|
|
100
|
+
|
|
101
|
+
if (!file) {
|
|
102
|
+
return NextResponse.json({ error: "No file provided" }, { status: 400 });
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!ALLOWED_TYPES.has(file.type)) {
|
|
106
|
+
return NextResponse.json(
|
|
107
|
+
{ error: "Unsupported format. Use PNG, JPEG, WebP, or GIF." },
|
|
108
|
+
{ status: 400 }
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (file.size > MAX_UPLOAD_SIZE) {
|
|
113
|
+
return NextResponse.json(
|
|
114
|
+
{ error: "File too large (max 5MB)" },
|
|
115
|
+
{ status: 400 }
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Process image: resize to 256x256, compress to <100KB
|
|
120
|
+
let processed: { data: Buffer; ext: string };
|
|
121
|
+
try {
|
|
122
|
+
const rawBuffer = Buffer.from(await file.arrayBuffer());
|
|
123
|
+
processed = await processAvatar(rawBuffer);
|
|
124
|
+
} catch (err) {
|
|
125
|
+
return NextResponse.json(
|
|
126
|
+
{ error: `Failed to process image: ${err instanceof Error ? err.message : "unknown"}` },
|
|
127
|
+
{ status: 400 }
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Read the OpenClaw config file directly
|
|
132
|
+
const configPath = getOpenClawConfigPath();
|
|
133
|
+
if (!configPath) {
|
|
134
|
+
return NextResponse.json(
|
|
135
|
+
{ error: "OpenClaw config file not found" },
|
|
136
|
+
{ status: 500 }
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
let config: OpenClawConfig;
|
|
141
|
+
try {
|
|
142
|
+
config = JSON5.parse(readFileSync(configPath, "utf-8"));
|
|
143
|
+
} catch (err) {
|
|
144
|
+
return NextResponse.json(
|
|
145
|
+
{ error: `Failed to read config: ${err instanceof Error ? err.message : "unknown"}` },
|
|
146
|
+
{ status: 500 }
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const agents = config.agents?.list || [];
|
|
151
|
+
const agent = agents.find((a) => a.id === safeId);
|
|
152
|
+
|
|
153
|
+
if (!agent) {
|
|
154
|
+
return NextResponse.json({ error: "Agent not found" }, { status: 404 });
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (!agent.workspace) {
|
|
158
|
+
return NextResponse.json(
|
|
159
|
+
{ error: "Agent has no workspace configured" },
|
|
160
|
+
{ status: 400 }
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const workspacePath = agent.workspace.startsWith("~")
|
|
165
|
+
? join(homedir(), agent.workspace.slice(1))
|
|
166
|
+
: agent.workspace;
|
|
167
|
+
|
|
168
|
+
// Save processed avatar to workspace
|
|
169
|
+
const avatarsDir = join(workspacePath, "avatars");
|
|
170
|
+
const fileName = `avatar${processed.ext}`;
|
|
171
|
+
const filePath = join(avatarsDir, fileName);
|
|
172
|
+
|
|
173
|
+
try {
|
|
174
|
+
mkdirSync(avatarsDir, { recursive: true, mode: 0o755 });
|
|
175
|
+
writeFileSync(filePath, processed.data);
|
|
176
|
+
} catch (err) {
|
|
177
|
+
return NextResponse.json(
|
|
178
|
+
{ error: `Failed to save avatar: ${err instanceof Error ? err.message : "unknown"}` },
|
|
179
|
+
{ status: 500 }
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Update config file directly — Gateway's file watcher hot-reloads identity changes
|
|
184
|
+
// No config.patch, no restart, no WebSocket disconnect
|
|
185
|
+
try {
|
|
186
|
+
agent.identity = agent.identity || {};
|
|
187
|
+
agent.identity.avatar = `avatars/${fileName}`;
|
|
188
|
+
writeFileSync(configPath, JSON5.stringify(config, null, 2), "utf-8");
|
|
189
|
+
} catch (err) {
|
|
190
|
+
return NextResponse.json(
|
|
191
|
+
{ error: `Failed to update config: ${err instanceof Error ? err.message : "unknown"}` },
|
|
192
|
+
{ status: 500 }
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Wait briefly for Gateway's file watcher to hot-reload (~300ms debounce)
|
|
197
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
198
|
+
|
|
199
|
+
// Refresh Castle's agent list from the Gateway
|
|
200
|
+
try {
|
|
201
|
+
const gw = ensureGateway();
|
|
202
|
+
if (gw.isConnected) {
|
|
203
|
+
// Emit a signal so SSE clients re-fetch agents
|
|
204
|
+
gw.emit("agentAvatarUpdated", { agentId: safeId });
|
|
205
|
+
}
|
|
206
|
+
} catch {
|
|
207
|
+
// Non-critical
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return NextResponse.json({
|
|
211
|
+
success: true,
|
|
212
|
+
avatar: `avatars/${fileName}`,
|
|
213
|
+
size: processed.data.length,
|
|
214
|
+
message: "Avatar updated",
|
|
215
|
+
});
|
|
216
|
+
}
|