mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-10-07 15:58:03 +08:00
* feat: add VITE_LOAD_PUBLIC_SKILLS config to optionally disable public skills Add a new environment variable VITE_LOAD_PUBLIC_SKILLS that controls whether skills from the OpenHands extensions marketplace (https://github.com/OpenHands/extensions) are loaded. Defaults to true (enabled). Changes: - Add shouldLoadPublicSkills() function in agent-server-config.ts - Update skills-service.ts to use the new config function - Update agent-server-adapter.ts loadSkillsForConversation to use the config - Document the new env var in .env.sample and AGENTS.md Set VITE_LOAD_PUBLIC_SKILLS=false to disable loading public skills. Co-authored-by: openhands <openhands@all-hands.dev> * fix: pass VITE_SESSION_API_KEY to Vite dev server when SESSION_API_KEY is set When running in environments with SESSION_API_KEY set (like OpenHands sandbox), the agent-server requires authentication. This fix passes the session API key to the Vite dev server so the frontend can authenticate API requests. Co-authored-by: openhands <openhands@all-hands.dev> * fix: pass load_public_skills and load_user_skills in agent_context when starting conversations This is the critical fix - the agent_context.load_public_skills flag must be passed in the start conversation request for the SDK to load skills from https://github.com/OpenHands/extensions at runtime. Previously we were only passing load_public=true to the /api/skills endpoint which is used for UI display, but NOT passing it to the conversation start payload which controls what skills are actually available during agent execution. Changes: - Add agent_context with load_public_skills and load_user_skills to the agent configuration in createAgentFromSettings() - Uses shouldLoadPublicSkills() which respects VITE_LOAD_PUBLIC_SKILLS env var Co-authored-by: openhands <openhands@all-hands.dev> * test: add shouldLoadPublicSkills mock to all tests that mock agent-server-config Fix failing tests by adding the new shouldLoadPublicSkills function to the mock definition for #/api/agent-server-config. Also add test assertion to verify agent_context is included in the start conversation payload with load_public_skills and load_user_skills flags. Co-authored-by: openhands <openhands@all-hands.dev> --------- Co-authored-by: openhands <openhands@all-hands.dev>