Merge branch 'NousResearch:main' into docker-optimization

This commit is contained in:
Bryan Cross
2026-03-30 15:29:27 -05:00
committed by GitHub
2 changed files with 23 additions and 4 deletions

View File

@@ -27,9 +27,16 @@ def _coerce_bool(value: Any, default: bool = True) -> bool:
return default return default
if isinstance(value, bool): if isinstance(value, bool):
return value return value
if isinstance(value, int):
return value != 0
if isinstance(value, str): if isinstance(value, str):
return value.strip().lower() in ("true", "1", "yes", "on") lowered = value.strip().lower()
return bool(value) if lowered in ("true", "1", "yes", "on"):
return True
if lowered in ("false", "0", "no", "off"):
return False
return default
return default
def _normalize_unauthorized_dm_behavior(value: Any, default: str = "pair") -> str: def _normalize_unauthorized_dm_behavior(value: Any, default: str = "pair") -> str:

View File

@@ -699,14 +699,19 @@ install_deps() {
# Install the main package in editable mode with all extras. # Install the main package in editable mode with all extras.
# Try [all] first, fall back to base install if extras have issues. # Try [all] first, fall back to base install if extras have issues.
if ! $UV_CMD pip install -e ".[all]" 2>/dev/null; then ALL_INSTALL_LOG=$(mktemp)
if ! $UV_CMD pip install -e ".[all]" 2>"$ALL_INSTALL_LOG"; then
log_warn "Full install (.[all]) failed, trying base install..." log_warn "Full install (.[all]) failed, trying base install..."
log_info "Reason: $(tail -5 "$ALL_INSTALL_LOG" | head -3)"
rm -f "$ALL_INSTALL_LOG"
if ! $UV_CMD pip install -e "."; then if ! $UV_CMD pip install -e "."; then
log_error "Package installation failed." log_error "Package installation failed."
log_info "Check that build tools are installed: sudo apt install build-essential python3-dev" log_info "Check that build tools are installed: sudo apt install build-essential python3-dev"
log_info "Then re-run: cd $INSTALL_DIR && uv pip install -e '.[all]'" log_info "Then re-run: cd $INSTALL_DIR && uv pip install -e '.[all]'"
exit 1 exit 1
fi fi
else
rm -f "$ALL_INSTALL_LOG"
fi fi
log_success "Main package installed" log_success "Main package installed"
@@ -1070,7 +1075,14 @@ print_success() {
echo "" echo ""
echo -e "${YELLOW}⚡ Reload your shell to use 'hermes' command:${NC}" echo -e "${YELLOW}⚡ Reload your shell to use 'hermes' command:${NC}"
echo "" echo ""
echo " source ~/.bashrc # or ~/.zshrc" LOGIN_SHELL="$(basename "${SHELL:-/bin/bash}")"
if [ "$LOGIN_SHELL" = "zsh" ]; then
echo " source ~/.zshrc"
elif [ "$LOGIN_SHELL" = "bash" ]; then
echo " source ~/.bashrc"
else
echo " source ~/.bashrc # or ~/.zshrc"
fi
echo "" echo ""
# Show Node.js warning if auto-install failed # Show Node.js warning if auto-install failed