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

View File

@@ -0,0 +1,115 @@
{
"blockSetId": "events",
"name": "Event Triggers",
"description": "Blocks that initiate and respond to experiment events",
"version": "1.0.0",
"pluginApiVersion": "1.0",
"hriStudioVersion": ">=0.1.0",
"trustLevel": "official",
"category": "events",
"author": {
"name": "HRIStudio Team",
"email": "support@hristudio.com",
"organization": "HRIStudio"
},
"documentation": {
"mainUrl": "https://docs.hristudio.org/blocks/events",
"description": "Event blocks are the starting points for experiment sequences. They respond to trial states, participant actions, and system events."
},
"blocks": [
{
"id": "when_trial_starts",
"name": "when trial starts",
"description": "Triggered when the trial begins execution",
"category": "event",
"shape": "hat",
"icon": "Play",
"color": "#22c55e",
"nestable": false,
"parameters": [],
"execution": {
"trigger": "trial_start",
"blocking": false
}
},
{
"id": "when_participant_speaks",
"name": "when participant speaks",
"description": "Triggered when participant speech is detected",
"category": "event",
"shape": "hat",
"icon": "Mic",
"color": "#22c55e",
"nestable": false,
"parameters": [
{
"id": "duration_threshold",
"name": "Min Duration (s)",
"type": "number",
"value": 0.5,
"min": 0.1,
"max": 10,
"step": 0.1,
"description": "Minimum speech duration to trigger event"
}
],
"execution": {
"trigger": "speech_detected",
"blocking": false
}
},
{
"id": "when_timer_expires",
"name": "when timer expires",
"description": "Triggered after a specified time delay",
"category": "event",
"shape": "hat",
"icon": "Timer",
"color": "#22c55e",
"nestable": false,
"parameters": [
{
"id": "delay",
"name": "Delay (s)",
"type": "number",
"value": 5,
"min": 0.1,
"max": 300,
"step": 0.1,
"description": "Time delay before triggering"
}
],
"execution": {
"trigger": "timer",
"blocking": false
}
},
{
"id": "when_key_pressed",
"name": "when key pressed",
"description": "Triggered when wizard presses a specific key",
"category": "event",
"shape": "hat",
"icon": "Keyboard",
"color": "#22c55e",
"nestable": false,
"parameters": [
{
"id": "key",
"name": "Key",
"type": "select",
"value": "space",
"options": ["space", "enter", "1", "2", "3", "4", "5", "escape"],
"description": "Key that triggers the event"
}
],
"execution": {
"trigger": "keypress",
"blocking": false
}
}
]
}