Remove .openhands/hooks.json and .openhands/hooks/on_stop.sh which were
blocking subsequent prompts by running quality gate checks (npm run lint
and npm test) before allowing agent completion.
Co-authored-by: openhands <openhands@all-hands.dev>
* fix(setup): always run npm ci to ensure hooks have dependencies
The on_stop.sh hook runs npm run lint and npm test, which require
node_modules to be installed. Previously, setup.sh only ran npm ci
if node_modules was missing, which could fail if:
- node_modules existed but was incomplete/corrupt
- setup.sh hadn't completed before hooks ran
- package-lock.json was updated but node_modules was stale
Now npm ci always runs during setup, ensuring dependencies are
consistently installed when OpenHands begins working with the repo.
Co-authored-by: openhands <openhands@all-hands.dev>
* Add session_start hook to run setup.sh automatically
The hooks.json was missing a session_start hook, which meant setup.sh
(which installs npm packages via 'npm ci') was never run automatically
when OpenHands began working with this repository.
This caused the stop hook to fail because npm packages weren't installed.
Co-authored-by: openhands <openhands@all-hands.dev>
---------
Co-authored-by: openhands <openhands@all-hands.dev>
* feat: use uvx for temporary agent-server installation in dev mode
- Replace direct agent-server CLI invocation with uvx temporary install
- Add OH_AGENT_SERVER_VERSION env var for specific PyPI versions
- Add OH_AGENT_SERVER_GIT_REF env var for git commits/branches
- Auto-install uv in .openhands/setup.sh if not present
- Update documentation (README, DEVELOPMENT.md, AGENTS.md)
- Add comprehensive tests for buildAgentServerCommand()
This removes the requirement to permanently install agent-server via
'uv tool install'. Users only need uv installed, and npm run dev will
automatically download and run the appropriate agent-server version.
Co-authored-by: openhands <openhands@all-hands.dev>
* fix: use subdirectory syntax for git ref in uvx monorepo
The software-agent-sdk is a uv workspace monorepo with packages in
subdirectories (openhands-agent-server/, openhands-tools/, etc.).
When installing from git, uvx requires the #subdirectory= fragment to
specify which package to install from the workspace.
Tested with: OH_AGENT_SERVER_GIT_REF=main npm run dev
Co-authored-by: openhands <openhands@all-hands.dev>
---------
Co-authored-by: openhands <openhands@all-hands.dev>