feat: implement complete plugin store repository synchronization system

• Fix repository sync implementation in admin API (was TODO placeholder)
- Add full fetch/parse logic for repository.json and plugin index -
Implement robot matching by name/manufacturer patterns - Handle plugin
creation/updates with proper error handling - Add comprehensive
TypeScript typing throughout

• Fix plugin store installation state detection - Add getStudyPlugins
API integration to check installed plugins - Update PluginCard component
with isInstalled prop and correct button states - Fix repository name
display using metadata.repositoryId mapping - Show "Installed"
(disabled) vs "Install" (enabled) based on actual state

• Resolve admin access and authentication issues - Add missing
administrator role to user system roles table - Fix admin route access
for repository management - Enable repository sync functionality in
admin dashboard

• Add repository metadata integration - Update plugin records with
proper repositoryId references - Add metadata field to
robots.plugins.list API response - Enable repository name display for
all plugins from metadata

• Fix TypeScript compliance across plugin system - Replace unsafe 'any'
types with proper interfaces - Add type definitions for repository and
plugin data structures - Use nullish coalescing operators for safer null
handling - Remove unnecessary type assertions

• Integrate live repository at https://repo.hristudio.com - Successfully
loads 3 robot plugins (TurtleBot3 Burger/Waffle, NAO) - Complete ROS2
action definitions with parameter schemas - Trust level categorization
(official, verified, community) - Platform and documentation metadata
preservation

• Update documentation and development workflow - Document plugin
repository system in work_in_progress.md - Update quick-reference.md
with repository sync examples - Add plugin installation and management
guidance - Remove problematic test script with TypeScript errors

BREAKING CHANGE: Plugin store now requires repository sync for robot
plugins. Run repository sync in admin dashboard after deployment to
populate plugin store.

Closes: Plugin store repository integration Resolves: Installation state
detection and repository name display Fixes: Admin authentication and
TypeScript compliance issues
This commit is contained in:
2025-08-07 10:47:29 -04:00
parent b1f4eedb53
commit 18f709f879
33 changed files with 5146 additions and 2273 deletions

19
.rules
View File

@@ -1,7 +1,7 @@
You are an expert in TypeScript, Node.js, Next.js 15 App Router, React 19 RC, Shadcn UI, Radix UI, Tailwind CSS, tRPC, Drizzle ORM, NextAuth.js v5, and the HRIStudio platform architecture.
## Project Overview
HRIStudio is a production-ready web-based platform for managing Wizard of Oz (WoZ) studies in Human-Robot Interaction research. The platform provides researchers with standardized tools for designing experiments, executing trials, and analyzing data while ensuring reproducibility and scientific rigor.
HRIStudio is a web-based platform for managing Wizard of Oz (WoZ) studies in Human-Robot Interaction research. The platform provides researchers with standardized tools for designing experiments, executing trials, and analyzing data while ensuring reproducibility and scientific rigor. It's specification and related paper can be found at docs/paper.md (READ THIS), as well as the docs folder.
## Technology Stack
- **Framework**: Next.js 15 with App Router and React 19 RC
@@ -217,6 +217,23 @@ export const adminProcedure = protectedProcedure.use(({ ctx, next }) => {
Follow Next.js 15 best practices for Data Fetching, Rendering, and Routing. Always reference the comprehensive documentation in the `docs/` folder before implementing new features.
## Documentation Guidelines
- **Location**: ALL documentation must be in `docs/` folder - NEVER create markdown files in root
- **Structure**: Use existing documentation organization and file naming conventions
- **Cross-References**: Always link to related documentation files using relative paths
- **Updates**: When adding features, update relevant docs files (don't create new ones unless necessary)
- **Completeness**: Document all new features, APIs, components, and architectural changes
- **Format**: Use consistent markdown formatting with proper headers, code blocks, and lists
- **Status Tracking**: Update `docs/work_in_progress.md` for active development
- **Integration**: Ensure new docs integrate with existing quick-reference and overview files
## Plugin System Documentation Standards
- **Core Blocks**: Document in `docs/core-blocks-system.md` (to be created)
- **Robot Plugins**: Use existing `docs/plugin-system-implementation-guide.md`
- **Repository Structure**: Document all plugin repositories in dedicated sections
- **Block Definitions**: Include JSON schema examples and validation rules
- **Loading Process**: Document async loading, error handling, and fallback systems
## Response Guidelines
- Keep responses concise and minimal
- No emojis or excessive formatting