@helloleo/plugins 0.2.21 → 0.2.23
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/dist/index.js +73 -42
- package/package.json +3 -4
- package/dist/templates/tanstack-router-2026-06-15/components.json +0 -22
- package/dist/templates/tanstack-router-2026-06-15/index.html +0 -20
- package/dist/templates/tanstack-router-2026-06-15/package.json +0 -90
- package/dist/templates/tanstack-router-2026-06-15/src/components/error-component.tsx +0 -50
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/accordion.tsx +0 -51
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/alert-dialog.tsx +0 -115
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/alert.tsx +0 -49
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/aspect-ratio.tsx +0 -5
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/avatar.tsx +0 -47
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/badge.tsx +0 -32
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/breadcrumb.tsx +0 -101
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/button.tsx +0 -49
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/calendar.tsx +0 -177
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/card.tsx +0 -55
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/carousel.tsx +0 -240
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/chart.tsx +0 -331
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/checkbox.tsx +0 -26
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/collapsible.tsx +0 -11
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/command.tsx +0 -143
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/context-menu.tsx +0 -187
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/dialog.tsx +0 -104
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/drawer.tsx +0 -98
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/dropdown-menu.tsx +0 -188
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/form.tsx +0 -171
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/hover-card.tsx +0 -27
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/input-otp.tsx +0 -69
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/input.tsx +0 -22
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/label.tsx +0 -21
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/menubar.tsx +0 -229
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/navigation-menu.tsx +0 -120
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/pagination.tsx +0 -98
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/popover.tsx +0 -31
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/progress.tsx +0 -25
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/radio-group.tsx +0 -36
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/resizable.tsx +0 -37
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/scroll-area.tsx +0 -44
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/select.tsx +0 -152
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/separator.tsx +0 -24
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/sheet.tsx +0 -122
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/sidebar.tsx +0 -744
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/skeleton.tsx +0 -7
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/slider.tsx +0 -23
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/sonner.tsx +0 -23
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/switch.tsx +0 -27
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/table.tsx +0 -94
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/tabs.tsx +0 -53
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/textarea.tsx +0 -21
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/toggle-group.tsx +0 -57
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/toggle.tsx +0 -42
- package/dist/templates/tanstack-router-2026-06-15/src/components/ui/tooltip.tsx +0 -32
- package/dist/templates/tanstack-router-2026-06-15/src/hooks/use-mobile.tsx +0 -19
- package/dist/templates/tanstack-router-2026-06-15/src/lib/proxy.ts +0 -123
- package/dist/templates/tanstack-router-2026-06-15/src/lib/utils.ts +0 -6
- package/dist/templates/tanstack-router-2026-06-15/src/main.tsx +0 -37
- package/dist/templates/tanstack-router-2026-06-15/src/routeTree.gen.ts +0 -59
- package/dist/templates/tanstack-router-2026-06-15/src/routes/README.md +0 -85
- package/dist/templates/tanstack-router-2026-06-15/src/routes/__root.tsx +0 -18
- package/dist/templates/tanstack-router-2026-06-15/src/routes/index.tsx +0 -18
- package/dist/templates/tanstack-router-2026-06-15/src/styles.css +0 -214
- package/dist/templates/tanstack-router-2026-06-15/tsconfig.json +0 -27
- package/dist/templates/tanstack-router-2026-06-15/vite.config.ts +0 -23
- package/dist/templates/tanstack-start-2026-06-18/components.json +0 -22
- package/dist/templates/tanstack-start-2026-06-18/drizzle.config.ts +0 -15
- package/dist/templates/tanstack-start-2026-06-18/package.json +0 -104
- package/dist/templates/tanstack-start-2026-06-18/src/components/error-component.tsx +0 -50
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/accordion.tsx +0 -51
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/alert-dialog.tsx +0 -115
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/alert.tsx +0 -49
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/aspect-ratio.tsx +0 -5
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/avatar.tsx +0 -47
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/badge.tsx +0 -32
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/breadcrumb.tsx +0 -101
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/button.tsx +0 -49
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/calendar.tsx +0 -177
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/card.tsx +0 -55
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/carousel.tsx +0 -240
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/chart.tsx +0 -371
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/checkbox.tsx +0 -26
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/collapsible.tsx +0 -11
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/command.tsx +0 -143
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/context-menu.tsx +0 -187
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/dialog.tsx +0 -104
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/drawer.tsx +0 -98
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/dropdown-menu.tsx +0 -188
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/form.tsx +0 -171
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/hover-card.tsx +0 -27
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/input-otp.tsx +0 -69
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/input.tsx +0 -22
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/label.tsx +0 -21
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/menubar.tsx +0 -229
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/navigation-menu.tsx +0 -120
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/pagination.tsx +0 -98
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/popover.tsx +0 -31
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/progress.tsx +0 -25
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/radio-group.tsx +0 -36
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/resizable.tsx +0 -37
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/scroll-area.tsx +0 -44
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/select.tsx +0 -152
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/separator.tsx +0 -24
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/sheet.tsx +0 -122
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/sidebar.tsx +0 -744
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/skeleton.tsx +0 -7
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/slider.tsx +0 -23
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/sonner.tsx +0 -23
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/switch.tsx +0 -27
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/table.tsx +0 -94
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/tabs.tsx +0 -53
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/textarea.tsx +0 -21
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/toggle-group.tsx +0 -57
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/toggle.tsx +0 -42
- package/dist/templates/tanstack-start-2026-06-18/src/components/ui/tooltip.tsx +0 -32
- package/dist/templates/tanstack-start-2026-06-18/src/db/index.ts +0 -9
- package/dist/templates/tanstack-start-2026-06-18/src/db/schema.ts +0 -18
- package/dist/templates/tanstack-start-2026-06-18/src/global.d.ts +0 -3
- package/dist/templates/tanstack-start-2026-06-18/src/hooks/use-mobile.tsx +0 -19
- package/dist/templates/tanstack-start-2026-06-18/src/lib/proxy.ts +0 -119
- package/dist/templates/tanstack-start-2026-06-18/src/lib/utils.ts +0 -6
- package/dist/templates/tanstack-start-2026-06-18/src/routeTree.gen.ts +0 -86
- package/dist/templates/tanstack-start-2026-06-18/src/router.tsx +0 -37
- package/dist/templates/tanstack-start-2026-06-18/src/routes/README.md +0 -94
- package/dist/templates/tanstack-start-2026-06-18/src/routes/__root.tsx +0 -65
- package/dist/templates/tanstack-start-2026-06-18/src/routes/api/health.ts +0 -81
- package/dist/templates/tanstack-start-2026-06-18/src/routes/index.tsx +0 -33
- package/dist/templates/tanstack-start-2026-06-18/src/server.ts +0 -32
- package/dist/templates/tanstack-start-2026-06-18/src/styles.css +0 -214
- package/dist/templates/tanstack-start-2026-06-18/tsconfig.json +0 -27
- package/dist/templates/tanstack-start-2026-06-18/vite.config.ts +0 -17
- package/src/index.ts +0 -8
- package/src/template-render.ts +0 -53
- package/src/templates/tanstack-router-2026-06-15/components.json +0 -22
- package/src/templates/tanstack-router-2026-06-15/index.html +0 -20
- package/src/templates/tanstack-router-2026-06-15/package.json +0 -90
- package/src/templates/tanstack-router-2026-06-15/src/components/error-component.tsx +0 -50
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/accordion.tsx +0 -51
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/alert-dialog.tsx +0 -115
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/alert.tsx +0 -49
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/avatar.tsx +0 -47
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/badge.tsx +0 -32
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/breadcrumb.tsx +0 -101
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/button.tsx +0 -49
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/calendar.tsx +0 -177
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/card.tsx +0 -55
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/carousel.tsx +0 -240
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/chart.tsx +0 -331
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/checkbox.tsx +0 -26
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/collapsible.tsx +0 -11
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/command.tsx +0 -143
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/context-menu.tsx +0 -187
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/dialog.tsx +0 -104
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/drawer.tsx +0 -98
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/dropdown-menu.tsx +0 -188
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/form.tsx +0 -171
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/hover-card.tsx +0 -27
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/input-otp.tsx +0 -69
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/input.tsx +0 -22
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/label.tsx +0 -21
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/menubar.tsx +0 -229
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/navigation-menu.tsx +0 -120
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/pagination.tsx +0 -98
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/popover.tsx +0 -31
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/progress.tsx +0 -25
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/radio-group.tsx +0 -36
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/resizable.tsx +0 -37
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/scroll-area.tsx +0 -44
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/select.tsx +0 -152
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/separator.tsx +0 -24
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/sheet.tsx +0 -122
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/sidebar.tsx +0 -744
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/skeleton.tsx +0 -7
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/slider.tsx +0 -23
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/sonner.tsx +0 -23
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/switch.tsx +0 -27
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/table.tsx +0 -94
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/tabs.tsx +0 -53
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/textarea.tsx +0 -21
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/toggle-group.tsx +0 -57
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/toggle.tsx +0 -42
- package/src/templates/tanstack-router-2026-06-15/src/components/ui/tooltip.tsx +0 -32
- package/src/templates/tanstack-router-2026-06-15/src/hooks/use-mobile.tsx +0 -19
- package/src/templates/tanstack-router-2026-06-15/src/lib/proxy.ts +0 -123
- package/src/templates/tanstack-router-2026-06-15/src/lib/utils.ts +0 -6
- package/src/templates/tanstack-router-2026-06-15/src/main.tsx +0 -37
- package/src/templates/tanstack-router-2026-06-15/src/routeTree.gen.ts +0 -59
- package/src/templates/tanstack-router-2026-06-15/src/routes/README.md +0 -85
- package/src/templates/tanstack-router-2026-06-15/src/routes/__root.tsx +0 -18
- package/src/templates/tanstack-router-2026-06-15/src/routes/index.tsx +0 -18
- package/src/templates/tanstack-router-2026-06-15/src/styles.css +0 -214
- package/src/templates/tanstack-router-2026-06-15/tsconfig.json +0 -27
- package/src/templates/tanstack-router-2026-06-15/vite.config.ts +0 -23
- package/src/templates/tanstack-start-2026-06-18/components.json +0 -22
- package/src/templates/tanstack-start-2026-06-18/drizzle.config.ts +0 -15
- package/src/templates/tanstack-start-2026-06-18/package.json +0 -104
- package/src/templates/tanstack-start-2026-06-18/src/components/error-component.tsx +0 -50
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/accordion.tsx +0 -51
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/alert-dialog.tsx +0 -115
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/alert.tsx +0 -49
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/avatar.tsx +0 -47
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/badge.tsx +0 -32
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/breadcrumb.tsx +0 -101
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/button.tsx +0 -49
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/calendar.tsx +0 -177
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/card.tsx +0 -55
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/carousel.tsx +0 -240
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/chart.tsx +0 -371
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/checkbox.tsx +0 -26
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/collapsible.tsx +0 -11
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/command.tsx +0 -143
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/context-menu.tsx +0 -187
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/dialog.tsx +0 -104
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/drawer.tsx +0 -98
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/dropdown-menu.tsx +0 -188
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/form.tsx +0 -171
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/hover-card.tsx +0 -27
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/input-otp.tsx +0 -69
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/input.tsx +0 -22
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/label.tsx +0 -21
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/menubar.tsx +0 -229
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/navigation-menu.tsx +0 -120
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/pagination.tsx +0 -98
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/popover.tsx +0 -31
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/progress.tsx +0 -25
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/radio-group.tsx +0 -36
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/resizable.tsx +0 -37
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/scroll-area.tsx +0 -44
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/select.tsx +0 -152
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/separator.tsx +0 -24
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/sheet.tsx +0 -122
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/sidebar.tsx +0 -744
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/skeleton.tsx +0 -7
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/slider.tsx +0 -23
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/sonner.tsx +0 -23
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/switch.tsx +0 -27
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/table.tsx +0 -94
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/tabs.tsx +0 -53
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/textarea.tsx +0 -21
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/toggle-group.tsx +0 -57
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/toggle.tsx +0 -42
- package/src/templates/tanstack-start-2026-06-18/src/components/ui/tooltip.tsx +0 -32
- package/src/templates/tanstack-start-2026-06-18/src/db/index.ts +0 -9
- package/src/templates/tanstack-start-2026-06-18/src/db/schema.ts +0 -18
- package/src/templates/tanstack-start-2026-06-18/src/global.d.ts +0 -3
- package/src/templates/tanstack-start-2026-06-18/src/hooks/use-mobile.tsx +0 -19
- package/src/templates/tanstack-start-2026-06-18/src/lib/proxy.ts +0 -119
- package/src/templates/tanstack-start-2026-06-18/src/lib/utils.ts +0 -6
- package/src/templates/tanstack-start-2026-06-18/src/routeTree.gen.ts +0 -86
- package/src/templates/tanstack-start-2026-06-18/src/router.tsx +0 -37
- package/src/templates/tanstack-start-2026-06-18/src/routes/README.md +0 -94
- package/src/templates/tanstack-start-2026-06-18/src/routes/__root.tsx +0 -65
- package/src/templates/tanstack-start-2026-06-18/src/routes/api/health.ts +0 -81
- package/src/templates/tanstack-start-2026-06-18/src/routes/index.tsx +0 -33
- package/src/templates/tanstack-start-2026-06-18/src/server.ts +0 -32
- package/src/templates/tanstack-start-2026-06-18/src/styles.css +0 -214
- package/src/templates/tanstack-start-2026-06-18/tsconfig.json +0 -27
- package/src/templates/tanstack-start-2026-06-18/vite.config.ts +0 -17
- package/src/templates/tanstack-start-2026-07-30/components.json +0 -22
- package/src/templates/tanstack-start-2026-07-30/drizzle/meta/_journal.json +0 -1
- package/src/templates/tanstack-start-2026-07-30/drizzle.config.ts +0 -18
- package/src/templates/tanstack-start-2026-07-30/package.json +0 -103
- package/src/templates/tanstack-start-2026-07-30/src/components/error-component.tsx +0 -50
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/accordion.tsx +0 -51
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/alert-dialog.tsx +0 -115
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/alert.tsx +0 -49
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/avatar.tsx +0 -47
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/badge.tsx +0 -32
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/breadcrumb.tsx +0 -101
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/button.tsx +0 -49
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/calendar.tsx +0 -177
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/card.tsx +0 -55
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/carousel.tsx +0 -240
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/chart.tsx +0 -371
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/checkbox.tsx +0 -26
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/collapsible.tsx +0 -11
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/command.tsx +0 -143
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/context-menu.tsx +0 -187
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/dialog.tsx +0 -104
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/drawer.tsx +0 -98
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/dropdown-menu.tsx +0 -188
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/form.tsx +0 -171
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/hover-card.tsx +0 -27
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/input-otp.tsx +0 -69
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/input.tsx +0 -22
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/label.tsx +0 -21
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/menubar.tsx +0 -229
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/navigation-menu.tsx +0 -120
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/pagination.tsx +0 -98
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/popover.tsx +0 -31
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/progress.tsx +0 -25
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/radio-group.tsx +0 -36
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/resizable.tsx +0 -37
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/scroll-area.tsx +0 -44
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/select.tsx +0 -152
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/separator.tsx +0 -24
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/sheet.tsx +0 -122
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/sidebar.tsx +0 -744
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/skeleton.tsx +0 -7
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/slider.tsx +0 -23
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/sonner.tsx +0 -23
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/switch.tsx +0 -27
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/table.tsx +0 -94
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/tabs.tsx +0 -53
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/textarea.tsx +0 -21
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/toggle-group.tsx +0 -57
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/toggle.tsx +0 -42
- package/src/templates/tanstack-start-2026-07-30/src/components/ui/tooltip.tsx +0 -32
- package/src/templates/tanstack-start-2026-07-30/src/db/index.ts +0 -9
- package/src/templates/tanstack-start-2026-07-30/src/db/schema.ts +0 -34
- package/src/templates/tanstack-start-2026-07-30/src/global.d.ts +0 -3
- package/src/templates/tanstack-start-2026-07-30/src/hooks/use-mobile.tsx +0 -19
- package/src/templates/tanstack-start-2026-07-30/src/lib/kv.ts +0 -37
- package/src/templates/tanstack-start-2026-07-30/src/lib/proxy.ts +0 -111
- package/src/templates/tanstack-start-2026-07-30/src/lib/storage.ts +0 -45
- package/src/templates/tanstack-start-2026-07-30/src/lib/utils.ts +0 -6
- package/src/templates/tanstack-start-2026-07-30/src/routeTree.gen.ts +0 -86
- package/src/templates/tanstack-start-2026-07-30/src/router.tsx +0 -37
- package/src/templates/tanstack-start-2026-07-30/src/routes/README.md +0 -94
- package/src/templates/tanstack-start-2026-07-30/src/routes/__root.tsx +0 -65
- package/src/templates/tanstack-start-2026-07-30/src/routes/api/health.ts +0 -83
- package/src/templates/tanstack-start-2026-07-30/src/routes/index.tsx +0 -33
- package/src/templates/tanstack-start-2026-07-30/src/server.ts +0 -32
- package/src/templates/tanstack-start-2026-07-30/src/styles.css +0 -214
- package/src/templates/tanstack-start-2026-07-30/tsconfig.json +0 -27
- package/src/templates/tanstack-start-2026-07-30/vite.config.ts +0 -17
- package/src/tools/create-plan.ts +0 -61
- package/src/tools/inspect-http.ts +0 -276
- package/src/tools/list-plans.ts +0 -85
- package/src/tools/modify-plan.ts +0 -79
- package/src/tools/remove.ts +0 -53
- package/src/tools/scaffold.ts +0 -213
- package/src/tools/setup-authentication/auth-files.ts +0 -144
- package/src/tools/setup-authentication/constants.ts +0 -19
- package/src/tools/setup-authentication/db-schema.ts +0 -96
- package/src/tools/setup-authentication/index.ts +0 -148
- package/src/tools/setup-authentication/package-json.ts +0 -17
- package/src/tools/setup-authentication/pages.ts +0 -241
- package/src/tools/setup-netsuite.ts +0 -1404
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from '@helloleo/vite-config'
|
|
2
|
-
|
|
3
|
-
// @helloleo/vite-config owns the whole build/dev/sandbox pipeline: in dev it
|
|
4
|
-
// aliases `cloudflare:workers` -> @helloleo/runtime/cf-shim (libsql .dev.db for
|
|
5
|
-
// D1+KV, local disk for R2) and runs plain Vite SSR; at build it adds
|
|
6
|
-
// @cloudflare/vite-plugin to emit a workerd Worker bound to wrangler.jsonc. It
|
|
7
|
-
// also binds host:true/port:5173 itself (>=0.1.2).
|
|
8
|
-
//
|
|
9
|
-
// The one thing the wrapper doesn't set: HMR over the HelloLeo preview proxy,
|
|
10
|
-
// which terminates HTTPS on :443 — so point the HMR client at wss://…:443.
|
|
11
|
-
export default defineConfig({
|
|
12
|
-
vite: {
|
|
13
|
-
server: {
|
|
14
|
-
hmr: { clientPort: 443, protocol: 'wss' },
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
})
|
package/src/tools/create-plan.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { mkdir } from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import type { Plugin } from "@opencode-ai/plugin";
|
|
4
|
-
import { tool } from "@opencode-ai/plugin";
|
|
5
|
-
|
|
6
|
-
function slug(title: string) {
|
|
7
|
-
return title
|
|
8
|
-
.toLowerCase()
|
|
9
|
-
.replace(/[^a-z0-9]+/g, "-")
|
|
10
|
-
.replace(/^-|-$/g, "")
|
|
11
|
-
.slice(0, 60);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function frontmatter(fields: Record<string, string>) {
|
|
15
|
-
const lines = Object.entries(fields).map(([k, v]) => `${k}: ${v}`);
|
|
16
|
-
return `---\n${lines.join("\n")}\n---`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const createPlan = tool({
|
|
20
|
-
description:
|
|
21
|
-
"Create a new plan file in .leo/plans/. Plans use markdown with YAML frontmatter " +
|
|
22
|
-
"tracking title, status, and timestamps. The plan ID is a slug derived from the title.",
|
|
23
|
-
args: {
|
|
24
|
-
title: tool.schema.string().describe("Title of the plan"),
|
|
25
|
-
content: tool.schema.string().describe("Markdown body of the plan"),
|
|
26
|
-
},
|
|
27
|
-
async execute(args, context) {
|
|
28
|
-
const dir = path.join(context.directory, ".leo", "plans");
|
|
29
|
-
await mkdir(dir, { recursive: true });
|
|
30
|
-
|
|
31
|
-
let id = slug(args.title);
|
|
32
|
-
let filepath = path.join(dir, `${id}.md`);
|
|
33
|
-
let suffix = 1;
|
|
34
|
-
|
|
35
|
-
while (await Bun.file(filepath).exists()) {
|
|
36
|
-
suffix++;
|
|
37
|
-
id = `${slug(args.title)}-${suffix}`;
|
|
38
|
-
filepath = path.join(dir, `${id}.md`);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const now = new Date().toISOString();
|
|
42
|
-
const header = frontmatter({
|
|
43
|
-
title: args.title,
|
|
44
|
-
status: "active",
|
|
45
|
-
created: now,
|
|
46
|
-
modified: now,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const body = `${header}\n\n${args.content}\n`;
|
|
50
|
-
await Bun.write(filepath, body);
|
|
51
|
-
|
|
52
|
-
const relative = path.relative(context.directory, filepath);
|
|
53
|
-
return `Created plan "${args.title}" at ${relative}\n\n${body}`;
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
export const CreatePlanPlugin: Plugin = async () => {
|
|
58
|
-
return {
|
|
59
|
-
tool: { create_plan: createPlan },
|
|
60
|
-
};
|
|
61
|
-
};
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from "@opencode-ai/plugin";
|
|
2
|
-
import { tool } from "@opencode-ai/plugin";
|
|
3
|
-
|
|
4
|
-
const z = tool.schema;
|
|
5
|
-
|
|
6
|
-
const hosts = {
|
|
7
|
-
"helloleo.dev": {
|
|
8
|
-
private: true,
|
|
9
|
-
},
|
|
10
|
-
"helloleo.app": {
|
|
11
|
-
private: false,
|
|
12
|
-
},
|
|
13
|
-
"augustin-d60.workers.dev": {
|
|
14
|
-
private: false,
|
|
15
|
-
},
|
|
16
|
-
} as const;
|
|
17
|
-
|
|
18
|
-
const DEFAULT_TIMEOUT_MS = 15_000;
|
|
19
|
-
const MAX_TIMEOUT_MS = 30_000;
|
|
20
|
-
const MAX_RESPONSE_BYTES = 1_000_000;
|
|
21
|
-
|
|
22
|
-
const METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE"] as const;
|
|
23
|
-
const METHODS_AUTO_JSON = new Set(["POST", "PUT", "PATCH"]);
|
|
24
|
-
|
|
25
|
-
// tool() is an identity function; parse args explicitly so .default() applies.
|
|
26
|
-
const argsShape = {
|
|
27
|
-
url: z
|
|
28
|
-
.string()
|
|
29
|
-
.describe(
|
|
30
|
-
"Fully-qualified URL to request. Must be on the HelloLeo whitelist " +
|
|
31
|
-
"(**.helloleo.dev, **.helloleo.app, **.augustin-d60.workers.dev).",
|
|
32
|
-
),
|
|
33
|
-
method: z
|
|
34
|
-
.enum(METHODS)
|
|
35
|
-
.default("GET")
|
|
36
|
-
.describe(`HTTP method (${METHODS.join(", ")}). Defaults to GET.`),
|
|
37
|
-
body: z
|
|
38
|
-
.string()
|
|
39
|
-
.optional()
|
|
40
|
-
.describe(
|
|
41
|
-
"Request body as a string. Not valid for GET. Sent with " +
|
|
42
|
-
"Content-Type: application/json on POST/PUT/PATCH unless a " +
|
|
43
|
-
"different Content-Type is supplied via headers.",
|
|
44
|
-
),
|
|
45
|
-
headers: z
|
|
46
|
-
.record(z.string(), z.string())
|
|
47
|
-
.default({})
|
|
48
|
-
.describe(
|
|
49
|
-
"Optional additional request headers as key/value pairs (e.g. Authorization).",
|
|
50
|
-
),
|
|
51
|
-
timeout: z
|
|
52
|
-
.number()
|
|
53
|
-
.max(MAX_TIMEOUT_MS)
|
|
54
|
-
.default(DEFAULT_TIMEOUT_MS)
|
|
55
|
-
.describe(
|
|
56
|
-
`Optional timeout in milliseconds (max ${MAX_TIMEOUT_MS}, default ${DEFAULT_TIMEOUT_MS}).`,
|
|
57
|
-
),
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const argsSchema = z.object(argsShape);
|
|
61
|
-
|
|
62
|
-
export const inspectHttp = tool({
|
|
63
|
-
description:
|
|
64
|
-
"Send an HTTP request to a HelloLeo endpoint and return the status code, " +
|
|
65
|
-
"response headers, and response body. Use this to inspect the live behaviour " +
|
|
66
|
-
"of HelloLeo workers, the production API, or preview deployments so you can " +
|
|
67
|
-
"self-debug instead of operating blind. ",
|
|
68
|
-
args: argsShape,
|
|
69
|
-
async execute(rawArgs, context) {
|
|
70
|
-
const args = argsSchema.parse(rawArgs);
|
|
71
|
-
const url = parseTargetUrl(args.url);
|
|
72
|
-
|
|
73
|
-
if (args.method === "GET" && args.body !== undefined) {
|
|
74
|
-
throw new Error("GET requests cannot have a body");
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
await context.ask({
|
|
78
|
-
permission: "inspect_http",
|
|
79
|
-
patterns: [url.toString()],
|
|
80
|
-
always: [`${url.protocol}//${url.hostname}/*`],
|
|
81
|
-
metadata: {
|
|
82
|
-
url: url.toString(),
|
|
83
|
-
method: args.method,
|
|
84
|
-
hasBody: args.body !== undefined,
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
const timeoutMs = Math.max(1, Math.min(args.timeout, MAX_TIMEOUT_MS));
|
|
89
|
-
|
|
90
|
-
const previewGateSecret = process.env.PREVIEW_INSPECT_SECRET;
|
|
91
|
-
const defaultUserAgent =
|
|
92
|
-
isPrivateHost(url.hostname) && previewGateSecret
|
|
93
|
-
? `LeoInspect/${previewGateSecret}`
|
|
94
|
-
: "leoInspect/0.1";
|
|
95
|
-
|
|
96
|
-
const requestHeaders: Record<string, string> = {
|
|
97
|
-
Accept: "application/json, text/plain, */*",
|
|
98
|
-
"User-Agent": defaultUserAgent,
|
|
99
|
-
Origin: "https://app.helloleo.dev",
|
|
100
|
-
...args.headers,
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
if (
|
|
104
|
-
METHODS_AUTO_JSON.has(args.method) &&
|
|
105
|
-
args.body !== undefined &&
|
|
106
|
-
!hasHeader(requestHeaders, "content-type")
|
|
107
|
-
) {
|
|
108
|
-
requestHeaders["Content-Type"] = "application/json";
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const signal = AbortSignal.any([
|
|
112
|
-
context.abort,
|
|
113
|
-
AbortSignal.timeout(timeoutMs),
|
|
114
|
-
]);
|
|
115
|
-
|
|
116
|
-
let response: Response;
|
|
117
|
-
try {
|
|
118
|
-
response = await fetch(url, {
|
|
119
|
-
method: args.method,
|
|
120
|
-
headers: requestHeaders,
|
|
121
|
-
body: args.method === "GET" ? undefined : args.body,
|
|
122
|
-
signal,
|
|
123
|
-
redirect: "follow",
|
|
124
|
-
});
|
|
125
|
-
} catch (err) {
|
|
126
|
-
if (err instanceof DOMException && err.name === "TimeoutError") {
|
|
127
|
-
throw new Error(`Request timed out after ${timeoutMs}ms`);
|
|
128
|
-
}
|
|
129
|
-
if (err instanceof DOMException && err.name === "AbortError") {
|
|
130
|
-
throw new Error("Request aborted");
|
|
131
|
-
}
|
|
132
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
133
|
-
throw new Error(`Request failed: ${message}`);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const { text, truncated } = await readBody(response);
|
|
137
|
-
const contentType = response.headers.get("content-type");
|
|
138
|
-
const formattedBody = formatBody(text, contentType);
|
|
139
|
-
|
|
140
|
-
const redirected = response.url && response.url !== url.toString();
|
|
141
|
-
|
|
142
|
-
const lines: string[] = [`${args.method} ${url.toString()}`];
|
|
143
|
-
if (redirected) {
|
|
144
|
-
lines.push(`Final URL: ${response.url}`);
|
|
145
|
-
}
|
|
146
|
-
lines.push(
|
|
147
|
-
`Status: ${response.status}${response.statusText ? ` ${response.statusText}` : ""}`,
|
|
148
|
-
"",
|
|
149
|
-
"Response headers:",
|
|
150
|
-
formatHeaders(response.headers) || "(none)",
|
|
151
|
-
"",
|
|
152
|
-
"Response body:",
|
|
153
|
-
formattedBody.length > 0 ? formattedBody : "(empty)",
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
if (truncated) {
|
|
157
|
-
lines.push("", `(body truncated at ${MAX_RESPONSE_BYTES} bytes)`);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
return lines.join("\n");
|
|
161
|
-
},
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
function parseTargetUrl(raw: string): URL {
|
|
165
|
-
let url: URL;
|
|
166
|
-
try {
|
|
167
|
-
url = new URL(raw);
|
|
168
|
-
} catch {
|
|
169
|
-
throw new Error(`Invalid URL: ${raw}`);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (url.protocol !== "https:" && url.protocol !== "http:") {
|
|
173
|
-
throw new Error(
|
|
174
|
-
`URL must use http or https scheme (got "${url.protocol}")`,
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (url.username || url.password) {
|
|
179
|
-
throw new Error("URL must not contain embedded credentials");
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (!isAllowedHost(url.hostname)) {
|
|
183
|
-
throw new Error(
|
|
184
|
-
`Host "${url.hostname}" is not on the HelloLeo whitelist. Allowed: ${allowedHostsHuman()}`,
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return url;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
type HostBase = keyof typeof hosts;
|
|
192
|
-
|
|
193
|
-
function findHostBase(hostname: string): HostBase | null {
|
|
194
|
-
const host = hostname.toLowerCase().replace(/\.$/, "");
|
|
195
|
-
for (const base of Object.keys(hosts) as HostBase[]) {
|
|
196
|
-
if (host === base || host.endsWith(`.${base}`)) return base;
|
|
197
|
-
}
|
|
198
|
-
return null;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function allowedHostsHuman(): string {
|
|
202
|
-
return (Object.keys(hosts) as HostBase[])
|
|
203
|
-
.map((base) => `**.${base}`)
|
|
204
|
-
.join(", ");
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function isAllowedHost(hostname: string): boolean {
|
|
208
|
-
return findHostBase(hostname) !== null;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function isPrivateHost(hostname: string): boolean {
|
|
212
|
-
const base = findHostBase(hostname);
|
|
213
|
-
return base !== null && hosts[base].private;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function hasHeader(headers: Record<string, string>, name: string): boolean {
|
|
217
|
-
const target = name.toLowerCase();
|
|
218
|
-
for (const key of Object.keys(headers)) {
|
|
219
|
-
if (key.toLowerCase() === target) return true;
|
|
220
|
-
}
|
|
221
|
-
return false;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function formatHeaders(headers: Headers): string {
|
|
225
|
-
const entries: string[] = [];
|
|
226
|
-
headers.forEach((value, key) => {
|
|
227
|
-
entries.push(`${key}: ${value}`);
|
|
228
|
-
});
|
|
229
|
-
return entries.sort().join("\n");
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
function formatBody(raw: string, contentType: string | null): string {
|
|
233
|
-
const mime = contentType?.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
234
|
-
if (mime.includes("application/json") || mime.endsWith("+json")) {
|
|
235
|
-
try {
|
|
236
|
-
return JSON.stringify(JSON.parse(raw), null, 2);
|
|
237
|
-
} catch {}
|
|
238
|
-
}
|
|
239
|
-
return raw;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
async function readBody(response: Response): Promise<{
|
|
243
|
-
text: string;
|
|
244
|
-
truncated: boolean;
|
|
245
|
-
}> {
|
|
246
|
-
if (!response.body) return { text: "", truncated: false };
|
|
247
|
-
|
|
248
|
-
const reader = response.body.getReader();
|
|
249
|
-
const decoder = new TextDecoder();
|
|
250
|
-
let text = "";
|
|
251
|
-
let total = 0;
|
|
252
|
-
let truncated = false;
|
|
253
|
-
|
|
254
|
-
while (true) {
|
|
255
|
-
const { done, value } = await reader.read();
|
|
256
|
-
if (done) break;
|
|
257
|
-
if (!value) continue;
|
|
258
|
-
|
|
259
|
-
total += value.byteLength;
|
|
260
|
-
if (total > MAX_RESPONSE_BYTES) {
|
|
261
|
-
truncated = true;
|
|
262
|
-
await reader.cancel();
|
|
263
|
-
break;
|
|
264
|
-
}
|
|
265
|
-
text += decoder.decode(value, { stream: true });
|
|
266
|
-
}
|
|
267
|
-
text += decoder.decode();
|
|
268
|
-
|
|
269
|
-
return { text, truncated };
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export const InspectHttpPlugin: Plugin = async () => {
|
|
273
|
-
return {
|
|
274
|
-
tool: { inspect_http: inspectHttp },
|
|
275
|
-
};
|
|
276
|
-
};
|
package/src/tools/list-plans.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import type { Plugin } from "@opencode-ai/plugin";
|
|
4
|
-
import { tool } from "@opencode-ai/plugin";
|
|
5
|
-
|
|
6
|
-
const STATUS = ["active", "completed", "cancelled"] as const;
|
|
7
|
-
|
|
8
|
-
function parseFrontmatter(raw: string) {
|
|
9
|
-
const match = raw.match(/^---\n([\s\S]*?)\n---/);
|
|
10
|
-
if (!match) return {} as Record<string, string>;
|
|
11
|
-
|
|
12
|
-
const fields: Record<string, string> = {};
|
|
13
|
-
for (const line of (match[1] ?? "").split("\n")) {
|
|
14
|
-
const idx = line.indexOf(":");
|
|
15
|
-
if (idx === -1) continue;
|
|
16
|
-
fields[line.slice(0, idx).trim()] = line.slice(idx + 1).trim();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return fields;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const listPlans = tool({
|
|
23
|
-
description:
|
|
24
|
-
"List all plans in .leo/plans/. Returns each plan's slug, title, status, and last modified date. " +
|
|
25
|
-
"Optionally filter by status.",
|
|
26
|
-
args: {
|
|
27
|
-
status: tool.schema
|
|
28
|
-
.enum(STATUS)
|
|
29
|
-
.optional()
|
|
30
|
-
.describe(`Filter plans by status: ${STATUS.join(", ")}`),
|
|
31
|
-
},
|
|
32
|
-
async execute(args, context) {
|
|
33
|
-
const dir = path.join(context.directory, ".leo", "plans");
|
|
34
|
-
|
|
35
|
-
if (!existsSync(dir)) {
|
|
36
|
-
return args.status
|
|
37
|
-
? `No plans with status "${args.status}"`
|
|
38
|
-
: "No plans found";
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const glob = new Bun.Glob("*.md");
|
|
42
|
-
const entries: {
|
|
43
|
-
id: string;
|
|
44
|
-
title: string;
|
|
45
|
-
status: string;
|
|
46
|
-
modified: string;
|
|
47
|
-
}[] = [];
|
|
48
|
-
|
|
49
|
-
for await (const match of glob.scan({ cwd: dir, absolute: true })) {
|
|
50
|
-
const raw = await Bun.file(match).text();
|
|
51
|
-
const fields = parseFrontmatter(raw);
|
|
52
|
-
const id = path.basename(match, ".md");
|
|
53
|
-
|
|
54
|
-
if (args.status && fields.status !== args.status) continue;
|
|
55
|
-
|
|
56
|
-
entries.push({
|
|
57
|
-
id,
|
|
58
|
-
title: fields.title ?? id,
|
|
59
|
-
status: fields.status ?? "unknown",
|
|
60
|
-
modified: fields.modified ?? fields.created ?? "unknown",
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (entries.length === 0) {
|
|
65
|
-
return args.status
|
|
66
|
-
? `No plans with status "${args.status}"`
|
|
67
|
-
: "No plans found";
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
entries.sort((a, b) => (b.modified > a.modified ? 1 : -1));
|
|
71
|
-
|
|
72
|
-
const header = `Found ${entries.length} plan${entries.length === 1 ? "" : "s"}:\n`;
|
|
73
|
-
const rows = entries.map(
|
|
74
|
-
(e) => `${e.id} | ${e.status} | ${e.title} | modified ${e.modified}`,
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
return header + rows.join("\n");
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
export const ListPlansPlugin: Plugin = async () => {
|
|
82
|
-
return {
|
|
83
|
-
tool: { list_plans: listPlans },
|
|
84
|
-
};
|
|
85
|
-
};
|
package/src/tools/modify-plan.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import type { Plugin } from "@opencode-ai/plugin";
|
|
3
|
-
import { tool } from "@opencode-ai/plugin";
|
|
4
|
-
|
|
5
|
-
const STATUS = ["active", "completed", "cancelled"] as const;
|
|
6
|
-
|
|
7
|
-
function parseFrontmatter(raw: string) {
|
|
8
|
-
const match = raw.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
|
|
9
|
-
if (!match) return { fields: {} as Record<string, string>, body: raw };
|
|
10
|
-
|
|
11
|
-
const fields: Record<string, string> = {};
|
|
12
|
-
for (const line of (match[1] ?? "").split("\n")) {
|
|
13
|
-
const idx = line.indexOf(":");
|
|
14
|
-
if (idx === -1) continue;
|
|
15
|
-
fields[line.slice(0, idx).trim()] = line.slice(idx + 1).trim();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return { fields, body: (match[2] ?? "").trim() };
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function formatFrontmatter(fields: Record<string, string>, body: string) {
|
|
22
|
-
const lines = Object.entries(fields).map(([k, v]) => `${k}: ${v}`);
|
|
23
|
-
return `---\n${lines.join("\n")}\n---\n\n${body}\n`;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const modifyPlan = tool({
|
|
27
|
-
description:
|
|
28
|
-
"Modify an existing plan in .leo/plans/. You can update the content, the status, or both. " +
|
|
29
|
-
"The modified timestamp is updated automatically.",
|
|
30
|
-
args: {
|
|
31
|
-
planId: tool.schema
|
|
32
|
-
.string()
|
|
33
|
-
.describe("Plan slug ID (e.g. refactor-auth-flow)"),
|
|
34
|
-
content: tool.schema
|
|
35
|
-
.string()
|
|
36
|
-
.optional()
|
|
37
|
-
.describe("New markdown body for the plan"),
|
|
38
|
-
status: tool.schema
|
|
39
|
-
.enum(STATUS)
|
|
40
|
-
.optional()
|
|
41
|
-
.describe("New status for the plan"),
|
|
42
|
-
},
|
|
43
|
-
async execute(args, context) {
|
|
44
|
-
if (!args.content && !args.status) {
|
|
45
|
-
throw new Error("Provide at least one of content or status to modify");
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const filepath = path.join(
|
|
49
|
-
context.directory,
|
|
50
|
-
".leo",
|
|
51
|
-
"plans",
|
|
52
|
-
`${args.planId}.md`,
|
|
53
|
-
);
|
|
54
|
-
const file = Bun.file(filepath);
|
|
55
|
-
|
|
56
|
-
if (!(await file.exists())) {
|
|
57
|
-
throw new Error(`Plan not found: ${args.planId}`);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const raw = await file.text();
|
|
61
|
-
const parsed = parseFrontmatter(raw);
|
|
62
|
-
|
|
63
|
-
if (args.status) parsed.fields.status = args.status;
|
|
64
|
-
parsed.fields.modified = new Date().toISOString();
|
|
65
|
-
|
|
66
|
-
const body = args.content ?? parsed.body;
|
|
67
|
-
const output = formatFrontmatter(parsed.fields, body);
|
|
68
|
-
await Bun.write(filepath, output);
|
|
69
|
-
|
|
70
|
-
const relative = path.relative(context.directory, filepath);
|
|
71
|
-
return `Updated plan "${args.planId}" at ${relative}\n\n${output}`;
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
export const ModifyPlanPlugin: Plugin = async () => {
|
|
76
|
-
return {
|
|
77
|
-
tool: { modify_plan: modifyPlan },
|
|
78
|
-
};
|
|
79
|
-
};
|
package/src/tools/remove.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { unlink } from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import type { Plugin } from "@opencode-ai/plugin";
|
|
4
|
-
import { tool } from "@opencode-ai/plugin";
|
|
5
|
-
|
|
6
|
-
export const remove = tool({
|
|
7
|
-
description:
|
|
8
|
-
"Remove a file from the project. The file path must be relative to the project root. " +
|
|
9
|
-
"This tool will ask for permission before deleting. " +
|
|
10
|
-
"Cannot delete files outside the project boundary.",
|
|
11
|
-
args: {
|
|
12
|
-
filePath: tool.schema
|
|
13
|
-
.string()
|
|
14
|
-
.describe("Relative path to the file to remove (e.g. src/App.tsx)"),
|
|
15
|
-
},
|
|
16
|
-
async execute(args, context) {
|
|
17
|
-
const resolved = path.resolve(context.directory, args.filePath);
|
|
18
|
-
const normalized = path.normalize(resolved);
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
!normalized.startsWith(context.directory + path.sep) &&
|
|
22
|
-
normalized !== context.directory
|
|
23
|
-
) {
|
|
24
|
-
throw new Error(
|
|
25
|
-
`Path "${args.filePath}" resolves outside the project boundary. Deletion blocked.`,
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const file = Bun.file(resolved);
|
|
30
|
-
if (!(await file.exists())) {
|
|
31
|
-
throw new Error(`File not found: ${args.filePath}`);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const relative = path.relative(context.directory, resolved);
|
|
35
|
-
|
|
36
|
-
await context.ask({
|
|
37
|
-
permission: "remove",
|
|
38
|
-
patterns: [resolved],
|
|
39
|
-
always: [resolved],
|
|
40
|
-
metadata: { filePath: relative },
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
await unlink(resolved);
|
|
44
|
-
|
|
45
|
-
return `Removed ${relative}`;
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export const RemovePlugin: Plugin = async () => {
|
|
50
|
-
return {
|
|
51
|
-
tool: { remove: remove },
|
|
52
|
-
};
|
|
53
|
-
};
|